SystemModeler Link >

WSMLinearize


gives a linearized state-space to the model at an equilibrium.

linearizes at state values and input values .
  • linearizes a continuous-time system designed in Wolfram SystemModeler.
  • allows the following symbolic values for spec:
"EquilibriumValues"uses WSMFindEquilibrium
"InitialValues"uses WSMModelData
  • uses spec to add missing values in vals.
  • The default spec is taken to be .
  • The resulting has states , inputs , and outputs as defined in .
  • The list of states, inputs, and outputs can be found from WSMModelData:
"StateVariables"state variables
"InputVariables"input variables
"OutputVariables"output variables
  • reduces a system of DAEs to a system of ODEs and linearizes the resulting ODEs.
  • A system of ODEs with state equations and output equations is linearized at a point and .
  • The linearized system has state , input , and output , with state equations and output equation . The matrices are given by , , , and , all evaluated at and .
  • The following options can be given:
Method"NumericDerivative"methods for linearization algorithm
  • The option Method has the following possible settings:
"NumericDerivative"uses SystemModeler linearization
"SymbolicDerivative"uses StateSpaceModel linearization
Load Wolfram SystemModeler Link:
Linearize a DC-motor model around an equilibrium:
Linearize a mixing tank model around equilibrium with given state and input constraints:
Load Wolfram SystemModeler Link:
In[1]:=
Click for copyable input
 
Linearize a DC-motor model around an equilibrium:
In[1]:=
Click for copyable input
Out[1]=
 
Linearize a mixing tank model around equilibrium with given state and input constraints:
In[1]:=
Click for copyable input
In[2]:=
Click for copyable input
Out[2]=
Linearize a textual RLC circuit model:
Linearize an RLC circuit block diagram model:
Linearize an acausal RLC circuit:
Linearize a DAE model:
Linearize a DAE model symbolically:
Linearize a model without inputs:
Linearize a model without states:
Linearize a model without outputs:
Linearize around an equilibrium:
Linearize around initial values:
Linearize around equilibrium with given state and input constraints:
Linearize around given partial states and inputs, using initial values for remaining values:
Linearize a model by using the variables from WSMModelData:
Hide labels in the resulting StateSpaceModel:
By default, the method is used:
The method uses StateSpaceModel to linearize system equations:
Linearize symbolically, keeping some parameters symbolic:
Linearize symbolically, using a partially symbolic linearization point:
Use variable names:
Use variable names:
Compare responses from a model and its linearization at an equilibrium point:
Linearize around the equilibrium point:
Compare the stationary output response with a nonlinear model:
Compare the y output:
Test the stability of a linearized system from eigenvalues of the system matrix:
Since there is an eigenvalue with a positive real part, the system is unstable:
Plotting the output response also indicates an unstable system:
Test the stability of a linearized system from poles of the transfer function:
Since there is a pole with a positive real part, the system is unstable:
Do a frequency analysis using a linear model:
By plotting for the linearized transfer function :
Verify the result using Fourier on simulated data:
Compute from :
Alternatively, the imaginary parts of the eigenvalues give the resonance peaks:
Stability may depend on the linearization point:
Linearize at a symbolic angle :
Compute the eigenvalues:
Analyze stability for different angles:
Linearization takes place at time 0:
Linearize with the switch connecting at time 0:
If the switch is not connected at time 0, the result is different:
Design a PID controller:
Linearize the model:
Define a PID controller and closed-loop transfer function:
Select PID parameters for appropriate step response:
Design a lead-based controller for a DC motor based on its linearization:
Define a PI-lead controller transfer function:
Open-loop transfer function:
Select controller parameters:
Use selected parameters and close the loop with the PI-lead controller:
Design a controller using pole placement:
Place the closed-loop poles:
Compute the closed-loop state-space model:
Show the step response:
Design an LQ controller:
Define state and input weight matrices:
Define LQ controller gain:
Closed-loop state-space model:
Closed-loop step response:
Design a state estimator:
Compute estimator gains and the estimator state-space model:
The state and output response to a unit step on the inputs:
Observer state response:
Compare each state and its estimate:
Linearize around initial values using WSMModelData:
Compare results:
Linearize around equilibrium using WSMFindEquilibrium:
Compare results:
Compare responses from a model and its linearization at an equilibrium point:
Linearize around the equilibrium point:
Compare the stationary output response with a nonlinear model:
Compare the first output:
Compare responses from a model and its linearization at a non-equilibrium point:
Linearize around the given point:
Compare the stationary output response with a nonlinear model:
Get the output equations:
Compute the stationary output:
Compare the first output:
Use TransferFunctionModel to convert to a transfer function representation:
Use ToDiscreteTimeModel to discretize a linearized model:
Discretize using sample time :
The linearized state-space model is not unique:
Change the order in which the variables x1 and x2 are declared:
The models are equivalent and have identical transfer functions:
StateSpaceModel can linearize systems of ordinary differential equations:
Using approximate numeric parameter values:
Using SystemModeler to linearize a model of the same system:
Some models cannot be linearized symbolically:
Use to linearize numerically: