First, I want to congratulate you on the Analog Discovery kit & Waveforms software. The hardware is decent, well-documented and affordable (especially before the covid price hike). However, what really makes it stand out for me is the Waveforms software, which simply works well, is modern and convenient to use, and reasonably open and extendable (unfortunately all of these three points are often sorely lacking in test & measurement equipment). As a consequence, this has led my lab to buy a dozen or so ADs over the years.
Background
Recently, I've started using the network analyzer capability of the AD2 extensively, measuring the frequency response of various devices both in open-loop operation, and in closed-loop configuration in order to fine-tune PI(D) controller parameters in-situ, with bandwidths reaching up to a few MHz. There the AD2 and especially the recent ADP3X50 nicely fill a mostly unaddressed niche:
Traditionally, this kind of measurement would have been done with a two-channel FFT analyzer (such as the venerable HP 3563A control systems analyzer). Unfortunately, most FFT analyzers only seem to go up to 100 kHz at most, so not quite far enough for my applications. At higher frequencies, there is of course the option of traditional network analyzers, but they often don't work all that well below 10 MHz, and the 50 Ohm input and output impedance is a big nuisance to interface with.
The AD2 and ADP3x50 nicely fill this gap, which is why I recently bought a ADP3450, hoping to finally fill the void.
Feature request: Coherent averaging for network analyzer
While the NA functionality has already proven quite useful, it is currently still missing one crucial feature: Coherent averaging
Let me explain the motivation step by step. In the simplest, noiseless case we can measure the transfer function as follows:
Here X and Y are the Fourier transforms of x(t) and y(t), as calculated by the FFT. If I understand the documentation correctly, then the Waveforms software implements exactly this, and gets the magnitude and phase of the frequency response function by calculating magnitude = |X/Y| and phase = (angle(Y)-angle(Y)).
In reality, there will always be various additional noise sources, as shown below. Now, the naive averaging fails:
Using coherent averaging, we can however form a better estimate of the transfer function, by using only the part of the output Y that is coherent with the input excitation X:
The crucial part happens in step 2), specifically in the numerator with the averaging of E[XY*] = E[|X||Y|exp(i*phi)]. The part of Y that has a stable phase relationship with X (i.e. is phase-coherent) will be retained, whereas the part of Y that is incoherent will get averaged over multiple measurements.
Another very useful feature is that one can then introduce the so-called coherence function gamma that tells us how much of the measured response y is actually due to the stimulus x, as compared to noise or other unaccounted excitations. This makes it a very useful diagnostic tool indicating when the measurement can be trusted. For example in experimental modal testing this is used extensively.
Demonstration of problem in practise
I've performed a quick test measurement to demonstrate how the simple, naive method gets tripped up and to confirm that the Waveforms software currently doesn't seem to do any coherent averaging.
Here's the test setup:
The DUT is simply a differential amplifier with unity gain and a bandwidth of ~ 1 MHz, so well above the frequency range measured below. Note the fixed excitation at 25 kHz representing v(t) from the previous, general scenario. Using the ADP3450 to measure the frequency response, I get the following:
Note how the measurement gets tripped up around 25 kHz, and that introducing averaging doesn't help.
Summary
In summary, I'd love if the following features got implemented (in descending order of importance):
1) Coherent averaging for the NA as outlined above
2) Ability to display the coherence function gamma^2
3) Ability to nicely tap into coherently averaged G_xy, G_xx, etc. (for export & more complicated further analysis outside of waveforms)
Reading the release notes of the waveforms software I'm led to believe that behind the scenes the required ground work for implementing coherent averaging has mostly been done, since it's mentioned that the FFT already calculates the phases (there just doesn't seem to be a way to plot/access it). If I'm not mistaken, the main required change would be to use this phase information from the FFT in the averaging process.
I'd gladly help in any way I can in order to implement coherent averaging!
Question
Robin Oswald
Hey,
First, I want to congratulate you on the Analog Discovery kit & Waveforms software. The hardware is decent, well-documented and affordable (especially before the covid price hike). However, what really makes it stand out for me is the Waveforms software, which simply works well, is modern and convenient to use, and reasonably open and extendable (unfortunately all of these three points are often sorely lacking in test & measurement equipment). As a consequence, this has led my lab to buy a dozen or so ADs over the years.
Background
Recently, I've started using the network analyzer capability of the AD2 extensively, measuring the frequency response of various devices both in open-loop operation, and in closed-loop configuration in order to fine-tune PI(D) controller parameters in-situ, with bandwidths reaching up to a few MHz. There the AD2 and especially the recent ADP3X50 nicely fill a mostly unaddressed niche:
Traditionally, this kind of measurement would have been done with a two-channel FFT analyzer (such as the venerable HP 3563A control systems analyzer). Unfortunately, most FFT analyzers only seem to go up to 100 kHz at most, so not quite far enough for my applications. At higher frequencies, there is of course the option of traditional network analyzers, but they often don't work all that well below 10 MHz, and the 50 Ohm input and output impedance is a big nuisance to interface with.
The AD2 and ADP3x50 nicely fill this gap, which is why I recently bought a ADP3450, hoping to finally fill the void.
Feature request: Coherent averaging for network analyzer
While the NA functionality has already proven quite useful, it is currently still missing one crucial feature: Coherent averaging
Let me explain the motivation step by step. In the simplest, noiseless case we can measure the transfer function as follows:
Here X and Y are the Fourier transforms of x(t) and y(t), as calculated by the FFT. If I understand the documentation correctly, then the Waveforms software implements exactly this, and gets the magnitude and phase of the frequency response function by calculating magnitude = |X/Y| and phase = (angle(Y)-angle(Y)).
In reality, there will always be various additional noise sources, as shown below. Now, the naive averaging fails:
Using coherent averaging, we can however form a better estimate of the transfer function, by using only the part of the output Y that is coherent with the input excitation X:
The crucial part happens in step 2), specifically in the numerator with the averaging of E[XY*] = E[|X||Y|exp(i*phi)]. The part of Y that has a stable phase relationship with X (i.e. is phase-coherent) will be retained, whereas the part of Y that is incoherent will get averaged over multiple measurements.
Another very useful feature is that one can then introduce the so-called coherence function gamma that tells us how much of the measured response y is actually due to the stimulus x, as compared to noise or other unaccounted excitations. This makes it a very useful diagnostic tool indicating when the measurement can be trusted. For example in experimental modal testing this is used extensively.
Demonstration of problem in practise
I've performed a quick test measurement to demonstrate how the simple, naive method gets tripped up and to confirm that the Waveforms software currently doesn't seem to do any coherent averaging.
Here's the test setup:
The DUT is simply a differential amplifier with unity gain and a bandwidth of ~ 1 MHz, so well above the frequency range measured below. Note the fixed excitation at 25 kHz representing v(t) from the previous, general scenario. Using the ADP3450 to measure the frequency response, I get the following:
Note how the measurement gets tripped up around 25 kHz, and that introducing averaging doesn't help.
Summary
In summary, I'd love if the following features got implemented (in descending order of importance):
1) Coherent averaging for the NA as outlined above
2) Ability to display the coherence function gamma^2
3) Ability to nicely tap into coherently averaged G_xy, G_xx, etc. (for export & more complicated further analysis outside of waveforms)
Reading the release notes of the waveforms software I'm led to believe that behind the scenes the required ground work for implementing coherent averaging has mostly been done, since it's mentioned that the FFT already calculates the phases (there just doesn't seem to be a way to plot/access it). If I'm not mistaken, the main required change would be to use this phase information from the FFT in the averaging process.
I'd gladly help in any way I can in order to implement coherent averaging!
Best,
Robin Oswald
Link to comment
Share on other sites
25 answers to this question
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now