me 303 postlab2

Upload: alpgueclue

Post on 05-Oct-2015

230 views

Category:

Documents


0 download

DESCRIPTION

ME 303 Postlab2

TRANSCRIPT

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 Kadayf -15426Alper Gl-14027Alp Gl - 12866on 05.12.2014

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.

RESULTS

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.

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 were all same for these corresponding values. However rms values of control input reached its maximum value when lead-lag compensators 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.

CompensatorRise timeSettling timeOvershoot

ermsemaxurmsumax

Lead/Gain=505.6553e+037.9285e+035.4130e-045.2663 150.46740.9000

Lead/Gain=792.5711e+034.8317e+034.0606e-043.14636.7086 0.53030.9000

Lead/Gain=1005.6559e+037.5933e+0307.8664 150.73720.9000

Lead-lag/A=0.01,C=0.11.7968e+042.2997e+04016.2933 15 0.90000.9000

Lead-lag/A=0.5,C=15.6595e+031.0849e+0413.04686.3998 150.57110.9000

Lead-lag/A=1.5,C=0.55.6582e+037.5791e+030.08916.1239150.57110.9000

DISCUSSION

Burak Kadayf:

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.

Alper Gl:

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 Gl:

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.

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 79figure(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 50figure(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 100figure(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');

% %% LeadLag 0.01/0.1figure(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.5figure(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/1figure(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');

11