|
Some of you may remember my earlier 16 harmonic version of this, but for everyone else, here's that description again:
The lower row of switches are odd harmonics, the upper even. The SPDT selects the idealized waveform to display for comparison.
As you can see, the new version features lamps instead of boring old resistors. I feel they liven things up nicely. I decided to go with lamps over LEDs to keep the part count to a minimum while maximizing the number of harmonics. I may do a full colored LED version in the future.
So for the uninitiated, sawtooth waves consist of both odd and even harmonics while square waves consist of only the odd harmonics. In general, any waveform can be described as a (potentially infinite) sum of harmonics. The principal mathematical framework concerning such descriptions is called Fourier theory. Harmonics are simple sinusoids with frequencies that are integer multiples of the fundamental.
In both of these cases the amplitude of each harmonic frequency will be inversely proportional to its frequency, (-6dB/octave) so that even an infinite sum of harmonics will add up to a waveform with finite amplitude.
Each sum takes the form
Saw(t)=sin(t) + (1/2)sin(2t) + (1/3)sin(3t) + (1/4)sin(4t) + ...
Square(t)=sin(t) + (1/3)sin(3t) + (1/5)sin(5t) + (1/7)sin(7t) + ...
Or in sigma notation,
Saw(t)=Σ(1/n)sin(nt)
Square(t)=Σ(1/(2n-1))sin((2n-1)t)
From n=1 to ∞
Although due to the series resistances in the sim, the final peak amplitude is much less than the theoretical values of pi/2 (~1.57) for saw and pi/4 (~0.785) for square.
Because ideal saw and square waves in principal contain infinite numbers of harmonics, they also contain arbitrarily rapid, transitions and are thus not truly possible for any real-time means of signal generation. Also, since the harmonic series is divergent, an infinite number of them would carry infinite energy, even if the actual waveforms are finite. The actual rate of change will always be finite and depend on the system. (eg: slew rate, sampling rate, rise/fall time, speed of sound or light, etc.).
In this simulation for example, we have exactly 24 harmonics; therefore the maximum rate of change can clearly be seen to equal the maximum rate of change of the highest harmonic.
Well I think that's more than long enough. Questions and comments welcome.
-Jason
|