# what is DSTATE?

It is defined as 'the values of the corresponding time derivative (DSTATE)' in API. However, I did not get it. Can anyone help?

Thanks.

edit retag close merge delete

Sort by ยป oldest newest most voted

In case you retrieve the state variable from the API, why don't you calculate it in an 'a posteriori' pattern, after the value of the state variable is available? You could calculate it as a divided difference, since the time step is known.

more

Thank you for the answer. The was the thing that came to my mind after RJG@PSM's answer. I think I'll go with this. I think what you suggest will work fine in quasi steady-state operation. During the transient, I think this is the best I can get. Thank you again for the answer.

( 2020-12-10 03:04:13 -0500 )edit

DSTATE is the derivate of the state variable, PSS/E looks at it during initialization to check if it is zero (in steady state the state variable is a constant).

more

Thank you for the answer. I am changing the state variable in every timestep. In this case, how do we know the derivative of the state variable? I mean we don't know the diff. algebraic equations corresponding the state variables. Is it OK if we just write something other than 0?

( 2020-12-10 00:26:42 -0500 )edit

Ideally, as mentioned above, DSTATE=0 at the start of your simulation will ensure that you get a "flat start" or "steady-state initial conditions". After that, you need to calculate DSTATE at each time step to do the numerical integration.

( 2020-12-16 01:49:14 -0500 )edit

@jfconroy Do I have to provide a derivative to PSS/E? Doesn't it have Differential Algebraic Equations which it can make a transition to next state(k+1)?

( 2020-12-16 04:18:58 -0500 )edit

If you are writing your own dynamic models, then you have to write the equations for DSTATE for each state variable that you need. If you are using "built-in" dynamic models, then there is no need for you to define DSTATE for any state variable.

( 2020-12-17 02:35:30 -0500 )edit

If you are seeing initialization warnings about DSTATE, when you are using "built-in" dynamic models, that means you need to adjust some load flow or dynamic model parameters, you do not need to re-write equations.

( 2020-12-17 02:36:18 -0500 )edit