Вы находитесь на странице: 1из 116

5.

Simulink
2.

:
. . ., . .

5. Simulink

. ., . .

.............................................................. 1554
. .
MATLAB/SIMULINK

................................................................................. 1561
. ., . ., . .



MATLAB/SIMULINK .................... 1573
. .

PSPICE SIMULINK...................................................... 1583
. ., . .

MATLAB SIMULINK...................................................................... 1589
. .

SIMULINK............................ 1596
. .
SIMULINK-STATEFLOW
............................................................................ 1603
. ., . ., . .,
. ., . .


SIMULINK.............................................................. 1608
. ., . .
SIMULINK
( )............................................ 1611
. ., . .
MATLAB/SIMULINK ............... 1634
. ., . ., . .

SIMULINK......................................... 1653
. ., . .


SIMULINK ..................................................................................................... 1661
1553

II MATLAB

519.6


. ., . .
, ,
e-mail: rgu@penza.net


() .
, , - . .
, ,
[1]. ,
. , .
[2], :

1
P1 (Tu ) =
T

t 0 + T

U m sin t I m sin(t + ) dt =

t0

Um Im
U I
cos m m sin T cos(2t 0 + Tu + ) ,
(1)
2
2T
U m I m ; T , , ( ); ; ; t 0 ,
.
,
t3
=

1554

5. Simulink

1
P2 (Tu , t3 ) =
T

t 0 + T

U m sin[ (t t3 )] I m sin[ (t t3 ) + ] dt .

(2)

t0

sin Tu sin(Tu + 2t 0 + t 3 ) = 0 ,
(3)
(1) (2).
(3), :
T
( n = 1, 2, 3, ... ),
(4)
TuO = n c ;
2
Tc ( ),
T

TuM = n c + t3 2t0
Tc ; (n = 0, 1, 2, 3, ...) ,
(5)
2
2

t 0 ( ).
Tu = TuO , (1),
!
, t 50 ( Tc = 20 )
. 1 . 2. ,
0.01 0.02 . , (4), (5) , .

. 1. .

1555

II MATLAB

. 2. .

, MATLAB. . 3 (. mes_p3 ).
- Simulink, Power System Blockset DSP Blokset. :
Power System Blockset,
DSP Blokset. Simulink.

() RL-. (SI)
(SU)
Simulink DSP Blokset. ( int1 int2 ) Hit rossing .
Hit rossing Counter, . 4. Hit rossing1 .

Step. int3 T . Produkt T , Produkt1 .

1556

5. Simulink

. 3. .

. 4. Counter.

1557

II MATLAB


Active & Reactive Power Power System
Blockset.
. 5.

. 5. .

, .
, . , . 6 ( Zero-Order
Hold) ( Quantizer).

. 6. .


. 7 . 8.

1558

5. Simulink

7.
.

8. .

, . ,

1559

II MATLAB

,
50 0.1% 10 ( ) 8-
, 8 .
,
[3], , 12-
12 , 5- .
,
:
1. ( )
, ;
2. ;
3.
, ,
()
.
.

1. 13109-97 .
.
. : - , 1997. 30 .
2. . . . .:
. 1973. 752 .
3. . ., . .
// . . .-. .
. .: ,
2001. .6871.

1560

5. Simulink

519.711:658.012.011.56:621.757

MATLAB/SIMULINK


. .

. . . , ,
e-mail: kuritzyna@rgtu.ru

-
. , ,
.


MATLAB
(Math Works,Inc.)
Simulink, .
. ,
, .

,
,
- .
1561

II MATLAB

, .
.


, ,
.

[1]. ,
,
.
.

(i = 0, 1, , p)
(j = 1, 2, , s) - , (. 1), {X10, X20, , X s0} ,
{X1m, X2m, , Xsm}.
{ti1, ti2, , tij} .
[2].
:
j = s i =( p 1)

1
X vp =
X ji ,

j =1 i = 0 K vipj


, . ,
. .

1562

5. Simulink

. 1. .


MATLAB Simulink

, , ,
. , , , . ,
.

,
. . , .

MATLAB Simulink

,
, .
1563

II MATLAB

Simulink, [3].
(, , ) -,
. , ,
, . Simulink , ().
, ,
,
, . .
Simulink - - . ,
,
. , .
, ,

:
(, , );
, :
(, ).
(,
).
: ( ) (, , ).

MATLAB/Simulink


Simulink MATLAB.
S-
,
, .
(
) Simulink. , , ,
1564

5. Simulink

. . , , ,
.
. 2. .

. 2.
MATLAB/Simulink.

,
(sub-system) , .
, .
1565

II MATLAB

, , .
, .
,

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

.

,

. , , . .
.
, .
.
, . , , .

1566

5. Simulink

. ()
.

.
, ,
,
. .
.

.
, , , ()
,
.
.
, .

. .
, ,
, .
,
, . , .

1567

II MATLAB

.
. ,
(. 3).

. 3. .

. ,
.

.
,
, : , , . , ().
Simulink/MATLAB . 4-6.

1568

5. Simulink

. 4. ( 0).

. 5. ( 1).


:
tg tg1
1) r = 0:
H =S
tg + tg1
S2
;
8 r

2) r 0 r > S :

H =

3) r 0 r < S : H =

sin sin 1
sin ( + 1 )

1
) .
S r (tg + tg
2
2

SUB (. 6, 7).

1569

II MATLAB

. 6. ( 2).

. 7.
( 3).

. () .
,
(Ra ) , (Py) (R) 1570

5. Simulink

. (Ra ) R
.
Ra. , ,
,
,
1,11,2 1,52 .
:
110 s 2
Ra .
Ra =
2
R
Simulink/MATLAB . 8-10.

.8. ( 0).

. 9. ( 1)

1571

II MATLAB

. 10. ( 2).


S- , .
, , .

-
.

1. / . . , . . , . . . / .
. . . .: - , 2000.
2. . ., . . . /
. 2002. 2. .6771.
3. . . MATLAB. :
, 2001.

1572

5. Simulink

62.50




MATLAB/SIMULINK
. ., . ., . .
- , ,
e-mail: lychenko@aknet.kg

. ,
: . , , (Maple,
Mathematica, MATLAB, MatCad .).
, , .
MATLAB Control Toolbox Simulink,
.
, ,
.
.
Simulink 200 ,
,
Simulink . Simulink
Simulink (S).

1573

II MATLAB

,

(
) MATLAB/Simulink.
1.


, M ,
( )

xi = Ai xi (t ) + Bi ui (t ) + i ( x, u, t ) + i (t ) , i = 1,..., M ,
,
. i ( x, u, t ) , i (t ) - . u1 (t ),..., u i (t ),..., u M (t )
,
:

2 J = x(t f )

2
Q1d

tf

+ ( xt f ) + x(t )
to

2
Q1 x d

+ u (t )

2
Rd

+ ( x, u, t ) dt .

- [1]
c
(.1),
- [2]. :
[ ' , x ' , ' , u ' ]' ,
;
.

1574

5. Simulink

, l=1

P i = Pi Ai + Ai Pi + Q1xi + Q2 xi Pi Bi Di Bi Pi , Pi (t f ) = Q1i + Q2 i , i = 1,..., M


T

_
_

x 0 (t ), u 0 (t ), x 0 (t ), u 0 (t )

x (t )
(t )
l

z (t ) =
u (t )

(t )


l 1
x (t )

_
_

T
T
Q2 xd ( x x ) + ( / x ) ( Px + f ) + ( / x ) x
=

u (t )

_
_
_
Q (u u ) + ( / u)T ( Px + f ) + ( / u)T u
2ud

x1 , u1 , f1

zl

M
_

f i = Pi Bi Di ( Bi f i l + i Q2uiui ) Pi ( i ( x, u , t ) + i (t )) + Q2 xi xi
l

xM , u M , f M

zl

1
.

xi , ui , f i

zl

Ai f i i ,
T

f i (t f ) = Q2i xi (t f ) + / x(t f ),
ui = Di BiT Pi xil Di ( Bi f i + i Q2 uiui ),
1

xi = Ai xi + Biui + i ( x, u , t ) + i (t ), xi (t0 ) = x0i


l


el +1 = z l +1

el +1 el <

. 1. - .


xi (t ) , u i (t ) f i (t ) . ,
.
1575

II MATLAB

MATLAB, Simulink
, :

Simulink
. ,
Simulink- () .
,

[3,4,5] ,
,

f (t ) x(t ) u (t ) , . Simulink c ,
, S-, .
2.

:
uki (t )
,
- ,
;
xi (t ) ui (t ) ;
;
.
Simulink, .
MATLAB-, , Simulink- , .
1576

5. Simulink

: A , B , P PFull (t )
, Rd
, Q1xd , Q2 xd , Q2ud
,
( ), t 0 , t f , x 0 , e ,
0 , 0 , x 0 , u 0 .

x(t ) u (t ) .
. 2 ,

.

. 2. .
1577

II MATLAB

Simulink- fithModel.mdl xithModel.mdl



MATLAB S-

.
fith.dll xith.dll
S- , Simulink-,
uki (t ) fi (t ) ,
xi (t ) ui (t ) .
S- c ,
Simulink: Simulink-, , ,
Simulink-, Simulink, .
S- .3.
.

mdlInitializeSizes

mdlInitializeSampleTimes

mdlInitializeConditions

mdlOutputs

mdlUpdate

mdlTerminate

. 3. S- .

mdlInitializeSizes() :
(,
, , -

1578

5. Simulink

, , , );
( );
(
); ; ,
.
mdlInitializeSampleTimes() ( ).
mdlInitializeConditions()
( , fi (t ) ,
). ,
.
, , . mdlOutputs() mdlUpdate(), .
mdlTerminate(), .
S- Simulink-
(), .
. 4, Simulink- .
(t ), x (t ), (t ), u (t ) , .
f i (t ) ,
uki (t ) .
MATLAB.
.
, (. 4, ),
,
xi (t ) ui (t ) .
. 5 Simulink- Simulink. , ,
.

1579

II MATLAB

.4. Simulink- () i-
() ().

. 5. Simulink-
Simulink.

1580

5. Simulink

. , S-.

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

Pi i

Pi i ( x , u , t )

i (x, u , t)

)
)
.6. :
(), ().


( ).
,

MATLAB.

1. . . - . // . 7. 2001. .148157.
2. Lychenko, Nataly M.. Decomposition-coordinated optimization of large-scale
discrete systems with parallel-sequential coordinated scheme. // Proc. of The

1581

II MATLAB

7th Mediterranean Conference on Control & Automation (MED99, Haifa, Israel, June 27-July 4,1999). Haifa, 1999. P.420429.
3. . .

. // . 1.
2002. C.1017.
4. . ., . .
//
. 1. 2002. C.4248.
5. .. C
// .
II . .
SICPRO'03. .: , 2003. C.693706.

1582

5. Simulink

519.6


PSPICE SIMULINK
. .
, -,
e-mail:iakov@fromru.com


MATLAB .

http://www.mathworks.com/support/books/index_by_category.html?category=1
http://www.exponenta.ru/soft/MATLAB/MATLAB_book.asp.
, [1,2] ,
,
, ,
, PSPICE (
HSPICE, SABER) [3]. ( 1000$) , , Tina Pro, Elektronics Workbench,
Circuit Maker , . , Tina Pro
, , [4].

