We know that a convolution in the time domain equals a multiplication in the frequency domain. As per the article below,
https://www.dspguide.com/ch9/3.htm
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 in MATLAB,
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']