State space setup of a system Let's say we have a system $S$ which we model by a nth order ODE and its Lapace transform a transfer function $H(s)$.
A state space model $(A,B,C,D)$ is another way of modeling this and we have the canonical forms among many other ways to model it.
The question is weather there are restrictions in choosing state variables? According to the definitons of them it donst look like it has have to be related to the in/out-put equations very strongly.
Are we simply satisfied if the transfer functions agree and that the output $y$ is a sum of the states?
In the somewhat similar situation for ODE's when you go from ODE to first order system the systems are equivalent but it donst seem that the restiction is the same here in chooing state variables.
 A: If we consider a controllable and observable state space model 
$$\dot{\boldsymbol{x}}(t)=\boldsymbol{Ax}(t)+\boldsymbol{Bu}(t)$$
$$\boldsymbol{y}=\boldsymbol{Cx}(t)+\boldsymbol{Du}(t)$$ 
then it can be expressed in the frequency domain by a transfer function matrix $\boldsymbol{G}(s)$.
The representation in the state space formulation is not unique because you can always use a regular similarity transformation $\boldsymbol{z}=\boldsymbol{Tx}$ on the states such that the corresponding state space representation has changed while $\boldsymbol{G}(s)$ and the actual dynamics do not change. The dynamics are just described in a different coordinate system.
A: The state space representation is not unique. This is clear as the degrees of freedom for a state space is much higher than the transfer function.
Some of the most famous representations are:


*

*Controllable Canonical Form [1]

*Observable Canonical Form [2]

*Diagonal Canonical Form [3]

*Jordan Canonical Form [4]
However, it is important to represent the system in a minimal form. You can add many meaningless states which do not influence the output. Isn't it? They do not change the result but they waste time and memory of simulations or the controller.
For better numerical results, balancing is popular. See Gramian balancing of state space [5].
