The battery of a mobile phone discharges half every day. Every three days ($k = 3, 6, 9, ...$) the phone is charged $1Ah$ at midnight. On day $0$ it was with $0.5Ah$ charged. Determine a recursive equation in the time domain for the mobile phone battery $y (k)$ on the respective evening at $23:59h$ of the day $k$. Give $z$ transform of $y(k)$.
What I did..
0 . day - $0.5$
day - $0.25$
day - $0.125$
- day - $0.0625+05=0.5625$
- day - $0.28125$
- day - $0.140625$
day - $0.0703125+0.5=0.5703125$ $...$
$...$
$y(k)=0.5 \delta(k)+\frac{1}{2}y(k-1)....?$
I started with recursive formula but I don't know how to finish it. I used delta function for the day $0$ and $\frac{1}{2}y(k-1)$ because it will be discharged by half every day, but what to do with the part when mobile phone will be charged with $ 0.5Ah$ every three days?
Edit: It is given following hint in example: $\sum\limits_{n=0}^{\infty } z^-1=\frac{z}{z-1} $
$cos(x)=\frac{e^{ix}+e^{-ix}}{2} $
$sin(x)=\frac{e^{ix}-e^{-ix}}{2j} $
You can as well put $y_0=1$ and :
First you can search how does evolve $x_k=y_{3k}$ ?
$x_{k+1}=y_{3k+3}=\frac{1}{2}y_{3k+2}+\frac{1}{2}=\frac{1}{8}y_{3k}+\frac{1}{2}=\frac{1}{8}x_{k}+\frac{1}{2}$
Thus $x_k=\frac{x_0}{8^k}+\frac{1}{2}\sum\limits_{i=0}^{k-1}(\frac{1}{8})^i=\frac{1}{8^k}+\frac{1}{2}\frac{8}{7}(1-\frac{1}{8^k})$
So finally :
From there it is just mechanical to find the z-transform $F(z)=\sum y_k\,z^k$.
$F(z)=(1+\frac{z}{2}+\frac{z^2}{4})(\frac{4/7}{1-z^3}+\frac{24/7}{8-z^3})$ for $|z|<1$.