Вы находитесь на странице: 1из 9

FACULTY OF ENGINEERING

LAB SHEET

CONTROL THEORY EEL 2216 TRIMESTER 3 (2013/2014)

CT1 - PID Controller Design CT2 - Frequency Response An lysis

EEL221! Control T"eory

CT1# PID Controller Design


1$ %&'ecti(es
(i) (ii) To design proportional-integral-derivative (PID) controller for closed loop control. To evaluate the performance of different controllers based on maximum overshoot, rise time, settling time and steady-state error.

2$ Intro)uction
In this lab, you ill learn the characteristics of the each of the proportional (P), integral (I) and derivative (D) control terms, and ho to use these terms to obtain a desired response. !onsider the follo ing unity feedbac" system# R , $igure % Plant# & system to be controlled !ontroller# Provides the excitation for the plant' designed to control the overall system behavior The three-term PID controller The transfer function of the PID controller is KI KDs( + KPs + KI GC ( s ) = K P + + KDs = s s here KP ) proportional constant' KI ) integral constant' and KD ) derivative constant. The P term, I term and D term are given by P term# KP K I term# I s D term# KDs $irst, let*s ta"e a loo" at ho the PID controller or"s in a closed loop system using $igure %. The variable e ) (R + Y) represents the trac"ing error, hich is the difference bet een the desired input value R and the actual output Y. This error signal e ill be sent to the PID controller, and the controller computes both the derivative and the integral of this error signal. The control signal u produced by the controller is given by
u = K p e + K I e dt + K D de dt

!ontroller

Plant

The signal u ill form the input to the plant, producing the output Y. The output Y ill be feedbac" (via a sensor) to allo the error signal e to be recalculated. The controller ta"es this ne error signal and computes its derivative and its integral again. This process is continuous and goes on and on. The ob-ective is to minimise e. In the ideal case, e ) . and Y ) R. The characteristics of P, I and D controllers & proportional controller ill have the effect of reducing the rise time and ill reduce, but never eliminate, the steady-state error. &n integral controller ill have the effect of eliminating the steady-state error, but it may ma"e the transient response orse. & derivative controller ill have the effect of increasing the stability of the system, reducing the overshoot, and improving the transient response. The gener l effects of increasing each of KP, KI and KD on a closed loop system are summarised in Table %. Table % CL%SED L%%P %+ERSH%%T RESP%*SE KP Increase KI Increase KD Decrease RISE TI,E Decrease Decrease /mall !hange SETTLI*- TI,E /mall !hange Increase Decrease STEAD.-STATE ERR%R Decrease 0liminate /mall !hange

1ote that these correlations may not be exactly accurate, because the effects of KP, KI and KD are dependent on one another. !hanging one of these variables can change the effects of the other t o. $or this reason, Table % should only be used as a reference hen you are determining the values for KP, KI and KD. Time domain performance measures , /i0u0 o(ers"oot# 2et ymax denote the maximum value of y(t) and yss be the steady-state value of y(t) and ymax yss. The maximum overshoot of y(t) is defined as 3aximum overshoot ) ymax - yss Rise ti0e# The rise time is defined as the time re4uired for the step response to rise from %.5 to 6.5 of its final value. Settling ti0e# The settling time is defined as the time re4uired for the step response to reach and stay ithin a specified percentage (75) of its final value.

1$ E/ 0ple syste0
/uppose e have a simple mass, spring, and damper system as in $igure (. b x M k $igure ( The physical e4uation of this system is F

Ta"ing the 2aplace transform and assuming 8ero initial conditions,


Ms ( X ( s ) + bsX ( s ) + kX ( s ) = F ( s )

M x + b x + kx = F

The transfer function bet een the displacement X(s) and the input F(s) then becomes X (s) % = ( F ( s ) Ms + bs + k 2et M ) %"g b ) %. 1.s9m k ) (. 19m F(s) ) %9s F is a step input of magnitude %
X ( s) % = ( F ( s ) s + %.s + (.

/ubstituting these values into the above transfer function gives

The ob-ective of this example is to tune KP, KI and KD to obtain $ast rise time and settling time 3inimum overshoot 1o steady-state error

2$ Proce)ures
2$1 %pen loop syste0 (i) To vie the open loop step response, first create a ne m-file by clic"ing $ile 1e 3-file in the 3&T2&: command indo . & 3&T2&: editor9debugger indo ill pop up. (ii) In this indo , type the follo ing codes and save the file. num)%' den);% %. (.<' step(num,den) =ere, >num? denotes the numerator polynomial coefficients in @sA and >den? denotes the denominator polynomial coefficients in @sA. >step? is a 3&T2&: function. To find out more about this function, type >help step? at the 3&T2&: command prompt. (iii) Bun the m-file by clic"ing Tools Bun in the 3&T2&: editor9debugger indo . Cou should get the plot sho n in $igure D.
Step Response
From: U(1) 0.05 0.045 0.04 0.035

Amplitude

0.03 To: Y(1) 0.025 0.02 0.015 0.01 0.005 0 0 0.5 1 1.5 2

Time (sec.)

$igure D (iv) !hec" the final value using $inal Ealue Theorem. &n example is sho n in Table (. (v) $rom the response obtained, find the maximum overshoot, rise time and settling time. !omplete the relevant parts in Table D. (The steady-state error should be calculated based on $inal Ealue Theorem.) 2$2 Proportion l control (i) The closed loop transfer function of the above system ith a proportional controller is

Kp X ( s) = ( F ( s ) s + %.s + ( (. + K p )

(ii)

/ho the derivation of the closed loop transfer function in Table (. 2et the proportional constant KP e4ual D.. and change the m-file to the follo ing# Fp)D..' num);Fp<' den);% %. (.,Fp<' t).#...%#(' step(num,den,t)

(iii) Bun this m-file to obtain the step response plot. The plot should sho that the proportional controller reduces the rise time, the settling time and the steady-state error, but increases the overshoot. (iv) !omplete the relevant entries in Tables ( and D. 2$1 Proportion l-Deri( ti(e control (i) Derive the closed loop transfer function of the given system ith a PD controller and record this in Table (. (ii) 2et KP e4ual D.. as before and let KD e4ual %.. !reate a ne m-file, type the necessary codes and run the m-file. (iii) !omplete the relevant entries in Tables ( and D. 2$2 Proportion l-Integr l control (i) Derive the closed loop transfer function of the given system ith a PI controller and record this in Table (. (ii) Beduce KP to D., and let KI equal 70. Create a new m-file, type the necessary

(iii)

codes and run the m-file. Note that we have reduced the proportional constant because the integral term also reduces the rise time and increases the overshoot as the proportional term does (double effect . Complete the relevant entries in !ables " and #.

2$3 Proportion l-Integr l-Deri( ti(e control (i) Derive the closed loop transfer function of the given system ith a PID controller and record this in Table (. (ii) There are several methods to choose the parameters KP, KI and KD. Gne of the methods is by trial and error using Table % as a guide. Try at least H sets of values for KP, KI and KD and note the closed loop step responses. Ihen choosing the values of KP, KI and KD, try to vary one parameter at a time, in order to see the effects of changing the parameter. Becord these in Table D. (iii) Bepeat using KP ) D7., KI ) D.. and KD $ %0. (iv) Complete the relevant entries in !ables " and #.

Table ( H.% Gpen loop Transfer function# X ( s) % = ( F ( s ) s + %.s + (. $inal value# lim x (t ) = lim sX ( s )
t > s >.

1o. of finite 8eros ) . 1o. of poles ) ( /ystem order ) (

% % % = lim s ( = s >. s s + %.s + (. (.

H.( P control

Transfer function#

1o. of finite 8eros ) 1o. of poles ) /ystem order )

$inal value#

H.D PD control

Transfer function#

1o. of finite 8eros ) 1o. of poles ) /ystem order )

$inal value#

H.H PI control

Transfer function#

1o. of finite 8eros ) 1o. of poles ) /ystem order )

$inal value#

H.7 PID control Transfer function#

1o. of finite 8eros ) 1o. of poles ) /ystem order )

$inal value#

Table D !ontroller H.% Gpen loop H.( P H.D PD H.H PI H.7 PID KP D.. D.. D. KI J.
KD

3aximum overshoot

Bise time (s)

/ettling time (s)

/teadystate error

%. -

D7.

D..

7.

3$ E/ercises
Befer to the mar"ing sheet.

!$ Discussion
In this lab, you have learned ho to design a PID controller for a given system. Cou have also seen the effects of varying each of the P, I and D terms on the controller performance. In general, hen designing a PID controller for a given system, follo the steps sho n belo obtain a desired response# %. Gbtain an open loop response and determine hat needs to be improved. (. &dd a proportional term to improve the rise time. D. &dd a derivative term to improve the overshoot. H. &dd an integral term to eliminate the steady-state error. 7. &d-ust each of KP, KI and KD until you obtain a desired overall response. to

Please &eep in mind that you do not need to implement all three terms
(proportional, derivative and integral into a single system. 'or e(ample, if a )* controller gives a sufficiently good response (li&e in the above e(ample , then you do not need to implement a derivative term in the system. +eep the controller as simple as possible.

4$ Furt"er In5or0 tion Reg r)ing t"is L &or tory


%. There ill be an on-the-spot assessment. 3ar"s ill be given based on the or" done such as your graphs (sho n on the screen) and tabulated results, as ell as your understanding of the related theories. There is no need to print your graphs. (. There is no laboratory report re4uired for this experiment. There ill be a separate lab design pro-ect. Please chec" any announcement on 332/ regarding this. D. If you ish to save your graph, you can clic" $ile /ave and save it as a .fig file. If you ish to export it into Iord, then you should clic" $ile 0xport and save it as a .emf file. Cou can insert this graph from Iord by clic"ing Insert Picture $rom $ile and then selecting the filename.

L & Assess0ent#

Gn-spot assessment (H.5). 0xperiment results (K.5).

Вам также может понравиться