I want to amplify a 4 MHz triangle or square wave by 2 using an op-amp. Do I need an ~8 MHz op amp, or a much higher rated (and more expensive) device to handle the harmonics?


Short Answer- Yes. Minimum 3x the fundamental frequency for triangle and 5x for square wave. (9x gets you pretty good, low ripple answer for both)

Long Answer. Both of these waveforms are the sum of multiple sine waves. To get a reasonable (and your definition of this may vary) quality square wave, you need at least the first 5 or 6 harmonics (1x,3x,5x,7x,9x, and 11x multiples of the fundamental). If your opamp doesn't pass these frequencies, then you'll get distortion in the output.

The links below will show you how to build up triangle and square waves mathematically if you want to see for yourself how much fidelity you get for a given bandwidth.




  • 2
    \$\begingroup\$ You can try this yourself here: falstad.com/fourier \$\endgroup\$ – AndreKR Feb 13 '11 at 17:52
  • 4
    \$\begingroup\$ also consider the slew rate of the op-amp as that may be the limiting factor in reproduction of square waves with a required edge rise/fall time. \$\endgroup\$ – Mark Feb 13 '11 at 18:51
  • 1
    \$\begingroup\$ "Both of these waveforms are the sum of an infinite number of sine waves". You need to decide how many you need in your output. \$\endgroup\$ – endolith Feb 15 '11 at 15:49
  • \$\begingroup\$ To what extent is the GBWP a result of linear or non-linear factors? To the extent that it's a result of purely-linear factors the Fourier decomposition of the input would be relevant, but if the GBWP describes a worst-case behavioral envelope of an op-amp's non-linear behaviors, the higher-frequency components may not be relevant. \$\endgroup\$ – supercat Oct 28 '16 at 16:04

To perfectly amplify a square wave, you'll need an op-amp with infinite bandwidth.

What is the square wave used for? You probably don't need to keep all of those harmonics.

  • \$\begingroup\$ For a signal generator, the purer the better really. \$\endgroup\$ – Thomas O Feb 13 '11 at 20:51
  • \$\begingroup\$ OK, good luck finding that infinite-bandwidth op-amp then. \$\endgroup\$ – markrages Feb 13 '11 at 21:35

You'll need at least 3x for a square wave.

  • 2
    \$\begingroup\$ perhaps much more depending on the required edge rise/fall times. \$\endgroup\$ – Mark Feb 13 '11 at 17:29
  • \$\begingroup\$ If you don't have at least 3x it will look like a slightly bumpy sine wave. \$\endgroup\$ – starblue Feb 14 '11 at 19:54

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.