CD square wave pre-ringing a filter problem? - diyAudio
Go Back   Home > Forums > Source & Line > Digital Source

Digital Source Digital Players and Recorders: CD , SACD , Tape, Memory Card, etc.

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 2002, 12:23 PM   #1
diyAudio Member
 
Circlotron's Avatar
 
Join Date: Jun 2002
Location: Melbourne, Australia
Question CD square wave pre-ringing a filter problem?

Today I made a test cd with among other things, a 1kHz square wave. Looking at on a scope showed the ringing that is often described when a CD player tries to reproduce a square wave. This is often blamed on the sharp rollof (and therefore high Q) of the low pas filter that lets below 20kHz pass, but more or less stops the 44.1 kHz getting through. Of course oversampled dac's have a higher sampling frequency and so need a less sharp filter but that's a different story.

Anyway, I got to thinking about all this, and while any ringing after the vertical transition is understandable, what I also saw is some ringing building in amplitude just before the transition as well. Now I generated the square wave using Cool Edit 96 and I suppose it constructs the waveform by adding odd harmonics and this is what you see in the pre-ringing and post-ringing, but to blame any pre-ringing on the sharp cutoff low pass filter after the dac is ridiculous because the filter cannot know that a transition is coming and start to get all wobbly! I have seen again and again people whingeing and whining about rotten square waves coming out of cd players, and as "evidence" they show a pic of one of these pre and post ringing square waves.

Post ringing from crook filters I can believe, but pre-ringing ? No way!

GP.

P.S. This pre-ringing could also be seen right at the dac output too, BEFORE the filter. Also, here's an ascii output of the Cool edit file. As you can see, there is no pre-ringing in it.

Left and right channels, 1 kHz, -3dB level, 44.1kHz sample rate.
23198 23197
23197 23197
23197 23197
23198 23198
23198 23198
23197 23197
23197 23197
23197 23198
23197 23197
23197 23197
23197 23197
23198 23198
23197 23197
23197 23197
23197 23197
23197 23197
23197 23197
23198 23197
23197 23197
23198 23197
-23198 -23197
-23197 -23198
-23197 -23197
-23197 -23197
-23197 -23197
-23198 -23197
-23198 -23197
-23198 -23197
-23198 -23198
-23198 -23197
-23197 -23198
-23197 -23197
-23197 -23197
-23197 -23197
-23198 -23197
-23197 -23197
-23197 -23197
-23197 -23197
-23197 -23198
-23197 -23197
-23198 -23198
-23198 -23196
23197 23198
23198 23197
23197 23197
23197 23197
23198 23197
23197 23198
23197 23197
23197 23197
23198 23197
23198 23197
23198 23197
23197 23197
23197 23197
23197 23197
23198 23198
23197 23197
23197 23198
23197 23197
23198 23198
23196 23196
23198 23197
23197 23197
-23197 -23197
-23197 -23198
-23198 -23196
-23197 -23196
-23197 -23198
-23197 -23197
-23197 -23197
-23197 -23197
-23197 -23198
-23198 -23198
-23198 -23197
-23197 -23197
-23198 -23197
-23197 -23197
-23197 -23197
-23197 -23197
-23197 -23198
-23198 -23197
-23197 -23198
-23197 -23197
-23198 -23197
-23197 -23197
23198 23197
23197 23197
23197 23197
23197 23197
23198 23197
23198 23197
23198 23198
23197 23198
23197 23197
23197 23198
23198 23197
23197 23197
23197 23197
23198 23197
23198 23197
23197 23197
23197 23198
23197 23198
23198 23197
23197 23197
23197 23197
23197 23197
-23197 -23197


  Reply With Quote
Old 19th October 2002, 01:06 PM   #2
Banned
 
Join Date: Dec 2001
Location: Zamboanga, City of Flowers, Mindanao
Send a message via Yahoo to Elso Kwak
Lightbulb Ringing on Squarewave

Hi circlotron,
The (pre)ringing is due to the digital filter. See f.a.
http://www.sakurasystems.com/articles/Kusunoki.html
If you have a NON-OS DAC you get a perfect square wave without any ringing. If you have a analog low pass filter with sharp rolloff you get ringing too but no preringing. See the Filter-Pro program on www.ti.com for illustrations of ringing squarewaves with various lowpass filter topologies.
What is the meaning of that large row of numbers?
  Reply With Quote
Old 19th October 2002, 01:21 PM   #3
diyAudio Member
 
Circlotron's Avatar
 
Join Date: Jun 2002
Location: Melbourne, Australia
"Also, here's an ascii output of the Cool edit file."

The numbers are the sampling levels in the range of +32767 to -32767. Thanks for the references Elso. It's nearly midnight here. I'll have a look tomorrow.

