Go Back   Home > Forums > >
Home Forums Rules Articles diyAudio Store Blogs Gallery Wiki Register Donations FAQ Calendar Search Today's Posts Mark Forums Read

Equipment & Tools From test equipment to hand tools

Digital Distortion Compensation for Measurement Setup
Digital Distortion Compensation for Measurement Setup
Please consider donating to help us continue to serve you.

Ads on/off / Custom Title / More PMs / More album space / Advanced printing & mass image saving
Reply
 
Thread Tools Search this Thread
Old 19th October 2018, 08:59 AM   #1
phofman is offline phofman  Czech Republic
diyAudio Member
 
Join Date: Apr 2005
Location: Pilsen
Default Software Distortion Compensation for Measurement Setup

Hi,

I am thinking about options for some sort of digital compensation of harmonic distortion within the measurement loop (DAC -> ADC). E.g. ESS DAC chips offer second and third harmonic distortion compensation.

I have played with virtual balanced measurement setup Virtual balanced in/out from regular soundcard in linux - results which produces very good results, if properly calibrated. The principle is simple - each input channel has a precisely calibrated software gain element in the chain and difference of the left/right samples is provided to audio applications through a virtual sound capture device (very simple to achieve in linux).

I am thinking of the very same principle for some basic digital harmonic distortion compensation. Initial calibration of the measurement loop would measure the loop performance and generate configuration parameters. Parameters would be used in some non-linear gain component in the input chain (very likely a modified linux alsa route plugin reading multiple gain coefficients - I can handle that).

I understand a simple non-linear gain compensates only gain non-linearities of the loop but that would be a good start, IMO.

I found a relevant very interesting paper http://jrossmacdonald.com/jrm/wp-con...nReduction.pdf which deals with calculation of the non-linear compensation gain coefficients.

Please does anyone have any relevant experience/suggestion/theoretical background in this area? IMO this feature is possible to implement, leading to better-precision measurements with a regular prosumer-level equipment.

I very much appreciate any input.

Last edited by phofman; 19th October 2018 at 09:32 AM.
  Reply With Quote
Old 19th October 2018, 03:17 PM   #2
jan.didden is offline jan.didden  Europe
diyAudio Member
 
jan.didden's Avatar
 
Join Date: May 2002
Location: Westende Resort, BE coast
I am skeptical. If you read the McDonald paper, he admits that it is only useful in cases where negative feedback cannot be used or cannot be used easily.
Even then (the example of a speaker), distortion reduction is only limited effective, over a limited range of levels and frequencies.

For an ADC/DAC, distortion levels are often below -120dB and it is hard to imagine that a) it is possible to find an expression of the remaining non-linearity or b) precise modelling of that distortion, which would be required for pre- or post inverse distortion. Even when it is possible, you would need to apply the correction to an accuracy of at least better than -120dB.
I don't think this is physically possible with the current state of the art.

Jan
__________________
Cable: a potential source of trouble interconnecting two other potential sources of trouble - Erik Margan
Linear Audio pubs and articles SilentSwitcher now at diyaudio store SilentSwitcher. Treg high voltage regulator
  Reply With Quote
Old 19th October 2018, 05:42 PM   #3
phofman is offline phofman  Czech Republic
diyAudio Member
 
Join Date: Apr 2005
Location: Pilsen
Thanks a lot for your valuable opinion. Before replying I have to emphasize I do not know the algorithm for calculation of coefficients of the non-linear gain polynom, hopefully not yet :-)

Quote:
Originally Posted by jan.didden View Post
I am skeptical. If you read the McDonald paper, he admits that it is only useful in cases where negative feedback cannot be used or cannot be used easily.
That is the case of reducing measurement loop distortion too, we cannot apply negative feedback here.

Quote:
Even then (the example of a speaker), distortion reduction is only limited effective, over a limited range of levels and frequencies.
I can imagine the calibration would hold only for a specific frequency, used for the actual DUT measurement. After changing frequency the loop could be recalibrated. That would hold only for specific frequency measurements, no wideband/noise input signal of course. But a single or dual frequency are the most common measurement modes.

Quote:
For an ADC/DAC, distortion levels are often below -120dB and it is hard to imagine that a) it is possible to find an expression of the remaining non-linearity
That is the question I am asking :-)

Quote:
or b) precise modelling of that distortion, which would be required for pre- or post inverse distortion.
For now I am aiming at compensating a non-linear gain on a specific frequency with a several orders-long polynom.


Quote:
Even when it is possible, you would need to apply the correction to an accuracy of at least better than -120dB.
I don't think this is physically possible with the current state of the art.
I do not think the actual accuracy of calculation would be an issue, calculating the polynomial expansion with float32 would easily provide precision > -120dB. Just the coefficients need to be determined with sufficient precision. But FFT can calculate the rms value of each harmonic component signal rather precisely plus we can average the values for several seconds of stream.
  Reply With Quote
Old 19th October 2018, 07:10 PM   #4
jan.didden is offline jan.didden  Europe
diyAudio Member
 
jan.didden's Avatar
 
Join Date: May 2002
Location: Westende Resort, BE coast
Quote:
Originally Posted by phofman View Post
I do not think the actual accuracy of calculation would be an issue, calculating the polynomial expansion with float32 would easily provide precision > -120dB. Just the coefficients need to be determined with sufficient precision. But FFT can calculate the rms value of each harmonic component signal rather precisely plus we can average the values for several seconds of stream.
Good point. It's an interesting idea. I know that Klippel has done what your idea is, for speaker drivers.
I will follow your adventure!

Jan
__________________
Cable: a potential source of trouble interconnecting two other potential sources of trouble - Erik Margan
Linear Audio pubs and articles SilentSwitcher now at diyaudio store SilentSwitcher. Treg high voltage regulator
  Reply With Quote
Old 19th October 2018, 08:51 PM   #5
phofman is offline phofman  Czech Republic
diyAudio Member
 
Join Date: Apr 2005
Location: Pilsen
Any way to get to this 60yrs old article any cheaper?

The parameters of nonlinear devices from harmonic measurements - IEEE Journals & Magazine
  Reply With Quote
Old 19th October 2018, 09:06 PM   #6
MarcelvdG is online now MarcelvdG  Netherlands
diyAudio Member
 
Join Date: Mar 2003
Location: Haarlem, the Netherlands
Go to the library of a university of technology, if you have one nearby, and make a copy.

The difficult part will be dealing with dynamic (non-instantaneous) effects, apparently you then need Volterra series (which summarizes all I know about Volterra series). Maybe in the middle of the passband you can still gain something by treating everything as instantaneous.

Last edited by MarcelvdG; 19th October 2018 at 09:13 PM.
  Reply With Quote
Old 19th October 2018, 09:40 PM   #7
phofman is offline phofman  Czech Republic
diyAudio Member
 
Join Date: Apr 2005
Location: Pilsen
For now I am really interested only in the instantaneous compensation - basically fixing the non-linear gain in DA/AD and in the analog filters of the soundcard. Volterra series are way way above my skills :-)

I will ask at the library of our local university but doubt they will have this 60 years old US journal. Or I will bite the bullet and cough up those 33 bucks...
  Reply With Quote
Old 19th October 2018, 10:29 PM   #8
PRR is offline PRR  United States
diyAudio Member
 
PRR's Avatar
 
Join Date: Jun 2003
Location: Maine USA
> library of our local university but doubt they will have this 60 years old US journal.

Of course not BUT they may have access for research purposes. Get a log-on for their PCs, go to the IEEE site at that link, but now when you click "PDF" you don't get "Member or Institutional Sign In", the PDF comes right up. (Be prepared with a thumb-drive to Save and coins to Print.) (Depending on bureaucracy, you might instead have to ask librarian for a special sign-in; or the library may not be able to justify IEEE access if their EE program or their budget is weak.)

Don't coff-up 33 bucks yet. Copying an IEEE paper for a friend is not kosher, but someone might email it to you. (Sadly not me.... my IEEE access through ex-school is fading.)
  Reply With Quote
Old 19th October 2018, 10:40 PM   #9
PRR is offline PRR  United States
diyAudio Member
 
PRR's Avatar
 
Join Date: Jun 2003
Location: Maine USA
> our local university

Západočeská Univerzita v Plzni? Gosh, it is amazing how much that campus looks like the US school I worked for. (I think they all use the same plan-books and the same photographers..)

ZČU is certainly big enough, and has a strong EE program.

And look near the bottom of this page:
Univerzitni knihovna - Databaze
"IEEE Xplore, ACM Digital Library"

I bet if you are ON campus, or maybe IN library, that link will open full access to IEEE archives. (For a while I could access from 500 miles off campus by authenticating to an on-campus proxy, but it broke.)
  Reply With Quote
Old 20th October 2018, 06:56 AM   #10
1audio is offline 1audio  United States
diyAudio Member
 
Join Date: Mar 2004
Location: SF Bay Area
Digital Distortion Compensation for Measurement Setup
Its not a single compensation. You have source nonlinearities and ADC nonlinearities. Further they are not monotonic and change with level as well as frequency. From what I have seen if the distortions are simple (simple curve in the transfer) and in the .1% range it may be possible. At the -100 dB or less the distortions often have broad harmonic content which suggests more abrupt nonlinearities.

On the DACs the distortion cancelling is something of a standard thing (both TI and AKM have mentioned it to me) and its based on an understanding of the internal structure of the chip. I'm not sure if you can extend it much further than they already have.
__________________
Demian Martin
Product Design Services
  Reply With Quote

Reply


Digital Distortion Compensation for Measurement SetupHide this!Advertise here!
Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Baffle compensation for nearfield measurement lup31337 Software Tools 4 6th May 2016 08:33 PM
digital scopes and distortion measurement akis Equipment & Tools 5 12th October 2012 06:26 PM
Measurement setup /graph Sanon Multi-Way 3 26th July 2011 10:58 AM
Polar Measurement setup thadman Multi-Way 7 7th June 2009 06:29 PM
Help choosing measurement and modelling setup SimontY Multi-Way 65 26th April 2007 05:05 PM


New To Site? Need Help?

All times are GMT. The time now is 09:47 PM.


Search Engine Optimisation provided by DragonByte SEO (Pro) - vBulletin Mods & Addons Copyright © 2019 DragonByte Technologies Ltd.
Resources saved on this page: MySQL 15.00%
vBulletin Optimisation provided by vB Optimise (Pro) - vBulletin Mods & Addons Copyright © 2019 DragonByte Technologies Ltd.
Copyright ©1999-2019 diyAudio
Wiki