cotrol systems_final draft_zuni.docx

Upload: zunair-shahid

Post on 04-Jun-2018

222 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/14/2019 Cotrol systems_Final Draft_zuni.docx

    1/43

    Control Systems

    AST304EE

    Lecturer: Qing Lu

    AST304EE Assignment 1

    Student No s.1089378

    19-04-2013

  • 8/14/2019 Cotrol systems_Final Draft_zuni.docx

    2/43

    BSc (HONS) Electrical & Electronic Engineering AST304EE Control Systems

    s1089378 2

    Contents

    Summary: ...................................................................................................................................................... 3

    Introduction: ................................................................................................................................................ 4

    Subject Matter: ............................................................................................................................................ 5

    Task 1: RC First order system .................................................................................................................... 5

    Determining First Order Differential Equation:............................................................................... 5

    Using Differential equation to find system transfer function: ....................................................... 8

    Output response at 10V step input using transfer function:......................................................... 9

    Multisim simulation and comparison with theoretical prediction:.............................................. 10

    Task 2: Solving Differential Equation ................................................................................................ 13

    Transfer function of a thermocouple system:............................................................................... 13

    Matlab simulation with respect to Unit Ramp Input and Discussion:....................................... 15Mathcad simulation and comparison of results and predictions:.............................................. 17

    Task 3: Second Order System: .......................................................................................................... 19

    Determining values of k, , n in standard second order equation for following circuit :

    ............................................................................................................................................................ 19

    Multisim simulation and comparison with theoretical results:.................................................... 22

    Modification for critically damped system, testing and discussion of results: ......................... 24

    Predicting step input response for critically damped system and comparison with test

    results: (MULTISIM) V/S (MATLAB): ............................................................................................ 27Task 4: Close Loop Feedback System: ............................................................................................ 30

    Overall Transfer Function for closed loop feedback system:.................................................... 30

    Overall Transfer Function for Second Order System: ................................................................ 31

    Comparison with standard second order equation and determining key parameters when

    unit input is applied: ......................................................................................................................... 32

    Confirming predictions with simulation: ........................................................................................ 34

    Results: ...................................................................................................................................................... 38

    Conclusion: ................................................................................................................................................ 39

    Bibliography: ............................................................................................................................................. 40

    Appendices: .............................................................................................................................................. 41

    Appendix A: Laplase table: ...................................................................................................................... 41

    Appendix B: Block diagrams .................................................................................................................... 42

  • 8/14/2019 Cotrol systems_Final Draft_zuni.docx

    3/43

    BSc (HONS) Electrical & Electronic Engineering AST304EE Control Systems

    s1089378 3

    Summary:

    This assignment analysis the real world problems and allows the author the freedom to

    play with them. Use of powerful software like Matlab, Multisim has been made available

    to students to back their predictions with suitable calculations or simulations. The

    following report emphasizes how circuits are designed and analyzed in different angles.

    And gives an experience to solve industrial problems where as being self-critical to you.

  • 8/14/2019 Cotrol systems_Final Draft_zuni.docx

    4/43

    BSc (HONS) Electrical & Electronic Engineering AST304EE Control Systems

    s1089378 4

    Introduction:

    This assignment has been into four tasks. Task 1 deals with basic first order RC

    systems and analysis the transient responses with respect to different inputs. Graphical

    expressions are used to define time constants and simulations are performed in

    multisim to back the results.

    Task 2 deals with a general thermocouple, where differential equations are found for the

    system followed by Matlab analysis of the system. Transfer functions are produced and

    simulations are used to plot the results.

    Task 3 with typical second order system where a given system is compared to standard

    second order function. Simulations are done to confirm the prediction using multisim.

    Furthermore circuits are tweaked to perform as critically damped and graphical

    illustrations are shown to prove the predictions and discuss the results.

    Last section of the report looks on the closed loop feedback systems where two

    systems transfer functions are found manually. Their response to step input is recorded

    and compared to normal working using suitable simulation such as Simulink modeling.

  • 8/14/2019 Cotrol systems_Final Draft_zuni.docx

    5/43

    BSc (HONS) Electrical & Electronic Engineering AST304EE Control Systems

    s1089378 5

    Subject Matter:

    1. Task 1: RC First order system

    Figure 1: Typical First order RC circuit

    1.1. Determining First Order Differential Equation:

    Using KirchhoffsVoltage Law (KVL): RISE = DROP

    So: VS = VR+ VC (equation 1)

    Now using Ohms law we know: VR= iR

    And as q = cVCso: VC =

    So: VS= iR + (equation 2)

    As i =so we replace it in (equation 2)

    VS = R+ (equation 3)Now divide the whole (equation 3) by R so it becomes:

    + q = (equation 4)

    V1

    10 V C1

    1F

    R1

    1.0k

    1 2

    0

    VOUTVs

  • 8/14/2019 Cotrol systems_Final Draft_zuni.docx

    6/43

    BSc (HONS) Electrical & Electronic Engineering AST304EE Control Systems

    s1089378 6

    Integration factor of (equation 4) is:

    Integration factor: Multiply the integrating factor to (equation 4)

    + = (equation 5)Reducing (equation 5):

    (Equation 6)Now integrate both sides with respect to (t);

    = where is integration constant (equation 7)Divide (equation 7) by so:

    [

    ] Now: q = VsC +

    At initial condition when (t) =0

    q (0) =0= VsC + where so:

    = - VsC hence equation becomes:

    q= VsC (1- )This equation can be further solved to get current:

  • 8/14/2019 Cotrol systems_Final Draft_zuni.docx

    7/43

    BSc (HONS) Electrical & Electronic Engineering AST304EE Control Systems

    s1089378 7

    As i =

    The expression would be: i (t) = NOTE: As time constant ( ) =RC so after 5( ) the current will be =0 in the above

    circuit which can be proved by solving the above equation hence the equation derived is

    correct.

  • 8/14/2019 Cotrol systems_Final Draft_zuni.docx

    8/43

    BSc (HONS) Electrical & Electronic Engineering AST304EE Control Systems

    s1089378 8

    1.2. Using Differential equation to find system transfer function:

    Using KirchhoffsVoltage Law (KVL): RISE = DROP

    So: Vin (t) = VR(t)+ Vo(t) (equation 1)

    Now using Ohms law we know: VR(t)= i(t)R

    So: Vin(t) = i(t)R + Vo(t) (equation 2)

    As i = and q = CVo,then i(t) = C so we replace it in (equation 2)

    Vin(t) = + Vo(t) (equation 3)Hence transfer function will be:

    (Using Laplace transform for step function)

    Vin(s)= CR(s)Vo(s) + Vo(s)

    Vin(s)= Vo(s)[CR(s)+1]

    = (Transfer funct ion of the system)As time constant ( ) =RC hence the equation will become:

    = (Final transfer Func tion )

  • 8/14/2019 Cotrol systems_Final Draft_zuni.docx

    9/43

    BSc (HONS) Electrical & Electronic Engineering AST304EE Control Systems

    s1089378 9

    1.3. Output response at 10V step input using transfer function:

    Step Input: 10V

    So Vin(s)=

    Using the expression defined i.e. = so:

    Matlab and multisim simulation are shown below to confirm the results.

  • 8/14/2019 Cotrol systems_Final Draft_zuni.docx

    10/43

    BSc (HONS) Electrical & Electronic Engineering AST304EE Control Systems

    s1089378

    10

    1.4. Multisim simulation and comparison with theoretical prediction:

    Figure 1 as shown above was used to analyses the first order RC circuit and itsproperties.

    Figure 2: transient analyses of RC circuit with 10V step input

    Figure 2 above shows the transient response of a typical RC circuit to a step input

    where the V(1) shows the step input and V(2) describes the transient response due to

    capacitive circuit characteristics.

    V1

    10 V C1

    1F

    R1

    1.0k

    1 2

    0

  • 8/14/2019 Cotrol systems_Final Draft_zuni.docx

    11/43

    BSc (HONS) Electrical & Electronic Engineering AST304EE Control Systems

    s1089378

    11

    As defined that ( ) =time constant and after 5 the circuit value = 0 or constant to the

    step voltage. Figure below shows the simulation of predicted results.

    Figure 3: transient nalysis at 63% of V(1)

    As we know that ( ) =time constant =63% of input value hence it can be seen that

    =1ms in this case and figure below shows that after five consecutive time constants i.e.

    = 5ms the value becomes 10V hence the theoretical prediction is proved through

    simulation.

  • 8/14/2019 Cotrol systems_Final Draft_zuni.docx

    12/43

    BSc (HONS) Electrical & Electronic Engineering AST304EE Control Systems

    s1089378

    12

    Figure 4: V(2) after five time constants

  • 8/14/2019 Cotrol systems_Final Draft_zuni.docx

    13/43

    BSc (HONS) Electrical & Electronic Engineering AST304EE Control Systems

    s1089378

    13

    2. Task 2: Solving Differential Equation

    2.1. Transfer function of a thermocouple system:

    Differential equation of the system: = k ( TmT1)Where k = constant, k =

    =

    , Time constantUsing Laplace transforms table the transfer function of the above defined differential

    equation would be:

    = k (equation 1) = =

    Taking as common so: (equation 2)Dividing both numerator and denominator by k so (equation 2) becomes:

    (equation 3)

  • 8/14/2019 Cotrol systems_Final Draft_zuni.docx

    14/43

  • 8/14/2019 Cotrol systems_Final Draft_zuni.docx

    15/43

    BSc (HONS) Electrical & Electronic Engineering AST304EE Control Systems

    s1089378

    15

    2.2. Matlab simulation with respect to Unit Ramp Input and Discussion:

    Simulink model drawn in Matlab is shown below followed by graphical illustration

    showing the results:

    Figure 5: Mat lab Simulink model for the transfer function with unit ramp input

    This Simulink model was designed in Matlab where the input was a unit ramp and the

    output result was simulated through scope shown in the graph below.

    The green line in the graph below shows the normal response of the circuit with a unit

    ramp input excluding any transfer function. When a transfer function is added to the

    existing system the graph shape changes due to the transient nature of the circuit and it

    follows the pink curved line which is typical for second order systems. Hence the

    simulation is similar to the prediction thus justified.

  • 8/14/2019 Cotrol systems_Final Draft_zuni.docx

    16/43

    BSc (HONS) Electrical & Electronic Engineering AST304EE Control Systems

    s1089378

    16

    Figure 6: graph showing variation of in unit ramp manner

  • 8/14/2019 Cotrol systems_Final Draft_zuni.docx

    17/43

    BSc (HONS) Electrical & Electronic Engineering AST304EE Control Systems

    s1089378

    17

    2.3. Mathcad simulation and comparison of results and predictions:

    (Final Transfer Function)

    For unit ramp Laplace transform is: (using laplase transformation table)So: Now: putting this equation into Mathcad the inverse Laplace can be found which comes

    out to be:

    (T1 normal function in time domain)

    Figure below shows the graph drawn from

    which is represented by y(t) against time

    (t).

    1

    s 1( ) s2

    invlaplace t e t

    1

    y t( ) t e t

    1

  • 8/14/2019 Cotrol systems_Final Draft_zuni.docx

    18/43

    BSc (HONS) Electrical & Electronic Engineering AST304EE Control Systems

    s1089378

    18

    0 2 4 6 8 100

    2

    4

    6

    8

    10

    y t( )

    t

    Figure 7: graph of y(t) vs. t in Mathcad for time domain function

    When compared, the simulation results in the last section and the current graph is

    exactly the same which justifies the results. The exponential rise of both the graphs is

    the prove for the right solution to the problem.

  • 8/14/2019 Cotrol systems_Final Draft_zuni.docx

    19/43

    BSc (HONS) Electrical & Electronic Engineering AST304EE Control Systems

    s1089378

    19

    3. Task 3: Second Order System:

    3.1. Determining values of k,,nin standard second order

    equation for following circuit :

    Figure 8: standard RLC circuit

    Standard second order equation:

    Where;

    Kis system gain,

    is system damping factor,

    is the undamped natural frequency.AndYo, Xoare output and input signals.

    Applying KirchhoffsVoltage Law (KVL) on the above circuit:

  • 8/14/2019 Cotrol systems_Final Draft_zuni.docx

    20/43

    BSc (HONS) Electrical & Electronic Engineering AST304EE Control Systems

    s1089378

    20

    (equation1)Now:

    Note:

    Put the values in (equation 1),it becomes:

    (equation 2)Divide (equation 2) by LC:

    (equation 3)Using Laplace Transform (equation 3) becomes: Taking as common equation becomes:

    [ ]

    Final transfer function comes out to be:

    (equation 4)

  • 8/14/2019 Cotrol systems_Final Draft_zuni.docx

    21/43

  • 8/14/2019 Cotrol systems_Final Draft_zuni.docx

    22/43

    BSc (HONS) Electrical & Electronic Engineering AST304EE Control Systems

    s1089378

    22

    3.2. Multisim simulation and comparison with theoretical results:

    Figure 9: Multisim assembly of RLC circuit with components values

    Figure above shows the wiring diagram assembled in Multisim with values associated

    with each and every component to analyses a suitable simulation.it is predicted thatwhen the switch (S1) is turned ON, the capacitor will start charging until it reaches the

    max value of its charging capacity which here is 10V as given through (V1).as the

    nature of the circuit is capacitive so it will observe a transient response until it reaches

    the same value as step input which should be equal to five time constants 5( ).

    Figure below shows the results of the simulation in Multisim Transient Analysis.it can be

    observed that the channel B which the voltage through capacitor rises when switch is

    turned and capacitor charges charging. Maintaining transient response it reaches thevalue of 10V and follows the same unit step voltage as it cannot be charged more.

    Hence prediction is proved and simulation analysis proves the results expected.

    V1

    10 V

    C1

    1mF

    L1

    100mH

    R1

    1

    1

    XSC1

    A B

    Ext Trig+

    +

    _

    _ + _

    S1

    Key = A

    4

    2

    R2

    1.0k

    0

    3

  • 8/14/2019 Cotrol systems_Final Draft_zuni.docx

    23/43

    BSc (HONS) Electrical & Electronic Engineering AST304EE Control Systems

    s1089378

    23

    Figure 10 : transient analysis of RLC circuit shown above.

  • 8/14/2019 Cotrol systems_Final Draft_zuni.docx

    24/43

    BSc (HONS) Electrical & Electronic Engineering AST304EE Control Systems

    s1089378

    24

    3.3. Modification for critically damped system, testing and discussion of

    results:

    The equation proved earlier is concluded below :

    k = gainwhich is = 1 in this case as found by comparing the two equations.

    Numerical value can be found using specific values for L,C as calculatedfurther in the report.

    Now for critically damped system the value for which can be used to calculatethe resistance (R) value which can be used for simulation purposes to prove thetheoretical prediction of results.

    So using:

    (equation 1)

    (for critical damping)

    Replacing values of and in (equation 1) (equation 2)Put values of L,C in (equation 2) we get:

    R = 60 would be used in the modified multisim circuit to analyse critical damping.thefigures below the modified assemble and the simulation results for critically damped

    circuit.

  • 8/14/2019 Cotrol systems_Final Draft_zuni.docx

    25/43

    BSc (HONS) Electrical & Electronic Engineering AST304EE Control Systems

    s1089378

    25

    Figure11: Multisim circuit for critical damping using R = 60

    Figure 12: Critically Damped Circuit Simulation

    V1

    10 V

    C1

    1mF

    L1

    100mH

    R1

    60

    1

    XSC1

    A B

    Ext Trig

    +

    +

    _

    _ + _

    S1

    Key = A

    4

    2

    R2

    1.0k

    0

    3

  • 8/14/2019 Cotrol systems_Final Draft_zuni.docx

    26/43

    BSc (HONS) Electrical & Electronic Engineering AST304EE Control Systems

    s1089378

    26

    As predicted through theoretical calculation that when we use R = 60 the simulationshows a critically damped behavior which means that the component which is capacitor

    in this case takes minimum possible time to reach the maximum voltage value i.e. 10V.

    The switch is turned ON at T(s) = 200 ms and it takes capacitor 200 ms to reach the

    peak value and it continues with the step voltage as it becomes fully charged and

    cannot be charged more.

  • 8/14/2019 Cotrol systems_Final Draft_zuni.docx

    27/43

    BSc (HONS) Electrical & Electronic Engineering AST304EE Control Systems

    s1089378

    27

    3.4. Predicting step input response for critically damped system and

    comparison with test results: (MULTISIM) V/S (MATLAB):

    Multisim Analysis:

    Figure 13: RLC circuit wiring diagram using step input

    The figure above was used to analyses circuit response to step input for a critically

    damped circuit. For this the function of Device Parameter Sweep was used in multisim

    simulation software to analyses the response of the circuit to a step input with respect to

    different values of resistors. Results are illustrated in the figure below.

    C1

    1F

    L1

    10mH

    R1

    40

    1

    XSC1

    A B

    Ext Trig+

    +

    _

    _ + _

    S1

    Key = A

    4

    V2

    1ms

    2

    0

    3

  • 8/14/2019 Cotrol systems_Final Draft_zuni.docx

    28/43

  • 8/14/2019 Cotrol systems_Final Draft_zuni.docx

    29/43

    BSc (HONS) Electrical & Electronic Engineering AST304EE Control Systems

    s1089378

    29

    Mathcad Analysis:

    I s( ) 1

    s

    O s( ) H s( ) I s( ) simplify

    1

    s s 4( )2

    O s( ) parfrac 1

    16 s

    1

    16 s 4( )

    1

    4 s 4( )2

    O s( ) invlaplace 1

    16

    t e 4 t

    4

    e 4 t

    16

    O t( ) 1

    16

    t e 4 t

    4

    e

    O1 t( )1

    16

    O2 t( ) t

    exp 4 t( )

    4

    O3 t( )1

    16exp 4 t( )

    0 0.375 0.75 1.125 1.5 1.875 2.25 2.625 3

    0.013

    0.025

    0.038

    0.05

    0.063

    0.075

    0.088

    0.1

    O t( )

    O1 t( )

    O2 t( )

    O3 t( )

    t

  • 8/14/2019 Cotrol systems_Final Draft_zuni.docx

    30/43

    BSc (HONS) Electrical & Electronic Engineering AST304EE Control Systems

    s1089378

    30

    4. Task 4: Close Loop Feedback System:

    4.1. Overall Transfer Function for closed loop feedback system:

    Figure11: closed loop negative feedback system

    Overall transfer function would be:

  • 8/14/2019 Cotrol systems_Final Draft_zuni.docx

    31/43

    BSc (HONS) Electrical & Electronic Engineering AST304EE Control Systems

    s1089378

    31

    4.2. Overall Transfer Function for Second Order System:

    Figure 12: second order system

    Transfer function for the system shown in figure above is calculated as follows:

    Taking common from (equation 2) we get: Now substitute the values of in (equation 3): [

    ] [

    ]

    Putting into main equation we get:

  • 8/14/2019 Cotrol systems_Final Draft_zuni.docx

    32/43

    BSc (HONS) Electrical & Electronic Engineering AST304EE Control Systems

    s1089378

    32

    of numerator deducts in the denominator so the overall function for thesystem would be:

    4.3. Comparison with standard second order equation and determining key

    parameters when unit input is applied:

    Standard second order equation:

    Overall Transfer function:

    Comparing the two equations the key parameters found are as follows:

    Now we get:

    From (Equation 4) we get:

  • 8/14/2019 Cotrol systems_Final Draft_zuni.docx

    33/43

    BSc (HONS) Electrical & Electronic Engineering AST304EE Control Systems

    s1089378

    33

    Replacing value of in (Equation 2) we get:

    So Replacing value of in (Equation 3) we get:

  • 8/14/2019 Cotrol systems_Final Draft_zuni.docx

    34/43

    BSc (HONS) Electrical & Electronic Engineering AST304EE Control Systems

    s1089378

    34

    4.4. Confirming predictions with simulation:

    Figure13: Simulink model with unit step input

    The figure above shows the simulink model designed for transfer function analysis.the

    scope results are shown in the graph below which shows an initial rise in the voltage as

    the circuit charghes and the value keeps on decreasing following a transient path

    showing the damping in the circuit.

  • 8/14/2019 Cotrol systems_Final Draft_zuni.docx

    35/43

    BSc (HONS) Electrical & Electronic Engineering AST304EE Control Systems

    s1089378

    35

    Figure: scope results of simulink model

    In the following set of illustrations a multiplex is used to compare the response of the

    circuit with normal step input vs step input through the transfer function.figure below

    shows the simulink model followed by its graphical analysis where the pinl line shows

    the normal step input and the blue curve is the response of the circuit transfer function

    to step input.

    Figure14: Simulink model with unit step using multiplex

  • 8/14/2019 Cotrol systems_Final Draft_zuni.docx

    36/43

    BSc (HONS) Electrical & Electronic Engineering AST304EE Control Systems

    s1089378

    36

    Figure15: Simulation with unit step and transfer function using multiplex

    In this last set of analysis the overall transfer function calculated manually in part 2 wasused to analyses the response of the circuit. The graph below confirms the predictions

    as the graphical illustration is exactly the same as shown in the last graphical analysis.

    Figure16: Overall transfer function

  • 8/14/2019 Cotrol systems_Final Draft_zuni.docx

    37/43

    BSc (HONS) Electrical & Electronic Engineering AST304EE Control Systems

    s1089378

    37

    Figure17: Simulation of overall transfer function

  • 8/14/2019 Cotrol systems_Final Draft_zuni.docx

    38/43

    BSc (HONS) Electrical & Electronic Engineering AST304EE Control Systems

    s1089378

    38

    5. Results:

    In this assignment author looked over the first order systems followed by its response

    which was achieved by simulations using Multisim software. Second order systems

    were analyzed and compared with theoretical predictions with the help of powerful

    mathematical sofwares such as Matlab and Mathcad. Thermocouple system and closed

    loop feedback system were analyzed lastly, first with manual calculations and

    predictions were counter checked building Simulink models and circuits were made to

    perform different functions to support the findings in order to accomplish results basis

    on predictions.

  • 8/14/2019 Cotrol systems_Final Draft_zuni.docx

    39/43

    BSc (HONS) Electrical & Electronic Engineering AST304EE Control Systems

    s1089378

    39

    6. Conclusion:

    The assignment was a healthy exercise to get used to the electrical, mathematical and

    simulation softwares and apply them to general applications. Building circuits in multisim

    and using them to do different things while comparing them with theoretical predictions

    was a tough task. Mathcad and Matlab were used to perform all the calculations and

    graphical analysis were done to back every prediction which gave an idea to the author

    regarding real world problems and countering strategies.

    Real world problems were assigned as a task for this assignment which was interesting

    to solve and self-analysis of predictions helped to justify the finding was quite an

    amazing experience.

  • 8/14/2019 Cotrol systems_Final Draft_zuni.docx

    40/43

  • 8/14/2019 Cotrol systems_Final Draft_zuni.docx

    41/43

    BSc (HONS) Electrical & Electronic Engineering AST304EE Control Systems

    s1089378

    41

    8. Appendices:

    8.1. Appendix A: Laplase table:

  • 8/14/2019 Cotrol systems_Final Draft_zuni.docx

    42/43

  • 8/14/2019 Cotrol systems_Final Draft_zuni.docx

    43/43