LimIntegrator

Integrator with limited value of the output and optional reset

    LimIntegrator

Library

Blocks/Continuous

Description

This blocks computes y as integral of the input u multiplied with the gain k. If the integral reaches a given upper or lower limit and the input will drive the integral outside of this bound, the integration is halted and only restarted if the input drives the integral away from the bounds.

It might be difficult to initialize the integrator in steady state. This is discussed in the description of package Continuous.

If parameter limitAtInit = false, the limits of the integrator are removed from the initialization problem which leads to a much simpler equation system. After initialization has been performed, it is checked via an assert whether the output is in the defined limits. For backward compatibility reasons limitAtInit = true. In most cases it is best to use limitAtInit = false.

If the reset port is enabled, then the output y is reset to set or to y_start (if the set port is not enabled), whenever the reset port has a rising edge.

Parameters

LimIntegrator_0

NameLabelDescriptionData TypeValid Values

mo_k

k

Integrator gain

Scalar

mo_outMax

outMax

Upper limit of output

Scalar

mo_outMin

outMin

Lower limit of output

Scalar

mo_use_reset

use_reset

=true, if reset port enabled

Number

0
1

mo_use_set

use_set

=true, if set port enabled and used as reinitialization value when reset

Number

0
1

mo_initType

initType

Type of initialization (1: no init, 2: steady state, 3/4: initial output)

Structure

mo_initType/choice1

No initialization (start values are used as guess values with fixed=false)

Number

0
1

mo_initType/choice2

Steady state initialization (derivatives of states are zero)

Number

0
1

mo_initType/choice3

Initialization with initial states

Number

0
1

mo_initType/choice4

Initialization with initial outputs (and steady state of the states if possible)

Number

0
1

mo_limitsAtInit

limitsAtInit

= false, if limits are ignored during initialization (i.e., der(y)=k*u)

Scalar

true
false

mo_y_start

y_start

Initial or guess value of output (must be in the limits outMin .. outMax)

Scalar

LimIntegrator_1

NameLabelDescriptionData TypeValid Values

mo_strict

strict

= true, if strict limits with noEvent(..)

Scalar

true
false

LimIntegrator_2

NameLabelDescriptionData TypeValid Values

mo_u

u

u

Structure

mo_u/fixed

fixed

Cell of scalars

true
false

mo_u/start

start

Cell of scalars

mo_y

y

y

Structure

mo_y/fixed

fixed

Cell of scalars

true
false

mo_y/start

start

Cell of scalars

mo_reset

reset

reset

Structure

mo_reset/fixed

fixed

Cell of scalars

true
false

mo_reset/start

start

Cell of scalars

mo_set

set

set

Structure

mo_set/fixed

fixed

Cell of scalars

true
false

mo_set/start

start

Cell of scalars

Ports

NameTypeDescriptionIO TypeNumber

u

implicit

Connector of Real input signal

input

1

y

implicit

Connector of Real output signal

output

1

Port 3

implicit

Optional connector of reset signal

input

mo_use_reset

Port 4

implicit

Optional connector of set signal

input

mo_use_reset&&mo_use_set