BLACK-BOX CONTROL

Download Black-Box Control in Theory and Applications. RMIT University, 19.08.2016. Arie Levant. School of Mathematical Sciences,. Tel-Aviv Universi...

0 downloads 824 Views 4MB Size
Black-Box Control in Theory and Applications RMIT University, 19.08.2016 Arie Levant School of Mathematical Sciences, Tel-Aviv University, Israel Homepage: http://www.tau.ac.il/~levant/

1

Control problems The task is to make a process behave as we want. Mathematical control appears only when we succeed to quantify the problem. Mathematical control theory usually requires a mathematical model of the process.

2

Contr. problems which cannot be addressed here Control of war and peace, geopolitics, Long-term climate control, Public opinion control Contr. problems which maybe can be addressed Finances: Macro-economic control by state bank, Taxes control, etc Short-term climate control (?) Contr. problems which are addressed Air condition, auto-pilots, keeping bicycle balance, targeting, tracking, orientation, hormonal levels in blood, etc. 3

General Control Problem as Black-Box control

4

Tracking deviation: s =

y - yc ( t ) The goal: s = 0

We need some PSEUDO-MODEL 5

Main "principles" System model is a mathematical model which adequately describes the input-output relations. Whatever it means … No model is exact. The control goal is to make the output s satisfy some requirements by a proper choice of the control u in real time. Any solution of the problem should be feasible and robust. 6

Models & approaches to "Black Box" 1. Sliding-Mode Control (here): r d s = h( t ) + g ( t ) u , r dt r Î ¥, h Î [-C, C ], g Î [ K m , K M

]

2. Model-free control (Fliess, Join, Lafont, et al) "Ultra-local model" r d s = F + Ku , r = 1, 2 , F , K = const r dt PID (proportional, integral, derivative) control

7

Some names and notation r

d s = h( t ) + g ( t ) u r dt r is called the relative degree r d s = s( r ) , d s = s & r dt dt

x Î [ a, b] Û a £ x £ b

s = O(e) of the order of e, i.e. roughly proportional 8

In order to control a Black Box (r ) s Î [-C, C ] + [ K m , K M ]u one should at least identify r. r is called the Practical Relative Degree (PRD) In the framework by Fliess r

= 1, 2

We also want some nice features: smooth / Lipschitzian bounded control 9

Start with control of a smooth system x& = f (t , x, u), s = s(t , x) n

x Î R , u, s Î R

10

Systems non-affine in control x& = f(t,x,u), xÎR , n

output s(t,x) (tracking error), input u ÎR

l

The goal: s º 0

Nonlinearity in control and its discontinuity Þ v = u& is taken as a new control, æ x& ö æ f (t , x, u ) ö æ 0 ö + ç ÷v ç u& ÷ = ç ÷ 0 è ø è ø èIø

The new system is affine in control, u(t) is differentiable.

11

From that moment the system is x& = a(t , x ) + b(t , x )u, s = s(t , x) ¥

n

a, b, s Î C , x Î R , u, s(t , x ) Î R

12

Relative Degree (RD) x& = a(t , x ) + b(t , x )u, xÎR , s, u ÎR n

Informally: RD is the number r of the first total derivative of s where the control explicitly appears with a not-vanishing coefficient. s

(r )

= h( t , x ) + g ( t , x ) u , g ¹ 0

1 && Newton law: x = m F , RD=2 13

In my practice the relative degrees r = 2, 3, 4, 5 mechanical systems, Newton law, integrators

But the solution will be valid for any r.

14

Increasing the relative degree Black-Box Control problem: s ® 0

s s

( r +1)

(r )

= h( t , x ) + g ( t , x ) u

= h% (t , x ) + g% (t , x )u + g (t , x )u&

v = u&, s

( r +1)

Î [-C1 , C1 ] + [ K m , K M ]v

Remark: u is to be kept bounded … 15

Any relative degree is possible (example by Isidori)

q1 K J1 q&&1+F1 q&1- (q2- ) = u, N N q1 J2 q&&2 +F2 q&2 +K(q2- )+mgd cos q2 = 0 N The output : q2, The input: u. The relative degree r = 4

u& = v

The output : q2, The input: v. The relative degree r = 4+1=5

Any relative degree can be got in such a way. 16

Inevitable BAD subproblem z&0 = z1 , z&1 = z2 , ..., z&r - 2 = zr -1 , z&r -1 = u , output: y = z0

