Documente Academic
Documente Profesional
Documente Cultură
Textbooks :
From basic to advanced, Automatic control lab
experiments (Using inverted pendulum high-speed
design experimental device),
Control and instrumentation research center,
Realgain technical institute, Published by A-Jin
Available for Download from http://realgain.co.kr
CemTool Experiment
1. Experiment Objective
CEM>>
Commands that
is used in CEM
mode
M>>
Commands that
is used in M
mode
3. Symbols Used in CEMTool
Symbols Description
‘ Represents transpose of vector or matrix.
EX) a’ or A’
“ “ , ‘ ‘ Represents string
EX) CEM>>title(“Here is a text”)
; Represents the end of the row. When used at the end of the formula, it
prevents the output on the screen.
EX) A = [1 2 3 ; 4 5 6];
: Creates vector.
EX) CEM>>t = [0:1:0.1]
CEM>> a = [1:4:1]
a=
1 2 3 4
CEM>> a = [8:2:-2]’
a=
8
6
4
2
4.2 Matrix Representation
B = A(i;j) or A(i;j) = B
CEM>> A = [1 2 3; 4 5 6; 7 8 9]
A=
1 2 3
4 5 6
7 8 9
CEM>> A(1;2) // Distinguish between the rows and columns in CEM mode ” ; “
CEM>> C(2;1:3) = [1 2 3]
M>> C(2,1:3) = [1 2 3]
C=
0 0 0
1 2 3
5.1 Check the Status of the Variable
CEM>> a = [1 2 3];
CEM>> A =[1 2 3; 4 5 6; 7 8 9];
CEM>> list
변수목록
a 실수 행렬 1*3
A 실수 행렬 3*3
CEM>> lists
변수 목록 과 내용
a=
1 2 3
A=
1 2 3
4 5 6
7 8 9
5.2 Delete Variable (del)
CEM>> del A
CEM>> list
변수목록
a 실수 행렬 1*3
CEM>> del *
CEM>> list
설정된 변수가 없습니다.
5.3 Save Variable (save)
Use menu
5.4 Load Data Command (load)
Command Description
del delete variables
logging save data that appear on the screen
msgprint show string or data on the screen
format change the type of the number
fprint print string or data
help show help menu
load load data
print print the graph that appear on the screen
quit finish CEMTool program
save save variables used
list show variables used
lists show properties of variables used
6.1 Create New CEM File
6.2 Load Existing CEM File
function
Output variables <> Input variables
:
Operation commands
:
return
7.2 Program Control Command (for)
while (condition){
statement 1;
statement 2;
:
}
CEM>> k = 4;
CEM>> a = eye(3,3); //input is 3*3 identity matrix
CEM>> b = k*a;
CEM>> while(b){
b = b – a;
}
7.3 Program Control Command (while)
while condition
statement 1;
statement 2;
:
end
M>> k = 4;
M>> a = eye(3,3); %input is 3*3 identity matrix
M>> b = k*a;
M>> while b
b = b – a;
end
7.4 Program Control Command(if, else)
CEM>> if ( a > 1) {
k = 1;
}
else { if ( a < -1) { k = 100; }
else { k = 1000; }
}
7.4 Program Control Command(if, else)
else % run statement 5 if both condition 1 nor condition 2 are not satisfied
statement 5;
end
7.4 Program Control Command(if, else)
M>> if ( a > 1)
k = 1;
elseif ( a < -1)
k = 100;
else
k = 1000;
end
8.1 Draw a Graph
CEM>> t = 0:10:0.005;
CEM>> m = 0.5;
CEM>> vo = 100;
CEM>> wo = 10;
CEM>> ws = 2;
CEM>>
v=vo*(1+m*sin(ws*t)).*sin(wo*t);
CEM>> plot(t,y);
CEM>> t = 0:10:0.1;
CEM>> plot(t, sin(t));
CEM>> hold on;
CEM>> plot(t,cos(t));
CEM>> hold off;
8.8 Split of Graph
CEM>> a = 0:10:0.1;
CEM>> b = cos(a);
CEM>> c = sin(a);
CEM>> subplot(2,2,3)
CEM>> plot(a,b)
CEM>> title(“Cosine Wave”);
CEM>> subplot(2,2,2)
CEM>> plot(a,c)
CEM>> title(“Sine Wave”);
8.9 Coordinate Tracking in Graph
‘Option’ menu
‘coordinate tracking
in graph’
1. Draw graph of y = t 3
− 4t 2
+ 6t − 19
using CEMTool
(t=0~30, time interval=10msec)
SIMTool Experiment
1. Experiment Objective
<Import block>
Drag and drop from block
list tab to make block.
<Delete block>
After select a block, use
edit-delete menu, delete
key, or eraser button of
toolbar.
<Connecting blocks>
If the mouse point goes near the >
mark that is next to each block, the
mouse cursor changes the cross-
shaped
The state is ready to draw the line.
If we go to the block which is want
to connect, holding down the left
mouse button, then the dotted lines
are come to the desired direction.
If we release left button, the line is
disappear. Else if we take the line to
near the > mark of the block or
inside of the block, spots are marked
to the four corners of the block
connected. Under these conditions,
block is connected if the button is
released.
<connecting block from line>
15
5. Simulation
sampling time
simulation method
error tolerance
time variable
[step 5] Excution
8. Discussion
Division RG-DSPIO01
Analogue Input 8 ch (16 bit)
Analogue Output 4 ch (16 bit)
Digital Input 8 ch
Digital Output 8 ch
Interface PCI BUS
Input-output voltage Adjustable within -10~10V
Encoder Pulse
4 ch
Counter
<RS-DSPIO 01>
PWM 2 ch
<RS-DSPIO 01> Connector Pin connection
RGDSP 2.0
Analogue I/O
Port (37P) Digital I/O
Port (40P)
DSP
CPU
Pin arrangement of Analogue I/O Port of RG-DSPIO01
Division RG-DSPIO01
Main Processor TMSC320C32
Processor
Operating frequency 60 MHz
ROM 128 Kbyte
Memory Normal SRAM 128 Kbyte (or 512 Kbyte)
Fast SRAM 256 Kbyte
Serial Controller Z85C30
communication Number of ports 1
Interface PCI BUS
4. I/O(Communication) Block Setting
Incoming
voltage to
input
-20
+20
voltage range Select the input voltage range set Select the output voltage range
select in I/O board set in I/O board
5. Principle of SCALING
Cable
Measuring
PC with RG-01D Terminal
instrument
Port
(Multimeter or
Oscilloscope)
<Line connection method>
RG-DSPIO01
Inverted Signal type of board RG-
Signal type of high-speed
pendulum inverted pendulum DSPIO01
design experiment device
pin number system pin number
1 motor encoder A encoder A (ch0) 9
2 motor encoder A encoder (ch0)A 27
3 motor encoder B encoder B (ch0) 8
4 motor encoder B encoder (ch0)B 26
5 pendulum encoder A encoder A (ch1) 11
6 Pendulum encoder A encoder (ch1)A 29
7 pendulum encoder B encoder B (ch1) 10
8 pendulum encoder B encoder (ch1)B 28
9 encoder power(+5V) +5V 36
10 GND GND 18
motor drive signal
11 Analogue output 0 signal 1
(+)
Motor drive signal Analogue output 0
12 Connection of Analogue I/O Port of CRG-DSPIO01 board 3
(GND) ground
(0~3) Already connected through 0 channel among 4 Analog Output
<Terminal>
Device that provide convenient way to measure signal from pins can
be seen from I/O board
7. Experiment
Voltage
4.5 V
0.5 V
3 6 9 12 15 time(sec)
<Step 1> SIMTool block composition
<Step 2> Analogue Output block setting
<Step 3> Hardware setting / Running time setting
<Step 4> C-code generation / Transplant to DSP board
<Step 5> Running and graph check
21
<Example>
initial.BLK
22
8. Discussion
Mechanical Elements
Index Spec.
Length [mm]
1300×200×250
(x×y×z)
Length of the Pendulum 400 [mm]
Weight of the Pendulum 0.2 [Kg]
Weight of the Cart 1 [Kg]
Distance Range -300 ~ 300 [mm]
Ball-Screw Pitch 12.7 [mm]
Mechanical Components
The ball screw transforms the commanded motor angular motion to the
linear motion of the moving pendulum.
Two encoders are equipped at motor side and pendulum side to measure
the position and angle of the pendulum, respectively.
DC Motor
Electrical Components
By manipulating the electrical switches, you can handle the moving
pendulum in a desired way.
Index Functions
Connection to RG-DSPI001
Step 3.
Hardware Setting
C-code Generating
Implantation to the DSP Board
An Experiment for Cart Pos. Sensing
Step 3.
Hardware Setting
C-code Generating
Implantation to the DSP Board
An Experiment for Pendulum Angle Sensing
R( s) Input
G (s) Output
Y (s)
<Open-Loop Response>
R( s) G (s) Y (s)
Input Output
<Closed-Loop Response>
wn2
Y ( s ) G=
( s ) R ( s ), G ( s )
s 2 + 2ζ wn s + wn2
2. System Response: Step Response
Overshoot:
the amount that the waveform overshoots the final value
−ζπ / 1−ζ 2
M p = 1+ e
(M a x i m u m O u t p u t ) - (F i n a l O u t p u t )
%Overshoot = ×100%
(F i n a l O u t p u t )
−ξπ / 1−ξ 2
( P.O = 100e ) Overshoot
Settling Time:
the time to reach and stay
within 2% of the final value
ξωn Settling Time
Ts =
4
2. System Response: Step Response
Rise Time:
the time duration from 10% to 90% of the final output.
Peak Time
Peak Time:
the time required to reach
the maximum peak
π
t peak =
ωn 1 − ξ 2 Rising Time
2. System Response: Step Response
Critically-damped (ζ = 1)
Under-damped
No overshoot
Faster response than
over-damped case.
Critically-damped (ζ > 1)
No overshoot Over-damped
Slow response
Critically-damped
Etc…
ζ = 0: Marginally stable
ζ < 0: Unstable
2. System Response: Step Response
Constant %-Overshoot
%OS1 < %OS 2
2. System Response: Step Response
Motor_tf.cem
// The parameters regarding the DC motor in the pendulum system
M= 1000*10^(-3); // Mass of cart
m = 200*10^(-3); // Mass of pendulum 0.2
l = 40; // 질량중심까지의 거리 (cm) 33.6046
b = 0.2; // 마찰계수
R = 0.5; // 모터 저항 (ohm)
r = 1.27; // 1회전당 카트 이동 거리(cm) 1.25
Km = 4.9; // 모터 토크 상수 (N*cm/A)
Kb = 0.0507; // 모터 역기전력상수 (V/rad/s)
g = 9.80665*10^2; // gravitation coefficient (cm/sec^2)
// Coefficients of the DC motor transfer function
Fr = b + ((2*pi)/r)^2*Km*Kb/R;
Fv = 2*pi*Km/(r*R);
// Coefficients of the DC motor transfer function
num=Fv/M;
den=[1 Fr/M 0];
3. Modeling of the Inverted Pendulum System: Pendulum-Free Case
Motor Equations:
V= iR + K bθ Km
=T (V − K bθ)
T = K mi R
Mechanical Equations:
θ =
2π
x θ = 2π x
r r
2π T 2π K m 2π K m 2π K b
F = =
F (V − K bθ )= (V − x )
r r R rR r
Mx= ∑ Fapplied= F − bx 2π 2 K m K b
Mx + b + 2π K m
x = V
r R r R
Fr Fv
X (s) Fv
Mx + Fr x =
FvV =
V ( s ) Ms 2 + Fr s
4. A Simulation for Model Verification
DC Motor
Transfer Function
A Simulation for Model Verification
A little
offset
Pend_io.cem
ch = 0; // channel number 0
AO_LV = 0; // Low voltage
AO_HV = 5; // High voltage
AO_Lin = –24; // Low input
AO_Hin = 24; // High input
b. block diagram.
1. Number of branches
The number of branches of root locus equals the
number of closed-loop poles
2. Symmetry
The root locus is symmetry about the real axis
Root Locus – Basic Rule
3. Real-axis segments
On the real axis, for K>0 the root locus exists to the left
of an odd number of real-axis, finite open-loop poles
and/or finite open-loops zeros.
Figure 6.3
Poles and zeros of a
general open-loop
system with test
points, P i , on the
real axis
Root Locus – Basic Rule
5. Behavior at infinity
The root locus approaches straight lines as asymptotes
as the locus approaches infinity. Further, the equations
of the asymptotes are given by the real-axis intercept a
nd angle in radians as follows:
Sketch the root locus for the system shown in Figure 6.4
Figure 6.4
System for Example 6.1
Figure 6.5
Root locus and
asymptotes
for the system of
Figure 6.4
K ( s − 3)( s − 5)
KG ( s ) H ( s ) =
( s + 1)( s + 2)
Figure 6.6
Root locus example
showing real- axis
break-away (-σ1) and
break-in points (σ2)
3. Exercise
Figure 6.7
Root locus of the
inverted pendulum
motor system.
3. Exercise
Desired pole position can be chosen within oblique line area, but
we usually determine rather inner area at the boundary to give a
little margin.
5. Simulation
Figure 6.11
Step response of the
Inverted pendulum
motor system when
gain K1=2.2337
5. Simulation
Figure 6.12
Step response of the
Inverted pendulum
motor system when
gain K=5.3741
6. Effect of limiter
Figure 6.17
Block setting
s+z
C (s) K , p > z
s+ p
<Step 3> Set the zero z of the lead compensator just below
the desired pole position.
3.2 Design of lead compensator
<Step 6> Draw a root locus graph with the values designed
by using CEMTool and check the step response.
If the step response fails to satisfy the
performance standards, go back to step 3 and
re-design.
4. Before lead compensation
Dominant pole
passes through
-21.3478±28.6440i
Figure 7.7
Simulation block and step
response of the
lead compensated system
6. Simulation
Figure 7.8
Step responses of the uncompensated
and lead compensated system.
6. Simulation
Figure 7.10
Limited simulation block and its corresponding step
response of the lead compensated system.
7. Effect of limiter
Figure 7.12
Experiment block
8. Experiment
Figure 7.13
Block setting
Figure 7.15
Comparison of the results of
simulation and real experiment
9. Discussion
s+z
C (s) K , p< z
s+ p
Kp : position constant
Kv : velocity constant
Ka : acceleration constant
2.2 Design of lag Compensator
<Step 5> Draw a root locus graph with the values designed
by using CEMTool and determine desired pole
which satisfies the performance standards.
<Step 4> Calculate and set the zero z of the lag compensator.
( ex. z = Kv2/Kv1 * p
= 0.04608/0.02304 * – 0.04 = – 0.08 )
4. Design lag compensator of the inverted pendulum motor
<Step 5> Draw a root locus graph and determine desired pole
Dominant pole
passes through
-21.3478±28.6440i
Figure 8.12
Limited simulation block and its corresponding ramp
response of the lag-lead compensated system.
6. Effect of limiter-ramp
Figure 8.14
Limited simulation block and its corresponding step
response of the lag-lead compensated system.
6. Effect of limiter-step
Figure 8.16
Experiment block – ramp input
7. Experiment
Figure 8.17
Experiment block – step input
<Step 4> Block setting
wn2
G ( s ) s = jw =
( jw ) + 2ζ wn ( jw ) + wn2
2
G (=
jw) R ( w) + jX ( w)
2. Bode Plot? An Example: 2nd Order System
= =
G ( jw) | G ( jw) | e jφ | G ( jw) | ∠φ
X ( w)
where | G ( jw) |=R 2 ( jw) + X 2 ( jw), φ=
tan −1 [rad/sec]
R( w)
wn2
⇒ G ( jw) =
( jw) 2 + 2ζ wn jw + wn2
Analysis of
1) Resonant Peak (Mr)
2) Resonant Frequency (wr)
3) Bandwidth (wb)
3. Analysis of Bode Plot: 2nd Order System
Resonant Peak Mr
The maximum value of the amplitude |G(jw)| of the transfer
function G(s).
1 1
if 0<ζ ≤
2ζ 1 − ζ 2 2
Mr =
= M 1 if
1
<ζ
r 2
3. Analysis of Bode Plot: 2nd Order System
Resonant Peak Mr
When Mr lies in the range 1 < Mr < 1.4 (0 dB < Mr < 3 dB)
corresponding to 0.4 < ζ < 0.7, it yields a satisfactory
transient response.
Resonant Frequency wr
The frequency at which the resonant peak (the maximum
value of |G(jw)|) is attained.
wr wn 1 − 2ζ 2
=
Bandwidth (wb)
The frequency range from 0 [Hz] to the cutoff frequency
wb for which the 3dB-attenuation is exactly occurred.
Gain Margin
The difference between 0 dB and the gain [dB] at the
frequency wg for which the phase becomes –180 [degree].
Gain Margin (Gm ) = 0[dB] − 20 log | G ( jwg ) | > 0
Phase Margin
The difference between the phase at the frequency wp
satisfying 20log|G(jwp)| = 0 [dB] and –180 [degree].
Phase Margin ( Pm ) = ∠G ( jwp ) − (−180) > 0
C=
( s ) K ( s + z ) -> PD compensator
Function : Improve transient response
Characteristics :
1. Zero at –z is selected to put design point on root locus.
2. Active circuits are required to implement.
3. Can cause noise and saturation; implement with rate feedback or with
a pole (lead).
s+z
C (s) = K -> PI compensator
s
Function : Improve steady-state error
Characteristics :
1. Increases system type.
2. Error becomes zero.
3. Zero at –z is small and negative.
4. Active circuits are required to implement.
3.1 Characteristic of PID gain
Response Steady
Settling
Rise time overshoot state
Gain time
error
Slightly
KD Decline Incline Decline
change
KP Decline Incline Incline Removal
Slightly Slightly
KI Decline Decline
change change
<Step 5> Draw a root locus graph using the values designed
by using CEMTool and check the step response.
If the step response fails to satisfy the performance
standards, go back to step 3 and re-design.
3.3 Design of PID compensator
<Step 7> Draw a root locus graph using the values designed
by using CEMTool, Obtain the gain K2
distance from poles l1 × l2 × l4
K2 =
distance from zeros l3 × l5
s+z
C (s) = K 2
s
Figure 10.6
Simulation block and step
response of the
PD compensated system
5.2 Simulation-step
<Uncompensated, PD compensated>
Figure 10.8
Comparison of the step response of two systems.
5.2 Simulation-ramp
Figure 10.9
Simulation block and ramp
response of the PD compensated
system
5.2 Simulation-ramp
<Uncompensated, PD compensated>
Figure 10.11
Comparison of the ramp response of two systems.
5.3 Effect of limiter-step
Figure 10.12
Limited simulation block and its corresponding step
response of the PD compensated system.
5.3 Effect of limiter-step
Figure 10.13
Step response of the PD compensated
inverted pendulum motor system.
5.3 Effect of limiter-ramp
Figure 10.14
Limited simulation block and its corresponding ramp
response of the PD compensated system.
5.3 Effect of limiter-ramp
Figure 10.17
Simulation block and step
response of the
PID compensated system
6.2 Simulation-step
Figure 10.20
Simulation block and ramp
response of the PID compensated
system
6.2 Simulation-ramp
Figure 10.21
Ramp responses of the PD compensated
and PID compensated system.
6.2 Simulation-ramp
Figure 10.23
Limited simulation block and its corresponding step
response of the PID compensated system.
6.3 Effect of limiter-step
Figure 10.24
Step response of the PID compensated
inverted pendulum motor system.
6.3 Effect of limiter-ramp
Figure 10.25
Limited simulation block and its corresponding ramp
response of the PID compensated system.
6.3 Effect of limiter-ramp
Figure 10.26
Ramp response of the PID compensated
inverted pendulum motor system.
7.1 Experiment-PD
Figure 10.27
Experiment block – step input
7.1 Experiment-PD
Figure 10.28
Experiment block – ramp input
Figure 10.31
Experiment block – step input
7.2 Experiment-PID
Figure 10.32
Experiment block – ramp input
∑ M : mx l − my lθ =
G G mglθ (6)
From Chapter 5, we know that
2π K m 2π K b
=F (V − x ) (7)
rR r
Substituting (4) and (7) into (5)~(6) yields
( M + m) x + mlθ + Fr x =
FvV (8)
mx + mlθ = mgθ (9)
2π 2 K m K b 2π K m
where Fr = b + ( ) and Fv = .
r R r R
2. Modeling of the Inverted Pendulum System
x = Ax + Bu
y = Cx
where x := [ x1 x2 x4 ]
T
x3
0 1 0 0 0
( M + m) g F 0 1 0 0 F 0
0 0 r 29.4200 − v −1.2121
A : =
Ml
, B : = Ml
0 0 0.3090
Ml
=
0 0 0 1 0 0 0 1 0 0
− mg
0 0 −
Fr −196.1330 0 0 −12.3615 Fv 48.4844
M M M
1 0 0 0
C :=
0 0 1 0
3. Discussion
X (s)
1) H1 ( s ) =
V ( s)
2) H 2 ( s ) =
θ (s)
V (s)
x
− PID Controller
xref +
For Pos. Control
+
+ Motor Command
θ
2. Design of A PID Controller
Step 1
Connect the PID controller to the inverted pendulum model.
2. Design of A PID Controller
Step 1
Turn on the pendulum device and initialize it.
Step 2
Make a SIMTOOL blocks for experiments:
3. Experiments
Step 5
1) By computer simulation
2) By experiment
Chapter 13
Design of A Controller
For Inverted Pendulums
Using State-Feedback & Observer
1. Objectives
0 1 0 0 0
( M + m) g F F
0 0 r − v
A =
Ml Ml
, B Ml
0 0 0 1 0
− mg F r v
F
0 0 − M
M M
Output Equation: y = Cx
Output-variables: y = [θ x ]
T
1 0 0 0
C=
0 0 1 0
2. Preliminaries
0 1 0 0 0
( M + m) g F F
0 0 r − v
A =
Ml Ml
, B Ml
0 0 0 1 0
− mg F r v
F
0 0 − M
M M
Output Equation: y = Cx Design a State-Feedback Controller
Output-variables: y = [θ x ]
T Based on only this model.
1 0 0 0
C=
0 0 1 0
2. Preliminaries
0 1 0 0 0
( M + m) g F F
0 0 r − v
A =
Ml Ml
, B Ml
0 0 0 1 0
− mg F r v
F Design an observer
0 0 − M
M M based on this whole model
Output Equation: y = Cx
Output-variables: y = [θ x ]
T
1 0 0 0
C= Output equation only concerned
0 0 1 0 with observer, not with controller.
3. State-Feedback
State-Feedback Techniques
Open loop state equation: x =
Ax + Bu , x(0) =
x0
u + x x y
B ∫ C
+
A
u = − Kx
+ u + x x y
r=0
B ∫ C
+ +
A
−K
3. State-Feedback
sX ( s ) − x(0) =( A − BX ) X ( s )
↓
( sI − ( A − BK ) ) X ( s) =
x0
adj ( sI − ( A − BK ) )
→ X ( s ) = ( sI − ( A − BK ) )
−1
x0 = x0
det ( sI − ( A − BK ) )
3. State-Feedback
An Example
Definition of Controllability
The system is said to be controllable if an input to a system
can be found that takes every state variable from a desired
initial state to a desired final state.
Definition
A dynam ic system whose state variables are the estimates
of the state variables of another system is called an
observer of the latter system. (D. Luenberger in 1963)
Objective
Estimate the state variables of the LTI system
State equation: x =
Ax + Bu , x(0) =
x0
Output equation: y = Cx
4. Linear Observer
Open-Loop Observer
xˆˆˆ=
Ax + Bu , x(0) =
x0
Same dynamic model
y = Cx
Problem:
Closed-Loop Observer
xˆˆˆ= Ax + Bu + L( y − yˆ ), x(0) = x0
Same dynamic model
y = Cx
The output error ey multiplied by L is fed back to the derivatives of the
observer`s state.
e :=
Error dynamics: x
x − xˆˆ ex =
( A − LC )ex , ex (0) =
x0 − x0
⇒
ey :=
y − yˆ ey =
Cex
By appropriately selecting L, closed-loop poles of the error
dynamics can be located at the desired positions.
4. Linear Observer
An Example
Observer Canonical Form
−a2 1 0 b2
b2 s 2 + b1 s + b0 −a
T (s) = ⇔ x =
1 0 1 x + b1 u , y =
[1 0 0] x
s 3 + a2 s 2 + a1 s + a0
−a0 0 0 b0
− a2 1 0 l1 −(a2 + l1 ) 1 0
A − LC = −a1 0 1 − l2 [1 0 0] = −(a1 + l2 ) 0 1
−a0 0 0 l3 −(a0 + l3 ) 0 0
det(sI – (A – LC)) = s3 + ( a2 + l1 ) s2 + ( a1 + l2 ) s + ( a0+ l3 )
Definition of Observability
The system is said to be observable if the initial-state
vector, say x(t0), can be found from u(t) and y(t), measured
over a finite interval of time from t0.
Separation Principle
State-feedback and observer design can be carried out
separately: If both a controller and an observer are stable,
the combined control system is also stable.
u + x x y
r=0
+
− B ∫ C
+
A
PLANT
x̂ +
B ++ x̂ ∫ C −
ŷ
+ A
−
L OBSERVER
K x̂
5. Simulation
=x Ax + Bu
= y Cx + Du
0 1 0 0 0
( M + m) g Fr F
0 0 − v
1 0 0 0 0
B =
Ml
A =
Ml Ml
C= D=
0 0 0 1 0 0 0 1 0 0
− mg F Fv
0 0 − r M
M M
5. Simulation
Step 1: Observability
Execute the command lines below to check the
observability:
CEM>>pend_ss //Load the matrices about inverted pendulum system
CEM>>rank(obsv(A,C))
Step 2: Controllability
Execute the command lines below to check the
controllability:
CEM>>pend_ss //Load the matrices about inverted pendulum system
CEM>>rank(obsv(A,B))
u
= Ax + Bu + L( y − y ) = ( A − LC ) x + [ B L ]
xˆˆˆˆ
=: Ao =: Bo y
yˆˆ= Cx
5. Simulation
Controller K:
Matrix Gain Block
x̂
Observer Dynamics
5. Simulation
1) For simulation
2) For experiment