Engee documentation

Sliding Mode Controller (Reaching Law)

System controller in sliding mode with selectable sliding plane hit rate function.

sliding mode controller reaching law

Description

Block Sliding Mode Controller (Reaching Law) implements the system regulator in the sliding mode with the selection of the function of the speed of hitting the sliding plane for nonlinear systems described by the differential equation . The possibility of selecting the function of speed of hitting the slip plane allows to effectively control the process of movement of trajectory points to the slip plane.

The block can operate in the following modes:

  • control mode

    ,

  • tracking mode

    .

The formulas use the following notations:

  • - coefficient matrix;

  • - sliding (switching) plane;

  • - the function of hit rate on the sliding plane.

This block allows you to set the parameters of the sliding plane and the sliding plane hit rate function. These features provide the possibility to adjust the control law for a particular system for a specific control objective under changing external conditions.

Ports

Input

# x — system states
vector

Details

States of the system. Defined as a vector, the length of the vector should be equal to the number of states.

Data types

Float64.

Complex numbers support

No

# f(x) — system dynamics
`vector

Details

Function , describing the dynamics of the system. It is defined as a vector, the length of the vector should be equal to the number of states.

This function can be obtained from the differential equation .

Data types

Float64.

Complex numbers support

No

# g(x) — input influences
vector

Details

A function describing the input influences. Defined as a matrix of size , where is the number of states, is the number of input influences.

This function can be obtained from the differential equation .

Data types

Float64.

Complex numbers support

No

# x.ref — specified trajectories
vector

Details

The trajectories along which the system moves in tracking mode. They are specified as a vector, the length of the vector should be equal to the number of states.

In control mode, a vector of zero elements should be supplied to this port.

Data types

Float64.

Complex numbers support

No

# x.ref.dot — derivatives of given trajectories
vector

Details

The derivatives of the trajectories along which the system moves in tracking mode. They are defined as a vector, the length of the vector should be equal to the number of states.

In the control mode, a vector of zero elements should be supplied to this port.

Data types

Float64.

Complex numbers support

No

Output

# u — control actions
`vector'

Details

Computed control actions in the form of a vector whose length is equal to the number of input actions.

Data types

Float64.

Complex numbers support

No

# s(x) — coordinates
vector

Details

The coordinates of the system in sliding mode as a vector whose length is equal to the number of input actions.

Data types

Float64.

Complex numbers support

No

Parameters

Switching Function

# Switching Function — mode of operation
Regulation Mode | Tracking Mode

Details

The operating mode of the unit:

  • Regulation Mode - regulation mode; use this mode if you want the system to reach a steady state at a given point, with all the states of the system equal to zero.

  • Tracking Mode - tracking mode; use this mode if you want the system to follow a given trajectory .

Values

Regulation Mode | Tracking Mode

Default value

Regulation Mode

Program usage name

Mode

Tunable

No

Evaluatable

Yes

Sliding Surface Parameter

# Sliding Coefficients Matrix (C) — coefficient matrix

Details

Coefficient matrix defining a sliding hyperplane. Defined as a matrix by , where is the number of states, is the number of input actions.

Default value

1.0

Program usage name

SlidingMatrix

Tunable

No

Evaluatable

Yes

Reaching Law

# Reaching Law — function of sliding plane hit rate
Constant Rate | Exponential | Power Rate

Details

Function , which determines how fast the trajectory point hits the slip plane (switching). The following functions are available:

  • Constant Rate - linear function, .

    This function ensures uniform movement of the trajectory point.

  • Exponential - polynomial function, .

    This function provides faster tractor point hitting speed than linear function, in case the tractor point deviation from the sliding plane is large.

  • Power Rate - step function, .

    This function provides a fast trajectory point hit rate when the trajectory point deviation from the slip plane is large, but the hit rate decreases as the trajectory point approaches the slip plane. This allows to reduce high-frequency oscillations of the control action and increase convergence.

The following notations are used in the formulas:

  • - coefficient of reaching -y of the control action, determined by the parameters Reaching Rate (Eta);

  • - boundary layer of -th control action, defined by parameters Select Boundary Layer:;

  • - is the coefficient scaling the control effect of -th variable;

  • - degree exponent, determined by the parameters Power Rate Exponent (Alpha).

Values

Constant Rate | Exponential | Power Rate

Default value

Constant Rate

Program usage name

ReachingLaw

Tunable

No

Evaluatable

Yes

Boundary Layer

# Select Boundary Layer: — boundary layer
Sign | Relay | Hyperbolic Tangent | Saturation

Details

A function describing the boundary layer. The following functions are available:

  • Sign - function sgn, .

    When this function is selected, switches between -1 and 1 are made with a gap.

  • Relay - hysteresis, .

  • Hyperbolic Tangent - hyperbolic tangent, .

  • Saturation - saturation, .

    This function provides reduction of high-frequency oscillations of the control action by smooth switching between -1 and 1 inside the boundary layer.

In the formulas is the boundary layer width defined by the parameters Phi.

Values

Sign | Relay | Hyperbolic Tangent | Saturation

Default value

Sign

Program usage name

BoundaryLayer

Tunable

No

Evaluatable

Yes

Reaching Law Parameter

# Reaching Rate (Eta) — achievement rate

Details

A coefficient characterising the rate of approach of a trajectory point to the sliding (switching) plane. It is set as a positive scalar or a vector of positive numbers, the length of the vector should be equal to the number of control actions.

Setting a large value of the coefficient leads to faster reaching of the sliding plane, but also increases the energy consumption required for control realisation.

Default value

0.01

Program usage name

Eta

Tunable

No

Evaluatable

Yes

# Control Gain (K) — control coefficient

Details

The coefficient of the proportional part of the polynomial function of the speed of hitting the sliding (switching) plane. It is set as a positive scalar or a vector of positive numbers, the length of the vector should be equal to the number of control actions.

This coefficient determines the energy consumption required to realise the control. When it increases, the cost of control implementation increases proportionally to the deviation of the trajectory point from the slip plane.

Default value

3.0

Program usage name

K

Tunable

No

Evaluatable

Yes

# Power Rate Exponent (Alpha) — degree index

Details

Degree exponent in the stepped function of the rate of hitting the sliding (switching) plane. It is specified as a positive scalar from 0 to 1 or a vector of positive numbers from 0 to 1, the length of the vector should be equal to the number of control actions.

This parameter determines the smoothness of the process of approaching the sliding plane. The lower the value of the parameters, the smoother the process, and also, most likely, the lower the high-frequency oscillations of the control action.

Default value

0.01

Program usage name

Alpha

Tunable

No

Evaluatable

Yes

Boundary Layer Parameter

# Phi — boundary layer width

Details

Boundary layer width. It is set as a positive scalar or vector of positive numbers, the length of the vector should be equal to the number of control actions.

The wider the boundary layer, the lower the high-frequency oscillations of the control action, but the higher the static error. On the contrary, the narrower the boundary layer, the smaller the static error and the higher the high-frequency oscillations of the control action.

Default value

0.01

Program usage name

Phi

Tunable

No

Evaluatable

Yes