X(j2πf)=F{x(t)}≜∫−∞+∞x(t) e−j2πft dt
x(t)=F−1{X(j2πf)}=∫−∞+∞X(j2πf) ej2πft df
rect(u)≜{01if |u|>12if |u|<12
sinc(v)≜{1sin(πv)πvif v=0if v≠0
定义采样频率,fs≜1TT
F{rect(tT)}=T sinc(fT)=1fs sinc(ffs)
狄拉克梳子(又称“采样功能”,又称“ Sha函数”):
IIIT(t)≜∑n=−∞+∞δ(t−nT)
T
IIIT(t)=∑k=−∞+∞1Tej2πkfst
采样的连续时间信号:
xs(t)=x(t)⋅(T⋅IIIT(t))=x(t)⋅(T⋅∑n=−∞+∞δ(t−nT))=T ∑n=−∞+∞x(t) δ(t−nT)=T ∑n=−∞+∞x(nT) δ(t−nT)=T ∑n=−∞+∞x[n] δ(t−nT)
x[n]≜x(nT)
xs(t)x[n]Tx(t)x[n]xnxs(t)=0nT<t<(n+1)Tx[n]n
x[n]ZTx[n]Tx[n]T
xs(t)
Xs(j2πf)≜F{xs(t)}=F{x(t)⋅(T⋅IIIT(t))}=F{x(t)⋅(T⋅∑k=−∞+∞1Tej2πkfst)}=F{∑k=−∞+∞x(t) ej2πkfst}=∑k=−∞+∞F{x(t) ej2πkfst}=∑k=−∞+∞X(j2π(f−kfs))
T⋅IIIT(t)xs(t)T
- Txs(t)x(t)
- TT
- T此处会导致零阶保持(ZOH)的净传递函数和净频率响应出现类似的缩放误差。 我见过的所有有关数字(和混合)控制系统的教科书都犯了这个错误,这是一个严重的教学错误。
x[n]xs(t)
XDTFT(ω)≜Z{x[n]}∣∣∣z=ejω=XZ(ejω)=∑n=−∞+∞x[n] e−jωn
可以证明
XDTFT(ω)=XZ(ejω)=1TXs(j2πf)∣∣∣f=ω2πT
The above math is true whether x(t) is "properly sampled" or not. x(t) is "properly sampled" if x(t) can be fully recovered from the samples x[n] and knowledge of the sampling rate or sampling period. The Sampling Theorem tells us what is necessary to recover or reconstruct x(t) from x[n] and T.
If x(t) is bandlimited to some bandlimit B, that means
X(j2πf)=0for all|f|>B
Consider the spectrum of the sampled signal made up of shifted images of the original:
Xs(j2πf)=∑k=−∞+∞X(j2π(f−kfs))
The original spectrum X(j2πf) can be recovered from the sampled spectrum Xs(j2πf) if none of the shifted images, X(j2π(f−kfs)), overlap their adjacent neighbors. This means that the right edge of the k-th image (which is X(j2π(f−kfs))) must be entirely to the left of the left edge of the (k+1)-th image (which is X(j2π(f−(k+1)fs))). Restated mathematically,
kfs+B<(k+1)fs−B
which is equivalent to
fs>2B
If we sample at a sampling rate that exceeds twice the bandwidth, none of the images overlap, the original spectrum, X(j2πf), which is the image where k=0 can be extracted from Xs(j2πf) with a brickwall low-pass filter that keeps the original image (where k=0) unscaled and discards all of the other images. That means it multiplies the original image by 1 and multiplies all of the other images by 0.
X(j2πf)=rect(ffs)⋅Xs(j2πf)=H(j2πf) Xs(j2πf)
The reconstruction filter is
H(j2πf)=rect(ffs)
and has acausal impulse response:
h(t)=F−1{H(j2πf)}=fssinc(fst)
This filtering operation, expressed as multiplication in the frequency domain is equivalent to convolution in the time domain:
x(t)=h(t)⊛xs(t)=h(t)⊛T ∑n=−∞+∞x[n] δ(t−nT)=T ∑n=−∞+∞x[n] (h(t)⊛δ(t−nT))=T ∑n=−∞+∞x[n] h(t−nT))=T ∑n=−∞+∞x[n] (fssinc(fs(t−nT)))=∑n=−∞+∞x[n] sinc(fs(t−nT))=∑n=−∞+∞x[n] sinc(t−nTT)
That spells out explicitly how the original x(t) is reconstructed from the samples x[n] and knowledge of the sampling rate or sampling period.
So what is output from a practical Digital-to-Analog Converter (DAC) is neither
∑n=−∞+∞x[n] sinc(t−nTT)
which needs no additional treatment to recover x(t), nor
xs(t)=∑n=−∞+∞x[n] Tδ(t−nT)
which, with an ideal brickwall LPF recovers x(t) by isolating and retaining the baseband image and discarding all of the other images.
What comes out of a conventional DAC, if there is no processing or scaling done to the digitized signal, is the value x[n] held at a constant value until the next sample is to be output. This results in a piecewise-constant function:
xDAC(t)=∑n=−∞+∞x[n] rect(t−nT−T2T)
Note the delay of 12 sample period applied to the rect(⋅) function. This makes it causal. It means simply that
xDAC(t)=x[n]=x(nT)whennT≤t<(n+1)T
Stated differently
xDAC(t)=x[n]=x(nT)forn=floor(tT)
where floor(u)=⌊u⌋ is the floor function, defined to be the largest integer not exceeding u.
This DAC output is directly modeled as a linear time-invariant system (LTI) or filter that accepts the ideally sampled signal xs(t) and for each impulse in the ideally sampled signal, outputs this impulse response:
hZOH(t)=1Trect(t−T2T)
Plugging in to check this...
xDAC(t)=hZOH(t)⊛xs(t)=hZOH(t)⊛T ∑n=−∞+∞x[n] δ(t−nT)=T ∑n=−∞+∞x[n] (hZOH(t)⊛δ(t−nT))=T ∑n=−∞+∞x[n] hZOH(t−nT))=T ∑n=−∞+∞x[n] 1Trect(t−nT−T2T)=∑n=−∞+∞x[n] rect(t−nT−T2T)
The DAC output xDAC(t), as the output of an LTI system with impulse response hZOH(t) agrees with the piecewise constant construction above. And the input to this LTI system is the sampled signal xs(t) judiciously scaled so that the baseband image of xs(t) is exactly the same as the spectrum of the original signal being sampled x(t). That is
X(j2πf)=Xs(j2πf)for−fs2<f<+fs2
The original signal spectrum is the same as the sampled spectrum, but with all images, that had appeared due to sampling, discarded.
The transfer function of this LTI system, which we call the Zero-order hold (ZOH), is the Laplace Transform of the impulse response:
HZOH(s)=L{hZOH(t)}≜∫−∞+∞hZOH(t) e−st dt=∫−∞+∞1Trect(t−T2T) e−st dt=∫0T1T e−st dt=1T1−se−st∣∣∣T0=1−e−sTsT
The frequency response is obtained by substituting j2πf→s
HZOH(j2πf)=1−e−j2πfTj2πfT=e−jπfTejπfT−e−jπfTj2πfT=e−jπfTsin(πfT)πfT=e−jπfTsinc(fT)=e−jπfTsinc(ffs)
This indicates a linear phase filter with constant delay of one-half sample period, T2, and with gain that decreases as frequency f increases. This is a mild low-pass filter effect. At DC, f=0, the gain is 0 dB and at Nyquist, f=fs2 the gain is -3.9224 dB. So the baseband image has some of the high frequency components reduced a little.
As with the sampled signal xs(t), there are images in sampled signal xDAC(t) at integer multiples of the sampling frequency, but those images are significantly reduced in amplitude (compared to the baseband image) because |HZOH(j2πf)| passes through zero when f=k⋅fs for integer k that is not 0, which is right in the middle of those images.
Concluding:
The Zero-order hold (ZOH) is a linear time-invariant model of the signal reconstruction done by a practical Digital-to-Analog converter (DAC) that holds the output constant at the sample value, x[n], until updated by the next sample x[n+1].
Contrary to the common misconception, the ZOH has nothing to do with the sample-and-hold circuit (S/H) one might find preceding an Analog-to-Digital converter (ADC). As long as the DAC holds the output to a constant value over each sampling period, it doesn't matter if the ADC has a S/H or not, the ZOH effect remains. If the DAC outputs something other than the piecewise-constant output (such as a sequence of narrow pulses intended to approximate dirac impulses) depicted above as xDAC(t), then the ZOH effect is not present (something else is, instead) whether there is a S/H circuit preceding the ADC or not.
The net transfer function of the ZOH is HZOH(s)=1−e−sTsT
and the net frequency response of the ZOH is HZOH(j2πf)=e−jπfTsinc(fT)
Many textbooks leave out the T factor in the denominator of the transfer function and that is a mistake.
The ZOH reduces the images of the sampled signal xs(t) significantly, but does not eliminate them. To eliminate the images, one needs a good low-pass filter as before. Brickwall LPFs are an idealization. A practical LPF may also attenuate the baseband image (that we want to keep) at high frequencies, and that attenuation must be accounted for as with the attenuation that results from the ZOH (which is less than 3.9224 dB attenuation). The ZOH also delays the signal by one-half sample period, which may have to be taken in consideration (along with the delay of the anti-imaging LPF), particularly if the ZOH is in a feedback loop.