Can't Reproduce a Square Wave.

Status
Not open for further replies.
Compact impulse, yes, but CD doesn't connote minimum-phase nor linear-phase, it's related strictly to amplitude response unless I'm mistaken. I find the discussion related to the analysis of those two to be interesting as well as CD, but the one doesn't discount the other, seems to me that they're separate issues.

I would expect that an LR4 analog crossover-based CD system vs. a linear phase phase crossover (say even that same crossover implemented with the SE UE), both using the same waveguide, would show distinctly different impulse responses, compact notwithstanding.

Dave

Dave , have you played around with the UE yet?
 
We have discussed this before. You have a LP filter (which has a region of constant GD) and an inverted polarity HP. At low frequency the response looks like a decent square wave but the crossover is not linear phase. It is not sufficient to look at a single frequency, well below the x-o point and make such a conclusion. Rather examine a series of frequency which start below the x-o point and spane the crossover frequency as ipresented eariler for a 1k x-o:

<images snipped>

And there is also the non-constant GD introduced by the low frequency cut off of the woofer which is not accounted for in you simulations. Even with a true TP crossover, if the GD associated with the woofer cut off is not corrected low frequency square waves will not approach flat top response.

I haven't read the whole thread (Yeah, I hate when people do this, too.). And I'm not a speaker expert. So I'm sorry if this comment isn't very relevant, overall. But...

I don't see the point in worrying about the "frequency" of the square wave. The square wave's Repetition Rate isn't changing much of anything, until it gets too near the upper end of the system's frequency response.

What matters with square waves, and what can be difficult to accurately reproduce even at very slow repetition rates, is the "speed" of the leading and trailing edges combined with the sharpness of the corners.

And having smaller rise and fall times and sharper corners in a square wave (mentally imagining the Fourier decomposition into the sum of a large number of harmonically-related sinusoids, each with a specific amplitude and a specific phase angle) only implies that it also contains higher frequencies, and that both the amplitude and the phase, at each frequency, would need to be very-accurately reproduced.

So maybe the following could contribute a little bit to a discussion about (or solution for) better speaker reproduction of square waves: (Sorry, I am making this up as I go...)

One way to make square waves behave relatively well, in an amplifier context, is simply to be sure that there is just enough low-pass filtering of the input signal to prevent the slew rates of the leading and trailing edges of square waves from exceeding the maximum slew rate that the amplifier is capable of following. In a few cases that I have simulated, a first-order low-pass -3dB point that was five to ten times the highest audio frequency was sufficient to prevent all overshoot. Of course the corners of the square waves get slightly rounded off. But the faster the amplifier is, the sharper they can be allowed to remain, assuming the rest of the amplifier was designed well-enough in the first place.

In speakers, it seems obvious that if a square wave edge (or any component of any dynamic signal, for that matter) wants the speaker to exceed the maximum speed at which the cone or driver can physically be moved, then there will automatically be gross phase (and amplitude) errors in the driver motion and the acoustic output, for at least all of the frequencies in the signal that have instantaneous rates of change that exceed the maximum dynamic capability of the driver's physical motion. [And that would directly result in the distortion of a square wave, probably in the form of overshoot and ringing (and, I think, any signal committing the same type of violation would be distorted), which should be evident even if you only looked at the waveform of the speaker cone's center's physical displacement, or the waveform of the sound from very close to the speaker cone in a "no reflections yet" case.]

So it SEEMS (to me, so far) that since a speaker driver's dynamic physical motion capabilities can be known in advance, then the input signal's frequency composition should be able to be limited such that the driver is never told to do what it cannot, at least in the case of physical slew rate.

I discussed the simple calculation of the maximum slew rate of a (voltage) sinusoid at any frequency and amplitude (relating it to amplifier testing with square waves) in post #1984 in the thread

http://www.diyaudio.com/forums/soli...terview-error-correction-199.html#post1223767

I came up with the following equation, which would have to be re-formulated and used to relate speaker driver physics/mechanics/impedance/response to input signals:

slew rate max of sine (in volts per microsecond) =

[(2 x Pi) x (freq in Hz) x (amplitude in volts)] / 1,000,000

It seems like you guys who know about speakers' dynamic capabilities and the relations between an input signal and the physical response of a speaker or driver should then be able to calculate a low-pass -3dB frequency, given a particular driver's specs, to inhibit any signal from trying to make a speaker driver go faster than it physically can, which seems like it should help with part of the potential for problems in reproducing square waves. (And I'm guessing that a good place for such a filter would be at the amplifier's input. But hey, you should always have an RF filter somewhere in each input path, anyway, right?)

That was all considering only a kind-of "first order" approach, i.e. for the slew rate itself, only. Intuitively, I just realized, it seems like there "COULD" still be systems where, even with "slew-rate limiting", the rate-of-change of the slew rate, and possibly higher-order derivatives, in the input signal, could still have the potential to cause a speaker driver's physical capabilities to make it fail to faithfully follow a signal. Maybe just "food for thought"...

But is the square wave response of a speaker even important to worry about? Maybe not directly. But, as with amplifiers, if it can do square waves well-enough, then it can also do a lot of other things well-enough. The potential benefit probably comes from the attempt, especially if something can be found which also improves the response for all other signals, which apparently could be the case, here.

Please remember that I am not knowledgable about the study of speaker behavior, and be gentle. I apologize if this was all embarrassingly simple and far beneath the level of your previous discussion.

Cheers,

Tom Gootee
 
Last edited:
@Tom:

When the squarewave response of speakers is critizised one is not usually talking of the restricted slew-rate or overshoot caused by the speaker's frequency response at the upper end of their bandwidth.

The worst degradation is usually done by the crossover's non minimum-phase behaviour.

While a pre-filter would certainly help in terms of ringing it doesn't solve the problems caused by the crossover.

While talking about pre-filters: One could even use old-fashioned phase equalisation to correct the behaviour of the amplifier-speaker chain. Such a solution used with a 40 kHz BW amp would beat the same speaker combined with an amp having several MHz bandwidth. The main problem would be the accurate measurement of the speaker's phase response in order to design such a phase-equaliser.

Regards

Charles
 
@Tom:

When the squarewave response of speakers is critizised one is not usually talking of the restricted slew-rate or overshoot caused by the speaker's frequency response at the upper end of their bandwidth.

The worst degradation is usually done by the crossover's non minimum-phase behaviour.

While a pre-filter would certainly help in terms of ringing it doesn't solve the problems caused by the crossover.

While talking about pre-filters: One could even use old-fashioned phase equalisation to correct the behaviour of the amplifier-speaker chain. Such a solution used with a 40 kHz BW amp would beat the same speaker combined with an amp having several MHz bandwidth. The main problem would be the accurate measurement of the speaker's phase response in order to design such a phase-equaliser.

Regards

Charles

Charles,

Thank you for pointing that out for me. I realized when I posted that I wasn't addressing the phase accuracy in the non-slew-limited case but did not realize that the non-slew-limited case's phase accuracy (of the crossover) was the dominant problem.

Regards,

Tom Gootee
 
I just made an IR of the Hilbert transform.

After a bit of comparing (through headphones) I can't say that the difference is huge. I can't even hear a clear difference, although I haven't listen that hard. (note that the IR is a quick and dirty approach)
I tried a few binaural recordings but could not detect any deterioration of the 3D effect.

No doubt square waves are neat to reproduce and I would try to make a somewhat "time aligned" system. I would not sacrifice other parts to get there though.
Maybe things are different with speakers with other parts depending on it.
 
I just made an IR of the Hilbert transform.

After a bit of comparing (through headphones) I can't say that the difference is huge. I can't even hear a clear difference, although I haven't listen that hard. (note that the IR is a quick and dirty approach)
I tried a few binaural recordings but could not detect any deterioration of the 3D effect.

No doubt square waves are neat to reproduce and I would try to make a somewhat "time aligned" system. I would not sacrifice other parts to get there though.
Maybe things are different with speakers with other parts depending on it.

Okay, I'll bite. I'm old and that was a long time ago and I can't find my EE600 book (Stochastic Systems and Signals, or somesuch). But I do remember studying Hilbert Transforms. Can you give a one-sentence synopsis of them, to refresh my memory?

