How can I load initial states in Simpowersystems phasor simulation?

3 views (last 30 days)
Rodrigo Trevizan
Rodrigo Trevizan on 27 Jun 2016
Answered: Joel Van Sickel on 18 Aug 2021
I have started doing phasor simulations from a Simpowersystems model that works fine and then I have modified it. The modifications I made were not supposed to change the steady-state characteristics nor the initial conditions of the system, but when I try to run my modified version of it I get "NaN" initial states. Running Load Flow did not help. I keep getting "NaN" as states when I run Steady-State Tool. I get an error every time I run the Machine Initialization Tool. The workaround solution I thought of was "manually" setting the initial states to those from the working original system. I have tried loading initial states into one simulation using the Powergui Initial State Tool, but every time I run the simulation I get a warning message saying that the initial states were forced to steady state. I have also tried setting preferences of the Powergui for starting simulation with initial electrical states from blocks instead of steady, but when I load states on the Initial State tool the preferences change back to steady. I have also tried using the power_init(sys,'set','x0') command, but when I check the states again, I get states that are different from the ones I had set before. Do you know how I can set those initial conditions properly?
  1 Comment
Luciano Alves
Luciano Alves on 5 Jan 2017
You can try to use the CallBacks: in your simulink model go to File-->Model Properties -->Model Properties -->CallBacks-->InitFcn (put your initial conditions here)

Sign in to comment.

Answers (1)

Joel Van Sickel
Joel Van Sickel on 18 Aug 2021
This type of issue typically means something is off with the plant model since the tool is not getting the correct results. This will also cause problems with initial conditions as specialized power systems does try to start in a psuedo steady state. In these situations please provide working and broken models for reference.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!