4
$\begingroup$

I have a second order ODE with derivative terms

$$ \alpha_1\frac{d^2i}{dt^2}+\alpha_2\frac{di}{dt}+\alpha_3i=-\beta_1V_r-\beta_2\frac{dV_r}{dt}-\beta_3\frac{d^2V_r}{dt^2} $$

I want to transform this system into state-space, but I'm not sure how to manage the second derivative input term of $V_r$. I currently have defined $x_1$ and $x_2$ as the following.

$$ x_1=I\left(t\right) $$

$$ x_2=\dot{I}\left(t\right)+\frac{\beta_2}{\alpha_1}V_r+\frac{\beta_3}{\alpha_1}{\dot{V}}_r$$

Its derivatives are given as

$$ {\dot{x}}_1=\ \dot{I}\left(t\right)=\ x_2-\frac{\beta_2}{\alpha_1}V_r-\frac{\beta_3}{\alpha_1}{\dot{V}}_r$$

$$ {\dot{x}}_2=\ \ddot{I}\left(t\right)+\frac{\beta_2}{\alpha_1}{\dot{V}}_r+\frac{\beta_3}{\alpha_1}{\ddot{V}}_r=\ -\frac{\alpha_3}{\alpha_1}I-\frac{\alpha_2}{\alpha_1}\dot{I}-\frac{\beta_1}{\alpha_1}\ V_r $$

$$ where, \dot{I} = x_2-\frac{\beta_2}{\alpha_1}V_r-\frac{\beta_3}{\alpha_1}{\dot{V}}_r$$

$$ {\dot{x}}_2=\ -\frac{\alpha_3}{\alpha_1}x_2-\frac{\alpha_2}{\alpha_1}\left(x_2-\frac{\beta_2}{\alpha_1}V_r-\frac{\beta_3}{\alpha_1}{\dot{V}}_r\right)-\frac{\beta_1}{\alpha_1}\ V_r$$

Because I still have a $\dot{V}_r$ term in both $\dot{x}_1$ and $\dot{x}_2$, I am unable to transform the the system into the state-space representation. Let me know if you have any suggestions.

$\endgroup$
1
  • 2
    $\begingroup$ Start with $x_1=i+β_3/α_1V_r$, replace $i$ with $x_1$. Then define $x_2$ to capture all the (remaining) terms with a first derivative. $\endgroup$ Mar 24, 2022 at 18:10

1 Answer 1

7
$\begingroup$

A simple way to perform this is to first compute the transfer function, which is given by $$\dfrac{I(s)}{V_r(s)}=-\dfrac{\beta_3s^2+\beta_2s+\beta_1}{\alpha_1s^2+\alpha_2s+\alpha_3}.$$

Now we define

$$\dfrac{X(s)}{V_r(s)}=\dfrac{1}{\alpha_1s^2+\alpha_2s+\alpha_3}$$

and

$$\dfrac{I(s)}{X(s)}=-(\beta_3s^2+\beta_2s+\beta_1),$$

where $X(s)$ is the Laplace transform of the state.

This yields $$\dfrac{d}{dt}\underbrace{\begin{bmatrix} x\\\dot x \end{bmatrix}}_{X}=\underbrace{\begin{bmatrix} 0 & 1\\ -\frac{\alpha_3}{\alpha_1} & -\frac{\alpha_2}{\alpha_1} \end{bmatrix}}_{\mbox{$A$}}\begin{bmatrix} x\\\dot x \end{bmatrix}+\underbrace{\begin{bmatrix}0\\1\end{bmatrix}}_{\mbox{$B$}}V_r$$

together with

$$\begin{array}{rcl} I&=&-(\beta_3\ddot x+\beta_2\dot x+\beta_1x)\\ &=&-\beta_3\left(-\frac{\alpha_3}{\alpha_1}x-\frac{\alpha_2}{\alpha_1}\dot x+V_r\right)-(\beta_2\dot x+\beta_1x)\\ &=&\underbrace{\begin{bmatrix}-\beta_1+\dfrac{\beta_3\alpha_3}{\alpha_1}& -\beta_2+\dfrac{\beta_3\alpha_2}{\alpha_1}\end{bmatrix}}_{\mbox{$C$}}\begin{bmatrix} x\\\dot x \end{bmatrix}+\underbrace{-\beta_3}_{\mbox{$D$}}V_r \end{array}$$

If you have initial conditions, $X(0)=(x(0),\dot{x}(0))$, this can be easily considered using the explicit solution for state-space models which is given here by

$$X(t)=\exp(At)X(0)+\int_0^t\exp{(A(t-s))}Bu(s)ds$$ and

$$I(t)=CX(t)+Du(t).$$

$\endgroup$
4
  • $\begingroup$ Hi KBS, thanks for your response! Do you also know how I would impose the initial condition that $di\left(0\right)/dt=C$. $\endgroup$
    – TurboChad
    Mar 28, 2022 at 22:43
  • $\begingroup$ Sure, to see that, to what do correspond $x$ and $\dot{x}$? $\endgroup$
    – KBS
    Mar 28, 2022 at 22:48
  • $\begingroup$ Ok sorry I didn't quite understand what you were asking. I now assume you mean "what do $/dot{x}$ and $x$ correspond to". In that case, I would guess that they correspond to the output $i(t)$? Would I differentiate $I(t)$, set it equal to the constant, and then solve for the initial conditions on x? In all honesty this is my first time working with state space and I am quite unfamiliar with it. $\endgroup$
    – TurboChad
    Mar 28, 2022 at 23:09
  • $\begingroup$ What I mean is that $x$ and $i$ are related. When you get that, it is easy to consider an initial condition. If you are not familiar with state-space methods, then you may look at that for instance web.mit.edu/2.14/www/Handouts/StateSpaceResponse.pdf $\endgroup$
    – KBS
    Mar 28, 2022 at 23:15

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .