DiAna, a software Distortion Analyzer

Disabled Account
Joined 2012
I am the proud owner of an AP SYS272. I would like to look in more detail into the waveform of the residual of the signal. The AP can give me that residual (supressed fundamental), how can I feed this into DiAna? I guess I have to use a sound card to get the signal into the PC.

Will DiAna complain if there is no fundamental, or can I insert a fundamental in the other channel of the soundcard and use that in some way?

Jan

With mine, I use the QA401 on it.


-Richard
 
Well it might help to have some explanation on how to use the settings. I'm no expert, but I think I understand this at least a little.

In my experience, smaller record lengths are generally better. How low you can go before problems depends on the frequency, level and type of noise etc. Lower record size results in a lower noise floor, but higher likelihood of rejected records or altogether failure. Data sampling frequency, SNR and signal frequency affect how small a record DiAna can sync to; if so, then smaller records means higher resolution. If not, then the data cannot be processed and a higher record size needs to be chosen. The higher record sizes should only really be needed for low frequencies or very noisy data.

Secondly, set the number of records as high as possible; this way DiAna will process all the data you provide and your resolution will depend on how much you record. More is better. Although this is different from averaging, accuracy still increases with a growing pool of data. I have it set to 10000, that will usually cover what I record. I have recorded tests longer than a minute to process in DiAna. DiAna will stop processing records when it runs out of data, so you can never make the number of records too high.

The way you know it's working is by flipping between the coherent and incoherent spectrum graphs (if you are getting inconsistent THD results pay attention). The incoherent spectrum shows what just a normal FFT would show. The coherent FFT shows the signal with the noise extracted out. The coherent FFT noise floor should be below the levels of the harmonics you want to measure. If it's not, then you need to adjust your settings, increase your number of records and/or take a longer measurement. If there is noise in the upper harmonic region you can't remove, consider lowering the LP filter frequency or number of harmonics if you want to look at a less noisy residual.

There is the possiblity of "ghost" harmonics. This happens when there is so little data that the noise that is coherent with the harmonics does not extract out. This will happen with extremely noisy signals. DiAna is correctly reporting the magnitude of the extracted harmonic frequencies over the course of the whole data set; it just so happens that the tiny fraction of the noise that is coherent with the fundamental is larger than the actual harmonics. The solution is to record for a longer time period (with the number of records set high enough to process it all), or reduce the noise in the test.

Another possible stumbling block is that since we are looking quite far into the noise, it's possible to encounter harmonics from other noise sources that weren't expected. For instance KHz region harmonics of mains hum. Hum becomes a huge factor when trying to take distortion measurements around 100Hz. Of course one can argue whether there is meaning in the THD figure when the noise floor and/or hum are larger than the harmonics. It's not good practice to rely on DiAna to make up for a bad test setup; although it is extremely helpful in mitigating the artifacts that remain after due diligence.

If you have a signal that is just a residual that you want to process, DiAna can't sync to a harmonic. It needs a bit of the fundamental mixed in, or you need to use the external sync mode. The sync channel can be the fundamental plus harmonics (or the pure input tone), the other can be just the residual. The sync channel does not need to be precise or free of harmonics, it just needs to have the same instantaneous frequency of the signal being analyzed, without the same level of noise. I requested this feature from Edmond because I had residuals I wanted to analyze and the alternate sync made it much easier to use.

DiAna may have issues with significant levels of LF noise. For instance my ADC has a -40db spike in the infrasonic range. I have no idea why, but I suspect it may have something to do with unconventional ADC wizardry inside. This is why I asked Edmond to implement a lowpass feature which he mentioned in his last comment. It makes sense to limit the measurement scope to the fundamental and above and simply filter out lower frequencies.
 
Last edited:
It seems DiAna is not currently available for download. I hope it returns soon.
Hi Demian,
That's right. Due to a complaint from Netcraft about a supposed virus (which is definitely a false positive) my host provider has blocked downloads.

To all,
Awaiting for a final solution for this problem, just send me PM with a request for an update via email. The latest version is 1.54.8, that includes a high pass filter and bug repair of the calibration procedure.

Cheers, E.
 
Well it might help to have some explanation on how to use the settings.
[...]
If you have a signal that is just a residual that you want to process, DiAna can't sync to a harmonic. It needs a bit of the fundamental mixed in, or you need to use the external sync mode. The sync channel can be the fundamental plus harmonics (or the pure input tone), the other can be just the residual. The sync channel does not need to be precise or free of harmonics, it just needs to have the same instantaneous frequency of the signal being analyzed, without the same level of noise. I requested this feature from Edmond because I had residuals I wanted to analyze and the alternate sync made it much easier to use.
[...]
Hi Keane,

Thank you for this explanation. Indeed, DiAna needs a fundamental to synchronize on, that is, it should be present on at least one channel, hereafter called the reference channel. With the setup shown below, the other (test) channel uses frequency and phase information from the reference channel.
Now you can feed the test channel with a suppressed (notched) fundamental.

Diana has also provisions for characterizing a notch filter and notch compensation in order to restore the original fundamental and its harmonics (amplitude as well as phase). See Options on the menu bar. More on this later.


Cheers, E,
 

Attachments

  • RefChannel.png
    RefChannel.png
    12.3 KB · Views: 289
Last edited:
Hi Demian,
That's right. Due to a complaint from Netcraft about a supposed virus (which is definitely a false positive) my host provider has blocked downloads.

To all,
Awaiting for a final solution for this problem, just send me PM with a request for an update via email. The latest version is 1.54.8, that includes a high pass filter and bug repair of the calibration procedure.

Cheers, E.

You should zip the installer with AES encryption and a password using 7Zip. This way the virus scanners can’t determine anything. You can just post the password on the download page.
 
Password for unzipping DiAna.

You should zip the installer with AES encryption and a password using 7Zip. This way the virus scanners can’t determine anything. You can just post the password on the download page.
Done! Now you can download it directly again from my website. The password is Yohimbine (Don't forget it !)
I also have updated the website with an explanation how to calibrate a sound card manually (i.e. not by means of the automatic procedure).

Cheers, E.
 
Hi,
is a documentation for the software available?
Some documentation is available, but not finished yet.
See: DiAna

How can I connect the DUT with the soundcard?
It all depends on the I/O levels of your sound card and the I/O levels of the DUT.
In most cases you'll need a dedicated interface. In case of a power amplifier, for example, most likely you need an attenuator between the amp output and ADC input.
The errors (THD ect.) of the soundcard must be filtered out, how is it made?
Thanks!
Please, see: DiAna, a software Distortion Analyzer
As for the "poor mans solution", first run a measurement in loop back mode and save the residue under File->Distortion->Save Residual As...
Next, run a second measurement, but this time together with the DUT.
Then go to Options and select Differential. Now the residual of the first run has been subtracted from the residual of the second run. BTW, don't forget to specify a suitable frequency of the LP filter, otherwise you will see a lot of HF rubbish. Good luck.

Cheers, E.
 
I'm also a great fan, and I'm burning to use the notch filter option.
A few words about the format of the filter characterization file and/or the characterization procedure would be greatly appreciated.

Regards,
Braca
Hi Braca,

Filter characterization is rather simple. Connect the sound card in loopback mode. One channel (used as reference) directly and the other (test) channel via the notch filter. In the Distortion menu select the channel modes (Ref.- and Test channel) accordingly. Also, select in the Option menu Characterize notch filter.
Now run a "distortion" measurement for say 100 records and save the result under File->Save Notch Filter.
In order to use the saved data, run a distortion measurement as usual and select in the Option menu Apply notch compensation, which takes care of the amplitude and phase correction of the harmonics

The file format is as follows (fundamental=996.3Hz):

[harmonic, frequency, amplitude, phase]
1, 996.30, 0.00012815, +0.00000000
2, 1992.60, 0.33727614, +1.24437281
3, 2988.90, 0.53652510, +1.01131424
4, 3985.20, 0.66491802, +0.84338255
5, 4981.50, 0.74965474, +0.71795889
6, 5977.80, 0.80697209, +0.62203388
7, 6974.10, 0.84685164, +0.54703629
8, 7970.40, 0.87538497, +0.48720514
9, 8966.70, 0.89633554, +0.43858667
10, 9963.00, 0.91209715, +0.39841950
etc.
etc.
94, 93652.20, 0.97983667, +0.03638337
95, 94648.50, 0.97297709, +0.02669932
96, 95644.80, 0.96660876, +0.00817382
[end]

Cheers, E.
 
Last edited: