You are on page 1of 16

NATIONAL CHENG KUNG UNIVERSITY

Department of Mechanical Engineering

ADAPTIVE CONTROL HOMEWORK 7

Instructor: Student: Student ID: Department: Class:

Ming Shaung Ju Nguyen Van Thanh P96007019 Inst. of Manufacturing & Information Systems 1001- N164400 - Adaptive Control

December 27, 2011

Contents
Problem 1 ............................................................................................................................2 Problem 2 ..........................................................................................................................10

Adaptive Control Theory HW5

Page 1

Problem 1
Consider a first-order plant described by: = 1.25() + 0.65() = () + ()

1. Design a model reference adaptive controller for tracking control using the gradient method. Parameter values for the reference model are: am = bm = 2. The reference model is: Let the controller be given by: () = 1 () 2 () reference model, i.e. () = () () 1 & 2 are controller parameters to be adjusted. = () + () (uc(t) - command)

Let e be the error between the output y of the closed-loop system and the output ym of the

The dynamic error:

() = () () = () + () () + ()

Then () = () () = exp( ) ( = 0) Adaptive Control Theory HW5


> 0 > 0 ( = 2) = ( + 2 ) = 0 2 1 1 = lim () = 0, > 0 lim () = (), ()

= () + ( + 2 )() + (1 ) ()

= () + () () + () () + () = () () + ( + 2 )() + (1 ) ()

Page 2

This is the perfect model following condition.

If two parameters are chosen to be 0 2 = 2 =

0 1 = 1 =

Then the input-output relations of the system and the model are the same. The loss function: () =
1 2

1 () The MIT rule: () = () () 2 () = () 2

2 ()

1 () = ()

()

Substitute the control law into the plant model; we obtain the closed-loop dynamic system: Define () = () + 1 () 2 () = ( + 2 )() + 1 1 ()

Then, the closed-loop system can be rewritten as:

= ()

Similarly, for the reference model, we obtain: () = model is () = () () =

+ ( + 2 )() = 1 () () =

The error between the output y of the closed-loop system and the output ym of the reference 1 () () + ( + 2 ) + Page 3

1 () + ( + 2 ) ()

Adaptive Control Theory HW5

() = () + ( + 2 ) 1

() 1 1 = () = () 2 + ( + 2 ) + ( + 2 ) 2 + ( + 2 ) = () + ( + 2 )

These formulas cannot be used directly because the process parameters a and b are not
0 observation that: + + 2 = + , when the parameters give perfect model-

known. Approximations are required. One possible approximation is based on the

following. We will therefore use the approximation:

Hence, the sensitivity derivatives are:

Note:

Substitute the sensitivity derivatives into the adjusted law, and then we get the following equation for updating the controller parameters: 1 () = () () = () () + 1

is a low-pass filter, with DC gain = 1.

() () = () + + 2

() () = () + + 1

+ + 2 +

() () = () () + +

Adaptive Control Theory HW5

Page 4

2 () = () Where, =

= () () + is a design variable.

() = () () = () () + + 2

> 0 > 0 > 0 can be chosen by simulation. > 0 Plant model transfer function: () = Summary:
+

Reference model transfer function: () =

Equations for updating the controller parameters:

+1.25

0.65

2 1 () = () () = ()() + 2 + 2 () () = ()() 2 () = + 2 + () = 1 () 2 ()

+2

Control law:

Refer to the part 2 for more information.

Adaptive Control Theory HW5

Page 5

2. Simulate the closed-loop system and compare the performance when = 0.2, and 5. The command is a square wave with amplitude of 1 and period of 20 seconds.
bm s+am Reference Model Plant Input MATLAB Function Clock uc(t) -gamma s Output b s+a Plant
y(t)

ym(t)

Theta1

gamma s

Theta2 am s+am

am s+am

