# state space formulation of a sinusoidal system

Let $f=A\sin{\omega t}=x_1$ and $\dot{f}=A\omega\cos{\omega t}=\dot{x}_1=x_2$. Let the output be $y=cA\omega$, where $c=1$ is a constant. I want to represent this in a state space formulation:

$\dot{x}=\underline{A}x+\underline{B}u$

$y=\underline{C}x+\underline{D}u$

What will $C$ be? I tried: $A\omega=\frac{A}{t}\arcsin{\frac{x_1}{A}}$, but does this make sense? Another possibility is $A\omega=\frac{-x_2}{\cos{\omega t}}$. Which one should I choose?

• I'm afraid this makes no sense at all. The output is a constant for all possible inputs? You use $A$ in the first line of your question, but a different (?) $A$ in the state-space equations. Do you realize that the system needs to be linear in order to be representable in this way? But given the output, the system can't be linear. And, BTW, you also got the sign of $\dot{f}$ wrong. Oct 31, 2014 at 9:11
• I think you're right, I will have a look and come back. Nov 2, 2014 at 1:40
• OK, we can think of this as if you have a meter that gives you the amplitude of the electric / magnetic field, $A\omega$ in this case. Only change in $\omega$ can cause a change in the output. Nov 2, 2014 at 14:35
• Specifically, the meter gives the average value, that's why change in time doesn't affect it. Nov 2, 2014 at 15:06

I make you an example about how to write state-space equations using a dynamic second order equation to let you understand the procedure.

The starting equation is: $$M a + C v + K s = f$$ $C$ is damping, $K$ is stiffness and $M$ is the mass.

Then build your state vector $x =\pmatrix{s\\ v}$

Now write the equation like $a = 1/M (f - C v - K s)$

$\dot{x} = \pmatrix{v\\ a}$ is the derivative of the state vector.

In the state space:

$\dot{x} = \pmatrix{0& 1, \\-K/M& -C/M} x + \pmatrix{0 \\ 1/M} f$

If you want the displacement as output

$y = \pmatrix{1\\ 0} x$

• Thanks but I do know how to write a SS model. I am afraid your answer is not related to my question above, but thanks again. Nov 3, 2014 at 23:30
• Since you chosed 2 states it means your starting equation was a second order equation right? Then it might be better if you show us the starting equation because it might be a problem related to the choice of the states variable
– Rhei
Nov 4, 2014 at 5:50
• Actually there is no equation. I simply wanted to apply state space model to a system where you have the an output y as above and states as above. I can't think of specific differential equation. Nov 4, 2014 at 5:51
• But what did you write inside matrix A and B if you have no equation?
– Rhei
Nov 4, 2014 at 16:37
• I wanted to model an electric field meter. The 'equation' is simply E=Acos(wt). I considered this to be a state, and then assumed the output is an RMS value, given by a constant, say Aw. Nov 4, 2014 at 17:43