The goal: s = y (t ) - f (t ) = 0 s

(r )

= f

(r )

(t ) + u compare s Let | f

(r )

Î [-C , C ] + [ K m , K M ]u

(r )

( t ) |£ C (i )

If s º 0 then zi = f (t ) , i = 0,1,..., r - 1 Exact differentiation is included! 17

Main idea Black-Box Control problem: s ® 0

s

(r )

= h(t , x (t )) + g (t , x (t ))u is replaced with

s

(r )

Î [-C , C ] + [ K m , K M ]u Assumptions h Î [ -C , C ], g Î [ K m , K M ] 18

Solution method s

(r )

Î [-C , C ] + [ K m , K M ]u

u = aU r (s, s& ,..., s or

s

( r +1)

( r -1)

)

Î [-C1 , C1 ] + [ K m , K M ]u&

u& = a1U r +1 (s, s& ,..., s

(r )

)

Continuous control cannot solve the problem

U r , U r +1 are discontinuous, but bounded 19

Sliding mode (SM) (not a math. definition) Any system motion mode existing due to highfrequency (theoretically infinite-frequency) control switching is called SM.

rth-order sliding mode (r-SM) (not a math. definition) r-SM is a SM keeping s º 0 for RD = r by means of high(infinite)-frequency switching of u. 20

Some abbreviations till now SM - sliding mode, r-SM – rth order SM SMC – sliding mode control RD – relative degree PRD – practical relative degree

21

Preliminary conclusions SMC theoretically "almost" solves the classical Black-Box control problem.

It includes exact robust differentiation of any order and robustness to small sampling/model noises, delays and disturbances (also singular). 22

Special power functions (standard notation) g g g

ë sù = s

@ s sign s

23

The following controllers exactly robustly and in finite time provide for sº0 for the simplest model s

(r )

Î [-C , C ] + [ K m , K M ]u 24

Simplest r-SM controllers §s¨

g

(Ding, Levant, Li, Automatica 2016) g " d > 0 , $b0 ,..., bn- 2 > 0 @ s sign s ,

Relay-polynomial homogeneous r-SMC d d dù é ( r -1) ¬ 1 ( r - 2) ¬ 2 © © ê u = -a sign ª« s -® + bn - 2 ª« s -® + L + b0 §s¨ r ú êë úû

Quasi-continuous polynomial homogeneous r-SMC u = -a

d d d © ( r -1) ¬ 1 © ( r - 2) ¬ 2 ª« s -® +bn - 2 ª« s -® +L +b0 s r

§ ¨

d d d s( r -1) 1 + bn - 2 s( r - 2) 2 +L +b0 s r

25

Quasi-continuous control u = U (s, s& ,..., s

( r -1)

)

is called quasi-continuous (quasi-smooth), provided it remains a continuous (smooth) function whenever

(s, s& ,..., s

Example: u = -a

( r -1)

) ¹ (0,0,...,0)

d d d © ( r -1) ¬ 1 © ( r - 2) ¬ 2 s +b s +L +b0 s r ª« -® n-2 ª « ®

§ ¨

d d d s( r -1) 1 + bn - 2 s( r - 2) 2 +L +b0 s r

d > kr Þ quasi k-smooth

26

List of controllers, d = r r = 1,2,3,4,5

1. u = -a sign s, 2 2. u = -a sign(§s& ¨ + s),

