ECE 4300/5300 ELECTRICAL POWER SYSTEMS SPRING 2016 PROJECT #1 DUE 02/08/2016

advertisement
ECE 4300/5300 ELECTRICAL POWER SYSTEMS SPRING 2016 PROJECT #1
DUE 02/08/2016
In Homework #1 Question #1 two integral equations for iL and vC, as two states or variables, were
obtained for a simplified two-input RLC circuit shown in Fig. 1.
v1
Outputs
v2
iS
R2
R4
R1

iR
iC
VS1
vC
vL
L
iL
VS2
C
R3
Fig. 1
.(i) (a) Create a SIMULINK file to implement the integral equations. The SIMULINK implementation
is to include the following:
A temporarily array, y, in the MATLAB workspace using the To Workspace template given in Sinks
to temporarily store the source voltage Vs1, source voltage Vs2, iL, iC, vC, vL, is, iR, v1, and v2. A Scope,
given in Sinks, to accept the results of the source voltage Vs1, source voltage Vs2, iL, iC, is, iR, vC, vL, v1,
and v2.
(b) Two masked m2init (to initialize the parameters for the SIMULINK) and m2plot (to plot on the
Scope) blocks in SIMULINK. Here two MATLAB script files will be used to run m2init and m2plot
in SIMULINK placed on-command.
(ii) Initialize the integrators in SIMULINK with the proper initial values, iL(0) and vC(0), of the
two
states. Let R1 = 5 , R2 = 20 , R3 = 4 , R4 = 12 , L = 21.220659 mH, C = 265.25823 F, Vs1 =
20/0o V (sinusoid at frequency of 60 Hz), and Vs1 = 10/60o V (sinusoid at frequency of 120 Hz). Set
the start time to zero, a delay time of 0.05 seconds, the stop time to 0.5 seconds, the minimum step
size to 0.1 msec, a maximum step size of 1 msec, and an error tolerance of 1e-5. Use Adams/Gear
integration method. Plot individually the source voltage Vs1, source voltage Vs2, iL, iC, vC, vL, is, iR, v1,
and v2 on the Scope.
(iii)Create a MATLAB script file to initialize the SIMULINK parameters and to plot the results of the
source voltage Vs1, source voltage Vs2, iL, iC, vC, vL, is, iR, v1, and v2. Insert a pause between the
initialization portion and the plot portion of the script m-file. Run MATLAB first (there will be a
pause here) to initialize the parameters, run SIMULINK second, and then press the enter key to do the
plots.
(iv) Divide the MATLAB script file of part (iii) into two parts m-file m2init and m2plot for the
initialization and plot functions respectively and place the operations on-command using separate
masked blocks of part (i)(b). Doubled-click on m2init to initialize the parameters first (before starting
simulation) and run SIMULINK. After the simulation, doubled-click on masked block m2plot to plot
individually results of source voltage Vs1, source voltage Vs2, iL, iC, vC, vL, is, iR, v1, and v2.
Present all m-files, SIMULINK files, and output plots for parts (ii) and (iv). Also include a snap shot of
the Configuration Parameters.
Download