WOLFRAM SYSTEMMODELER

LQControlSystem

Controller based on LQ (Linear Quadratic) design

Diagram

Wolfram Language

In[1]:=
Click for copyable input
SystemModel["IntroductoryExamples.Systems.Components.LQControlSystem"]
Out[1]:=

Information

This is a LQ (Linear Quadratic) design of a controller for an inverted pendulum. It contains a number of different reference inputs in order to change system behavior. The reference input type is changed with the parameter referenceType. The output signal is limited to get a realistic response.

The observer has been implemented in a state space block and the position and angle is measured.

Connectors (3)

angle

Type: RealInput

Description:

xPos

Type: RealInput

Description:

y

Type: RealOutput

Description:

Parameters (12)

A

Value: {{-1.80378, 1.0, -0.301845, 0.0}, {-1.67236, -13.7653, -0.753808, 0.0}, {-0.301845, 0.0, -7.83137, 1.0}, {-0.617197, -19.3623, -14.7496, 0.0}}

Type: Real[:,:]

Description: Observer A matrix

B

Value: {{0.0, 1.80378, 0.301845}, {2.69088, 1.67236, 2.29112}, {0.0, 0.301845, 7.83137}, {3.785, 0.617197, 30.7107}}

Type: Real[:,:]

Description: Observer B matrix

C

Value: {{1, 0, 0, 0}, {0, 1, 0, 0}, {0, 0, 1, 0}, {0, 0, 0, 1}}

Type: Real[:,:]

Description: Observer C matrix

D

Value: {{0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}}

Type: Real[:,:]

Description: Observer D matrix

K_L

Value: {{-14.1421, -23.685, 114.738, 21.4806}}

Type: Real[:,:]

Description: L matrix such that eigenvalues for A-B*L is inside stability region

k_Lr

Value: -14.1421

Type: Real

Description: Static gain in order to make system gain equal to one

uMax

Value: 10

Type: Real

Description: Maximum output value

table

Value: [0.5, 1; 2, 1; 2.5, 2; 3, 0; 3.5, 2; 4, 1; 4.5, 1]

Type: Real[:,2]

Description: Table matrix (time = first column). Only if inputType=3

referenceType

Value: 2

Type: Integer

Description: Type of reference signal: 1=step, 2=pulse, 3=time table

k1

Value: referenceType == 1

Type: Boolean

Description: Step signal

k2

Value: referenceType == 2

Type: Boolean

Description: Pulse signal

k3

Value: referenceType == 3

Type: Boolean

Description: Time table

Components (13)

step

Type: Constant

Description:

observer

Type: StateSpace

Description:

L

Type: MatrixGain

Description:

feedback

Type: Feedback

Description:

L_r

Type: Gain

Description:

mux

Type: Multiplex3

Description:

pulse

Type: Pulse

Description:

switch1

Type: Switch

Description:

ConstantQ

Type: BooleanConstant

Description:

limiter

Type: Limiter

Description:

switch2

Type: Switch

Description:

ConstantQ1

Type: BooleanConstant

Description:

timeTable1

Type: TimeTable

Description:

Used in Examples (1)

InvertedPendulum

A controlled inverted pendulum system