Square wave is a kind of nonSine curveThe waveform usually appears with electronic and signal processing.The ideal square wave has only two values: "high" and "low".The signal with rectangular waveform of current or voltage isRectangular waveThe time ratio occupied by high level signal in a waveform cycle is calledDuty cycleIt can also be understood as the ratio of the effective release time of the energy released by the circuit to the total release time.A rectangular wave with a duty cycle of 50% is called a square wave. The square wave has a low level of zero or negative.If necessary, it can be explained that "low level is zero" and "low level is negative".
In the real world, the square wave has only a limited bandwidth. Because the general electronic parts have only two values of high (1) and low (0), the square wave naturally occurs and is widely used in digital switching circuits.Because square waves can quickly change from one value to another (that is, 0 → 1 or 1 → 0), square waves are used asClock signalTo accurately triggerSynchronous circuit。However, if the square wave is represented by the frequency domain, a series of harmonics will appear.This may result inelectromagnetic waveAnd currentpulse wave, affect the surrounding circuit, generateNoiseAnd errors, for some precision instruments such asAnalog digital data converter(analog to digital converter) has obvious impact, so the design will usesine waveAs a clock signal instead of square wave.
A simple two-level Rademacher function is a square wave.
main parameter
Announce
edit
As already mentioned, the ideal square wave varies instantaneously between high and low values.In fact, due to the physical limitations of the waveform generation system, this can never be achieved.The time it takes for a signal to rise from a low value to a high value and then fall is calledPulse rise time(rise time) andPulse attenuation time(fall time)。
If the system appearsOverdamping, then the wave will never reach the theoretical high and low values. If the system appearsUnderdampingThe wave will oscillate near the high and low values before stabilizing.In both cases, the pulse rise and decay times will be measured between two specific intermediate values, such as between 5% and 95%, or between 10% and 90%.The existence of the formula can determine the approximation of the systembandwidth, which determines the rise and decay time of the wave pulse.[1]
Square wave calculation
Announce
edit
Square wave sumSawtooth waveDifferent.The sawtooth wave contains all integer harmonics, and the square wave has only odd harmonics.
We canFourier series To express an ideal square wave, the Fourier series has infinite terms, as follows:
Square wave calculation
The square wave will appear when expressed in Fourier seriesGibbs phenomenon(Gibbs phenomenon)。Ringing artifacts in non ideal square waves have been proved to be related to this phenomenon.Gibbs phenomenon can be usedσ approximation(σ - approximation), while σ approximation usesLanczos σ factorTo make the sequence converge more ideally.
During the conversion between the high (1) and low (0) values of the square wave, the time should be as short as possible, so the conversion of the ideal square wave value is instantaneous.Of course, this will never happen in the real world, because its transformation rate will be infinite, and it will be infinitebandwidth。
Using additive synthesis to increase the number of harmonics to create square waves
In the real world, square waves have only a limited bandwidth, so there will be a serious Gibbs phenomenon and often show an oscillating effect like Gibbs phenomenon, or a ripple effect like σ approximation.
In the real world, the bandwidth of digital electronics is limited, and square waves can only be expressed in a limited bandwidth, which means that we can only take a wave pattern close to this square wave.To obtain this reasonable wave pattern, at least the fundamental harmonic and the third harmonic must be available.Of course, the more harmonics, the more like a square wave.
Duty cycle(duty cycle) is the time proportion of square wave value "1" to a cycle.The duty cycle of the real square wave is 50% - that is, the high value and low value occupy the same time.The average value of the square wave is determined by the duty cycle, so by changing the ON and OFF cycles and then calculating the average, it may represent any value between the two limiting levels.This isPWM(pulse width modulation).[2]
Different representations
Announce
edit
There are many definitions of square waves, which are equivalent except at discontinuous points.
Sine function
x(t)=sgn(sin(t))
When the sine value is positive, the above formula is equal to 1; when the sine value is negative, the above formula is equal to − 1, and 0 is at the discontinuity point.