Anda di halaman 1dari 10

EML 6934, Nonlinear Control Systems Final project Spring 2010

Tracking Control of a Robot Manipulator with uncertainties and disturbances

RAMIN SHAMSHIRI UFID#: 9021-3353

Due: 12.April.2010

1
Ramin Shamshiri EML 6934, Nonlinear control systems

I.

Problem Overview

Where the manipulator Jacobian 22 is given by (3) = 1 sin 1 2 sin 1 + 2 1 cos 1 + 2 cos 1 + 2 2 sin 1 + 2 2 cos 1 + 2 (3)

The objective of this project was to design and simulate the performance of a tracking controller for a two-link robot manipulator shown in Fig. 1, with uncertain system parameters, and in the presence of bounded disturbances.

The link lengths 1 , 2 of the robot are selected as 1 = 2 = 0.5 III. Control Objective

1. The robot tracks the desired joint space trajectory

given by = cos Figure 1. Two link robot setup II. Dynamic Model cos

(4)

2. The robot tracks the desired task space trajectory

given by = 0.5sin 1

The dynamics associated with the two-link robot are given by (1), 1 1 + 23 2 1 = 2 + 3 2 + + 3 2 2 3 2 1 1 0 2 + 3 2 1 2 2 3 2 1 + 2 0 1 2 (1)

(5)

Assume that the system parameters 1 , 2 , 3 , 1 , 2 are unknown bounded positive constants (except for the EMK case where these constants are exactly known). Design and implement the following controllers to achieve the control objective: 1. Exact Model Knowledge (EMK) controller. 2. Adaptive controller. 3. Sliding mode controller. 4. High gain controller. In each case, comment on how the bounded disturbance d = 2 sin 0.5 sin T affects the stability of the system.

0 1 + 1 2 2 2

where 1 = 3.473 . 2 , 2 = 0.196 . 2 , 3 = 0.242 . 2 , 1 = 5.3 . , 2 = 1.1 . , 1 , 2 denotes the angular position of the robot links, 2 = cos 2 ), 2 = sin 2 ), 1 and ( ( 2 represents torque control inputs. The Euclidean position of the endpoints of the second robot link is denoted by [1 2 ] which is related to the joint space through the following kinematic relationship = (2)

2
Ramin Shamshiri EML 6934, Nonlinear control systems

IV. Report 4.1. Description of the dynamic model The dynamics of the two-link robot given in (1) can be written as () + (, ) + + () = (6)

4.3. Assumptions The development of the controllers is based on the following assumptions: o o o o x(t) , q(t) and q(t) are measurable. M q , Vm q, q , and d (t) are unknown. q, q, q d and q d exists and L . d , d , d L

Where 22 is the inertia matrix, 22 denotes the centripetal-Coriolis matrix, 2 denotes friction, () is a general nonlinear bounded disturbance modeled as = 2sin 0.5sin , () represents the torque input control vector and , , denote the link position, velocity, and acceleration vectors, respectively. 4.2. Development of the error system We define a position tracking error (7) as follow: = (7)

4.4. Properties o The inertia matrix () is symmetric and positive definite (PD) and satisfies the following inequality y t n : 1
2

(13.1)

where m1 is a known positive constant, m q is a known positive function, and . denotes the standard Euclidean norm. o If q t , q(t) L , then the first and second partial derivative of the elements of M q and Vm q, q with respect to q and the first and second partial derivative of the elements Vm q, q and fd with respect to q exist and are bounded. The time derivative of the inertia matrix and the centripetal Coriolis matrix satisfy the following skew symmetric relationship 1 , 2 = 0 (13.2)

Differentiation (7) with respect to time and adding and subtracting : = + where = . Now we can design such that = ( + ) Substituting (9) into (8); = (10)
1

(8) o (9)

We can also write as = + . Therefore, (11) becomes: = + (12)

where = . The controllers will be designed based on the open loop error system given in (12).

3
Ramin Shamshiri EML 6934, Nonlinear control systems

4.5. Exact Model knowledge (EMK) controller 4.5.1. Controller design

= K 2

(20)

Assuming to have exact knowledge about dynamic of the system, we design a controller to cancel all the nonlinearities in the system, thus the external disturbance will be the only term left undefined. To this purpose, using the dynamic in (12), the control torque is designed such that 0, = 1 (14)

Where = . In the absence of disturbances ( = 0), the inequality in (20) will reduce to: K z
2

(21)

Using the expression for V In (16), we can write (21) as the following differential equation; 2K which has the solution of the form 0 2 (23) (22)

where is the control gain constant matrix (K > 0). Substituting this torque in the dynamic yields the closed loop error system as follow: = 4.5.2. Lyapunov stability analysis differentiable (15)

Considering a PD, continuously candidate Lyapunov function as = 1 1 + 2 2

(16)

From (23), we can conclude that the system is Globally exponentially stable (GES) using this controller. It can be observed that exponentially goes to zero and is , also and exponentially go to zero and are . Since is a function of and , it is also , therefore the control input torque () is also . In the presence of disturbances ( 0), we can upper bound in (20) by K
2

and differentiating it with respect to time, 1 = J + + 2 Substituting the expression for into (17); 1 = J + + ( + 2 )

(17)

(24)

(18)

where c is a positive constant this case, we can conclude ultimately bounded (GUUB) the ultimate bound is given by 4.5.3. Simulation

Using the property,

1 2

Vm q, q

= 0,

where = in this case, we can simplify and write (18) as follow: = J + ( + ) (19)

From (19), it can be seen that why the control torque is designed as = 1 . Now, we can upper bound as:

The performance of the designed EMK controller was simulated in MATLAB in the presence and absence of external disturbance (Figure 2 and 3). The corresponding error and torque plots are shown in Figure 4 through 7.

4
Ramin Shamshiri EML 6934, Nonlinear control systems

function [Torque, e] = EMK_controller(t, K, q, q_dot,x) % Desired trajectory: % qd = [cos(t);cos(t)]; qd_dot = [-sin(t);-sin(t)]; qd_ddot = [-cos(t);-cos(t)]; xd=[0.05*sin(t);0.75]; % Error definition for the Tracking controller e = x - xd; etta=q_dot-qd_dot; % Parameter description, given Exact Model Knowledge: p1 = 3.473; p2 = 0.196; p3 = 0.242; fd1 = 5.3; fd2 = 1.1; l1=0.5; l2=0.5; % Joint position and velocity signals: q1 = q(1); q2 = q(2); % Joint angles q1_dot = q_dot(1); q2_dot = q_dot(2); % Joint angular velocities % Model description: M = [p1+2*p3*cos(q2) p2+p3*cos(q2);p2+p3*cos(q2) p2 ]; M_dot=[-2*p3*sin(q2) -p3*sin(q2);-p3*sin(q2) 0]; Vm = [-p3*sin(q2)*q2_dot -p3*sin(q2)*(q1_dot+q2_dot); p3*sin(q2)*q1_dot 0 ]; Fd = [fd1 0;0 fd2]; J=[-l1*sin(q1)-l2*sin(q1+q2) -l2*sin(q1+q2);-l1*cos(q1)+l2*cos(q1+q2) l2*cos(q1+q2)]; % Control Torque based on exact model knowledge Torque = - K*etta-J*e+Fd*q_dot+M*qd_ddot+Vm*qd_dot;

5
Ramin Shamshiri EML 6934, Nonlinear control systems

function [q_ddot,x_dot] = Manipulator_dynamics(Torque, q, q_dot) %% Parameter description: p1 = 3.473; p2 = 0.196; p3 = 0.242; fd1 = 5.3; fd2 = 1.1; l1=0.5; l2=0.5; % Joint position and velocity signals: q1 = q(1); q2 = q(2); % Joint angles q1_dot = q_dot(1); q2_dot = q_dot(2); % Joint angular velocities % Model description: M = [p1+2*p3*cos(q2) p2+p3*cos(q2); p2+p3*cos(q2) p2 ]; Vm = [-p3*sin(q2)*q2_dot -p3*sin(q2)*(q1_dot+q2_dot); p3*sin(q2)*q1_dot 0 ]; Fd = [fd1 0;0 fd2]; % Output for feedback - "q_ddot" % From the given equation of dynamics q_ddot = inv(M)*(Torque - Vm*q_dot - Fd*q_dot); J=[-l1*sin(q1)-l2*sin(q1+q2) -l2*sin(q1+q2);-l1*cos(q1)+l2*cos(q1+q2) l2*cos(q1+q2)]; x_dot=J*q_dot;

6
Ramin Shamshiri EML 6934, Nonlinear control systems

7
Ramin Shamshiri EML 6934, Nonlinear control systems

4.6. Adaptive controller The objective of adaptive control is to achieve a trajectory tracking task in the presence of unknown parameters, thus, the controller should be designed based on an estimate of the system model. 4.6.1. Controller design From (12), we design the control torque as follow: = 1 (25)

The expression for can then be find by integrating , ( = ). 4.6.2. Lyapunov stability analysis: Substituting the designed in the expression for given by (30) yields; = We can now upper-bound (32) by: K
2

(32)

where is a positive control gain matrix and represents an estimate of the system parameters. Substituting (25) in (12), yields the following closed loop error system. = K 1 (26)

(33)

where = is he difference between the actual and estimated parameters. Differentiation with respect to time gives = (since is assumed to be a constant). In order to design , we consider a continuously differentiable, positive-definite Lyapunov function candidate given by = 1 1 1 + + T 1 2 2 2 (27)

Differentiating (27) with respect to time and substituting for with yields and Substituting for with (26) ; 1 = J + 2 + K
1 1

Where = . In the absence of external disturbance, = 0 hence the expression in (33) reduces to K 2 . Since is a positive definite function and is negative semi definite, we can conclude that . In addition, since is a function of and , then and are also . Being bounded, we have , , thus , which means . Also since , , then , thus . Therefore, is continuously differentiable Since is square integrable ( 2 ) and uniformly continuous, using the corollary to Barbalats lemma, we can prove that 0 as 0, hence we can conclude that using this controller, and in the absence of external disturbances, the system is asymptotically stable. The input controller torque in (25) is a function of bounded terms and is therefore bounded. In the presence of a bounded external disturbance, 0, assuming that < , we can upper bound (32) by K
2

(28)

(33.1)

Using the skew symmetric property (13.2), 1 ( = 0) we can write (29) as:
2

Which results in a globally uniformly ultimately bounded (GUUB) stability result. To calculate the ultimate bound, we set K 2 = 0, which yields > .

= J + ( K ) Now we can design as: = (31)

1 1

(30)

4.6.3.

Discussion

Since we have uncertain parameters in the system, it is necessary to use adaptive control to design control torque. As we can see in Figure 14, 15, 16 and 17, ultimately, the parameter estimates reach close to the actual values given by the problem. It can also be seen from Figure 10 and 11 that the error asymptotically converges to zero in the absence of external disturbances. In the case of having disturbance in the system, the error wiggles around

8
Ramin Shamshiri EML 6934, Nonlinear control systems

zero, indicating an ultimately bounded stability result. It can also be seen from the torque profiles that the torques are within the prescribed limits.

1 = + 2 Substituting (4.37) in (39): = 1 + ( () m 2 + )

(39)

4.7. Sliding mode control When the parameters in the model are all unknown, nonlinear robust sliding mode control is an approach to compensate uncertainties in the system by crushing them through fast switching. This approach comes at the cost of high or even infinite control effort. In the other words, we would need an actuator that switches infinitely. 4.7.1. Controller Design: For this design, we need to consider the following upper-bounds to the dynamic expressed in (11): = cos cos

(40)

using the skew symmetry property given by (13.2) to simplify (40) = ( () + ) Now we can upper bound as follow:
2

(40.1)

() +
2

, , 1, , , , = 2 sin t 1 We can also group the terms in (12) as follow: = m + (35) 0.5 sin t

(34)

+
2

(41)

From (41), we can get V

2K max M

V(t), where

max {M} gives the maximum eigenvalue of matrix M. Therefore, we have: (t) 0 e
2 {}

(42)

where = can be upper bounded by 1 + 2 + 3 2 , where = . Therefore we design the control torque as: = () (36)

where is a positive control gain matrix, is a positive constant and () is the sign function of . Substituting (36) in (35) yields the closed loop error system: = () m + (37)

From (42), it can be concluded that the system is Global Exponential stability (GES). Since () exponentially converges to 0, also exponentially converges to 0. Therefore, e 0 0. Since the disturbance was included within the uncertain model, no separate stability analysis is necessary for a case with disturbance. The constants chosen squash all the unknown nonlinearities in the system. However, robust controllers for a system with and without disturbances are modeled and simulated. 4.7.3. Discussion In this design, we can theoretically achieve a globally exponentially stability result, however errors do not exactly converge to zero, because of the discontinuous nature of the controller and since the torque limitations impose constraints on the gain selection. Having upper bounded the unknown dynamics and disturbances by functions of states; the sliding mode controller manages to crush the nonlinearities, however it is not possible to achieve GES when the unknown dynamics cannot be modeled as a function of states, but upper-bounded by a constant. In this case, we can conclude a globally uniformly ultimately bounded stability

4.7.2. Stability Analysis: Considering a continuously differentiable, positivedefinite Lyapunov function candidate given by = 1 2 (38)

Differentiating (38) with respect to time,

9
Ramin Shamshiri EML 6934, Nonlinear control systems

result. From the torque plots, we can see that it has been switching infinitely which in reality, there is no actuator to handle such a bandwidth, thus this controller is not implementable on a real system. 4.8. High gain control In this approach, we design torque control input in such a way that it crushes the uncertainties in the system through high gain. This design leads to a high control effort. 4.8.1. Control design Using the dynamic in (35), we design the control torque as: = (43)

V K 2 + T 2 +

(47)

From (47), we can see that 2 dominates by large , and as long as this happens, () will be decreasing. But because we have 2 , the term 2 will eventually be dominated by . In the other words, at some point, r will be small enough that K 2 will be dominated by , and since is a positive definite, radially unbounded and decrescent function, we conclude uniformly ultimate bound stability result. This can be shown by letting = 1 + 2 and completing the square term in (47) as follow:
1
2

2 2 2 + 4 42 2

(48)

where is a positive control gain matrix. Substituting (43) in (35) yields the closed loop error system as follow: = m + 4.8.2. Stability Analysis (44)

1 { }

(49)

where =

2 1

2 4k 2

. The solution to (49) is

Considering a continuously differentiable, positivedefinite Lyapunov function candidate given by (38) and its time derivative given in (39), substitution for in (39) using (44) yields; = 1 + ( m + ) 2 (45)

() (0)e + , where max {M} gives the maximum eigenvalue of matrix M. Therefore, we have uniformly ultimate bounded (UUB) stability result. 4.8.3. Discussions:

using the skew symmetry property given by (13.2) to simplify (40) = ( + ) Now we can upper bound as follow: (46)

Plots of error for different gains are shown in Figure 24. It can be seen that, as we increase the gain, error get closer to zero. In reality, increasing gain require high control effort. One advantage of this controller is its simple design structure which makes it easy to tune and implement. The controller is robust to the uncertainties in the system, however it only yields a uniformly ultimately bounded stability result.

10
Ramin Shamshiri EML 6934, Nonlinear control systems