32
1 Control for Dummies 1 Control for Maarten Steinbuch Dept. Mechanical Engineering Control Systems Technology Group TU/e Control for Dummies 2 Motion Systems m F x

Control engineering control for dummies

Embed Size (px)

Citation preview

Page 1: Control engineering   control for dummies

1

Control for Dummies 1

Control for

Maarten Steinbuch

Dept. Mechanical Engineering

Control Systems Technology Group

TU/e

Control for Dummies 2

Motion Systems

mF

x

Page 2: Control engineering   control for dummies

2

Control for Dummies 3

1. Introduction

2. Timedomain tuning

3. Frequency domain & stability

4. Filters

5. Feedforward

6. Servo-oriented design of mechanical systems

Control for Dummies 4

2. Time Domain Tuning

Page 3: Control engineering   control for dummies

3

Control for Dummies 5

x

Servo force ?

Mass

M

Disturbance F d

Fs

Control for Dummies 6

M

kf

π2

1 :encyEigenfrequ

=

:damper-spring Force

xdxkF &⋅−⋅−=

Mechanical solution:

x

Mass

M

k

d

F Disturbance Fd

Page 4: Control engineering   control for dummies

4

Control for Dummies 7

x

Mass

M

M

kf

p

π2

1 :encyEigenfrequ

=

:Force Servo

xkxkF vps&⋅−⋅−=

Fservo

damping servo:

stiffness servo:

v

p

k

k

Servo analogon:

Control for Dummies 8

Example:x

Mass

M

Disturbance F d

Fs

Slide: mass = 5 kg

Required accuracy 10 µm at all timesDisturbance (f.e. friction) = 3 N

1. Required servo stiffness?

2. Eigenfrequency?

Page 5: Control engineering   control for dummies

5

Control for Dummies 9

h or xs

x

)()(:damper-Spring

xhdxhkF &&−+−=

How to move to / follow a setpoint:

)()( :Controller

xxkxxkF svsps&& −+−=

Control for Dummies 10

dt

dkk vp +

controller

Fservo

process

MassxF

xs

+

-

e

xsx

Fd

Kp/kv-controller or PD-controller

Fdisturbance

+

+

Page 6: Control engineering   control for dummies

6

Control for Dummies 11

?

?

=

=

v

p

k

k

controller

Fservo

processx

xs

+

-

e

v

p

k

kerror⇒⇒⇒⇒ stability⇔

Trade off

Control for Dummies 12

xs

x

M

kv

kp

Concluding remarks time domain tuning

A control system, consisting of only a single mass m and a

kp/kv controller (as depicted below), is always stable.

kp will act as a spring; kv will act as a damper

As a result of this: when a control system is unstable, it

cannot be a pure single mass + kp/kv controller(With positive parameters m, kp and kv)

Page 7: Control engineering   control for dummies

7

Control for Dummies 13

Setpoints:

xs

x

What should xs look like as a function of time, when moving the mass?

(first order, second order, third order,….?)

Control for Dummies 14

x

F

Apply a force F (step profile):

=

)()( txMtF &&

x(t) is second order, when F constant

Second order profile requires following information:

- maximum acceleration

- maximum velocity

- travel distance

M

Page 8: Control engineering   control for dummies

8

Control for Dummies 15

Example

2

max

max

sec/36.1500

sec/6320

3.62

radeAcc

radVel

radPos

≈=

≈=

≈=

π

π

π

Control for Dummies 16

Time domain:

Monday and Thursday at 22:10

Frequency domain:

twice a week

3 Frequency domain

Page 9: Control engineering   control for dummies

9

Control for Dummies 17

M

x

F

Frequency Response Function H

frequency (log)

amplitude (log)

phase

-180o

-2|H| =

x

F

H

Control for Dummies 18

0 0.5 1 1.5 2 2.5-0.15

-0.1

-0.05

0

0.05

0.1

0.15

0.2

time in sec

excitation force in N and displacement in m

excitation force (offset 0.1 &scaling 1e-4)

response

F

x

M

weak spring M = 5 kg

(f = 2.5 Hz)

going from Time-domain to the Frequency-domain

F t t( ) sin( )= 400 2 7π

H Hz e m N

H Hz

( ) . / /

( )

7 0 045 400 1 4

7 1800

≈ = −

∠ ≈ −

Page 10: Control engineering   control for dummies

10

Control for Dummies 19

••

= xMFchoose input:

F F t=∧

sin( )ωthen:

x x t= +∧

sin( )ω ϕ ??; ==∧

ϕx

solution:

x t FM

t c t c( ) sin( )= − + +

ωω

21 2

Hx

F M= = −

12ω

( )log log logHM

= −1 2 ω

M

x

F

finding a solution of the equation of motion:

H x

FM

H

= =

∠ = = −

°

1

180

ϕ

Control for Dummies 20

measurement mechanics stage

102

103

-80

-60

-40

-20

frequency in Hz

amplitude in dB

102

103-200

0

200

phase in deg

Page 11: Control engineering   control for dummies

11

Control for Dummies 21

Derivation of transfer function

1. make a model of the dynamics: differential equations

2. substitute s=d./dt

3. rearrange the equations and get the transfer function e.g. H(s)

4. for sinusoids make a ‘Bode’ plot using s=jω

Control for Dummies 22

Transfer function:

kdsMssF

sxsH

++==

2

1

)(

)()(

1

Ms2 + ds + k

F x

Page 12: Control engineering   control for dummies

12

Control for Dummies 23

consider sinusoidal signals ('Euler notation'):

tjextjtxtx

ωωω ˆ)sin(cosˆ)( =+=

tjexjtjtxtx

ωωωωω ˆ)cossin(ˆ)( =+−=&

apparently: s j= ω for sinusoidal signals

Frequency Response Function:

s j→ ω

H jM jd k

( )ωω ω

=− + +

12

Control for Dummies 24

Fek p + kv

d

dt

ekekF vp&+=

F s k k s e sp v( ) ( ) ( )= +

transfer function:

C sF

es k k sp v( ) ( ) ( )= = +

frequency response:

C k jkp v= + ω

Page 13: Control engineering   control for dummies

13

Control for Dummies 25

Amplitude: 222 ωvp kkC +=

ω

ω ω

→ ⇒ →

∠ → °

→ ∞ ⇒ →

∠ → °

0

0

90

C k

C

C k

C

p

v

( ) ωω loglog||log +=∞→ vkC

break point:

log log logk kp v= + ω

ω =k

k

p

v

Control for Dummies 26

Bode plot of the PD-controller:

100

101

10260

80

100

frequency in Hz

amplitude in dB

100

101

1020

50

100phase in deg

kp = 1500 N/m; kv = 20 Ns/m

+1

+0

Page 14: Control engineering   control for dummies

14

Control for Dummies 27

Block manipulation

H(s)x

C(s)e

x s

e sC s H s

( )

( )( ) ( )=

C H+1 -2

-2

-1

frequency

frequency

CH

kp

k v

kp

1M

Control for Dummies 28

H(s)C(s)xs +

-

xe

CH

CH

x

xH

s

c+

==1

Page 15: Control engineering   control for dummies

15

Control for Dummies 29

Four important transfer functions

1. open loop:

H s C s H so ( ) ( ) ( )=

2. closed loop:

)()(1

)()()()(

sHsC

sHsCs

x

xsH

s

c+

==

3. sensitivity:

S se

xs

C s H ss

( ) ( )( ) ( )

= =+

1

1

4. process sensitivity:

H sx

Fs

H s

C s H sps

d

( ) ( )( )

( ) ( )= =

+1

H(s)exs +

- Fs

xC(s)

Fd

+

+

Control for Dummies 30

H(s)exs +

- Fs

xC(s)

Fd

+

+

Derivation of closed-loop transfer functions:• start with the output variable of interest

• go back in the loop, against the signal flow

• write down the relations, using intermediate variables

• stop when arrived at the relevant input variable

• eliminate the intermediate variables

Page 16: Control engineering   control for dummies

16

Control for Dummies 31

102

103

-40

-20

0

20

amplitude in dB

102

103-200

0

200phase in deg

closed loop

102

103

-40

-20

0

20

frequency in Hz

amplitude in dB

102

103-200

0

200phase in deg

open loop

Experimental results:

stage servo

Control for Dummies 32

bandwidth: 0 dB crossing open loop

(cross-over frequency)

Page 17: Control engineering   control for dummies

17

Control for Dummies 33

The Nyquist curve

101

102

-200

-100

0

frequency

phase in deg

101

102-100

-50

0

50

frequency

amplitude in dB Bode plot

-1.5 -1 -0.5 0 0.5 1 1.5-1.5

-1

-0.5

0

0.5

1

1.5Nyquist plot

phase (appr. -175 deg)

amplitude (appr 0.7)

Control for Dummies 34

-1.5 -1 -0.5 0 0.5 1 1.5-1.5

-1

-0.5

0

0.5

1

1.5Nyquist plot

Re

Im

ωω

Stability:

The open-loop FRF CH(jω) should have the (-1,0) point at left side

Page 18: Control engineering   control for dummies

18

Control for Dummies 35

4. Filters

•Integral action

•Differential action

•Low-pass

•High-pass

•Band-pass

•Notch (‘sper’) filter

PeeDeePeeEye

Mimo

Control for Dummies 36

Integral action :

X(t) Y(t)siτ

1

τI integral time constant τI =1/ki

-1

ω=2πf0°

-90°

Page 19: Control engineering   control for dummies

19

Control for Dummies 37

+90°

ω

+1

ω

dd

d

fπωτ

21

==

+90°

Differential action

ωε

ωε

ku

jsu

ksH ==== ;;

“tamme” differentiator :1+

=s

ksu

dτε

ksε u

Control for Dummies 38

s

s

s

suH

d

d

γ

ττ

τ

τ

ε+

+=

+

+==

1

1

1

1

2

1

“lead” filter

γ>1

+90°

ω

1

1

1

τω =

2

2

1

τω =

1

522

1 −≈τ

τγ

21

21

1

ττωωω ==c

Page 20: Control engineering   control for dummies

20

Control for Dummies 39

+90°

-90°

ωi

ω1

=d

ω1

=

-1 +1

P+I+D

+

+

+==

γ

ττ

τε s

s

sk

uH

d

d

i 1

111

Control for Dummies 40

2nd order filter

121

2

1

2

++

==

ωβ

ω

ε ss

kuH

ε

ε(t) u(t)- s

s

β2

-180°1ωω =

β2

1

0 °

-90 °

-2

1

Top: .1 2

1 βωω −=o

Page 21: Control engineering   control for dummies

21

Control for Dummies 41

12

12

2

22

2

2

1

12

1

2

++

++

==

ωβ

ω

ωβ

ω

ε ss

ss

uH

General 2nd order filters

+2

+180°

1

2

1

2

ω

ωGeneral: ωωωω1≠ω≠ω≠ω≠ω2

Control for Dummies 42

21 ωω ≥

-180°ω1ω2

1

+2

-2

2

1

2

2

ω

ω

Page 22: Control engineering   control for dummies

22

Control for Dummies 43

“Notch”-filter :ω1= ω2

-180°

ampl.

fase

2

1

β

β

Control for Dummies 44

W.B.E.

Page 23: Control engineering   control for dummies

23

Control for Dummies 45

Loop shaping procedure

1. stabilize the plant:

add lead/lag with zero = bandwidth/3 and pole =

bandwidth*3, adjust gain to get stability; or add

a pure PD with break point at the bandwidth

2. add low-pass filter:

choose poles = bandwidth*6

3. add notch if necessary, or apply any other kind

of first or second order filter and shape the loop

4. add integral action:

choose zero = bandwidth/5

5. increase bandwidth:

increase gain and zero/poles of integral action,

lead/lag and other filters

during steps 2-5: check all relevant transfer

functions, and relate to disturbance spectrum

Control for Dummies 46

Implementation issues

1. sampling = delay: linear phase lag

for example: sampling at 4 kHz gives phase lag

due to Zero-Order-Hold of:

180º @ 4 kHz

18º @ 400 Hz

9º @ 200 Hz

2. Delay due to calculations

3. Quantization (sensors, digital representation)

Page 24: Control engineering   control for dummies

24

Control for Dummies 47

5 Feedforward design

Control for Dummies 48

Why feedforward?

• Consider the simple motion system

mF

x

1.80

1

t [s]0

Setpoint

• Control problem: track setpoint

• Is this possible with a PD-controller?

sx

sx

Page 25: Control engineering   control for dummies

25

Control for Dummies 49

0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2-2

-1.5

-1

-0.5

0

0.5

1

1.5

2x 10

-3

t [s]

err

or

[m

]

Analysis (IV)

m = 5 [kg]

= 260 [Ns/m]vK

= 6500 [N/m]pK

= 65000 [N/m]pK

Control for Dummies 50

sx2ms

1sKK vp +

2ms

Feedforward based on inverse model

x

Page 26: Control engineering   control for dummies

26

Control for Dummies 51

0.5

1

1.5

vs

[m

s-1

]

0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6-4

-2

0

2

4

as

[m

s-2

]0.5

1

xs

[m

]

0

0

t [s]

Example: m=5 [kg], b=1 [Ns/m], 2nd degree setpoint

Control for Dummies 52

Example: tracking error, no feedforward

0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8-2

-1.5

-1

-0.5

0

0.5

1

1.5

2x 10

-3

t [s]

err

or

[m

]

viscous damping effect

Page 27: Control engineering   control for dummies

27

Control for Dummies 53

0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8-2

-1.5

-1

-0.5

0

0.5

1

1.5

2x 10

-3

t [s]

err

or

[m

]

Example: tracking error, with feedforward

= 0.9, = 0faKfvK

= 0.9, = 4.5 faKfvK

Control for Dummies 54

sxH(s)

fvK

x

faK

C(s)

sx&

sx&&

)sxsign( &

fcK

feedforward structure

Page 28: Control engineering   control for dummies

28

Control for Dummies 55

3rd degree setpoint trajectory

0

0.5

1

1.5

xs

[m

]

0

0.5

1

vs

[m

s-1

]

0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8-4

-2

0

2

4

as

[m

s-2

]

t [s]

Control for Dummies 56

6. Servo-oriented design of

mechanical systems

Page 29: Control engineering   control for dummies

29

Control for Dummies 57

Example of measurement:mechanical system (force to position)

modelling understanding the dynamical

behaviour

Control for Dummies 58

Three Types of Dynamic Effects

- Actuator flexibility

- Guidance flexibility

- Limited mass and stiffness of frame

Page 30: Control engineering   control for dummies

30

Control for Dummies 59

1. Actuator flexibility

k

x

d

SensorMotor

F

s

Control for Dummies 60

2. Guidance flexibility

k

x

F

s

M,

J

Page 31: Control engineering   control for dummies

31

Control for Dummies 61

3. Limited mass and stiffness of frame

x

Fs

Motor

Frame

Control for Dummies 62

M2M1

Positioning the load M2 (while using x1 for feedback):

Rule of thumb:

Optimal bandwidth with 0 dB crossing of open loop between the

antiresonance and resonance frequency of the mechanical system.

Page 32: Control engineering   control for dummies

32

Control for Dummies 63

• bit of control into mechanical design

• bit of mechanics into control design

• same language (‘mechatronics’)

Concluding Remarks