Why do I get an error "discrete solver cannot solve this model because it contains continuous states"?

If you want to use a completely discrete solution with no continuous states (the ‘discrete’ solver) and then use a local solver for the Simscape network, the documentation clearly states that the Simscape network appears to the global solver as discrete states only.  

However, you may get an error saying that ''the discrete solver cannot solve this model because it contains continuous states''. Why do I get such an error?

 Accepted Answer

If the SimScape network contains elements of the Gas and Thermal foundation libraries, the Simulink-PS filtering might be the cause of this error.
The 'Simulink-PS Converter' Block allows you to perform filtering on the input. In this specific case, the continuous state is introduced when the input is filtered. 
To work around that, please follow the following steps:
  1. Open the 'Simulink-PS Converter' block parameters
  2. Go to 'Input Handling'
  3. Disable filtering by selecting 'Use input as is' on the first drop-down menu. 
After performing these actions, your model should be able to update without an error.

More Answers (0)

Products

Release

R2016b

Community Treasure Hunt

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

Start Hunting!