multiplication in frequency domain equals convolution in time domain mismatch
19 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Merida
el 8 de Mayo de 2019
Respondida: Narendhar
el 1 de Oct. de 2024
We know that a convolution in the time domain equals a multiplication in the frequency domain.
As per the article below,
In order to multiply one frequency signal by another, (in polar form) the magnitude components are multiplied by one another and the phase components are added.
To prove this, i created two sinusoidal signals,
Freq1 = 1000;
Freq3 = 3000;
Fs = 16000;
T = 1/Fs;
Nos = (0:128-1)*T;
Amp = 1.0;
Signal1 = Amp*sin(2*pi*Freq1*Nos);
Signal3 = Amp*sin(2*pi*Freq3*Nos);
In the time domain, i convolved these two signals,
Signal4 = conv(Signal1,Signal3);
Taking a 32 point FFT of the two signals & and a 32 point FFT of the convolved signal,
NFFT = 32;
freqdata1 = fft(Signal1,NFFT);
freqdata2 = fft(Signal3,NFFT);
freqdata4 = fft(Signal4,NFFT);
in the frequency domain, i multipled the magnitude components of the two individual signals and added the phase component of the two signals. I compared this Magnitude and phase value with the Convolved signal's phase and magnitude value. I expected the values, [Newmag' NewPhase'] & [Mag3' Phase3'] to be similar since the a convolution in time domain equals a multiplication in the frequency domain. But they are not. What am i missing here ? What have i done wrong ?
for ii = 2:((length(freqdata1)/2)+1)
sig1_cc = real(freqdata1(1,ii));
sig1_dd = imag(freqdata1(1,ii));
Mag1(ii-1) = sqrt((sig1_cc^2)+(sig1_dd^2));
Phase1(ii-1) = atan(sig1_dd/sig1_cc);
sig2_cc = real(freqdata2(1,ii));
sig2_dd = imag(freqdata2(1,ii));
Mag2(ii-1) = sqrt((sig2_cc^2)+(sig2_dd^2));
Phase2(ii-1) = atan(sig2_dd/sig2_cc);
sig3_cc = real(freqdata4(1,ii));
sig3_dd = imag(freqdata4(1,ii));
Mag3(ii-1) = sqrt((sig3_cc^2)+(sig3_dd^2));
Phase3(ii-1) = atan(sig3_dd/sig3_cc);
Newmag(ii-1) = Mag1(ii-1)*Mag2(ii-1);
NewPhase(ii-1) = Phase1(ii-1) + Phase2(ii-1);
end
[Newmag' NewPhase']
[Mag3' Phase3']
0 comentarios
Respuesta aceptada
Más respuestas (2)
AK Nahin
el 8 de Nov. de 2022
For discrete time domain signal:
n=0:100;
k = 0:200;
w = (pi/100)*k;
m=n'*k;
X11=(exp(-j*pi/100)).^m;
x1=cos(pi*n/2); % generate random number x1
x2=sin(pi*n/2); % generate random number x2
X1 = x1*X11;
X2 = x2*X11;
x = conv(x1,x2)
n1=0:200;
m1=n1'*k;
X12=(exp(-j*pi/100)).^m1;
X3 = x*X12
X = X1.*X2
stem(n1,X3)
stem(n1,X)
1 comentario
Walter Roberson
el 8 de Nov. de 2022
The imaginary components turn out to be noise level.
n=0:100;
k = 0:200;
w = (pi/100)*k;
m=n'*k;
X11=(exp(-j*pi/100)).^m;
x1=cos(pi*n/2); % generate random number x1
x2=sin(pi*n/2); % generate random number x2
X1 = x1*X11;
X2 = x2*X11;
x = conv(x1,x2)
n1=0:200;
m1=n1'*k;
X12=(exp(-j*pi/100)).^m1;
X3 = x*X12
X = X1.*X2
stem(n1, abs(X3))
stem(n1, abs(X))
stem(n1, abs(X3)-abs(X))
Narendhar
el 1 de Oct. de 2024
: Write MATLAB code to demonstrate that the convolution in spatial domain is equivalentto multiplication in the frequency domain.
0 comentarios
Ver también
Categorías
Más información sobre Measurements and Feature Extraction en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!




