Jack
Jack

Reputation: 1232

Changing the parameter of the controlling system would cause the system stiff?

I got a model working fine with the following controlling system parameters,

Non-stiff system

but if I change one of the parameters, the system would be stiff and no chance to solve it at all. So my question is:

  1. Why changing just one parameter would cause the system stiff?
  2. If I meet the stiff problem again, how could I locate the exact parameter that causes the problem?

Stiff system

Upvotes: 3

Views: 239

Answers (2)

Atiyah Elsheikh
Atiyah Elsheikh

Reputation: 578

The answer is yes! Changing only one parameter value may cause the system to be stiff.

Assuming that a given model maps to an explicit ODE system:

dx/dt = f(x,p,...)

Conventionally, a system can be characterized as stiff via some stiffness indices expressed in terms of the eigenvalues of the Jacobian df/dx. For instance, one of these indices is the stiffness ratio: the ratio of the largest eigenvalue to the smallest eigenvalue of the Jacobian. If this ratio is large, some literature assume > 10^5, then the system is characterized to be stiff around the chosen initial and the parameter values.

The Jacobian df/dx as well as its eigenvalues is a time-dependent function of p and initial values. So theoretically and depending on the given system, one single parameter could be capable of causing such undesired system behavior.

Having a way to access the Jacobian and to perform eigenvalue analysis together with parametric sensitivity analysis, e.g. via computation of dynamic parameter sensitivities, identifying such evil parameters is possible.

Upvotes: 1

Markus A.
Markus A.

Reputation: 7525

DASSL is an implicit solver and should therefore be able to deal with stiff systems pretty well. Still it seems there are many >500 steps it has to do within <2s, as this is your output interval (which causes the message). In your case this could relate to fast dynamics that happen within the model.

Regarding your questions:

  1. If the model simulates to the end, check the controlled variables and see if the have fast oscillations (Frequency of > 100Hz) occur. This can happen when increasing the proportional gain of the controller, which is making the overall system "less stable".
  2. A general advice on this is pretty difficult, but the linearSystems2 library can help. Creating a "Full Linear Analysis" gives a list of states and how they correlate to poles. The poles with highest frequency are usually responsible for the stiffness and from seeing which states relate to poles of interest, indicates which states to investigate. The way from the state to the parameter is up to the modeler - at least I don't know a general advice on this.

For 2. applied to Modelica.Blocks.Examples.PID_Controller the result looks like: Full Linear Analysis of Modelica.Blocks.Examples.PID_Controller Seeing that likely the spring causes the fastest states in the system.

Upvotes: 6

Related Questions