So, by IR do you mean an Impulse Response type of digital filter? What effect would a Hilbert Transform filter give? i.e. What effect were you trying to achieve (or what COULD they be used to achieve, especially in this thread's context)?

I think that the point in talking about reproducing square waves as well as possible was not that anyone would want to reproduce a square wave. It was that IF a system was capable of reproducing a square wave well, then it would be capable of reproducing everything else well. So it should be thought of as the opposite of possibly being at the expense of something else. i.e. It is a simple-to-define goal that has the potential to reveal how to improve, and even optimize, "everything else".

Cheers,

Tom Gootee
 
Well wikipedia is a good recap.
Hilbert transform - Wikipedia, the free encyclopedia

A little down in this page you can see the Impulse response. I made my own Q&D version using VVVV.
hilbert transform

As you shift the phase -90* (or +90* depending on how you flip it) it no longer resemblance a square wave. My experiment was to see if it fell apart to any significant degree due to this or if it didn't matter too much.

Here is a graph from HOLMImpulse
http://img228.imageshack.us/img228/5149/hilbert.png

I do agree that many things fall in place if you can reproduce a square wave.
But is a 100% correct phase behavior really necessary.

Still I'm only using headphones right now to try it so the effect might be different if it was a real speaker in a real room.
 
...but why???

The article about square waves is in Audioxpress 6/2010.
http://audioamateurinc.com/digital/ax/issue/610/pageflip.html

I read this article (hardcopy) with much interest. What I didn't see mentioned was WHY THIS IS IMPORTANT (accurate reproduction of a square wave).

Can someone please review for me and everyone else reading this thread why it is so important to have phase accurate sound reproduction? I understand that people claim that transient response is best, etc. but I thought that the brain does not differentiate the first few (50) milliseconds of arrival times, and that this has something to do with how the brain processes sound from each ear to determine spatial location of sound sources. If your brain lumps all the "first arrival" signals together for some period of time, then I would assume it would not matter if phase information was smeared over that time period as well.

I found this interesting review of phase distortion on Art Ludwig's web site:
Audibility of Phase Distortion

So, is the ability of a speaker to reproduce a square wave important in terms of what we perceive in the listening environment, or not so much and other factors such as power response or other types of distortion are more important?

-Charlie
 
Well wikipedia is a good recap.
Hilbert transform - Wikipedia, the free encyclopedia

A little down in this page you can see the Impulse response. I made my own Q&D version using VVVV.
hilbert transform

As you shift the phase -90* (or +90* depending on how you flip it) it no longer resemblance a square wave. My experiment was to see if it fell apart to any significant degree due to this or if it didn't matter too much.

Here is a graph from HOLMImpulse
http://img228.imageshack.us/img228/5149/hilbert.png

I do agree that many things fall in place if you can reproduce a square wave.
But is a 100% correct phase behavior really necessary.

Still I'm only using headphones right now to try it so the effect might be different if it was a real speaker in a real room.

I could be wrong. But it looks like you are just shifting the phases of all frequencies by 90 deg. I think that the discussion in this thread was about what happens when different frequencies have different phase shifts, and about how that might make an audible difference in, or distort, the leading edges of fast-rising waveforms.
 
Hi Navin

Nobody wants to listen to square-waves, me neither. But only a speaker that is capable of faithfully reproducing a square-wave is capable of reproducing ANY waveshape.

Charles
why is that so? square wave has an infinite number of harmonics. it does not exist in reality.
why do you need a speaker to reproduce something that does not exist in order? not to mention that you can not hear it

not frequency response is main problem in a speaker. directivity is what makes a speaker very different from reality. a piano is omnidirectional, a saxophone is directional, human voice is directional but different that saxophone...and so on; no speaker can simulate that
 
why is that so? square wave has an infinite number of harmonics. it does not exist in reality.
why do you need a speaker to reproduce something that does not exist in order? not to mention that you can not hear it

not frequency response is main problem in a speaker. directivity is what makes a speaker very different from reality. a piano is omnidirectional, a saxophone is directional, human voice is directional but different that saxophone...and so on; no speaker can simulate that

I think that everyone here understands the theoretical square wave's Fourier decomposition. It should be understood that what is being discussed is a "quasi square wave" that might come from the output of a real (not theoretical) audio power amplifier. So the number of harmonics would be limited by the bandwidths of everything the signal had passed through.

Additionally, the discussion is not necessarily even about quasi square waves. I think it's focused more on how to do the best reproduction of fast attacks of sounds. The (quasi) square wave is part of that discussion because it is often a readily-available test signal with definable, adjustable parameters that can be reproduced accurately by many other experimenters.

Regarding the directionality properties you mentioned, I should probably leave that to some of the sound and speaker experts. But I will note that when I hear a piano, unless I am very, very close to it, its sound mostly comes from a particular direction, when heard from my location.
 
When we say "square wave" please accept this is a perfect square wave which has a fundamental frequency in the audio band of 20Hz-20,000Hz and is bandpass limited to this frequency range. Arguing the mathematical aspects of perfect square waves is a waste of time. Please ladies and gentlemen, use good sense of definitions and not mathematical perfections.
 
I read this article (hardcopy) with much interest. What I didn't see mentioned was WHY THIS IS IMPORTANT (accurate reproduction of a square wave).

Can someone please review for me and everyone else reading this thread why it is so important to have phase accurate sound reproduction? I understand that people claim that transient response is best, etc. but I thought that the brain does not differentiate the first few (50) milliseconds of arrival times, and that this has something to do with how the brain processes sound from each ear to determine spatial location of sound sources. If your brain lumps all the "first arrival" signals together for some period of time, then I would assume it would not matter if phase information was smeared over that time period as well.

I found this interesting review of phase distortion on Art Ludwig's web site:
Audibility of Phase Distortion

So, is the ability of a speaker to reproduce a square wave important in terms of what we perceive in the listening environment, or not so much and other factors such as power response or other types of distortion are more important?

-Charlie

Well, I found the following paragraph, which is the first paragraph of post #60 of the thread at http://www.diyaudio.com/forums/power-supplies/106648-paralleling-film-caps-electrolytic-caps-6.html .

Quoting KBK: "That the human hear only hears the leading edge of the given audio signal and largely ingores the rest (90% ignored). 100% of our hearing is associated with decoding that 10%. So normal methods of measurement involving the whole signal as a 'distortion measurement' or the like, are factually speaking...grossly ignorant and wholly inaccurate. Base all measurments of distortions or otherwise on those leading edges ONLY and you will finally begin to get numbers which agree with what the human ear hears. <snipped the rest>"

If true, then that certainly seems to make this thread quite relevant!

Cheers,

Tom
 
Why test with square waves? I discussed this several pages back but I'll review it here. As stated, a square wave contains the fundamental and odd order harmonics with amplitude of each harmonic decreasing as 1/n, n being the harmonic. All harmonics are in phase. Thus testing with a square wave can readily give an indication of the phase response of a speaker with regard to if the phase is linear or nonlinear. Also, it is not the ability of a speaker to reproduce a square wave at some given frequency but rather at all frequencies, up to a point. Obviously as the frequency rises the bandwidth limitations of the speaker will result in a distorted square wave, not necessarily due to phase shifts, but because the harmonics are missing.

While the leading edge of a signal is important, there is growing evidence suggesting the the effects of non-constant group delay are audible at lower frequencies as well. On the other hand, the argument over the audibility of nonconstand group delay continues. However, it is a real and easily measurable form of linear distortion and energy storage and since if can be eliminated with todays technology, why not eliminate it?
 
Last edited:
Howdy folks, I just want to throw my hat into the ring here. Although you're right that NO transducer can ever reproduce a square wave, (You would need an essentially massless driver to pull that rabbit out the hat), my experence over the years is that I tend to favor speakers which at least make a honest go at trying to achieve phase coherance. Spica, Reference 3A, Vandersteens, electrostatics etc. spring to mind here. I wonder how plasma drivers would do the square wave thing. Any plasma heads out there?
 
@tpsorin

You are basically right that the spacial reproduction of loudspeakers is important. But you mix things up. It is definitely not the task of a speaker to mimic the spacial radiation of a specific instrument. This has to be caught in a two (or more !!!) channel compatible form at the given location and for the given instrument(s) by the recording process.

When someone is talking about the reproduction of square-waves it is not actually this very special waveform that is of main interest. But a speaker that can't reproduce a squarewave is not able to perform with high accuracy in the time-domain.

It is IMO not that important that the squarewave has no tilt and that the slopes are extremely steep. The important thing is that there isn't that typical "ringing" (not a very lucky definition I must admit) that ordinary crossovers offer.

Regards

Charles
 
Status
Not open for further replies.