Square Waves
📐 Definition
Section titled “📐 Definition”A square wave alternates between two plateaus each half-period. A canonical -periodic choice is
Domain and Codomain
Section titled “Domain and Codomain”Defined for periodic time or spatial axes. For the sign-based definition, outputs take values in (or include at discontinuities depending on the sign convention).
⚙️ Key Properties
Section titled “⚙️ Key Properties”Fourier Series (50% Duty Cycle)
Section titled “Fourier Series (50% Duty Cycle)”Odd harmonics dominate with amplitudes decaying as .
Zero Mean (Symmetric Case)
Section titled “Zero Mean (Symmetric Case)”🎯 Special Cases and Limits
Section titled “🎯 Special Cases and Limits”- Duty cycle generalizes to a rectangular pulse train of width .
- Smooth approximation:
🔗 Related Functions
Section titled “🔗 Related Functions”Fourier series connect square waves to sums of sinusoids. Thresholding and smooth saturation functions provide hard and soft versions of the plateau transitions.
Usage in Oakfield
Section titled “Usage in Oakfield”Oakfield does not currently ship a dedicated “square wave” stimulus operator.
Closest equivalents in the current runtime:
- Checkerboard stimulus provides a piecewise-constant periodic pattern over space (useful for Gibbs/aliasing stress tests).
- User-defined Lua operators can implement time-domain on/off pulses (square waves in time) if needed.
- Soft thresholding/saturation can approximate hard switching when differentiability is important.
Historical Foundations
Section titled “Historical Foundations”📜 Harmonics and Fourier Series
Section titled “📜 Harmonics and Fourier Series”Square waves are a canonical example in Fourier analysis: a simple discontinuous waveform with an explicitly computable harmonic series and a visible Gibbs phenomenon.
🌍 Modern Perspective
Section titled “🌍 Modern Perspective”They are widely used as test signals and as idealized switching inputs, often paired with smoothing when differentiability is required.
📚 References
Section titled “📚 References”- Stein & Shakarchi, Fourier Analysis
- Bracewell, The Fourier Transform and Its Applications