SlideShare a Scribd company logo
ECE324: DIGITAL SIGNAL PROCESSING LABORATORY
Practical No.:-05
Roll No.: B-54 Registration No.:11205816 Name:Shyamveer Singh
Program Codes: (Function files)
Circular Convolution:
Marks Obtained
Job Execution (Out of 40):_________
Online Submission (Out of 10):________
Aim: To compute the convolution linear and curricular both using DFT and IDFT techniques.
Mathematical Expressions Required:
Inputs (Should be allocated by the Instructor, Individually):
1. Linear Convolution
x=[1 2 3 4]
h=[1 2 3 4]
2. Circular Convolution
X=[1 2 3 4]
H=[1 2 3 4]
3. Circular Convolution
X=[1 2 3 4]
H=[1 2 3 4]
function[y]=shyamcconv(x,h)
m=length(x)
l=length(h)
n=m+l-1
for t=1:n
y(t)=0;
for k=max(1,t-(m-1)):min(t,m)
y(t)=y(t)+x(k).*h(mod(t-k+1,n))
end
end
z=y
y=cconv(x,h)
LINEAR CONVOLUTION USING DFT AND IDFT:
function[y]=shyamlinconv(x,h)
Nx=length(x)
Nh=length(h)
Ny=Nx+Nh-1
X=[x,zeros(1,Ny)]
H=[h,zeros(1,Ny)]
p1=fft(X)
p2=fft(H)
p=p1.*p2;
y=ifft(p)
z=conv(x,h)
end
CIRCULAR CONVOLUTION USING DFT OR IDFT
function[y]=shyamcirconv(x,h)
n=input('valu of n')
X=[x,zeros(1,n)]
H=[h,zeros(1,n)]
p1=fft(X)
p2=fft(H)
p=p1.*p2;
y=ifft(p)
z=cconv(x,h)
end
Outputs/ Graphs/ Plots:
1. Linear Convolution :
>> x=[1 2 3 4]
x =
1 2 3 4
>> h=[1 2 3 4]
h =
1 2 3 4
>> shyamlinconv(x,h)
Nx =
4
Nh =
4
Ny =
7
X =
1 2 3 4 0 0 0 0 0 0 0
H =
1 2 3 4 0 0 0 0 0 0 0
p1 =
Columns 1 through 3
10.0000 3.3595 - 7.7695i -3.9717 - 2.9596i
Columns 4 through 6
-0.5014 + 2.5041i 2.6283 - 0.7046i -1.0147 - 1.9645i
Columns 7 through 9
-1.0147 + 1.9645i 2.6283 + 0.7046i -0.5014 - 2.5041i
Columns 10 through 11
-3.9717 + 2.9596i 3.3595 + 7.7695i
p2 =
Columns 1 through 3
10.0000 3.3595 - 7.7695i -3.9717 - 2.9596i
Columns 4 through 6
-0.5014 + 2.5041i 2.6283 - 0.7046i -1.0147 - 1.9645i
Columns 7 through 9
-1.0147 + 1.9645i 2.6283 + 0.7046i -0.5014 - 2.5041i
Columns 10 through 11
-3.9717 + 2.9596i 3.3595 + 7.7695i
y =
Columns 1 through 6
1.0000 4.0000 10.0000 20.0000 25.0000 24.0000
Columns 7 through 11
16.0000 0.0000 0 -0.0000 -0.0000
z =
1 4 10 20 25 24 16
ans =
Columns 1 through 6
1.0000 4.0000 10.0000 20.0000 25.0000 24.0000
Columns 7 through 11
16.0000 0.0000 0 -0.0000 -0.0000
2. Circular Convolution Using DFT IDFT
>> shyamcirconv(x,h)
valu of n 4
n =
4
X =
1 2 3 4 0 0 0 0
H =
1 2 3 4 0 0 0 0
p1 =
Columns 1 through 3
10.0000 -0.4142 - 7.2426i -2.0000 + 2.0000i
Columns 4 through 6
2.4142 - 1.2426i -2.0000 2.4142 + 1.2426i
Columns 7 through 8
-2.0000 - 2.0000i -0.4142 + 7.2426i
p2 =
Columns 1 through 3
10.0000 -0.4142 - 7.2426i -2.0000 + 2.0000i
Columns 4 through 6
2.4142 - 1.2426i -2.0000 2.4142 + 1.2426i
Columns 7 through 8
-2.0000 - 2.0000i -0.4142 + 7.2426i
y =
Columns 1 through 6
1.0000 4.0000 10.0000 20.0000 25.0000 24.0000
Columns 7 through 8
16.0000 -0.0000
z =
Columns 1 through 6
1.0000 4.0000 10.0000 20.0000 25.0000 24.0000
Column 7
16.0000
ans =
Columns 1 through 6
1.0000 4.0000 10.0000 20.0000 25.0000 24.0000
Columns 7 through 8
16.0000 -0.0000
2. Circular Convolution
>> shyamcconv(x,h)
m =
4
l =
4
n =
7
y =
1
y =
1 2
y =
1 4
y =
1 4 3
y =
1 4 7
y =
1 4 10
y =
1 4 10 4
y =
1 4 10 10
y =
1 4 10 16
y =
1 4 10 20
y =
1 4 10 20 8
y =
1 4 10 20 17
y =
1 4 10 20 25
y =
1 4 10 20 25 12
y =
1 4 10 20 25 24
y =
1 4 10 20 25 24 16
z =
1 4 10 20 25 24 16
y =
Columns 1 through 6
1.0000 4.0000 10.0000 20.0000 25.0000 24.0000
Column 7
16.0000
ans =
Columns 1 through 6
1.0000 4.0000 10.0000 20.0000 25.0000 24.0000
Column 7
16.0000
Analysis/ Learning outcomes: After performing this experiment we know about the various
MATLAB commands and how to pad zeros in any signal and how to match the dimensions of
matrix.
Ad

