Optimize three parameters inside Simulink model based on certain performance parameters
古いコメントを表示
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?
回答 (1 件)
Guy Rouleau
2011 年 1 月 21 日
0 投票
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 件のコメント
JUN YU
2011 年 1 月 22 日
James Allison
2011 年 2 月 16 日
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.
カテゴリ
ヘルプ センター および File Exchange で Parameter Estimation についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!