,
15 [5].

, , - . 1.
. 1 Uc(t) (t-) f :
Uc(t) = A(t)sin(2ft).
(1)
(IOP) ().
, L C, ,
,
.

1583

II MATLAB

R3
R4

R2

C1

+
Uc

VG1

IOP1

R1

L1

VM2

VM1

.1. .

Tina Pro
, . 2.
.3.

. 2. .

1584

5. Simulink

. 3.

.1 ( , VM1 ( ) VM2 ( )) .

. 4. . 1.

30 ,
.
,
Elektronics Workbench. -

1585

II MATLAB

Elektronics Workbench. :
Uc = Acos(2Ft) sin(2ft) , = 5, =400.
( 2)
. 5,
, .

. 5. () ()
2.

. 5 , 2 (15) (
).
Simulink. . 1 Gain Transfer Fcn, Transfer Fcn1 Saturation. ,
Gain ( Algebraic
Loop), .

. 6. Simulink .

1586

5. Simulink

,
MATLAB, (. 7). Linear analysis Tools
(.8)
.

. 7. ( ,
, ).

. 8. Simulink .

, .


( , , ,
, 10000) , , :
1587

II MATLAB

, ,
,

.
,
. MATLAB
Simulink , .

1. Steven T. Karris. Circuit Analysis II with MATLAB Applications. Orchard Publications., 2003. 501 p.
2. Attia, John Okyere. MATLAB Fundamentals. Electronics and Circuit Analysis using MATLAB / Ed. John Okyere. Attia Boca Raton: CRC Press
LLC, 1999. 399p.
3. Steven M. Sandler. The SPICE Handbook of 50 Basic Circuits
http://www.pcbcafe.com/BOOKS/SpiceHandBook/.
4. . .
5. . . .
.. 905846 6 17.02.82.

1588

5. Simulink

519.711:658.012.011.56:621.757


MATLAB SIMULINK
. ., . .

. . . , ,
e-mail: kuritzyna@rgtu.ru

, , , , . , , , , .

.
, , ,
,
, , .

MATLAB Simulink
[1]. MATLAB Simulink
,
.
[2].

1589

II MATLAB

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

.
, . .
, , , ,
. ,
. 1590

5. Simulink

, .

.
SUB-


, (.1):
1. .
2. ( ,
. .).
3. ,
().

. 1. .

SUB- ,
.
Simulink
SUB-,
[3], :
1.
(t):
t X j i
2.
:
1591

II MATLAB

X j (i-1) X j i
3. :
t X j i
4.
:
X j (i-1) X j i
5. :
S X j i

:
1. .
2. .
MATLAB Simulink
- - :
(. 2, 3);
,
() (. 4, 5).

. 2.
.

1592

5. Simulink

. 3.
.

. 4.
.

1593

II MATLAB

. 5. .


, . ,
. ,
, ( ) ,
.

.

, . , . , ( ).
. ,
.

. , , .
1594

5. Simulink

, . :
1. , .
2. .
3. .
4. .
5. .
6. .
7. .
,
,
.
,
, .


, , , .

1. . . MATLAB. :
, 2001.
2. . ., . ., . .

: . .: . . . ,
2002.
3. . ., . . //
. 2002. 2. C.6771.

1595

II MATLAB

681.513.3: 519.711.3: 681.3.06



SIMULINK
. .
, , .,
e-mail:signal@kovrov.ru

, , , ,
( ), [1, 2].

:
d
J
= M 1 M ;
dt
ip
d = 1 ;

dt i p
= 0 | |<
= sign( ) | | ;
d
M = +
;
dt
d
= 0 | |<
dt
d d
=
| | ;
dt
dt
d
J
= M M ,
(1)
dt
M = M M k M = f ( ) .
: d dt
; J , J
; ,
; M , M
; , d
dt
; ,

1596

5. Simulink

d
dt
; ; C ; ,
; k ; i p
; M ; M ; M
.

[2]:
M = M sign( ) 0
M M + M = 0 .
, M
.
= 0 | M |> M , (1), , , = 0
M = M sign( M ).
= 0 | M | M ,
, M M M + M , M M = M . , | M |> M .

M M . , ,
,
.

, -
.1, : 1,2,3 ,
; C1, 2, ,8 ; 1,
2, 3 ; 1, 2, 3 ; 1,
2 ; 1, 2, 3
; 1, 2, , 5 ; 1, 2, ,
9 ; .
1597

II MATLAB

1, 2, 3 6
.
, .
2 2,
2, 2 1,
0. , 2 3, 2, 3 1, 0. 2 1 6.
4, 5, 7, 8 9 . 1, b .
4, 5 7 AND,
8 NOR, 9
XOR.
. 1 (0 1) b.
M ,
, 1, ,
, 1 2.
2 , .
.

, , ,
2 . , 1 1,
, 1 0, , , 1, ,
2 .
1,
1 , 2 M . M 3, M . M = M .

1598

5. Simulink

C4

.1 - .

1599

II MATLAB

, , 3 3, 3 M M .

0
0
1
1

0
1
0
1

1.


(ND)
(NOR)
0
1
0
0
0
0
1
0

2
( XOR )
0
1
1
0

. 2
,
.
| M | M = 0 ( 1) | M |
2 M 2, , | M | M , 2 0, 3 1.
3
3,
6 0.
7, 8 9
0, 1, 0. 4
5 0 0. 2,
4, 5 .
M c 3
8 + , 8 . 5 , 3 , 3 = 0 . ,
M 0 , .
| M | M , .
2. 2
1, 3 0.
8 9, 2, , 5
M 1 = M M sign( M ) , 3.
3 0 .
1600

