How to start a simulation in steady-state ?
Show older comments
Hi everyone,
I have a question regarding how to the start of a simulation in simulink with the steady state signal (voltage in my case) from t=0s.
I have done the power flow initialization as well the steady-state initial state with the help of powergui but I still have a oscillating voltage, power output from the synchronous machine.
Do you have any idea how to get read of this transient ? For instance I'd like to start my simulation at t=0s with the state of t=0.6s

Thanks in advance !
Antoine
Accepted Answer
More Answers (2)
Fangjun Jiang
on 11 Sep 2020
0 votes
In Configuration Parameters, Data Import/Export, you can check and specify "Initial State".
You can also save "States" for your simulation. Do this first to figure out what are the states and their order and values.
In recent versions, there are "State Reader" and "State Writer" blocks. R2018a may not have it.
8 Comments
Antoine Dupuis
on 11 Sep 2020
Fangjun Jiang
on 11 Sep 2020
The methods I mentioned allow you to save/read and set/write state value, not necessarily the "steady state value". "Steady state" means the state values don't change, right? You don't have that in any of the above curves.
Antoine Dupuis
on 11 Sep 2020
Edited: Antoine Dupuis
on 11 Sep 2020
Fangjun Jiang
on 11 Sep 2020
First, in Data Import/Export, check the States as "xout" and set "Format" as "Array"
Then run the simulation for 0.6 seconds
Take the last row of "xout" and save it as "xInitial". This is the state value at t=0.6s.
Next, in Data Import/Export, check "Initial State" and specify "xInitial" as the value.
This is the way "to start my simulation at t=0s with the state of t=0.6s". It is not steady state because at the first simulation, it didn't reach steady state at t=0.6s.
Antoine Dupuis
on 13 Sep 2020
Fangjun Jiang
on 14 Sep 2020
The method that Paul pointed to is only available in later versions. It is certainly more convenient. I decided to try an example. It provded that this long available method worked perfectly. The example model is "f14".
The thing you might have missed is that, if you want to simulate only from 0.01s to 0.02s, you need to make sure that the model input is also the same. You might need to do some shifting on the input signals but the easist way to do this is to set the start time to be 0.1 and the stop time to be 0.2

Antoine Dupuis
on 14 Sep 2020
Fangjun Jiang
on 14 Sep 2020
Good to know. Thanks!
Dear All,
I am having the same issue you have already solved here, however, the page you linked to your answers does not exist any longer, do you mind sharing the information again?, please
I just want to make my PV system starts from steady state simulation time, in order to avoid the noise you can see in the following graph.

2 Comments
Fangjun Jiang
on 12 Dec 2025
Try starting from Speed Up Simulation Workflows by Using Model Operating Points and the doc pages linked therefrom. More generally, search the Simulink doc for "operating point" to find what's needed.
Categories
Find more on String in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!



