50
Modelling and Control Professor Gurvinder Singh Virk Technical Director, InnotecUK [email protected] 1

Professor Gurvinder Singh Virk Technical Director ...Heuristic methods: Fuzzy logic, neural networks • Continuous and Digital Control systems: Laplace versus z-transfer function

  • Upload
    others

  • View
    6

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Professor Gurvinder Singh Virk Technical Director ...Heuristic methods: Fuzzy logic, neural networks • Continuous and Digital Control systems: Laplace versus z-transfer function

Modelling and Control

Professor Gurvinder Singh Virk Technical Director, InnotecUK

[email protected]

1

Page 2: Professor Gurvinder Singh Virk Technical Director ...Heuristic methods: Fuzzy logic, neural networks • Continuous and Digital Control systems: Laplace versus z-transfer function

Example references Following may be useful: 1. Dorf RC & Bishop RH, Modern control systems, 12th ed, Prentice-Hall, 2011 2. Paraskevopoulos PN, Modern control engineering, Marcel Dekker, 2001 3. Franklin GF, Powell JD and Emami-Naeini A, Feedback Control of Dynamic

Systems, 6th edition, Prentice-Hall, 2010. 4. Nise NS, Control systems engineering, 4th edition, Wiley, 2004. 5. Dutton K, Thompson S and Barraclough B, The Art of Control Engineering,

Addison-Wesley, 1998. 6. Franklin GF, Powell JD and Workman ML, Digital control of dynamic

systems, 3rd edition, Addison-Wesley, 1997. 7. Hines W, Matlab Supplement in Fuzzy and Neural approaches in

Engineering, Wiley, 1997. 8. Mathworks, Matlab, Simulink, Control Systems and System Identification

Toolboxes, available on-line in pdf form, www.mathworks.com I would like to thank all the colleagues (too many to mention individually) across the world who have helped with the formulation of this lecture on Modelling and Control from material placed on the www

2

Page 3: Professor Gurvinder Singh Virk Technical Director ...Heuristic methods: Fuzzy logic, neural networks • Continuous and Digital Control systems: Laplace versus z-transfer function

Control systems basics • What is Control Engineering?

– Control is concerned with the area of designing and making systems behave in some defined/ specified manner

• Control systems have inputs which “drive” outputs – Simple systems

• Single input – single output, Linear – Complex systems:

• Multivariable I/Ps – O/Ps • Non-linear, stochastic, etc

• Input-output related by TF – y(t)=Gu(t)

• System driven by u(t) & v(t) u(t), v(t) y(s) for s>t causal system

Input u(t) Output y(t) System

Inputs Outputs

u(t) y(t) System

System G(s)

Input u(t) Output y(t)

Disturbance v(t) Can control

Can’t control? Can’t measure?

Page 4: Professor Gurvinder Singh Virk Technical Director ...Heuristic methods: Fuzzy logic, neural networks • Continuous and Digital Control systems: Laplace versus z-transfer function

Problems in control

U Y ?

Modelling or synthesis

? Y G

Controller design or measurement

U ? G

Simulation or analysis

? Y G C R

4

Page 5: Professor Gurvinder Singh Virk Technical Director ...Heuristic methods: Fuzzy logic, neural networks • Continuous and Digital Control systems: Laplace versus z-transfer function

Control system formats

Open loop system (eg robot joint)

Joint Input Output

Control device

Input desired output

-

Error System

G(s) Actuator

Sensor

Actual output

Feedback Measured output

Closed loop system

Page 6: Professor Gurvinder Singh Virk Technical Director ...Heuristic methods: Fuzzy logic, neural networks • Continuous and Digital Control systems: Laplace versus z-transfer function

Open loop – closed loop

6

Open Loop Control System Y(s)=G(s)U(s)

Simple but variable response Simple gain system example

System G(s)

Input, U Output Y

System G(s)

Ref Input U Output Y Closed loop control Y(s)=G(s)/(1+G(s)) Good behaviour but complex and leads to instability.

- Measurement

Comparison

Why does instability arise? Why is behaviour good?

Page 7: Professor Gurvinder Singh Virk Technical Director ...Heuristic methods: Fuzzy logic, neural networks • Continuous and Digital Control systems: Laplace versus z-transfer function

Videos of control examples • Examples include

– Herald of Free Enterprise, Estonia sinking (6 March 1987) – Tacoma Fall bridge collapsing (7 November 1940) – Hot metal rolling processes – Ocean Swell Powered Renewable Energy (OSPREY 1), 1995 – Inverted pendulum control – Magnetic suspension

• Important issues for good control are: – Need for good modelling – Over-engineering needed in practice – Feedback is good? – How to get good control performance

7

Movie

Page 8: Professor Gurvinder Singh Virk Technical Director ...Heuristic methods: Fuzzy logic, neural networks • Continuous and Digital Control systems: Laplace versus z-transfer function

Approaches in control systems

• Main analysis and design methods include: – Open-loop versus closed loop – Time Domain and Frequency Domain methods – Traditional analysis/design methods: Bode, Nyquist,

Routh, Root locus, PID – Modern methods: State space, adaptive control,

multivariable control, model-based control – Heuristic methods: Fuzzy logic, neural networks

• Continuous and Digital Control systems: Laplace versus z-transfer function

8

Page 9: Professor Gurvinder Singh Virk Technical Director ...Heuristic methods: Fuzzy logic, neural networks • Continuous and Digital Control systems: Laplace versus z-transfer function

Laplace- and z-Transforms • The solutions of linear homogeneous ODEs is complicated and

involve handling exponentials • Continuous systems:

– The Laplace transform operation reduces exponentials to simple algebraic expressions

– The Laplace transform can be used to convert a differential equation into an algebraic equation

– The solution of the algebraic equation can then be written as the sum of terms, each of which is the Laplace transform of an exponential

– Inverse Laplace transformation needed to convert back to original domain

• Discrete systems: – The z-transform reduces difference equations into algebraic equations

and also easy solution via following similar process with Laplace transforms for differential equations

9

Page 10: Professor Gurvinder Singh Virk Technical Director ...Heuristic methods: Fuzzy logic, neural networks • Continuous and Digital Control systems: Laplace versus z-transfer function

Laplace example • Find the Laplace transform of

• Solution is

( ) ( ) tstep etutf 235 −+=

( ){ } ( ){ }

{ } { }( ) ( )2

1082

352

333

555

22

++

=+

+=

+==

==

−−

sss

sssF

seLeL

stuLtuL

tt

stepstep

10

Page 11: Professor Gurvinder Singh Virk Technical Director ...Heuristic methods: Fuzzy logic, neural networks • Continuous and Digital Control systems: Laplace versus z-transfer function

Matrix algebra • To be used when scalar variables become

vector variables • Column and row vectors

• Matrices are collection of row/column vectors • Dimensions of vectors/ matrices must be equal

for matrix operations (eg. multiplication) to be valid (AB ≠ BA).

• Square and non-square matrices

[ ]

==

4321

aand4321a columnrow

11

Page 12: Professor Gurvinder Singh Virk Technical Director ...Heuristic methods: Fuzzy logic, neural networks • Continuous and Digital Control systems: Laplace versus z-transfer function

Matrix definitions • A diagonal matrix is a square matrix whose element

are all zero except those on the main diagonal • Transposing a matrix converts the rows into columns

and vice versa. The transpose of a matrix=(A)T=AT

• A symmetric matrix has its elements that are mirror image along the diagonal. The transpose of a symmetric matrix is the same, i.e., AT=A

• If the determinant of a square matrix is zero, the matrix is called singular. If the determinant is nonzero, the matrix is called non-singular

12

Page 13: Professor Gurvinder Singh Virk Technical Director ...Heuristic methods: Fuzzy logic, neural networks • Continuous and Digital Control systems: Laplace versus z-transfer function

Matrix operations • Matrices can be added, multiplied, etc and have

various mathematical operations carried out • Determinant of a matrix can be calculated using

cij are the elements of the conjugate matrix • The inverse of a matrix A is denoted A-1 and has

the property A*A-1=I (Identity) • Eigenvalues and eigenvectors, etc

∑=

=n

1iijijcaA

rseigenvectogivemAmandseigenvaluegiveAI iii λλ ==− 013

