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!
== Definitions == The square wave in mathematics has many definitions, which are equivalent except at the discontinuities: It can be defined as simply the [[sign function]] of a sinusoid: <math display="block">\begin{align} x(t) &= \sgn\left(\sin \frac{2\pi t}{T}\right) = \sgn(\sin 2\pi ft) \\ v(t) &= \sgn\left(\cos \frac{2\pi t}{T}\right) = \sgn(\cos 2\pi ft), \end{align}</math> which will be 1 when the sinusoid is positive, β1 when the sinusoid is negative, and 0 at the discontinuities. Here, ''T'' is the [[Period (physics)|period]] of the square wave and ''f'' is its frequency, which are related by the equation ''f'' = 1/''T''. A square wave can also be defined with respect to the [[Heaviside step function]] ''u''(''t'') or the [[rectangular function]] Ξ (''t''): <math display="block">\begin{align} x(t) &= 2\left[\sum_{n=-\infty}^\infty \Pi\left(\frac{2(t - nT)}{T} - \frac{1}{2}\right)\right] - 1 \\ &= 2\sum_{n=-\infty}^\infty \left[u \left(\frac{t}{T} - n\right) - u \left(\frac{t}{T} - n - \frac{1}{2} \right) \right] - 1. \end{align}</math> A square wave can also be generated using the [[floor function]] directly: <math display="block">x(t) = 2\left(2\lfloor ft\rfloor - \lfloor 2 ft\rfloor \right) + 1</math> and indirectly: <math display="block">x(t) = \left(-1\right)^{\lfloor 2ft \rfloor}.</math> Using the fourier series (below) one can show that the floor function may be written in trigonometric form<ref>{{cite web |title=Partial sum formula |url=https://www.wolframalpha.com/input?i=%5Csum_%7Bn%3D1%7D%5E%7B%5Cinfty%7D%5Cfrac%7B%5Csin%5Cleft%28%5Cleft%282n-1%5Cright%29x%5Cright%29%7D%7B2n-1%7D |website=www.wolframalpha.com |access-date=9 July 2023 |archive-url=https://web.archive.org/web/20230122100923/https://www.wolframalpha.com/input?i=%5Csum_%7Bn%3D1%7D%5E%7B%5Cinfty%7D%5Cfrac%7B%5Csin%5Cleft%28%5Cleft%282n-1%5Cright%29x%5Cright%29%7D%7B2n-1%7D |archive-date=January 22, 2023 |language=en |url-status=live}}</ref> <math display="block">\frac{2}{\pi}\arctan\left(\tan\left(\frac{\pi ft}{2}\right)\right)+\frac{2}{\pi}\arctan\left(\cot\left(\frac{\pi ft}{2}\right)\right)</math>
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)