Initial state vector "X0" must be a real vector of length 70

Hi, I am trying to add some components (a generator) to a previously built system in Simulink (actually it is the "Power_wind" file) and getting the following message:
Initial state vector "X0" must be a real vector of length 70
How could I resolve this problem?
Even if I delete one of the components appears a similar message. Thank you for your help. Rick

 Accepted Answer

Go to your Simulink model, select menu "Simulation">"Configuration Parameters ...", click "Data Import/Export" at the left column, look at the right, do you see "Initial State" is checked and there is a "X0" there?
If Yes, that is try to use the value in the variable "X0" to set the initial state. Sounds like the value for "X0" in the workspace does not meet the criteria.
To make it work, set X0=zeros(1,70). This is just trying to see if it can pass this error stage. To set the proper value, you have to look into your own model or document.

4 Comments

It was a good hint that Fangjun Jiang gave. Changing the vector length solved partly the problem.
I say partly because, although the simulation runs, it does not complete the simulation. It stops somewhere around 65% of the simulation.
Is there a way to make the simulation finish ?
What do you mean? You try to run the simulation for 100 seconds but it stopped at 65 seconds? It must have some error messages.
Hi Fangjun,
my simulation time is 5s, but it stops at 3.22s. The message I get is:
SimPowerSystems processing network #1 of power_wind2 ...
Ready.
Warning: block 'power_wind2/Discrete
Frequency Regulator/Discrete
3-phase PLL/Discrete
Variable Frequency
Mean value/Discrete Variable
Transport Delay/S-Function ': Delay value exceeds maximum imposed by S Function
Delay must not exceed: 6.5536 seconds for a 0.0002 seconds sample rate!
I know it sounds silly without looking at what I'm working in, but do you have any suggestion for this message?
The message is clear. Delay value exceeds maximum imposed by S Function
Delay must not exceed: 6.5536 seconds for a 0.0002 seconds sample rate!
You need to look into that block to see how to resolve this.

Sign in to comment.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!