NGMV Control Toolbox Previous page   Next Page
nlss

Nonlinear state-space system creator: Static + NLSS + Static

Syntax

Description

NLSYS = NLSS(DIM,X0,XEQ,YEQ,INFUN,OUTFUN) creates a sandwich system which consists of a nonlinear state-space model structure in between two static mappings, as in the figure below:

The resulting structure NLSYS is meant for use with the NLSS System Simulink block available in the NGMV Toolbox (masked s-function nlsfun).

The meaning of the input arguments is as follows:

Argument Description
DIM dimension vector [Nxc,Nxd,Ny,Nu,DFT]
Nxc
number of continuous states
Nxd
number of discrete states
Ny
number of outputs
Nu
number of inputs
DFT
Direct FeedThrough flag (1 or 0)
X0 vector of initial states (set to [] for static systems)
XEQ RHS of the state equation (continuous or discrete) entered as a string (set to [] for static systems)
YEQ RHS of the output equation
INFUN Static input function
OUTFUN Static output function
TS Sample time in seconds (discrete-time models); if not specified, set to -1 by default.
PARAM structure containing parameter names and values used in XEQ and YEQ. It can be omitted if no such parameters used.

Example

DIM = [0 1 1 1 0]; % SISO 1st order system
X0 = 0; % initial state
XEQ = 'x^2 + u'; % state equation
YEQ = 'sin(omega*x)+u'; % output equation
INFUN = 'atan(u)'; % static input function
OUTFUN = 'u'; % static output function
PARAM.omega = 0.1; % define the parameter
NLSYS = NLSS(DIM,X0,XEQ,YEQ,INFUN,OUTFUN,PARAM)

See Also

nlssdiag

 

Previous page   ngmvss   nlssdiag  Next page