Experiment No2
Experiment No2
Experiment No2
Fourth Year
Experiment no. 2
Student's Name:
Student's No.:
Type of Studying:
Prepared by:
Dr Ammar A. Aldair
Dr Mofeed T. Rashid
Introduction
In this Lab, we will present a design method commonly called the pole-placement or
pole-assignment technique. We assume that all state variables are measurable and are
available for feedback. It will be shown that if the system considered is completely
state controllable, then poles of the closed-loop system may be placed at any desired
locations by means of state feedback through an appropriate state feedback gain
matrix.
The present design technique begins with a determination of the desired closed-loop
poles based on the transient-response and/or frequency-response requirements, such
as speed, damping ratio, or bandwidth, as well as steady-state requirements.
̇( ) () ( ) ( )
( ) ( ) ( )
if state feedback control () , then the control input for the given system is given by
( ) ( ) ()
( ) ( ) ( ) ( )
̇ ( ) [ ] ( )
Or: ̇ [ ] ( )
It can be show that if the pair (A,b) is completely controllable, then the vector k exist and can
give any arbitrary set of Eigen values (poles) of matrix [ ] or roots of characteristic
equation:
| ([ ])|
Or: | | ( )
̇
[ ̇ ] [ ][ ] [ ]
̇
Where the code ctrb computes the controllability matrix for state-space systems. For an
n-by-n matrix A and an n-by-m matrix B, ctrb(A,B) returns the controllability matrix
Co = ctrb(sys) calculates the controllability matrix of the state-space LTI object sys.
The following codes can be used to design and plot the respons of the system with and
without the poles placement controller:
clc
clear all
A=[0 1 0;0 0 1;-1 -5 -6];
b=[0;0;1];
J=[-2+j*4 -2-j*4 -10];
Co=ctrb(A,b);
E=det(Co)
if E==0
disp('the system is uncontrolable')
else
K=acker(A,b,J);
c=[1 0 0];
d=[0];
AA=A-b*K;
BB=b*K;
CC=c;
DD=d;
% Enter step command and plot command
t=0:0.1:15;
Control Lab – Fourth Year Page 4
y1=step(A,b,c,d,1,t);
y2=step(AA,BB,CC,DD,1,t);
plot (t,y1,t,y2)
end
The comparison between the system with and without the pole placement controller is
shown in Figure 2:
Figure 2 comparison between the system with and without the pole placement controller
Exercise: For the inverted pendulum system shown in Fig. 3, the state space model is
given in equation 7
[ ] (7)
By setting different values for these parameters, various transfer functions can be
obtained.
Report
1. Plot the time response of the the system without the controller : (1 mark)
3. What does happen for the system after the controller is connected? And why?
(2 marks)
5. Conclusion (2 marks)