MaSiMS-A-4

37
Modelling and Simulation of Mechatronic Systems Prof.Ing.Petr Noskievič, CSc. Department of Automatic Control and Instrumentation VŠB– Technical University of Ostrava

description

Slide

Transcript of MaSiMS-A-4

  • Modelling and Simulation of Mechatronic Systems

    Prof.Ing.Petr Noskievi, CSc.

    Department of Automatic Control and Instrumentation

    VB Technical University of Ostrava

  • Hydraulic systems

    The modelling od hydraulic systems will be focused on the mathematical description of the properties of the systems, in which the fluid is in the move and in which the compressed fluid works. The creation of the mathematical models is based on the use of the knowledge of fluid mechanics.

    The real fluid is compressible, but less than gas and steam.

    The creation of the mathematical models is based on the application of the two general laws: conservation of mass and conservation of energy.

    The need of the mathematical models of hydraulic systems is by the control of the fluid flow, control of the fluid reserve in the tanks and by the control of the motion of the mechanisms with hydraulic drives.

  • Conservation of mass Continuity equation

    Conservation of the mass

    Two types of the mass changes: Local change of the mass dmt is caused by the compressibility of the fluid, Convective change of the mass dms is caused by the difference of the mass flowing into and out of the unit volume.

    Continuity equation for one dimensional steady flow:

    0=+= ts dmdmdm

    ( ) 0.. =vSdsd

    constvS.vSvS === ..... 222111

    const= .. constvSQ ==

  • Conservation of energy Bernoulli`s equation

    Bernoulli`s equation expresses the conservation energy law by the flowing of the ideal fluid in the gravitational field characterized by the gravitational acceleration. Bernoulli`s equation for the ideal incompressible fluid in the gravitational field and for the steady flow has the following form:

    ..2

    2

    consthgpv =++

    .constWWW hpK =++

    2

    21 v

    mWw KK == hg

    p .=

    hgmWw Ph .==

    consthgp

    gv

    =++ 2

    2

    WK Kinetic energy WP Potential energy due to pressure Wh Potential energy - due to gravity

  • Fluid outlet from the tank

    Fluid outlet from the closed (pressurized) tank

    Zhgvphgvp .2

    .2

    222

    211 ++=++

    h

    p1

    v , p2 2

    S1

    S2

    S

    gvhZ 2.

    22=

    2211 .. vSvS =1

    221

    .SvSv =

    gvgvphgv

    SSp

    2..

    2...

    21 22

    2222

    2

    2

    1

    21

    ++=+

    +

    2

    1

    2

    21

    2

    1

    ..2

    +

    +

    =

    SS

    pphgv

    +

    +=

    +

    +

    =

    2121

    ..2.11

    1

    ..2 pphg

    pphgv

    For the small opening area S2 in comparison with the cross-section area of the tank can be obtained:

    For ideal fluid we can write: 0=

    +=

    21..2 pphgvt

  • Dynamics of the Liquid level in the open tank

    h

    p , S0 1

    p , S0 2v2 ,Q2

    v1

    hgv ..22 =Outlet velocity:

    2211 .. vSvS = dtdhv =1

    hgSdtdhS ..2.. 21 =

    0.21

    2 =+ hgSS

    dtdh

    The liquid level h by the gravitational outflow from the tank is described using the homogenous nonlinear first order differential equation:

    h(t)h01S1

    2gS2

    Q2h(t)

    Block diagram of the mathematical model of the liquid level the systm without inflow

    Atmospheric pressure

  • Outlet from the tank with inlet

    h(t)

    p ,S0 1

    S2p0 v2, Q2

    Q1

    211. QQdtdhS =

    ghSQdtdhS 2.. 211 =

    111

    2 .1.2. QS

    hgSS

    dtdh

    =+

    The steady state for the constant inlet is equal: 1Q

    .

    0=dtdh

    1

    1

    1

    2 .2.SQhg

    SS

    = 22

    21

    2gSQh =

    h(t)h0Q1

    Q2

    S2

    1S1

    2gh(t)

    Because of the existence of the steady state the system has the property called self controllability. (For the constant inflow the level of the liquid is constant).

    The rate of the change of the fluid level can be expressed by the nonlinear differential equation:

    Block diagram of the mathematical model of the liquid level- tank with inlet

  • Control of the liquid level using the variable inlet

    h(t)

    S1

    S2 Q2

    Q1=Q(u)

    hW e uReg

    huhh

    The relay controller with hysteresis can be used for level control. The controller will control the solenoid valve. The flow Q1 is given by the equations for the command value u :

    1max11 == uproQQ 001 == uproQ

    h(t)h0

    Q1hW e u

    Q2

    S2

    1S1

    2gh(t)

    Q1=Q (u)1u

    0eemaxemin

    Closed loop level control using the relay controller

  • Simulation model of the liquid level control

    Liquid level control S1=1%liquid surface m2

    S2=0.00065%cross section area of the outlet pipe KQ=0.01%flow gain m3/s

    g=9.81%m/s2

    s 1

    level h

    S2*sqrt(2*g)

    Outlet flow

    MATLAB Function

    sqrt

    KQ

    Inlet flow

    1/S1

    Liquid surface h e

    Step Relay

    Flow difference

    0 10 20 30 40 50 60 70 80 90 1000.75

    0.8

    0.85

    0.9

    0.95

    1

    1.05

    1.1

    h[m]

    t[s]

    The course of the liquid level Simulation model in Simulink

  • Modelling of the hydraulic drives

    Hydraulic drives the power transmission is realized by the fluid. Hydrodynamic drives x hydrostatic drives Hydrodynamic drives use the kinetic energy of the fluid. Hydrostatic drives use the potential energy of the fluid due to pressure. The hydraulic circuit is a set of the elements needed for the transformation of the energy and their transmission. The basic elements forming the hydraulic circuit are: hydraulic pump, hydraulic cylinder, flow valves, pressure valves, pipelines, hoses etc.

    The transmitted power is given by: pQP = .

  • Description of the hydraulic circuits

    The properties of the hydraulic circuits are described in general by the system of algebraic equations, which we obtain using the generalized Kirchhoff`s laws used in the circuit theory. They have the following form for the hydraulic circuits: I. The sum of the actual flows into and from the node is equal to zero.

    II. The sum of the actual pressure drops around any closed loop is equal to zero. The number of the created linear independent equations must be equal to the number of variables. It is not possible to use both laws on each node and each closed loop, but on the independent nodes and independent loops in the same way as by the description of the electric circuits.

    =

    =n

    iiQ

    1

    0

    =

    =n

    iip

    1

    0

  • Hydraulic lumped elements

    R, R

    H, H

    D, D

    The basic system elements in an engineering system can be divided into two groups: energy storage elements and energy dissipation elements. Fluid resistor R (fluid resistance) Fluid inertor H (fluid inertance, fluid inductance) Fluid capacitor C, (Fluid capacitance) or resistance against the deformation D

    The transmission of the pressure energy is not without losses. The pressure energy of the fluid is changed into the other forms of energy dissipation of the energy, mainly into the thermal energy, kinetic energy and deformation energy.

  • Hydraulic resistance

    nQpR =

    Linear hydraulic resistance n=1

    QpRL

    = QRp L .= [ ] sNmRL 5=

    Laminar flow

    Turbulent flow Nonlinear resistance n=2

    2QpRN

    = 2.QRp N=

    [ ] 28 = sNmRN

    d.vRe =Reynolds number:

    2320ReRe = krit

    kritReRe

    Where v is the velocity of the flow, d is a characteristic dimension (by the pipeline the inner diameter), kinematic viscosity.

  • Hydraulic resistance

    .2v..2

    dlp =Laminar flow

    2..4vdQ

    SQ

    == d.v

    .64Re64

    ==Friction coefficient Flow velocity

    .Qd

    lp 4....128

    = 4....128

    dlvRL =

    4 Re3164,0

    =BTurbulent flow Experimental obtained formula - Blasius

    252

    2

    .....8..

    21...

    2v.. Q

    dl

    SQ

    dl

    dlp

    =

    ==52 ....8dlRN

    =

  • Hydraulic Inductance

    Sp1 p2 x, v, a

    m

    The hydraulic inductance can be derived from the motion equation Newton`s law for the piston of the hydraulic cylinder. The piston and load mass is m:

    ( ) ... 21 Sppdtdvm =

    p

    S

    vp1

    V; m; p2

    Hydraulic inductance the column of the liquid

    Hydraulic Inductance piston and load mass is m dtdv

    SS

    Smp ..=

    dtdQ

    Smp .2=

    2SmH =

    Sl

    SSl

    SmH ... 22

    ===

    dtdQpH =

    Definition of the hydraulic inductance

    [ ] 52

    4 mNs

    mkgH ==

  • Hydraulic Capacitance

    The hydraulic capacitance CH describes the fact that by the change of the pressure - difference p - the fluid changes the volume the difference V.

    VDp = . VpD

    =

    pVCH

    =

    Resistance against the deformation

    Hydraulic capacitance

    VVKp = .

    [ ] 5mND =

    ( )=t

    dQV0

    ( )

    = t

    dQ

    pD

    0

    dtpd

    DQ = .1

    VCp H = .

    K is the bulk modulus.

  • Mathematical models of the elements of the hydraulic circuits

    Hydraulic circuit The hydraulic circuit consists of the bas ic hydraul ic elements: Pump (gear, piston, vane pump), relief valve, control valve proportional valve or servovalve which control the direction and velocity of the motion, hydraulic cylinder, load and moved mass, pipelines, filter and tank.

    u

    x,v

    m

    Pump QHG

    DifferencialCylinder

    Directional Control Valve

    Relief Valve p0

    Filter

    M

    Load Force F SB

    SA

    pA pB

  • Pump

    R = 1GP P

    Qt

    Qt

    QtQs

    Qs

    Qz

    Qz

    p

    Q

    p

    Symbol, resistance circuit and static characteristic of the pump

    GRp p

    =1

    pGQRpQQQQ ptp

    tzts =

    ==

    Q V nt t=

    sin44

    22

    == ppp

    g Dd

    ihd

    V

    Band axis axial piston pump

    The dynamics of the positioning system can be described by the second order system using the differential equation or transfer function:

    HGHGHGHGHG uKyyTyT =++ !!! 2 12)( 2 ++= sTsTKsG

    HGHGHG

    HGHG

    KyuHG HG

    = max

    max

  • Pump

    KHGTHGHG

    yHGy

    KQGQHG

    Hydrogenertor

    uHG ps

    GHG

    1/CHsQ

    Block diagram of the controlled pump

    The linear mathematical model of the pump with the hydraulic capacity CH can be written in the form of the state model:

    sHGHG

    HG

    s

    HG

    HG

    H

    HG

    H

    QG

    HG

    HG

    HGs

    HG

    HG

    QuTK

    pvy

    CG

    CK

    TTpvy

    +

    =

    100

    0

    0

    0

    021

    010

    22

    !!!

  • Hydraulic pipeline

    C

    p i p i+1 Q i

    T - element

    Hi

    R Hi L Hi R Hi L Hi

    Q i+1

    C C

    R Hi L Hi

    - element

    Hi Hi

    Q i p

    I p i+1

    Q i Q i+1

    C

    R Hi L Hi p

    i p I+1

    L - element

    Hi

    Q i p i

    Q i Q i+1

    The structures of the different models of the piece of the pipeline.

    l fc

    nl fc