5. Simulink

3 ,
| |> , 6 1. 2 ( 3) 7, 8, 9, , 1, 0, 0. 4
M 2 = M M sign( ) . 4 5 0 0. 2, 3 5 , , ,
5 .
| M | M 0 ( 4)
. 2 0,
3 1. 7, 8 9 0, 0 1. 5 1, , , 5 M 2 = M M sign( ) ,
5.
5 .
,
, .
2.

.
1
2
3
4

| M | M

0
| M |> M
0
| M |> M
0
| M | M
0


4
5

M 1

M 2

M 2

. 2. .

1601

II MATLAB

. 2 .3
Simulink MATLAB [3]. , ,

.

.3. .

1. . 2- . .1 / . . . M.:
, 1976. 479 c.
2. . ., . . . .: , 1966. 767 c.
3. . , . SIMULINK 4. : .
. .:. , 2003. 403 .

1602

5. Simulink

681.3.06

SIMULINK-STATEFLOW

. .
, ,
e-mail:grogachev@auts0.samgtu.ru

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

, .
.
.
. , ,
.
, .
, , .
MATLAB TrueTime [1].
MATLAB Simulink-,
[2].
1603

II MATLAB

, , Simulink Stateflow. , Stateflow Simulink.


Simulink . ,
Stateflow .
, , . Stateflow- - .
.

1
W (s) = 2
.
s 4

W ( s) = s + 5 .
. 1,

. 2.

. 1. .

1604

5. Simulink

. 2. .

, Stateflow.
(. 3).

. 3. .


W ( z ) = 5 + (1 z 1 ) / h ,
h . Stateflow- 4.

1605

II MATLAB

. 4. Stateflow- .


, 0.2 0.08 .
, . . 5.
dout .
. 6
0.2 .


T

I = 2 dt ,
0

, .
, , I = 0.009985. 0.2 I = 0.01032. 0.01061, , .

1606

5. Simulink

. 5. .

. 6. .

1. Henriksson D., Cervin A., rzn K. E. TrueTime: Simulation of control loops


under shared computer resources // Proc. of the 15th IFAC World Congress
on Automatic Control. Barcelona, Spain, July 2002.
2. . . Simulink: . .:
-, 2003. 496 .

1607

II MATLAB

621.313.3:519.711.3



SIMULINK
. .,

, ,
e-mail: eets@etf.ustu.ru

. ., . ., . ., . .
-, ,
e-mail: svi@pochta.ru

, Simulink,
.

[1],
Memory. .
(),
() [3, 4],
, .
ER,
ES (. 1).

. 1. , .

1608

5. Simulink

ES ER
, .
U1
. Ke
U1 [3].
. 1 ,
Gain1, S-Function2 Product3.
S- s_v121 ; Ksootv, Rzaz, Ryarm , m. Command Window
. .
ES ER (. 2),
: , . ,
Memory ( -
).

. 2. .

MATLAB function,
ES ER, .
, .
, ( ).

1609

II MATLAB



.

. .
, , Mathcad mscript [3, 4], Simulink [2].

,
, . , .
, [2], , .
,
, , .
Simulink.
,
MATLAB, , ,
.

1. . ., . . Simulink 4. : . .
. . . .: . , 2003.
2. . ., . ., . . , 2000.
3. . ., . ., . . . .: , 1991.
4. . ., . ., .
:
. : - -, 2001.

1610

5. Simulink

534:531.43

SIMULINK
( )
. .,
()
, ,
e-mail: khleb@kodos.ru

. .
Institute for Control Engineering of Machine Tools
and Manufacturing Units (ISW) Stuttgart, Germany,
e-mail: alexandre.kostikov@isw.uni-stuttgart.de

1.

( m) (. 1).

. 1. .

() (. 2, ).

. 2. .


(. 2, ), [1] ( ).

1611

II MATLAB

(
. . [2], , , ).
( ).
. , , ,
.
,
, , ( 10-7 )
.
, . .

.
,
,
( ).
, ,
.
() , . .
, . , [3]. ,
, ( ).
.
( ) . ,
:
,
;

1612

5. Simulink

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

. (Leonardo Da Vinci, 1519). (Newton, 1687).
(Amontons, 1699) (Coulomb, 1785). - .
.
. 3, ).

.3. :
) ; ) ++ ;
) ; ) +.

1613

II MATLAB

(Morin, 1833) ,
(Reynolds, 1866) , ,
. 3, ). . , XIX (), () . XX (Stribeck, 1902), (
, . 3, ).
.
(Hess, Soom, 1990) [4]
. , , , , , (.3, ). .

..
, .. , .. , .. , ..
, .. , .. , .. , .. . .. [5] .. .. [6], , ,

. , .
, [1] . . (1988),
. . ( 1986),
. . (1956, 1957, 1967, 1980) ( . ., . .,
. ., . .), . ., . .,
. . (1967), . ., . . (1987),
. ., . . (1988).
,
[7] .
,
, , , , . [8]
,
(. 4). [15] .
.
() , ,
, . , , . 3 ), ),
), , .
1614

5. Simulink

[1] [9] B. Armstrong-Hlouvry, P. Dupont, Canudas De Wit,


H. Olsson, K. J. strm, P. Lischinsky. : Bliman Sorine, Harnoy - Friedland, Canudas de
Wit .

. 4. .

, , ,
, , . 1967 .
.. . , , ,
, , , .
, , .
, ,
(, ). -
( ), ,
.
2.
( )

()
.
.

1615

II MATLAB

2.1.

y = sign( x) k ,
(1)
y F ( ) , x , k , .
,
. , .
(. 5).
Sign Simulink. , , , , . k.

. 5. .

,
. 1 /. . 6.
.

. 6. .

1616

5. Simulink

, . 5, , . 7.

)
. 7. : )
k=1; ) k=2.

, (1) .
2.2. +


y = sign( x) (k1 x + k2 ),
(2)
y , x , k1 , k2 .
+ Simulink Coulomb & Viscous Friction (.
8), (2).

1617

II MATLAB

v
To Works pac e1

F
Sine Wave

Coulomb &
Viscous Friction

To Works pac e

. 8. + .

,
Coulomb friction value (Offset) ,
Coefficient of viscous friction (Gain)
. . 9
.

. 9. +

.
.
.
.
2.3.

, ,
90- , . , (Lorentzian) (Haussian) , (Tustin).

, , [6], [10], [11].
1618

5. Simulink

[10]
:

C
M = C2 +
sign ,
(3)
2
1 + m 2

m , , 2 , . , . 10.

. 10. (3).

(3) (. 11).

. 11. (3).

Switch.
. 11 (. 12) (. 13).

1619

II MATLAB

. 12. (3).

. 13. (3).

, (3)
.
.
. , . .
.
.
, [11].
v
+

v0
+
+
+
FG = FH F 1 e + b + v ,

-
v

v0

FG = FH F 1 e + b v .


. 14.

1620

5. Simulink

. 14. [11].

,
. 15, , ,
. 16.

. 15. [11] .

. 16. [11].

. 16 ,
( , ).
: , , . , , .

1621

II MATLAB

. 17. [11] .

FH , F (FH-F ),
0 ( ) ,
, b , ,
. .
[11] . :
FH+=1,79 H, F+=0,97 H, 0+=0,003915 /c, b+=0 Hc/,
FH-=-1,63 H, F-=-0,84 H, 0-=-0,003915 /c, b-=0 / .
. 15
. . 18.

. 18. [11] .

, ,
, ,
sgn, [12]. 1622

5. Simulink

FSS = FC + ( FS FC ) e

( / S )

) sgn ( ) + ,
2

FC , FS
, 2 , S (
). ,
. .
3.
( )


(),
,

.
, ,
. [12].
, [9],
(Dahl, 1968). [13] ,
Bo Pavelescu (1982), Armstrong-Helouvry (1991), Harnoy Friedland
(1994), Canudas de Wit, Olsson, Astrm Lischinsky (1995).
Bo Pavelescu , (dxS /dt ) (. . 25 [13]):
.

F ( x) = FC + ( FS FC ) e

. .
x x S

+ F x .
.

FC, FS, x S ,
.
3.1.

[14] (o
[9] (K.J. strm) (C. Canudas de Wit P.
Lischinsky), LuGre Lund-Grenoble):
1623

II MATLAB

F = 0 z + 1

dz
+ 2 ,
dt

dz
=
z,
dt
g ()

(4)

(5)

(6)
0 g () = FC + ( FS FC )e ( s ) 2 .
: F , , z , , , 0 - , , 1 , ,
2 , FC
, FS , S
. , .
(4)(6) ,
. 19.

. 19. .

1/g(v) . 20.

. 20. 1/g(v).

1624

5. Simulink

, [9]. [9] , ,
(4) (6), ,
, , - . .
[9]
. ,
1.425 , 95%
FS. 1.425 ,
1.425 ,
1.425 .
. ,
. 19. , , . 21. . 22.

. 21. .

F(x) ,
[9]. , ,
,
. F() , ,
.
(Dahl, 1968). Fa > F,
.
, .
,
.
.
. . 23,
) , . 23, ).
1625

II MATLAB

=0.0007 / , 0.001 /. ,
. : 1
= 1 /, 2 = 10 / 3 = 25 /, , [5].

. 22. .

)
)
. 23.
.


, . . .
, =0.08 /,
1 = 10 / 2 = 20 /.
24.

1626

5. Simulink

. 24.


: ,
, .
.
.
- , [9]: . , ( )
, . ,
. 25, ).
Fa: 1 /c, 5 /c, 15 /c 50 /c. , , . 25, )
, , , (. .
) .
; FC = 1 .

1627

II MATLAB

)
)
. 25.
.

3.2. -

,
. -
( , Leuven).
- [16] , , .
.
, , , ,
, . , .
,
. 26. , , Fa, FS,
,
(. 26, ). (. 26, ), (. 26, ) (. 26, ). , ,
, - , , .
, , , .
[17] , ,
, - -

1628

5. Simulink

. , - , .

)
)
. 26. .

4.

[18] [12], [19].


(ISW), (. 27).
ISW, G. Pritschow, , , [20], [21].
dSPACE RTW
MATLAB/Simulink Td = 125 s.

1629

II MATLAB

. 27. (ISW).

, fft.
. 28. . 28, (f1 = 117 Hz, D1 = 0.055, f2 = 349 Hz, D2 = 0.05)
. . 29.
.
,
.
. 30 , l C+ = F
l C = 1.6 , F
l S+ = F
l S = 1.85 ,
 S + = 0.004 /,
: F
 S = 0.005 /,
 2+ = 17 /,
 2 = 8 /.


(
) . 31.

1630

5. Simulink

. 28. .

. 29. ().

. 30. ().

. 31.
( ).
1631

II MATLAB

.
,
,
. , .
, .
.

1. Armstrong-Hlouvry B., Dupont P., Canudas De Wit C. A survey of models,


analysis tools and compensation methods for the control of machines with
friction // Automatica. 1994. V.30. N.7. P.10831138.
2. . . // . 2000.
7. .4454.
3. . . // . 2000. 7. .1113.
4. Hess D. P., Soom A. Friction at a lubricated line contact operating at oscillating sliding velocities // J. Tribology. 1990. V.112. P.147152.
5. . .
. .: . . -, 1979. 246 .
6. . ., . . . . , 1987. 183 .
7. . . . --:
, 2000. 293 .
8. Kozlowski K. R., Dutkiewicz P. Experimental identification of robot and load
dynamics // IFAC 13th Triennial World Congress. San Francisco, 1996.
P.397402.
9. Canudas De Wit ., Olsson H., strm K. J., Lischinsky P. A new model for
control of systems with friction // IEEE Transactions on Automatic Control. 1995. V.40. N.3. P.419424.
10. / . .. , . 3. .:
, 1967. 770 .
11. Kern R. H., Gao C.-T., Nitsche R. Reibkraftkompensation mittels FuzzyLogik // Automatisierungstechnischepraxis. 1995. V.37. P.5060.
12. . ., . .

// . . . SICPRO2003.
.: , 2003. . 18211849 (CD ISBN 5-201-14948-0).
1632

5. Simulink

13. Armstrong B. Challendges to Systematically Engineered Friction Compensation // Proc. of IFAC Workshop on Motion Control. Munich. 1995.
P.2130.
14. Canudas-De-Wit . Comments on A New Model for Control of Systems
with Friction // IEEE Transactions on Automatic Control. 1998. V.43.
N.8. P.11891190.
15. . . // ( . .). 1999. 2. .226
228.
16. Dupont P., Hayward V., Armstrong B., Altpeter F. Single state elasto-plastic
friction models // IEEE Transactions on Automatic Control. V.47.
N.5. May 2002. P.787792.
17. Swevers J., Al-Bender F., Ganseman C.G., Prajogo T. An integrated friction
model structure with improved presliding behavior for accurate friction compensation // IEEE Transactions on Automatic Control. V.45. N.4.
April 2000. P.675686.
18. . , .. // .
. .
SICPRO2004. .: , 2004. .571588 (CD ISBN 5-20114966-9).
19. . . //
. . .
SICPRO2000. .: ..16961709(CD ISBN 5-201-09605-0).
20. Pritschow G., Ketterer G. Rechnergestuetzte Identifikation von
Reibkennlinien
an
elastisch
gekoppelten
Bewegungsachsen
//
Antriebstechnik. 1993. V.32. N.9. P.6772.
21. Augsten G., Schmid D. Einfluss von Spiel und Reibung auf die Konturfehler
bahngesteuerter Werkzeugmaschinen // Steuerungstechnik. 1969.
V.2. N.3. P.103108.

1633

II MATLAB

004

MATLAB/SIMULINK
. ., . .
, ,
e-mail:cisar@fromru.com

Excel , , .
, .
, .

MATLAB. (Toolboxes)
. FinancialToolbox, Excel ExcelLink,
Word Notebook.
Simulink,
.
.
. , .
, .
Simulink.
.
1. ,
. ,
-
. , . , ,
.
:
. : .
: ,

1634

5. Simulink

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

. , , . . ,
. : , .
.

:
t=tf

BDt = PRFt * TXRT,


t=tb

BDt , t, .; PRFt (profit),


t, /.; TXRT (tax
rate); t , . ,
; tb (begin) ; tf (final) .

t=tf

CPt = PRFt * (1TXRT),


t=tb

t
PRFt = CPt * RN,
RN .
, .
Simulink.
Simulink- -,
.
, .

1635

II MATLAB


. . 1.1.

. 1.1.
.


,
.
CapF. , .
, .
CapS.
( )
PrfF
Rntb.
Rntb.
[0.2:0.2:0:8]. MATLAB
, 20% 20% 80%.

MATLAB.
Scope1 CapS.
( ) TaxRate. TxF.

1636

5. Simulink


TaxRate.
[0:0.1:1:0]. , 0% 10%
100%.
MATLAB.
. TxF BdjS.
Scope
. Display BdjS.
, .
,
. : , , .
. Scope
Display.
-: .
.
,
.

%Optimal profit tax rate simulation
%File: C:\Csr_MtLb\TxRt\TaxRate_DscM.m and TaxRate_Dsc.mdl
%=================================================
path(path,'C:\Csr_MtLb\TxRt') %Set model Path
%=================================================
open_system('TaxRate_Dsc') %Load TaxRate_Dsc.mdl
TaxRate=[0:0.05:0.7] %-
for Rntb = 0.2:0.2:1 % -
sim('TaxRate_Dsc') %Run model
plot(TaxRate, ScopeData(end,2:end)) %
hold on %
grid %
end
hold off %
%======= end TaxRate_DscM.m program ===============

m- . .

1637

II MATLAB

. .m- Simulink Simulink .mdl.


.
open_system
.
TaxRate .
8 14 for .
sim , .
plot .
1.3, (work space) MATLAB, Scope. hold on , .
.
. 1.2.

. 1.2. .
1638

5. Simulink

m- .
Simulink . Scope ()
. , plot MATLAB.
1. .
.
Simulation, Scope :
, .
.
,
. , . . . : , .
2. . -
. , . . .
MATLAB
TaxRate_DscM.m. .
.
Tools > Run. MATLAB , . 1.3.
. ,
. ( ),
, , , 23%.

1639

II MATLAB

. 1.3. .

,
, . , .
. ,
, . , .
2.
.
(18421924) ,
. .
, 80 OPEC, ,
.

. ,
, . -

1640

5. Simulink

, , . , ,
MATLAB_Simulink.
. .
: , , .
. : , , ,
. . , . . . , .
: .
. : , , ,
.

Dmd=D0 Kd*Prc,
Dmd (demand) ; D0
; Kd ; Prc (price) .

