Hi,
measuring crosstalk is quite tricky thing.
you must be sure to have well defined setup and on that setup you define the crosstalk levels.
So, I think that correct way of measuring crosstalk for example
between OUT1 and IN1 is:
1. OUT1, OUT2 , IN1, IN2 are all terminated with 50OHM. OUT1 and OUT2 are designed for 50Ohm.
2. OUT1, OUT2 amplitudes are set to 0V.
3. Acquire signals on IN1 and calculate FFT. When calculating FFT you need to use correct equations for calculating dB.
4. Save this FFT "trace" as "noise_fft"
5. OUT1 amplitude is set to 0.7V (don't use max amplitude in order to avoid non-linearities of DAC)
then you make freq. sweep for OUT1 frequency - from 100Hz to 50MHz.
6. For each f. step of OUT1 acquire signal on IN1, calculate FFT -> you get "cross_talk_FFT(f.step)"
7. for each f. step subtract "noise_fft" from "cross_talk_FFT(f_step)"
8. plot all "cross_talk_FFT(f_step)" one above another. (don't average them!!!)
8a. instead of 8. you can pick up max values for each f.step from "cross_talk_FFT(f_step)" matrix.
with that you will extract worst cases.
9. When you start STEMlab board start Oscilloscope application and then close it.
This will load fpga filter parameters.
then you can go with SCPI and remote control.
Now, when doing acquisition you should allays have same sampling rate in order to get
correct FFT calculations.
Preferably you should use max sampling rate.
But if you wish to look at lower freq. range you can use lower sampling rate
and repeat steps from 1-8 while max OUT1 freq is limited by Nyquist.
"I am still not sure how the coupling works ... I also tried to connect 47nF to the +3,3V to ground on the connector, but that did not have any visible effect on cross coupling. My idea was that a ripple on the supply might cause this."
- Yes, power supply ripples and ground plane can affect outputs performances.
but I think this will not affect crosstalk noticeably.
https://ln1985blog.wordpress.com/2016/0 ... rformance/
This is the reason for step 4. exclude environment noise form crosstalk measurements.
The code bellow is for calculating power noise using FFT.
When dealing with amplitude ratios your FFT equations will look different
In equation 1 (look at code) you should use magnitude of complex value and not complex conjugate multiplication
Amplitude spectrum in volts RMS = sqrt(2)* mag(FFT(A))/N
in our case
Amplitude spectrum in volts RMS = sqrt(2)* mag(xdft_hann)/N
and equation 2 should look like
A= 20*log10( Amplitude spectrum in volts RMS/OUT1 amplitude);
Code: Select all
%% data - acquired signal in volts
Fs = 125E6;
t = 0:1/Fs:1-1/Fs;
N = length(data);
freq = 0:Fs/N:Fs/2;
R_load=50;
%% Hann window;
w = hann(N)';
K = 64;
tmp = hann(K)/K;
tmp = fft(tmp);
tmp = tmp.*conj(tmp);
dcspan = sum(tmp(1:K/2)>1e-6)-1;
win_gain = sqrt(sum(tmp));
xdft_hann = fft(data.*w)/win_gain;
xdft_hann = xdft_hann(1:N/2+1);
%% Equation 1
Pmag_hann=(xdft_hann.*conj(xdft_hann))./(N^2); % Calculate power spectrum to Fs/2
Pmag_hann = Pmag_hann./R_load; % Calculate for 50 Ohm
%% Equation 2
Pdb_hann = 10*log10(Pmag_hann); % Power in dB 1W as reference
PdBm_hann = 10*log10(Pmag_hann./1E-3); % Power in dBm 1mW as reference
Best, Zumy
PS 1: Double check the new equations for amplitude - I didn't test it
PS 2: A lot of people use same equation for FFT spectrum calculation and then getting wrong results.
mag(a+jb) is not equal to (a+jb)x(a-jb) (complex conjugate)