Pour la documentation en FRANÇAIS, utilisez l’outil de traduction de votre navigateur Chrome, Edge ou Safari. Voir un exemple.

Since v. 7.2.1, SSN sets all initial conditions to 0, unless SSN_USE_SPS_INITIAL_CONDITIONS_FILE is used.

Since v. 7.3.2 however, SSN supports initials conditions that are directly set in SPS blocks such as individual RLC elements. This can be useful to set initial DC capacitor voltages for example. The powergui block initial condition option must be set to ’blocks’ for this.

Since v 7.7.2, the ARTEMiS GUIde has an option to compute and start the SSN model in steady-state conditions. It important however to understand certain limitations of this option:

1- the steady-state conditions are computed independently in each lumped SSN subsystem. This means that 2 subnetworks connected by an ARTEMiS DPL will not start in steady-state because their initial conditions have been computed separately in each subsystems.

2- SSN-UCB, notably SSN Synchronous machines are not taken into account in the SSN steady-state calculation. For machines, a load-flow calculation is often required (and not yet available in SSN).

Setting SSN Initial Conditions with SSN_USE_SPS_INITIAL_CONDITIONS_FILE flag (see note 2)

It is possible to set the initial conditions (IC) of an SSN model, although not as easy as a standard SPS model. Again, the reason for this is most of the SPS code is hidden in p-files and unknown from the ARTEMiS coders. The method is shown here in R2015a-SP1 release (SPS version 6.3)

Step 1Set-up your model with the NIBs to run correctly with SSN, with the ARTEMiS Guide in the model.
Step 2

Remove the ARTEMiS Guide block, but leave the NIB. NIBs are transparent to regular SPS solvers.

Make sure the circuit starts with the initial conditions that you want. It should be normally the case because the standard SPS solver is used.

Step 3

Run the MATLAB command

>> SPS0 = power_analyze(bdroot,'detailed')
Step 4

Save the SPS0 variable in a mat-file using the command

>>save mymatfile SPS0



Note: The name of the file can be changed, but not the SPS0 name.



Step 5

In the MATLAB workspace

>> SSN_USE_SPS_INITIAL_CONDITIONS_FILE='mymatfile.mat';
Step 6Add back the ARTEMiS Guide block to your model and simulate. It should start in the same initial conditions as the model with only the SPS powergui block.
If the simulation does not start in the correct initial conditions, you should verify that there are no dependent state variables. If there is some, correct the model and go to Step 1. (for example, if inductance is state-dependent, adding a large resistor in parallel to it will make it independent)



Note 1: This initialization method can only work if there is only one topologically connected electric circuit in your model. If there are multiple non-connected electric circuits, SPS will generate multiple data structures internally and this method will fail.

Note 2: the SSN_USE_SPS_INITIAL_CONDITIONS method will soon be obsolete due to the capacity of SSN to compute automatically the steady-state conditions in v 7.7.2+.



Forcing Initial Conditions to Zero Programmatically

It is often desirable to simply set all electrical initial conditions to zero. This can be done effectively without using the SimPowerSystems powergui GUI and making the following command set_param(gcb,'X0status','zero') (with gcb pointing to the powergui block.)




  • No labels