Professor Eric Rogers - University of Southampton · Repetitive Control Professor Eric Rogers...

33
Repetitive Control Professor Eric Rogers Electronics and Computer Science University of Southampton Southampton, SO17 1BJ, UK [email protected] http://www.ecs.soton.ac.uk/ Professor Eric Rogers ECS, University of Southampton, UK

Transcript of Professor Eric Rogers - University of Southampton · Repetitive Control Professor Eric Rogers...

Page 1: Professor Eric Rogers - University of Southampton · Repetitive Control Professor Eric Rogers Electronics and Computer Science University of Southampton Southampton, SO17 1BJ, UK

Repetitive Control

Professor Eric Rogers

Electronics and Computer ScienceUniversity of Southampton

Southampton, SO17 1BJ, [email protected]

http://www.ecs.soton.ac.uk/

Professor Eric Rogers ECS, University of Southampton, UK

Page 2: Professor Eric Rogers - University of Southampton · Repetitive Control Professor Eric Rogers Electronics and Computer Science University of Southampton Southampton, SO17 1BJ, UK

Basics

• Many signals in engineering are periodic, or at least theycan be accurately approximated by a periodic signal over alarge time interval, e.g., engines, electrical motors andgenerators, converters, or machines performing arepetitive task.

• Control problem to try to track a periodic signal with theoutput of the plant or reject a periodic disturbance actingon a control system. In the former case the period, T, willbe known a priori by the nature of the task performed, inthe latter it can be identified using established methods.

• Repetitive control (RC) uses information from previousperiods or trials (also termed cycles in some literature) tomodify the control signal so that the overall system ‘learns’to track perfectly a given T-periodic reference signal.

Professor Eric Rogers ECS, University of Southampton, UK

Page 3: Professor Eric Rogers - University of Southampton · Repetitive Control Professor Eric Rogers Electronics and Computer Science University of Southampton Southampton, SO17 1BJ, UK

Basics

• SISO plant with state-space model

x(t) = Ax(t) + Bu(t), x(0) = x0y(t) = Cx(t) + Du(t)

(1)

• Reference signal r(t) is given, and it is known thatr(t) = r(t + T), for a given T (in other words the actualshape of r(t) is not necessarily known).

• Control design objective: find a feedback controller thatmakes the system (1) track the reference signal asaccurately as possible (i.e., limt→∞ e(t) = 0,e(t) := r(t)− y(t)), under the assumption that the referencesignal r(t) is T-periodic.

Professor Eric Rogers ECS, University of Southampton, UK

Page 4: Professor Eric Rogers - University of Southampton · Repetitive Control Professor Eric Rogers Electronics and Computer Science University of Southampton Southampton, SO17 1BJ, UK

Basics

• Solvability condition: the internal model principle musthold, i.e., for controller

[Mu](t) = [Ne](t) (2)

where M and N are suitable operators, a model of thereference signal must be included in M.

• Since r(t) is T-periodic —its internal model is given by theoperator (1− σT), where [(1− σT)v](t) = v(t)− v(t − T) foran arbitrary v : R→ R where R denotes the field of realnumbers.

• One simple RC law

u(t) = u(t − T) + e(t) (3)

(M = (1− σT)) and also [Nv](t) = v(t) for an arbitraryv : R→ R.

Professor Eric Rogers ECS, University of Southampton, UK

Page 5: Professor Eric Rogers - University of Southampton · Repetitive Control Professor Eric Rogers Electronics and Computer Science University of Southampton Southampton, SO17 1BJ, UK

Positive Realness

Definition

Let G(s) denote the transfer-function of the system (1), i.e.,G(s) = C(sI − A)−1B + D. Then (1) is positive-real if

1) Each entry in G(s) is analytic for Re s > 0

2) G(s) is real for real positive s

3) G(s) + G∗(s) ≥ 0 for Re s ≥ 0

where the superscript ∗ denotes the complex conjugate and Redenotes the real part.Relaxed algorithm

u(t) = αu(t − T) + Ke(t) (4)

where α ∈ (0, 1), is a relaxation parameter and K ∈ R,K > 0.

Professor Eric Rogers ECS, University of Southampton, UK

Page 6: Professor Eric Rogers - University of Southampton · Repetitive Control Professor Eric Rogers Electronics and Computer Science University of Southampton Southampton, SO17 1BJ, UK

Positive Realness

For x(0) = 0 and G(s) stable

U(s) =αe−sT

1 + G(s)K(s)U(s) +

K(s)r(s)1 + G(s)K(s)

(5)

A sufficient condition (small gain theorem) for stability is

supω≥0

∣∣∣∣ α

1 + G(jω)K(jω)

∣∣∣∣ < 1 (6)

For α = 1, this inequality is never met in when G(s) is strictlyproper, because if this holds then limω→∞G(jω) = 0, andtherefore limω→∞ | 1

1+KG(jω) | = 1.

Professor Eric Rogers ECS, University of Southampton, UK

Page 7: Professor Eric Rogers - University of Southampton · Repetitive Control Professor Eric Rogers Electronics and Computer Science University of Southampton Southampton, SO17 1BJ, UK

Positive Realness

• Condition (6) implies that the control law converges to aT-periodic solution, and in the limit (4) becomes

u(t) =K

1− αe(t) (7)

and y(t) converge to a T-periodic solution given by

Y(s) =K

1−αG(s)

1 + K1−αG(s)

r(s) (8)

• If α→ 1 (giving the original law (3)), it is clear that aninfinite feedback gain is required. However, a positive-realsystem in this case can tolerate such a gain. Thereforestability holds for an arbitrary α ∈ [0, 1], if the originalsystem is positive-real.

Professor Eric Rogers ECS, University of Southampton, UK

Page 8: Professor Eric Rogers - University of Southampton · Repetitive Control Professor Eric Rogers Electronics and Computer Science University of Southampton Southampton, SO17 1BJ, UK

Positive Realness — SISO case

Nquist plot for G(s)Nyquist Diagram of a PR system

Real Axis

Imag

inar

y A

xis

−0.2 −0.1 0 0.1 0.2 0.3 0.4−0.2

−0.15

−0.1

−0.05

0

0.05

0.1

0.15

0.2

K ∞

Professor Eric Rogers ECS, University of Southampton, UK

Page 9: Professor Eric Rogers - University of Southampton · Repetitive Control Professor Eric Rogers Electronics and Computer Science University of Southampton Southampton, SO17 1BJ, UK

Positive Realness — SISO case

• The control law (3) will result in convergent learning whenthe original continuous-time system is positive-real.

• Problem: not possible to implement a delay block usinganalogue components.

• Consider the SISO discrete-time system

x(t + 1) = Φx(t) + Γu(t), x(0) = x0y(t) = Cx(t) + Du(t)

(9)

and corresponding transfer-functionG(z) = C(zI − Φ)−1Γ + D.

Professor Eric Rogers ECS, University of Southampton, UK

Page 10: Professor Eric Rogers - University of Southampton · Repetitive Control Professor Eric Rogers Electronics and Computer Science University of Southampton Southampton, SO17 1BJ, UK

Positive Realness — SISO case

DefinitionThen (9) is said to be positive-real if

1) G(z) is analytic for |z| > 1

2) G(z) is real for real positive z

3) Re[G(ejθ)] ≥ 0 for all θ ∈ [0, 2π] (i.e., the Nyquist plot of G(z)lies in the right-half plane)

LemmaSuppose that the system (9) is positive-real and CB 6= 0 (theassumption that CB 6= 0 is almost always true for acontinuous-time system sampled with zero-order hold) thenD 6= 0.

Professor Eric Rogers ECS, University of Southampton, UK

Page 11: Professor Eric Rogers - University of Southampton · Repetitive Control Professor Eric Rogers Electronics and Computer Science University of Southampton Southampton, SO17 1BJ, UK

Positive Realness — SISO case

• If the discrete control law u(t) = u(t − T) + Ke(t) givesconvergent learning, then infinite feedback gain results —not implementable without instability.

• Hence the only option is the ‘relaxed’ version of the controllaw (where α is typically replaced with a dynamic causalfilter), which does not give perfect tracking for an arbitraryT-periodic reference.

• Next a computationally more complex algorithm for thediscrete-time case which results in perfect tracking isdeveloped.

Professor Eric Rogers ECS, University of Southampton, UK

Page 12: Professor Eric Rogers - University of Southampton · Repetitive Control Professor Eric Rogers Electronics and Computer Science University of Southampton Southampton, SO17 1BJ, UK

RC Design

• Sample the plant model every Ts seconds to give

A(z)y(z) = B(z)u(z) (10)

where y(z) and u(z) denote the z transforms of the inputand output respectively and A(z) and B(z) are polynomialsin z−1. Also it is assumed that (10) is both controllable andobservable.

• Control objective: track a T-periodic reference, i.e.,r(t + T) = r(t).

Professor Eric Rogers ECS, University of Southampton, UK

Page 13: Professor Eric Rogers - University of Southampton · Repetitive Control Professor Eric Rogers Electronics and Computer Science University of Southampton Southampton, SO17 1BJ, UK

RC Design

LemmaThe tracking problem can be written equivalently in terms of theoriginal process model (10) as

A(z)e(z) = B(z)u(z)

A(z) = −(1− z−T)A(z)

u(z) = (1− z−T)u(z) (11)

where e(z) = r(z)− y(z). Also a control law M(z)u(z) = N(z)e(z),where M(z) and N(z) are polynomials in z−1 will drive thetracking error to zero exponentially if it stabilizes the modifiedsystem model (11).

Professor Eric Rogers ECS, University of Southampton, UK

Page 14: Professor Eric Rogers - University of Southampton · Repetitive Control Professor Eric Rogers Electronics and Computer Science University of Southampton Southampton, SO17 1BJ, UK

RC Design

• The design problem now is to force the output e(z) of (11)to zero.

• Many possible solutions, e.g., robust or adaptive basedsolutions.

• Here we use an optimal control based solution.• Write the controlled system description as

e(z) =−1

1− z−TB(z)A(z)

u(z) (12)

which is a series connection of the polynomial systems S1and S2 where

S1 : up(z) = −11−z−T u(z)

S2 : e(z) = B(z)A(z)up(z)

(13)

Professor Eric Rogers ECS, University of Southampton, UK

Page 15: Professor Eric Rogers - University of Southampton · Repetitive Control Professor Eric Rogers Electronics and Computer Science University of Southampton Southampton, SO17 1BJ, UK

RC Design

A state-space model for S1 is

ξ(t + 1) = Ξξ(t) + Ωu(t)

up(t) = −Ψξ(t)− u(t) (14)

where

Ξ =

0 0 0 . . . 0 11 0 0 . . . 0 00 1 0 . . . 0 0...

. . . . . . . . ....

...0 0 0 . . . 1 0

(15)

Professor Eric Rogers ECS, University of Southampton, UK

Page 16: Professor Eric Rogers - University of Southampton · Repetitive Control Professor Eric Rogers Electronics and Computer Science University of Southampton Southampton, SO17 1BJ, UK

RC Design

Ω =[

1 0 0 . . . 0 0]T

Ψ =[

0 0 0 . . . 0 1]

(16)

and for S2

xp(t + 1) = Apxp(t) + Bpup(t)

e(t) = Cpx(t) (17)

Combining these last two state-space models now yields

xm(t + 1) = Φmxm(t) + Γmu(t), xm(0) = xm,o

e(t) = Cmxm(t) (18)

where the dimension of xm(·) is n + T, and n is the order of theoriginal process model (10).

Professor Eric Rogers ECS, University of Southampton, UK

Page 17: Professor Eric Rogers - University of Southampton · Repetitive Control Professor Eric Rogers Electronics and Computer Science University of Southampton Southampton, SO17 1BJ, UK

RC Design

Φm =

[Ξ 0−BpΨ Ap

], Γm =

[Ω−Bp

]Cm =

[0 Cp

](19)

Cost functionJ′ = min

u∈l2J(u, xm(0)) (20)

where

J(u, xm(0)) =∑∞

i=1 e(i)TQe(i) + uT(i)Ru(i)=∑∞

i=1 xm(i)TCTmQCmxm(i) + uT(i)Ru(i)

(21)

Q 0, R 0.

Professor Eric Rogers ECS, University of Southampton, UK

Page 18: Professor Eric Rogers - University of Southampton · Repetitive Control Professor Eric Rogers Electronics and Computer Science University of Southampton Southampton, SO17 1BJ, UK

RC Design

Solution:u(t) = u(t − T)− Kxm(t) (22)

whereK = (ΓT

mSΓm + R)−1ΓTmSΦm (23)

and S is the solution of the algebraic Riccati equation

S = ΦTm[S− SΓm(ΓT

mSΓm + R)−1ΓTmS]Φm + CT

mQCm (24)

or with the state estimator

xm(t + 1) = Φmxm(t) + Γmu(t) + L(e(t)− Cmxm(t)) (25)

