Subscribe today!

Square Waves And DC Content: Deconstructing Complex Waveforms

In fact, DC by its very definition cannot cause any frequency dependant waveform shape.

The DC component of a signal is simply the average value of that signal.

Signals that are symmetrical about the time axis will have a DC value of zero.

Signals that are asymmetrical about the time axis mayor may not have a DC value of zero.

If the area between the positive half of the waveform and the time axis is equal to the area between the negative half of the waveform and the time axis, there will be no DC component present.

If these areas are not equal there will be DC in the signal. In other words, the average value of the signal has to be non-zero if there is DC present in the signal.

To test this for our square wave we will apply a high pass filter below the fundamental of the square wave.

Our square wave is at 200 Hz so let’s use a second order (12 dB/octave), 50 Hz high-pass filter. The result is shown in Figure 6.

Figure 6 - Square wave passed though a 50 Hz high-pass filter. (click to enlarge)

Here we see that the end of each half cycle of the square wave is drooping (or tilting) back towards zero. Some may think this is due to DC being eliminated by the high pass filter. This is not the case. The real reason for the tilt is because of the phase shift of the harmonic components that make up the square wave.

Notice that, in the middle of each half cycle, the maximum of the first harmonic (red) is no longer aligned with the maximum/minimum of the other harmonics. This can also be seen, perhaps more clearly, by looking at the zero crossings.

In the previous graphs, whenever the fundamental had a zero crossing all of the other harmonics also had zero crossings. This is not the case in Figure 6 with the high pass filter applied.

If we look at the response of the 50 Hz high-pass filter in the frequency domain (Figure 7), we can see how the phase shift of the harmonic components occur. The phase shift at 200 Hz is approximately 21 degrees relative to the high frequency limit of 0 degrees (no phase shift), which results in the 292 usec (microsecond) time shift of the fundamental.

Figure 7 - Transfer function 2nd order Butterworth, 50 Hz high-pass filter. (click to enlarge)

The phase shift of the next component (3rd harmonic, 600 Hz) is approximately 7 degrees. This results in a 32 usec time shift of this component. All of the higher harmonics are subjected to less
phase shift (are closer in-phase) and thus occur at roughly the same time. So Figure 7 predicts precisely what we see in Figure 6.

To double check our assertion that the phase response of the 50 Hz high-pass filter is the cause of the square wave tilt and not the removal of any DC, let’s pass the square wave through a 50 Hz all-pass filter instead of the high-pass filter.

This will maintain roughly the same phase shift as the high-pass filter but the low frequency content of the signal will not be attenuated. If there is any DC component contributing to the square wave we should see a difference (i.e., the tilt should no longer be present).

A quick look at Figure 8 should confirm that it is virtually identical to Figure 6.

Figure 8 - Square wave passed though a 50 Hz all-pass filter. (click to enlarge)

This should confirm unequivocally that the flat topped structure of a particular waveform is not due to DC. It is instead due to the harmonic content of the signal and the phase relationship of those harmonics to the fundamental.

Topics:
Commenting is not available in this weblog entry.

Product Showcase