Page 14: Professor Gurvinder Singh Virk Technical Director ...Heuristic methods: Fuzzy logic, neural networks • Continuous and Digital Control systems: Laplace versus z-transfer function

Digital control systems • Digital controllers! What is digital control?

– Digital control is concerned with the area of control systems which are implemented using digital techniques/ computers

• What is needed? – Hardware – to transform from the real (“analogue”) world to the computer

(“digital”) world and vice versa – Hardware – to do the thinking in the digital world. This is the processing

hardware. – Software – The instructions to be carried out. These are the algorithms

run on the computing hardware. • In digital control systems we need to consider sampled and

quantised signals as well as having to use z transforms to make the mathematics easier, etc.

14

Page 15: Professor Gurvinder Singh Virk Technical Director ...Heuristic methods: Fuzzy logic, neural networks • Continuous and Digital Control systems: Laplace versus z-transfer function

Numerical example • Determine the output response of the second

order system shown below when a unit step is applied

U(s) Y(s) ( )2

86 8s s+ +

Two 1st order subsystems via “Cover up” rule

0 0.5 1 1.5 2 2.5 3-2

-1.5

-1

-0.5

0

0.5

1

1.5Unit step response

Stepexp(-4t)-2exp(-2t)y(t)

( ) ( ) ( )( )

22

411

124

886

82

+−

++=

++=

++=

sss

ssssU

sssY

( ) tt eety 24 21 −− −+=⇒

Page 16: Professor Gurvinder Singh Virk Technical Director ...Heuristic methods: Fuzzy logic, neural networks • Continuous and Digital Control systems: Laplace versus z-transfer function

Standard second order systems

• Most systems can be studied as a set of first order sub-systems or a standard second order system (dominant behaviour)

• Transfer function of a standard second order system is

16

( )( ) ( )

( ) ( ) ( )

ratiodampingisfrequencynaturalundampedis

responseSteptcose1ty

functionTransfers2ssU

sY

n

dt

2nn

2

2n

n

ζω

φω

ωζωω

ζω +−=

++=

Page 17: Professor Gurvinder Singh Virk Technical Director ...Heuristic methods: Fuzzy logic, neural networks • Continuous and Digital Control systems: Laplace versus z-transfer function

Time domain analysis • Study system responses to

standard inputs, eg. step, impulse, ramp, etc.

• Behaviour is characterised by overshoot, damping ratio, settling time, rise time, etc

• Responses based on 1st order system response or,

• Based on 2nd order system responses, dominant roots, etc

17

( )( ) ( )

( ) ( ) ( )responseSteptcose1ty

functionTransfers2ssU

sY

dt

2nn

2

2n

n φω

ωζωω

ζω +−=

++=

Page 18: Professor Gurvinder Singh Virk Technical Director ...Heuristic methods: Fuzzy logic, neural networks • Continuous and Digital Control systems: Laplace versus z-transfer function

Stability in the s-Plane

18

Stable Unstable

σ

0 0.5 1 1.5 2 2.5 30

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

0 0.5 1 1.5 2 2.5 30

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

0 0.5 1 1.5 2 2.5 30

2

4

6

8

10

12

14

16

18

20

0 0.5 1 1.5 2 2.5 30

2

4

6

8

10

12

14

16

18

20

0 0.5 1 1.5 2 2.5 3-1

-0.8

-0.6

-0.4

-0.2

0

0.2

0.4

0.6

0.8

1

0 0.5 1 1.5 2 2.5 3-1

-0.8

-0.6

-0.4

-0.2

0

0.2

0.4

0.6

0.8

1

0 0.5 1 1.5 2 2.5 3-1

-0.8

-0.6

-0.4

-0.2

0

0.2

0.4

0.6

0.8

1

0 0.5 1 1.5 2 2.5 3-1.5

-1

-0.5

0

0.5

1

1.5

0 0.5 1 1.5 2 2.5 3-1.5

-1

-0.5

0

0.5

1

1.5

0 0.5 1 1.5 2 2.5 3-1.5

-1

-0.5

0

0.5

1

1.5

0 0.5 1 1.5 2 2.5 3-300

-200

-100

0

100

200

300

0 0.5 1 1.5 2 2.5 30

0.5

1

1.5