where L is the observer gain, the control law is

u(t) = u(t − T)− Kxm(t) (26)

Professor Eric Rogers ECS, University of Southampton, UK

Page 19: Professor Eric Rogers - University of Southampton · Repetitive Control Professor Eric Rogers Electronics and Computer Science University of Southampton Southampton, SO17 1BJ, UK

RC Design

Extension to include noise:

xm(t + 1) = Φmxm(t) + Γmu(t) + Hw(t)

e(t) = Cmxm(t) + v(n), xm(0) = xm,o (27)

where w(t) and v(t) are zero mean Gaussian noise signals.• Conceptually w(t) describes uncertainty in the state-space

model, whereas v(t) describes uncertainty in themeasurement process.

• If the covariance matrix Qn of v(t) and the covariancematrix Rn of w(t) are known, it is possible to find an optimalobserver gain L that minimizes the variance of theestimation error.

Professor Eric Rogers ECS, University of Southampton, UK

Page 20: Professor Eric Rogers - University of Southampton · Repetitive Control Professor Eric Rogers Electronics and Computer Science University of Southampton Southampton, SO17 1BJ, UK

RC Design

• Combining the optimal feedback controller and optimalobserver the resulting closed-loop system is stable, andhence the expected value of e(t) will exponentiallyconverge to zero as t→∞.

z

Professor Eric Rogers ECS, University of Southampton, UK

Page 21: Professor Eric Rogers - University of Southampton · Repetitive Control Professor Eric Rogers Electronics and Computer Science University of Southampton Southampton, SO17 1BJ, UK

Experimental Results

• The non-minimum phase electro-mechanical system.

-2

0

2

4

6

8

10

12

0 5 10 15 20

Time (s)

Ou

tpu

t(r

ad

s)

/In

pu

t(V

)

Reference r(t)

Output u(t)

Input y(t)

20 UPM sinewave demand convergence.

Professor Eric Rogers ECS, University of Southampton, UK

Page 22: Professor Eric Rogers - University of Southampton · Repetitive Control Professor Eric Rogers Electronics and Computer Science University of Southampton Southampton, SO17 1BJ, UK

-6

-4

-2

0

2

4

6

0 5 10 15 20

Time (s)

Ou

tpu

t(r

ad

s)

/In

pu

t(V

)

Reference r(t)

Output y(t)

Input(t)

20 UPM repeating sequence demand convergence.

Professor Eric Rogers ECS, University of Southampton, UK

Page 23: Professor Eric Rogers - University of Southampton · Repetitive Control Professor Eric Rogers Electronics and Computer Science University of Southampton Southampton, SO17 1BJ, UK

0

0.2

0.4

0.6

0.8

1

0 50 100 150 200 250 300 350 400

Cycle No.

NE

0.5

0.7

0.9

0.98

1

Trial error results for sinewave demand with relaxation.

Professor Eric Rogers ECS, University of Southampton, UK

Page 24: Professor Eric Rogers - University of Southampton · Repetitive Control Professor Eric Rogers Electronics and Computer Science University of Southampton Southampton, SO17 1BJ, UK

0

0.2

0.4

0.6

0.8

1

0 50 100 150 200 250 300 350 400

Cycle No.

NE

0.5

0.7

0.9

0.98

1

Trial error results for repeating sequence demand withrelaxation.

Professor Eric Rogers ECS, University of Southampton, UK

Page 25: Professor Eric Rogers - University of Southampton · Repetitive Control Professor Eric Rogers Electronics and Computer Science University of Southampton Southampton, SO17 1BJ, UK

0

0.2

0.4

0.6

0.8

1

0 50 100 150 200 250 300 350 400

Cycle No.

NE

Optimal based

Contraction mapping

Multiple lead

Phase-lead

Comparison of RC schemes for sinewave demand.

Professor Eric Rogers ECS, University of Southampton, UK

Page 26: Professor Eric Rogers - University of Southampton · Repetitive Control Professor Eric Rogers Electronics and Computer Science University of Southampton Southampton, SO17 1BJ, UK

0

0.2

0.4

0.6

0.8

1

0 50 100 150 200 250 300 350 400

Cycle No.

NE

Optimal based

Contraction mapping

Multiple lead

Phase-lead

Comparison of RC schemes for repeating sequence demand.

Professor Eric Rogers ECS, University of Southampton, UK

