How to achieve automatic simulation

5 views (last 30 days)
xia shane
xia shane on 15 Mar 2015
Answered: Sebastian Castro on 9 Apr 2015
Hi,everybody! I recently encountered some problems using Simulink.
The specific questions as following:
Our recent project needs to do simulation and optimization using neural network algorithm with Simulink. We want to achieve automatic Simulink simulation. Specific process is as follows: click the Simulink start button, start the cycle, for example the deadline time(cut-off time) is set to 20s, when it comes to 20s,judge the performance index to see whether it has meeted certain conditions, if not, the cycle will not stop.It will start from 0s again, put the previous weights and output result feedback,then adjust the weights , then when it comes to 20s again, do the same judgement, until the result meets certain performance index conditions, the simulation ends. The judgement condition can be error which deduced by subtraction of theoretical value and desired value etc.. Finally, we need to save the controller parameters and the weights of output at the last time.
how to achieve this effect?
Thanks for your answers!

Answers (1)

Sebastian Castro
Sebastian Castro on 9 Apr 2015
The following documentation page will show you much of what you need to know to run simulations programmatically. http://www.mathworks.com/help/simulink/programmatic.html
The key element is using the sim function to simulate your model, collecting outputs, and evaluating them against your criteria. Then, you can modify parameters in the MATLAB workspace or in the model itself and try again.
- Sebastian

Categories

Find more on Simulink in Help Center and File Exchange

Products

Community Treasure Hunt

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

Start Hunting!