Page 19: Professor Gurvinder Singh Virk Technical Director ...Heuristic methods: Fuzzy logic, neural networks • Continuous and Digital Control systems: Laplace versus z-transfer function

Frequency domain analysis

• Study system’s steady state responses to sinusoidal inputs

• Behaviour is characterised by gain margin, phase margin, bandwidth, type number, etc

• Use Laplace transfer function and replace s by jω.

• Bode, Nyquist, Polar

19

( )( ) 5.12.0

2 22

2

−=++

= ζωζω

ω forsssU

sYofplotBodenn

n

Page 20: Professor Gurvinder Singh Virk Technical Director ...Heuristic methods: Fuzzy logic, neural networks • Continuous and Digital Control systems: Laplace versus z-transfer function

Root locus analysis • Study variations of pole

locations of characteristic equation as K: 0 → ∞

• Simple rules for drawing root locus in s-plane

– Locus starts at open loop (OL) poles

– End at OL zeros (finite and infinite)

– Standard patterns for no of infinite zeros

• Same rules for drawing root locus in z-plane but pole locations have different meaning

20

Y(s) +

-

U(s) D(s) KG(s)

Plant

( ) ( ): 1 0CE KD s G s+ =

x

1 infinite zero

x x

2 infinite zeros

x

x x

3 infinite zeros

Page 21: Professor Gurvinder Singh Virk Technical Director ...Heuristic methods: Fuzzy logic, neural networks • Continuous and Digital Control systems: Laplace versus z-transfer function

Transfer functions OL & CL

21

Open Loop Transfer function System

G(s) Input, U Output, Y ( ) ( ) ( )sUsGsY =

System G(s)

Input U Output Y

- Measurement

Error E

Closed Loop Transfer function: Unity feedback

( ) ( ) ( )( ) ( ) ( )

( ) ( ) ( ) ( ){ }( )( ) ( ) ( ) ( )

( ) ( ) ( )( )sG1

sUsGsY

sUsGsYsG1sYsUsGsY

sYsUsEandsEsGsY

+=⇒

=+⇒−=⇒

−==

Page 22: Professor Gurvinder Singh Virk Technical Director ...Heuristic methods: Fuzzy logic, neural networks • Continuous and Digital Control systems: Laplace versus z-transfer function

Controller design general aims

• Stability • Low steady state errors • Good transient response in time domain

– Fast behaviour – Fast settling time – Low overshoot – damping ratio, ζ ~ 0.5-0.7

• Design in frequency domain – Phase margin~50º – Gain margin~9dB

• Noise ignored 22

Page 23: Professor Gurvinder Singh Virk Technical Director ...Heuristic methods: Fuzzy logic, neural networks • Continuous and Digital Control systems: Laplace versus z-transfer function

Controller design methods • Root locus – pole and zeros in s-plane adjusted

for desired steady state error and transient response

• Frequency domain – Bode, Nyquist – phase margin related to overshoot, bandwidth to damping ratio and settling or peak time

• Pole placement via State feedback • PID (P,I,D, PI,PD) controllers • Lead, lag and lead-lag controllers

23

Page 24: Professor Gurvinder Singh Virk Technical Director ...Heuristic methods: Fuzzy logic, neural networks • Continuous and Digital Control systems: Laplace versus z-transfer function

System considered • Open-loop Continuous TF:

• Closed-loop Continuous TF

24

( ) ( ) ( ) sssssssGOL 1.0

1.01.0

1.0110

12 +

=+

=+

=

Y(s) + -

( )1.01.0

+ss

U(s)

( )1010

102 .s.s

.sGCL ++=

( )( )low

slowHzrad

n

nn

16.01.020509.0sec/32.01.02

=⇒===⇒=

ζζωωω

Page 25: Professor Gurvinder Singh Virk Technical Director ...Heuristic methods: Fuzzy logic, neural networks • Continuous and Digital Control systems: Laplace versus z-transfer function

Uncompensated system response

• System speed is low (settling time >60sec) • Damping is low (large overshoot ≈60%) • Will illustrate various controller design approaches

using continuous and discrete control systems 25

Open-loop

0 5 10 15 20 25 30 35 40 45 500

0.2

0.4

