0
\$\begingroup\$

I have generated two imperfect square waves by:

  1. Adding fundamental frequency with 10 odd harmonics.
  2. Adding fundamental with 20 odd harmonics.

What difference should I observe between two imperfect square waves by increasing the number of harmonics?

\$\endgroup\$
13
  • \$\begingroup\$ A signal getting closer and closer to a perfect square wave. It might be easier to spot the differences when you start with a lower number of odd harmonics. \$\endgroup\$
    – Arsenal
    Commented Mar 30, 2021 at 11:36
  • 5
    \$\begingroup\$ If you have really generated them, you should already be observing the difference with the help of an oscilloscope, as this is something interesting which you should see and understand. BTW Is this a homework question? \$\endgroup\$
    – Mitu Raj
    Commented Mar 30, 2021 at 11:39
  • 1
    \$\begingroup\$ I have generated them on MATLAB. \$\endgroup\$
    – Autodidact
    Commented Mar 30, 2021 at 11:39
  • 3
    \$\begingroup\$ So what difference did you observe in MATLAB when you plotted them? \$\endgroup\$
    – Mitu Raj
    Commented Mar 30, 2021 at 11:44
  • 1
    \$\begingroup\$ I observed that my signal is going toward a perfect square wave. so my question here is that can I say that my analogue signal is now moving toward a digital? ( because it looks like a Binary) \$\endgroup\$
    – Autodidact
    Commented Mar 30, 2021 at 11:45

2 Answers 2

2
\$\begingroup\$

A practical answer

The -3dB BW is defined by the 10% to 90% rise time $$f_{-3dB}=0.35/Tr$$ which is an approximation for a 1st order filter response. Yet a square wave BW limited is not a 1st order signal, so this is just a -3dB approximation of BW not a -20 dB BW which would include your 1st 10 odd harmonics while all the even f’s are zero or - infinity dB.

All spectral components are odd and cos(-90 deg) and successively smaller with higher order such that the 11th harmonic is down ~ 20 dB from the fundamental. So your -20dB BW is 11 x fo and fo is not 0dB but rather ~2dB.

Since the risetime is created only by the -3dB BW, each odd harmonic has only a smaller impact on the risetime until the Tr reaches 0, but rather more visibly contribute to the <10% and >90% with ringing and over/undershoot like any underdamped filter greater than a 1st order filter.

The ringing in the square wave will be at the last odd harmonic included. Each subsequent odd harmonic will reduce the overshoot and ringing at that harmonic until infinity when the overshoot and risetime is zero.

Each subsequent harmonic contributes less overshoot at that frequency and even though the 41st harmonic (1+20f * 2) is only 10 dB lower than the 21st harmonic, with 20 odd harmonics added the overshoot is still about 10% of the 0 to peak amplitude in the time domain. 10% time domain overshoot is almost 1dB of overshoot.

Integrating a square wave into a triangle wave results in all spectral components now at cos(0 deg) and down 6 dB per octave or -12 dB per odd harmonic.

So what’s the difference between 10 odd harmonics and 20 odd harmonics?

  • about 1dB of residual overshoot after 20 harmonics (41st) and about -30 dB of the 41st harmonic.

An interesting feature of a square wave is you can compute and measure the asymmetry easily on a spectrum analyzer for very small errors much easier than using an old CRT as the even harmonic 2f rises with a predictable nonlinear curve in dB with asymmetry. I found this very useful for designing a perfect RF limiter on an RF sinewave. << 0.1% square wave = ?? -dB on 2f (quiz) then 1% asymmetry = (?)

To understand intuitively more about Fourier Transforms or rather spectral density waveforms, try Falstad’s Fourier site http://www.falstad.com/fourier/ And choose log display with phase then experiment with different periodic signals and then modify time domain or f domain response with a iOS pen or Windows mouse. If you want to design a filter with constant group delay or steep skirts or zero overshoot in the time domain go to his filter site, http://www.falstad.com/afilter or his time domain site and copy paste your filter to analyze it.

The more you seek, the more you will find, the smarter you become.

Feel free to edit oops by adding or subtracting to this answer.

\$\endgroup\$
2
  • \$\begingroup\$ I’m going back to ripping up the upstairs carpeting and refinishing the covered oak floors. \$\endgroup\$
    – D.A.S.
    Commented Mar 30, 2021 at 14:51
  • \$\begingroup\$ Thank you for your Answer, much appreciated. \$\endgroup\$
    – Autodidact
    Commented Mar 31, 2021 at 5:02
1
\$\begingroup\$

What difference should I observe between two imperfect square waves by increasing the number of harmonics?

Fourier series convergence for a periodic signal with discontinuities (similar to square wave etc) and how shape of waveform vary on varying number of harmonics is classic experiment done by Albert Michelson and after that Josiah Gibbs gave an explanation about its convergence which is now widely known as Gibbs phenomenon

Certain observations of Gibbs phenomenon are as follows -

1.you'll not get a perfect replica of a discontinuous signal (e.g square wave) no matter how many hormonics you add (even infinite harmonics addition )

2.For a discontinuity of unity height , the partial sum exhibits a maximum value of 1.09(overshoot of 9%) after a finite addition of harmonics ,and then converge around this overshoot.

3.at the point of discontinuity,and if $$N (number of harmonics) \to \infty$$then value of this series at that point will be average of discontinuity .

4.And as you keep increasing the number of harmonics , the rippel (overshoot ) in the partial sums compressed towards the point of discontinuity for any finite value of harmonic sums and this effect is visible in your analysis

You can read more about it from well known book "Signal and System" by Oppenheim

\$\endgroup\$
1
  • \$\begingroup\$ Thanks for your answer. \$\endgroup\$
    – Autodidact
    Commented Mar 31, 2021 at 5:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.