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

S
Schlagnitweit · Mar 23, 2022 · 2K views
Question
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??
Expert Answer
Profile picture of Kshitij Singh
Kshitij Singh PhD Expert
Answered Aug 16, 2026
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.
100% Run Guarantee 3-Hour Fast-Track Delivery

Need a Custom Version or Complete Simulation for This Problem?

Our 500+ PhD engineers build, debug, and optimize working MATLAB scripts and Simulink (.slx) models tailored to your exact assignment rubrics with zero plagiarism.

Tested on MATLAB R2024b / R2026a
Turnitin 0% Plagiarism Report
Free 7-Day Revisions Guarantee
Have a different question? Ask here

Get a Free Consultation or a Sample Assignment Review!