# Derive state space from initial value problem

I am given the following initial value problem $$\ y^{(4)} - y = u \$$ with $$\ y^{(3)}(0)=0, \ddot{y}(0)=1, \dot{y}=1, y(0)=10 \$$ and am supposed to calculate the state space in the usual form

$$$$\dot{x} = f(x,y)$$$$

$$$$y = h(x,y)$$$$ with $$$$x^T = \begin{bmatrix} x_1 & x_2 & x_3 & x_4 \end{bmatrix} := \begin{bmatrix} y & \dot{y} +\ddot{y} & \dot{y} -\ddot{y} & y^{(3)} \end{bmatrix}$$$$

The initial values are non-zero, so Laplace transform and calculating $$\ G(s) \$$ as $$\ \frac{Y(s)}{U(s)} \$$ and then deriving the state space from the transfer function $$\ G(s) \$$ wont work, since we will get:

$$$$s^4Y(s)-s^3y(0)-s^2\dot{y}(0)-s^\ddot{y}(0)-y^{(3)}(0)-Y(s) = U(s)$$$$

$$$$s^4Y(s)-10s^3-s^2-s-Y(s) = U(s)$$$$

$$$$Y(s)(s^4-1)-10s^3-s^2-s = U(s)$$$$

And $$\ -10s^3-s^2-s \$$ is a problem here

So i did it the usual way and transformed the 4th order DE into a 1st order DE-system.

$$$$\begin{bmatrix} \dot{x}_1 \\ \dot{x}_2 \\ \dot{x}_3 \\ \dot{x}_4 \end{bmatrix} = \begin{bmatrix} 0 & 0.5 & 0.5 & 0 \\ 0 & 0.5 & -0.5 & 0 \\ 0 & -0.5 & 0.5 & 0 \\ 1 & 0 & 0 & 0 \end{bmatrix} \times \begin{bmatrix} x_1 (=y) \\ x_2(=\dot{y}+\ddot{y}) \\ x_3(=\dot{y}-\ddot{y}) \\ x_4(=y^{(3)}) \end{bmatrix} + \begin{bmatrix} 0 \\ 0 \\ 0\\ 1 \end{bmatrix} u$$$$

I think this should be right. Now, how do i implement the initial values in this state space?

Later i am supposed to execute a linear state transform to

$$$$\dot{z} = \tilde{A}z+\tilde{B}u$$$$ $$$$y = \tilde{C}z+\tilde{D}u$$$$ with $$$$z^T = \begin{bmatrix} z_1 & z_2 & z_3 & z_4 \end{bmatrix} := \begin{bmatrix} y & \dot{y} & \ddot{y} & y^{(3)} \end{bmatrix}$$$$

but i think i can not execute the linear state transform just now, since the initial values are not represented in the state space above, as of now.

Here are a few theorems, Theorem 4 is just the linear state transformation, Theorem 5 is just matrix exponentials, Theorem 6 i sadly dont really get what its used for and Theorem 7 is just stating that the output response is invariant under a linear state transformation.

Does any of these Theorems, especially Theorem 6 have to do with initial conditions?

how do i implement the initial values in this state space?

they are literally the initial condition of the ODE, they won´t show up on the definition of $$\\dot{x}\$$ but on the definition of $$\x(0)\$$ (or whichever point you choose as the starting one of the trajectory.)

but i think i can not execute the linear state transform just now, since the initial values are not represented in the state space above, as of now.

If you have the system

\begin{align} \dot{x} &= Ax +Bu \\ x(0) &= x_0\end{align}

and you transform $$\x\$$ into $$\z = Tx\$$, where $$\T\$$ is a square matrix of appropriate size, you can then find $$\\dot{z}\$$ which will be

\begin{align} \dot{z} &= T\dot{x} = TAx + TBu \\ z(0) &= Tx(0)\end{align} lastly, for an invertible $$\T\$$ we have that $$\x = T^{-1}z\$$.

• So you dont even include it in the state space itself but just put all initial conditions below? So i can just transform the state space from $x$ to $z$ at this point already? What about the zero-initial state and zero-input response? $$x(t) = x_h(t) + x_p(t)$$ I also have these weird formulas : $$x(t) = e^{At}x_0 + \int_{0}^t e^{A(t)-\tau} Bu(\tau)d\tau$$ $$y(t) = Ce^{At}x_0 + \int_{0}^t Ce^{A(t)-\tau} Bu(\tau)d\tau+Du(t)$$ I dont need them for this exercise? Commented Aug 20, 2023 at 22:17
• I cant add photos in the comments so i will add a few theorems which confuse me and i thought i will need to use for this exercise. Thanks a lot! Commented Aug 20, 2023 at 22:21
• Dont $A,B,C$ and $D$ need different multiplications with $T^{-1}$ and $T$ looking at Theorem 4 above? Thanks a lot, i really appreciate your help! Commented Aug 20, 2023 at 22:46
• Well, if you read it carefully you will notice that I defined $z = Tx$ while the Theorems you later added define $x = Tz$, that is why all that is $T$ on my equations becomes $T^{-1}$ in your book.
– jDAQ
Commented Aug 20, 2023 at 23:06
• You are dealing with a linear ODE, that is why you can decouple the response to initial conditions and to the input $u(t)$
– jDAQ
Commented Aug 20, 2023 at 23:08