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