# Upsample - filter - downsample

Given a discrete signal $r(nT_c)$ specified at a rate $T_c$, assume we want to resample with a 3/2 rate change to match the sampling rate of some other signal.

We would like to upsample it by 3, then filter it by filter of length $K$ and then downsample by 2.

Also assume we have the following relationship exists $$\frac{3}{2}T_s = T_c$$

Step 1: Upsample then we have

$r'(n\frac{Ts}{2}) = \left\{ \begin{array}{ll} r(n\frac{Ts}{3}) & \mbox{if$n = 0,3,6$};\\ 0 & \mbox{if OW}.\end{array} \right.$

Step 2: Filter

$\hat{r}(n\frac{Ts}{2})= \sum_{k=0}^{K-1}r(\frac{(n-k)T_s}{2})h_{filter}(k)\,\,\,\,\,\,\,n=0,1....$

Step 3:

$r_o(nT_s)= \hat{r}(n\frac{Ts}{2}-\underbrace{\frac{K-1}{2}\frac{T_s}{2}}{???}) \,\,\,\,\,n=0,1,$

I don't understand two of the above steps

1) why do we need use a filter to resample and

2) why isnt it the part underbrace $$\hat{r}(n\frac{Ts}{2}) \,\,\,\,\,n=0,1,....$$

Thank you very much.

## 1 Answer

1. Your goal is to create a signal with 3 times more samples. The first step is to insert 2 zeros between each sample.
Technically, you now have a signal with 3 time more samples, as you require. However most of the samples are zeros. What you need to do next is to interpolate the 2 samples between each 2 nonzero samples. And this is exactly what the low-pass filter does (or, at least, this one way to look at it).

2. Digital filters introduce delay to the signal by half the filter's length. I believe this is the reason for the time shifting

• why do digital filters introduce delay to the signal by half filters length? Thank you – Tyrone May 29 '15 at 15:24