&& + §s& ¨ + s) , 3. u = -a sign(s 3 2

3

&& ¨ + 2§s& ¨ + s) , 4. u = -a sign(§&&& s ¨ + 2§s 5 5 5 (4) ¬5 © && ¨3 + 3§s& ¨4 + s). 5. u = -a sign(ª« s -® + 6§&&& s ¨ 2 + 5§ s 4

2

4 3

a is to be taken sufficiently large. 27

Quasi-continuous controllers, d = r 1. u = -a sign s, 2 §s& ¨ +s 2. u = -a 2 , s& +|s|

3. u = -a 4. u =

3 s + s& 2 +s , 3 &&|3 +|s& | 2 +|s| |s

&&3

§ ¨

4 &&& && + 2 s& 3 +s s +2 s -a , 4 &&& && 2 + 2s& 3 +|s| s4 + 2s 5 5 5 © (4) ¬5 && 3 + 3 s& 4 +s s 2 +5 s ª s - + 6 &&&

5. u = -a

§ ¨

§ ¨

4

«

2

®

§ ¨

§ ¨

§ ¨

§ ¨

5 5 5 &&| 3 +3|s& | 4 +|s| s(4) |5 +6|&&& s| 2 +5|s

. 28

Another family (Levant 2005) quasi-continuous controller r = 2 s& + | s | sign s u=-a 1/ 2 | s& | + | s | 1/ 2

quasi-continuous controller r = 3 u=-a

s && + 2

( s& + |s|2 / 3 sign s )

(|s& |+ |s|2 / 3 )1 / 2 2 / 3 1/ 2

|s && | +2(| s& | + | s |

)

29

Discontinuous Differential Equations Filippov Definition

x& = f(x) Û x& Î F(x)

x(t) is an absolutely continuous function

F ( x) =

II

e> 0mN = 0

convex_closure f (Oe ( x) \ N )

Filippov DI:

F(x) is non-empty, convex, compact, upper-semicontinuous. Theorem (Filippov 1960-1970): Þ Solutions exist for Filippov DIs, and for any locally bounded Lebesgue-measurable f(x). Non-autonomous case: t& = 1 is added. 30

Discontinuous Differential Equations Filippov Definition

When switching imperfections (delays, sampling errors, etc) tend to zero usual solutions uniformly converge to Filippov solutions 31

2-sliding mode

32

Robust differentiation problem Unbounded derivatives st

Bounded 1 derivatives &ˆ | f |£ L nd

Bounded 2 derivatives &&ˆ | f |£ L

Arzela Theorem: Bounded functions with bounded derivative of the order k constitute a compact set in C. "Solution": Take the closest function fˆ (t ) ! 33

Landau-Kolmogorov inequalities

Landau: k = 1, ¡ + , 1912; Kolmogorov: k > 1, 1935 There exist such constants b jk ³ 1 , k = 1,2,…, j = 0,1,…,k+1, b0 k = bk +1,k = 1 that for any function j j : ¡ ® ¡ (or j : ¡ + ® ¡), "t : | j(t ) |£ e; (k ) ( k +1) j (t ) is a Lipschitz function, i.e. a.e. | j (t ) |£ L implies ( j)

"t : | j

(t ) |£ b jk

j k +1- j Lk +1 e k +1

b jk cannot be decreased and are realizable. 34

Kolmogorov constants j : ¡ ® ¡ | j(t ) |£ e; | j "t : | j

( j)

(t ) |£ b jk L

( k +1)

(t ) |£ L

j /( k +1) ( k +1- j )/( k +1)

e

1 £ b jk < p / 2

35

kth-Order Differentiation Problem Parameters of the problem: k Î ¥, L > 0 Measured input: f(t) = f0(t) + h(t), | h | < e f0 ,h, e are unknown, h(t) - Lebesgue-measurable function, (k+1) known: |f0 (t)| £ L (k) (or |Lipschitz constant of f0 | £ L ) The goal: (k) & & & real-time estimation of f 0 (t), f 0 (t), ..., f0 (t) 36

Best worst differentiation error (k+1)

Suppose both f(t) , f0(t) satisfy: |f0 ( k +1)

Then | h

(t)|, |f0

(k+1)

(t)| £ L

(t ) |£ 2 L , | h(t ) |£ e , "h is possible

The worst possible error in the jth derivative is not ( j)

less than sup | h

(t ) |£ b jk

j j k +1- j 2 k +1 Lk +1 e k +1

In particular for n = j = 1 get b11 = 2 sup | f& (t ) - f&0 (t ) |£

1 1 2 L2 e 2 37

Differentiator (Levant 1998, 2003)

z& = Dk ( z , f (t ), L), | f z&0 = -l k

1 Lk +1

z&1 = -l k -1

1 Lk

... z&k -1 = -l1

1 L2

( k +1)

|£ L

§ z0 - f (t )¨ + z1, k -1 § z1 - z&0 ¨ k + z2 , k k +1

§ zk -1 - z&k -2 ¨

z&k = -l 0 L sign ( zk - z&k -1 ),

1 2

+ zk , zi - f

(i )

® 0.

l0 = 1.1, l1 = 1.5, l2 = 2, l3 = 3, l4 = 5, l5 = 8, … 38

The differentiation accuracy e = 0 (no noise) Þ in a finite time zi º f

(i )

, i = 0,...,k

In the presence of the noise with the magnitude e, and sampling with the step t: $m j ³ 1 | zj -

( j) f0

|£ m j Lr

k +1- j

, r = max( t

k +1- j

,

k + 1- j e k +1

(L)

),

The asymptotics with respect to noise cannot be improved! (Kolmogorov, » 1935)

t = 0 Þ | zj - f

( j)

j k +1

|£ m kj L e

k +1- j k +1

, m kj

³

j 2 k +1 39

In particular the kth derivative has the worst-case accuracy k 1 (k ) k +1 k +1 | zk - f |£ m kk L e For k = 5,6,...: m kk ³ 3 -6 (5) k = 5, L = 1, e = 10 , error of f > 0.3 -16 Digital round up: e = 5 ×10 k = 5 : error : 0.01; k = 6 : error : 0.02 It is bad, but it cannot be improved! 40

Universal controller for any RD r s

(r )

Î [-C, C ] + [ K m , K M ]u u = -aY r ( z ), z = Dr -1 ( z, s, L )

L ³ C + aK M , a is sufficiently large Accuracy: |noise| ≤ e, sampling step ≤ t |s

( j)

|£ n j r

n +1- j

, r=

t=e=0Þsº0

1 r max( t ,| e | n +1 ),

in finite time

41

EXAMPLES

42

5th-order differentiator, | f é ê ê ê ê ê 5 ê4 ê ê ê ê ê ë

é ê ê é ê ê ê3 ê é ê ê ê 2 ê ê ê ê ê ê1 é ê ê ê ê êë êë ë êë

z&0 =

1 -12 L6

z&1 =

1 -8 L5

z&2 =

1 -5L4

z&3 =

1 -3L3

(6)

§ z0 - f (t )¨

§ z1 - z&0 ¨

4 5

§ z2 - z&1 ¨

3 4

§ z3 - z&2 ¨

2 3

|£ L.

5 6

+ z1 ,

+ z2 , + z3 , + z4 ,

z&4 = § z4 - z&3 ¨ + z5 , z&5 = -1.1L sign( z5 - z&4 ) 1 -1.5L2

1 2

43

5th-order differentiation f(t) = sin 0.5t + cos 0.5t, L =1

44

Example: car control

x& = V cos j, y& = V sin j, j& = (V/l)tan q, q& = u

RD = 3

x, y are measured. The task: real-time tracking y = g(x) V = const = 10 m/s = 36 km/h, l = 5 m, x = y = j = q = 0 at t = 0 Solution: s = y - g(x), r = 3

3-sliding controller (N°3), a = 2, L = 100 45

3-sliding car control s = y - g(x). Simulation: g(x) = 10 sin(0.05x) + 5, x = y = j = q = 0 at t = 0.

u = 0, 0 £ t<1, The controller:

u=

s2 + 2

( s1 +|s|2/3 sign s )

(|s1|+|s|2/3 )1/2 -2 | s2 | +2(| s1 | + | s |2/3 )1/2

, t ³1

Differentiator:

s&0 = -9.28§ s0 - s¨ + s1, 2 3

s& = D2 ( s, s,100) , L = 100: s& = -15 s - s& 12 + s , § 1 0¨ 2 1 s&2 = -110sign( s2 - s&1 )

46

3-sliding car control

-4

t = 10 Þ -5 t = 10 Þ

|s| £ 5.4×10 , | s & | £ 2.5×10 , | s && | £ 0.04 -10 |s| £ 5.6×10 , | s & | £ 1.4×10-5, | s && | £ 0.004 -7

-4

47

Practical Relative Degree PRD NO MODEL AT ALL 48

Practical Relative Degree Definition Nothing is known on the system. r Î ¥ is called the PRD, if $ls = 1 or -1: e, dt, aM, am, L, Lm > 0, am £ aM, Lm £ L,: 1. For any (measurable) u(t), |u-u0|£ UM: Output: s% = s + h, |h| £ e, (r-1) s ÎLip(L) 2. w ls s: If t ³ t0 aM ³ u(t) - u0 ³ am (-aM £ u(t) - u0 £ -am), then t ³ t0+ dt: (r) (r) w ³ Lm (w £ -Lm) 49

Naming

u0 is the reference input, in the following u0 = 0 ls is the influence direction parameter, in the following ls = 1 dt is the delay parameter e is the approximation parameter. Local Practical Relative Degree Definition $ t1, t2, T, t1 < t2, dt < T, such that requirement 1 is true over the time interval [t1, t2 + T]; requirement 2 is true for each t0 Î [t1, t2] over [t0, t0 + T]. 50

Graphical interpretation - 1

51

Graphical interpretation – 2

52

Remarks The function s does not necessarily need to have any real meaning. It can be just an output of some smoothing filter, in particular, of a tracking differentiator. Local practical relative degree is used for temporary output regulation. Keeping s º 0 is not possible under these conditions. 53

Control u = -aY r ( z ), z& = Dr -1 ( z , s, L) , am £ a £ aM Differentiator parameters li are properly chosen Theorem. b1, …, br-1 (coefficients of the r-SM homogeneous controller): Accuracy:

s = O(max[e, dt ]) r

54

Important remark The differentiator is the just a dynamic part of the controller. Its outputs do not have any physical meaning, because PRD ≠ RD. Without the differentiator the controller loses its robustness. An attempt to replace the differentiator with any sensors or other observers is very dangerous!

55

Continuous controller based on quasi-continuous controller

u = - aF(||z||h)Yr(z) (SM regularization)

ì 1 with || z ||h > g max[e, d ], ï F (|| z ||h ) = í 1 2 r || || with || || £ g max[ e , d ], z z h h t r ï max[e, d ] î t 2 2/ r 2/ ( r -1) 2 || z ||h = z0 + z1 + ... + zr -1 r t

The accuracy is the same. 56

Simulation

57

Perturbed car model

x& = Vcos f, y& = Vsin f, &f& = -4sign(f-j)-6f& , Þ Rel. degree does not exist! V j& = D tan q, q& = z1, Actuator: input u, output z1 3 && & z1= -100(2 (z1- u) +0.01 z1) - 100( z1- u)- 2 z& 1, Sensor: s % = z2+0.01 z& 2 - g(x) + h(t), h is a noise, |h| £ 0.01. &&& z2 = - 100(z2 - y) - 2 z& 2 -0.02&& z 2, z2= -10, z& 2 = 2000, &&z 2 = -80000, z1= z& 1= f = f& = 0 at t = 0, If the system were smooth the new RD were 10 58

Practical rel. degree = 3

Differentiator of the order 3 is used with L = 100. 59

System performance

|s| £ 0.16 60

APPLICATION Blood Glucose Control

61

62

Body reaction to glucose concentration increase

63

Different models

64

The simplest model

65

Sorensen model

66

3-sliding QC control (BeM)

67

3-sliding QC control (SoM)

The same parameters

68

PID control (SoM)

69

Experiments on rats

70

Rat 1

71

Rat 2

72

Rat 3

73

Conclusions In practice the system relative degree is a design parameter. Systems of uncertain nature can be effectively controlled, provided their practical relative degree is identified. A system can have a few generalized PRDs! That is why the considered control is universal. 74

Hypothesis Humans (and animals) have universal controllers embodied for PRD ≤ 2 (3?).

75

Thank you very much!

76

77

Applications

78

Pitch Control Problem statement. A non-linear process is given by a set of 42 linear approximations d dt

& q = q, 3 xÎR , q, q, uÎR, t

t

(x,q,q) = G(x,q,q) + Hu,

x1, x2 -velocities, x3 - altitude The Task: q ® qc(t), qc(t) is given in real time. G and H are not known properly Sampling Frequency: 64 Hz, Measurement noises Actuator: delay and discretization. dq/dt does not depend explicitly on u (relative degree 2) Primary Statement: Available: q, qc, Dynamic Pressure and Mach. & q& are measured Main Statement: also q, c

The idea: keeping 5(q

- qc) + ( q& - q& c ) = 0 in 2-sliding mode

(asymptotic 3-sliding) 79

Flight Experiments

qc(t), q(t)

q& c = qc(t), q& = q(t)

80

Example: practical pitch control Actuator (server-stepper) output, Levant et al., 2000

Switch from Linear ( H ¥ ) control to 3-SM control 81

82

On-line calculation of the angular motor velocity and acceleration (data from Volvo Ltd)

Experimental data, t = 0.004

1st derivative. 2nd order differentiation, L = 625 83

On-line 2nd order differentiation Volvo: comparison with optimal spline approximation

84

Image Processing: Crack Elimination

85

Edge Detection

3 successive lines of a grey image

zoom 86

Edge Detection

87