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

SE#7(1).

qxd

2/22/2006

12:50 PM

Page 22

, 12006

MATLAB
5.

,

, : ,
-
. Simulink
SimPowerSystems ,
. ,
14.

,
. . .,

kaf21@aanet.ru

, . - ()
.
, [1].
1. - .
: 310 , 1 , 50 1

Simulink\Extra Library\
Discrete Control Blocks

Discrete PWM Generator


(. . 1)

SimPowerSystems\
Electrical Sources

DC Voltage Source
DC

Amplitude (V) 310

SimPowerSystems\
Power Electronics

Universal Bridge

Number of bridge arms 2


Port configuration ABC as output terminals
Power Electronic devices MOSFET/Diodes

SimPowerSystems\ Elements

Series RLC Branch


RLC
Resistance
Inductance
Capacitance

10
0,005
C = inf

SimPowerSystems\Measurements

Current Measurement In

SimPowerSystems\Measurements

Voltage Measurement
Um

Simulink\Sinks

Scope

SimPowerSystems\Connectors

Ground (output) ()

SimPowerSystems\Connectors

Lconnector L
( )

SimPowerSystems

Powergui

Sample Time (s) 1e5

22

0,95.
10 , 5 . MOSFET-,
.
. 1 , , , 1.


Discrete PWM Generator (. 1). (. 1),
(: ) .
Parametrs .
Generator Mode ( ). :
1-arm bridge (2 pulses)
(2 );
2-arm bridge (4 pulses)
(4 );
3-arm bridge (6 pulses)
(6 );
Double 3-arm bridge (12 pulses)
(12 );
Carrier frequency (Hz) ();
Sample time ;
Internal generation jf modulating signal(s) () (). .
Modulation index () ( 0 1).
Frequency of output voltage (Hz) ();
Phase of output voltage (degrees)
().

. 1,
0,95 ,
.
www.finestreet.ru

SE#7(1).qxd

2/22/2006

12:50 PM

Page 23

, 12006

. 1.
()
Discrete PWM Generator ()
Universal Bridge ()


Universal Bridge ,
, (. 1). , . ,
, Invert, Simulation/
Simulation parameters, Stop
time 0,1,
Max step size auto.

ode15s.
Powergui
Sample time (. 2).

RL-
(. 3). , 0,02 (. 3)
.
,
,
1 , L.
. 3. .

50 (. 3). , ,
(. 3).
. Parametrs,
, www.finestreet.ru

Scope
Parametrs. Data history
.
Limit
data points to last, Variable name (
) , In. Format ()
Structure
with time ( ). , , Um. -

. 2.
Powergui

Powergui
Sample time,
0,10,01
. = 0,001,
0,00001. Powergui , (. 1
).
.
Powergui
(. 2),

. 3. (, ) (, )

23

SE#7(1).qxd

2/22/2006

12:50 PM

Page 24

, 12006
FFT
Analysis Powergui: FFT
Tools (. 4).
( ):
Structure []
, In Um, ;

Input ;
Signal number ;
Start time (s) [ ] , ;
Number of cicles [ ] , ;
:
Display FFT window ;
Display entire signal .
:
Fundamental frequency (Hz)
();
Max Frequency (Hz) ,
;
Frequency axis .
Hertz () Harmonic order
( );
Display style . :
Bar (relative Fund. or DC) ( );
List (relative Fund. or DC) ( );
Bar (relative to specified base)
( );
List (relative to specified base)
( ).
Base value .

(. 4): In 1;
0,01 (

); 4 (
5,
); FFT ;
50 ; 2500 ;
;
. Display
4 In (. 4). , 50
29,17 . -

1%
(0,3 ) .

2 . , THD Total
Harmonic Distronsion, 7%. . 4 , ,
, THD (- 5 ).
Um (. 4) 295 , 2 65 (. 4).
1%.
43,7%.



