# Frequency spectrum of complex equivalent Baseband Signal - Frequency Content around carrier frequency

Basically my objective is to generate a complex equivalent baseband signal of an AM modulated wave in MATLAB. Then to view the difference in frequency spectrum of AM modulated RF signal vs complex equivalent baseband of (AM modulated RF signal).

I generated an equivalent complex baseband signal for an AM modulated signal and when viewing the spectra of complex baseband signal, I see frequency content centered at 0 but too many frequency content around carrier frequency as well.

Could anyone let me know why I am seeing frequency content around carrier frequency as well?

Here are the steps I followed:

• Generated a carrier signal and message signal.
• Did AM modulation.
• Generated Inphase and Quadrature components.
• Then represented complex baseband signal by $x_{bb}(t)=x_i(t)+jx_q(t)$
• View the frequency spectra of AM modulated wave.
• View the frequency spectra of Complex baseband signal.

When I compare the spectra, I see that the spectra of complex baseband signal is centered around 0 but has frequency components at the carrier frequency range (both positive and negative). Here are the screenshots:

1. Spectra - AM modulated signal

2. Spectra - Equivalent complex baseband signal

Here is my MATLAB code:

fs=15000;
t=0:1/fs:1;
fm=5;
m=sin(2*pi*t*fm);  %message signal
%plot(t,m,'b');
fx=1000;
x=cos(2*pi*t*fx); %carrier signal
xm=m.*x;  %AM
ax=subplot(2,1,1);
plot(ax,t,m,'b');
axm=subplot(2,1,2);
plot(axm,t,xm,'g');
hx=imag(hilbert(xm)); %hilbert transform

xit=(xm.*cos(2*pi*fx*t))+(hx.*cos(2*pi*fx*t));
xqt=(hx.*cos(2*pi*fx*t))-(xm.*sin(2*pi*fx*t));

xbb=xit+(1i*xqt); %equivalent complex baseband signal
figure(2)
plot(t,xbb);

%spectrum
nfft=1024;
F=fftshift(fft(xm,nfft));      %spectra of AM modulated wave
fvals=fs*(-nfft/2:nfft/2-1)/nfft;
figure(4);
stem(fvals,abs(F),'b');

%spectrum
nfft=1024;
F=fftshift(fft(xbb,nfft));  %spectra of equivalent complex baseband
fvals=fs*(-nfft/2:nfft/2-1)/nfft;
figure(5);
stem(fvals,abs(F),'b');

You have a bug in the formulation of your complex heterodyne oscillator signal inside your complex multiplication. This seems to be creating both sum and difference frequency results. Thus the extra high-frequency spectrum.

• So, you mean at this part: xit=(xm.*cos(2*pifxt))+(hx.*cos(2*pifxt)); xqt=(hx.*cos(2*pifxt))-(xm.*sin(2*pifxt)); xbb=xit+(1i*xqt); %equivalent complex baseband signal – sundar May 26 '17 at 9:11
• I'm not an expert on Hilbert Transforms, but I think you should expect to see the one sided frequency spectrum if you do it right. I would try taking the FFT of of xm + i*hilbert(xm). Good luck! – Robby Wasabi Jul 25 '17 at 16:03

Two issues here: (One) In creating the equivalent complex baseband signal (which for this modulation would be a real signal) and (Two) in creating the spectrums.

Creating the baseband signal

The Hilbert Transform will convert the two sided modulated signal to a single sided signal as the two sidebands centered on the upper sideband carrier:

h = hilbert(xm);

Simply frequency translate this to baseband using the single sided negative carrrier:

bb = h.*exp(-j*2*pi*t*fx);

Creating the spectrums:

There is not enough frequency resolution in the FFT used since it was truncated to 1024 samples. At the given $$f_s$$ of 15 KHz, this is only 0.06 seconds of the time domain signal, and the bandwidth of each FFT bin is $$f_s/1024 = 14.6 \text{ Hz}$$. The sidebands would at $$\pm 5 \text{ Hz}$$ from the carrier and therefore not visible.

Original FFT of only 1024 length as OP had done:

Zoom in around carrier after FFT of entire modulated sequence (15001 length): Here the two sidebands are clearly visible as distinct FFT bins. Better balance between the two and reduction of the other spectral leakage components can be achieved by windowing the signal prior to taking the FFT.

Doing both of these results in the following spectrum of the baseband equivalent signal:

F = fftshift(fft(bb))

Zoom in below: