4. How To Regenerate Initial Conditions: B$ i2 n: T, A3 }4 g3 C
This demo is set-up with all states initialized so that the simulation starts in steady-state. Otherwise, due to the long time constants of the electromechanical part of the wind turbine model and to its relatively slow regulators you would have to wait for tens of seconds before reaching steady-state. The initial conditions have been saved in the "power_wind_dfig_det.mat" file. When you start simulation, the InitFcn callback (in the Model Properties/Callbacks) automatically loads into your workspace the contents of this .mat file ("xInitial" variable specified in the "Initial state" parameter in the Simulation/Configuration Parameters menu). / D& f1 j/ {; |9 U3 t / e" J8 l8 h jIf you modify this model, or change parameter values of power components, the initial conditions stored in the "xInitial" variable will no longer be valid and Simulink will issue an error message. To regenerate the initial conditions for your modified model, follow the steps listed below: " x8 d( y2 z, J4 x& [& a) e
) l4 S; X9 Q3 s# E
In the Simulation/Configuration Parameters menu, uncheck the "Initial state" parameter. ; B' j6 o' H' ]0 rIn the 120 kV Three-phase Voltage Source menu, disable the source voltage step by setting the "Time variation of " parameter to "none". 7 n: s1 U. V& a
In order to shorten the time required to reach steady-state, you will have to temporarily decrease the inertia of the turbine-generator group. Open the DFIG Wind Turbine menu and in the Drive train data and Generator data, divide the H inertia constants by 10. , d3 d u. y6 i. Y2 uChange the Simulation Stop Time to 5 seconds. Note that in order to generate initial conditions coherent with the 60 Hz voltage source phase angles, the Stop Time must be an integer number of 60 Hz cycles. ' D; o$ ?$ }! t9 l9 y7 J
Change the Simulation Mode from "Normal" to "Accelerator". ~1 p# N G- I* ]9 }, GStart simulation. When Simulation is completed, verify that steady state has been reached by looking at waveforms displayed on the Scope. The final states which have been saved in the "xFinal" structure with time can be used as initial states for future simulations. Executing the next two commands copies these final conditions in "xInitial" and saves this variable in a new file (myModel_init.mat). ) B/ O/ i% K& V3 ~8 D+ D. o>> xInitial=xFinal; / E! S" D! _/ |) M: w
>> save myModel_init xInitial 0 s; H" l" n, b* j/ k7 o
In the File/Model Properties/Callbacks/InitFcn window, replace the first line of initialization commands with "load myModel_init". Next time you start a simulation with this model, the variable xInitial saved in the myModel_init.mat file will be loaded in your workspace. - c! ?' j6 {- `: e l9 F6 q" t
In the Simulation/Configuration Parameters menu, check "Initial state". - i( c7 X3 _; `5 n3 |$ VIn the Wind Turbine Generator and Drive train data, reset the inertia constants H back to their original values. ' X' P3 i# {$ [, ?' z$ z5 EStart simulation and verify that your model starts in steady-state. . o! v6 N' s3 K! Y( v6 V7 ZIn the 120 kV Three-phase voltage source menu, set the "Time variation of" parameter back to "Amplitude". # L6 J5 A; V; ~+ R1 e9 F
Change the Simulation Stop Time and Simulation Mode back to their original values (0.2 seconds, Normal). % K( o" {/ v# z* _Save your Model.