# Transfer function of LTI causal system

I have $$y(n)-3y(n-1)+2y(n-2)=4x(n)-2x(n-1)$$ that is the equation for a causal, discrete time LTI system. Using the Laplace Transform I rewrote it as: $$Y(s)-3e^{-s}Y(s)+2e^{-2s}Y(s)=4X(s)-2e^{-s}X(s)$$ And then I tried calculating $$H(s)=\frac{Y(s)}{X(s)}=\frac{4-2e^{-s}}{1-3e^{-s}+2e^{-2s}}$$ But the correct response for the transfer function is $$H(z)=\frac{4z(z-1/2)}{z^2-3z+2}$$ so I think I'm missing something here.

Then I have another problem, given what was calculated before, what should be the initial conditions so that the system's response to the unit step function are $$y(0)=1$$ and $$y(1)=3$$. The answer is $$y(-1)=1$$ and $$y(-2)=3$$ and I have no idea how I'm even supposed to calculate that, I'm assuming it has something to do with the Unilateral LaPlace Transform, but I'm very new to this and I don't even know how to start.

• You're dealing with a discrete-time system here, so you have to use the Z-transform instead of the Laplace transform. A delay by one sample corresponds to multiplication with $z^{-1}$. But you should really read up a bit on the Z-transform, and then come back with questions if you have any. Jan 17 at 12:42
• Good practice is to use square brackets for discrete signals, $x[n], n \in \mathbb{Z}$ and round brackets for time continuous signals $x(t), t \in \mathbb{R}$ Jan 17 at 13:21
• Try letting $z = e^s$; see if things start looking sensible. Jan 17 at 20:13

Almost there.

##### Transfer function

Let's do it in the $$\mathcal{Z}$$-domain: $$H(z) = \frac{4-2z^{-1}}{1-3z^{-1}+2z^{-2}}$$ Now multiply denominator and numerator by $$z^2$$ and you get the transfer function you're looking for.

##### Initial Conditions

Recall the unit step function: $$u[n] = \begin{cases} 0, &n < 0\\ 1, &n \geq 0 \end{cases}$$ Let's use your difference equation (notice, as per @Hilmar's comment, I'm using square brackets to indicate a discrete signal): $$y[n]-3y[n-1]+2y[n-2]=4x[n]-2x[n-1]$$

1. Using $$x[n] = u[n]$$ defined above, let's compute the difference equation for $$n=0$$ and substitute to satisfy $$y = 1$$. You should get: \begin{align}y - 3y[-1] + 2y[-2] &= 4x - 2x[-1]\\ -3 &=3y[-1] -2y[-2] \tag{1}\end{align}

2. Compute for $$n=1$$ and substitute to satisfy $$y = 3$$ (you'll also substitute $$y = 1$$). You arrive at (I'll let you do this one): \begin{align}y - 3y + 2y[-1] &= 4x - 2x\\ 1 &= y[-1] \tag{2}\end{align}

3. Finally, substitute (2) into (1) and solve for $$y[-2]$$