2
\$\begingroup\$

I understand square wave contains many sine waves of different frequencies as so does triangular wave. My impression with bypass capacitor is that the higher the frequencies the better it attenuates those signals. Therefore, I hope to see a fundamental sine wave output for both square wave and triangular wave input. However, in reality, at high frequencies, output from triangular wave is a perfect sine wave ; but output from square wave is a perfect triangular wave.

At medium frequency, output from square wave looks like exponential charging & discharging curve, that one I can understand. But what I don't understand is its output at high frequency. Why is it so ?

My circuit setup is simple, small amplitude signal fed directly into capacitor to ground. Output is taken from capacitor too.

Here is the circuit setup, very simple:
enter image description here

The above observation can be seen on all capacitor ranges, however, it is easier to see on not so small capacitor like 0.1uF. In short, at high frequency, output from square wave turns into a triangular wave.

\$\endgroup\$
  • 1
    \$\begingroup\$ Post a schematic so we can see what's going on. \$\endgroup\$ – Matt Young Nov 11 '12 at 3:25
  • \$\begingroup\$ What frequency range does the triangular wave appear at? Also, what capacitors are being used? What is their leakage current / ESR? \$\endgroup\$ – Anindo Ghosh Nov 11 '12 at 4:33
  • \$\begingroup\$ In your schematic, is the source a voltage source or a current source? If it's a voltage source, did you define an internal resistance? If it's a perfect voltage source, there's no explanation for what you saw. A square wave in should give a square wave out. \$\endgroup\$ – The Photon Nov 11 '12 at 5:45
  • \$\begingroup\$ It's a function generator with internal impedance. Output is not the same as input in this case. In fact, it is impossible to put both input & output on oscilloscope because of the bypass capacitor routing high harmonics to ground. \$\endgroup\$ – user1502776 Nov 11 '12 at 5:56
3
\$\begingroup\$

The Fourier series for a triangle wave

enter image description here

and the square wave

enter image description here

Both have only odd harmonics but differ in the slope of the peak value for each harmonic. However triangle harmonics are much smaller. As n increases, the amplitude reduces by 1/n², whereas a square wave reduces by 1/n. Triangle waves harmonics also alternate phase (+/-sin) with increasing n.

To simplify my explanation, the capacitive load on a 50Ω gen. gives a frequency response or Transfer Function of;

enter image description here , which you know gives the exponential time response to a medium square wave where f is near 1/RC .

But for high frequency where RCs>>1 so the transfer fcn reduces to an integrator Hc(s)=1/RCs transfer function.

Applying this filter to the Fourier series of the square wave, its 1/n harmonic attenuation becomes 1/n² slope on harmonics of the triangle wave. Similarily the triangle wave source when filtered, its harmonic attenuation slope of 1/n² becomes 1/n³.
On a scope all you would see is a sine wave, but on a spectrum analyzer log scale you would see the 1/n³ slope of all harmonics ( i.e. 3rd order slope )

side comments added I believe there is value in the time you spend in the lab to match theory with practise. When it does not match, look at for a better equivalent circuit then verify your assumptions. If you have Java you can play with this programmable signal generator . Have fun ! Spend more time in the lab validating what you learn and bring the lab to your desktop then expand your horizons.

http://www.falstad.com/fourier/ <

use the mouse pointer and left or right click...drag and adjust

  • Change the phase of the Fourier series and see the effect on a triangle wave
  • Add a spurious resonance in the amplitude of one harmonics, see the waveform
  • add a glitch, change the shape anyway you want. (arbitrary waveform)
  • add a LPF filter, change the frequency, slide the number of terms in the spectrum, see effect

When Integrate a step input and Dump, you get a Sawtooth waveform enter image description here Here the mouse is hovering over the fundamental of the Fourier spectrum and the fundamental sinewave amplitude and phase are shown in yellow. Meanwhile I boosted a harmonic to similate a resonance on the sawtooth.

The combinations are "only limited by your imagination"

\$\endgroup\$
  • \$\begingroup\$ Excellent explanation ! I thought what hoped to see was only the fundamental sine wave for each square & triangular wave. But it turns out their harmonics cannot be diminished and they contribute to the final output shapes even at high frequency. I wonder if I keep increasing the frequency (assuming the scope is sensitive enough for low amplitudes), Could I get rid of all harmonics leaving the fundamental as the only one left (sine wave) ? \$\endgroup\$ – user1502776 Nov 11 '12 at 6:13
  • \$\begingroup\$ If you think that read the above again. An integrator will always be a 1st order filter. no matter high high freq, the slope of the harmonics will not change until other parasitic filters increase the order of the LP filter. \$\endgroup\$ – Sunnyskyguy EE75 Nov 11 '12 at 14:53
  • \$\begingroup\$ No answer is perfect, but thanks for the comment. Although I think the Java App is as close to perfect for fundamental interactive teaching between time and frequency domain, so you can memorize the patterns and recognize them later after you have done all the basics of math transforms to understand why it works in school. \$\endgroup\$ – Sunnyskyguy EE75 Nov 12 '12 at 13:12
1
\$\begingroup\$

Here is a seat-of-the-pants explanation. The beginning part of the exponential curve, before it starts to "level off", looks very much like a straight line. At high frequencies, you don't get very far up that curve before the signal reverses and heads the other way. If you look carefully, you'll see the lines of the triangular wave aren't quite straight, just close to it.

Chances are, the sine wave you get from the triangular wave isn't quite perfect, either, but that's hard to see without a distortion analyzer.

\$\endgroup\$
  • \$\begingroup\$ That's quite an explanation , :) \$\endgroup\$ – user1502776 Nov 11 '12 at 6:38
  • \$\begingroup\$ It is intuitively accurate, and if you get f far enough higher than 1/RC it will be perfectly linear! As we know from the ideal cap is a true integrator from the impedance equation. You know from basic calculus when you integrate a square wave, the area under the square is always a true triangle wave ( so long as f/RC >>1 ) \$\endgroup\$ – Sunnyskyguy EE75 Nov 11 '12 at 15:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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