Spl=S0+Ks*Prc,
Spl (supply) ; S0 ; Ks ; Prc
(price) .
Simulink. - . 2.1.

. 2.1. - .

1641

II MATLAB

, .
DmdFn.
, .
:
u = Prc, D0 = 100, Kd = 10.
.
SplFn. , .
:
u = Prc, S0 = 10, Ks = 7.
.
Spl,
.
SplFn1 . , .
Prc, Spl .
DmdFn.
.
.
. Scope. . , . ,
.
.
,
. MATLAB .
. , . . .
MATLAB. MATLAB.
%Market equlibrim price simulation
%File: C:\Csr_MtLb\DmdSplEquM.m
%1.Simulate static functions, plot its
%2.Simulate price dynamic, plot price Web graphics
1642

5. Simulink

%=================================================
%Set model Path
path(path,'C:\Csr_MtLb\MrktEqlPrc')
%=================================================
%1.Simulate static functions, plot its
%Load and Run DmdSplEqu.mdl
open_system('DmdSplEqu')
sim('DmdSplEqu')%Write Vars into WS from Scope
%Plot Static features
plot(ScopeData(:,2),ScopeData(:,3:4))
hold on
grid
pause(5)%
%
%=================================================
%2.Simulate price dynamic
sim('DmdSplEqu')
%=================================================
%3. plot price Web graphics
for i = 2:11 %
line([ScopeData(i-1,2) ScopeData(i,2)],[ScopeData(i,4) ScopeData(i,4)])
line([ScopeData(i,2) ScopeData(i,2)],[ScopeData(i,4) ScopeData(i+1,4)])
end
hold off
%=================================================

. % . path . open system - Simulink.


sim . Plot
. Hold on .
Grid . . pause 5 .

. Sim . .
Scopes
MATLAB workspace.
for, , .
. 2.2.

1643

II MATLAB

. 2.2. .

/ MATLAB c . Simulink.
Scope, Scope1 , . ,
MATLAB.
1. . MATLAB m-
DmdSplEquM.m. .
Tools>Run. . Simulink
.
Scope
Figure. Scope1 . 2.3.
Scope . 2.4.

1644

5. Simulink

. 2.3. , - .

. 2.4. , Scope.

. 2.5.

1645

II MATLAB

. 2.5. .

2. .
D0 DmdFn SplFn1
.
S0
SplFn .
3. . Kd DmdFn SplFn1
.
Ks SplFn .
Ks .
Ks = Kd .
. , . . .
Ks > Kd , , . , .

1646

5. Simulink

3.
. .
.
, ,
.
- , . ,
.
.
, 1962 , . -
. ,
. , 300 ,
10 .
: , , , , , .
.
.
. - .
. Simulink
, . Simulink . 3.1.

. 3.1. .

1647

II MATLAB

70 , , 5-10
. , .

.
() NeedPrk ( ). , : (
Prdct), c InPrk (
). OutPrk (
, ).
, RealPrk ( , ). urDmd. Saturation ()
, :
urDmd >= 0.
. , , (
).
. Scope
, . , , . . 3.2.
.

.
. 3.3.

1648

5. Simulink

. 3.2. Simulink
Scope.

. 3.3.
.

1649

II MATLAB


Simulink. . Scope1.
MATLAB. Scope.
1.
. MATLAB .
Simulink ParkPrdct.mdl.
Simulation>start. Scope , . 3.4 3.5.

. 3.4. , ,
Scope1.

1650

5. Simulink

. 3.5. , , Scope.

.
, , . , . .
, , . . , , .
2. .
, , . , . . , , .
, . ,
,
. . .
3. . .
, -

1651

II MATLAB

. , .
, . . , , .
, , , . . .

1. . . .
.: -,1996.
2. ., . . .: , 1992.
3. . . . MATLAB_Simulink . .: , 2001.
4. . . .
.: , 2002.
5. . . . .
.: -, 2002.
6. . . . . .: , 1997.

1652

5. Simulink

613.314


SIMULINK
. ., . .,
, ,
e-mail:chernykh@etf.ustu.ru, vil@etf.ustu.ru

. .
(), ,
e-mail: reltec@vimcom.mplik.ru

: OrCad, Micro Cap, Electronic Work Bench . .


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

Simulink MATLAB
Sim Power System (SPS) . SPS , . ,

.

Sim Power System, ( ) Simulink.
1653

II MATLAB

. ,
( ) ,
( ). , ,
, , . , 1000
50,
210-5 . , 10100 , , : 0.010.001 c.
,
50-500
,
.

. :
1. .
2. . .
3. ,

.
4.
.
.
5. .
6.
-
.
7.
.
8. . 2 .

1654

5. Simulink

,
.

( ) .
. 1.

.1. .

Electro,
Teplo. Pulse Generator
,
. ( Electro),

( Teplo). Step Control Subsystem . . 2.

.2. .

1655

II MATLAB

Product
. ,
, , . ,
, . Timer
, , .
( )
Step Switch. Step Switch (. 3)
Constant , S-function . . 3 .

.3. .

S-function :
set_param(_,'maxstep',num2str(u) ),

set_param , _ Simulink-,
maxstep ( ),
u .
S- :
function [sys,x0,str,ts]=Set_Max_Step_Size(t,x,u,flag,m_name)
%
switch flag,
case 0,
[sys,x0,str,ts]=mdlInitializeSizes(m_name);
case 3,
sys=mdlOutputs(t,x,u,m_name);
case {1,2,4,9}
sys=[];
otherwise
error(['Unhandled flag = ',num2str(flag)]);
end
%
function [sys,x0,str,ts]=mdlInitializeSizes(m_name)
%
1656

5. Simulink

sizes = simsizes;
sizes.NumContStates = 0;
sizes.NumDiscStates = 0;
sizes.NumOutputs = 0;
sizes.NumInputs
= 1;
sizes.DirFeedthrough = 1;
sizes.NumSampleTimes = 1;
sys = simsizes(sizes);
%
x0 = [];
str = [];
ts = [-1];
%
function sys=mdlOutputs(t,x,u,m_name)
%
set_param( m_name,'maxstep',num2str(u) );
%
sys=[];

S- m_name . S- [1].

, . ,

,
.
. 4.

,
.
, R_variable, , . (. 5).
: ( ), .
T_In . .
,
.

1657

II MATLAB

. 4. .

. 5. .

(. 6)
, .
,
.

1658

5. Simulink

. 6. .

. 7 .

. 7. .

. 7, ,
,
.
. ,

1659

II MATLAB

. .

1. . . Simulink. .
M.: -, 2004. 496 .

1660

5. Simulink

621.878.25



SIMULINK
. ., . .
- ,
e-mail: lab360@sibadi.omsk.ru

() ()
.
, , ,
. ,
, [6].
[2] (. 1): , , , ,
(), , ()
.
P7
P1

P2

P4

P3

P9

P6

P5

P11

P8

P10

P12

P13

P14

P17

P15

P16
P18

. 1. - .

Pi.
(P1),
(P2),
1661

II MATLAB

(P11), ( , ). , , (P6), , (P5) (). , (3), (4) (7).


(8) (14) (15),
(10) , , ,

. (11)
(16).
() (17) (10).
(18), (12) (13), [7].
, , , .
,
[1]:

l
R y ( l ) = 2 A1e 1|l| + A2 e 2|l| sin ,
(1)

; 1, 2 ; 1, 2 ; .
(1)
[1]:
y(n) = a01x(n) + b11y(n-1) + a02x(n) + a12x(n-1) + b12y(n-1) + b22y(n-2), (2)
01, 02, 12, b11, b12, b22 [1].
:
1 m+ k
y( m ) =
(3)
y( n ) ,
M c n=mk
k = 0,5(Mc 1); Mc ; y(n) .
, , ,

:
k1 y p + k 2 y
y ( p )
(4)
W yy1 =
=
;
2
y1 ( p ) T1 y p + T2 y p + 1

1662

5. Simulink

W yy2 =

k3 y p + k4 y
y ( p )
=
;
y2 ( p ) T1 y p 2 + T2 y p + 1

(5)

W yF =

k5 y
y ( p )
=
,
F ( p ) T1 y p 2 + T2 y p + 1

(6)

y1, y2
; F
; kiy, Tiy ,
.
:
k1 p + k 2
( p )
(7)
Wy1 =
=
;
y1 ( p ) T1 p 2 + T2 p + 1
Wy2 =
M F

k3 p + k4
( p )
=
;
y2 ( p ) T1 p 2 + T2 p + 1

(8)

k 5
( p )
=
,
M F ( p ) T1 p 2 + T2 p + 1

(9)

F , , .
, :
k
y ( p )
p
p
Wy ( p ) =
= k1 + 2 1 e k3 e ,
(10)
p
y ( p )
y ; y ; ki , ; .
(11)
y = y + k tan( ),
k .
k = L / 2,
(12)
L .
h,
, y.

( F F )
, ,
[6].

1663

II MATLAB

,
[4]:
d 2
= J3
+ M f + M + ,
(13)
dt
; J3
; f
; , ; , ; 2 .
f = k Pf (v);
(14)
= k F;
(15)
= k sin ();
(16)
v = k 1,
(17)
Pf(v) ; ;
; ,
; 1 .
k = r / i,
(18)
r ; i .
[6]:
d 1
= J2
+ k 1 ,
(19)
dt
, ; J2
; k ,
.
, [7]:
C
;

1 ( p ) p + 1
W ( p ) =
=
(20)
( p ) C
> ,
p + 1
,
, ; , ;
.
() [5]:
L ( p )
k 1e p
W1 ( p ) =
;
(21)
=
( p + 1) p
U( p )

1664

5. Simulink

W 2 ( p ) =

M ( p ) k 2 e p

,
(22)
=
U( p )
p + 1
L ; , ; U
; k1 , ; k2
,
; ,
; .
(. 2), (2) (22),
.
, ,
( , .),
. , , .
( ),
,
, [3, 7].

. , ( ). , , .
,

.

: ( ) ( ),
,
,
.

1665

II MATLAB

?y1
v
F

?y2

MF

k1

k5y

k2

k
1
T1yp2 + T2yp + 1

tan
k3

U
1
Tp + 1

k1 L
p
k2

-p

J2

d
dt

C
Tp + 1

C
Tp + 1

v
Pf =f(v)

-p

sin

e-p

k5

?y

k3p + k4

1
T1yp2 + T2yp + 1

k3yp + k4y

k1p + ky

MF

k1yp + k2y

d
dt

J3

. 2.
.

,
. 3. b1 b2
( )
(b1 b2), . c , .
U
1

b2

b1
1

. 3. :
b1 ; b2 ; .
1666

5. Simulink

,
, h
, .
Simulink. ,
,
.

, , .

1. . . -
/ . . . , . : , 2004. . 1. .1. .152158.
2. . .
// - , , ,
: . .-.
. . 2. : - , 2003. .250253.
3. . ., . .
. .: , 1979.
280 .
4. . . . .: ,
1980. 215 .
5. . . :
. . . . , , 1997. 172 .
6. . ., . . // . . .
4. . : - , 2003. .7275.
7. . ., . . //
,
: .
.-. . : - , 2004. .219220.

1667