ce1 lab report

Upload: steven-yoo

Post on 04-Apr-2018

227 views

Category:

Documents


0 download

TRANSCRIPT

  • 7/30/2019 CE1 Lab Report

    1/13

    Name: Lee Swie Oon

    Student ID: 1091101598

    Lab group: 36

    Title:

    Control System Modeling and Step Response

    Objective:

    (i) To design proportional-integral-derivative (PID) controller for closed loop control.

    (ii) To evaluate the performance of different controllers based on maximum overshoot,rise time, settling time and steady-state error.

    Procedure:

    (a)Open loop system

    1) Firstly, a new m-file is created by clicking File -> New -> M-file in the MATLABcommand window. A MATLAB editor/debugger window pops up. This is to viewthe open loop step response.

    2) In this window, the following codes is typed and saved as file.

    num = 1;den = [1 10 20];step (num, den)

    num is denoted as the numerator polynomial coefficients in s; den is denoted as the denominator polynomial coefficients in s. Step is a MATLAB function.

    3) The m-file is run by clicking Tools -> Run in the MATAB editor/debuggerwindow. The following plot is obtained and shown in figure 1.

    4) The final value is checked using Final Value Theorem.

  • 7/30/2019 CE1 Lab Report

    2/13

    5) From the response obtained, the maximum overshoot, rise time and settling time

    is found. (The steady-state error is calculated based on Final Value Theorem.)

    Figure 1: Open loop system

    (b)Proportional(P) control

    1) The closed loop transfer function of the above system with a proportional controller is

    The derivation of the closed loop transfer function is shown in table 1.

    2)

    Let the proportional constant equal 300 and the m-file is changed to the following:= 300;

    Num=[ ];Den=[1 10 20+ ];t=0:0.01:2;step (num, den, t)

  • 7/30/2019 CE1 Lab Report

    3/13

    3) This m-file is run to obtain the step response plot as shown in figure 2.

    4) The relevant entries in Tables 1 and 2 are completed.

    Figure 2: Proportional control

    (c)Proportional-Derivative(PD) control

    1) The closed loop transfer function of the given system with a PD controller isderived and recorded in Table 2.

    2) Let equal 300 and let equal 10. A new m-file is created, the necessarycodes are typed and the m-file is run and the result is shown in figure 3.

    3) The relevant entries are completed in Tables 1 and 2.

  • 7/30/2019 CE1 Lab Report

    4/13

    Figure 3: Proportional-Derivative control

    (d)Proportional-Integral(PI) control

    1) The closed loop transfer function of the given system with a PI controller isderived and recorded in Table 1.

    2) The Value is reduced to 30, and let equal to 70. A new file is created,the necessary codes are typed and the m-file is run and the results are shownbelow in figure 4. Note that the proportional constant have been reducedbecause the integral term also reduces the rise time and the overshoot isincreased as the proportional term does (double effect).

    3) The relevant entries are completed in Tables 1 and 2.

  • 7/30/2019 CE1 Lab Report

    5/13

    Figure 4: Proportional-Integral control

    (e)Proportional-Integral-Derivative(PID) control

    1) The closed loop transfer function of the given system with a PID controller isderived and recorded in Table 1.

    2) Trial and error method is used to choose the parameters Four sets of values for are tried and

    the closed loop step responses are noted. One parameter is varied at one time,in order to see the effects of changing the parameter. These results are

    recorded in Table 2. The trial and errors are shown in figure 5(i), 5(ii), 5(iii),5(iv), 5(v).

    3) The method is repeated using .

    4) The relevant entries are completed in Tables 1 and 2.

  • 7/30/2019 CE1 Lab Report

    6/13

    Figure 5(i): K P , K I and K D are 1000, 800 and 50 respectively

    Figure 5(ii): K P , K I and K D are 400, 400 and 30 respectively

  • 7/30/2019 CE1 Lab Report

    7/13

    Figure 5(iii): K P , K I and K D are 400, 400 and 50 respectively

    Figure 5(iv): K P , K I and K D are 400, 300 and 50 respectively

  • 7/30/2019 CE1 Lab Report

    8/13

    Figure 5(iv): K P , K I and K D are 350, 300 and 50 respectively

  • 7/30/2019 CE1 Lab Report

    9/13

    Results:

    Table 1

    (a) Open loop Transfer function :

    Final value :

    = =

    =

    No. of finite zeros = 0No. of poles = 2System order= 2

    (b)Proportional(P)control

    Transfer functionDerivation:

    =

    =

    Hence,

    Final value:

    =

    = ( )

    =0.938

    No. of finite zeros = 0No. of poles = 2System order= 2

    (c)Proportional-Derivative (PD)control

    Transfer FunctionDerivation:

    ( )( )

    ( )

    No. of finite zeros = 0No. of poles = 2System order= 2

  • 7/30/2019 CE1 Lab Report

    10/13

    Final value:

    =

    = ( )

    =

    =0.938

    (d)Proportional-

    Integral(PI)control

    Transfer FunctionDerivation:

    =

    =

    = Final value:

    = =

    = =1

    No. of finite zeros = 1No. of poles = 3

    System order= 3

    (e)Proportional-Integral-Derivative(PID)control

    Transfer FunctionDerivation:

    =

    No. of finite zeros = 1No. of poles = 3System order= 3

  • 7/30/2019 CE1 Lab Report

    11/13

    =

    = ( )

    Final value:

    =

    = ( )

    =

    =1

    Table 2

    Controller Maximumovershoot

    Risetime (s)

    Settlingtime (s)

    Steady-stateerror

    (a) Open loop - - - 0 0.885 1.59 0.95(b) P 300 - - 40 0.0728 0.772 0.062(c) PD 300 - 10 15.3 0.0779 0.29 0.062(d) PI 30 70 - 1.26 0.41 0.62 0(e) PID (i) 1000 800 50 6.24 0.0322 0.137 0

    (ii) 400 400 30 1.55 0.199 0.351 0(iii) 400 400 50 0 0.0504 0.495 0(iv) 400 300 50 0 0.0506 0.820 0(v) 350 300 50 0 0.0549 0.831 0

  • 7/30/2019 CE1 Lab Report

    12/13

    Exercise:

    1)

    2) The transfer function for the PD controller is

    The equation in the denominator of the transfer function is used to find dampingfrequency.

    Where a = 1, b=20 and c=320

    The answer obtained is -20 j28.6. Therefore the system is underdamped.

    Controller Plant

    G C

    +

    -

    ueR Y

    R

    +

    -

    Ye

    H

    H

  • 7/30/2019 CE1 Lab Report

    13/13

    3) A system without any controller is an open loop system whereas systems with P, PD, PIand PID controllers are closed loop systems.

    Conclusion:

    Objectives of the experiment are achieved. All the different controllers are evaluated in terms of their performance. Using the PID controller we have made several trial and error using differentvalues of K P, K I and K D and out of the combination of values we have tried with, K P = 400, K I =400 and K D = 50 (as highlighted) gives the best results with zero maximum overshoot, zerosteady state error and the lowest rise time and settling time.