linearize a model with symbolic entries in Gains, Constants and other blocks

9 visualizaciones (últimos 30 días)
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??

Respuesta aceptada

Walter Roberson
Walter Roberson el 8 de Abr. de 2019
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.

Más respuestas (0)

Categorías

Más información sobre Linear Plant Specification en Help Center y File Exchange.

Productos


Versión

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by