Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Square wave (waveform)
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== Fourier analysis {{anchor|Fourier_Analysis}} == [[File:SquareWaveFourierArrows.gif|class=skin-invert-image|thumb|upright=1.35|The six arrows represent the first six terms of the Fourier series of a square wave. The two circles at the bottom represent the exact square wave (blue) and its Fourier-series approximation (purple).]] [[File:Spectrum square oscillation.jpg|class=skin-invert-image|thumb|upright=1.6|right|(Odd) harmonics of a 1000 Hz square wave]] [[File:Fourier Series-Square wave 3 H.png|class=skin-invert-image|thumb|Graph showing the first 3 terms of the Fourier series of a square wave]] Using [[Fourier series|Fourier expansion]] with cycle frequency {{math|''f''}} over time {{math|''t''}}, an ideal square wave with an amplitude of 1 can be represented as an infinite sum of sinusoidal waves: <math display="block">\begin{align} x(t) &= \frac{4}{\pi} \sum_{k=1}^\infty \frac{\sin\left(2\pi(2k - 1)ft\right)}{2k - 1} \\ &= \frac{4}{\pi} \left(\sin(\omega t) + \frac{1}{3} \sin(3 \omega t) + \frac{1}{5} \sin(5 \omega t) + \ldots\right), &\text{where }\omega=2\pi f. \end{align}</math> {{Listen|filename=Additive_220Hz_Square_Wave.wav|title=Additive square demo|description=220 Hz square wave created by harmonics added every second over sine wave}} The ideal square wave contains only components of odd-integer [[harmonic]] frequencies (of the form {{math|2Ο(2''k'' β 1)''f''}}). A curiosity of the convergence of the [[Fourier series]] representation of the square wave is the [[Gibbs phenomenon]]. [[Ringing artifacts]] in non-ideal square waves can be shown to be related to this phenomenon. The Gibbs phenomenon can be prevented by the use of [[sigma approximation|Ο-approximation]], which uses the [[Lanczos sigma factor]]s to help the sequence converge more smoothly. An ideal mathematical square wave changes between the high and the low state instantaneously, and without under- or over-shooting. This is impossible to achieve in physical systems, as it would require infinite [[Bandwidth (signal processing)|bandwidth]]. [[File:Fourier_series_for_square_wave.gif|class=skin-invert-image|thumb|upright=1.6|right|Animation of the additive synthesis of a square wave with an increasing number of harmonics]] Square waves in physical systems have only finite bandwidth and often exhibit [[Ringing (signal)|ringing]] effects similar to those of the Gibbs phenomenon or ripple effects similar to those of the Ο-approximation. For a reasonable approximation to the square-wave shape, at least the fundamental and third harmonic need to be present, with the fifth harmonic being desirable. These bandwidth requirements are important in digital electronics, where finite-bandwidth analog approximations to square-wave-like waveforms are used. (The ringing transients are an important electronic consideration here, as they may go beyond the electrical rating limits of a circuit or cause a badly positioned threshold to be crossed multiple times.)
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)