Simulation time" and Sampling time

41 次查看(过去 30 天)
I am newbie to Matlab and Simulink , I am asking about "simulation time" and "sampling time" in simulink What are they ? What is the relationship between them and also the relationship between them and Real time (in real World). I hear that this simulink is run at simulation time 30 and sampling time 0.01 , What that is mean ?
thanks for all

采纳的回答

Orion
Orion 2014-11-22
编辑:Orion 2014-11-22
With Simulink, you are modeling some dynamics systems, meaning that your problem is time depending (For a physical modeling, you're gonna have differential equation to solve,...).
To see how a model behave you have to simulate it and see what happens when time increases.
at t = 0, the system is initialized.
then Simulink computes the state of your system at the next sample time 0.01s, then at 0.02, 0.03,...each step beeing updating using the previous values, and so on until the final simulation time you defined (ts = 30s).
The sample time exists, because you are in a numerical environment, not an analytic one. With a sample time too big, your model risk to diverge, and with a too small, your simulation risk to takes a really long time.
The final time is here to say to Simulink when to stop, because usually, you just want to see the evolution of your system for a defined period. But you can put inf as simulation parameter and then simulate until the end of time.
And the calculation is not happening in "real time simulation ". But the results are calculated against the "time", because you are solving a time dependant system. So if your modeling is good, then you will know how your system respond to stimuli in "real life".
  4 个评论
Maria
Maria 2014-11-22
编辑:Maria 2014-11-22
Ok , I understood that and thanks a lot for you .
hana shakboua
hana shakboua 2018-3-3
Hi, what is the use for variable sample time? i want to input different values each value for different duration_ i am working on control systems in wind turbine, i want to enter different values of wind speed, is it right to use step block and variable sample time?

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Classical Control Design 的更多信息

标签

产品

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by