# State Space Model for diff equations

Posted 10 years ago
7508 Views
|
4 Replies
|
3 Total Likes
|
 Hello. I have read the reference about State Space Model and cannot catch one moment.Suppose we have a simple RC network consting from one capacitor and one resistor (passive differentiator).Supply voltage is u_In and output is u_RBy means of KVL: u_In == u_C + u_Rvoltage accross capacitor is a statethencomponents = {Subscript[u, C][t]' == 1/C i[t],   Subscript[u, R] == i[t] R}kirchhoff = {Subscript[u, in][t] ==    Subscript[u, C][t] + Subscript[u, R][t]}StateSpaceModel[Join[components, kirchhoff], {Subscript[u, C][t]}, Subscript[u, in][t], Subscript[u, R][t], t]But ouptut repeats inputcannot create state space. the same problem arrises when I try to create ssm of other circuits. when i am wrong? what is my mistake?
4 Replies
Sort By:
Posted 10 years ago
 All variables of time must be either a state variable or input.StateSpaceModel[Join[components, kirchhoff], {Subscript[u, C][t], Subscript[u, R][t], i[t]}, Subscript[u, in][t], Subscript[u, R][t], t] will give a descriptor state-space model.
Posted 10 years ago
 Thank You. That was my mistake.OK. All variables of time must be either a state variable or input, but after enteringStateSpaceModel[Join[components, kirchhoff], {Subscript[u, C][t], Subscript[u, R][t], i[t]}, Subscript[u, in][t], Subscript[u, R][t], t]I haveStateSpaceModel::invrlzn: The system of equations {Subscript[u, C]^\==i/C,Subscript[u, R]==R i,Subscript[u, in]==Subscript[u, C]+Subscript[u, R]} with outputs {Subscript[u, R]} does not possess a state-space realization. google, but nothing. please, help!
Posted 10 years ago
 There was another mistake in your original code that I forgot to mention. The expression is Subscript[u, C]' not Subscript[u, C]'.Here's the complete set of inputscomponents = {Subscript[u, C]'[t] == 1/C i[t], Subscript[u, R] == i[t] R};kirchhoff = {Subscript[u, in][t] == Subscript[u, C][t] + Subscript[u, R][t]};StateSpaceModel[Join[components, kirchhoff],      {Subscript[u, C][t], Subscript[u, R][t], i[t]}, Subscript[u, in][t], Subscript[u, R][t], t]
Posted 10 years ago
 Thank You
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.