I have a transfer function $$G(s) = e^{-5.8s}\cdot \frac{5}{s+5}$$
How to get the $\frac{dx}{dt} = Ax+Bu$ form out of it , The example is taken from Mathwork site
And when I Try to find the Z transform (discrete time ) of the same , I am getting struck at the point where HeavySide function comes , $$\frac{dx}{dt} + 5\cdot x = 5\cdot u(t-5.8)$$
In the Matlab , the c2d(G, 0.5,'zoh') , is giving me the result like
$$\frac{1}{z^{12}} * \frac{0.6321 z + 0.2858 }{z - 0.08208 }$$
the time sampling assumed here is $0.5$
Please explain the steps involved also.
In $Y(s)=G(s)X(s)$ transfer the denominator to the left side and apply the inverse Laplace transform to get $$ y'(t)+5y(t)=5x(t-5.8) $$ for the input function $x$ and the output function $y$. By the usual conventions $y(t)=x(t)=0$ for $t\le 0$
I switched from using the pair $(x,u)$ to the pair $(y,x)$, as $u$ has two conventional uses, ones as the unit ramp or Heaviside function, also denoted $\Theta$, and on the other hand as an arbitrary control input. Here it is used in the latter role. It is less confusing this way.
The $z$ transform produces a linear multi-step method to this problem. One could just take the Euler or better Adams-Bashford method and some interpolation procedure to get about the same result. Explicit Euler is unstable, let's try implicit Euler $$ y_{k+1} = y_{k}+\tau(x((k+1)\tau-5.8)-5y_{k+1}) $$ so that with $\tau=0.5$ and linear interpolation $$ 3.5y_{k+1}-y_k= 0.5(0.8x_{k-11}+0.2x_{k-10}) $$ making for a transfer function of $$ z^{-11}\frac{0.1142857+0.0285714z}{z-0.285714} $$
To replicate
c2d, according to https://www.mathworks.com/help/control/ug/continuous-discrete-conversion-methods.html, one needs to solve the equation for the step function, $u[k]=1$ for $k\ge 0$, $u(t)=1$ for $t\ge 0$, else zero. Then sample the output and compute the transfer function. $$ (e^{5t}y(t))'=5e^{5\cdot 5.8}\cdot u(t-5.8)e^{5(t-5.8)} \\ e^{5t}y(t)=e^{5\cdot 5.8}u(t-5.8)(e^{5(t-5.8)}-1) \\ y(t)=u(t-5.8)(1-e^{-5(t-5.8)}) $$ Then compute the discretization $$ Y[z]=\sum_{k=12}^\infty z^{-k}y(0.5k)=\frac{z^{-12}}{1-z^{-1}} -\frac{z^{-12}e^{-1}}{1-e^{-2.5}z^{-1}} $$ Now $U[z]=\frac1{1-z^{-1}}$, so that in their fraction $$ H[z]=z^{-12}\left(1-e^{-1}\frac{z-1}{z-e^{-2.5}}\right) =z^{-12} \frac{(1-e^{-1})z+(e^{-1}-e^{-2.5})}{z-e^{-2.5}} \\ =z^{-12}\frac{0.6321205588285577\,z+0.28579444254754355}{z-0.0820849986238988} $$ is exactly the result of the Matlab routine.