DSPRelated.com
Forums

FMCW RF up-convserion doesn't land at the designated carrier

Started by ninjatuna123 1 month ago3 replieslatest reply 4 weeks ago117 views

I created a simple FMCW sweep using MATLAB in baseband, BW = 100MHz:

sweepTime = 1e-3; % 1 ms sweep
BW   = 1e8; %100 MHz;
fs = 2e8;% 200 MHz sample rate

% FMCW waveform: only up sweeps
waveform = phased.FMCWWaveform(...'SweepTime', sweepTime, ...'SweepBandwidth', sweepBW, ...'SweepDirection', 'Up', ...'SweepInterval', 'Positive', 'SampleRate', fs, ...'NumSweeps', 4); % Repeat 4 up-sweeps

% Generate waveform
x = waveform();

% Plot spectrogram
[S, F, T] = spectrogram(x, 1024, 512, 1024, fs);
imagesc(T, fftshift(F - fs/2), fftshift(mag2db(abs(S))))
xlabel('Time (s)')
ylabel('Frequency (Hz)')
title('Spectrogram of 200 MHz FMCW Up-Sweeps')
colorbar

it plotted this

screenshot 2025-06-12 163225_95049.png

I then try to up-convert it to 2.45GHz,

%checking the sprectrol gram in RF
fc = 2.45e9 ; 

% Extract the first 1 ms sweep (first sweepTime worth of samples)
N_sweep = round(sweepTime * fs); % Number of samples in 1 sweepx1 = x(1:N_sweep);                % First sweep

% Time vector for first sweep
t = (0:N_sweep-1)' / fs;

% Upconvert to RF (use same t as baseband generation!)
x_rf = x1 .* exp(1j * 2 * pi * fc * t);  % complex RF signal

% Windowed FFT for better spectral leakage control
X = fft(x_rf .* hann(N_sweep));
f = (0:N_sweep-1)/N_sweep * fs + fc;

% Plot spectrum (in dB)
figure;
plot(f/1e9, 20*log10(abs(X)))
xlim([2.3 2.8])    % Zoom in around expected sweep range
ylim([-100 100])
xlabel('Frequency (GHz)')
ylabel('Magnitude (dB)')
title('FFT of 1 ms Upconverted FMCW Sweep')
grid on

it then plotted this:

screenshot 2025-06-12 163159_23796.png

I am confused why is my RF FMCW starting at 2.5GHz while I clearly defined my fc = 2.45GHz?

[ - ]
Reply by shafie7June 13, 2025

Have you try using fs = 400 MHz instead of 200 MHz to see the impact on the output?

[ - ]
Reply by emebJune 13, 2025

I don't have access to the phased array toolbox so I can't test your Matlab code as shown, but it seems to me you have some fundamental issues with sampling rates and center frequency. You generate the x vector of FMCW at a sample rate of 200MHz and then attempt to shift the frequency to 2.45GHz which is well beyond the sample rate and will cause all manner of aliasing issues that completely throw off the X axis on your FFT plot.

[ - ]
Reply by fxbrainJune 15, 2025

The issue is that the baseband sweep shape is not centered as you'd expected.

To get a sweep centered at 2.45 GHz, your baseband must sweep from -50 MHz → +50 MHz, which is exactly what SweepInterval = 'Symmetric' produces.