Author Topic: Ultra-low THD generator, audio+ band.  (Read 6222 times)

0 Members and 1 Guest are viewing this topic.

Offline MasterTTopic starter

  • Frequent Contributor
  • **
  • Posts: 826
  • Country: ca
Ultra-low THD generator, audio+ band.
« on: May 26, 2019, 01:25:32 pm »
For my new project I need 0.0001% THD sine generator 20 : 20000 Hz (better 20 : 100 000 Hz). I already find out, that audio codec available on a market can't perform below 0.001% in the best case scenario, most of them hardly passing 0.005%.
What options do I have? DDS using 20-bits DAC? In that case where to get DAC with INL 1 LSB at 20-bits resolution?
 

Online coppercone2

  • Super Contributor
  • ***
  • Posts: 10670
  • Country: us
  • $
 

Offline MasterTTopic starter

  • Frequent Contributor
  • **
  • Posts: 826
  • Country: ca
Re: Ultra-low THD generator, audio+ band.
« Reply #2 on: May 26, 2019, 03:19:09 pm »
this might give you an idea

http://www.janascard.cz/PDF/An%20ultra%20low%20distortion%20oscillator%20with%20THD%20below%20-140%20dB.pdf
I've seen this circuits earlier, as many others Wein bridge based oscillators. Unfortunately, almost all of them single tone, and introducing frequency adjustment would ruin their outstanding parametrics.
 

Offline mzzj

  • Super Contributor
  • ***
  • Posts: 1276
  • Country: fi
Re: Ultra-low THD generator, audio+ band.
« Reply #3 on: May 26, 2019, 03:53:49 pm »
NEED or "need"?

Audio precision APx555 gets you almost there or does even better than -120db depending on voltage level.
About 30 000 usd, that should give you also idea of involvement if you want to attempt to build your own.
 

Offline MasterTTopic starter

  • Frequent Contributor
  • **
  • Posts: 826
  • Country: ca
Re: Ultra-low THD generator, audio+ band.
« Reply #4 on: May 26, 2019, 06:34:38 pm »
I came up with idea that it could be done using common audio DAC and good quality ADC. Monitoring sine wave output  from the DAC in real time,   I can feed forward antiphase THD data to the digital stream I'm seeding.  Locking the  control loop would eliminate distortion down to about +10 dB above the noise floor of the ADC.  My initial test ( CS4354 & CS5361 ) shows that idea works, with some limitation, control algorithm is slow and charges in frequency or magnitude demands some timing to stabilize the THD level back.
 Next step is to get noise floor down to -130 or so, and audio cs5361 is not the right part. Testing analog device (AD7984) can't get linearity level specified in DS, Thinking, I will straighten up this bitch first running data against ads1232.
Something like in two stages, linearizing ad7984 - slowly with oversampling using 24-bits slow adc but with linearity 20+ bits, than straighten up DAC at the next level.
Overall cost less than $100, including stm32H743 nucleo board, EVAL-ad7984 ADC and any CS or WM audio dac.

 
 

Offline Marco

  • Super Contributor
  • ***
  • Posts: 6966
  • Country: nl
Re: Ultra-low THD generator, audio+ band.
« Reply #5 on: May 26, 2019, 06:48:17 pm »
You can actually do better than that, the ADC doesn't need to be a limiting factor. As I said in the last thread on this topic.

Quote
There is actually a way to remove distortion from DACs to generate near pure tones. You switch a low distortion low pass filter into or out of the chain and loop it back to an ADC. The harmonics caused by the ADC stay the same, the harmonics from the DAC change according to the transfer function of the filter. Thus you can calculate them and correct them in the signal you send to the DAC, iterate that a couple of times for a near pure tone. Of course the resolution of the DAC sets a lower limit, so you should do this with a high resolution DAC, though it can be a pretty shitty one, as long as it's consistently shitty.

See the paper "Low Cost Ultra-Pure Sine Wave Generation with Self Calibration", they used two 16 bit DACs resistively combined for a 140 dB THD sine generator AFAIR.
 
The following users thanked this post: mzzj, electrolust

Offline Audioguru

  • Super Contributor
  • ***
  • Posts: 1507
  • Country: ca
Re: Ultra-low THD generator, audio+ band.
« Reply #6 on: May 26, 2019, 07:03:15 pm »
I made a sinewave with 10 steps using a high frequency digital oscillator feeding a CD4018 IC and 5 resistors then filtered it with an 8th-order switched capacitor Butterworth lowpass filter IC. Look at Digital Sinewave in Google. The distortion is unmeasurable. I used filter ICs that are now obsolete but today Maxim has some. Since the filter IC has digital settings then its cutoff frequency is set with an internal or external high frequency oscillator.
 

Offline Marco

  • Super Contributor
  • ***
  • Posts: 6966
  • Country: nl
Re: Ultra-low THD generator, audio+ band.
« Reply #7 on: May 26, 2019, 08:05:58 pm »
The distortion is unmeasurable.

Unmeasurable with a passive notch filter filtering out the fundamental?
 

Offline Yansi

  • Super Contributor
  • ***
  • Posts: 3893
  • Country: 00
  • STM32, STM8, AVR, 8051
Re: Ultra-low THD generator, audio+ band.
« Reply #8 on: May 26, 2019, 08:13:28 pm »
A stupid question: What is this all good for?
 

Offline David Hess

  • Super Contributor
  • ***
  • Posts: 17167
  • Country: us
  • DavidH
Re: Ultra-low THD generator, audio+ band.
« Reply #9 on: May 26, 2019, 09:21:36 pm »
Another suitable analog design can be found in Linear Technology application note 67.
 

Offline MasterTTopic starter

  • Frequent Contributor
  • **
  • Posts: 826
  • Country: ca
Re: Ultra-low THD generator, audio+ band.
« Reply #10 on: May 26, 2019, 09:33:31 pm »
You can actually do better than that, the ADC doesn't need to be a limiting factor. As I said in the last thread on this topic.
No like that, we are talking about 3-4 decade frequency range. You have to adjust a filter, otherway one side of the range just disappear .
I made a sinewave with 10 steps using a high frequency digital oscillator feeding a CD4018 IC and 5 resistors then filtered it with an 8th-order switched capacitor Butterworth lowpass filter IC. Look at Digital Sinewave in Google. The distortion is unmeasurable. I used filter ICs that are now obsolete but today Maxim has some. Since the filter IC has digital settings then its cutoff frequency is set with an internal or external high frequency oscillator.

I haven't seen any filter with THD below 0.01%. Though this approach helps to generate sine by 8-10 bits ADC.Topic is about 20+ (linearity, not dummy bits they put into crappy WM8731 datasheet).
A stupid question: What is this all good for?
Lately I was exploring high resolution ADC area, and find out that requirements for OPA driver for such ADC is really demanding, capable to withstand all terrible EMI coming back to its output from switching capacitor SAR ADC in the frequency range up to 10 MHz (even with CS5361 sampling at 48 kHz). LInearity for simple buffer +-1 (w/o amplification) has to be more than linearity ADC itself, but for much wider freq. range. There are only a few OPA I know, like ADA4841-1 or THS4521.
This project about testing this drivers.
« Last Edit: May 26, 2019, 09:36:50 pm by MasterT »
 

Offline Marco

  • Super Contributor
  • ***
  • Posts: 6966
  • Country: nl
Re: Ultra-low THD generator, audio+ band.
« Reply #11 on: May 26, 2019, 10:04:26 pm »
No like that, we are talking about 3-4 decade frequency range. You have to adjust a filter, otherway one side of the range just disappear .

Low pass filters and analogue switches are cheap, have one per octave.
 

Offline MasterTTopic starter

  • Frequent Contributor
  • **
  • Posts: 826
  • Country: ca
Re: Ultra-low THD generator, audio+ band.
« Reply #12 on: May 26, 2019, 10:38:58 pm »
Marco, please open at least one DS for any analog switch. Here is the example, first comes in the folder:

Quote
d sin sine-wave distortion f i = 1 kHz; R L = 10 k; see Figure 16
Max Unit
V is = 4.0 V (p-p); V CC = 2.25 V; V EE = 2.25 V - 0.04 - %
V is = 8.0 V (p-p); V CC = 4.5 V; V EE = 4.5 V - 0.02 - %
V is = 4.0 V (p-p); V CC = 2.25 V; V EE = 2.25 V - 0.12 - %
V is = 8.0 V (p-p); V CC = 4.5 V; V EE = 4.5 V - 0.06 - %

There is no alternative to do this project in analog domain, old fashion  a-la 90-th. It was a time when cheating in the DS becomes a norm, manipulation bit's depth, cpu frequencies, etc. There was a financial group intentionally slow-downing digitalization, creating the traps on analog -to-digital interface. Switching capacitors ADC just one of them, posing a threat to any high resolution circuits even in our days.
 
Digital pre-distortion, feed forward or whats ever they vacabulate it's design I  only could think off .   
 

Offline Marco

  • Super Contributor
  • ***
  • Posts: 6966
  • Country: nl
Re: Ultra-low THD generator, audio+ band.
« Reply #13 on: May 26, 2019, 11:38:57 pm »
Marco, please open at least one DS for any analog switch.

Note the load resistance ... a small amount amount of channel modulation matters with 10s of Ohms of load, less so with 10^9.
 

Online coppercone2

  • Super Contributor
  • ***
  • Posts: 10670
  • Country: us
  • $
Re: Ultra-low THD generator, audio+ band.
« Reply #14 on: May 27, 2019, 12:08:46 am »
Marco, please open at least one DS for any analog switch. Here is the example, first comes in the folder:

Quote
d sin sine-wave distortion f i = 1 kHz; R L = 10 k; see Figure 16
Max Unit
V is = 4.0 V (p-p); V CC = 2.25 V; V EE = 2.25 V - 0.04 - %
V is = 8.0 V (p-p); V CC = 4.5 V; V EE = 4.5 V - 0.02 - %
V is = 4.0 V (p-p); V CC = 2.25 V; V EE = 2.25 V - 0.12 - %
V is = 8.0 V (p-p); V CC = 4.5 V; V EE = 4.5 V - 0.06 - %

There is no alternative to do this project in analog domain, old fashion  a-la 90-th. It was a time when cheating in the DS becomes a norm, manipulation bit's depth, cpu frequencies, etc. There was a financial group intentionally slow-downing digitalization, creating the traps on analog -to-digital interface. Switching capacitors ADC just one of them, posing a threat to any high resolution circuits even in our days.
 
Digital pre-distortion, feed forward or whats ever they vacabulate it's design I  only could think off .

that sounds a bit paranoid...
 

Offline MasterTTopic starter

  • Frequent Contributor
  • **
  • Posts: 826
  • Country: ca
Re: Ultra-low THD generator, audio+ band.
« Reply #15 on: May 27, 2019, 12:25:32 am »
What kind of flexibility do you need? If you only need a few frequencies, a consumer audio DAC plus banks of selective LPF or BPF could be a good idea.

This is a typical trick used in many audio testing setups to allow measuring THD below the capability of the hardware.
Objective is to make a tool, THD meter in this context to get kind of the chart below.
I start to play with audio DAC since it's relatively cheap, but my intention is a measurements with high precision in general, not audio related. For evaluation purposes of the OPA, capacitors, different topology of the schematics.
For example, I start to dig into internal stm32h743 16-bits ADC, got high noise+ THD level but I'm not completely sure that buffer OPA to drive ADC is behaving as I expect. Nothing is linear at 3.6 MSPS, having cranking  20-47 pF caps at the output, so I need a tool that would confirm THD level loaded-interfaced  OPA is the same as non-loaded in real-time over different sampling rates, frequencies etc. THD distortion that I observed is not related to a  wrong part number (OPA), not capable to drive specific ADC. That ADC itself generates a distortion.


« Last Edit: May 27, 2019, 12:29:33 am by MasterT »
 

Offline MasterTTopic starter

  • Frequent Contributor
  • **
  • Posts: 826
  • Country: ca
Re: Ultra-low THD generator, audio+ band.
« Reply #16 on: May 27, 2019, 01:56:03 am »
It's an another example (Figure 34. Distortion Test Circuit, from opa1612 DS), how DO NOT to measure THD.  OPA with 10 OHm at the input has different characteristics compare to the one with 10k. OPA with MUX, switching not very fast, a few kHz is not the same one that driven by pure sine wave from the ideal source. 
It's all about interfacing. There may be two parts, that have very good performance in the lab test environment,  but all beauty disappear  at the moment as you try to connect one to another.  So, I 'd like to film this moment on the LCD screen of the THD meter, when one line somewhere at -100dB jumps up to -60 because some poorly educated tech from Digilent has no idea about X5 and COG caps. They put cheap ceramics to their board
https://reference.digilentinc.com/reference/pmod/pmodi2s2/reference-manual deeply disappointing me with -40dBc THD-2.
 
 

Offline floobydust

  • Super Contributor
  • ***
  • Posts: 7473
  • Country: ca
Re: Ultra-low THD generator, audio+ band.
« Reply #17 on: May 27, 2019, 02:09:58 am »
Rather than re-invent the wheel, look at Bob Cordell's High Performance THD analyzer from Audio 1981. It's all analog with lots of parts and uses spot frequencies.
"... measurement floor below 0.001 percent out to 20 kHz."

It has also been updated and discussed a lot on the DIY Audio forums.

Then he has the "Distortion Magnifier" that can use a PC sound card and is as good as that and the op-amps used, I think -140dB is the noise floor. You may find the project details on the Internet.
 

Offline texaspyro

  • Super Contributor
  • ***
  • Posts: 1407
Re: Ultra-low THD generator, audio+ band.
« Reply #18 on: May 27, 2019, 04:33:49 am »
A rather nice analog low distortion oscillator:

http://w140.com/tekwiki/wiki/SG505

Companion audio analyzer:

http://w140.com/tekwiki/wiki/AA501
 

Offline amirm

  • Regular Contributor
  • *
  • Posts: 122
  • Country: us
    • Audio Science Review
Re: Ultra-low THD generator, audio+ band.
« Reply #19 on: May 27, 2019, 06:12:30 am »
For my new project I need 0.0001% THD sine generator 20 : 20000 Hz (better 20 : 100 000 Hz). I already find out, that audio codec available on a market can't perform below 0.001% in the best case scenario, most of them hardly passing 0.005%.
What options do I have? DDS using 20-bits DAC? In that case where to get DAC with INL 1 LSB at 20-bits resolution?
I have measured a number of DACs that come pretty close to your spec.  See: https://www.audiosciencereview.com/forum/index.php?threads/master-sinad-distortion-comparison-graph-for-dacs.4814/

SINAD of 115 dB translates to 0.00018% so pretty close to your requirements. 

If you can tolerate 0.0003%, the Khadas Tone Board will do the job at less than $99.  Has USB input so very easy to drive.  You can see my review here: https://www.audiosciencereview.com/forum/index.php?threads/review-and-measurements-of-wesiontek-khadas-tone-board-dac.4823/

Amazon, Digikey, etc. carry it.

My Audio Precision analyzer goes beyond your specs but will cost you $28,000.  :)
 

Offline amirm

  • Regular Contributor
  • *
  • Posts: 122
  • Country: us
    • Audio Science Review
Re: Ultra-low THD generator, audio+ band.
« Reply #20 on: May 27, 2019, 06:15:18 am »
And oh, the DACs above will support higher sample rates so you can cover 100 kHz bandwidth as well (although noise figure increases some).
 

Online moffy

  • Super Contributor
  • ***
  • Posts: 2106
  • Country: au
Re: Ultra-low THD generator, audio+ band.
« Reply #21 on: June 23, 2019, 06:22:04 am »
Ran across the topping series of audio DACs; D10, D30 and D50. Fully spec'd assembled. Here is a test of the D50 and has better than 0.001% distortion:
https://www.audiosciencereview.com/forum/index.php?threads/review-and-measurements-of-topping-d50-dac.2403/
Thinking of getting one.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf