6
Abdul Radhi Azli bin Ali A137221 Assignment1 KZ4064 1. Find The Differential Equation of Flush System Block Diagram of Simple Flush System Rv = resistance of valve Rp = resistance of pipe C = area of tank/capacitance Water Inlet (Valve) Water Storage (Flush Tank) Level Sensor (Float Ball) - H (actual) H (desired) Rv R/1+RCs 1 - H (actual) H (desired)

Kawalan Berkomputer

Embed Size (px)

DESCRIPTION

Differential Equation from the data

Citation preview

  • Abdul Radhi Azli bin Ali A137221 Assignment1 KZ4064

    1. Find The Differential Equation of Flush System

    Block Diagram of Simple Flush System

    Rv = resistance of valve

    Rp = resistance of pipe

    C = area of tank/capacitance

    Water Inlet (Valve)

    Water Storage (Flush Tank)

    Level Sensor (Float Ball)

    - H (actual)

    H (desired)

    Rv R/1+RCs

    1

    - H (actual)

    H (desired)

    Radhi AliRectangle

    Radhi AliPencil

  • Transfer Function representation

    State Space representation

    [X] = [1+

    ] [X] + [1] [Hdesired]

    Output

    [Y] = [

    ] [X]

    For this example of flush control system, we used

    Capacitance of tank (C) : 0.2 m2

    Height of tank (H) : 0.4 m

    Width of tank (W) : 0.5 m

    Flow rate (Q) : 0.2 m3/s

    Resistance of valve (Rv) : 5 s/m3

    Resistance of pipe (Rp) : 0.2 s/m2

    After we calculate all the value, then we got the transfer function as below:

    RvRp

    1++

    H (desired) H (actual)

    10

    0.4+11

    H (actual) H (desired)

  • 2. Change from S plane to Z plane

    Using sys_d = c2d (sys, Tz, zoh) command, the discrete transfer function obtained.

  • 3. Find the input output data.

    Using Simulink, create a model based on the plant that have been made, using discrete-time transfer

    function.

    Input Output

  • 4. Checking the value of input/output data then transfer it into Excel Workbook.

    Load the data into Matlab and remove it timestamp

    Save input/output variables into Excel file.

    Rearrange the input/output variable into table of y(k),y(k-1) and u(k-1).

  • 5. Import back data into Matlab and find the value of a and b.

    6. Find the difference equation of the plant and its transfer function using hand calculation.

    y(k) = a1y(k-1) + b1u(k-1)

    a1=0.06393 ; b1=0.8510

    y(k) = 0.06393 y(k-1) + 0.851 u(k-1) difference equation

    Y(z) = 0.06393z-1 Y(z) + 0.851z-1 U(z)

    Y(z) - 0.06393z-1 Y(z) = 0.851z-1 U(z)

    Y(z)/U(z) = 0.851z-1/(1-0.06393z-1)

    Y(z)/U(z) = 0.851/(z-0.06393) transfer function