Open navigation menu
Close suggestions
Search
Search
en
Change Language
Upload
Sign in
Sign in
Download free for days
0 ratings
0% found this document useful (0 votes)
19 views
DSP Lab File
DSP lab file 4th year ece branch
Uploaded by
Khatugas
Copyright
© © All Rights Reserved
Available Formats
Download as PDF or read online on Scribd
Download now
Download
Save DSP Lab File For Later
Download
Save
Save DSP Lab File For Later
0%
0% found this document useful, undefined
0%
, undefined
Embed
Share
Print
Report
0 ratings
0% found this document useful (0 votes)
19 views
DSP Lab File
DSP lab file 4th year ece branch
Uploaded by
Khatugas
Copyright
© © All Rights Reserved
Available Formats
Download as PDF or read online on Scribd
Download now
Download
Save DSP Lab File For Later
Carousel Previous
Carousel Next
Save
Save DSP Lab File For Later
0%
0% found this document useful, undefined
0%
, undefined
Embed
Share
Print
Report
Download now
Download
You are on page 1
/ 14
Search
Fullscreen
‘LIST OF EXPERIMENTS S.NO. E OF EXPERIME To illustrate the simple Mathematical Expressions in Matlab. a. X=2S,y=xel Z=Hly. b. r= n(1/3)-1, area=n*r'2 e x= 3*sqrt(5)-1, y= sqrt(5)+1/2,2=Wy-1; Using MATLAB generate + Basic Discrete time signals/waveform * A discrete exponential sequence * A discrete complex exponential sequence. rz) Using MATLAB find the convolution of two linear sequences. T-iz Using MATLAB find out the discrete Fourier Transform (DFT) of rectangular pulse and plot phase and magnitude spectrum. Using MATLAB find out the convolution between two sequences by the help of discrete. fourier ‘ransform(DFT) 114 1516 To design Chebyshev type filter + High Pass Filter © Low Pass Filter 17-19 To design a butterworth filter Band Pass Filter «High Pass Filter ‘+ Low Pass Filter 20-23 To Design a elliptical IIR Filter © High Pass Filter © Low Pass Filter 24-26 To design an equiripple linear Phase FIR filter.DSP LAB EXPERIMENTS 1. Using MATLAB generate a. To generate basic signals/waveform b. A discrete exponential c. A discrete complex exponen! quen al sequence. 1(a)Unit Step n=-20:20; unit=n>=0; stem(n, unit); xlabel(‘Time sample '); ylabel(‘Amplitude’); titleCunit step signal__ your name’); 1(a)Unit Impulse close all; clear all; % creating time stamp for the signal n=-10:1:10; °% Generating Unit impulse sequence impulse = [zeros(1,10),ones(1,1),zeros(1,10)]; % Plotting the unit impulse sequence stem(n, impulse); xlabel(’x_input); ylabel(output’); {itle(’ Unit Impulse Sequence_your name’); axis({-10 10 0 1.2]); 1(a)Unit Ramp geDSP LAB EXPERIMENTS DSP LAB EXPERIMENTS xlabel(’x_input-——— -your name); 1b) a=input(Enter the real part a="); b=input('Enter the imaginary part b="); k=input(‘constant x=input(variable x="); c=ati*b; yak*oAx; disp(real(y)) stem(x,real(y)) Ys title(real part of sequence’); Ic) a=input('Enter the real part a=); b=input(Enter the imaginary part b=); k=input(‘constant k=); x=input('variable x="); c=ati*b; yak *oAx; disp(imag(y)) stem(x,imag(y)) xlabel('frequencyl'); ylabel(‘amplitude'); title(imaginary part of sequence__ your name’); fee ol? Rragnomm for Sere exponential gen J ae input ( Sentra) ; ee Ke input” (4 enter 1 me DOS Xe aan enter 0) kta. Alem (4, te, ya oni” ae oo real peice aunee) TadDsP LAB EXPERIMENTS te fourier transform (D 5, Using MATLAB find out the dser rectangular pulse and plot phase and mat Jinput(type the length of A [N= input (‘type the length of the sequence ~ u-ones (1,N) eft (uM) 0:1: figure subplot@,1,1) tite (original time domain sequence" ylabel amplitude’) label (time index n') sibplot (1,2) Ke0:1:M-l tem (K.abs(U itude of df samples label (frequency index K° ylabel (magnitude sudplot(3,1,3) stem(K angle(U)) title (Magnitude of df samples ylabel(phase’)E DSP LAB EXPERIMENTS 4. Using MATLAB find out the convolution between two sequences by the help of discrete fourier transform(DFT) cle; clear all; x=input(Input First Sequence="); h=input(Input Second Sequence="); nl=length(x); n2=length(h); N=nl+n2-1; x1=[x zeros(1,N-n1)]; x2=[h zeros(1,N-n2)]; a=fit(x, N); b=fii(h, N); c=a."b; disp(‘output sequence’); disp(c) d=iff(c, N); dn=0:N-1; subplot(3,1,1); stem(x); title(First Sequence’); ylabel(‘Signal'); xlabel(‘Time'); subplot(3,1,2); stem(h); title('Second Sequence’); ylabel('Signal'); xlabel(‘Time’); subplot(3,1,3); stem(d); title(‘Convolved Sequence _your name'); ylabel('Signal'); pas xlabel('Time'); Mm SyDSP LAB EXPERIMENTS 5. To design Chebyshev type filter d. High Pass Filter e. Low Pass Filter PROGRAM: HIGH PASS FILTER cle; am=input(‘type in the order of filter=!); ™input(type in the pass band of filte W"input(‘type in the passband of frequency edge (b,a}-cheby1 (am,,w,high’); disp(numerator polynomial’) disp(b) disp(‘denominator polynomial’) disp(a) w=0:0.2/picpi; h=freqz(b,a,w); gain=20*log 0(abs(h)); stem(w/pi,gain); grid xlabel(‘normalised frequency’) ylabel('gain(dB)') title(high pass filter’) LOW PASS FILTER feeDSP -LAB EXPERIMENTS inion te onder offer, "Tamu in the pas ond offer tein th passband of queney edge Bal-eheby as.ytowy: ‘ispeoumeratorpolynomiat) disp(b) «ispCdcnominatorpolynomia) disp(a) w0:0.2pipi; b-tregeoa,w); £8in=20*log O(abs(h)); stem(wip,gain); rid ‘xlabel(normalised frequency’) ylabel(gain(aBy) tileClow pass filter) ‘OBSERVATION; For High Pass Filter >Order of the fiter=2 > Pass band ripple = 0.5 > Pass band ripple frequency = 0.2 For Low Pass Filter:DSP LAB EXPERIMENTS © Order of filter = 2 © Pass band ripple = 0.3 Sas ey © Pass band frequency = 0.9DSP LAB EXPERIMENTS 6. To design a butterworth filter a) Band Pass Filter b) High Pass Filter ¢) Low Pass Filter BAND PASS FILTER: ‘N=input(enter the filter order='); M=N/2; w1-input(‘lower pass band edge frequency"); w2-input(‘upper pass band edge frequency); w-[wl,w2]; [b.a]-butter(M.w); disp(‘numerator polynomial’); disp(b) disp(denominator polynomial’); disp(a) w-0:0.02/pi-pis n=freqz(b,a,w); gain=20*log] 0(abs(h)); stem(w/pi,gain) grid; xlabel(’Normalized the frequency’) ylabel(‘Gain,db') title(Butterworth Band pass filter) HIGH PASS FILTER: Ne-input(‘enter the filter order—')s M=N2; w=input(‘enter the low edge frequency’); [b,a}=butter(M,w-high’); peDSP LAB EXPERIMENTS disp(‘numerator polynomial’); disp(b) disp(‘denominator polynomial’); disp(a) w=0:0.02/pi:pi; h=freqz(b,a,w); gain=20*log1 0(abs(h)); stem(w/pi,gain) grid; xlabel(‘Normalized frequency’) ylabel('Gain,db') title('Butterworth High pass filter’) (3) LOW PASS FILTER: N=input(‘enter the filter order); M=N/2; w=input(enter the high frequency"); [b,a]=butter(M,w,'low)); disp(‘aumerator polynomial’); disp(b) disp(‘denominator polynomial’); disp(a) w=0:0.02/pi:pi; h=freqz(b.a,w); gain=20*logl 0(abs(h)); stem(w/pi,gain) grids xlabel(‘Normalized frequency’) ylabel(‘Gain,db’) title(Butterworth low pass filter’) OBSERVATIONS: (1) FOR BAND PASS FILTER: enter the filter order=2 s whe lower pass band edge frequency=0.1 1D,DSP LAB EXPERIMENTS ‘upper pass band edge frequency=0.9 (2) FOR HIGH PASS FILTER: enter the filter order—4 enter the low edge frequency=0.01 (3) FOR LOW PASS FILTER: enter the filter order=4 gy enter the high frequency=0.01 »DSP LAB EXPERIMENTS 7. Te Design a elliptical IIR Filter a. High Pass Filter b. Low Pass Filter ‘N=input(‘Type the order of filter put("Type passband ripple="); S=input('Type min. stopband attenuatior W=input(‘Type the passband edge frequency"); [b,a}=ellip(N,R,S,W, low’); disp(‘numerator polynomial’); disp(b) disp(‘denominator polynomial’); disp(a) w=0:0.2/pi:pi; freqz(b,a,w); gain=20*log] 0(abs(h)); stem(w/pi,gain); grid xlabel(‘normalised frequency’); ylabel(‘gain(db)’); title('Elliptic LPF (your name)’); High Pass Filter Neinput("Type the order of filter="); R=input(Type passband ripple=); S=input(‘Type min. stopband attenuation='); W=input('Type the passband edge frequency="); [b,a]=ellip(N,R,S,W, high’); disp(‘numerator polynomial’); disp(b) disp(‘denominator polynomial’); disp(a) w=0:0.2/pizpi; h=freqz(b,a,w); gain=20*log! 0(abs(h)); stem(w/pi,gain); grid xlabel('normalised frequency’); ylabel('gain(db)’); tile(Elliptic HPF __ your name’); fuDSP LAB EXPERIMENTS 8. To design an equiripple linear Phase FIR filter. nput('Type the filter order='); finput(Type the band edge=); m=input(Type the magnitude value="); b=remez(N, fm); disp(FIR filter coefficients’); disp(b) h,w]=freqz(b, 1,256); mag=20*log10(abs(h)); plot(w/pimag); grid xlabel('normalised frequency’); ylabel(‘gain (db)'); title(Equiripple FIR fil ter _ your name’); aw
You might also like
The Subtle Art of Not Giving a F*ck: A Counterintuitive Approach to Living a Good Life
From Everand
The Subtle Art of Not Giving a F*ck: A Counterintuitive Approach to Living a Good Life
Mark Manson
4/5 (6133)
Principles: Life and Work
From Everand
Principles: Life and Work
Ray Dalio
4/5 (627)
The Gifts of Imperfection: Let Go of Who You Think You're Supposed to Be and Embrace Who You Are
From Everand
The Gifts of Imperfection: Let Go of Who You Think You're Supposed to Be and Embrace Who You Are
Brene Brown
4/5 (1148)
Never Split the Difference: Negotiating As If Your Life Depended On It
From Everand
Never Split the Difference: Negotiating As If Your Life Depended On It
Chris Voss
4.5/5 (935)
The Glass Castle: A Memoir
From Everand
The Glass Castle: A Memoir
Jeannette Walls
4/5 (8215)
Grit: The Power of Passion and Perseverance
From Everand
Grit: The Power of Passion and Perseverance
Angela Duckworth
4/5 (631)
Sing, Unburied, Sing: A Novel
From Everand
Sing, Unburied, Sing: A Novel
Jesmyn Ward
4/5 (1253)
The Perks of Being a Wallflower
From Everand
The Perks of Being a Wallflower
Stephen Chbosky
4/5 (8365)
Shoe Dog: A Memoir by the Creator of Nike
From Everand
Shoe Dog: A Memoir by the Creator of Nike
Phil Knight
4.5/5 (860)
Her Body and Other Parties: Stories
From Everand
Her Body and Other Parties: Stories
Carmen Maria Machado
4/5 (877)
The Hard Thing About Hard Things: Building a Business When There Are No Easy Answers
From Everand
The Hard Thing About Hard Things: Building a Business When There Are No Easy Answers
Ben Horowitz
4.5/5 (361)
Hidden Figures: The American Dream and the Untold Story of the Black Women Mathematicians Who Helped Win the Space Race
From Everand
Hidden Figures: The American Dream and the Untold Story of the Black Women Mathematicians Who Helped Win the Space Race
Margot Lee Shetterly
4/5 (954)
Steve Jobs
From Everand
Steve Jobs
Walter Isaacson
4/5 (2923)
Elon Musk: Tesla, SpaceX, and the Quest for a Fantastic Future
From Everand
Elon Musk: Tesla, SpaceX, and the Quest for a Fantastic Future
Ashlee Vance
4.5/5 (484)
The Emperor of All Maladies: A Biography of Cancer
From Everand
The Emperor of All Maladies: A Biography of Cancer
Siddhartha Mukherjee
4.5/5 (277)
A Man Called Ove: A Novel
From Everand
A Man Called Ove: A Novel
Fredrik Backman
4.5/5 (4972)
Angela's Ashes: A Memoir
From Everand
Angela's Ashes: A Memoir
Frank McCourt
4.5/5 (444)
Brooklyn: A Novel
From Everand
Brooklyn: A Novel
Colm Toibin
3.5/5 (2061)
The Art of Racing in the Rain: A Novel
From Everand
The Art of Racing in the Rain: A Novel
Garth Stein
4/5 (4281)
The Yellow House: A Memoir (2019 National Book Award Winner)
From Everand
The Yellow House: A Memoir (2019 National Book Award Winner)
Sarah M. Broom
4/5 (100)
The Little Book of Hygge: Danish Secrets to Happy Living
From Everand
The Little Book of Hygge: Danish Secrets to Happy Living
Meik Wiking
3.5/5 (447)
Yes Please
From Everand
Yes Please
Amy Poehler
4/5 (1988)
The World Is Flat 3.0: A Brief History of the Twenty-first Century
From Everand
The World Is Flat 3.0: A Brief History of the Twenty-first Century
Thomas L. Friedman
3.5/5 (2283)
Devil in the Grove: Thurgood Marshall, the Groveland Boys, and the Dawn of a New America
From Everand
Devil in the Grove: Thurgood Marshall, the Groveland Boys, and the Dawn of a New America
Gilbert King
4.5/5 (278)
Bad Feminist: Essays
From Everand
Bad Feminist: Essays
Roxane Gay
4/5 (1068)
The Woman in Cabin 10
From Everand
The Woman in Cabin 10
Ruth Ware
3.5/5 (2641)
The Outsider: A Novel
From Everand
The Outsider: A Novel
Stephen King
4/5 (1993)
A Tree Grows in Brooklyn
From Everand
A Tree Grows in Brooklyn
Betty Smith
4.5/5 (1936)
The Sympathizer: A Novel (Pulitzer Prize for Fiction)
From Everand
The Sympathizer: A Novel (Pulitzer Prize for Fiction)
Viet Thanh Nguyen
4.5/5 (125)
A Heartbreaking Work Of Staggering Genius: A Memoir Based on a True Story
From Everand
A Heartbreaking Work Of Staggering Genius: A Memoir Based on a True Story
Dave Eggers
3.5/5 (692)
Team of Rivals: The Political Genius of Abraham Lincoln
From Everand
Team of Rivals: The Political Genius of Abraham Lincoln
Doris Kearns Goodwin
4.5/5 (1912)
Wolf Hall: A Novel
From Everand
Wolf Hall: A Novel
Hilary Mantel
4/5 (4074)
On Fire: The (Burning) Case for a Green New Deal
From Everand
On Fire: The (Burning) Case for a Green New Deal
Naomi Klein
4/5 (75)
Fear: Trump in the White House
From Everand
Fear: Trump in the White House
Bob Woodward
3.5/5 (830)
Manhattan Beach: A Novel
From Everand
Manhattan Beach: A Novel
Jennifer Egan
3.5/5 (901)
Rise of ISIS: A Threat We Can't Ignore
From Everand
Rise of ISIS: A Threat We Can't Ignore
Jay Sekulow
3.5/5 (143)
John Adams
From Everand
John Adams
David McCullough
4.5/5 (2544)
The Light Between Oceans: A Novel
From Everand
The Light Between Oceans: A Novel
M L Stedman
4.5/5 (790)
The Unwinding: An Inner History of the New America
From Everand
The Unwinding: An Inner History of the New America
George Packer
4/5 (45)
Little Women
From Everand
Little Women
Louisa May Alcott
4/5 (105)
The Constant Gardener: A Novel
From Everand
The Constant Gardener: A Novel
John le Carré
3.5/5 (109)