Date post: | 07-Apr-2018 |
Category: |
Documents |
Author: | sai-saranya |
View: | 220 times |
Download: | 0 times |
of 33
8/3/2019 Dsp Lab Manual1
1/33
1
DIGITAL SIGNAL PROCESSING LAB
CODE NO: EC05177
LIST OF EXPERIMENTS:
1. To study the architecture of DSP chips TMS 320C SX/6X Instructions.
2. To verify linear convolution
3. To verify the circular convolution
4. To design FIR filter (LP/HP) using windowing technique
a. Using rectangular window
b. Using triangular window
c. Using Kaiser window
5. To implement IIR filter (LP/HP) on DSP Processors
6. N-point FFT algorithm
7. MATLAB program to generate sum of sinusoidal signals
8. MATLAB program to find frequency response of analog LP/HP filters
9. To compute power density spectrum of a sequence
10. To find the FFT of given 1-D signal and plot.
8/3/2019 Dsp Lab Manual1
2/33
2
DIGITAL SIGNAL PROCESSING LAB
LIST OF EXPERIMENTS:
1. To study the architecture of DSP chips TMS 320 6713.32-bit floatingpoint processor.
2. Introduction to MATLAB: generation of basic signals
3. To verify linear convolution
4. To verify the circular convolution
5. To design FIR filter (LP/HP) using windowing technique
a. Using rectangular window
b. Using triangular windowc. Using Kaiser window
6. To implement IIR filter (LP/HP) & frequency response of analog LP/HP
and butter worth filters & cheby shev filters.
7. N-point FFT algorithm
8. MATLAB program to generate sum of sinusoidal signals
9. To compute power density spectrum of a sequence
10. To find the FFT of given 1-D signal and plot.
8/3/2019 Dsp Lab Manual1
3/33
3
1.INRTODUCTION TO TMS 320C6713 DSK ARCHITECTURE
Aim- To study the architecture of TMS320C6713 DSK
Apparatus- TMS320C6713 DSK kit
THEROY- The highperformance board features the TMS320C6713 floating-point DSP. Capable of performing 1350 million floating point operations persecond, the C6713 DSK the most powerful DSK development board.
The DSK is USB port interfaced platform that allows toefficiently develop and test applications for the C6713. With extensive host PCand target DSP software support, the DSK provides ease-of-use and capabilitiesthat are attractive to DSP engineers.
OVERVIEW
The 6713 DSP Starter Kit (DSK) is a low-cost platform which lets customersevaluate and develop applications for the Texas Instruments C67X DSP family.The primary features of the DSK are:
225 MHz TMS320C6713 Floating Point DSP
AIC23 Stereo Codec Four Position User DIP Switch and Four User LEDs
On-board Flash and SDRAM
TIs Code Composer Studio development tools are bundled with the 6713DSK providing the user with an industrial-strength integrated developmentenvironment for C and assembly programming. Code Composer Studiocommunicates with the DSP using an on-board JTAG emulator through a USBinterface.
The TMS320C6713 DSP is the heart of the system. It is a core memberof Texas Instruments C64X line of fixed point DSPs whose distinguishingfeatures are an extremely high performance 225MHz VLIW DSP core and256Kbytes of internal memory. On-chip peripherals include a 32-bit externalmemory interface (EMIF) with integrated SDRAM controller, 2 multi-channelbuffered serial ports (McBSPs), two on-board timers and an enhanced DMAcontroller (EDMA). The 6713 represents the high end of TIs C6700 floating pointDSP line both in terms of computational performance and on-chip resources.
8/3/2019 Dsp Lab Manual1
4/33
4
The 6713 has a significant amount of internal memory so manyapplications will have all code and data on-chip. External accesses are donethrough the EMIF which can connect to both synchronous and asynchronousmemories. The EMIF signals are also brought out to standard TI expansion busconnectors so additional functionality can be added on daughter card modules.
TMS320C6713 DSK Overview Block Diagram
DSPs are frequently used in audio processing applications so the DSKincludes an on-board codec called the AIC23. Codec stands for coder/decoder,the job of the AIC23 is to code analog input samples into a digital format for theDSP to process, then decode data coming out of the DSP to generate theprocessed analog output. Digitial data is sent to and from the codec on McBSP1.
The DSK has 4 light emitting diodes (LEDs) and 4 DIP switches that allowusers to interact with programs through simple LED displays and user input onthe switches. Many of the included examples make use of these user interfaceoptions.
8/3/2019 Dsp Lab Manual1
5/33
5
The DSK implements the logic necessary to tie board componentstogether in a programmable logic device called a CPLD. In addition to randomglue logic, the CPLD implements a set of 4 software programmable registers thatcan be used to access the on-board LEDs and DIP switches as well as control
the daughter card interface.
DEVELOPMENT ENVIRONMENT
Code Composer Studio is TIs flagship development tool. It consists of anassembler, a C compiler, an integrated development environment (IDE, thegraphical interface to the tools) and numerous support utilities like a hex formatconversion tool. The DSK includes a special version of Code Composerspecially tailored to features on the 6713 DSK board. Other versions of CodeComposer are available that fully support each of TIs processor families on awide variety of hardware targets.
The Code Composer IDE is the piece you see when you run CodeComposer. It consists of an editor for creating source code, a project manager toidentify the source files and options necessary for your programs and anintegrated source level debugger that lets you examine the behavior of yourprogram while it is running. The IDE is responsible for calling other componentssuch as the compiler and assembler so developers dont have to deal with thehassle of running each tool manually.
The 6713 DSK includes a special device called a JTAG emulator on-boardthat can directly access the register and memory state of the 6713 chip through astandardized JTAG interface port. When a user wants to monitor the progress ofhis program, Code Composer sends commands to the emulator through its USBhost interface to check on any data the user is interested in.
This debugging method is extremely powerful because programs can bedebugged unobtrusively on real hardware targets without making any specialprovisions for debug like external probes, software monitors or simulatedhardware. When designing your own hardware around the 6713 you can debugyour application with the same rich functionality of the DSK simply by using CodeComposer with an external emulator and including a header for the JTAGinterface signals.
You should always be aware that the DSK as a different system than yourPC, when you recompile a program in Code Composer on your PC you mustspecifically load it onto the 6713 on the DSK. Other things to be aware of are:
When you tell Code Composer to run, it simply starts executing at thecurrent program counter. If you want to restart the program, you must reset the
8/3/2019 Dsp Lab Manual1
6/33
6
program counter by using Debug Restart or re-loading the program which setsthe program counter implicitly.
After you start a program running it continues running on the DSPindefinitely. To stop it you need to halt it with Debug Halt.
LOADING AND RUNNING A PROGRAM
The best way to get started with Code Composer is to run some of thesimple examples included with the DSK. The LED example is the easiestexample to get started with to become familiar with the DSK and make sure yourdevelopment tools are configured correctly. When run, it will:
Continuously blink LED #0 about 2.5 times per second.
Continuously read the value of DIP switch #3 and display it on LED #3.
To run the program, perform the following steps:
1. Open the led.pjt Code Composer project using Project Open andselecting led.pjt. It is in the directoryc:\CCStudio_v3.1\examples\dsk6713\bsl\led.
2. Load the led.out executable file. Select File Load Program. It willopen a file browser dialog. Select the led.out file in the led\Debug directory in thefile browser and hit "Open" to load the executable file. You must reload thecompiled executable every time you make changes to the program.
3. Select the Debug a Run option under the Debug menu. LED #0 willstart blinking slowly.
4. Move DIP switch #3 up and down, you will see LED #3 change with it.
5. When you are satisfied that the program is indeed running correctly,stop the program by selecting Debug Halt.
RESULT- Thus, the TMS320C6713DSK Architecture is studied.
8/3/2019 Dsp Lab Manual1
7/33
7
2. VERIFY LINEAR CONVOLUTION
LINEAR CONVOLUTION USING MAT LAB
AIM : To perform linear convolution of two sequences using MATLAB.
Requirements : Computer with MATLAB software
PROGRAM :
%linear convolution programclc;clear all;close all;disp('linear convolution program');x=input('enter i/p x(n):');
m=length(x);h=input('enter i/p h(n):');n=length(h);x=[x,zeros(1,n)];subplot(2,2,1), stem(x);title('i/p sequence x(n)is:');xlabel('---->n');ylabel('---->x(n)');grid;h=[h,zeros(1,m)];subplot(2,2,2), stem(h);title('i/p sequence h(n)is:');
xlabel('---->n');ylabel('---->h(n)');grid;disp('convolution of x(n) & h(n) is y(n):');y=zeros(1,m+n-1);for i=1:m+n-1y(i)=0;for j=1:m+n-1if(j
8/3/2019 Dsp Lab Manual1
8/33
8
PROCEDURE:
1) Generate the first input sequence x.
2) Plot the sequence in discrete form.[Make use of stem( )]
3) Give some relevant names to x-axis and y-axis.
4) Generate second input sequence y.
5) Repeat steps (2) and (3) for second sequence y.
6) Use the inbuilt function conv( ) to compute linear convolution of xand y.z = conv(x,y)
7) Plot the output sequence z.[Repeat steps 2 and 3]
8) Make use of subplot ( ) to plot the inputs and output sequences in asingle window.
Result:enter value for m4enter value for n4Enter values for i/p1 2 3 4Enter Values for n1 2 3 4The Value of output y[0]=1The Value of output y[1]=4The Value of output y[2]=10The Value of output y[3]=20The Value of output y[4]=25The Value of output y[5]=24The Value of output y[6]=16
8/3/2019 Dsp Lab Manual1
9/33
9
Waveform:
FIG: Linear convolution of two sequences
Result : Linear convolution of two sequences using MATLAB is obtained.
VIVA QUESTIONS:
1. What is the purpose of using convolution?
2. Give the formula for calculating linear convolution.
1 1.5 2 2.5 3 3.5 4 4.5 5 5.5 60
5
10
amp..
(a)n..
stem x
1 1.5 2 2.5 3 3.5 4 4.5 50
5
10
amp..
(b)n..
stem h
1 2 3 4 5 6 7 8 9 100
50
100
amp..
(c)n..
stem y
8/3/2019 Dsp Lab Manual1
10/33
10
LINEAR CONVOLUTION USING TMS320C6713 KIT
Aim: To implement linear convolution.
Apparatus: DSK 6713 DSP Trainer kit.USB CablePower supply
Program:#includeint x[15],h[15],y[15];main(){int i,j,m,n;printf("\n enter value for m");
scanf("%d",&m);printf("\n enter value for n");scanf("%d",&n);printf("Enter values for i/p x(n):\n");for(i=0;i
8/3/2019 Dsp Lab Manual1
11/33
11
Procedure: Open code composer studio, make sure the DSP kit is turned on. Start a new project using project-new pull down menu, save it in a
separate directory (c:\ccstudio\myprojects) with the name file name. pjt. Add the source file of linear convolution to the project using project-add
files to project pull down menu. Add the linker command file hello. cmd(c\ccstudio\tutorials\dsk6713\hello1\hello.cmd)
Add the run time support library file rts6700.lib(c-ccstudio\c6000\cgtools\lib\rts6700.lib)
Compile program using the project-compile pull down menu or by clickingthe short cut icon on the left side of program window.
Build the program using project-build pull down menu or by clicking theicon on the left side of the program window.
Load the program in program memory of DSP chip using the file-loadprogram pull down menu.
To view o/p graphically, select Viewgraph-time and frequency.
8/3/2019 Dsp Lab Manual1
12/33
12
Precautions:
Switch ON the computer only after connecting USB cable andmake sure the DSP kit is ON.
Perform the diagnostic check before opening code composerstudio.
All the connections must be tight.
Result : The linear convolution is obtained and the graphs are plotted.
8/3/2019 Dsp Lab Manual1
13/33
13
3.VERIFY CIRCULAR CONVOLUTION
CIRCULAR CONVOLUTION USING MATLAB
AIM: To perform circular convolution of two sequences using MATLAB.
Requirements : Computer with MATLAB software
Program :clc;clear all;close all;disp('circular convolution program');x=input('enter i/p x(n):');m=length(x);
h=input('enter i/p sequence h(n)');n=length(h);subplot(2,2,1), stem(x);title('i/p sequencce x(n)is:');xlabel('---->n');ylabel('---->x(n)');grid;subplot(2,2,2), stem(h);title('i/p sequencce h(n)is:');xlabel('---->n');ylabel('---->h(n)');grid;disp('circular convolution of x(n) & h(n) is y(n):');
if(m-n~=0)if(m>n)h=[h,zeros(1,m-n)];n=m;endx=[x,zeros(1,n-m)];m=n;endy=zeros(1,n);y(1)=0;a(1)=h(1);
for j=2:na(j)=h(n-j+2);end%ciruclar convfor i=1:ny(1)=y(1)+x(i)*a(i);endfor k=2:n
8/3/2019 Dsp Lab Manual1
14/33
14
y(k)=0;% circular shiftfor j=2:nx2(j)=a(j-1);end
x2(1)=a(n);for i=1:nif(i
8/3/2019 Dsp Lab Manual1
15/33
15
10) Perform circular convolution of the sequences x and h and store it in y.Circular convolution of x and h is given by the following equation:
y(n)= x(i) h(j) where n=0 to (n3-1)n=0 j=(n-i)n3
But in MATLAB x(0) doesnt exist. So i takes values from 1 to n3.Similarly for n.
Therefore the above equation becomes;
y(n)= x(i) h(j) where, n=1 to n3n=1 j=(n-i+1)n3
3) Display and plot the convoled sequence.[Repeat steps (2) and (3)]
4) Make use of subplot to plot the inputs and output sequences in asingle window.
5) Compare theoretical and practical values.
OUTPUT:-
Enter the length of the first sequence4Enter the length of the second sequence3Enter the first sequence1 2 3 4Enter the second sequence1 2 3The circular convolution is
18 16 10 16
8/3/2019 Dsp Lab Manual1
16/33
16
OUT PUT WAVE FORM:
Result: circular convolution of two sequences using MATLAB is obtained.
VIVA QUESTIONS:
1. What is the different between Circular and Linear convolution?
2. What is the function in MATLAB used for padding zeros to asequence?
If your sequence is, x = [1 2 3 4] and you want to pad zeros to it.How can you do that in MATLAB?
3.What is the use of following functions in MATLAB:i. length( )ii. max( )iii. min( )
4.Give the steps to get the result of linear convolution from the methodof circular convolution5. What is the circular convolution6.Explain how cyclic (circular) convolution of two periodic sequencescan be obtained using DFT techniques
8/3/2019 Dsp Lab Manual1
17/33
17
CIRCULAR CONVOLUTION USING TMS320C6713 KIT
Aim: To implement circular convolution.
Apparatus: DSK 6713 DSP Trainer kit.USB CablePower supply
Program:
#includeint m,n,x[30],h[30],y[30],i,j, k,x2[30],a[30];void main(){printf(" Enter the length of the first sequence\n");
scanf("%d",&m);printf(" Enter the length of the second sequence\n");scanf("%d",&n);printf(" Enter the first sequence\n");for(i=0;i
8/3/2019 Dsp Lab Manual1
18/33
18
x2[j]=a[j-1];x2[0]=a[n-1];for(i=0;i
8/3/2019 Dsp Lab Manual1
19/33
19
OUTPUT:
Precautions : switch ON the computer only after connecting USB cable and
make sure the DSP kit is ON.
Perform the diagnostic check before opening code composerstudio.
All the connections must be tight.
Result : The circular convolution is obtained and the graphs are plotted.
8/3/2019 Dsp Lab Manual1
20/33
20
4.DESIGN FIR FILTER (LP/HP) USING WINDOWING TECHNIQUE
FIR FILTERS (LP/HP) USING WINDOWING TECHNIQUE
a) Using Rectangular Window b) Using Triangular Window c) Using Kaiser
Window
AIM: To design of FIR (LP/HP) filters using rectangular window, Triangularwindow and Kaiser window.
Requirements : Computer with MATLAB software
PROGRAM
clc;clear all;
close all;rp=input('enter passband ripple');rs=input('enter the stopband ripple');fp=input('enter passband freq');fs=input('enter stopband freq');f=input('enter sampling freq ');wp=2*fp/f;ws=2*fs/f;num=-20*log10(sqrt(rp*rs))-13;dem=14.6*(fs-fp)/f;n=ceil(num/dem);
n1=n+1;if(rem(n,2)~=0)n1=n;n=n-1;endc=input('enter your choice of window function 1. rectangular 2. triangular 3.kaiser:
\n ');if(c==1)y=rectwin(n1);disp('Rectangular window filter response');end
if (c==2)y=triang(n1);disp('Triangular window filter response');endif(c==3)y=kaiser(n1);disp('kaiser window filter response');end
8/3/2019 Dsp Lab Manual1
21/33
21
%LPFb=fir1(n,wp,y);[h,o]=freqz(b,1,256);m=20*log10(abs(h));subplot(2,2,1);plot(o/pi,m);
title('LPF');ylabel('Gain in dB-->');xlabel('(a) Normalized frequency-->');%HPFb=fir1(n,wp,'high',y);[h,o]=freqz(b,1,256);m=20*log10(abs(h));subplot(2,2,2);plot(o/pi,m);title('HPF');ylabel('Gain in dB-->');xlabel('(b) Normalized frequency-->');
%BPFwn=[wp ws];b=fir1(n,wn,y);[h,o]=freqz(b,1,256);m=20*log10(abs(h));subplot(2,2,3);plot(o/pi,m);title('BPF');ylabel('Gain in dB-->');xlabel('(c) Normalized frequency-->');%BSFb=fir1(n,wn,'stop',y);[h,o]=freqz(b,1,256);m=20*log10(abs(h));subplot(2,2,4);plot(o/pi,m);title('BSF');ylabel('Gain in dB-->');xlabel('(d) Normalized frequency-->');
INPUTenter the passband ripple.01enter the stopband ripple.04enter the passband frequency1500enter the stopband frequency2000enter the sampling freq9000
8/3/2019 Dsp Lab Manual1
22/33
22
Output:-
8/3/2019 Dsp Lab Manual1
23/33
23
Output:-
PROCEDURE:
1) Enter the passband ripple (rp) and stopband ripple (rs).
2) Enter the passband frequency (fp) and stopband frequency (fs).
3) Enter the sampling frequency (f).
4) Calculate the analog passband edge frequency (wp) and stop bandedge frequency(ws)
wp=2*fp/fws=2*fs/f
5) Calculate the order of the filter using the following formula,(-20log10 ( rp.rs)13)
n= ___________________(14.6 (fs-fp)/f).
[Use ceil( ) for rounding off the value of n to the nearest integer] if n is an odd number, then reduce its value by 1.
6) Generate (n+1)th point window coefficients.For example boxcar(n+1)generates a rectangular window.
y=boxcar(n+1)
8/3/2019 Dsp Lab Manual1
24/33
24
7) Design an nth order FIR filter using the previously generated (n+1)length window
function.b=fir1(n,wp,y)
8) Find the frequency response of the filter by using freqz( ) function.[h,o]=freqz(b,a,k)
This function returns k-point complex frequency response vector h andk-point
frequency vector o in radians/samples of the filetr.B(ejw) b(1)+b(2)e-jw+..b(m+1)e -jmw
H(eiw)= ______ = __________________________________A(ejw) a(1)+a(2)e-jw+.a(n+1)e-jnw
Where a,b are vectors containing the denominator and numeratorcoefficients.
Here a=1.
9) Calculate the magnitude of the frequency response in decibels(dB).m= 20*log10(abs(h))
10) Plot the magnitude response [magnitude in dB Vs normalizedfrequency (o/pi)]
11)Give relevant names to x- and y- axes and give an appropriate titlefor the plot.
12) Repeat the procedure for high pass, band pass, and band stopfilters.
13) Plot all the responses in a single figure window.[Make use ofSubplot].
14) Repeat the program for different types of windows available:a. rectangular windowb. triangular windowc. Kaiser window
Result : The design of FIR (LP/HP) filters using rectangular window, Triangularwindow and Kaiser window is performed.
8/3/2019 Dsp Lab Manual1
25/33
25
FIR FILTER DESIGN (LP/HP) USING TMS320C6713 KIT
Aim: To design of FIR (LP/HP) filters using rectangular window, Triangularwindow and Kaiser window.
Apparatus: DSK 6713 DSP Trainer kit.USB CablePower supply
Program:#include#include#define pi 3.1415int n,N,c;float wr[64],wt[64];void main()
{printf("\n enter no. of samples,N= :");scanf("%d",&N);printf("\n enter choice of window function\n 1.rect \n 2. triang \n c= :");scanf("%d",&c);printf("\n elements of window function are:");switch(c){case 1:for(n=0;n
8/3/2019 Dsp Lab Manual1
26/33
26
Output:
Result : The design of FIR (LP/HP) filters using rectangular window, Triangularwindow and Kaiser window is performed.
8/3/2019 Dsp Lab Manual1
27/33
27
VIVAQUESTIONS:
1. What are the uses of function ceil and for?
2. Define boxcar
3. Define Kaiser
4. Define Bartlett
5. What is an FIR system? Compare FIR and IIR system?
6. What are effects of windowing?
7. Explain the process of windowing
8/3/2019 Dsp Lab Manual1
28/33
28
5.IMPLEMENT IIR FILTER (LOW PASS & HIGH PASS)
IIR FILTER (LP/HP) USING BUTTER WORTH (ANLOG & DIGITAL) FILTERS
AIM:To design of Butterworth Digital (low pass & high pass) filter usingMATLAB.
Requirements: Computer with MATLAB software
PROGRAM:
clc;clear all;close all;disp('enter the IIR filter design specifications');
rp=input('enter the passband ripple');rs=input('enter the stopband ripple');wp=input('enter the passband freq');ws=input('enter the stopband freq');fs=input('enter the sampling freq');w1=2*wp/fs;w2=2*ws/fs;[n,wn]=buttord(w1,w2,rp,rs,'s');c=input('enter choice of filter 1. LPF 2. HPF \n ');if(c==1)disp('Frequency response of IIR LPF is:');[b,a]=butter(n,wn,'low','s');
endif(c==2)disp('Frequency response of IIR HPF is:');[b,a]=butter(n,wn,'high','s');endw=0:.01:pi;[h,om]=freqs(b,a,w);m=20*log10(abs(h));an=angle(h);figure,subplot(2,1,1);plot(om/pi,m);title('magnitude response of IIR filter is:');
xlabel('(a) Normalized freq. -->');ylabel('Gain in dB-->');subplot(2,1,2);plot(om/pi,an);title('phase response of IIR filter is:');xlabel('(b) Normalized freq. -->');ylabel('Phase in radians-->');
8/3/2019 Dsp Lab Manual1
29/33
29
INPUT:Assume:enter the passband ripple.5enter stopband ripple50enter passband freq1200
enter stopband freq2400enter sampling freq10000
PROCEDURE:
1) Enter the pass band ripple (rp) and stop band ripple (rs).
2) Enter the pass band frequency (fp) and stop band frequency (fs).
3) Get the sampling frequency (f).
4) Calculate the analog pass band edge frequencies, w1 and w2.w1 = 2*fp/fw2 = 2*fs/f
5) Calculate the order and 3dB cutoff frequency of the analog filter. [Makeuse ofthe following function]
[n,wn]=buttord(w1,w2,rp,rs,s)
6) Design an nth order analog lowpass Butter worth filter using thefollowing statement.
[b,a]=butter(n,wn,s)
7) Find the complex frequency response of the filter by using freqs( )function
[h,om]=freqs(b,a,w)where, w = 0:.01:piThis function returns complex frequency response vector h andfrequency vector om in radians/samples of the filter.
b(s) b(1)Snb-1+b(2)Snb-2+b(nb)H(s)= ____ = _________________________________
a(s) a(1)Sna-1+a(2)Sna-2+..a(na)Where a,b are the vectors containing the denominator and numeratorcoeffients.
8) Calculate the magnitude of the frequency response in decibels (dB)m=20*log10(abs(h))
8/3/2019 Dsp Lab Manual1
30/33
30
9) Plot the magnitude response [magnitude in dB Vs normalizedfrequency (om/pi)]
10) Give relevant names to x and y axes and give an appropriate title forthe plot.
11) Repeat the procedure for highpass, bandpass, bandstop filters.
12) Plot all the responses in a single figure window.[Make use of subplot()].
Output:
8/3/2019 Dsp Lab Manual1
31/33
31
Result: The design of Butterworth Digital (low pass & high pass) filter isperformed.
8/3/2019 Dsp Lab Manual1
32/33
32
IIR FILTER (LP/HP) USING BUTTER WORTH (ANLOG & DIGITAL) FILTERS
AIM: To design of Butterworth Digital (low pass & high pass) filter usingCCStudio.
Apparatus: DSK 6713 DSP Trainer kit.USB CablePower supply
Program:#include#includeint i,w,wc,c,N;float H[100];float mul(float, int);
void main(){printf("\n enter order of filter ");scanf("%d",&N);printf("\n enter the cutoff freq ");scanf("%d",&wc);printf("\n enter the choice for IIR filter 1. LPF 2.HPF ");scanf("%d",&c);switch(c){case 1:for(w=0;w
8/3/2019 Dsp Lab Manual1
33/33
33
}
OUT PUT WAVE FORMS:
Result: The design of Butterworth Digital (low pass & high pass) filter isperformed.