More Related Content

What's hot (20)

Coherent and Non-coherent detection of ASK, FSK AND QASK
Coherent and Non-coherent detection of ASK, FSK AND QASKCoherent and Non-coherent detection of ASK, FSK AND QASK
Coherent and Non-coherent detection of ASK, FSK AND QASK
naimish12
 
Discrete Fourier Transform
Discrete Fourier TransformDiscrete Fourier Transform
Discrete Fourier Transform
Shahryar Ali
 
M ary psk modulation
M ary psk modulationM ary psk modulation
M ary psk modulation
Ahmed Diaa
 
Classification of signals
Classification of signalsClassification of signals
Classification of signals
chitra raju
 
Turbo codes.ppt
Turbo codes.pptTurbo codes.ppt
Turbo codes.ppt
Prasant Barik
 
DSP_2018_FOEHU - Lec 06 - FIR Filter Design
DSP_2018_FOEHU - Lec 06 - FIR Filter DesignDSP_2018_FOEHU - Lec 06 - FIR Filter Design
DSP_2018_FOEHU - Lec 06 - FIR Filter Design
Amr E. Mohamed
 
Convolution Codes
Convolution CodesConvolution Codes
Convolution Codes
Pratishtha Ram
 
Convolutional codes
Convolutional codesConvolutional codes
Convolutional codes
Abdullaziz Tagawy
 
DIGITAL COMMUNICATION: ENCODING AND DECODING OF CYCLIC CODE
DIGITAL COMMUNICATION: ENCODING AND DECODING OF CYCLIC CODE DIGITAL COMMUNICATION: ENCODING AND DECODING OF CYCLIC CODE
DIGITAL COMMUNICATION: ENCODING AND DECODING OF CYCLIC CODE
ShivangiSingh241
 
FILTER BANKS
FILTER BANKSFILTER BANKS
FILTER BANKS
Sanjana Prasad
 
Decimation and Interpolation
Decimation and InterpolationDecimation and Interpolation
Decimation and Interpolation
Fernando Ojeda
 
Discrete time signal processing unit-2
Discrete time signal processing unit-2Discrete time signal processing unit-2
Discrete time signal processing unit-2
selvalakshmi24
 
Amplitute modulation
Amplitute modulationAmplitute modulation
Amplitute modulation
ZunAib Ali
 
Frequency modulation
Frequency modulationFrequency modulation
Frequency modulation
Akanksha_Seth
 
Multirate DSP
Multirate DSPMultirate DSP
Multirate DSP
@zenafaris91
 
DSP_FOEHU - MATLAB 04 - The Discrete Fourier Transform (DFT)
DSP_FOEHU - MATLAB 04 - The Discrete Fourier Transform (DFT)DSP_FOEHU - MATLAB 04 - The Discrete Fourier Transform (DFT)
DSP_FOEHU - MATLAB 04 - The Discrete Fourier Transform (DFT)
Amr E. Mohamed
 
Circular Convolution
Circular ConvolutionCircular Convolution
Circular Convolution
Sarang Joshi
 
Introduction to equalization
Introduction to equalizationIntroduction to equalization
Introduction to equalization
Harshit Srivastava
 
Digital modulation techniques
Digital modulation techniquesDigital modulation techniques
Digital modulation techniques
ShriyaGautam3
 
Walsh transform
Walsh transformWalsh transform
Walsh transform
SachinMaithani1
 
Coherent and Non-coherent detection of ASK, FSK AND QASK
Coherent and Non-coherent detection of ASK, FSK AND QASKCoherent and Non-coherent detection of ASK, FSK AND QASK
Coherent and Non-coherent detection of ASK, FSK AND QASK
naimish12
 
Discrete Fourier Transform
Discrete Fourier TransformDiscrete Fourier Transform
Discrete Fourier Transform
Shahryar Ali
 
M ary psk modulation
M ary psk modulationM ary psk modulation
M ary psk modulation
Ahmed Diaa
 
Classification of signals
Classification of signalsClassification of signals
Classification of signals
chitra raju
 
DSP_2018_FOEHU - Lec 06 - FIR Filter Design
DSP_2018_FOEHU - Lec 06 - FIR Filter DesignDSP_2018_FOEHU - Lec 06 - FIR Filter Design
DSP_2018_FOEHU - Lec 06 - FIR Filter Design
Amr E. Mohamed
 
DIGITAL COMMUNICATION: ENCODING AND DECODING OF CYCLIC CODE
DIGITAL COMMUNICATION: ENCODING AND DECODING OF CYCLIC CODE DIGITAL COMMUNICATION: ENCODING AND DECODING OF CYCLIC CODE
DIGITAL COMMUNICATION: ENCODING AND DECODING OF CYCLIC CODE
ShivangiSingh241
 
Decimation and Interpolation
Decimation and InterpolationDecimation and Interpolation
Decimation and Interpolation
Fernando Ojeda
 
Discrete time signal processing unit-2
Discrete time signal processing unit-2Discrete time signal processing unit-2
Discrete time signal processing unit-2
selvalakshmi24
 
Amplitute modulation
Amplitute modulationAmplitute modulation
Amplitute modulation
ZunAib Ali
 
Frequency modulation
Frequency modulationFrequency modulation
Frequency modulation
Akanksha_Seth
 
DSP_FOEHU - MATLAB 04 - The Discrete Fourier Transform (DFT)
DSP_FOEHU - MATLAB 04 - The Discrete Fourier Transform (DFT)DSP_FOEHU - MATLAB 04 - The Discrete Fourier Transform (DFT)
DSP_FOEHU - MATLAB 04 - The Discrete Fourier Transform (DFT)
Amr E. Mohamed
 
Circular Convolution
Circular ConvolutionCircular Convolution
Circular Convolution
Sarang Joshi
 
Digital modulation techniques
Digital modulation techniquesDigital modulation techniques
Digital modulation techniques
ShriyaGautam3
 

Viewers also liked (20)

DFT and IDFT Matlab Code
DFT and IDFT Matlab CodeDFT and IDFT Matlab Code
DFT and IDFT Matlab Code
Bharti Airtel Ltd.
 
Digital Signal Processing Lab Manual ECE students
Digital Signal Processing Lab Manual ECE studentsDigital Signal Processing Lab Manual ECE students
Digital Signal Processing Lab Manual ECE students
UR11EC098
 
Linear Convolution using Matlab Code
Linear Convolution  using Matlab CodeLinear Convolution  using Matlab Code
Linear Convolution using Matlab Code
Bharti Airtel Ltd.
 
DSP Lab Manual (10ECL57) - VTU Syllabus (KSSEM)
DSP Lab Manual (10ECL57) - VTU Syllabus (KSSEM)DSP Lab Manual (10ECL57) - VTU Syllabus (KSSEM)
DSP Lab Manual (10ECL57) - VTU Syllabus (KSSEM)
Ravikiran A
 
Dsp
DspDsp
Dsp
vskanimozhi061988
 
Analog communication notes
Analog communication notesAnalog communication notes
Analog communication notes
shobhan pujari
 
Lti system(akept)
Lti system(akept)Lti system(akept)
Lti system(akept)
Fariza Zahari
 
Convolution
ConvolutionConvolution
Convolution
sridharbommu
 
Analog communication notes
Analog communication notesAnalog communication notes
Analog communication notes
Shobhan Pujari
 
Lti system
Lti systemLti system
Lti system
Fariza Zahari
 
Signal Prosessing Lab Mannual
Signal Prosessing Lab Mannual Signal Prosessing Lab Mannual
Signal Prosessing Lab Mannual
Jitendra Jangid
 
digital signal-processing-lab-manual
digital signal-processing-lab-manualdigital signal-processing-lab-manual
digital signal-processing-lab-manual
Ahmed Alshomi
 
Dsp manual completed2
Dsp manual completed2Dsp manual completed2
Dsp manual completed2
bilawalali74
 
Digital Filters Part 1
Digital Filters Part 1Digital Filters Part 1
Digital Filters Part 1
Premier Farnell
 
Fir and iir filter_design
Fir and iir filter_designFir and iir filter_design
Fir and iir filter_design
shrinivasgnaik
 
Butterworth filter design
Butterworth filter designButterworth filter design
Butterworth filter design
Sushant Shankar
 
PULSE CODE MODULATION (PCM)
PULSE CODE MODULATION (PCM)PULSE CODE MODULATION (PCM)
PULSE CODE MODULATION (PCM)
vishnudharan11
 
Implementation of Digital Filters
Implementation of Digital FiltersImplementation of Digital Filters
Implementation of Digital Filters
op205
 
Design of IIR filters
Design of IIR filtersDesign of IIR filters
Design of IIR filters
op205
 
Basics of Digital Filters
Basics of Digital FiltersBasics of Digital Filters
Basics of Digital Filters
op205
 
Digital Signal Processing Lab Manual ECE students
Digital Signal Processing Lab Manual ECE studentsDigital Signal Processing Lab Manual ECE students
Digital Signal Processing Lab Manual ECE students
UR11EC098
 
Linear Convolution using Matlab Code
Linear Convolution  using Matlab CodeLinear Convolution  using Matlab Code
Linear Convolution using Matlab Code
Bharti Airtel Ltd.
 
DSP Lab Manual (10ECL57) - VTU Syllabus (KSSEM)
DSP Lab Manual (10ECL57) - VTU Syllabus (KSSEM)DSP Lab Manual (10ECL57) - VTU Syllabus (KSSEM)
DSP Lab Manual (10ECL57) - VTU Syllabus (KSSEM)
Ravikiran A
 
Analog communication notes
Analog communication notesAnalog communication notes
Analog communication notes
shobhan pujari
 
Analog communication notes
Analog communication notesAnalog communication notes
Analog communication notes
Shobhan Pujari
 
Signal Prosessing Lab Mannual
Signal Prosessing Lab Mannual Signal Prosessing Lab Mannual
Signal Prosessing Lab Mannual
Jitendra Jangid
 
digital signal-processing-lab-manual
digital signal-processing-lab-manualdigital signal-processing-lab-manual
digital signal-processing-lab-manual
Ahmed Alshomi
 
Dsp manual completed2
Dsp manual completed2Dsp manual completed2
Dsp manual completed2
bilawalali74
 
Fir and iir filter_design
Fir and iir filter_designFir and iir filter_design
Fir and iir filter_design
shrinivasgnaik
 
Butterworth filter design
Butterworth filter designButterworth filter design
Butterworth filter design
Sushant Shankar
 
PULSE CODE MODULATION (PCM)
PULSE CODE MODULATION (PCM)PULSE CODE MODULATION (PCM)
PULSE CODE MODULATION (PCM)
vishnudharan11
 
Implementation of Digital Filters
Implementation of Digital FiltersImplementation of Digital Filters
Implementation of Digital Filters
op205
 
Design of IIR filters
Design of IIR filtersDesign of IIR filters
Design of IIR filters
op205
 
Basics of Digital Filters
Basics of Digital FiltersBasics of Digital Filters
Basics of Digital Filters
op205
 
Ad

Similar to Circular convolution Using DFT Matlab Code (20)

Dsp model exam qp
Dsp model exam qpDsp model exam qp
Dsp model exam qp
Rama Dhurai
 
45196656565656565656565656565656565656566.ppt
45196656565656565656565656565656565656566.ppt45196656565656565656565656565656565656566.ppt
45196656565656565656565656565656565656566.ppt
Harshal Vaidya
 
Introduction to Information Technology Lecture 2
Introduction to Information Technology Lecture 2Introduction to Information Technology Lecture 2
Introduction to Information Technology Lecture 2
MikeCrea
 
VHDL and Cordic Algorithim
VHDL and Cordic AlgorithimVHDL and Cordic Algorithim
VHDL and Cordic Algorithim
Subeer Rangra
 
03_NumberSystems.pdf
03_NumberSystems.pdf03_NumberSystems.pdf
03_NumberSystems.pdf
vijayapraba1
 
Chpater 6
Chpater 6Chpater 6
Chpater 6
EasyStudy3
 
S.Y.B.Sc. 2013 Pattern Old question Paper
S.Y.B.Sc. 2013 Pattern Old question PaperS.Y.B.Sc. 2013 Pattern Old question Paper
S.Y.B.Sc. 2013 Pattern Old question Paper
Dr.Ravindra Kshirsagar P.G Department of Zoology Modern College Ganeshkhind Pune
 
Digital logic design part1
Digital logic design part1Digital logic design part1
Digital logic design part1
Vaagdevi College of Engineering
 
Basic arithmetic, instruction execution and program
Basic arithmetic, instruction execution and programBasic arithmetic, instruction execution and program
Basic arithmetic, instruction execution and program
JyotiprakashMishra18
 
microprocessors
microprocessorsmicroprocessors
microprocessors
Hossam Zein
 
Kaizen cso002 l1
Kaizen cso002 l1Kaizen cso002 l1
Kaizen cso002 l1
asslang
 
Newton two Equation method
Newton two Equation  method Newton two Equation  method
Newton two Equation method
shanto017
 
ADE UNIT-III (Digital Fundamentals).pptx
ADE UNIT-III (Digital Fundamentals).pptxADE UNIT-III (Digital Fundamentals).pptx
ADE UNIT-III (Digital Fundamentals).pptx
KUMARS641064
 
microprocessor
microprocessormicroprocessor
microprocessor
Rana Mukherji
 
Module 4
Module 4Module 4
Module 4
sadhanakumble
 
Bolum1cozumler
Bolum1cozumlerBolum1cozumler
Bolum1cozumler
bhuvanaaswini
 
response of system for given transfer function
response of system for given transfer functionresponse of system for given transfer function
response of system for given transfer function
Denishthummar
 
Palm ch1
Palm ch1Palm ch1
Palm ch1
Heera Rawat
 
Arna Friend Controls II Final
Arna Friend Controls II FinalArna Friend Controls II Final
Arna Friend Controls II Final
Arna Friend
 
Chapter 1 digital design.pptx
Chapter 1 digital design.pptxChapter 1 digital design.pptx
Chapter 1 digital design.pptx
AliaaTarek5
 
Dsp model exam qp
Dsp model exam qpDsp model exam qp
Dsp model exam qp
Rama Dhurai
 
45196656565656565656565656565656565656566.ppt
45196656565656565656565656565656565656566.ppt45196656565656565656565656565656565656566.ppt
45196656565656565656565656565656565656566.ppt
Harshal Vaidya
 
Introduction to Information Technology Lecture 2
Introduction to Information Technology Lecture 2Introduction to Information Technology Lecture 2
Introduction to Information Technology Lecture 2
MikeCrea
 
VHDL and Cordic Algorithim
VHDL and Cordic AlgorithimVHDL and Cordic Algorithim
VHDL and Cordic Algorithim
Subeer Rangra
 
03_NumberSystems.pdf
03_NumberSystems.pdf03_NumberSystems.pdf
03_NumberSystems.pdf
vijayapraba1
 
Basic arithmetic, instruction execution and program
Basic arithmetic, instruction execution and programBasic arithmetic, instruction execution and program
Basic arithmetic, instruction execution and program
JyotiprakashMishra18
 
Kaizen cso002 l1
Kaizen cso002 l1Kaizen cso002 l1
Kaizen cso002 l1
asslang
 
Newton two Equation method
Newton two Equation  method Newton two Equation  method
Newton two Equation method
shanto017
 
ADE UNIT-III (Digital Fundamentals).pptx
ADE UNIT-III (Digital Fundamentals).pptxADE UNIT-III (Digital Fundamentals).pptx
ADE UNIT-III (Digital Fundamentals).pptx
KUMARS641064
 
response of system for given transfer function
response of system for given transfer functionresponse of system for given transfer function
response of system for given transfer function
Denishthummar
 
Arna Friend Controls II Final
Arna Friend Controls II FinalArna Friend Controls II Final
Arna Friend Controls II Final
Arna Friend
 
Chapter 1 digital design.pptx
Chapter 1 digital design.pptxChapter 1 digital design.pptx
Chapter 1 digital design.pptx
AliaaTarek5
 
Ad

More from Bharti Airtel Ltd. (20)

Resume Shyamveer
Resume ShyamveerResume Shyamveer
Resume Shyamveer
Bharti Airtel Ltd.
 
BHEL Final Report
BHEL Final ReportBHEL Final Report
BHEL Final Report
Bharti Airtel Ltd.
 
BHEL PPT
BHEL PPTBHEL PPT
BHEL PPT
Bharti Airtel Ltd.
 
Amplitude modulated-systmes
Amplitude modulated-systmesAmplitude modulated-systmes
Amplitude modulated-systmes
Bharti Airtel Ltd.
 
Amplitude modulated-systems
Amplitude modulated-systemsAmplitude modulated-systems
Amplitude modulated-systems
Bharti Airtel Ltd.
 
Mcq5 ac-fet-amplifiers
Mcq5 ac-fet-amplifiersMcq5 ac-fet-amplifiers
Mcq5 ac-fet-amplifiers
Bharti Airtel Ltd.
 
Mcq6 ac-mosfet-amplifier
Mcq6 ac-mosfet-amplifierMcq6 ac-mosfet-amplifier
Mcq6 ac-mosfet-amplifier
Bharti Airtel Ltd.
 
C bjt-biasing-and-stabilization
C bjt-biasing-and-stabilizationC bjt-biasing-and-stabilization
C bjt-biasing-and-stabilization
Bharti Airtel Ltd.
 
Mcq6 ac-mosfet-amplifier
Mcq6 ac-mosfet-amplifierMcq6 ac-mosfet-amplifier
Mcq6 ac-mosfet-amplifier
Bharti Airtel Ltd.
 
Mcq4 ac-operational-amplifiers
Mcq4 ac-operational-amplifiersMcq4 ac-operational-amplifiers
Mcq4 ac-operational-amplifiers
Bharti Airtel Ltd.
 
Logic gates-notesdc-iii
Logic gates-notesdc-iiiLogic gates-notesdc-iii
Logic gates-notesdc-iii
Bharti Airtel Ltd.
 
C bjt-biasing-and-stabilization
C bjt-biasing-and-stabilizationC bjt-biasing-and-stabilization
C bjt-biasing-and-stabilization
Bharti Airtel Ltd.
 
B bjt-characteristics
B bjt-characteristicsB bjt-characteristics
B bjt-characteristics
Bharti Airtel Ltd.
 
A bjt-operating-modes-configurations
A bjt-operating-modes-configurationsA bjt-operating-modes-configurations
A bjt-operating-modes-configurations
Bharti Airtel Ltd.
 
Resume shyam final
Resume shyam finalResume shyam final
Resume shyam final
Bharti Airtel Ltd.
 
Noise detection from the signal matlab code, Signal Diagnosis
Noise detection from the signal matlab code, Signal Diagnosis Noise detection from the signal matlab code, Signal Diagnosis
Noise detection from the signal matlab code, Signal Diagnosis
Bharti Airtel Ltd.
 
Sequence detector Verilog Code
Sequence detector Verilog CodeSequence detector Verilog Code
Sequence detector Verilog Code
Bharti Airtel Ltd.
 
Divine inspiration
Divine inspirationDivine inspiration
Divine inspiration
Bharti Airtel Ltd.
 
To designing counters using verilog code
To designing counters using verilog codeTo designing counters using verilog code
To designing counters using verilog code
Bharti Airtel Ltd.
 
Verilog VHDL code Multiplexer and De Multiplexer
Verilog VHDL code Multiplexer and De Multiplexer Verilog VHDL code Multiplexer and De Multiplexer
Verilog VHDL code Multiplexer and De Multiplexer
Bharti Airtel Ltd.
 
C bjt-biasing-and-stabilization
C bjt-biasing-and-stabilizationC bjt-biasing-and-stabilization
C bjt-biasing-and-stabilization
Bharti Airtel Ltd.
 
Mcq4 ac-operational-amplifiers
Mcq4 ac-operational-amplifiersMcq4 ac-operational-amplifiers
Mcq4 ac-operational-amplifiers
Bharti Airtel Ltd.
 
C bjt-biasing-and-stabilization
C bjt-biasing-and-stabilizationC bjt-biasing-and-stabilization
C bjt-biasing-and-stabilization
Bharti Airtel Ltd.
 
A bjt-operating-modes-configurations
A bjt-operating-modes-configurationsA bjt-operating-modes-configurations
A bjt-operating-modes-configurations
Bharti Airtel Ltd.
 
Noise detection from the signal matlab code, Signal Diagnosis
Noise detection from the signal matlab code, Signal Diagnosis Noise detection from the signal matlab code, Signal Diagnosis
Noise detection from the signal matlab code, Signal Diagnosis
Bharti Airtel Ltd.
 
Sequence detector Verilog Code
Sequence detector Verilog CodeSequence detector Verilog Code
Sequence detector Verilog Code
Bharti Airtel Ltd.
 
To designing counters using verilog code
To designing counters using verilog codeTo designing counters using verilog code
To designing counters using verilog code
Bharti Airtel Ltd.
 
Verilog VHDL code Multiplexer and De Multiplexer
Verilog VHDL code Multiplexer and De Multiplexer Verilog VHDL code Multiplexer and De Multiplexer
Verilog VHDL code Multiplexer and De Multiplexer
Bharti Airtel Ltd.
 

Recently uploaded (20)

211421893-M-Tech-CIVIL-Structural-Engineering-pdf.pdf
211421893-M-Tech-CIVIL-Structural-Engineering-pdf.pdf211421893-M-Tech-CIVIL-Structural-Engineering-pdf.pdf
211421893-M-Tech-CIVIL-Structural-Engineering-pdf.pdf
inmishra17121973
 
Level 1-Safety.pptx Presentation of Electrical Safety
Level 1-Safety.pptx Presentation of Electrical SafetyLevel 1-Safety.pptx Presentation of Electrical Safety
Level 1-Safety.pptx Presentation of Electrical Safety
JoseAlbertoCariasDel
 
Main cotrol jdbjbdcnxbjbjzjjjcjicbjxbcjcxbjcxb
Main cotrol jdbjbdcnxbjbjzjjjcjicbjxbcjcxbjcxbMain cotrol jdbjbdcnxbjbjzjjjcjicbjxbcjcxbjcxb
Main cotrol jdbjbdcnxbjbjzjjjcjicbjxbcjcxbjcxb
SunilSingh610661
 
Raish Khanji GTU 8th sem Internship Report.pdf
Raish Khanji GTU 8th sem Internship Report.pdfRaish Khanji GTU 8th sem Internship Report.pdf
Raish Khanji GTU 8th sem Internship Report.pdf
RaishKhanji
 
RICS Membership-(The Royal Institution of Chartered Surveyors).pdf
RICS Membership-(The Royal Institution of Chartered Surveyors).pdfRICS Membership-(The Royal Institution of Chartered Surveyors).pdf
RICS Membership-(The Royal Institution of Chartered Surveyors).pdf
MohamedAbdelkader115
 
Data Structures_Introduction to algorithms.pptx
Data Structures_Introduction to algorithms.pptxData Structures_Introduction to algorithms.pptx
Data Structures_Introduction to algorithms.pptx
RushaliDeshmukh2
 
DT REPORT by Tech titan GROUP to introduce the subject design Thinking
DT REPORT by Tech titan GROUP to introduce the subject design ThinkingDT REPORT by Tech titan GROUP to introduce the subject design Thinking
DT REPORT by Tech titan GROUP to introduce the subject design Thinking
DhruvChotaliya2
 
five-year-soluhhhhhhhhhhhhhhhhhtions.pdf
five-year-soluhhhhhhhhhhhhhhhhhtions.pdffive-year-soluhhhhhhhhhhhhhhhhhtions.pdf
five-year-soluhhhhhhhhhhhhhhhhhtions.pdf
AdityaSharma944496
 
How to use nRF24L01 module with Arduino
How to use nRF24L01 module with ArduinoHow to use nRF24L01 module with Arduino
How to use nRF24L01 module with Arduino
CircuitDigest
 
Value Stream Mapping Worskshops for Intelligent Continuous Security
Value Stream Mapping Worskshops for Intelligent Continuous SecurityValue Stream Mapping Worskshops for Intelligent Continuous Security
Value Stream Mapping Worskshops for Intelligent Continuous Security
Marc Hornbeek
 
Introduction to Zoomlion Earthmoving.pptx
Introduction to Zoomlion Earthmoving.pptxIntroduction to Zoomlion Earthmoving.pptx
Introduction to Zoomlion Earthmoving.pptx
AS1920
 
Compiler Design Unit1 PPT Phases of Compiler.pptx
Compiler Design Unit1 PPT Phases of Compiler.pptxCompiler Design Unit1 PPT Phases of Compiler.pptx
Compiler Design Unit1 PPT Phases of Compiler.pptx
RushaliDeshmukh2
 
Data Structures_Searching and Sorting.pptx
Data Structures_Searching and Sorting.pptxData Structures_Searching and Sorting.pptx
Data Structures_Searching and Sorting.pptx
RushaliDeshmukh2
 
Introduction to FLUID MECHANICS & KINEMATICS
Introduction to FLUID MECHANICS &  KINEMATICSIntroduction to FLUID MECHANICS &  KINEMATICS
Introduction to FLUID MECHANICS & KINEMATICS
narayanaswamygdas
 
The Gaussian Process Modeling Module in UQLab
The Gaussian Process Modeling Module in UQLabThe Gaussian Process Modeling Module in UQLab
The Gaussian Process Modeling Module in UQLab
Journal of Soft Computing in Civil Engineering
 
Artificial Intelligence (AI) basics.pptx
Artificial Intelligence (AI) basics.pptxArtificial Intelligence (AI) basics.pptx
Artificial Intelligence (AI) basics.pptx
aditichinar
 
DATA-DRIVEN SHOULDER INVERSE KINEMATICS YoungBeom Kim1 , Byung-Ha Park1 , Kwa...
DATA-DRIVEN SHOULDER INVERSE KINEMATICS YoungBeom Kim1 , Byung-Ha Park1 , Kwa...DATA-DRIVEN SHOULDER INVERSE KINEMATICS YoungBeom Kim1 , Byung-Ha Park1 , Kwa...
DATA-DRIVEN SHOULDER INVERSE KINEMATICS YoungBeom Kim1 , Byung-Ha Park1 , Kwa...
charlesdick1345
 
DSP and MV the Color image processing.ppt
DSP and MV the  Color image processing.pptDSP and MV the  Color image processing.ppt
DSP and MV the Color image processing.ppt
HafizAhamed8
 
ELectronics Boards & Product Testing_Shiju.pdf
ELectronics Boards & Product Testing_Shiju.pdfELectronics Boards & Product Testing_Shiju.pdf
ELectronics Boards & Product Testing_Shiju.pdf
Shiju Jacob
 
Explainable-Artificial-Intelligence-XAI-A-Deep-Dive (1).pptx
Explainable-Artificial-Intelligence-XAI-A-Deep-Dive (1).pptxExplainable-Artificial-Intelligence-XAI-A-Deep-Dive (1).pptx
Explainable-Artificial-Intelligence-XAI-A-Deep-Dive (1).pptx
MahaveerVPandit
 
211421893-M-Tech-CIVIL-Structural-Engineering-pdf.pdf
211421893-M-Tech-CIVIL-Structural-Engineering-pdf.pdf211421893-M-Tech-CIVIL-Structural-Engineering-pdf.pdf
211421893-M-Tech-CIVIL-Structural-Engineering-pdf.pdf
inmishra17121973
 
Level 1-Safety.pptx Presentation of Electrical Safety
Level 1-Safety.pptx Presentation of Electrical SafetyLevel 1-Safety.pptx Presentation of Electrical Safety
Level 1-Safety.pptx Presentation of Electrical Safety
JoseAlbertoCariasDel
 
Main cotrol jdbjbdcnxbjbjzjjjcjicbjxbcjcxbjcxb
Main cotrol jdbjbdcnxbjbjzjjjcjicbjxbcjcxbjcxbMain cotrol jdbjbdcnxbjbjzjjjcjicbjxbcjcxbjcxb
Main cotrol jdbjbdcnxbjbjzjjjcjicbjxbcjcxbjcxb
SunilSingh610661
 
Raish Khanji GTU 8th sem Internship Report.pdf
Raish Khanji GTU 8th sem Internship Report.pdfRaish Khanji GTU 8th sem Internship Report.pdf
Raish Khanji GTU 8th sem Internship Report.pdf
RaishKhanji
 
RICS Membership-(The Royal Institution of Chartered Surveyors).pdf
RICS Membership-(The Royal Institution of Chartered Surveyors).pdfRICS Membership-(The Royal Institution of Chartered Surveyors).pdf
RICS Membership-(The Royal Institution of Chartered Surveyors).pdf
MohamedAbdelkader115
 
Data Structures_Introduction to algorithms.pptx
Data Structures_Introduction to algorithms.pptxData Structures_Introduction to algorithms.pptx
Data Structures_Introduction to algorithms.pptx
RushaliDeshmukh2
 
DT REPORT by Tech titan GROUP to introduce the subject design Thinking
DT REPORT by Tech titan GROUP to introduce the subject design ThinkingDT REPORT by Tech titan GROUP to introduce the subject design Thinking
DT REPORT by Tech titan GROUP to introduce the subject design Thinking
DhruvChotaliya2
 
five-year-soluhhhhhhhhhhhhhhhhhtions.pdf
five-year-soluhhhhhhhhhhhhhhhhhtions.pdffive-year-soluhhhhhhhhhhhhhhhhhtions.pdf
five-year-soluhhhhhhhhhhhhhhhhhtions.pdf
AdityaSharma944496
 
How to use nRF24L01 module with Arduino
How to use nRF24L01 module with ArduinoHow to use nRF24L01 module with Arduino
How to use nRF24L01 module with Arduino
CircuitDigest
 
Value Stream Mapping Worskshops for Intelligent Continuous Security
Value Stream Mapping Worskshops for Intelligent Continuous SecurityValue Stream Mapping Worskshops for Intelligent Continuous Security
Value Stream Mapping Worskshops for Intelligent Continuous Security
Marc Hornbeek
 
Introduction to Zoomlion Earthmoving.pptx
Introduction to Zoomlion Earthmoving.pptxIntroduction to Zoomlion Earthmoving.pptx
Introduction to Zoomlion Earthmoving.pptx
AS1920
 
Compiler Design Unit1 PPT Phases of Compiler.pptx
Compiler Design Unit1 PPT Phases of Compiler.pptxCompiler Design Unit1 PPT Phases of Compiler.pptx
Compiler Design Unit1 PPT Phases of Compiler.pptx
RushaliDeshmukh2
 
Data Structures_Searching and Sorting.pptx
Data Structures_Searching and Sorting.pptxData Structures_Searching and Sorting.pptx
Data Structures_Searching and Sorting.pptx
RushaliDeshmukh2
 
Introduction to FLUID MECHANICS & KINEMATICS
Introduction to FLUID MECHANICS &  KINEMATICSIntroduction to FLUID MECHANICS &  KINEMATICS
Introduction to FLUID MECHANICS & KINEMATICS
narayanaswamygdas
 
Artificial Intelligence (AI) basics.pptx
Artificial Intelligence (AI) basics.pptxArtificial Intelligence (AI) basics.pptx
Artificial Intelligence (AI) basics.pptx
aditichinar
 
DATA-DRIVEN SHOULDER INVERSE KINEMATICS YoungBeom Kim1 , Byung-Ha Park1 , Kwa...
DATA-DRIVEN SHOULDER INVERSE KINEMATICS YoungBeom Kim1 , Byung-Ha Park1 , Kwa...DATA-DRIVEN SHOULDER INVERSE KINEMATICS YoungBeom Kim1 , Byung-Ha Park1 , Kwa...
DATA-DRIVEN SHOULDER INVERSE KINEMATICS YoungBeom Kim1 , Byung-Ha Park1 , Kwa...
charlesdick1345
 
DSP and MV the Color image processing.ppt
DSP and MV the  Color image processing.pptDSP and MV the  Color image processing.ppt
DSP and MV the Color image processing.ppt
HafizAhamed8
 
ELectronics Boards & Product Testing_Shiju.pdf
ELectronics Boards & Product Testing_Shiju.pdfELectronics Boards & Product Testing_Shiju.pdf
ELectronics Boards & Product Testing_Shiju.pdf
Shiju Jacob
 
Explainable-Artificial-Intelligence-XAI-A-Deep-Dive (1).pptx
Explainable-Artificial-Intelligence-XAI-A-Deep-Dive (1).pptxExplainable-Artificial-Intelligence-XAI-A-Deep-Dive (1).pptx
Explainable-Artificial-Intelligence-XAI-A-Deep-Dive (1).pptx
MahaveerVPandit
 

Circular convolution Using DFT Matlab Code

  • 1. ECE324: DIGITAL SIGNAL PROCESSING LABORATORY Practical No.:-05 Roll No.: B-54 Registration No.:11205816 Name:Shyamveer Singh Program Codes: (Function files) Circular Convolution: Marks Obtained Job Execution (Out of 40):_________ Online Submission (Out of 10):________ Aim: To compute the convolution linear and curricular both using DFT and IDFT techniques. Mathematical Expressions Required: Inputs (Should be allocated by the Instructor, Individually): 1. Linear Convolution x=[1 2 3 4] h=[1 2 3 4] 2. Circular Convolution X=[1 2 3 4] H=[1 2 3 4] 3. Circular Convolution X=[1 2 3 4] H=[1 2 3 4]
  • 2. function[y]=shyamcconv(x,h) m=length(x) l=length(h) n=m+l-1 for t=1:n y(t)=0; for k=max(1,t-(m-1)):min(t,m) y(t)=y(t)+x(k).*h(mod(t-k+1,n)) end end z=y y=cconv(x,h) LINEAR CONVOLUTION USING DFT AND IDFT: function[y]=shyamlinconv(x,h) Nx=length(x) Nh=length(h) Ny=Nx+Nh-1 X=[x,zeros(1,Ny)] H=[h,zeros(1,Ny)] p1=fft(X) p2=fft(H) p=p1.*p2; y=ifft(p) z=conv(x,h) end CIRCULAR CONVOLUTION USING DFT OR IDFT function[y]=shyamcirconv(x,h) n=input('valu of n') X=[x,zeros(1,n)] H=[h,zeros(1,n)] p1=fft(X) p2=fft(H) p=p1.*p2; y=ifft(p) z=cconv(x,h) end Outputs/ Graphs/ Plots: 1. Linear Convolution : >> x=[1 2 3 4] x = 1 2 3 4 >> h=[1 2 3 4] h =
  • 3. 1 2 3 4 >> shyamlinconv(x,h) Nx = 4 Nh = 4 Ny = 7 X = 1 2 3 4 0 0 0 0 0 0 0 H = 1 2 3 4 0 0 0 0 0 0 0 p1 = Columns 1 through 3 10.0000 3.3595 - 7.7695i -3.9717 - 2.9596i Columns 4 through 6 -0.5014 + 2.5041i 2.6283 - 0.7046i -1.0147 - 1.9645i Columns 7 through 9 -1.0147 + 1.9645i 2.6283 + 0.7046i -0.5014 - 2.5041i Columns 10 through 11 -3.9717 + 2.9596i 3.3595 + 7.7695i
  • 4. p2 = Columns 1 through 3 10.0000 3.3595 - 7.7695i -3.9717 - 2.9596i Columns 4 through 6 -0.5014 + 2.5041i 2.6283 - 0.7046i -1.0147 - 1.9645i Columns 7 through 9 -1.0147 + 1.9645i 2.6283 + 0.7046i -0.5014 - 2.5041i Columns 10 through 11 -3.9717 + 2.9596i 3.3595 + 7.7695i y = Columns 1 through 6 1.0000 4.0000 10.0000 20.0000 25.0000 24.0000 Columns 7 through 11 16.0000 0.0000 0 -0.0000 -0.0000 z = 1 4 10 20 25 24 16 ans = Columns 1 through 6 1.0000 4.0000 10.0000 20.0000 25.0000 24.0000 Columns 7 through 11 16.0000 0.0000 0 -0.0000 -0.0000 2. Circular Convolution Using DFT IDFT >> shyamcirconv(x,h) valu of n 4
  • 5. n = 4 X = 1 2 3 4 0 0 0 0 H = 1 2 3 4 0 0 0 0 p1 = Columns 1 through 3 10.0000 -0.4142 - 7.2426i -2.0000 + 2.0000i Columns 4 through 6 2.4142 - 1.2426i -2.0000 2.4142 + 1.2426i Columns 7 through 8 -2.0000 - 2.0000i -0.4142 + 7.2426i p2 = Columns 1 through 3 10.0000 -0.4142 - 7.2426i -2.0000 + 2.0000i Columns 4 through 6 2.4142 - 1.2426i -2.0000 2.4142 + 1.2426i Columns 7 through 8 -2.0000 - 2.0000i -0.4142 + 7.2426i y = Columns 1 through 6
  • 6. 1.0000 4.0000 10.0000 20.0000 25.0000 24.0000 Columns 7 through 8 16.0000 -0.0000 z = Columns 1 through 6 1.0000 4.0000 10.0000 20.0000 25.0000 24.0000 Column 7 16.0000 ans = Columns 1 through 6 1.0000 4.0000 10.0000 20.0000 25.0000 24.0000 Columns 7 through 8 16.0000 -0.0000 2. Circular Convolution >> shyamcconv(x,h) m = 4 l = 4 n = 7 y =
  • 7. 1 y = 1 2 y = 1 4 y = 1 4 3 y = 1 4 7 y = 1 4 10 y = 1 4 10 4 y = 1 4 10 10 y = 1 4 10 16 y = 1 4 10 20
  • 8. y = 1 4 10 20 8 y = 1 4 10 20 17 y = 1 4 10 20 25 y = 1 4 10 20 25 12 y = 1 4 10 20 25 24 y = 1 4 10 20 25 24 16 z = 1 4 10 20 25 24 16 y = Columns 1 through 6 1.0000 4.0000 10.0000 20.0000 25.0000 24.0000 Column 7 16.0000 ans =
  • 9. Columns 1 through 6 1.0000 4.0000 10.0000 20.0000 25.0000 24.0000 Column 7 16.0000 Analysis/ Learning outcomes: After performing this experiment we know about the various MATLAB commands and how to pad zeros in any signal and how to match the dimensions of matrix.