0.6

0.8

1

1.2

1.4

1.6

1.8

Step Response

Time (seconds)

Ampl

itude

ContinuousDiscrete

Closed-loop

Page 26: Professor Gurvinder Singh Virk Technical Director ...Heuristic methods: Fuzzy logic, neural networks • Continuous and Digital Control systems: Laplace versus z-transfer function

1. Simple design Cancel slow pole in OLTF and add a faster pole. Can use file GSVDesign1.m to help with design.

26

( ) ( ) ( )( )( ) ( )

11

11

11.010

1.01.0

2 ++=

+=

++

+=

ssCLTF

ssss

sssDsGOL

( )( )Increased

fasterHzrad

n

nn

5.0123159.0sec/112

=⇒=×==⇒=

ζζωωω

( ) ( )( )1

1.010++

=sssD

Continuous Controller

Page 27: Professor Gurvinder Singh Virk Technical Director ...Heuristic methods: Fuzzy logic, neural networks • Continuous and Digital Control systems: Laplace versus z-transfer function

1. Simple design’s performance

• Discretisation (with T=1sec) introduces de-stabilising effect that needs to be allowed for in continuous design

• Need for appropriate safety margin in the continuous design

27

Continuous step response

0 5 10 15 20 250

0.5

1

1.5

Step Response

Time (seconds)

Am

plitu

de

ContinuousDigital

Discrete step response

Page 28: Professor Gurvinder Singh Virk Technical Director ...Heuristic methods: Fuzzy logic, neural networks • Continuous and Digital Control systems: Laplace versus z-transfer function

2. Design via Root Locus • Design continuous controller C(s) via Root Locus

• Original root locus – RL starts at OL poles – RL ends at OL zeros – System has

• 2 slow poles • 2 infinite zeros

28

( ) ( )1101+

=ss

sGOL

System’s Root locus is limited to lie near imaginary axis

-1.5 -1 -0.5 0-5

-4

-3

-2

-1

0

1

2

3

4

5

0.030.060.090.130.190.26

0.4

0.65

1

2

3

4

1

2

3

4

0.030.060.090.130.190.26

0.4

0.65

Root Locus

Real Axis (seconds-1)

Imag

inar

y Ax

is (s

econ

ds-1

)

Add a faster zero to “attract” the RL to the left to make it faster, plus a faster pole “out of the way” to make the controller proper

Page 29: Professor Gurvinder Singh Virk Technical Director ...Heuristic methods: Fuzzy logic, neural networks • Continuous and Digital Control systems: Laplace versus z-transfer function

2. Design via RL (2) • Use Matlab file GSVDesign2.m to assist design • Try zero at -4 and a pole at -20

• Gives Root Locus • Find gain at “best location” on RL =1830

29

( )204

++

=sssC Root Locus

Real Axis (seconds-1)

Imag

inar

y Ax

is (s

econ

ds-1

)

-25 -20 -15 -10 -5 0-20

-15

-10

-5

0

5

10

15

20

System: OLTF_CsysGain: 1.83e+003Pole: -5.83 + 7.28iDamping: 0.625Overshoot (%): 8.07Frequency (rad/s): 9.33

0.10.220.340.460.60.74

0.86

0.96

0.10.220.340.460.60.74

0.86

0.96

5101520

Page 30: Professor Gurvinder Singh Virk Technical Director ...Heuristic methods: Fuzzy logic, neural networks • Continuous and Digital Control systems: Laplace versus z-transfer function

2. Design via RL (3) • Enter gain=1830 into DesignGSV2.m file & RUN • Note: System has been speeded up • T needs reducing

– T=0.05sec • Controller is

30

0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 20

0.5

1

1.5

Step Response

Time (seconds)

Ampl

itude

ContinuousDigital

Time response of designed controller

( ) ( )20

41830+

+=

sssC

Page 31: Professor Gurvinder Singh Virk Technical Director ...Heuristic methods: Fuzzy logic, neural networks • Continuous and Digital Control systems: Laplace versus z-transfer function

3. PID controller design • PID controllers are the most widely used control strategy in

industry. It consists of three different elements: – Proportional control: pure gain adjustment on the error signal to provide

