Repository navigation
The frequency issue of the transmitted signal and the matched filter signal #203
Replies: 1 comment
|
I don't think you're missing a stage. I traced the same chain and get the same mismatch, plus one more thing to check. The DDC NCO really is 120 MHz:
There's also a sign issue. The mixer does I checked it numerically: a 130–150 MHz, 30 us chirp sampled at 400 MSPS, mixed with the same cos/sin at 120 MHz, low-passed, decimated by 4, then correlated against the reference (conjugate, same as the RTL): import numpy as np
fs=400e6; T=30e-6; t=np.arange(int(T*fs))/fs; k=20e6/T
x=np.cos(2*np.pi*(130e6*t+0.5*k*t*t))
bb=x*np.cos(2*np.pi*120e6*t)+1j*x*np.sin(2*np.pi*120e6*t)
B=np.fft.fft(bb); f=np.fft.fftfreq(len(bb),1/fs); B[np.abs(f)>45e6]=0
bb=np.fft.ifft(B)[::4] # 100 MSPS
n=np.arange(3000)/100e6
def peak(r): return np.abs(np.correlate(bb,r,'full')).max()/np.abs(np.vdot(r,r))
print(peak(np.exp(1j*np.pi*k*n*n))) # repo reference
print(peak(np.exp(-1j*2*np.pi*(10e6*n+0.5*k*n*n)))) # -10 MHz start, -k rateThe instantaneous frequency of So either the reference needs the start-frequency term (and the matching sign), or the NCO should sit at 140 MHz (centre of the IF) with the reference generated as a ±10 MHz chirp around DC. The second keeps the baseband centred and gives more margin against the FIR edge. Whichever way, I'd confirm it on hardware or in the cosim by checking which sideband the TX/RX mixers actually keep, since that flips the sign again. |
Uh oh!
There was an error while loading. Please reload this page.
From my understanding of the project: the TX signal is a 10-30 MHz variable-frequency signal, mixed with 10.5 GHz to give 10.51-10.53 GHz. On RX, after bandpass filtering it is mixed with 10.38 GHz to give 130-150 MHz, and after a 120 MHz quadrature down-conversion the baseband should be 10-30 MHz.
But the matched filter reference appears to be 0-20 MHz, which doesn't match. Did I miss something?
Matched filter reference: long_chirp_seg0~3_i/q.mem (project root). Loaded into BRAM via $readmemh at chirp_memory_loader_param.v line 44, then fed to matched_filter_processing_chain.v lines 52/193/779. Measured: 0-20 MHz (100 MSPS, 3000 samples = 30 us; generated by tb/cosim/gen_chirp_mem.py line 84, phase = pi mu t^2, no start-frequency term).
TX reference: long_chirp_lut.mem, read by plfm_chirp_controller.v line 107. Measured: 10-30 MHz (120 MSPS, 3600 samples = 30 us; generated by 5_Simulations/DAC_ReconstructionFilter/Generate_ChirpcsvFile.py lines 40-42, phase includes fmin N Ts, default fmin = 10e6).
Both chirps have the same duration and the same chirp rate - they differ only by a 10 MHz start-frequency term. Could you confirm whether I'm missing a stage in the chain, or the reference table is missing that term?
All reactions