Optimize three parameters inside Simulink model based on certain performance parameters

1 view (last 30 days)
I am trying the optimize three parameters inside my Simulink model for an audio amplifier based on the total harmonic distortion (THD) performance of the output signal. I do not know how to tune these three parameters and their cooperation effect on the THD of the output signal. Therefore, I can only use numerical method to tune these parameters.
I have written a .m file to call and run the Simulink model and a function file to calculate the THD value based on the output signal from the Simulink model.
Does anyone know how do use MATLAB to help me automatically optimize the three parameters based on the calculated THD value to achieve minimum THD? Thanks
Is the Simulink Design Optimization is specially designed to optimize step response of a system only?

Answers (1)

Guy Rouleau
Guy Rouleau on 21 Jan 2011
Simulink Design Optimization (SDO) is especially designed for this task:
http://www.mathworks.com/products/sl-design-optimization/
If SDO does not do exactly what you are looking for, it is possible to use the Optimization toolbox. You will need to define a cost function. This function will take the parameters to be tuned as input, use the SIM command to simulate the model, and return the value to be minimized, the THD in your case.
Guy
  2 Comments
JUN YU
JUN YU on 22 Jan 2011
Thanks for your suggestion. I just checked the Simulink Design Optimization. It seems that it is spectually designed to optimize the time response of a system to a step input. The optimization I want to do is to optimaize the parameters based on certain property of the output signal, in my case, the THD presents the fedility of a sine wave output signal.
James Allison
James Allison on 16 Feb 2011
SDO can solve more general optimization problems than those with models that have a step input. It's true that SDO can only define objectives and constraints based on the time history of signals in your Simulink model. If you can implement the THD calculation in your Simulink model, then SDO should work. If not, you can use the sim command to run your Simulink model, do post-processing in MATLAB to calculate THD, and link that to an algorithm from the optimization toolbox. You may need to adjust finite difference step size bounds (i.e., make them larger) if you use a gradient-based optimization algorithm since the response from a discretized simulation is numerically noisy to some degree.

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!