control postlab
DESCRIPTION
Control postlabTRANSCRIPT
1
Sabanci University
Faculty of Engineering and Natural Sciences
Fall2014
ME 303
CONTROL SYSTEM
DESIGN
LAB REPORT # 2
(Group Number 4& Section B)
Lead-Lag Controller Design
Submitted by
Burak Kadayıfçı -15426
Alper Gül-14027
Alp Güçlü - 12866
on
05.12.2014
2
INTRODUCTION
The main purposes of this lab are to design a lead-lag compensator and to see the Real-
Time effects of them on DC motors in lab environment. When the appropriate lead-lag
compensator design has impact on the system, desired system response and acceptable steady
state error will be observed. It is also important to understand properties of lead and lag
controller separately in terms of pole placement approach and error status.
In this experiment, these background information should be taken into consideration in order to
have a full benefits from it:
Error = Reference – Actuator =>e (t) = theta (ref) – theta (act)
Lead Controller = K(s+z1) / (s+p1)
Lag Controller = (s+z2) / (s+p2)
Lead/Lag Controller = K(s+z1)(s+z2) / (s+p1)(s+p2)
PROCEDURE
In this experiment, there are several steps that is should be completed. Firstly, we needed
to configure and design our matlab and dspace environment for convenience of the lead/lag
controller setup. For instance, we defined two values that implies pole and pole-zero with A and
C sign respectively. Thus, if we take the value of pole 10 and pole-zero 8, our pole location and
zero location will be 10 and 2. Secondly, we need to design a lead controller using appropriate
K, z1, and p1 values. When the desired response observed, it is time to add lag controller to
design lead/lag. Thirdly, need to design lag controller using appropriate z2 and p2 values. After
the observation of what we desired from lead/lag controller, it is only left to saving our
experiment, layout, files and datas.
3
RESULTS
4
5
In this part of the experiment we selected different values for lead gain. According to graphs and
the experimental date we have found the most proper gain seemed to be 79. When we selected
gain as 79 settling time and rising time decreased dramatically. The system had overshoot which
is less than gain=50 and more than gain=100. Gain=79 gave the maximum and rms value of
error less than other solutions. The maximum values of control inputs seemed to be same with
all gain values but the smallest rms value was given with the gain=50.
6
7
8
In this part of the experiment theoretically we add lag compensation to our existing lead
compensator. From previous part of the experiment we selected the gain as 79 as a best option.
After that we started to give small values to zeros and poles of the compensators. When we
selected pole 0.01 and zero 0.1 rising time is less than other solutions. However the smallest
settling time value was given by pole= 0.5 and zero= 1. When we compared the overshoot
percentages the minimum value was zero which is given by the values of pole= 0.01 and zero=
0.1. The maximum values of errors were the same for each pole and zero option. However the
rms values of errors are almost same for pole=0.5 zero=1 and pole=1.5 and zero=0.5 but for
pole=0.01 and zero=0.1 the error value was relatively high. Maximum values of control input
9
were all same for these corresponding values. However rms values of control input reached its
maximum value when lead-lag compensator’s pole= 0.01 and zero= 0.1. As a result the best
option was the compensator pole=0.5 and zero=1 considering small settling time and good
steady state error.
Compensator Rise time Settling
time
Over
shoot
erms emax urms umax
Lead/Gain=50 5.6553e+03 7.9285e+03 5.4130e-
04
5.2663 15 0.4674 0.9000
Lead/Gain=79 2.5711e+03 4.8317e+03 4.0606e-
04
3.1463 6.7086
0.5303
0.9000
Lead/Gain=100 5.6559e+03 7.5933e+03 0 7.8664 15 0.7372 0.9000
Lead-
lag/A=0.01,C=0.1
1.7968e+04 2.2997e+04 0 16.2933 15
0.9000
0.9000
Lead-
lag/A=0.5,C=1
5.6595e+03 1.0849e+04 13.0468 6.3998 15 0.5711 0.9000
Lead-
lag/A=1.5,C=0.5
5.6582e+03 7.5791e+03 0.0891 6.1239 15 0.5711 0.9000
DISCUSSION
Burak Kadayıfçı:
We started to the experiment as using only lead compensator. Our aim was to see
effect of lead compensator to a closed loop system. We set different values for lead gain such
as 50, 79 and 100. We saw that 79 is our best option considering their settling time and rising
time. The system was very stable with gain=79 resulting small settling time and rise time.
However there was still steady state error. Since lead compensator improves steady state error,
we should add lag compensator to lead compensator to eliminate steady state error. When we
designed lead-lag compensator we selected different values for pole and zero to see system
response. As a result of different values the best option was pole=0.5 and zero=1 considering
the smallest settling time considerable steady state error. Using lead-lag compensator in the
experiment gave the best result that desired poles with good steady state error and system
response.
10
Alper Gül:
Our first challenge was designing lead compensator and to see the effects of it on the
system response. We used several values to understand working principle of lead compensator
and we concluded that the best result and desired loops and locus points have come when the
gain is equal to 79. Then we have just realized that, we had reasonable system response in terms
of settling and rise time, however our steady state error has considerably increased then at that
point we were told that we should add the lag compensator to eliminate this error. This is where
we understood the value of lag compensator in the system response. Again, we tried several
values for lag compensator. It is told that, 10 times difference between pole and zero of lag
controller is fine for taking appropriate response; however we took our best result when pole
and zero are 0.5 and 1 respectively. Furthermore, we tried different values for zero and pole
values that is not included in lab data for both lead and lag compensator to understand location
of the zero and pole with respect to each other and it was concluded that in lead, zero is closer
to the origin, in lag pole is closer to the origin. When we applied lead/lag, we combined the
effects of two different compensators to catch good steady state error and response time
Alp Güçlü:
First of all we used lead compensator. In the experiment we used a closed-loop system
and we set 3 different gains respectively 79, 50 then 100. After we gave 79 for the gain value of
the system we saw the value of the 79 was better than the other two of them. It has better
settling time and the rising time. However our steady state error did not change. For decreasing
the steady state error, we changed the system we add a lag compensator and we create lead-lag
compensator. We add some pole and zero values to decrease steady state error, we add
respectively 0.01, -0.5 and -1.5 for the poles and we add respectively 0.1, 1 and 0.5 for the zero
value. At the values for the pole -0.5 and for the zero 1, we got better results and we got less
steady state error. Also when we gave both pole and zero positive and pole was closer to the
origin we got infinite position in other words, we could not control the system and position
increased infinitely.
11
CONCLUSION
As a result, we understand that lead compensator changes the root locus of the system
and pulls the roots to desired points. In lead control, zero is closer to the origin than the pole. On
the other hand, in lag compensator, it does not change the locus of the system; it helps us to have
good steady state error without overflow problems. Pole is often placed very closed to zero
(0.01) and zero is placed near pole (0.1). We understood at least ten times difference is
appropriate for lag compensator. Using both lead/lag compensators in our experiment gives us
best result that desired poles with good steady state error and system response.
APPENDIX
% %% Gain 79 figure(1) subplot(3,1,1) plot(pos.X.Data, pos.Y.Data) title('Lead Gain=79'); ylabel('Position'); subplot(3,1,2) plot(lead_error.X.Data, lead_error.Y.Data) ylabel('Error'); subplot(3,1,3) plot(input_lead.X.Data, input_lead.Y.Data) ylabel('Control Input');
% %% Gain 50 figure(2) subplot(3,1,1) plot(pos_lead50.X.Data, pos_lead50.Y.Data) title('Lead Gain=50'); ylabel('Position'); subplot(3,1,2) plot(error_lead50.X.Data, error_lead50.Y.Data) ylabel('Error'); subplot(3,1,3) plot(lead_input50.X.Data, lead_input50.Y.Data) ylabel('Control Input');
% %% Gain 100 figure(3) subplot(3,1,1) plot(pos_lead100.X.Data, pos_lead100.Y.Data) title('Lead Gain=100'); ylabel('Position'); subplot(3,1,2) plot(error_lead100.X.Data, error_lead100.Y.Data) ylabel('Error'); subplot(3,1,3) plot(input_lead100.X.Data, input_lead100.Y.Data) ylabel('Control Input');
12
% %% LeadLag 0.01/0.1 figure(4) subplot(3,1,1) plot(leadlag_pos_0_01_0_1.X.Data, leadlag_pos_0_01_0_1.Y.Data) title('LeadLag Gain=79 Pole=0.01 Zero=0.1'); ylabel('Position'); subplot(3,1,2) plot(leadlag_error_0_01_0_1.X.Data, leadlag_error_0_01_0_1.Y.Data) ylabel('Error'); subplot(3,1,3) plot(leadlag_input_0_01_0_1.X.Data, leadlag_input_0_01_0_1.Y.Data) ylabel('Control Input');
% %% LeadLag -1.5/0.5 figure(5) subplot(3,1,1) plot(leadlag_pos__1_5_0_5.X.Data, leadlag_pos__1_5_0_5.Y.Data) title('LeadLag Gain=79 Pole=-1.5 Pole-Zero=0.5'); ylabel('Position'); subplot(3,1,2) plot(leadlag_error__1_5_0_5.X.Data, leadlag_error__1_5_0_5.Y.Data) ylabel('Error'); subplot(3,1,3) plot(leadlag_input__1_5_0_5.X.Data, leadlag_input__1_5_0_5.Y.Data) ylabel('Control Input');
% %% LeadLag -0.5/1 figure(6) subplot(3,1,1) plot(leadlag_pos__0_5_1.X.Data, leadlag_pos__0_5_1.Y.Data) title('LeadLag Gain=79 Pole=-0.5 Pole-Zero=1'); ylabel('Position'); subplot(3,1,2) plot(leadlag_err__0_5_1.X.Data, leadlag_err__0_5_1.Y.Data) ylabel('Error'); subplot(3,1,3) plot(leadlag_inp__0_5_1.X.Data, leadlag_inp__0_5_1.Y.Data) ylabel('Control Input');