You are on page 1of 14

1/14

Lecture 2: Experiment 1
EE380 (Control Systems)

Manavaalan Arun Kant Ramprasad


Gunasekaran Singh Potluri
PhD student PhD student Associate Professor
manvaal@iitk.ac.in arunkant@iitk.ac.in potluri@iitk.ac.in
JJ
Department of Electrical Engineering II
Indian Institute of Technology Kanpur J
I
Back
Forward
August 05, 2011
Close
2/14

Contents
1 Outline of the experiment 3

2 Tasks common to all 6 experiments 4

3 Homework (HW) vs. Lab work (LW) 5

4 HW: Determine parameters of plant model 6

5 LW: Identification 7

6 Loop-shaping (1/5): Typical Gdes 8

7 Loop-shaping (2/5): Example 9

8 Loop-shaping (3/5): ζ ←→ M p ←→ PM 10
JJ
9 Loop-shaping (4/5): M p ←→ DD ←→ PM 11
II
10 Loop-shaping (5/5): Determination of ω g 12 J
I
11 Discretization 13
Back
12 Simulate; LW: C code, Implement, Analyze 14 Forward
Close
3/14

Outline of the experiment


Want to control the speed of a pmdc motor. Steps:
• Mathematical modeling
• Design using loop-shaping
• Simulation on PC
• Deployment on experimental setup

JJ
II
J
I
Back
Forward
Close
4/14

Tasks common to all 6 experiments


Simulation
• Perform PC-based simulation of CL system using GNU Octave.
• Perform PC-based simulation of digital control of a continuous-time system using
GNU Octave.

Realization on hardware
• Utilize the various components of an integrated development environment (IDE):
editor, compiler, linker, debugger, and programmer to program a µC.
• Program controller using C language into µC.
• Monitoring: read data into PC from µC using UART modules.
JJ
Analysis II
J
• Compare actual performance with predicted performance.
I
Back
Forward
Close
5/14

Homework (HW) vs. Lab work (LW)


HW meant to help practice most of LW in advance.

HW LW

Determination of parameters of plant model Identification of parameters of plant model

Design of controller using loop-shaping Design of controller using loop-shaping

Discretization of controller Discretization of controller


JJ
II
Simulation Write controller in C J
I
Back
Implementation; verification of response
Forward
Close
6/14

HW: Determine parameters of plant model


TL (s)

V (s) + 1 I (s) T (s) + − 1 ω (s)


Kt
− sL a + RΣ Js + B

Kb

• KT , Kb given in Table 1.1.


ω (s) Km
= • J is rotor inertia in Table 1.1.
V (s) τm s + 1
with • B calculated in §1.4.1.
JJ
KT
Km = , • RΣ calculated in §1.4.2. II
R ∑ B + K T Kb J
R∑ J I
τm =
R ∑ B + K T Kb Back
Forward
Close
7/14

LW: Identification
V ω
ω(∞)
R 0.63ω(∞)

t τ t
Plant ω
V

• Plant = H-bridge + pmdc motor.


• Assume form K/(τs + 1).
• ω (t) = RK (1 − e−t/τ )
JJ
• τ is time where speed is 0.6321ω (∞) II
• RK = ω (∞). J
I
Back
Forward
Close
8/14

Loop-shaping (1/5): Typical Gdes

klf LF forbidden

HF forbidden zone
zone

ωu ωn
ωd ωl ωg
khf −20 dB/dec
JJ
II
J
I
Back
Forward
Close
9/14

Loop-shaping (2/5): Example

JJ
II
J
I
Back
DG = Gdes Forward
Close
10/14

Loop-shaping (3/5): ζ ←→ M p ←→ PM
From Lecture 26 of EE250-2011
100
PM (in °)
Mp (in %)
90
PM∼ (in °)

80

70

60
PM, Mp, PM∼

50

40

30

JJ
20
II
10
J
0
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
I
ξ
Back
Forward
Close
11/14

Loop-shaping (4/5): M p ←→ DD ←→ PM
From Lecture 26 of EE250-2011
2

PM/100
1.8

1.6
DD (in decades) & PM (in degrees)

1.4

1.2

0.8

0.6
JJ
0.4
II
0.2 J
0 I
0 10 20 30 40 50 60 70 80 90 100
Peak overshoot M (in %)
p Back
Forward
Close
12/14

Loop-shaping (5/5): Determination of ω g


CL spec: ts Red rectangles represent OL

ts
τ≈ 5

1
ωb ≈ τ
Select this ω g

For Gdes set ω g ≈ ωb Yes


Really, ω g ≤ ωb ≤ 2ω g

Simulate CL sys ts achieved? JJ


II
J
No
I
Back
Tweak ω g
Forward
Close
13/14

Discretization
a1 s + a0
s2 + b1 s + b0

Simulation
diagram
Group
ẋ1 = x2 terms ẋ = Ax + Bu
ẋ2 = −b0 x1 − b1 x2 + u
y = Cx + Du
y = a0 x1 + a1 x2

Euler’s
approximation
JJ
II
xk+1 = ( A∆t + I ) xk + B∆tuk , J
yk = Cxk + Duk I
Back
Forward
Close
14/14

Simulate; LW: C code, Implement, Analyze


• Simulation: easysim.m • Implement: As in demo slides
• Discretized controller
−→ C code: • Analyze: Compare results

x1 (k + 1) = a11 x1 (k ) + a12 x2 (k ) + b1 u(k )


x2 (k + 1) = a21 x1 (k ) + a22 x2 (k ) + b2 u(k )
y(k ) = c1 x1 (k ) + c2 x2 (k ) + du(k )

In main-prog.c before main() insert float x1[2],x2[2];


In main() insert x1[0] = x2[0] = 0;

x1[1] = a11 ∗ x1[0] + a12 ∗ x2[0] + b1 ∗ u; JJ


x2[1] = a21 ∗ x1[0] + a22 ∗ x2[0] + b2 ∗ u; II
y = c1 ∗ x1[0] + c2 ∗ x2[0] + d ∗ u; J
x1[0] = x1[1];
x2[0] = x2[1];
I
Back
Forward
Close

You might also like