Аналитические и имитационные модели: Учебное пособие

  • Published on
    14-Dec-2016

  • View
    230

  • Download
    10

Embed Size (px)

Transcript

  • .. H .. ..

    - ( ) , ( 210200

    ( )).

    2007

  • 2

    518.5.001.57(075.8) .., .. , ... -

    : . - : - , 2007. - 310 .

    ISBN 978-5-8327-0268-1 c p c

    , x p cc, . . . 8. . 30. .: 22 .

    .., -. . , , () , . ., -. . , , . ISBN 978-5-8327-0268-1

    , 2007 .., ..,

    .., 2007

  • 3

    H

    H... 6 1. ...... 9

    1.1. .. 9 1.2. . 18 2. ... 24 2.1. . 24 2.2. . 29 2.3. ..... 33 2.4. .. 38 2.5. . 40 3. ... 46 3.1. .. 46 3.2. .. 53 3.3. . 55 4. .... 59 4.1. .... 59 4.2. . 60 4.3. .... 69 4.4. .. 78 4.5. .. 83 4.6. .. 93 5. . 106 5.1. .. 106 5.2. . 111 5.3. .. 120

  • 4

    6. ... 132 6.1. ..... 132 6.2. 136 6.3. ..... 138

    7. ..... 147 7.1. ....... 147 7.2. ...... 151 7.3. ...... 153 7.4. ........ 156 7.5. - --..... 158 7.6. ...... 162 7.7. . 184 7.8. ... 190 7.9. . 211 8. P PCC P CC.. 221 8.1. p p... 221 8.2. p cp px p cx cc... 226

    9. UML... 229 9.1. ... 229 9.2. ... 231 9.3. . 238

  • 5

    9.4. . 241 9.5. 249 9.6. UML. 255 9.7. . 258 9.8. .. 261 9.9. 267 9.10. ... 278

    10. - .. 282 10.1. .. 282 10.2. 295 10.3. 299 10.4. . 303 308

  • 6

    , , . , , .

    , , . , - . . , .. , . [1, 2]. - ,

    , , , [2, 3].

  • 7

    . - , , . , , , .

    , , Matlab-Simulink-Stateflow, UML, Simulink, Stateflow, Model Vision Studium, Modelia, AnyLogi .

    - , Unified Modeling Language (UML) [4].

    .

    . , . : ; ; ; .

  • 8

    . , , . . , , . . , . , , . , . . cp px p . UML, - . [4].

  • 9

    1.

    1.1.

    1.1.1. . , , . . , , , . , .

    , .. , . (modulus (.) - ) - - [1]. , -. . ,

  • 10

    , .

    , . . , , .

    . , , (), . .

    . .

    . , . , .

    . , ,

  • 11

    . . , .

    : - ; -

    ; - ;

    ; - ; -

    ; - ; - ; -

    ; - ; - ; - ; - .

    - , , , . , .. , - .

    .

  • 12

    : , , .

    , , .

    . , . , , .

    . , - .

    , , , , .

  • 13

    . , . , . , . .

    . , . H (). Z, . , . 1.1, , Y, F - , .

    X Y

    F

    Z

    . 1.1

    1.1.2. .

    [1,2,3].

  • 14

    , () Y:

    Y=W(), (1.1) W . W(.)

    ( , , , ..). W , . (t) Y(t). ().

    , .. , , , . , . : . - ,

    , . , .

  • 15

    - , , .. .

    , .

    , , - . :

    - , ;

    - , , ;

    - , , ( ..). ,

    , , . ,

    W(t) , .

  • 16

    () . . . 1.2 .

    t1t

    t

    t2 t3 t4 t5 t6 t7

    t1t

    t

    x(t)

    y(t)

    t2 t3 t4 t5 t6 t7

    x(t)

    y(t)

    . 1.2

    y(t) ti (ti) t.

  • 17

    ( ) , .

    ( ) . ,

    W y(t)=W(,t).

    ,

    Y=W(Z,t,t-1,,t-k), (1.2) t-i=(t-i) - t-i. . ,

    - Y=W(,Z,), ={1,2,,k} - . , ,

    (, ), (, ).

    , . , ,

  • 18

    .yC)x(WC)xC(Wm

    1i

    m

    1iiiii

    m

    1iii ==

    = == (1.3)

    Y=W. (1.3) , .

    , . : , ( ), , - . ,

    , .

    - . .

    1.2.

    ,

    tT zZ .

    : -

    ( ); -

    ( );

  • 19

    - ( ).

    , , , , .

    x ={1,2,,m}, ii,, ( m,1i = ), i - . =12m , x . =L(t),

    t x , L(t). y Y -

    . , tT, )t(y . y y1,y2,,yr, , yjYj, ( r,1j = ), Yj - , Y=Y1Y2Yr . Y=M(t).

    ( ).

    . z zkZk, ( n,1k = ), Zk - , Z Z=Z1Z2Zn.

  • 20

    () . , , . 1.3.

    X Y V

    +

    Z

    . 1.3

    , r- ( ) ={1,2,,r}, . ( ) V={v1,v2,,vr}.

    V=B(Y), (1.4) B(Y) - , Y - V. . . [4] - () yY , () (,y), yY, .

  • 21

    Y. : - , ; - Y, ; - QY, , , .. (,y), . , q, q=(,Y,Q), , Y , Q , QY. , 1Q, 2QY, 1Q , 2Q . . - ={1,2,,n}, Y={y1,y2,,ym} Q={(i,yj)}, , yY )n,1i( = , )m,1j( = . RQ, nm. i RQ, yjY . i yj rij=1, (i,yj)Q, rij=0, (i,yj)Q. (. . 1.4.), i , yjY , (i,yj)Q ,

  • 22

    i yj. . yY , q-1=(Y,,Q-1), q ( q).

    y1 y2 y3

    x1 x2 x3 x4

    ={1,2,3,4}, Y={y1,y2,y3}, Q={(1,y1), (1,y2), (2,y1),

    (2,y2), (3,y2), (4,y3)}. . 1.4

    =12m, Y=Y1Y2Yr, Z=Z1Z2Zn , .

    f=(12m,Z1Z2Zn,F). (1.5) f x ={1,2,,m}12m z ={z1,z2,,zn}Z1Z2Zn. F f.

    f={(12m),(Z1Z2Zn), (Z1Z2Zn),F}, (1.6)

    .. f ( x , z )[(12m)(Z1Z2Zn)]

  • 23

    z ={z1,z2,,zn}Z1Z2Zn.

    f={[(12m),(Z1Z2Zn)], (Y1Y2Yr),F}. (1.7)

    f ( x , z ) [(12m), (Z1Z2Zn)] y ={y1,y2,,yr}Y1Y2 Yr. F f. :

    f={[(12m)(Z1Z2Zn)],[Z1Z2Zn], (Y1Y2Yr),F), (1.8)

    .. f {( x , z ), z } {[(12m), (Z1Z2Zn)], [Z1Z2Zn]} y ={y1,y2,,yr}Y1Y2 Yr. :

    )f1 1 m 1 1 n{(X , X ,..., X ) (Z ,Z , ...,Z (1.9)

    )} ) f1 1 m 1 1 n 1 1 n{(X , X , ..., X ) (Z ,Z , ...,Z (Z ,Z , ...,Z . (1.10) :

    )} ) f1 1 m 1 1 n 1 1 r{(X , X ,..., X ) (Z ,Z ,...,Z (Y ,Y ,...,Y (1.11)

    )] 1 1 m 1 1 n{[(X , X ,..., X ) (Z ,Z ,...,Z )} ) f1 1 n 1 1 r(Z ,Z , ...,Z (Y ,Y ,...,Y . (1.12)

  • 24

    2.

    2.1.

    2.1.1. . . , , .

    , [5]. , , . , MatLab, Omola, Dymola, Dymosim, Model Vision Studium, UML . , , , . 2.1. :

    - ; - L ; - U(t) ; - IL(t) ; - U(t) .

    , .

  • 25

    U(t) UC(t)

    C IL(t)

    L

    . 2.1

    :

    LC I

    dtdU

    = , CL UU

    dtdIL += .

    z1=U, U/L=(t) :

    dtz

    dtdz 21 = , )t(x

    Lz

    dtdz 12 += . (2.1)

    U=0, (t)=0 (2.1) . (t) , t. (2.1), z1(t) z2(t). U(t)

    , R - , , [6]:

    -tC 1 1

    1

    U (t) = 1- e (cos t + sin t)

    , (2.2)

    R =2L

    , 201 =

    LC, 2 2 21 0 = .

  • 26

    , U(t) R, L , ( ) .

    2.1.2. . , . . E(t) t. E(t+t)-E(t) t t0. , ( ):

    ).t(kEt

    )t(E)tt(E=

    +

    )t(kEt

    )t(E)tt(Elim0t

    =

    +

    ( ):

    )t(kEdt

    )t(dE= . (2.3)

    (2.3), . t=0, E(t=0)=E0

    E(t)=E0ekt. (2.4) (2.4) . 2.2.

  • 27

    t

    (t)

    0

    . 2.2

    t=0 E=E0, ,

    2E0=E0ekt, 2=ekT, T=(1/k)ln2. , , , (, ).

    2.1.3. . , [2]. m1 - ; m2 -

    , t; 1 - ; 2 - . 1 - 2 - . , .

  • 28

    L1=11, L2=22. m1

    t 22tm2, m2 t 11tm1,

    m1=-22tm2, m2=-11tm1. (2.4) (2.4) - . (2.4) . t,

    12 2 2

    m = - p mt

    , 2 1 1 1m = - p mt

    .

    t0, ,

    12 2

    dm = -L mdt

    , 2 1 1dm = -L mdt

    (2.5)

    (2.5) . 2.1.4. . ,

    , y, V V VY. m - ; u ; - 0; f(u) - . , .

    ,

    xVdtdx

    = , yVdtdy

    = .

    :

    ;sinUFdt

    dVm y

    y += += cosUFdt

    dVm x

    x .

  • 29

    )u(fdt

    dm= .

    , :

    ,cosUFdt

    dV m ,Vdtdy ,V

    dtdx

    xx

    yx +===

    )u(fdtdm ,sinUF

    dtdV

    m yy =+=

    (t0)=0, y(t0)=y0, m(t0)=m0, V(t0)=V0, Vy(t0)=Vy0.

    , U - . , , .

    2.2.

    . , . , , . D- dynamic ().

  • 30

    (, ) (t)={1(t),2(t),...,m(t)}, Y(t)={y1(t),y2(t),..., yr(t)}. , , . ,

    i

    i 1 n 1 mdz = f (t, z (t), ..., z (t), x (t), ..., x (t)), i = 1,ndt

    . (2.6)

    i- fi, t, Z={z1(t),z2(t),,zn(t)} (t)={1(t),2(t),...,m(t)}. ,

    j j 1 n 1 my = g (t,z (t), ..., z (t),x (t), ...,x (t)), j = 1,r . (2.7)

    (2.6), t(0)=t0 0 0 01 0 1 2 0 2 n 0 nz (t ) = z , z (t ) = z , ..., z (t ) = z , , (t) (t0,t]:

    0 0 0 0

    t t t tt 1 t 2 t m t(X(t)] = {(x (t)] ,(x (t)] , ...,(x (t)] } .

    (2.6) ,

    o

    0 0 0 ti i 0 1 2 n tz (t) = j (t, t , z , z , ..., z ,(X(t)] ), i = 1,n . (2.8)

    (2.6), t0

  • 31

    )z,...,z,z(Z 0n02

    010 = , F.

    ) )]t(X(,Z,t,t(F)t(Z tot00

    = . (2.9) ) )]t(X(,Z,t,t( t

    ot00

    Z(t), t-t0 (t0,Z0) t

    ot)]t(X( .

    ),)]t(X(,Z,t,t(G)t(y tot00

    = (2.10) G ))]t(X(,Z,t,t( t

    ot00

    yt=y(t).

    , , , .

    z(t) , q- , , :

    =

    z...dt

    zddt

    zddt

    zdq2q

    2q

    21q

    1q

    1q

    q

    x...dt

    xddt

    xddt

    xdr2r

    2r

    21r

    1r

    1r

    r

    0 ++++=

    (2.11)

    dtdp = ,

    v(t) (2.11)

  • 32

    z()=-1()()()+v(), -1()=q-1q-1-2q-2--q, ()=0r+1r-1 + + r.

    . , .. . , , :

    dZ =Z + GX +W, Y = HZ + Vdt

    . (2.12)

    (2.12): Z={z1(t),z2(t),,zn(t)} - ; (t)={1(t),2(t),...,m(t)} ; Y(t)={y1(t),y2(t),..., yr(t)} ; W={w1(t),w2(t),,wn(t)} -

    ; T1 2 ndZ dz dz dz= { , , ..., }dt dt dt dt

    -

    ; , G, H , Z, (t), Y(t), W. , G, H , . , (2.12).

    (2.12) , , G, H .

    V.),t,X,Z(Y ,W),t(),t,X,Z(

    dtdZ

    +=+= (2.13)

  • 33

    (), () (...) , . , . ,

    , . Simulink MatLab. , . , .

    2.3. ( ) .

    2.3.1. . n-

    n n-1

    n n-1

    d z(t) dz(t) d z(t)= f[t, z(t), , ..., , z(t - ),dt dt dt

    n-1

    n-1

    dz(t - ) d z(t - ), ..., ]dt dt

    . (2.14)

    (2.14)

    . : z=z1; 2dz(t) = z

    dt;

    2

    32

    dz (t) = zdt

  • 34

    .. (2.14) :

    n

    1 2 n 1 2 n

    d z(t)= f[t, z (t), z (t), ..., z (t), z (t - ), z (t - ), ..., z (t - )]

    dt.

    )]t(z),t(z,t[fdt

    )t(dz= , (2.15)

    >0, =onst, , , z(t) t>t0. (2.15)

    +=t

    0t0 .d)](z),(z,[f)t(z)t(z (2.16)

    (2.16) . t0 z0=z(t0)

    z(t) t0-tt0 . (2.16) .

    z(t) t>t0, , z(t)=W(t) t[t0-,t0). f W z, .

  • 35

    W(t) t0-t

  • 36

    =+ =

    =)tk(v)titk(x)ti(h)tk(z

    0i

    ).tk(v)ti(x)titk(hk

    i+ =

    =

    t=1,

    =+ =

    =)k(v)ik(x)i(h)k(z

    0i

    ).k(v)i(x)ik(hk

    i+ =

    = (2.17)

    (2.17) , h(i) , , i . . ,

    (2.17) h(k-i).

    ),k(v)i(x)i,k(h)k(zk

    i+=

    =

    h(k,i) - k i. ,

    , , .. , .. . , :

  • 37

    -

    t

    =0 =-

    z(t) = h()x(t - )d + v(t) = h(t - )x()d + v(t) ; (2.18)

    -

    +==

    t).t(vd)(x),t(h)t(z

    v(t). , . ( ) ( ) -

    ,)t(),t(hp

    1iii=

    = (2.19)

    i(t) - t, [t1,t2]. , i, . i .

    : (2.19) ; i(t) ; i .

    2

    1

    t

    i jit

    0 i j (t) (t)dt =

    c i = j, (2.20)

    i i(t).

    ,

  • 38

    i i i (t) = (t)/ c . (2.20)

    2

    1

    t

    i j ijit

    1 i = j (t) (t)dt = =

    0 i j , (2.21)

    ij - . i

    (2.19) i(t)

    2 2

    1 1

    t t

    i k k ik = 0t t

    h(t) (t)dt = (t) (t)dt .

    k=i ,

    2

    1

    t

    i it

    = S(t) (t)dt . (2.22)

    .

    2.4.

    , ( ) (2.17). Z-

    v(n)=vn

    -nnn=0

    v(z) = v z .

    Z- ,

  • 39

    z(z) = h(z)x(z) + v(z) / (2.23) Z-

    . z z=es, Z- . (2.23)

    Z- )z(z z(k) Z- )z(x (k).

    )z(h - ( ), Z- h(k). )z(v - Z- v(k).

    (2.18) , z(s)=h(s)(s)+v(s). z(s), h(s), (s), v(s) - z(t), h(t), (t), v(t); h(s) - , .

    +-js

    -

    x(s) = x(t)e dt .

    (2.18) , z(jw)=h(jw)(jw)+v(jw), z(jw), (jw), v(jw) - , , h(jw) - , , .

  • 40

    +-jwt

    -

    x(jw) = x(t)e dt .

    , , z, s, j. , , , .

    2.5. ,

    , [7]. , . t, ti z(ti), Z. F- finite automata . ti (i=1,2,...)

    - (ti) , y(t) - Y.

    A=, ={1,2,...,m} - ; Z={z1,z2,...,zn} - ; Y={y1,y2,...,yr} - . , Z, Y ,

  • 41

    . , :

    z(t)=[z(t-1),(t)] z(t)=[z(t),(t)], y(t) , : y(t)=[z(t),(t)]; y(t)=[z(t-1),z(t) (t)]; y(t)=[z(t-1), (t)].

    - , . . ={1,2,3}, Z={z1,z2,z3,z4}, Y={y1,y2,y3,y4}.

    . 2.1, y(t)=[z(t),(t)] . 2.2. 2.1

    Z z1 Z2 z3 z4

    1 z1 Z2 z3 z4 2 z2 Z3 z4 z1 3 z4 Z1 z2 z3

    2.2

    Z z1 z2 z3 z4 1 y1 y4 y3 y2 2 y2 y1 y4 y3 3 y3 y2 y1 y4

    i j zk, i

  • 42

    t, , t-1 zj. . 2.4

    .

    x1 x1

    x1

    x3 x3

    x3

    x2

    x2

    x2

    z1

    x1

    x2

    x3 z2

    z3

    z4

    . 2.4

    ( ) Y. , z0, (t0), (t1), (t2),, y(t0), y(t1), y(t2),

    , . ,

  • 43

    , z(t)=[z(t),(t)], - y(t)=[z(t),(t)].

    : z(t)=[z(t),(t)], - y(t)=[z(t-1),(t)]. ,

    - y(t)=[z(t)], .

    . , . . - y(t)=[(t)]. Y ,

    .

    . 1.

    1,2 5 5 . Z=(0,1,2,3), =(1,2,5) Y=(0,1), 0 , 1 . (t)

    Z(t)=(z(t-1)+(t))mod5, (t)

    ( ) ( )( ) ( )

    0, z t -1 + x t < 4,Y =

    1, z t -1 + x t > 4.

  • 44

    2. - , . i- i-

    (i=1,2,,n). . . n- Z=(Z1,Z2,,Zn), Zi - i- . (n+1) =(1,2,,

    n,), i - i- , . =1, = -1. n Y=(Y1,Y2,,Yn), Yi(t)=Zi(t) .

    Zi(t)=Zi(t-1)+(t),

    Yi(t)=Zi(t). . 2.5

    , z(t)=[z(t-1),(t)], - y(t)=[z(t),(t)]. WWOD F(i,j), k zk, i t, , t-1 zj.

  • 45

    k 5

    j=k 3

    1

    WWOD 1

    () X, i

    2

    0 7

    k=FP(i,j) 4

    w=FW(i,k)

    6

    . 2.5

    WWOD FW(i,k), w () yw, i t, , t zk. WWOD , .. z0=zk. 3 .

  • 46

    3.

    3.1.

    , , . , , . . , . ,

    , . , , . , . , .

    3.1.1. . ( ). , (). ,

  • 47

    . , ( ), [8]. [0,1],

    , . (), 0()1. . ,

    . , , x1, x2, , xn, xi P(xi). , . 3.1, .

    P(x3) P(x2) P(x1)

    . . xn x4 x3

    x2 x1

    P(xn)

    . 3.1

    x ....

Recommended

View more >