EXP1 2

advertisement
Nineveh University
College of Electronics Engineering
System and Control Engineering Depart
Robotics LAB.
Mohammad saady Mohammad
Ismail ali Mohammad
Matlab programming:
clc;
close all;
%we shall insert matrix value for the system where A is system matrix, B is input matrix, C is
output matrix, D is feed, Q and R are the state and control weighting matrices and they always
square and positive semi definite matrices.
A=[0 1 0;0 0 1;0 -2 -3];
B=[0 ; 0 ; 1];
C=[1 0 0];
D=[0];
Q=[100 0 0;0 1 0;0 0 1];
R=[0.01];
ALPHA=1;
%linear quadratic regulation (LQR)is state feedback controller which classified as optimal
control system and used in many industrial application as it basically seek a compromise
between the best performance and the minimum control input.
[K,P,E]=lqr(A,B,Q,R)
%Regulation stage
ACL=A-B*K;
K1=K(1)
% in this step we shall performing tracking stage for the system to prove the stability using
BCL=B*K1*ALPHA
t=0:0.1:10;
% to find unit step response of the system
[yt,XP]=step(ACL,BCL,C,D,1,t)
U=-K*XP';
% to perform linear for the system to proving the stability.
y1=XP(:,1);
y1=y1/y1(length(y1))
y2=XP(:,2);
y2=y2/y2(length(y2))
y3=XP(:,3);
y3=y3/y3(length(y3))
%in this step plot all linear quadratic using plot command and input (u)
subplot(2,2,1)
plot(t,y1);
xlabel('time');
ylabel('y1');
grid;
subplot(2,2,2)
plot(t,y2);
xlabel('time');
ylabel('y2');
grid;
subplot(2,2,3)
plot(t,y3);
xlabel('time');
ylabel('y3');
grid;
subplot(2,2,4)
plot(t,U);
xlabel('time');
ylabel('U');
grid;
Conclusion:
In this example we making optimal for the system to get the best performance using matlab
programming and we tacking regulation for the system to minimize energy while driving state
to the origin .
Feedback controllers for tracking and regulation are classified as in stabilization
1-State versus output feedback
2-Static versus dynamic controllers
3-Region of validity
5-local tracking
6-regional tracking
7-semiglobal tracking
8-global tracking
Local tracking is achieved for sufficiently small initial states and sufficiently small (R), while global
tracking is achieved for any initial state and any bounded R.
Practical tracking: The tracking error is ultimately bounded and the ultimate bound can be made
arbitrarily small by choice of design parameters
1-local practical tracking
2-regional practical tracking
3-semiglobal practical tracking
4-global practical tracking
Download