ISO 30Hz Square wave reproduction.

Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.
He says himself it's caused by the phase shift. To ensure a flat frequency response the cut off has to be below the required pass band.

Yes, and he goes on to tie magnitude and phase together as completely irrevocably linked.
He was commenting from an analog world ;)

So he ends up saying, downward slope means low end attenuation (and phase shift).
And upward slope means low end boost (and phase shift).

I'll quote his expanded comment below adding emphasis...



If the top and bottom (the 'flat') parts of the squarewave are tilted, it means there is phase shift. However, in almost all cases, phase shift comes free with response variations, and all cases of reduced or boosted bass response are accompanied by phase shift, so the tilt can be seen as an indicator of bass boost or cut. Phase shift without response changes is certainly possible, but is extremely uncommon. If the waveform shows a rising slope (as seen in Figure 8) that always means there is some bass boost. It's theoretically possible for phase shift alone to cause this, but I've never seen it in a working circuit.
 
Last edited:
Nope. To get a good square wave, the bandwidth must extend by a significant factor (5-10)
both above and below the frequency of interest. This is EE101.

Drooping response below 30Hz will cause severe tilt on the flat tops of the square wave.

Analog world...times have changed !!!!

No seriously, flat mag and phase 30Hz and up is ALL that is needed for a 30Hz square wave.
 
Last edited:
The world is analog. All pass filters can be used to change the inherent phase response.

Must disagree re world is analog.

I've looked at all pass filters...I've never seen any implementation that could begin to flatten phase down that low. Best I've seen makes it down to about 500Hz.

But really, proof is in the pudding...if you can't make a 30 Hz square wave without response below 30Hz, doesn't that mean you're not really flat, mag and phase, 30 Hz and up?
Doesn't it work out the same, analog or digital ......?
 
Last edited:
Its a matter of phase... Seems everybodies right, sort of. A 200hz square thru a 50hz filter shifts the fundemental by 20 degrees which messes up the square. So it depends on the filter. A brick wall wont mess it up. Another reason a square is a great test signal. Just saw rayma has already addressed this.
Thanks for that link. Very helpful. Yes, I'm beginning to see the light.

So if you have a 50 Hz filter, the effect - by way of phase perhaps - is dramatic on the visual apparence of a 200 Hz sq wave on the scope. But likely a 20 Hz filter would have very little effect under the crude 1/10 rule of thumb (and DC has no effect as the link shows), as has been my POV. So you can use a 200 Hz sq wave to diagnose a 50 Hz DUT problem, certainly for an analog circuit.

It also seems true that a square wave can be produced on a scope using only sine waves north of the repeating frequency, as mark100 and other have said, provided the amplitudes and phases of the pieces are exactly right.... perhaps up to maybe 10X, as per the rule of thumb again.

My apologies for all the unjustified rudeness I may have uttered to mark100 and others. We were talking from different perspectives.

On the other hand, my observations in post 33 align with Elliott's (and we all agree at least that he's a trustworthy voice) and if the post is read carefully remain correct guidance for eyeballing square waves on scopes for diagnostic purposes, digital devices maybe not*.

B.
* as the ancient textbooks used to say, "it is left as an exercise for the reader..." to decide if a Class D amp is digital or not.
 
Last edited:
To produce a 200 Hz wave-form that looks pretty close to squarish, the horizontal portion needs sine components with a far, far longer periods, or else it droops into something more triangular.
I think this is where you confused yourself? It sounds like you are constructing a square wave from sine waves, in this instance nothing is needed below a 200Hz sine.
 
Its a matter of phase. From Square Waves And DC Content: Deconstructing Complex Waveforms - Page 2 of 3 - ProSoundWeb

Seems everybodies right, sort of. A 200hz square thru a 50hz filter shifts the fundemental by 20 degrees which messes up the square. So it depends on the filter. A brick wall wont mess it up. Another reason a square is a great test signal. Just saw rayma has already addressed this.

Yes, I think we are all converging on the same thing....

Here's the thing in my mind...

In the analog world, to say phase matters is also to say frequency response matters....same thing...they are equivalent statements ....just depends on which one you want to make the causal factor.

In the digital world, we can separate phase and frequency response.

Which lets us see we have to double think the relationships we accepted as truth before.....such as conventional wisdom saying we need response below the fundamental to get good square waves.
And claims such as waves are this because of phase, or this because of mag.
We can dissect those claims now with digital.

After dissecting, I think the need to be flat below fundamental is/was simply due to analog implementation issues, particularly a residual in HPF effect or some other phase/response warp.

Bottom line for square waves afaict for both analog and digital, if mag and phase are flat from fundamental up, they'll be good and square.

As said by a number of us, likely means no HPF is bleeding in.
 
I think the question should be rephrased and specify more accurately what your needs are.


A 30 Hz square wave is actually composed of an infinity amount of sines of 30, 90, 150.... Hz. Although a sines wave converges fairly quickly to a square wave, you'd need a very accurate frequency response and perfect phase response.


And that starting at 30 Hz continuing up to a few KHz. Which seems not very likely to achieve.


But from the other posts in the thread I get the idea you are not necessarily pursuing this perfect square wave reproduction.
 
Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.