Académique Documents
Professionnel Documents
Culture Documents
Brief Description:
Write a C program to design N-tap bandpass FIR filter for a sampling rate of fs kHz using Hamming
window. Compile the code on TMS320C6716 DSK using code composer studio (CCS). The
passband should extend from f1 kHz to f2 kHz. Store the filter tap coefficient and plot in The
MATLAB. Also compare your result using FDA tool in MATLAB. Discuss the results.
Procedure/Observations:
1. Write a program in C code for FIR filter implementation with parameters
specified in the object
2. Please see the instruction manual to build and compile a new project on
TMS320C6716 DSK using code composer studio given appendix A.
3. Obtain the filter response in MATLAB plot using the filter coefficient obtained by
your compiled program.
4. Verify your results with MATLAB FDA apps.
Results: Note down the filter coefficients and attached the print of the filter response plots.
Discussion:
1. Discuss the difference between fixed point and floating point processor.
2. Write comments on your obtain plots.
3. Discuss the criteria to select the windowing techniques for filter design.
Experiment 2
Object: Efficient DFT implementation on TMS320C6716 DSK using C coding
Brief Description:
Write a C program to calculate the 8 point (complex data) DFT using decimation-in-time FFT
algorithm using in-place computation. Compile your code on TMS320C6716 DSK using CCS.
Take any arbitrary sequence of length 8 and obtain the DFT output. Also obtain the DFT output
for the same sequence using MATLAB and verify both the results.
Results:
1. Enter the data input and note the program output.
2. Verify your result from MATLAB fft command for same data input.
Discussions:
1. Compare the complexity of implementation required to calculate N point FFT of real and
complex data.
2. What is in-place computation?
3. Discuss the result obtained.
Experiment 3
Object: Study of up-sampling, down-sampling and moving average filtering using MATLAB
Brief Description:
(a) Write a MATLAB code to generate an arbitrary discrete time sequence of length N and obtain
its time and frequency domain plot. Also obtain the time and frequency domain plot of the
upsampled and down sampled signal by factor 4.
(b) Transmit the signal through additive noise channel. (Consider channel to AWGN with signal
with mean and variance 2). Plot the time and frequency domain behavior of the output signal
corrupted by the noise.
(c)Now consider a moving average (MA) filter defined by following equation:
1
1
[] = [ + ]
=0
In this equation, x[.] is the input signal, y[.] is the output signal, and M is the number of points used
in the moving average. This equation only uses points on one side of the output sample being
calculated. Filter the noisy signal with MA filtering having M=11 and plot the filtered signal.
(c) Write the discussion based on plots obtained.
Procedure: Develop a MATLAB code for any arbitrary values of N, up sampling, down sampling ratio
and M.
Results:
1. Take N=32, =0 and variance 2 =1. Obtain all the desired plots.
2. Change M=4, and plot MA filter output.
3. Chnage M=20 and plot MA filter output.
4. Take N=64, =0.5 and variance 2 =3. Repeat step 1, 2 and 3.
Discussions:
1. Write the practical application of up sampling and down sampling.
2. Effect of MA filtering on noisy signal.
Experiment 4
Brief Description:
(a)Write MATLAB codes to obtain the time and frequency domain responses of the rectangular,
Hamming, Hanning, Kaiser and Blackman window using their mathematical expressions. Plots the
time and frequency domain response of the different windowing techniques by varying the design
parameters. Consider the length of window is 32 for each case.
(b) Also obtain the above responses using MATLAB in-built functions and compare with your
results.
(c) Analyze the different windowing methods by observing the main lobe width and sidelobes
attenuation.
Results:
1. Choose the window design parameters and write in your report.
2. Attach plots
Discussions:
1. Write the discussion on selecting the design criteria.
2. Discuss the applications of different windowing methods by observing the main lobe width and
sidelobes attenuation.
Some suggested reading for DSP Lab:
1. Rulph Chassing and Donald Reay, Digital Signal Processing and applications with the
TMS320C6713 and TMS 320C6416 DSK, 2nd Edition, Wiley.
2. Sanjit K. Mitra, Digital Signal Processing: A Computer-Based Approach, 4th Edition, McGraw
Hill.
3. Video Tutorial by Dr. Subhendu Kumar Sahoo, How to work with Code composer studio(CCS),
(link: https://www.youtube.com/watch?v=b76LcYJwJ80 )
4. TMS320C6000 Code Composer Studio Tutorial (Link:
http://www.ti.com/lit/ug/spru301c/spru301c.pdf )
5. MATLAB help manual for filter design and Window design from www.mathworks.com
Appendix A
This section introduces some of the basic features and functionalities in Code
Composer Studio so you can create and build simple projects. Experienced users can
proceed to the following sections for more in-depth explanations of Code Composer
Studios various features.
Halts execution
Toggles breakpoint
Runs project
Step out
Step over
Note:
Remember to reload the program by choosing FileReload Program if you rebuild the
project after making changes.
2.5.1 Go to Main
To begin execution of the Main function, select DebugGo main. The execution halts at the Main function
and you will notice the program counter (yellow arrow) in the left margin beside the function. This is called
the selection margin.
Introduction to Help
2.5.4 Viewing Variables
In the debugging process, you should view the value of the variables to ensure that the function executes
properly. Variables can be viewed in the watch window when the CPU has been halted. The watch
window can be opened by selecting ViewWatch Window. The Watch Locals tab shows all the relevant
variables in the current execution.
As you continue to Step Into the while loop, the values of the variables change through each execution. In
addition, you can view the values of specific variables by hovering the mouse pointer over the variable or
by placing the variables in the Watch1 tab. For more information on variables and watch windows, see
Section 5.2.4.