| System Identification Toolbox™ | ![]() |
SYS = linearize(NLSYS,U0,X0)
SYS = linearize(NLSYS,U0,X0) linearizes a nonlinear ARX model about the specified operating point U0 and X0. The linearization is based on tangent linearization. For more information about the definition of states for idnlarx models, see Definition of idnlarx States.
NLSYS: idnlarx model.
U0: Matrix containing the constant input values for the model.
X0: Model state values. The states of a nonlinear ARX model are defined by the time-delayed samples of input and output variables. For more information about the states of nonlinear ARX models, see the getDelayInfo(idnlarx) reference page.
Note To estimate U0 and X0 from operating point specifications, use the findop(idnlarx) command. |
SYS is an idss model.
When the Control System Toolbox™ product is installed, SYS is an LTI object .
The following equations govern the dynamics of an idnlarx model:
![]()
where X(t) is a state vector, u(t) is
the input, and y(t) is the output. A and B are constant matrices.
is [y(t), u(t)]T.
The output at the operating point is given by
y* = f(X*, u*)
where X* and u* are the state vector and input at the operating point.
The linear approximation of the model response is as follows:
![]()
where
![]()
![]()
![]()
![]()
![]()
![]()
Note For linear approximations over larger input ranges, use linapp. For more information, see the linapp reference page. |
In this example, you linearize a nonlinear ARX model around an operating point corresponding to a simulation snapshot at a specific time. Create an idnlarx model estimated using sample data.
Load sample data:
load iddata2
Estimate idnlarx model from sample data:
model = nlarx(z2,[4 3 10],'tree','custom',...
{'sin(y1(t-2)*u1(t))+y1(t-2)*u1(t)+u1(t).*u1(t-13)',...
'y1(t-5)*y1(t-5)*y1(t-1)'},'nlr',[1:5, 7 9]);Plot the response of the model for a step input:
step(model, 20)

The step response shows that the model reached a steady state at T = 20 seconds.
Compute the operating point corresponding to T = 20.
stepinput = iddata([],[zeros(10,1);ones(200,1)],model.Ts); % Compute operating point. [x,u] = findop(model,'snapshot',20,stepinput);
Linearize the model about the operating point corresponding to the model snapshot at T=20.
sys = linearize(model,u,x)
The transfer function from input u1 to output y1 displays in the MATLAB® Command Window.
0.02679+0.02681z^-10+0.06429z^-11+0.03942z^-12+0.01117z^-13 ------------------------------------------------------------- 1-0.8898z^-1-0.2084z^-2+0.08166z^-3+0.2263z^-4-0.001715z^-5 Sampling time: 0.1
Compare the step responses of the nonlinear model and the linearized model.
step(model,sys,20) % compare step responses.

The linearized model response tracks the nonlinear model output.
| linapp | |
| findop(idnlarx) | |
| getDelayInfo(idnlarx) |
![]() | linear | linearize(idnlhw) | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |