I'm having trouble with the dsp.DigitalDownConverter object in that I'm not see what I think I should be seeing. More than likely, this is due to user error, so I'm hoping someone can tell me what I'm doing wrong.
First, I'm generating a frequency-modulated pulse using the following expression:
exp(1j*(2*pi*Freq*t+phi)),
where Freq (scalar), t (vector), and phi (scalar) are pretty self-explanatory.
I then run a periodogram to check that my modulated pulse looks good.
[pxx,f] = periodogram(x,[],10*length(x),fs*1e6,'centered');
The result is the expected sinc-like function with a center at Freq and a width that's inversely related to the pulsewidth.
Now that I've confirmed my signal, I want to implement a DDC to downconvert that signal to baseband and apply filtering.
I do that with the following:
hDDC = dsp.DigitalDownConverter(...
'DecimationFactor',Decimation,...
'SampleRate', fs*1e6,...
'Bandwidth', BW*1e6,...
'StopbandAttenuation', 80,...
'PassbandRipple',0.2,...
'CenterFrequency',Freq_MHz*1e6);
xDown = step(hDDC,x');
The strange part is that when I look at the real or imaginary components of xDown, I see the leading edge and trailing edge of the pulse, but not the middle, as if the DC component of the downconverted signal is being filtered.
I checked the hDDC filter using FVTool and the cutoffs all look good - a LPF with cutoff at BW/2. I also tried incrementing Freq_MHz in a loop and essentially scanning the input data for the spectral peak (which should occur at Freq) using the periodogram function. This is essentially modeling how a spectrum analyzer works, so I'd expect so see a strong return at Freq, but I don't. I just see scalloping without any dominant peak, although that scalloping does shift as I change the CenterFrequency parameter. I've already gone through to try to find any mismatches between Hz and MHz, or some other dumb unit mistake, but to no avail. Basically, it seems that the hDDC object isn't tuning to the CenterFrequency value like I would have expected.
Can anyone shed some light? I'd be happy to provide more information or pictures if that would help.
Thanks, Gary