linearize a model with symbolic entries in Gains, Constants and other blocks
7 次查看(过去 30 天)
显示 更早的评论
I have built a matlab-script to linearize a gate-turbine-generator modell around a specific operation point.
To create a general model, I have tried to use symbolics (syms) in the Simulink model, but while linearize is running I receive some error:
Error using symbolisch (line 5)
Invalid setting in 'dAP_sym/Plant/Constant6' for parameter 'Value'.
or
Invalid setting in 'dAP_sym/Plant/Gain1' for parameter 'Gain'.
Do I need a additional command to use symbols in Simulink??
0 个评论
采纳的回答
Walter Roberson
2019-4-8
Symbolic variables cannot be used as Simulink signals. The only way to use symbolic variables in Simulink is to create a MATLAB Function Block that uses coder.extrinsic, and only uses the symbolic functions within the block, and nearly all acceleration must be turned off.
However even if you did all of that you would find that the Control System Toolbox and Model Predictive Controller Toolbox cannot use symbolic variables at all. It is impossible to create a transfer function or state space model or generalized state space (genss) model that use symbolic variables.
To use symbolic variables all you can do is forward and inverse Laplace transform, and write all of your own symbolic manipulation routines including your own routines to linearize models.
The alternative is to use genss and tune parameters. This is not the same as using symbolic variables. In a genss at any point all of the variables have definite numeric values that can be used for numeric calculations, but you can then change the values of the parameters without having to rebuild the model, and there are blocks that will do automatic tuning by knowing how to alter the parameter values.
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Linear Plant Specification 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!