the driving input to the system, it is used to adjust the speed of the system; improves transient response, reduces steady-state error, may reduce stability

– Integral control: implemented by including an integrator to provide the required accuracy for the control system; increases system type by 1, infinity steady-state gain which eliminates steady-state error for a unit step input. Need to avoid integral windup by switching integrator off when control has saturated

– Derivative control: here derivative action is used to increase the damping in the system. The derivative term also amplifies the existing noise which can cause problems including instability

• Can be used as P, PI, PD and PID forms

31

Page 32: Professor Gurvinder Singh Virk Technical Director ...Heuristic methods: Fuzzy logic, neural networks • Continuous and Digital Control systems: Laplace versus z-transfer function

3. PID controller design (2) • PID block diagram:

32

U

-System

G(s)Y

PK

sKI

DsK

E

DI

P sKs

KKPID ++=( )

sTsTsTTK

sTsT

KPID

I

IDIP

DI

P

1

11

2 ++=

++=

where KP is the proportional gain TI is the integral time constant TD is the derivative time constant

KP, TI, TD need to be tuned for tuning the PID controller

Page 33: Professor Gurvinder Singh Virk Technical Director ...Heuristic methods: Fuzzy logic, neural networks • Continuous and Digital Control systems: Laplace versus z-transfer function

3. PID controller design (3) • Ziegler Nichols closed-loop tuning method:

– Select proportional control only – Increase the value of KP until point of instability is reached (sustained

oscillations), the critical value of gain KC, is reached – Measure the period of oscillation to obtain the critical time constant TC

• Once KC and TC obtained, the PID parameters can be calculated from the following table:

33

Control KP TI TD

P only 0.5KC

PI 0.45KC 0.833TC

PID tight control 0.6KC 0.5TC 0.125TC

PID some overshoot 0.33KC 0.5TC 0.33TC

PID no overshoot 0.2KC 0.3TC 0.5TC

These values are not optimal and some additional tuning may be needed.

Page 34: Professor Gurvinder Singh Virk Technical Director ...Heuristic methods: Fuzzy logic, neural networks • Continuous and Digital Control systems: Laplace versus z-transfer function

3. PID controller design (4)

Closed-loop method cannot be applied in some cases. Can also use Ziegler-Nichols reaction curve method: • With system in open loop, take it manually to the

normal operating point and let the output settle at y(t)=y0 for a constant input u(t)=u0

• At initial time t0, apply a step change to the input from u0 to u1 (≈ 10-20% of full scale)

• Record the system output until it settles to the new operating point. Assume you obtain the curve shown on the next slide. This curve is the process reaction curve

34

Page 35: Professor Gurvinder Singh Virk Technical Director ...Heuristic methods: Fuzzy logic, neural networks • Continuous and Digital Control systems: Laplace versus z-transfer function

3. PID controller design (5)

Process reaction curve

35

Control KP TI TD P only 1/RL PI 0.9/RL 0.27/RL2

PID 1.2/RL 0.6/RL2 0.6/R

Use values from reaction curve to tune PID controller parameters

Other tuning methods also available

Page 36: Professor Gurvinder Singh Virk Technical Director ...Heuristic methods: Fuzzy logic, neural networks • Continuous and Digital Control systems: Laplace versus z-transfer function

System identification Typical setup

Input u(t) Output y(t) System

System is driven by input u(t) and disturbances v(t)

Disturbances v(t) Assume SISO for convenience, similarly for MIMO

Can control Can’t control (?) Can’t measure (?)

u(t), v(t) → effects y(s) for s>t; causal system

Page 37: Professor Gurvinder Singh Virk Technical Director ...Heuristic methods: Fuzzy logic, neural networks • Continuous and Digital Control systems: Laplace versus z-transfer function

Identification procedure 1. Design experiment 2. Perform design

experiment to collect data

3. Choose/ determine model structure

4. Determine model parameters (batch form and on-line)

5. Validate model 6. Good?

– Yes – Stop – No – Repeat

tytu

Computer

Planttu

ty

Many types of models exist; we will focus on discrete time invariant linear systems

Page 38: Professor Gurvinder Singh Virk Technical Director ...Heuristic methods: Fuzzy logic, neural networks • Continuous and Digital Control systems: Laplace versus z-transfer function

Direct calculation: Example 1 • Step response data

• The plant model is assumed to be of the form

• This gives a difference equation

t 0 1 2 3 4 5 ut 0 1 1 1 1 1

yt 0 0 0.6 1.02 1.22 1.35

tt uza

zby 11

11

1 −

+=

1111 −− +−= ttt ubyay

Page 39: Professor Gurvinder Singh Virk Technical Director ...Heuristic methods: Fuzzy logic, neural networks • Continuous and Digital Control systems: Laplace versus z-transfer function

Direct calculation: Example 1 (Cont)

• At t=1, apply unit step;

• At t=2, (1)

• At t=3, (2)

• From (1):

• From (2):

• Plant model is:

t 0 1 2 3 4 5 ut 0 1 1 1 1 1 yt 0 0 0.6 1.02 1.22 1.35

11112 ubyay +−=

01 =y

21213 ubyay +−=

6.0106.0 111 =⇒×+×−= bba

7.06.042.06.06.002.1

16.002.1

11

11

−=−

=⇒+×−=

×+×−=

aa

ba

1

1

7.016.0

− zz

Page 40: Professor Gurvinder Singh Virk Technical Director ...Heuristic methods: Fuzzy logic, neural networks • Continuous and Digital Control systems: Laplace versus z-transfer function

Direct calculation: General • Substituting input (u) and output values for n+m

different values of t gives n+m equations. Hence can solve for the n+m unknowns

• where d=n+m

m1dim3di22di1n1din3di22di11di

m2imi21i1n2ini21i12i

m1im1i2i1n1in1i2i11i

mim2i21i1nin2i21i1i

ubububyayayay

ubububyayayay

ubububyayayay

ubububyayayay

−−+−+−+−−+−+−+−+

−++−+++

−+−−+−+

−−−−−−

++++−−−−=

++++−−−−=

++++−−−−=

++++−−−−=

Page 41: Professor Gurvinder Singh Virk Technical Director ...Heuristic methods: Fuzzy logic, neural networks • Continuous and Digital Control systems: Laplace versus z-transfer function

Direct calculation: General (Cont 1)

Write in matrix form where

Hence we have:

θΨ=y

=

−+

+

+

1di

2i

1i

i

y

yyy

y

−−

m

2

1

n

2

1

b

bba

aa

−−+−+−+−−+−+−+

−++−++

−+−−+−

−−−−−−

m1di3di2din1di3di2di

m2ii1in2ii1i

m1i1iin1i1ii

mi1i1ini2i1i

uuuyyy

uuuyyyuuuyyyuuuyyy

y1−Ψ=θ Parameters

Page 42: Professor Gurvinder Singh Virk Technical Director ...Heuristic methods: Fuzzy logic, neural networks • Continuous and Digital Control systems: Laplace versus z-transfer function

Direct calculation: Drawbacks • Data is normally corrupted by noise (sensor,

system, measurement, etc). Hence plant parameters are not accurate

• Method relies on input being "persistently exciting" to ensure data contains the full dynamics of the system. When plant input is constant (eg step input), data is not usually good enough for system identification

• Need for much greater set of data so that – Effects of noise can be averaged (properties of

noise is also important) – There is enough system dynamics information to

capture all that is needed for the required accuracy – Parameter estimation via Least squares

Page 43: Professor Gurvinder Singh Virk Technical Director ...Heuristic methods: Fuzzy logic, neural networks • Continuous and Digital Control systems: Laplace versus z-transfer function

Least squares estimation • Consider

• Assume input is zero for t<0 and start up values are known for the output

( ) ( )tntntttntnttt

ttn

ntn

n

eububububyayayay

euzbzbzbbyzazaza

bbaa

b

b

a

a

+++++++++−=⇒

+++++=++++

−−−−−−

−−−−−−

