0

I want to calculate the initial condition x0 of a sate-space representation of 2nd Order in order to use it in lsim command, using the initial system outputs (that I already have).

I know that an initial condition for 1st order looks like this: (sys includes the state-space vectors)

x0 = (y(1) - sys.d*u(1))*pinv(sys.c);

The problem for he second Order is that x0 is a vector x0 = [x(1) x(2)]. I have tried to solve it as an equation system but didn't get convinving results.

Ideas ?

Ben Jo
  • 71
  • 1
  • 15
  • You can not store two elements in one element: `X(k) = [x(k) ; x(k+1)]` – obchardon Feb 09 '17 at 10:29
  • I used the 0 in V(0) so that you see that it's the initial condition. And yes my problem is that I can't store the elements in `X(k)`. I couldn't find another solution to calculate my `X(1)` depending on both equations. – Ben Jo Feb 09 '17 at 10:35
  • I'm not sure to understand your explaination, but if you're perhaps looking for a cell. `X{1} = [x(1) ; x(2)];` ? – obchardon Feb 09 '17 at 10:39
  • Ben Jo, please reword your question. It is not at all clear what you are trying to do. – bremen_matt Feb 09 '17 at 11:33
  • @bremen_matt done :D – Ben Jo Feb 09 '17 at 13:03

1 Answers1

0

I would guess that the system is not observable. Please check that first.

bremen_matt
  • 6,902
  • 7
  • 42
  • 90