Archived OpenModelica forums. Posting is disabled.

Alternative forums include GitHub discussions or StackOverflow (make sure to read the Stack Overflow rules; you need to have well-formed questions)


Forgot password? | Forgot username? | Register

Help withe der() operator

Help withe der() operator

Hello

I'm trying to make a block of an induction machine. In one of the blocks i have to implement the following voltage equations (this is the code i have):

equation
  vqs = ls * der(iqss) + m * der(iqrs) + rs * iqss;
  vds = ls * der(idss) + m * der(idrs) + rs * idss;
  vqr = m * der(iqss) + lr * der(iqrs) - m * wr * idss + rr * iqrs - lr * wr * idrs;
  vdr = m * der(idss) + lr * der(idrs) + m * wr * iqss + lr * wr * iqrs + rr * idrs;

where vqs, vds, vqr, vdr and wr are the inputs of the block and iqss,idss,iqrs and idrs are the state variables (and also the outputs of the blocks).

My question is if i can introduce the equations like this, using the der() operator in two different state variables in the same equation.

Thanks!

Re: Help withe der() operator

Yes, you can.
Don't forget that in the model, you don't have "inputs" and "outputs", but rather "parameters" and "variables".

There are 0 guests and 0 other users also viewing this topic
You are here: