Attribution Non-Commercial (BY-NC)

67 views

Attribution Non-Commercial (BY-NC)

- Interpolation filters for oversampled audio DACs
- Filter Design ToolBox Using Matlab
- Moving Average Filter
- e1205-spec-08.10-lores
- DSP Terminology
- a
- Development of Filters
- BM304 Biomedical signal processing (1).pdf
- AAI Sample Paper
- lab manual
- 2 Marks DSP Bits Ece
- Abn
- DSP Objective Type Type Questions
- university question bank.pdf
- Duo Binary Modulation for Optical Systems
- FIR Filter
- 2
- unit_5_eee_pg (1)
- Dsp
- AN FPGA IMPLEMENTATION OF THE LMS ADAPTIVE FILTER .pdf

You are on page 1of 37

1

Aim:

To represent the basic signal ( Unit impulse , Unit Step , Unit Ramp , Sine and Cosine Signals )

Apparatus:

Computer, MATLAB software

Procedure:

1) 2) 3) 4) Open the computer. Use the MATLAB program. Open the M file from MATLAB. Write the program for unit pulse, unit step, ramp, Exponential, sine wave and cosine wave signals in MATLAB editor. 5) Save and Run the program. 6) Go to command windows. 7) See the result in figure window of MATLAB.

Program:

%plotting the basic signals %unit step x=[0,1,2,3,4]; y=[1,1,1,1,1]; subplot(3,2,1); stem(x,y); xlabel('time') ylabel('amplitude') title('unit step')

%unit impulse x=[-2,-1,0,1,2]; y=[0,0,1,0,0]; subplot(3,2,2); stem(x,y); xlabel('time') ylabel('amplitude') title('unit impulse') %ramp signal n=0:1:5; subplot(3,2,3); stem(n,n); xlabel('time') ylabel('amplitude') title('ramp signal')

%sine function x=0:.01:pi; y=sin(2*pi*x); subplot(3,2,4); stem(x,y); xlabel('time') ylabel('amplitude') title('sine function') %cos function x=0:.01:pi; y=cos(2*pi*x); subplot(3,2,5); stem(x,y); xlabel('time') ylabel('amplitude') title('cos function') %exp function x=-2:.1:2; a=5; y=exp(a*x); subplot(3,2,6); stem(x,y); xlabel('time') ylabel('amplitude') title('exp function')

Output:

Precautions:

1) Log in and log out should be done properly. 2) While working if any problem is faced contact lab tech/faculty.

Result:

Waveforms of Unit impulse, Unit Step, Unit Ramp, Sine and Cosine Signals have been verified.

Experiment No. 2

Aim:

To test Discrete Convolution in time domain

Apparatus:

Computer, MATLAB software

Algorithm:

1) Get two signals x(p) and h(q) in matrix form 2) The convolved signal is denoted by y(n) 3) y(n) is given by formula y (n) =[x(k)h(n-k)] where n=0 to p+q-1 4) Stop

Procedure:

1) 2) 3) 4) 5) 6) Open the computer. Use the MATLAB program. Open the M file from MATLAB. Write the program for Convolution in MATLAB editor. Save and Run the program. Go to command windows. 7) See the result in figure window of MATLAB.

Program:

x = input ('your 1st input'); subplot(2,2,1) stem(x) xlabel('time') ylabel('amplitude') title('First input') y = input ('your 2nd input'); subplot(2,2,2) stem(y) xlabel('time') ylabel('amplitude') title('Second input') c=conv(x,y) subplot(2,2,3) stem(c) xlabel('time') ylabel('amplitude') title('Output')

Output:

your 1st input [ 1 0 2] your 2nd input [1 3] c=1 3 2 6

Precautions:

1) Log in and log out should be done properly. 2) While working if any problem is faced contact lab tech/faculty.

Result:

The test for discrete convolution for two signals is verified.

Experiment No. 3

Aim:

To test Discrete Cross correlation in time domain

Apparatus:

Computer, MATLAB software

Algorithm:

1. Get two signals x(p) and h(q) in matrix form 2. The convolved signal is denoted by y(n) 3. y(n) is given by formula y (n) =[x(k)h(k-n)] where n=-[max(m, p)-1] to[max(m, p)-1] 4. Stop

Procedure:

1) 2) 3) 4) 5) 6) Open the computer. Use the MATLAB program. Open the M file from MATLAB. Write the program for Correlation in MATLAB editor. Save and Run the program. Go to command windows. 7) See the result in figure window of MATLAB.

Program:

x = input ('your 1st input'); subplot(2,2,1) stem(x) xlabel('time') ylabel('amplitude') title('First input') y = input ('your 2nd input'); subplot(2,2,2) stem(y) xlabel('time') ylabel('amplitude') title('Second input') d = xcorr(x,y) subplot (2,2,3) stem(d) xlabel('time') ylabel('amplitude') title('Output of 1st input') e = xcorr(x,x) subplot (2,2,4) stem(e) xlabel('time') ylabel('amplitude') title('Output of 2nd input')

Output:

your 1st input [ 1 0 2] your 2nd input [1 3] d=0 e=2 3 0 1 5 6 0 2 2

Precautions:

1) Log in and log out should be done properly. 2) While working if any problem is faced contact lab tech/faculty.

Result:

The test for discrete cross correlation for two signals is verified.

Experiment No. 4

Aim:

To test stability using MATLAB

Apparatus:

Computer, MATLAB software

Procedure:

1) 2) 3) 4) 5) 6) 7) Open the computer. Use the MATLAB program. Open the M file from MATLAB. Write the program stability test in MATLAB editor. Save and Run the program. Go to command windows. See the result in command window of MATLAB.

Program:

den=[1 5 2 6] b=poly2rc(den) k=all(abs(b)<1) if k==1 display ('stable system') else display('unstable system') end

Output:

den = 1 5 2 6

b= 0.1111 0.8000 6.0000 k= 0 unstable system >> den = 7 b= 1.0000 -0.4286 0 k= 1 stable system >> 4 -3 0

1) Log in and log out should be done properly. 2) While working if any problem is faced contact lab tech/faculty.

Result:

Stability test is verified.

Experiment No. 5

Aim:

Write a program for computing Inverse Z- Transform of a rational transfer Function

Apparatus:

Computer, MATLAB

Algorithm:

1. 2. 3. 4.

Enter the numerator coefficients. Enter the denominator coefficients. Enter the number of points to be computed. Stop.

Procedure:

1. 2. 3. 4.

Open the computer. Use the MATLAB program. Open the M File from MATLAB. Write the program for inverse Z-transform in the MATLAB editor.

Program:

n=[2 3]; d=[1 1.25 0.125 -0.125]; y=impz(n,d) disp('inverse Z.T of the given T.F is ....') disp(y)

Output:

y= 2.0000 0.5000 -0.8750 1.2813 -1.4297 1.5176 -1.5581 1.5792 -1.5896 1.5948 -1.5974 1.5987 -1.5993 1.5997 inverse Z.T of the given T.F is .... 2.0000 0.5000 -0.8750 1.2813 -1.4297 1.5176 -1.5581 1.5792 -1.5896 1.5948 -1.5974 1.5987 -1.5993 1.5997

1) Log in and log out should be done properly. 2) While working if any problem is faced contact lab tech/faculty.

Result:

The inverse Z-transform of a rational transfer function is computed.

Experiment No. 6

Aim:

Write a program to understand Sampling theorem

Apparatus:

Computer, MATLAB

Algorithm:

1. Sketch the signals x=cos(7t) + cos(23t). 2. Compute and sketch the sampled signals with sampling rate .05,0.1 and 0.2 . 3. Reconstruct the signal to verify sampling theorem .

Procedure:

1. Open the computer. 2. Use the MATLAB program. 3. Open the M File from MATLAB. 4. Write the program for Sampling theorem in the MATLAB editor.

Program:

t=[0:0.005:2]; x=cos(7*t)+cos(23*t); subplot(3,2,1) plot(t,x); grid; xlabel('Time in sec') ylabel('Amplitude'); title('Continuous Signal'); Ts1=0.05; Ts2=0.1; Ts3=0.2; t1=[0:Ts1:2]; xs1=cos(7*t1)+cos(23*t1); subplot(3,2,2); stem(t1,xs1); hold on plot(t,x); hold off grid; xlabel('Time in sec'); ylabel('Amplitude'); title('Sampled signal with Ts =.05sec'); t2=[0:Ts2:2]; xs2=cos(7*t2)+cos(23*t2); subplot(3,2,3); stem(t2,xs2); hold on plot(t,x); hold off grid; xlabel('Time in sec'); ylabel('Amplitude'); title('Sampled signal with Ts =.1sec'); t3=[0:Ts3:2]; xs3=cos(7*t3)+cos(23*t3); subplot(3,2,4); stem(t3,xs3); hold on

1

plot(t,x); hold off grid; xlabel('Time in sec'); ylabel('Amplitude'); title('Sampled signal with Ts =.2sec'); %output when sampling period T=0.05 sec subplot(3,2,5); plot(t1,xs1); title('Output with Ts =.05sec'); %output when sampling period T=0.2 sec. This results in Aliasing subplot(3,2,6); plot(t3,xs3); title('Aliased output with Ts =.2sec');

Output:

1) Log in and log out should be done properly. 2) While working if any problem is faced contact lab tech/faculty.

Result:

The Sampling theorem is verified.

Experiment No. 7

Aim:

Write a program to convert an analog filter in to digital filter using Bilinear Transformation.

Apparatus:

Computer, MATLAB

Procedure:

1. Open the computer. 2. Use the MATLAB program. 3. Open the M File from MATLAB. 4. Write the program for conversion.

Program:

clc,clear all;close all; b=[2]; a=[1 4 3]; fs=10; disp('Transfer Function H(s) in analog domain') Hs= tf(b,a) [bz,az]=bilinear(b,a,fs); disp('Transfer Function H(z) in digital domain ') Hz= tf(bz,az)

Output:

Transfer Function H(s) in analog domain Transfer function: 2 ------------s^2 + 4 s + 3 Transfer Function H(z) in digital domain Transfer function: 0.004141 s^2 + 0.008282 s + 0.004141 -----------------------------------s^2 - 1.644 s + 0.6687

1) Log in and log out should be done properly. 2) While working if any problem is faced contact lab tech/faculty.

Result:

The analog filter is converted into digital filter.

Experiment No. 8

Aim:

Write a program to convert an analog filter in to digital filter using Impulse Invariant Method.

Apparatus:

Computer, MATLAB

Algorithm:

1. 2. 3. 4. Enter the numerator coefficients. Enter the denominator coefficients. Enter the number of points to be computed. Stop.

Procedure:

1. Open the computer. 2. Use the MATLAB program. 3. Open the M File from MATLAB. 4. Write the program for inverse Z-transform in the MATLAB editor.

Program:

clc,clear all;close all; b=[1]; a=[1 3 2]; fs=1; disp('Transfer Function H(s) in analog domain') Hs= tf(b,a) [bz,az]=impinvar(b,a,fs); disp('Transfer Function H(z) in digital domain ') Hz= tf(bz,az)

Output:

Transfer Function H(s) in analog domain Transfer function: 1 ------------s^2 + 3 s + 2 Transfer Function H(z) in digital domain Transfer function: 0.2325 -----------------------s^2 - 0.5032 s + 0.04979

1) Log in and log out should be done properly. 2) While working if any problem is faced contact lab tech/faculty.

Result:

The analog filter is converted into digital filter.

Experiment No. 9

Aim:

Write a program for the design of digital filter a) Low Pass Filter b) High Pass Filter c) Band Pass Filter d) Band Stop Filter For FIR rectangular window

Apparatus:

Computer, MATLAB

Procedure:

1. Open the computer. 2. Use the MATLAB program. 3. Open the M File from MATLAB. 4. Write the program for Low pass, High pass, Band pass and Band stop in MATLAB Editor. 5. Save and Run the program. 6. Go to command window. 7. Use the ; to terminate the program. 8. See the result in Figure Window of MATLAB.

Program:

% low pass filter fs = 500; [b,a] = fir1(8 , 10/(fs/2) , 'low' , rectwin(9)); [h,o] = freqz(b,a,256); m = 20*log10(abs(h)); subplot(2,2,1) plot (o/pi,m) xlabel('Frequency') ylabel('Amplitude') title('Low Pass ') % high pass filter fs = 500; [b,a] = fir1(8 , 10/(fs/2) , 'high' , rectwin(9)); [h,o] = freqz(b,a,256); m = 20*log10(abs(h)); subplot(2,2,2) plot (o/pi,m) xlabel('Frequency') ylabel('Amplitude') title('High Pass') % band pass filter fs = 500; [b,a] = fir1(8 , [70/(fs/2),80/(fs/2)] , 'bandpass' , rectwin(9)); [h,o] = freqz(b,a,256); m = 20*log10(abs(h)); subplot(2,2,3) plot (o/pi,m) xlabel('Frequency') ylabel('Amplitude') title('Band Pass ')

% band stop filter fs = 500; [b,a] = fir1(8 , [70/(fs/2),80/(fs/2)] , 'stop' , rectwin(9)); [h,o] = freqz(b,a,256); m = 20*log10(abs(h)); subplot(2,2,4) plot (o/pi,m) xlabel('Frequency') ylabel('Amplitude') title('Band Stop')

Output:

1) Log in and log out should be done properly. 2) While working if any problem is faced contact lab tech/faculty.

Result:

The digital filters are designed.

Experiment No. 10

Aim:

Write a program to analyze the effect of noise on the desired signal and to recover it back using FIR filters.

Apparatus:

Computer, MATLAB

Algorithm:

1. 2. 3. 4. 5. 6. Generate a Desired Signal. Generate Noisy Random Signal. Add noise to the generated signal. Create FIR low pass filter. Filter out noise from the noisy signal. Stop.

Procedure:

1. Open the computer. 2. Use the MATLAB program. 3. Open the M File from MATLAB. 4. Write the program for generation of desired signal, Noisy Signal and Create FIR low pass filter in MATLAB Editor. 5. Save and Run the program. 6. Go to command window. 7. See the result in Figure Window of MATLAB.

Program:

fs=600 t= 0:0.001:0.5; x=cos(2*pi*t*25) subplot(4,1,1) plot(x); title('Cosine Signal') % To Generate Noise y=randn(size(t)) subplot(4,1,2) plot(y) title('Random Noise Signal') % To Generate Noisy Cosine Signal z=x+y subplot(4,1,3) plot(z) title('Noisy Cosine Signal') % Filter Noisy Signal [b,a]= fir1(8,10/(fs/2),'low') w = filtfilt(b,a,z) subplot(4,1,4) plot(w) title('Filtered Noisy Signal')

Output:

1) Log in and log out should be done properly. 2) While working if any problem is faced contact lab tech/faculty.

Result:

The effect of noise on the desired signal is studied and is filtered using FIR Filters.

- Interpolation filters for oversampled audio DACsUploaded byIvar Løkken
- Filter Design ToolBox Using MatlabUploaded by64emily64
- Moving Average FilterUploaded byMhbackup 001
- e1205-spec-08.10-loresUploaded byTaka
- DSP TerminologyUploaded byMay Santos
- aUploaded byJadur Rahman
- Development of FiltersUploaded byWilson Chan
- BM304 Biomedical signal processing (1).pdfUploaded bysethu
- AAI Sample PaperUploaded byRavishankar Baarwad
- lab manualUploaded byKirubha Shankar Ece
- 2 Marks DSP Bits EceUploaded byDustin Graham
- AbnUploaded byapi-26172869
- DSP Objective Type Type QuestionsUploaded byRamapriyavlsi
- university question bank.pdfUploaded bylathavenky
- Duo Binary Modulation for Optical SystemsUploaded byErasmo Vizzaccaro
- FIR FilterUploaded bygpa0007
- 2Uploaded byThomasVictor
- unit_5_eee_pg (1)Uploaded byAishwarya
- DspUploaded bypushpa
- AN FPGA IMPLEMENTATION OF THE LMS ADAPTIVE FILTER .pdfUploaded byesatjournals
- note_1460691886Uploaded byMalar
- SyllabusUploaded byAvanish Vasudevan
- Digital Signal Processing2011wbutUploaded byPratik Mishra
- CS2403-QBUploaded byPraveen Chellapandian
- jfttrhghmjbUploaded byBikash Ranjan Dash
- Slice Reduction Algorithm for Low Power and Area Efficient Fir Filter Using Vlsi Design[1]Uploaded byanandanandnew
- 04156403Uploaded byVale Conde Cuatzo
- Image Denoising with 2D FIR Filter by using Binary Cat Swarm OptimizationUploaded byInternational Journal for Scientific Research and Development - IJSRD
- Expt 8Uploaded byRupali Kute
- Filtros FIR - Ejemplos de DiseñoUploaded byGabriel Hi

- KiloKiloFoxtrot FINALUploaded byJustin Kelly
- 02 Filled DevicesUploaded byMHEP_DANIEL
- bratunac sijalicUploaded byNenad Nikolić
- Improving electric energy result by using composition wavelengthUploaded byDustin Ward
- 22 Electromotive InductionUploaded byW
- Sampling TheoremUploaded bygaurav_juneja_4
- Aquavar ManualUploaded byJesus Sanchez
- Vimar Neve catalog specification and selection guideUploaded byHissien Azhary Elhoffy
- Hirschmann HC4900 Operation Manual 4-Section Boom 20140715Uploaded bykumbrov
- Candidate Instructions - January 2019Uploaded byakanages
- ppt templateUploaded byMoh. Ali Mahsun
- Differential Inputs - ElectronicsUploaded byPavan Kumar
- 898-nlcenovnik2015.pdfUploaded byJelenaGutić
- Hdmi Specification 13 AUploaded byHouseman74
- An Affordable Modular Rotary EvaporatorUploaded byCarlos Andrés Mesa
- AAS Determination of Silicon by Flame AASUploaded byBayu Adi Samodro
- Gopro Studio Manuale ItalianoUploaded byErica
- Superconducting Single-Photon Detectors with Enhanced High-Effciency BandwidthUploaded byraveneyesdead
- Brand-personality-complete.pptxUploaded byTaha Durrani
- Rittal Chiller Blue e - Targeted Cooling Output With Exce 5 4813Uploaded byMadhura Mahesh
- James Brownjohn Energy Dissipation From VibratingFloor Slabs Due Human StructureInteractionUploaded bymaxellligue5487
- Caster Mold Oscillation DiagnosticsUploaded byVinay Rajput
- Download - Linux WirelessUploaded bydungen
- Holographic DisplayUploaded byWilliam Mook
- 10-BeckerUploaded byShakti Singh
- Ats Asco 165 SeriesUploaded bypevare
- Telekom MalaysiaUploaded bySyafiqah Atikah
- Shape Recognition and Position MeasurementUploaded byDušan Bodrožić
- 10.Coherence Bandwidth Characterisation at mm-wavesUploaded byBismark Obinim Akoto
- CAT 924 HZUploaded byVictor Carlos Machado