Group Abstract Group Abstract

Message Boards Message Boards

0
|
9.3K Views
|
7 Replies
|
1 Total Like
View groups...
Share
Share this post:

Initial position issues when updating to SystemModeler from 5.0 to 5.1

Posted 7 years ago

I have recently updated SystemModeler from version 5.0 to 5.1 and now I have some issues with my model.

The first thing I noticed were new messages in the "Build log", the one that stands out the most being:

Notification: The initialization problem is underdetermined, the following variables where chosen to be initialized from their start values: ...

The model I have developed has many closed loops, that are correctly modelled in 5.0 with the appropriate selection of the state variables (using StateSelect). With the update to 5.1 the initial position is no longer correctly calculated, but it still works fine with 5.0.

Simulation works fine in 5.1 and 5.0, but 5.0 calculates correctly the initial position while 5.1 does not.

Can someone provide any insight for this?

POSTED BY: JOSE OLIVER
7 Replies
POSTED BY: Neil Singer
Posted 7 years ago

Thank you for your answer, Carl.

I will set all the variables from the initialization to fixed in order to completely determine the system.

In the past I had to fix the value of some variables in order to start at the desired location, but there is a limit to how many variables you can set before the problem becomes overdetermined.

The model is quite large and complicated, and it was kind of hard to make it all work together in version 5.0. I had a small panic attack when it failed to work in 5.1, it was a relief when it found the correct initial conditions again.

I would like to mention that I really appreciate the excellent job you are doing at Wolfram with SystemModeler.

Best regards,

Jose

POSTED BY: JOSE OLIVER
Posted 7 years ago

Hi Jose, good that you got it working.

Guess values can be a bit tricky. That a variable's start value is used as a guess value indicates that it is solved in a nonlinear system, typically together with other variables. Hence it is typically not only one variable's start value that matters, but several.

This is complicated further by the fact that the initialization is underdetermined, if WSM chooses different values to initialize exactly from their start values this might change which variables and equations are in the nonlinear system. This is one of the reason why we decided to add the "The initialization problem is underdetermined" notification in WSM 5.1.

You should be able to add fixed = true to the variables in the list shown in the "The initialization problem is underdetermined" notification. Your model's initialization should then be exactly determined (with the exception of nonlinear systems that might have more than one solution).

If you would like to fix other variables (whose initial values might be more relevant to change after build) you can try setting fixed = true to those instead (they don't need to be states). WSM will then try to set it up the way you requested, but if it can't you will get some kind of error or warning, like the ones you already saw or a warning that tells you that the initialization problem is overdetermined (which is typically undesirable). For complicated models I would suggest adding fixed = true one variable at a time, checking that you don't get any warnings or errors in the Build Log, then continue until it no longer says the initialization is underdetermined.

POSTED BY: Carl Jönsson
Posted 7 years ago
POSTED BY: JOSE OLIVER
Posted 7 years ago

It is a mechanical system defined using the MulitBody mechanics library. I can't set any more initial position values to fixed otherwise the simulation fails.

Build log:

Warning: The initialization problem is structurally singular, error found sorting equations

Simulation Log:

[ERROR]: In initialization. System of initial equations is not consistent.

I am trying to pin down the initial velocities of loops to see if this might solve the problem.

POSTED BY: JOSE OLIVER
POSTED BY: Neil Singer
Posted 7 years ago
POSTED BY: JOSE OLIVER
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard