This post shows one way to linearize a nonlinear state equation at a steady state setpoint in MATLAB. It is assumed that a function
ode.m exists in which the state equation is implemented:
If the desired setpoint is not known, a steady state setpoint could be calculated with a desired objective function J in CasADi like this:
The example yields the following setpoint: .
Now we can linearize the model at the setpoint using the MATLAB Symbolic Math Toolbox:
This linearization yields the system matrix
and the input matrix which could be used in a linear model approximation.
Your email address will not be published. Required fields are marked *