Simulation time" and Sampling time

29 visualizaciones (últimos 30 días)
Maria
Maria el 22 de Nov. de 2014
Comentada: hana shakboua el 3 de Mzo. de 2018
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

Respuesta aceptada

Orion
Orion el 22 de Nov. de 2014
Editada: Orion el 22 de Nov. de 2014
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 comentarios
Maria
Maria el 22 de Nov. de 2014
Editada: Maria el 22 de Nov. de 2014
Ok , I understood that and thanks a lot for you .
hana shakboua
hana shakboua el 3 de Mzo. de 2018
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?

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Simulink en Help Center y File Exchange.

Etiquetas

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by