Beruflich Dokumente
Kultur Dokumente
Objective:
The purpose of this lab is to acquaint students with the following concepts practically:
Sampling
Rates of sampling
Up sampling/ Interpolation
Down sampling/ Decimation
Filtering within Sampling – More commonly known as the process of anti-aliasing.
Task 1:
Use your ‘sin’ function to generate a sine wave with f = 3kHz and sample it with fs = 8kHz.
Calculate its fft with zero frequency component in the middle. Plot it on a properly scaled w-
axis. Specify if there is aliasing or not?
Task 2:
Use your ‘sin’ function to generate a sine wave with f = 3kHz and sample it with fs = 5kHz.
Calculate its fft with zero frequency component in the middle. Plot it on a properly scaled w-axis.
Specify if there is aliasing or not?
3. Decimate the speech signal first by 2 and later by 3 and then perform step ii. Now
compare the fft of original and decimated signals and deduce your opinion about the
effect of aliasing by listening the reconstructed signal and their fft plots.
4. Now take the interpolated signal by 3 and perform step ii, afterwards decimate it by 2.
Play the signal listen to it check whether its quality has deteriorated or not due to aliasing.
Decimate the signal further by 2 until aliasing has appeared and voice quality of the
signal has deteriorated. Also observe how fft plot is affected due decimation and
interpolation.
Required code:
Step-3: Decimation
Step-4: Interpolation
Now follow the step-2 to take fft and and plot it.
Task 4:
Use your ‘sin’ or ‘cos’ function to generate a sinusoid wave having two components as f1 =
3kHz and f2 = 5kHz and then sample it with fs = 10kHz. Calculate its fft with zero frequency
component in the middle. Plot it on a properly scaled w-axis. Specify if there is aliasing or not?
If there is aliasing specify which component is casing the aliasing.
Code and output
Task 5:
Use your ‘sin’ or ‘cos’ function to generate a sinusoid wave having two components as f1 =
3kHz and f2 = 5kHz and then sample it with fs = 8kHz. Calculate its fft with zero frequency
component in the middle. Plot it on a properly scaled w-axis. Specify if there is aliasing or not?
If there is aliasing specify which component is casing the aliasing.