Page 27: Professor Eric Rogers - University of Southampton · Repetitive Control Professor Eric Rogers Electronics and Computer Science University of Southampton Southampton, SO17 1BJ, UK

Comparisons

• The previous two figures compare the best resultsproduced with this scheme with those of other RC lawsapplied on the same plant, namely the phase-leadalgorithm, a multiple phase-lead algorithm and thecontraction mapping law. These methods also require aplant model.

• It is clear that the optimality based algorithm has hugelyimproved convergence when compared to thesealternatives, a similar final error bound and little sign ofgreater instability.

• To match its convergence rate, the gain of these otherschemes can be increased but this always leads to therapid onset of instability.

Professor Eric Rogers ECS, University of Southampton, UK

Page 28: Professor Eric Rogers - University of Southampton · Repetitive Control Professor Eric Rogers Electronics and Computer Science University of Southampton Southampton, SO17 1BJ, UK

Comparisons

• Successive trial errors are linked through

e(z) =γz−T

1 + G(z)H(z)e(z) +

1− γ1 + G(z)H(z)

r(z) (28)

whereH(z) = K[zI − (Φm − LCm − ΓmK)]−1L (29)

• A sufficient condition for convergence of the errorsequence is ∣∣∣∣ γ

1 + GH

∣∣∣∣ < 1 (30)

for all |z| = 1.

Professor Eric Rogers ECS, University of Southampton, UK

Page 29: Professor Eric Rogers - University of Southampton · Repetitive Control Professor Eric Rogers Electronics and Computer Science University of Southampton Southampton, SO17 1BJ, UK

Comparisons

• Algorithm robustness can be started from that for (30) tohold all roots of

1− z−T + GH = 0 (31)

must have modulus less than unity.• One way of proceeding from here is to plot the Nyquist

diagram of GH1−z−T and check for encirclements of the −1

point.

Professor Eric Rogers ECS, University of Southampton, UK

Page 30: Professor Eric Rogers - University of Southampton · Repetitive Control Professor Eric Rogers Electronics and Computer Science University of Southampton Southampton, SO17 1BJ, UK

Comparisons

• A simpler alternative is to work with GH − z−T since

GH − z−T =−z−T(GnHn + GdHd)

GdHd(32)

where the subscripts n and d denote the numerator anddenominator polynomials of G and H.

Professor Eric Rogers ECS, University of Southampton, UK

Page 31: Professor Eric Rogers - University of Southampton · Repetitive Control Professor Eric Rogers Electronics and Computer Science University of Southampton Southampton, SO17 1BJ, UK

References• The results in this section are from the reference below.

This is just one method from a well studied and still heavilyworked area.

• The references in this cited paper lead to some otherdesigns, but again nowhere near an exhaustive list.

C. T. Freeman, P. L. Lewin, E. Rogers and D. H. Owens andJ. J. HätönenAn optimality-based repetitive control algorithm fordiscrete-time systemsIEEE Transactions on Circutis and Systems-I: RegularPapers, 55(1):412–423, 2008.

Professor Eric Rogers ECS, University of Southampton, UK

Page 32: Professor Eric Rogers - University of Southampton · Repetitive Control Professor Eric Rogers Electronics and Computer Science University of Southampton Southampton, SO17 1BJ, UK

Duality between ILC and RC• It can be shown, under some assumptions, that the

structure of RC and ILC differ only in the location of aninternal model of the disturbance.

• The ability to treat RC and ILC in the same framework isappealing since controllers found to operate well in onearea can be synthesized for application to the other.

• Firs work in the following paper.

D. de Roover, O. H. Bosgra and M. SteinbuchInternal-model-based design of repetitive and iterativelearning controllers for linear multivariable systemsInternational Journal of Control, 73(10):914–929, 2000.

Professor Eric Rogers ECS, University of Southampton, UK

Page 33: Professor Eric Rogers - University of Southampton · Repetitive Control Professor Eric Rogers Electronics and Computer Science University of Southampton Southampton, SO17 1BJ, UK

Duality between ILC and RC• More recent work and experimental verification using the

gantry robot can be found in the following paper.

C. T. Freeman, M. Ali Alsubaie, Z. Cai, E. Rogers and P. L.LewinA common setting for the design of iterative learning andrepetitive controllers with experimental verificationInternational Journal of Adaptive Control and SignalProcessing, 2012, In press. Available online fromhttp://www.ecs.soton.ac.uk/

Professor Eric Rogers ECS, University of Southampton, UK