This digital method is built using chirp z-transform(CZT) and provides 100% alias-free bandwidth such as using ideal LPF. This noble method is efficient for economic and practical considerations.
Presentation on how to chat with PDF using ChatGPT code interpreter
Digital anti aliasing filter
1. 1
Abstract Anti-aliasing filter is indispensable to digital signal processing, especially analog to digital converter. An ideal
anti-aliasing filter is an ideal low pass filter(LPF), which passes all input frequencies below cutsoff frequency and stop
the undesired frequencies above . Such an ideal LPF is not physically realizable. In practice, feasible filter is analog LPF,
which was well developed. However due to the transition band of analog LPF, which contains a gradual attenuation of the
input frequencies, analog LPF attenuates all frequencies 20% beyond the bandwidth to zero. Therefore alias-free range is
80% of bandwidth. In practice, the sampling frequency should be greater than 2.5 times the maximum frequency
of input signal. For some conservative design, can be chosen 10 times higher than the filter cut-off frequency . For
this reason, analog filter is not efficient in terms of economic consideration. Now we introduce the new digital approach
for anti-aliasing filter. This digital method is built using chirp z-transform(CZT) and provides 100% alias-free bandwidth
such as using ideal LPF. This noble method is efficient for economic and practical considerations.
I. INTRODUCTION
liasing can occur when a signal is sampled at rate,
which is less than half of the Nyquist frequency .
Anti-aliasing filter cuts off all the undesired higher
frequencies greater than and passes all the
appropriate input frequencies below . It ensure that
the signal is bandlimited, | | or at least nearly so.
Consider rectangular spectral filter for ideal LPF,
| | (1)
its Fourier transform pair is sinc functuon,
↔ (2)
Suppose is the input signal for sampling, and is
output after passing LPF.
(3)
where is a truncated function of with
interval . Since sinc function is time
unlimited function, therefore it should be applied within
certain interval.
(4)
where .
(5)
From above equation, possibly implementable LPF is
, not . Set , is
Figure 1. feasible LPF with
The ideal low pass filter has sharp cutoff frequency
, which the reconstructed signal spectrum is
defined on the interval | | . However is
not good as ideal LPF due to many overshoots and
transition band. An ideal anti-aliasing filter is ideal low
pass filter, which passes all the input frequencies, less
than and cuts off all the frequencies, greater than .
In practice, the transition band between and ,
attenuate the input frequencies. Even we want to pass
only signals with frequencies less than , those signals
in the transition band could still cause aliasing.
For example, we have an input signal whose
maximum frequency , and sampling it with
sampling frequency , which is equal to
Nyquist rate . Bandwidth of anti-aliasing filter is
. However even , the actual usable
bandwidth can be less than 100 Hz. The anti-aliasing
filter reduces the bandwidth to 80 Hz and below. In
many data acquisition systems, there is an anti-aliasing
filter which starts reducing the amplitude of the signal
starting at 80% of the bandwidth.[1] Therefore in
practice, the sampling frequency should be at least
greater than 2.5 times the maximum frequency of
input signal. As an example, the maximum frequency
of an audio signal is up to 20 KHz. The Nyquist sampling
rate is theoretically 40 KHz. However it is commonly
sampled with from 44.1 KHz to 96 KHz.
Well known classical analog anti-aliasing filters are
Elliptical, Butterworth, Chebyshev, Bessel, Cauer and as
well as many others. Among these filters, Butterworth
filter the most commonly used.
Analog anti-aliasing filer is not efficient in bandwidth
usage. This is the main reason why we introduce the
digital approach.
Digital Anti-Aliasing Filter
Deahyun Kim
A
March 15, 2020
2. 2
II. DIGITAL ANTI-ALIASING FILTER
A. Introduction of Digital Filter
Instead of removing extraneous frequencies prior to
aliasing, the digital approach uses a much higher
oversampling frequency and utilize CZT and iFFT to
obtain the sampled signal with undersampling rate .
This process does not require analog filter that provide
insufficient bandwidth efficiency due to transition band.
Suppose a signal is given, with maximum frequency
and we are going to take undersampling with
. is the sampled discrete signal after
digital anti-aliasing filter. The following is diagram of
digital process to avoid aliasing without analog filter.
Figure 2. oversampling for digital anti-aliasing filter
Oversampling is first step for digital process.
Figure 3. diagram of digital anti-aliasing filter
where CZT is ‘Chirp z-transform’ and iFFT is ‘inverse
FFT’. CZT perform as ideal LPF function with the sharp
cutoff frequency , which is necessary to maximize use
of the available bandwidth for undersampling without
aliasing. In the above diagram, the signal data is digitally
processed and undersampled with the desired sampling
frequency .
B. Key Statement
Suppose is defined on , band unlimited
function, and its Fourier transform exist.
Statement 1. In Fourier transform domain, as time
sampling period is getting small, frequency period of
is longer and bandwidth of | |
increase. Therefore become close to bandlimited
function, and can be recovered from with
sufficiently small sampling period .
Statement 2. Transform maximum frequency in
bandwidth of | | , is proportional to
sampling frequency .
(6)
where is the maximum frequency represented by
calculation of Fourier transform. Statement 2 means
that according to sampling frequency , transform
maximum frequency is decided, and vice versa.
Statement 3. If we select cutoff frequency of in
figure 3 as,
(7)
and denote otherwize =0,
then samped signal with undersampling frequency
can be determined from .
The above eq(7) is basic concept for our digital filter
model.
C. Procedure of Digital Filter
Suppose that is a bandlimited function with and
we want to undersampling with .
sampling rate
maximum frequency of
Nyquist frequency,
oversampling frequency,
undersampling frequency,
cutoff frequency of LPF
Table 1 frequency symbols
[Step 1] Sampling with oversampling frequency
and obtain .
This process is oversampling to obtain . In
other words, by sufficiently oversampling, it is close to
without provocative aliasing.(statement 1)
Oversampling frequency should be integer multiple
of to perform later Fourier transform.
(8)
[Step 2] Take CZT of to calculate ,
where , and is desired undersampling rate
(statement 3). The reason why to use CZT instead of
DFT is because there is no need to calculate DFT beyond
. Using CZT, we calculate .
[Setp 3] Take iFFT of , then the result
is identical to by undersampling frequency
without aliasing through ideal LPF.
This digital process is simple and provides 100%
frequency bandwidth efficiency without aliasing. Also it
doesn’t require analog filter, and will reduce the cost of
implementation.
D. Introduction of CZT
Suppose is N-point sequence. Chirp z-transform
along spiral arcs in the z-plane is defined as[2]
{ } ∑ ∑ (9)
for , where
(10)
(11)
A is the complex starting point, are respectively
starting angle and end angle.
W is the complex ratio between points, and M is the
number of points to calculate, then eq(9) become
3. 3
{ } ∑ [ ] [ ] (12)
Set ,
then CZT calculate the z-transform of on this
contour.
Figure 4. chirp z-transform
If set in eq(12), spiral set is M evenly
spaced samples around the unit circle. Suppose N is the
length of the input sequence. As known, FFT provides a
frequency resolution of . When we improve the
resolution of only certain narrowband, it is inefficient to
improve entire bandwidth by FFT with sufficiently large
N. In this case, CZT can improve only certain frequency
band such as data zoom in. CZT is also another method
to calculate DFT fast as FFT. CZT is more efficient than
the DFT algorithm for the computation of arbitrary size,
including the prime size.[3]
Set for eq(12),
{ } ∑ (13)
for
Apply concept of CZT into LPF with cutoff frequency ,
set
(14)
Simply using eq(13),
{ } ∑ (15)
for .
E. LPF Kernel,
Recall figure 3 again, is rearranged to make
to perform iFFT of .
{ (16)
is consisted of iFFT of and ,
(17)
where
(18)
(19)
∑ (20)
Using eq(15), the are respectively,
∑ [∑ ] (21)
∑ [∑ ] (22)
∑ (23)
where is LPF kernel,
∑ (24)
where
{ (25)
Set , is
Figure 5. with
is similar with Dirichlet kernel. Its properties are
is complex number
periodic function with period
maximum value,
integral, ∫ for
where is non-zero positive integer.
zeros at
F. Concept of Digital Filter
Continue to derive , similar with eq(21),
∑ [∑ ] (26)
∑ (27)
∑ (28)
{
( )
(29)
4. 4
Combined with eq(25) and eq(29), figure 3 is described
by
(30)
Figure 6. concept of digital anti-aliasing filter
III. SIMULATION
A. Introduction
A speech voice signal is given, maximum frequency
KHz. The speech is “Hi I am emma. One of the
available high quality text to speech voices.”
We want sampling with = Hz using digital
method in figure 3.
Figure 7. given speech voice signal
Recall figure 3 again. is the sampled signal, digital
audio with oversampling frequency Hz,
which is a common sampling frequency.[2] Recall eq(8),
, (31)
Since KHz, if is less than Nyquist frequency
KHz, then aliasing occurs in and voice of
will be distorted without anti-aliasing process.
Compare with of sampling frequency
Hz and Hz without anti-aliasing filter.
Figure 8. Comparison of with Hz and
Hz without anti-aliasing filter.
The magnitude of is normalized to compare each
other. As shown in the above figure, we can recognize
the aliasing effect in by undersampling
Hz without anti-aliasing process.
B. Digital Filter
Now is given, its data sample size
and time length is 5.6689 sec. In real process, data
samples acquired per frame. Frame size is amount of
time data collected to perform a transform. And block is
data samples acquired during one frame.
For example, is sampled with Hz and
divided by 5 frames, then its frame size is 1.1338 sec
and block size is 50,000. However main purpose of this
section is to understand digital anti-aliasing filter
process, then we process without frame segment,
therefore is processed as one frame.
[Step 1] Using eq(15), take chirp z-transform of to
calculate , , where Hz.
For eq(15), and .
Figure 9. ,
[Step 2] Make , using .
Figure 10. ,
The data sample size of is .
[Step 3] Take iFFT of with point.
The result is a sampled signal with Hz
using digital anti-aliasing filter. Data length of is
from eq(31).
C. Results
The original voice signal is now sampled by
undersampling frequency Hz with digital
anti-aliasing filter.
Figure 11. by Hz with digital AA process
The two voices will be easily distinguishable. Refer to
appendix for code of each figure.
5. 5
IV. CONCLUSION
As mentioned, digital filter is implemented by CZT of
and iFFT of and provide 100% bandwidth
usage. Recall figure 3 and 6, we have the knowledge that
output is related to the partial sum of Fourier
series. Also this is represented by interpolation of iFFT.
Using these relationship, we will introduce another new
digital method, which use only FFT.
APPENDIX
Figure 1
fs=5; fc=fs/2;a=1;ts=0.01;N=10000;
t=-a:ts:a-ts;wt=2*fc.*sinc(2.*fc*t);
xf=fft(wt,N);
f0=1/ts/N;f=0:f0:fs-f0;fL=length(f);
wla=abs(xf(1:fL)).*ts; plot(f,wla)
Figure 4
a0=0.7;w0=0.99;w1=pi/3;w2=5*pi;
M=80;dw=(w2-w1)/(M-1);k=0:M-1;
a=a0*exp(-1i*w1);
w=w0*exp(-1i*dw);
z=a*(w.^-(k')); zplane(z)
Figure 5
M=20;fc=5;Ts=0.001;t=-6:Ts:6;
sk=zeros(size(t));
for k=0:M-1
sk=sk+exp(2i.*pi.*fc.*t.*k./M);
end;
sk=sk./2/M;plot(t,abs(sk))
Figure 7
[s,fos] = audioread('emma.wav');N=250000;so=s(1:N,1);
t=0:1/fos:N/fos-1/fos;plot(t,so);figure;
sf=fft(so); f0=1/N;f=0:f0:.3-f0;f=f.*fos;fL=length(f);
plot(f,abs(sf(1:fL)))
sound(so,fos)
Figure 8
clear all
[s,fos] = audioread('emma.wav');N=250000;so=s(1:N,1);
fus=4410;fc=fus/2;fr=fos/fus;
sf=fft(so)/fr; f0=1/N;f=0:f0*fos:fc-f0*fos;fL=length(f);
plot(f,abs(sf(1:fL)));figure
s4=so(1:fr:end);s4L=length(s4);%sampling fs=4.4k
sf4=fft(s4); f0=1/s4L;f=0:f0*fus:fc-f0*fus;fL=length(f);
plot(f,abs(sf4(1:fL)))
Figure 9
clear all
[s,fos] = audioread('emma.wav');N=250000;so=s(1:N,1);
fus=4410;fc=fus/2;fr=fos/fus;M=N/fr/2;
f0=1/N;f=0:f0*fos:fc-f0*fos;
w=exp(-1i*2*pi*fc/(M*fos));a=1;
Scf=czt(so,M,w,a)/fr;plot(f,abs(Scf))
Figure 10&11
clear all
[s,fos] = audioread('emma.wav');N=250000;
fus=4410;fc=fus/2;fr=fos/fus;M=N/fr/2;
f0=1/N;f=0:f0*fos:fc-f0*fos;
%==so(n)==
so=s(1:N,1)';
%==CZT of so(n)==
w=exp(-1i*2*pi*fc/(M*fos));b=1;
Scf=czt(so,M,w,b)/fr;
%==Sus(k)==
sa=so(1:2:end);sb=-so(2:2:end);a=sum([sa sb]);
Sus=[Scf a flip(conj((Scf(2:M))))];
f=0:f0*fos:fus- f0*fos;plot(f,abs(Sus));
%==s(n) with fus with digital AA=
sn=real(ifft(Sus));
t=0:1/fus:2*M/fus-1/fus;figure;plot(t,sn);figure;
%==s(n) with fus without AA==
s4=so(1:fr:end);plot(t,s4);
%== sound s(n) with fus with digital AA=
sound(sn,fus)
REFERENCES
[1] Siemens Digital Industries Software-Digital Signal
Processing: Sampling Rates, Bandwidth, Spectral
Lines, and more
[2] Rabiner, Schafer, Rader, “The Chirp z-Transform
Algorithm”. The Bell System Technical Journal, May
1969, page 84.
[3] Ronald Allen, Duncan Mills, “Signal Analysis: Time,
Frequency, Scale, and Structure”, Wiley-IEEE Press,
page 574
Deahyun Kim was born in Andong, South Korea. He
received the Bachelor's Degree in Electronic
Engineering from Chung-Ang University, Seoul in 1998,
the Master's Degree in Electrical Engineering in New
York University, Tandon School of Engineering in 1993
and his Ph.D. Degree in Digital Signal Processing, New
York University, Tandon School of Engineering in 1995.
In 1994, he joined the SK telecom R&D center located at
Daedeok Science Town in Daejeon, South Korea. After
1995, he had worked at SK telecom R&D center in New
Jersey. He was involved in the project of pager chipset,
CDMA chipset development, and participated in CDMA
standard organization e.g.CDG, 3GPP2, TIA. He currently
work in research on Fourier space such as remove Gibbs
phenomenon, digital anti-aliasing filter, etc.