...)....(

1

221102211

22

110

22

11

+

−−

=

−−−−−−−

+−+−−

+−−+−−−

N

n

n

nNNNNnNNNN

nn

nn

N e

ee

b

ba

aa

uuuuyyyy

uuuuyyyyuuuuyyyy

y

yy

b

a

ba

ba

ba

2

1

0

2

1

21321

20122101

11011210

2

1

y

θ

A e

Page 44: Professor Gurvinder Singh Virk Technical Director ...Heuristic methods: Fuzzy logic, neural networks • Continuous and Digital Control systems: Laplace versus z-transfer function

Least squares (Cont)

• Hence we have system is governed by

• Assume we have a model where is the vector of system parameters and is the modelling error

• What should be to minimise ?

solvableisproblemnnNifandeAy ba 1++>+= θ

∧∧

+= eAy θ∧

θ∧

e

∧∧

−=⇒ θAye

θ∧

e

Page 45: Professor Gurvinder Singh Virk Technical Director ...Heuristic methods: Fuzzy logic, neural networks • Continuous and Digital Control systems: Laplace versus z-transfer function

Least Squares (Cont 2) • The least squares estimate chooses the set of parameters

which minimises a cost function

• Hence for a minimum J wrt

• Basic equation upon which (BATCH form of) least squares algorithms are based

∧∧∧∧

∧∧∧∧∧

+−−=

−===∑

θθθθ

θθ

AAyAAyyy

AyAyeeeJ

TT

TT

TT

T

N

T

N

N

1

2

θ

[ ] yAAAAAyA

AAyAAyJ

TTTT

TTT

122

20

−∧∧

=⇒=⇒

+−−==∂

θθ

θθ AAJ T2

2

2

=∂

∂∧

θ min⇒+ definiteve

Excitation condition ATA ≠ 0

[ ] yAAA TT 1−∧

Page 46: Professor Gurvinder Singh Virk Technical Director ...Heuristic methods: Fuzzy logic, neural networks • Continuous and Digital Control systems: Laplace versus z-transfer function

Motion control of a single joint

• In many industrial manipulators, each joint is driven using a separate, independent control system. For example, consider joint 1 of a Puma 560 manipulator, which is driven by a DC servomotor through a gear train 46

Puma 560 Joint 1 drive system

Page 47: Professor Gurvinder Singh Virk Technical Director ...Heuristic methods: Fuzzy logic, neural networks • Continuous and Digital Control systems: Laplace versus z-transfer function

Motion control: Analysis of drive system

The joint torque τ will accelerate the joint and the manipulator above it; these have inertia J (second order system): (1) Torque delivered by the motor τm is used to provide the joint torque, to overcome any unmeasured disturbance torque τd (which could include friction) and to accelerate the motor itself: (2) where G is the gear ratio (motor speed over joint speed) substituting equation (1) into equation (2): (3) Motor torque is proportional to current. If a current amplifier is used, then the current is in turn proportional to the current signal u. Thus if Km is a constant: (4)

47

θτ J=

( )θττ τ GJmdGm ++=

( )dmJG

dGJ

m

dGGJJ

mdGJ

m

E

E

m

or

GJ

ττθτθτ

τθθτθτ

−=+=

+=++= +

2

uKmm =τ

Page 48: Professor Gurvinder Singh Virk Technical Director ...Heuristic methods: Fuzzy logic, neural networks • Continuous and Digital Control systems: Laplace versus z-transfer function

Proportional control of a single joint

48

Kp Km θ

EJG

2

1s

Demand position

Actual position

dθ mτ

- + +

-

Controller Plant/ System

Error

Control signal u

Page 49: Professor Gurvinder Singh Virk Technical Director ...Heuristic methods: Fuzzy logic, neural networks • Continuous and Digital Control systems: Laplace versus z-transfer function

PD control of a single joint

49

Kp θ

EJG

s1

Demand position

Actual position

dθ mτ

- + + -

Controller Plant/ System

Error u

s1θ

θ

mK1

GJ E

Km

Kv -

+

+ +

s2s

Position feedback

Velocity feedback

Feedforward Filter

Page 50: Professor Gurvinder Singh Virk Technical Director ...Heuristic methods: Fuzzy logic, neural networks • Continuous and Digital Control systems: Laplace versus z-transfer function

Summary • Overview of modelling and control in general systems

engineering applications • Introduction to controller design via several methods • Examples described Thanks are expressed to all the colleagues (too many to mention individually) across the world who have helped with the formulation of this lecture on Modelling and Control from material placed on the www

50