Figure 1 Block diagram for simulating Discussion: Compare the performance of the closed-loop system with gamma = 0.2, 1, and 5. From Fig. 2, we can clearly see that, when gamma = 0.2, the response is very slowly (no overshoot), and the process output can track the command but there exists steady-state error. When gamma = 1, with small overshoot, and after 2 periods the process output can track the command very good. When gamma = 5, the response is very fast, overshoot is larger. And after only one period the process output can track the command very good. But now look at the control input, when gamma = 5, the input has very large overshoot when the command changes. When we try with larger gamma, that means the system takes more action (more input). So, with gamma = 1, the performance of the closed-loop system is the better.

Adaptive Control Theory HW5

Page 6

Figure 2 Simulation the closed-loop system with some gamma values

Adaptive Control Theory HW5

Page 7

3. Present the results and plot the relation between the two controller parameters. From the results discuss on the limitation of the gradient method.

Figure 3 Controller parameters theta1 and theta2. From Fig. 3, we see that the parameters will converge to the true values with increasing time. The convergence rate increases with increasing gamma. The parameter estimates are related to each other in a very special way, even they are quite far from their true values. This is illustrated in Fig. 4, this figure shows that parameters do indeed approach their correct values as time increases. The parameter estimates quickly approach the line theta2 = theta1 a/b. This line represents parameter values such that the closed-loop system has correct steady-state gain.

Adaptive Control Theory HW5

Page 8

Figure 4 Relation between controller parameters theta1 and theta2, with gamma = 1, in increase time to 10 periods (200s). Discussion on the limitation of the gradient method (MIT rule): look at Fig. 2 and Fig. 5, we can see that when we try to increase the amplitude of the command input, so the performances are very different. When gamma increases, the controller parameters converge quickly but the system becomes unstable. It can be seen clearly when the amplitude of the command increases. The system will be stable when gamma is small, but the rate of convergence is very slow. So, there is no guarantee that an adaptive controller based the gradient method will give a stable closed-loop system.

Adaptive Control Theory HW5

Page 9

Figure 5 ref. output and process output when increase the amplitude of the command signal to 3 times. With the same gamma = 5.

Problem 2
Consider the plant in P1.
1. Design a model reference adaptive controller for tracking control using the normalized

MIT rule. Parameter values for the reference model are: am = bm = 2. The design procedure is the same as in Problem 1. A little different is now the equations for updating the controller parameters change to: 1 () 1 () = 2 2 + (1 + 2 )

Where,

Adaptive Control Theory HW5

1 =

2 () 2 () = 2 2 + (1 + 2 )

= () 1 +

Page 10

2. Simulate the closed-loop system and compare the performance when = 0.001, = 1.

2 =

= () 2 +

The command is a square wave with amplitude of (0.1, 1, 10) and period of 20 seconds. You can try different .
bm s+am Reference Model 3 MATLAB Function Clock uc(t) gamma s Theta1 4 Out4 5 Out5 Out3 b s+a Plant
y (t)

ym(t)

1 Out1

Plant Input 2 Out2 Output

gamma s

Theta2

Fcn1 Fcn f(u)

f(u)

-b s+am

b s+am

Figure 6 Block diagram for simulating the normalized MIT rule

Adaptive Control Theory HW5

Page 11

Figure 7 Simulation the closed-loop system with some gamma values, and the amplitude of the command is 0.1.

Adaptive Control Theory HW5

Page 12

Figure 8 Simulation the closed-loop system with some gamma values, and the amplitude of the command is 1.

Adaptive Control Theory HW5

Page 13

Figure 9 Simulation the closed-loop system with some gamma values, and the amplitude of the command is 10.
3. Compare the results with those of the MIT rule.

In problem 1, we have seen that the choice of adaptation gain is crucial and that the value chosen depends on the amplitude of the command signal. With gamma = 5 (even gamma = 2) and the amplitude of the command signal = 10, the adaptive system becomes maybe unstable. But in problem 2, we use the normalized MIT rule, when we try with gamma = 2 and the amplitude of the command signal = 10, the performance of the closed-loop system Adaptive Control Theory HW5 Page 14

is very good. So, in the normalized MIT rule, the choice of adaptation gain does not depend on the amplitude of the command signal.

Adaptive Control Theory HW5

Page 15

You might also like