. ,
,
. . 5
, . I, U
t To Workspace ( Simulink, Sinks) Clock
( Simulink, Sources)
(. 5). Clock Decimation.
1. To Workspace
Variable name
I, U t ( ), Decimation ( 10), 0,00001 Save format ( )
Array.
Invert_W, , -

. 4. Powergui: FFT Tools


In () Um ()

( )

24

. 5. ()
()

www.finestreet.ru

SE#7(1).qxd

2/22/2006

12:50 PM

Page 25

, 12006
.
,
MATLAB View/
Workspace. ,
(. 5). ,
- 1001N1 I, U, t.

MATLAB

. 7. ()
()

plot (t, I)

,
t I.
. ( Enter) ,
(. 3),
(. 6). U ,
plot (t, U).

. 6. I
,

-
( I) . File/New/M-file (
Untitled), . (. 7) .
.

% .
,
10 . 10001, . , Nd.
,
MATLAB ()
2n.
, .
www.finestreet.ru

(. 7)
fft ( -
I ) abs
.
, MATLAB, , help fft. , t(1:250), s(1:250)
, . File/Save As
- , Furie,
.
Debug/Save and Run
Debug/Run ( ,

). . 7 , . , 15 , .
.
- 2 ,
. 4.




. ,

. MATLAB , ,

. ,
, .
, MATLAB, .
n-

(1)

(1) , ; x(t) ; u(t) ; y(t) ()


; A, B, C, D : A
, nxn n, ; B , n, ; C
( , n); D ( ,
).
power2sys, , SimPowerSystem
Simulink.
:
power2sys A, B, C, D
, (1). Simulink MATLAB.
:
power2sys('sys', 'structure')


sys.
power2sys('sys', 'ss')

A, B, C, D.

power2sys SimPowerSystem. , ss state
space ( ). LC- , ,
.
R (. 8).
-

25

SE#7(1).qxd

2/22/2006

12:50 PM

Page 26

, 12006
2

Simulink\Sources

Signal Generator

Wafe form sin


Amplitude 1 V
Frequency 1000 Hz

SimPowerSystems\
Electrical Sources

Controlled Voltage Source


Source Type AC

SimPowerSystems\Elements

Series RLC Branch


RLC
Resistance R
Inductance L1
Capacitance C1
Inductance L2
Capacitance C2

SimPowerSystems\Measurements

Voltage Measurement

Simulink\Sinks

Scope

SimPowerSystems\Connectors

Lconnector L

. 8.
LC-

.

power2sys LC-.
2. LC- L1 = 15 ,
C1 = 2 R = 8 LC- L1 = 15 ,
C1 = 2 , L2 = 3 , C2 = 15 , R = 8
.

. 9 ( LC_1_Filter)
. 9 ( LC_2_Filter),
2.
LC_1_Filter .
(. 10). MATLAB
:
>> H1=power2sys('LC_1_Filter', 'ss')

Uc C1,
U_Voltage Measurement
Uc_C1 U_Controlled.
, Continuoustime model. tf, 1 (ss-)
s, .
ss-, :

R = 8 , L = 0, C = inf
R = 0, L = 0,015, C = inf
R = 0, L = 0, C = 2e6
R = 0, L = 0,003 , C = inf
R=0, L=0, C = 15e6

b=
U_Controlled
Uc_C1=2e-6
0
Uc_C2=15e-6
0
Il_L1=0.015
1000
Il_L2=3e-3
0
c=
Uc_C1=2e-6 Uc_C2=15e-6 Il_L1=0.015 Il_L2=3e-3
U_Voltage Me
0
1
0
0
d=
U_Controlled
U_Voltage Me
0
Continuous-time model.

>> W1=tf(H1)
>> W2=tf(H2)

, , , ( ),

Uc_C1=2e-6
-6.25e+004
-1000

Uc_C1=2e-6
Il_L1=0.015

U_Controlled
0
1000

Transfer function from input U_Controlled Voltage Source to output U_Voltage Measurement:
5e008
-----------------------s^2 + 6.25e004 s + 5e008

