How does one take the average of multiple S2P files? This means getting the average of n matrices made up of complex numbers. Can anyone please point me to a mathematical description for this process?
Is this multiple measurements of the same DUT? Otherwise I can't see the point of it, but I thought I'd ask.
Someone from Keysight might tell you, but they might say the information about averaging is proprietary information - I think that might be the case.
If I were going to do it, I'd look to convert the data to real and imaginary (R + j X), then take the means, then putting back to whatever format you want.
Averaging values in dBs directly would not seem very sensible. If you have two sources of power, one at 1 mW (0 dBm) and the other at 1 Watt (30 dBm), then the average is (1000+1/2)= 1001/2=500.5 mW, which is 26.99 dBm. If you do the dumb thing, and average 0 and 30 dBm, you get (30+0)/2=15 dBm, which is 31.6 mW, and clearly that's not the average power.
Clearly it is silly to average values in dBs. I suspect the same is true of phase angles too, although I can't prove that easily. I would suggest that averaging the real and imaginary parts directly to be best.
But I do not know, so feel free to send my comments to /dev/null.
Trickier that you might imagine. As implied in the first response, how you average is a little dependent on why you want to average. If you are measuring the same device, over and over, and averaging to reduce noise and jitter in the measurement, then convert to Re and Im and average those results.
If you are collecting S-parameters on a series of devices, and you want to find the mean and std deviation of the device, then you have to be careful. Consider the situation where you have a set of amplifiers that all have 10 dB of gain but each one has a different phase (0,90,180, 270), and you averaged in Re, IM you would find the mean value is zero! (-infinite gain). So in that case you should convert to magnitude and average the mag (not dB but linear mag). For phase, you can still use re, im, but normalize them by the mag (as in phase = atan2 (im/(sqrt(real^2+imag^2),re/(sqrt(real^2+imag^2)). If you don't do this trick you will run into a problem averaging phase where one DUT is at a phase of +179 and one is -179. The simple average is 0 deg, but the right answer is 180 (or -180)
Retrieving data ...