I have generated two imperfect square waves by:
- Adding fundamental frequency with 10 odd harmonics.
- Adding fundamental with 20 odd harmonics.
What difference should I observe between two imperfect square waves by increasing the number of harmonics?
I have generated two imperfect square waves by:
What difference should I observe between two imperfect square waves by increasing the number of harmonics?
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?
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.
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