Friday, 5 July 2019

"Arc noise" in amplitude over range of frequencies from Red Pitaya

I have an incoming signal to a Red Pitaya and am using the simple Jupyter Notebook interface to program it. The incoming signal is a very simple sine wave:

I would like to be able to use the Fourier transform to extract the amplitude from the signal over a range of frequencies, but it introduces this strange noise that looks like the absolute value of a sine wave: zoomed in look

Here is a comparison between taking the root mean square of the signal to calculate an amplitude, and using the Fourier transform to calculate the amplitude. enter image description hereenter image description here

The RMS is calculated in the following way:

rmsArray[i, j] = NP.sqrt(NP.mean(data**2))

The Fourier transform method is done as follows:

fourierTransform = NP.fft.fft(data)
frequencies = NP.fft.fftfreq(nSamples, 1/125000000)
realPart = NP.real(fourierTransform)
imagPart = NP.imag(fourierTransform)
amplitudes = NP.sqrt(realPart**2 + imagPart**2)
ampArray[i, j] = max(amplitudes)

where the peak of the result of the Fourier transform gives the amplitude.

The amplitude is taken from the peak

I have tried using an apodization window, higher sampling rates, and the scipy fft routine but had no luck in eliminating the noisy arcs. After further testing, it is clear that the noise is caused by a frequency jitter in the wave coming into the Red Pitaya. The RMS would not pick up on this change over the length of the signal, but the Fourier transform would. What could be introducing this phenomenon in the Red Pitaya? Is it something to do with the clock speed of the Red Pitaya and how accurately and quickly it can cycle through frequencies? I have been unable to find much information on this in the documentation.



from "Arc noise" in amplitude over range of frequencies from Red Pitaya

No comments:

Post a Comment