a=
Uc_C1=2e-6
Il_L1=0.015

Il_L1=0.015
5e+005
0

,
. 10, :

b=

c=
U_Voltage Me
d=

Uc_C1=2e-6
1

Il_L1=0.015
0

>> H2=power2sys('LC_2_Filter', 'ss')


a=

U_Controlled
U_Voltage Me
0
Continuous-time model.

, Il L1

Uc_C1=2e-6 Uc_C2=15e-6 Il_L1=0.015 Il_L2=3e-3


Uc_C1=2e-6
0
0
5e+005
-5e+005
Uc_C2=15e-6
0
-6667
0 6.667e+004
Il_L1=0.015
-1000
0
0
0
Il_L2=3e-3
333.3
-333.3
0
0


, .
.
Transfer function from input U_Controlled Voltage Source to output U_Voltage Measurement:
1.111e016
-------------------------------------------------------s^4 + 6667 s^3 + 6.889e008 s^2 + 4.444e012 s + 1.111e016


( ),
MATLAB

. 9. - ()
() LC-

26

www.finestreet.ru

SE#7(1).qxd

2/22/2006

12:50 PM

Page 27

, 12006

>> freqs([5e008],[1 6.25e004 5e008])

(. 11), , (magnitude)

() .

>> bode(W2)
>> freqs([1.111e016],[1 6667 6.889e008 4.444e012 1.111e016])

. 10.
- () () LC-

>> bode(W1)


(. 11). , 0
100 , 1 .
180.
- ,

, freqs , .
, s , .
:

(. 11, ).
,
( ) 180 360 -
.

,

.

0 180,
, .

. 11. (, ) - (, ) LC- (, ) (, )

www.finestreet.ru

27

SE#7(1).qxd

2/22/2006

12:50 PM

Page 28

, 12006

. 12. - LC-


,
10 180.
,
, - .

MATLAB c2d.
WZ=c2d(sys,Ts,'met')


sys, Ts met.

help c2d.

tustin.
.
, W2.
:
>> WZ2=c2d(W2,2e-5,'tustin')


,

Sampling time
Transfer function from input U_Controlled Voltage Source to output
U_Voltage Measurement:
9.746e-005 z^4 + 0.0003898 z^3 + 0.0005847 z^2 + 0.0003898 z + 9.746e-005
------------------------------------------------------------------------z^4 3.617 z^3 + 5.142 z^2 3.399 z + 0.8753
Sampling time: 2e-005

28

freqz,
, :
>> freqz([9.746e-005 0.0003898 0.0005847 0.0003898 9.746e-005],[1 3.617 5.142 -3.399 0.8753])

. 12.
, , 0,17 fs/2 = 0,5/Ts. , 1, 180 .
180
360, .


ltiview
ltiview
( )
.
.
ss ( ),
tf (
) zpk ( ,
,
).

() MATLAB. MATLAB
ltiview. (. 13),

,
.
, ,
, -

H2 ss, . LTI View


File/Import.
Import System Data System in Workspace. H2
(. 13).
OK. LTI View

(. 13).
, LTI View
Edit/Plot Configurations Plot
Configurations (. 13).
1 (
) Response type . OK, LTI View
(. 13).
:
Step ;
Impulse ;
Bode ;
Bode Magnitude
;
Niquist ();
Nicols ;
Singular Value
;
Pole/Zero .
. 13 .
, s, :

s = j,
.
0 .
5.
1.
Powergui.
,

Powergui: FFT Tools
.
2. , ,
.
3.
MATLAB
power2sys
.
www.finestreet.ru

SE#7(1).qxd

2/22/2006

12:50 PM

Page 29

, 12006

. 13. LTI View (, , , ), Import System Data () Plot Configurations ()


4.

( ),
.
5. c2d
-

www.finestreet.ru


.
6. ltiview
.

1. - . .

MATLAB (R13) //
Exponenta PRO. .
2003. 2. . 8082.

29

Вам также может понравиться