GP.
  Reply With Quote
Old 19th October 2002, 02:43 PM   #4
Banned
 
Join Date: Dec 2001
Location: Zamboanga, City of Flowers, Mindanao
Send a message via Yahoo to Elso Kwak
Lightbulb Filter-Pro

Hi Circlotron,
Filter-Pro can be downloaded here:
http://focus.ti.com/docs/prod/produc...ction=rel_soft
(Was difficult to find)
  Reply With Quote
Old 19th October 2002, 03:34 PM   #5
Banned
 
Join Date: Dec 2001
Location: Zamboanga, City of Flowers, Mindanao
Send a message via Yahoo to Elso Kwak
Arrow Pictures of Square waves

Hi circlotron,
I meant this:
http://www-s.ti.com/sc/psheets/sbfa001a/sbfa001a.pdf)
  Reply With Quote
Old 19th October 2002, 05:51 PM   #6
Pedja is offline Pedja  Serbia
diyAudio Member
 
Join Date: Jun 2002
Location: Belgrade
Hi,

There are two filter design programs on BB site. FilterPro Filter Design Programs for the UAF42 and other Op Amps (DOS program) and Filter Pro MFB and Sallen-Key Design Program (only for LPF’s but works under Windows).

Both programs as well as the referenced articles can be downloaded from
http://focus.ti.com/docs/analog/cata...28FilterPro%29

Pedja
  Reply With Quote
Old 19th October 2002, 08:16 PM   #7
Dave is offline Dave  New Zealand
diyAudio Member
 
Join Date: Oct 2001
Location: New Zealand
Through Fourier analysis you'll find that this is perfectly normal for a system that is band limited to 20K. To get perfectly flat tops and you need infinite bandwidth.
  Reply With Quote
Old 19th October 2002, 08:34 PM   #8
diyAudio Member
 
Join Date: Jul 2001
Location: Orleans, France
"the filter cannot know that a transition is coming "

Circlotron,

An analog filter cannot know, but a digital filter knows... all digital filters with abrupt cutoff exhibit pre-ringing.

That's life

Regards, Pierre Lacombe.
  Reply With Quote
Old 20th October 2002, 04:04 AM   #9
alvaius is offline alvaius  Canada
diyAudio Member
 
Join Date: Feb 2002
Location: Toronto
I think that we need to give Dave's comment more thought, because it is absolutely right, whether you are in the digital domain or analog domain. The issue is more "pronounced" in the digital domain, because you can build close to a perfect filter.

A square wave, in the frequency domain, is a bunch of sine waves, of amplitude sin(x)/x added together. When you add all these sine waves together, you get a square wave. If you take away the higher frequency sine waves completely, you end up with something that looks like a square wave with ringing. What looks like pre-ringing is simply the inability to have flat tops and bottoms because the high frequency sine waves are not there.

The same issue also occurs in the analog domain. The initial brickwall filters in the early days of CD players generated some nasty looking square waves as well. Not only taking away the high frequency sine waves causes post and pre-ringing, but screwing up the phase alignment of those sine waves does as well. Non-linear phase analog filters create nasty square waves. One of the great advantages of massive oversampling is the ability to use first order filters linear in phase. However, you can use higher order analog linear phase filters (bessel) and still get nice square waves. These were not used for the brick wall filters as the slope was too shallow.

There is no reason the digital filter has to exhibit pre/post ringing and there is no reason the combination of the digital and analog filter has to create pre and post ringing. Bad implementation will though.

Alvaius
  Reply With Quote
Old 20th October 2002, 11:55 AM   #10
diyAudio Member
 
Circlotron's Avatar
 
Join Date: Jun 2002
Location: Melbourne, Australia
Here's where it starts to get interesting! This pic is of the

output of a very ordinary 11 year old Teac CD player when

playing my test CD I made, this track is of a 1kHz square wave

at -3dB. The ringing and overshoot is as expected.
Attached Images
File Type: jpg square wave overshoot.jpg (35.8 KB, 1128 views)
  Reply With Quote

Reply


Hide 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
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Sine wave - Square & Triangle wave generator using Transistors / OP-Amps lineup Solid State 20 9th October 2006 12:15 AM
Taming Ringing...Square-Wave Response EchoWars Solid State 29 22nd April 2004 01:22 AM
Microphone turns triangle wave into square wave? Circlotron Analogue Source 18 25th January 2003 06:44 AM


New To Site? Need Help?

All times are GMT. The time now is 09:05 AM.


vBulletin Optimisation provided by vB Optimise (Pro) - vBulletin Mods & Addons Copyright © 2014 DragonByte Technologies Ltd.
Copyright ©1999-2014 diyAudio

Content Relevant URLs by vBSEO 3.3.2