Optimization based on inputs and outputs (for online optimization)

14 visualizzazioni (ultimi 30 giorni)
Hi,
I want to do online optimization in a simulink real-time environment. I dont have a plant model, the plant is in the 'real' world and controlled via simulink.
The procedure for optimization could look like this:
- apply step change with initial parameters
- record response --> calculate benchmark
- give benchmark to optimization algorithm --> calculate new parameters
- apply step change with new parameters
-...
is there a way to use optimization functions such as fminsearch by giving them just the input and the output of a system? (instead of the function it self)
Cheers, Frank
  2 Commenti
Ryan G
Ryan G il 23 Ott 2012
Why don't you use the real plant to create a linear system using system identification? Essentially you can send sweeps, sin waves etc into the system, record the output and then use the I/O relation to create a linear system and do your design in Simulink instead of on a true non-linear system (which is very difficult).
Frank
Frank il 25 Ott 2012
I thought about system identification. If there is no other option, I will use this...
In this case it is an additonal step, which makes it a more complicated. Since it is a non-linear system multiple models are required. So operational points need to be found to create a model. A validation would ideally be required as well. Then controller design and testing it with the real plant to find out that it is still not perfect.
Therefore, I was looking for an easy option. ;) The plant is available to me and there is no danger in using it with an untuned controller. The real reaction can be observed directly. So why not tune it online? An optimization here would really optimize the controller and not the model. What do you see as difficult it this approach?

Accedi per commentare.

Risposta accettata

Ryan G
Ryan G il 25 Ott 2012
I think any response is highly dependent on the system, so keep in mind it is difficult, even when described, to determine how I think the system would behave and the best options.
That being said, when I see the step response, even with a nonlinear system, I think control design, linear models etc. MATLAB has the PID Tuner that makes this realtively easy and looptune if you are doing more than PID. However, these require linear systems.
Simulink Design Optimization is the closest thing you could do with a non-linear system, but it's still a tough problem (again, depending on what the system is).
You could do the optimization manually by setting the gains/parameters as tunable in the simulink model and tuning them as you run. But actually using an optimization algorithm with the real-time system, in my opinion, makes this more challenging.
  3 Commenti
K E
K E il 26 Ott 2012
Please post which concept works best, since this is an interesting topic
Aly
Aly il 12 Mar 2013
Hello frank I have a similar task of optimizing a real-time system like you described. Can you please share how did you solve it ? thanks

Accedi per commentare.

Più risposte (3)

Paulo Naves
Paulo Naves il 28 Lug 2019
I have been facing the same difficult and have not yet found a reasonable solution on the forum. I appreciate any help.

Rajiv Singh
Rajiv Singh il 29 Lug 2019
Please look at Simulink Design Optimization product. You can run simulation based optimization of chosen parameters and states while choosing your own custom minimization objective.

Paulo Naves
Paulo Naves il 29 Lug 2019
I have tried to run Simulink Design Optimization, it worked very well using "Normal Mode" , like it was done on this video (https://www.youtube.com/watch?v=EfIdQ8YopgI)
But when I change to "External Mode", in my study trying to use each iteration step as a rotation velocity for DC motor connected to an arduino ( it works well without optimization loop) I find this error: Changing property 'ReturnWorkspaceOutputsName' is not allowed.
Thanks in advance

Prodotti

Community Treasure Hunt

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

Start Hunting!

Translated by