Dynamic System Extended Kalman Filter navigation bar

Table of Contents

Nonlinear State-Space

Implements a continuous-time non-linear state-space system.

Library

QUARC Targets/Continuous

Description

Nonlinear State-Space

The Nonlinear State-Space block implements a non-linear continuous-time state-space system. The non-linear ordinary differential equation (ODE) takes the form:

x_dot = f(x,u)
y = g(x,u)

All quantities may be vectors. The derivatives function, f(x,u), and the output function, g(x,u), must be implemented by the user using Simulink blocks. To enter the derivatives function, f(x,u), double-click on the block to open the block parameters dialog. Then click on the Derivatives function, f(x,u)... button to open the subsystem in which the derivatives function should be implemented.

Likewise, to enter the output function, g(x,u), double-click on the block to open the block parameters dialog. Then click on the Output function, g(x,u)... button to open the subsystem in which the output function should be implemented.

Warning

At no time should the input and output ports within the function subsystems be deleted. Doing so will break the block!

The Nonlinear State-Space block allows an optional external reset port to be added via the External reset parameter so that the states of the block may be reset to their initial conditions when the external reset is triggered. Note that this input has direct feedthrough to the y output of the block, so if the output of the block feeds back directly to the reset port or feeds back through a series of blocks that have direct feedthrough, then an algebraic loop will result.

Helpful Hints

Dimensions

Hint The states, x, and outputs, y, are column vectors. When defining the various non-linear functions, be sure to output the correct dimensions.

Input Ports

u

The input signal to the system.

reset

An optional input that may be used to reset the states of the non-linear state space system back to the initial conditions. This input is only present if the External reset parameter is set to a value other than none.

x0

An optional input that contains the initial conditions for the non-linear state space system. This input is only present if the Initial conditions source parameter is set to external.

Output Ports

y

The output signal from the system.

sat

An optional output that indicates whether the upper or lower saturation limits are being applied to the states. It is -1 if the lower limit is being applied, 0 if the states are within the limits and 1 if the upper limit is being applied. This output is only present when the Show saturation port option is checked.

Data Type Support

This block accepts input of type double. The output is of type double.

Parameters and Dialog Box

Nonlinear State-Space

External reset

This parameter allows an external reset port to be added for resetting the states of the non-linear state-space system back to the initial conditions. The available options for external reset are tabulated below:

Reset Option

Description

none

Do not have an external reset port.

rising

Reset the state when the external reset signal rises from zero to a positive value or from a negative to a positive value.

falling

Reset the state when the external reset signal falls from a positive value to zero or from a positive to a negative value.

either

Reset the state when the external reset signal changes from a zero to a non-zero value or changes sign.

level

Reset the state when the external reset signal is non-zero at the current time step or changes to zero at the current time step.

level hold

Reset the state when the external reset signal is non-zero at the current time step.

Initial condition source

The source of the initial states for the continuous-time system. If this parameter is set to internal then the Initial conditions, x0 dialog parameter is used as the source of the initial condition. Otherwise, an external input port is provided as the source for the initial conditions.

Initial conditions, x0 (tunable online)

The initial states for the continuous-time system. This option is only visible when the Initial condition source parameter is set to internal.

Limit states

Indicates whether to limit the states so that they cannot exceed the limits given in the Upper saturation limit and Lower saturation limit parameters. These limit parameters are only visible when the Limit states option is checked.

Upper saturation limit (tunable online)

The upper saturation limit for the non-linear states. This option is only visible when the Limit states option is checked.

Lower saturation limit (tunable online)

The lower saturation limit for the non-linear states. This option is only visible when the Limit states option is checked.

Show saturation port

When this option is checked an extra output port called sat is provided that is -1 when the states are being limited to the lower saturation limit, 0 when the states are not being limited and 1 when the states are being limited to the upper saturation limit.

Targets

Target Name

Compatible*

Model Referencing

Comments

QUARC Win32 Target

Yes

Yes

QUARC Win64 Target

Yes

Yes

QUARC Linux Nvidia Target

Yes

Yes

QUARC Linux QBot Platform Target

Yes

Yes

QUARC Linux QCar 2 Target

Yes

Yes

QUARC Linux QDrone 2 Target

Yes

Yes

QUARC Linux Raspberry Pi 3 Target

Yes

Yes

QUARC Linux Raspberry Pi 4 Target

Yes

Yes

QUARC Linux RT ARMv7 Target

Yes

Yes

QUARC Linux x64 Target

Yes

Yes

QUARC Linux DuoVero Target

Yes

Yes

QUARC Linux DuoVero 2016 Target

Yes

Yes

QUARC Linux Verdex Target

Yes

Yes

QUARC QNX x86 Target

Yes

Yes

Last fully supported in QUARC 2018.

Rapid Simulation (RSIM) Target

Yes

Yes

S-Function Target

No

N/A

Old technology. Use model referencing instead.

Normal simulation

Yes

Yes

* Compatible means that the block can be compiled for the target.

See Also

 

navigation bar