# 0.3 Sampling, up--sampling, down--sampling, and multi--rate  (Page 5/5)

 Page 5 / 5
$FT\left\{{⨿}_{T}\left(t\right)\right\}={\int }_{-\infty }^{\infty }\sum _{n}\delta \left(t-nT\right)\phantom{\rule{0.166667em}{0ex}}{e}^{-j\omega t}\phantom{\rule{0.166667em}{0ex}}dt=\sum _{n}\int \delta \left(t-nT\right)\phantom{\rule{0.166667em}{0ex}}{e}^{-j\omega t}\phantom{\rule{0.166667em}{0ex}}dt$
$=\sum _{n}{e}^{-j\omega nT}=\left\{\begin{array}{cc}\infty \hfill & \omega =2\pi /T\hfill \\ 0\hfill & \text{otherwise}\hfill \end{array}$
$=\frac{\mathrm{2\pi }}{T}{⨿}_{\mathrm{2\pi /T}}\left(\omega \right)$

The multiplicative constant is found from knowing the result for a single delta function.

These “shah functions" will be useful in sampling signals in both the continuous time and discrete time cases.

## Up–sampling, signal stretching, and interpolation

In several situations we would like to increase the data rate of a signal or, to increase its length if it has finite length. This may be part of amulti rate system or part of an interpolation process. Consider the process of inserting $M-1$ zeros between each sample of a discrete time signal.

$y\left(n\right)=\left\{\begin{array}{cc}x\left(n/M\right)\hfill & M=0\left(\text{or}\phantom{\rule{5pt}{0ex}}n\phantom{\rule{5pt}{0ex}}=\mathrm{kM}\right)\hfill \\ 0\hfill & \text{otherwise}\hfill \end{array}$

For the finite length sequence case we calculate the DFT of the stretched or up–sampled sequence by

${C}_{s}\left(k\right)=\sum _{n=0}^{MN-1}y\left(n\right)\phantom{\rule{0.166667em}{0ex}}{W}_{MN}^{nk}$
${C}_{s}\left(k\right)=\sum _{n=0}^{MN-1}x\left(n/M\right)\phantom{\rule{0.166667em}{0ex}}{⨿}_{M}\left(n\right)\phantom{\rule{0.166667em}{0ex}}{W}_{MN}^{nk}$

where the length is now $NM$ and $k=0,1,\cdots ,NM-1$ . Changing the index variable $n=Mm$ gives:

${C}_{s}\left(k\right)=\sum _{m=0}^{N-1}x\left(m\right)\phantom{\rule{0.166667em}{0ex}}{W}_{N}^{mk}=C\left(k\right).$

which says the DFT of the stretched sequence is exactly the same as the DFT of the original sequence but over $M$ periods, each of length $N$ .

For up–sampling an infinitely long sequence, we calculate the DTFT of the modified sequence in Equation 34 from FIR Digital Filters as

${C}_{s}\left(\omega \right)=\sum _{n=-\infty }^{\infty }x\left(n/M\right)\phantom{\rule{0.166667em}{0ex}}{⨿}_{M}\left(n\right)\phantom{\rule{0.166667em}{0ex}}{e}^{-j\omega n}=\sum _{m}x\left(m\right)\phantom{\rule{0.166667em}{0ex}}{e}^{-j\omega Mm}$
$=C\left(M\omega \right)$

where $C\left(\omega \right)$ is the DTFT of $x\left(n\right)$ . Here again the transforms of the up–sampled signal is the same as the original signal except over $M$ periods. This shows up here as ${C}_{s}\left(\omega \right)$ being a compressed version of $M$ periods of $C\left(\omega \right)$ .

The z-transform of an up–sampled sequence is simply derived by:

$Y\left(z\right)=\sum _{n=-\infty }^{\infty }y\left(n\right)\phantom{\rule{0.166667em}{0ex}}{z}^{-n}=\sum _{n}x\left(n/M\right)\phantom{\rule{0.166667em}{0ex}}{⨿}_{M}\left(n\right)\phantom{\rule{0.166667em}{0ex}}{z}^{-n}=\sum _{m}x\left(m\right)\phantom{\rule{0.166667em}{0ex}}{z}^{-Mm}$
$=X\left({z}^{M}\right)$

which is consistent with a complex version of the DTFT in [link] .

Notice that in all of these cases, there is no loss of information or invertibility. In other words, there is no aliasing.

## Down–sampling, subsampling, or decimation

In this section we consider the sampling problem where, unless there is sufficient redundancy, there will be a loss of information caused byremoving data in the time domain and aliasing in the frequency domain.

The sampling process or the down sampling process creates a new shorter or compressed signal by keeping every ${M}^{th}$ sample of the original sequence. This process is best seen as done in two steps. The first isto mask off the terms to be removed by setting $M-1$ terms to zero in each length- $M$ block (multiply $x\left(n\right)$ by ${⨿}_{M}\left(n\right)$ ), then that sequence is compressed or shortened by removing the $M-1$ zeroed terms.

We will now calculate the length $L=N/M$ DFT of a sequence that was obtained by sampling every $M$ terms of an original length- $N$ sequence $x\left(n\right)$ . We will use the orthogonal properties of the basis vectors of the DFT which says:

$\sum _{n=0}^{M-1}{e}^{-j2\pi nl/M}=\left\{\begin{array}{cc}M\hfill & \text{if n is an integer multiple of}M\hfill \\ 0\hfill & \text{otherwise.}\hfill \end{array}$

We now calculate the DFT of the down-sampled signal.

${C}_{d}\left(k\right)=\sum _{m=0}^{L-1}x\left(Mm\right){W}_{L}^{mk}$

where $N=LM$ and $k=\mathrm{0,1,...,L-1}$ . This is done by masking $x\left(n\right)$ .

${C}_{d}\left(k\right)=\sum _{n=0}^{N-1}x\left(n\right){x}_{M}\left(n\right){W}_{L}^{nk}$
$=\sum _{n=0}^{N-1}x\left(n\right)\left[\frac{1}{M}\sum _{l=0}^{M-1}{e}^{-j2\pi nl/M}\right]{e}^{-j2\pi nk/N}$
$=\frac{1}{M}\sum _{l=0}^{M-1}\sum _{n=0}^{N-1}x\left(n\right){e}^{j2\pi \left(k+Ll\right)n/N}$
$=\frac{1}{M}\sum _{l=0}^{M-1}C\left(k+Ll\right)$

The compression or removal of the masked terms is achieved in the frequency domain by using $k=\mathrm{0,1,...,L-1}$ This is a length-L DFT of the samples of $x\left(n\right)$ . Unless $C\left(k\right)$ is sufficiently bandlimited, this causes aliasing and $x\left(n\right)$ is not unrecoverable.

It is instructive to consider an alternative derivation of the above result. In this case we use the IDFT given by

$x\left(n\right)=\frac{1}{N}\sum _{k=0}^{N-1}C\left(k\right)\phantom{\rule{0.166667em}{0ex}}{W}_{N}^{-nk}.$

The sampled signal gives

$y\left(n\right)=x\left(Mn\right)=\frac{1}{N}\sum _{k=0}^{N-1}C\left(k\right)\phantom{\rule{0.166667em}{0ex}}{W}_{N}^{-Mnk}.$

for $n=0,1,\cdots ,L-1$ . This sum can be broken down by

$y\left(n\right)=\frac{1}{N}\sum _{k=0}^{L-1}\sum _{l=0}^{M-1}C\left(k+Ll\right)\phantom{\rule{0.166667em}{0ex}}{W}_{N}^{-Mn\left(k+Ll\right)}.$
$=\frac{1}{N}\sum _{k=0}^{L-1}\left[\sum _{l=0}^{M-1},C,\left(k+Ll\right)\right]{W}_{N}^{-Mnk}.$

From the term in the brackets, we have

${C}_{s}\left(k\right)=\sum _{l=0}^{M-1}C\left(k+Ll\right)$

as was obtained in [link] .

Now consider still another derivation using shah functions. Let

${x}_{s}\left(n\right)={⨿}_{M}\left(n\right)\phantom{\rule{0.166667em}{0ex}}x\left(n\right)$

From the convolution property of the DFT we have

${C}_{s}\left(k\right)=L\phantom{\rule{0.166667em}{0ex}}{⨿}_{L}\left(k\right)*C\left(k\right)$

therefore

${C}_{s}\left(k\right)=\sum _{l=0}^{M-1}C\left(k+Ll\right)$

which again is the same as in [link] .

We now turn to the down sampling of an infinitely long signal which will require use of the DTFT of the signals.

${C}_{s}\left(\omega \right)=\sum _{m=-\infty }^{\infty }x\left(Mm\right)\phantom{\rule{0.166667em}{0ex}}{e}^{-j\omega Mm}$
$=\sum _{n}x\left(n\right)\phantom{\rule{0.166667em}{0ex}}{⨿}_{M}\left(n\right)\phantom{\rule{0.166667em}{0ex}}{e}^{-j\omega n}$
$=\sum _{n}x\left(n\right)\left[\frac{1}{M},\sum _{l=0}^{M-1},{e}^{-j2\pi nl/M}\right]{e}^{-j\omega n}$
$=\frac{1}{M}\sum _{l=0}^{M-1}\sum _{n}x\left(n\right)\phantom{\rule{0.166667em}{0ex}}{e}^{-j\left(\omega -2\pi l/M\right)n}$
$=\frac{1}{M}\sum _{l=0}^{M-1}C\left(\omega -2\pi l/M\right)$

which shows the aliasing caused by the masking (sampling without compression). We now give the effects of compressing ${x}_{s}\left(n\right)$ which is a simple scaling of $\omega$ . This is the inverse of the stretching results in [link] .

${C}_{s}\left(\omega \right)=\frac{1}{M}\sum _{l=0}^{M-1}C\left(\omega /M-2\pi l/M\right).$

In order to see how the various properties of the DFT can be used, consider an alternate derivation which uses the IDTFT.

$x\left(n\right)=\frac{1}{2\pi }{\int }_{-\pi }^{\pi }C\left(\omega \right)\phantom{\rule{0.166667em}{0ex}}{e}^{j\omega n}\phantom{\rule{0.166667em}{0ex}}d\omega$

which for the down–sampled signal becomes

$x\left(Mn\right)=\frac{1}{2\pi }{\int }_{-\pi }^{\pi }C\left(\omega \right)\phantom{\rule{0.166667em}{0ex}}{e}^{j\omega Mn}\phantom{\rule{0.166667em}{0ex}}d\omega$

The integral broken into the sum of $M$ sections using a change of variables of $\omega =\left({\omega }_{1}+2\pi l\right)/M$ giving

$x\left(Mn\right)=\frac{1}{2\pi }\sum _{l=0}^{M-1}{\int }_{-\pi }^{\pi }C\left({\omega }_{1}/M+2\pi l/M\right)\phantom{\rule{0.166667em}{0ex}}{e}^{j\left({\omega }_{1}/M+2\pi l/M\right)Mn}\phantom{\rule{0.166667em}{0ex}}d{\omega }_{1}$

which shows the transform to be the same as given in Equation 9 from Chebyshev of Equal Ripple Error Approximation Filters .

Still another approach which uses the shah function can be given by

${x}_{s}\left(n\right)={⨿}_{M}\left(n\right)\phantom{\rule{0.166667em}{0ex}}x\left(n\right)$

which has as a DTFT

${C}_{s}\left(\omega \right)=\left(\frac{2\pi }{M}\right)\phantom{\rule{0.166667em}{0ex}}{⨿}_{2\pi /M}\left(\omega \right)*C\left(\omega \right)$
$=\frac{2\pi }{M}\sum _{l=0}^{M-1}C\left(\omega +2\pi l/M\right)$

which after compressing becomes

${C}_{s}=\frac{2\pi }{M}\sum _{l=0}^{M-1}C\left(\omega /M+2\pi l/M\right)$

Now we consider the effects of down–sampling on the z-transform of a signal.

$X\left(z\right)=\sum _{n=-\infty }^{\infty }x\left(n\right)\phantom{\rule{0.166667em}{0ex}}{z}^{-n}$

Applying this to the sampled signal gives

${X}_{s}\left(z\right)=\sum _{n}x\left(Mn\right)\phantom{\rule{0.166667em}{0ex}}{z}^{-Mn}=\sum _{n}x\left(n\right)\phantom{\rule{0.166667em}{0ex}}{⨿}_{M}\left(n\right)\phantom{\rule{0.166667em}{0ex}}{z}^{-n}$
$=\sum _{n}x\left(n\right)\phantom{\rule{0.166667em}{0ex}}\sum _{l=0}^{M-1}{e}^{j2\pi nl/M}\phantom{\rule{0.166667em}{0ex}}{z}^{-n}$
$=\sum _{l=0}^{M-1}\sum _{n}x\left(n\right){\left\{{e}^{j2\pi l/M},\phantom{\rule{0.166667em}{0ex}},z\right\}}^{-n}$
$=\sum _{l=0}^{M-1}X\left({e}^{-j2\pi l/M}\phantom{\rule{0.166667em}{0ex}}z\right)$

which becomes after compressing

$=\sum _{l=0}^{M-1}X\left({e}^{-j2\pi l/M}\phantom{\rule{0.166667em}{0ex}}{z}^{1/M}\right).$

This concludes our investigations of the effects of down–sampling a discrete–time signal and we discover much the same aliasing properties asin sampling a continuous–time signal. We also saw some of the mathematical steps used in the development.

## More later

We will later develop relations of sampling to multirate systems, periodically time varying systems, and block processing. This should be avery effective formulation for teaching as well as research on these topics.

The following text is encoded in base 64. Ik5ldmVyIHRydXN0IGEgY29tcHV0ZXIgeW91IGNhbid0IHRocm93IG91dCBhIHdpbmRvdyIgLSBTdGV2ZSBXb3puaWFr Decode it, and paste the decoded text here
what to do you mean
Vincent
What is the command to list the contents of a directory in Unix and Unix-like operating systems
how can i make my own software free of cost
The name of the author of our software engineering book is Ian Sommerville.
what is software
the set of intruction given to the computer to perform a task
Noor
I want to know about prototype model in software engineering
Prototype Model is a replica model. In this we plan and build a rough application. Further we launch it for users and if they give their feedback or need any enhancement then we add-on requested features as per the system/user requirements.
KUMAR
between JavaScript and html,which is the best to master first?
You have to master HTML first before you do javascript. Actually Html is not a programming language it is used to make a skeleton of a webpage
Alfayo
Abel
what is a software
I am not proficient in any programming language though I am learning python currently, is it necessary to be proficient in programming language before one can undergo this course
what is software
The reason it all exists
Hi
Md
hlo
Ajay
Hii
Biddika
hu
Ajay
what is programming
software project scheduling
kis chij ka bro
shiv
Green chili
Arwaz
wellcome my friend
my
what is soft ware
my
the soft ware of education
my
hello
Hilal
I'm new here
Hilal
how to communicate with clients
hey hi good afternoon sir my name is Mohamed Kamara, I want to understand how to do it sir.
ok
Ronald
how are u sir, I want u to teach me please I want to know about softwares.
me too I need this knowledge
anthony
me too
Noor
what's up y'all..who is good at java? need help
Is it like a unit in software engineering or what?
Njuguna
Which SDLC Model will you select to develop the system as a software engineer and why?
Got questions? Join the online conversation and get instant answers!