linearize(idnlarx) - Linearize nonlinear ARX model

Syntax

SYS = linearize(NLSYS,U0,X0)

Description

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.

Input

Input

Algorithm

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

Example

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.

  1. Load sample data:

    load iddata2
    
  2. 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]);
  3. 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.

  4. 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);
    
    
  5. 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

  6. 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.

See Also

linapp 
findop(idnlarx) 
getDelayInfo(idnlarx) 

  


 © 1984-2008- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS