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

Digital Line Level DACs, Digital Crossovers, Equalizers, etc.

Filter brewing for the Soekris R2R
Filter brewing for the Soekris R2R
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 8th March 2015, 10:00 AM   #341
spzzzzkt is offline spzzzzkt  Australia
diyAudio Member
 
Join Date: May 2005
Location: Melbourne
Quote:
Originally Posted by zfe View Post
You should be able to see that also with sox, applying there the filters and gain, clipping should be reported.
What I saw with Sox is that the default FIR1 filter caused huge amounts of clipping when upsampling a 0dBFS sine wave test file:

Filter brewing for the Soekris R2R

but that was 3 weeks ago.

Last edited by spzzzzkt; 8th March 2015 at 10:03 AM.
  Reply With Quote
Old 8th March 2015, 10:47 AM   #342
zfe is offline zfe
diyAudio Member
 
Join Date: Dec 2014
The poor little DAC ladder is something that sees only 28 bits of digital data and transforms it to a analog signal. It can do nothing more but it does it next to perfect (especially at that level there is no handling of too big signals).

Infront the ladder we have the FPGA signal processing (with some savety headroom etc) which has to produce, as final output, these 28 bits. So if the signal, after processing, is too high the only and optimal thing that the FPGA can do is to clip it to the maximal 28 bit signal the ladder can handle.

So any clipping you can meassure at the analog output you can already see as signal with too high amplitue in the processed (filters, gain) digital data.

That at least is what I think of being the "trouth".

As far I understand your sox related post, you can simulate the upsampling - filter - gain - upsampling - filter process in sox, and sox complains about clipped data in the result.
So as long you get complains that way with sox, you will have clipping at the DAC (and none if not).
  Reply With Quote
Old 8th March 2015, 09:40 PM   #343
spzzzzkt is offline spzzzzkt  Australia
diyAudio Member
 
Join Date: May 2005
Location: Melbourne
What I found was that Søren's FIR1 alone was enough to clip when using Sox, but Søren said that the DAM had enough headroom in the FPGA processing to avoid clipping.

I believe the optimal thing would be to maintain headroom through the conversion stage. Unless you listen exclusively to sine waves this is actually an issue, rather than something to shrug our shoulders and say "what can we do?".

I've discovered that Benchmark's DAC2 HGC addresses the issue by maintaining a 3.5dB headroom right through the conversion process. As I read it the signal passed to the convertor is attenuated by 3.5dB to prevent clipping occurring during conversion.

This is Benchmark's marketing spiel on the feature...

Quote:
HIGH HEADROOM DSP - WITH 3.5 DB "EXCESS" DIGITAL HEADROOM

All of the digital processing in the DAC2 HGC is designed to handle signals as high as +3.5 dBFS. Most digital systems clip signals that exceed 0 dBFS. The 0 dBFS limitation seems reasonable, as 0 dBFS is the highest sinusoidal signal level that can be represented in a digital system. However, a detailed investigation of the mathematics of PCM digital systems will reveal that inter-sample peaks may reach levels slightly higher than +3 dBFS while individual samples never exceed 0 dBFS. These inter-sample overs are common in commercial releases, and are of no consequence in a PCM system until they reach an interpolation process. But, for a variety of reasons, virtually all audio D/A converters use an interpolation process. The interpolation process is absolutely necessary to achieve 24-bit state-of-the art conversion performance. Unfortunately, inter-sample overs cause clipping in most interpolators. This clipping produces distortion products that are non-harmonic and non-musical . We believe these broadband distortion products often add a harshness or false high-frequency sparkle to digital reproduction. The DAC2 HGC avoids these problems by maintaining at least 3.5 dB of headroom in the entire conversion system. We believe this added headroom is a groundbreaking improvement.
My suspicion is that FIR1 doesn't need the gain altered from theoretical, as Søren has accounted for clipping. Adding headroom by reducing the gain in FIR2 - which is the final step before the R2R ladder if our assumptions are correct - should be sufficient.

Last edited by spzzzzkt; 8th March 2015 at 09:45 PM.
  Reply With Quote
Old 8th March 2015, 10:11 PM   #344
spzzzzkt is offline spzzzzkt  Australia
diyAudio Member
 
Join Date: May 2005
Location: Melbourne
If doubling the amplitude = 6dB gain, the x8 multiplier should give 24dB gain.

So working on the basis that (multiplier/2)*6dB = gain:

multiplier = (24dB - Headroom dB)/3

To obtain 3.5dB headroom:
multiplier = (24-3.5)/3
= 6.833

So in theory using 6.833 as the multiplier for FIR2 should give enough headroom to avoid inter-sample clipping.

Last edited by spzzzzkt; 8th March 2015 at 10:14 PM.
  Reply With Quote
Old 9th March 2015, 04:38 AM   #345
spzzzzkt is offline spzzzzkt  Australia
diyAudio Member
 
Join Date: May 2005
Location: Melbourne
The above seems to work in practise also.

Using FIR1 with multiplier = x8 and FIR2 with multiplier = x6.833 and volume set to V+00 there is no clipping on the square wave inter-sample peaks. Increasing to V+01 results in clipping.

Add: I tested with FIR1 multiplier = 6.833 and FIR2 multiplier = 8 and this seems to have the same effect.
Add2: It also works if you split the attenuation between FIR1 and FIR2.
This seems to confirm that the filters are not clipping, and that adding "headroom" to the signal avoids clipping in the R2R ladder.

Signal Scope behaves far better at 2K btw. Zoomed out 1kHz wave form attached but doesn't add much to the discussion.

Filter brewing for the Soekris R2R-2krect0dbfs-png
Attached Images
File Type: png 2KRect0dBFS.png (38.9 KB, 1163 views)
File Type: png 1KSW_0dBFS.png (50.4 KB, 510 views)

Last edited by spzzzzkt; 9th March 2015 at 05:07 AM.
  Reply With Quote
Old 9th March 2015, 05:12 AM   #346
spzzzzkt is offline spzzzzkt  Australia
diyAudio Member
 
Join Date: May 2005
Location: Melbourne
Got beaten by the edit time out...

I thought I should check that the same clipping//not clipping behaviour occurs using unbuffered outs - it does.
  Reply With Quote
Old 10th March 2015, 01:07 AM   #347
lehmanhill is offline lehmanhill  United States
diyAudio Member
 
lehmanhill's Avatar
 
Join Date: Jan 2008
Location: Chelsea, Michigan
Quote:
Originally Posted by spzzzzkt View Post
Got beaten by the edit time out...

I thought I should check that the same clipping//not clipping behaviour occurs using unbuffered outs - it does.
Thanks again, Paul. This experiment is really educational. I love the fact that your curiousity, combined with your good equipment, drive you to dig out these answers.

Soren has allowed us to play with filters, probably for the first time in DIY, and your experiments show that filter design, jitter of course, and now clipping need to be under control for a good DAC design.
  Reply With Quote
Old 10th March 2015, 02:56 PM   #348
spikestabber is offline spikestabber  Canada
diyAudio Member
 
Join Date: Feb 2015
Which filter are you using to scope? I'd like to throw it on the Rigol to compare results.
  Reply With Quote
Old 10th March 2015, 04:26 PM   #349
spzzzzkt is offline spzzzzkt  Australia
diyAudio Member
 
Join Date: May 2005
Location: Melbourne
Read from post #301 onwards.
  Reply With Quote
Old 11th March 2015, 05:29 AM   #350
spzzzzkt is offline spzzzzkt  Australia
diyAudio Member
 
Join Date: May 2005
Location: Melbourne
Default The sound of totalCRaP™

This is my latest totalCRaP™ filter.

The key features are:
- 8x OS
- Linear Phase
- Steep roll-off and healthy amount of pre/post ringing.

So something to offend everyone - except perhaps TNT and zfe

The bonus feature here is:
- 3.5dB attenuation in FIR2 to provide headroom in the R2R. This will mainly benefit those not using the digital volume.

I've come across a post by Bruno Putzeys advising against use of NOS with the Hypex UcD modules as they have a 400kHz control loop, and the HF hash from NOS can interact leading to distortion in the amp. So NOS is off the menu for me as I was definitely hearing distortion even in the "sorted" NOS filters.

Please enjoy the sound of totalCRaP™...
Attached Images
File Type: png CurrentFilt1.png (36.0 KB, 363 views)
File Type: png CurrentFilt2.png (24.3 KB, 358 views)
Attached Files
File Type: zip 1021filt_35HR_LP.skr.zip (6.4 KB, 68 views)
File Type: txt 1021filt.txt (60.1 KB, 50 views)

Last edited by spzzzzkt; 11th March 2015 at 05:41 AM. Reason: add trademark symbol, remove autocensor obfuscation
  Reply With Quote

Reply


Filter brewing for the Soekris R2RHide 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
Soekris 's DAC implementations Eldam Digital Line Level 1041 10th September 2017 12:00 AM
Sold: Soekris DAM1021 R2R DAC Eldam Swap Meet 6 6th February 2015 08:23 AM
24-bit R2R DAC using miltiple 16/18/20-bit R2R chips Marek Digital Source 21 1st April 2011 10:05 PM
project brewing in my head, challenging, but seem like a good way to try new concepts lemans23 Multi-Way 26 11th October 2005 01:29 PM


New To Site? Need Help?

All times are GMT. The time now is 10:08 AM.


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