Borrar filtros
Borrar filtros

How to create a closed loop with initial solution

2 visualizaciones (últimos 30 días)
Nico0789 Mazzi
Nico0789 Mazzi el 19 de Sept. de 2013
I would like to create using Simulink a closed loop system in which i provide the initial solution to start the simulation and than the model has to do a loop every dt (es. 0.05 s) using the solution of the previous loop. How is it doable?

Respuesta aceptada

A Jenkins
A Jenkins el 19 de Sept. de 2013
You can feedback your previous result using a delay block or memory block.
The intial condition for either of these blocks can be set by double clicking on it.
  2 comentarios
Nico0789 Mazzi
Nico0789 Mazzi el 20 de Sept. de 2013
thank you for the perfect answer! is possible to control the number of loops? for example can I impose the model to do 1 cycle per second?
A Jenkins
A Jenkins el 20 de Sept. de 2013
Try the "Unit Delay" block instead of Memory. You can set the sample time to be every 1 second.
(Depending on what you need to do, another simple option may be to change the solver in the Configuration Parameters to Fixed Step and set the step time to 1 second.)

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Programmatic Model Editing en Help Center y File Exchange.

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by