-1
$\begingroup$

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$

  1. day - $0.25$

  2. day - $0.125$

  3. day - $0.0625+05=0.5625$
  4. day - $0.28125$
  5. day - $0.140625$
  6. 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} $

  • 0
    How about $y(k)=\frac{1}{2}y(k-1)$ **if** $k \mod 3 \neq 0$ and $y(k)=\frac{1}{2}y(k-1)+0.5$ **if** $k \mod 3 = 0$? With initial condition $y(0)=0.5$2017-01-03
  • 0
    But is it possible to have both cases in one equation?2017-01-03
  • 0
    I edited my question and wrote hint which is given in example.2017-01-03
  • 0
    Maybe you are thinking about $$y(k)=\frac13\cos\left(\frac23k\pi\right)+\frac16+\frac12y(k-1)$$ which is one of these completely useless, and nevertheless closed, formulas?2017-01-03
  • 2
    you completely changed your problem, my answer stands for the initial version of your problem.2017-01-03
  • 0
    Yeah, this is definitely unpleasant...2017-01-04

2 Answers 2

0

You can as well put $y_0=1$ and :

  • $y_{3k+1}=\frac{1}{2}y_{3k}$
  • $y_{3k+2}=\frac{1}{2}y_{3k+1}$
  • $y_{3k+3}=\frac{1}{2}y_{3k+2}+\frac{1}{2}$

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 :

  • $x_k=(4+\frac{3}{8^k})/7$
  • $y_{3k+r}=x_k/2^r$ for $r=0,1,2$

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$.

0

You can proficiently exploit the linearity of the z-Transform and deal separately with the discharging and charging processes and then add the results. So

(note: I am using the "one-sided positive powers ($z^n$)" version)

Discharging

For this process we can write $$ y_{\,k} = \frac{1} {2}y_{\,k - 1} + 0.5\left[ {k = 0} \right] $$ where $[P]$ is the Iverson bracket $$ \left[ P \right] = \left\{ {\begin{array}{*{20}c} 1 & {P = TRUE} \\ 0 & {P = FALSE} \\ \end{array} } \right. $$ Therefore $$ \begin{gathered} F_{\,d} (z) = \sum\limits_{0 \leqslant \,k} {y_{\,k} \,z^{\,k} } = \frac{1} {2}\sum\limits_{0 \leqslant \,k} {y_{\,k - 1} \,z^{\,k} } + 0.5\sum\limits_{0 \leqslant \,k} {\left[ {k = 0} \right]\,z^{\,k} } = \hfill \\ = \frac{z} {2}\sum\limits_{0 \leqslant \,k} {y_{\,k - 1} \,z^{\,k - 1} } + 0.5 = \frac{z} {2}F_{\,d} (z) + \frac{1} {2} \hfill \\ \end{gathered} $$ i.e.: $$ F_{\,d} (z) = \frac{{1/2}} {{1 - z/2}} = \frac{1} {{2 - z}} $$

Charging

The charging process is not governed by a recursion: when to charge and how much to charge do not depend on the previous actions, yet just on the time (every $3$ days). That is, $y_{k}$ is just a function of $k$, a train of pulses of period $3$ days, starting at day $3$: $$ y_{\,k} = 1\left[ {k\bmod 3 = 0} \right]\left[ {0 < k} \right] = 1\left[ {k\bmod 3 = 0} \right] - \left[ {0 = k} \right] $$ Therefore $$ \begin{gathered} F_{\,c} (z) = \sum\limits_{0 \leqslant \,k} {y_{\,k} \,z^{\,k} } = \sum\limits_{0 \leqslant \,k} {\left[ {k\bmod 3 = 0} \right]\,z^{\,k} } - \sum\limits_{0 \leqslant \,k} {\left[ {k = 0} \right]\,z^{\,k} } = \hfill \\ = \left( {1 + z^{\,3} + z^{\,6} + \cdots } \right) - 1 = z^{\,3} \left( {1 + z^{\,3} + z^{\,6} + \cdots } \right) = \hfill \\ = \frac{{z^{\,3} }} {{1 - z^{\,3} }} \hfill \\ \end{gathered} $$

Charging+Discharging

Finally $$ F(z) = F_{\,c} (z) + F_{\,d} (z) = \frac{{z^{\,3} }} {{1 - z^{\,3} }} + \frac{1} {{2 - z}} $$

  • 0
    But what is recursion formula before z transform?2017-01-04
  • 0
    @AnaMatijanovic: I added more details about chraging to answer to your comment: hope it is more clear now.2017-01-04