DSP Important Material
DSP Important Material
com
CS2403 DIGITAL SIGNAL PROCESSING
Structures of IIR – Analog filter design – Discrete time IIR filter from analog
filter – IIR filter design by Impulse Invariance, Bilinear transformation,
Approximation of derivatives – (HPF, BPF, BRF) filter design using
frequency translation
Structures of FIR – Linear phase FIR filter – Filter design using windowing
techniques, Frequency sampling techniques – Finite word length effects in
digital Filters
UNIT V APPLICATIONS
Ans. The basic elements of digital signal processing system are shown in fig. below.
is measured as
1 I/P Signal It is the signal generated from some transducer or from some communication
system It may be biomedical signal like ECG or EEC Generally input signal is analog in
nature It is denoted as x(t)
2. Anti Aliasing filter: It is basically a low pass filter. It is used for the following
purposes.
(b) It avoids aliasing effect that means it is used to band limit the signal.
3. Sample and Hold circuit. It takes samples of I/P signal. It keeps the voltage level of I/P
signal relatively constant which is the requirement of ADC
4 Analog to digital converter It is used to convert analog signal into digital form This is
required because digital signal processor accepts the signal which is digital in nature.
5. Digital Signal Processor : It processes input signal digitally. Input signal making
modifying the signal as per requirement. For this purpose DSP processors like ADSP
2100 or TMS 320 are used.
6 Digital to analog converter (DAC) The output of digital signal processor is digital in
nature. But the required final output is analog in nature. So to convert digital signal into
analog signal DAC is used.
www.auupdates.com
7 Reconstruction Filter Output signal of DAC is analog that means it is continous signal.
But it may contain high frequency components. Such high frequency components are
unwanted. To remove these components reconstruction filter is used.
Ans. The advantages of digital over analog signal processing are given below
1. Accuracy : To design analog system analog components like resistors, capacitors and
mductors are used The tolerance of these components reduce accuracy of analog system.
While in case of DSP, much better accuracy is obtained.
3. Repeatability Digital systems can be easily duplicated These systems do not depend
upon component tolerances and temperature
5. Easy upgradations: Because of use of software, digital signal processing systems can
be easily upgraded compared to analog system
7. Cheaper In many applications, the digital systems are comparatively cheaper than
analog systems.
8. Remote processing: Analog signals are difficult to store because of problems like noise
and distortion while digital signal can be easily stored on storage media like magnetic
tapes, disks etc Thus compared to analog signals, digital signals can be easily transposed
So remote processing of digital signal can be done easily.
Q. 3. Show that for LTI discrete-time system to stable, all the poles should lie within
the unit circle
www.auupdates.com
Ans. Stability Criteria for a Discrete-Time LTI Systems : The stability of discrete- time
LTI system is equivalent to its impulse response h(n) being absolutely summable,
i.e.
In this case the DTFT of h(n) converges and the ROC of transfer function H(z)
must include the unit circle (z) =1
A discrete-time LTI system is stable if and only if the ROC of its transfer function
H(z) includes the unit circle z = 1
However it is perfectly possible for a system to be stable but not causal For causal
systems, stability can easily be checked by examining the locations of poles in transfer
function H(z) For a causal discrete-time LTI system with rational transfer function H(z),
the ROC is outside the outmost pole. A causal discrete time LTI system with rational
transfer function H(z) is stable if and only if all of the poles of H(z) lie inside the
unitcircle IzI =1.
For example Check the stability of the causal discrete-time LTI system with
transfer function as under:
We know that
www.auupdates.com
If h(n) is absolutely summable for I A I <1, then the system is stable.
Q. 4. Find the even and odd parts of the function g[n] = U [n] - U[n -4].
Ans.
The calculations of even and odd parts are shown in fig below
www.auupdates.com
Ans.
www.auupdates.com
Ans.
www.auupdates.com
www.auupdates.com
www.auupdates.com
www.auupdates.com
Q. 7. Define the stability conditions for a linear time invarient system. Determine the
range of values of ‘a’ for which the LTI system with impulse response h(n) as
defined below is stable.
Consider a linear time invarient system having impulse response h(n). Let x(n) be input
applied to this system. Now according to the definition of convolution, the output of such
system is expressed as
The input x(n) will be bounded if I x(n) is less than some finite number. Let us denote
this finite number by M x. Thus for input signal to be bounded
Here Mx is finite number, so its values should be less than infinity. Thus eq. (2) can be
written as
www.auupdates.com
Now taking absolute value of both sides of eq. (1)
We will read R.H.S. of eq. (4) as absolute value of summation of terms. If we take
Thus:
values of terms. Always absolute values of sum of terms is less than or equal to the
sum of absolute value of terms.
Here x(n — k) is delayed input signal. If input is bounded then its delayed version is
also bounded. This is because delay or qlding is related to time shifting operations By
performing these operations the magrjitu4e is not changed. Now for bounded input,
www.auupdates.com
We know that Mx is finite number. We want 0/P y(n) to be bounded. That means
Here h(k)= h(n) is the impulse response of LTI system. Thus eq. (9) gives the conditions
Q. 8. Determine the output y(n) of linear time invariant system units impulse
response,
Ans. In this case bth h(n) and x (n) are infinite duration sequences. We use the form
Ans. LTI systems are characterised by input output relations called as difference equation
with constant co-efficients.
Note that we have obtained output y(n) by putting only positive values of n. That means
for . So these are the equations of causal system. Every equation contains the term
y(-1). It is assumed that, we are starting the operation of system at n = 0. Then the term
y(—l) is called as initial condition of a system.
We know the equation (8) is representing the behaviour of causal system. It consists of
two parts as follows
(1) The first term y(—l) is called initial condition of the system.
(2) The second term is the response of system to the input x(n).
Now depending upon initial conditions, two types of responses are obtained.
www.auupdates.com
1. Zero state response or forced response : If initial condition y(—1) of system is
zero then the response of the system to the input signal is called is zero state
response. it is denoted by y zs (n).
2.Zero input response or natural response: Input is not applied to the system and
initial condition . Thus this kind of output without applying input x(n)
is called zero input response or natural response. It is denoted by yzi
Equation (1) is basically a linear constant co-efficient difference equation. The general
form of this equation can be expressed as
Here ak and bk are constant co-efficients. ‘N’ is the order of difference equation. That
Ans. Given
www.auupdates.com
www.auupdates.com
www.auupdates.com
Ans.
www.auupdates.com
Q. 12. Differentiate between a recursive and non recursive system. Determine if the
recursive system defined by the difference equation y(n) a y(n 4) + x (n) is linear.
Ans. Recursive System: A discrete time system in which output y(n) depends on present
input, past inputs as well as previous outputs is called a recursive system. Example of the
recursive systems, is given below:
As shown in fig a connection is drawn from output y(n) to the input side. This is a
feedback. This feedback signal y(n) is passed through an unit delay (z -1) block So the
output of delay block is y(n-1). This is past output compared to y(n). The signal y(n -1) is
multiplied by constant multiplier ‘a’ to obtain ay(n-1) . An adder is used to add input x(n)
and signal ay(n -1). Now the addition of x(n) and ay(n-1) produces the output. Thus the
output of system is expressed as
Non-recursive system : It do not require any past output sample to calculate the present
output, for example consider the equation of FIR causal system which is described by N.
To calculate present output we need present and past inputs. We can write eq. (1) as
follows
This equation does not contain any precious 0/P term like y(n-1), y(n - 2)....etc. So this is
equation of non-recursive system.
In case of non-recursive system, past output terms are not required. Past output terms are
obtained by - taking feedback from output to the input. Thus non-recursive system do not
require any feedback. The representation of non recursive system is shown below.
www.auupdates.com
So at any instant present output depends on past output. Hence it is recursive system. The
representation of non-recursive system is shown in figure below.
As shown in fig above and given by eq. (2) output is a linear combination of input x(n)
and delayed output. So it is linear system.
Ans. Like convolution integral for continuous time LTI systems, the convolution of two
discrete time signals is called discrete convolution. This is used to find the response of a
discrete time LTI system with impulse response h(n) for any arbitrary input x(n).
Let us consider that a discrete time input signal x(n) is applied to a discrete time LTI
system with unit impulse response h(n).
Then the discrete time output signal y(n) of this system may be expressed as
www.auupdates.com
The above expression for discrete time output signal y(n) is called the convolution
sum as against the convolution integral for continuous time LTI systm.
This equation indicates that the output y(n) is the convolution of the discrete time
input signal x(n) and discrete time unit impulse response h(n).
1. Choose an initial value of ‘n’ the starting time for evoluting the output sequence y(n).
If x(n) starts at n = n1 and h(n) starts at n n2 then n = n1 + n2 is good
2. Folding: Fold the Iz(k) about the origin and obtain h(-k).
3. Time shifting: shift the h(—k) by n unit to right if n is positive and left if n is —ye to
obtain h[-. (k — n)] = h(n — k).
5. Summation: Sum all the values of the product w(k) to obtain the value of 0/p y(n).
6. Increment the index n, shift the sequence h(n — k) to right by one sample and do step
4.
7. Repeat step 6 until the sum of product is zero all remaining values of n.
www.auupdates.com
Q. 14. What are the various realization techniques of linear time invariant systems?
Mention.
Ans. The linear time invariant system is described by the difference equation of form.
www.auupdates.com
Here ak and bk are constants with a0 = 1.
The methods of realizing digital systems can be divided into the two classes namely
recursive and non-recursive. For the linear time invariant system the non recursive
realization has the form
The current output sample y(n) is a function of past output and present and past
inputs samples. For the LTI system the recursive realization has the form of
Which is realised as in fig. below. The term y(n —1) is obtained as the output of delay
element with y(n) as input, x (n —1) is obtained as the output of delayed element with
x(n) as input. This realization uses separate delay for both input and output signal
samples. This structure is called as direct form I structure. This systeth can be viewed as
two LTI systems in cascade.
www.auupdates.com
The block diagram of Fig.(a) can be rearranged or modified in a variety of ways without
changing the overall system function. From this figure we obtain two different equations.
The difference equation (8) and (9) are equivalent to single difference eq. (5)
Fig. (b) reveals that the two elements contain the same input o(n) and hence the same
output w(n -1). Therefore, these two elements can be merged into one delay as shown in
Fig. (c). In comparison to direct form I realization, the new realization required only one
delay for co (n), therefore it is more efficient in term of memory requirements. The
realization of Fig. (c) is called as Direct form II structures.
www.auupdates.com
Q. 15. Determine the impulse response for the cascade of two linear time invariant
systems having impulse responses.
www.auupdates.com
Ans. Let us first determine the homageneoüs solution of the given difference equation.
We assume the solution to be form of
Since the particular solution y, (n) is already contained in homogeneous solution, so that
this particular solution is redundant. We treat this situation. if the characteristics equation
has multiple roots. Therefore, we assume
www.auupdates.com
1. Linearity
1. Shifting:
5.Time Reversal:
6. Conjugation:
7. Convolution:
8. Initial value:
9. Final value:
Ans. If
Consider the term x(n) — x(n — 1) using eq. (1), z-transform of this term can be
expressed as.
www.auupdates.com
Hence proved.
After some simple algebraic manipulations we obtain the desired result namely.
Q. 19. Find the z-transform and region of convergence for the following sequence.
Apply initial value theorem and check the z-transform whether it is correct or not.
Ans.
www.auupdates.com
www.auupdates.com
Ans. Given:
www.auupdates.com
By using long division method.
Ans. Given :
Ans. Given:
Q. 23. Determine the causal signal x (n) if its z-transforms X (z) is given by
www.auupdates.com
Ans. Given:
Ans. To find the impulse response sequence we write the homogeneous equation.
We solve for the constant-A, from the original solution, we prefer the initial condition
Ans.
1Thus the ROC is because the ROC is the common region where both sum
are finite. The fig shows the ROC of the z-transform of each of the individual terms & for
combined signal.
Q. 26. Find the one sided z-transform of the following discrete sequence
www.auupdates.com
Ans. The one sided z-transform of a n is given by
Ans. Given
www.auupdates.com
The discrete sequence is generated by replacing t by kT, where T is the sampling period.
Q. 28. (a) If
poles on or outside the unit circle, so the conditions of the final value theorem satisfied.
Therefore the steady state value exists and is given by:
In this case X (z) has a pole on the unit circle. So x (n) is not defined.
Ans. Given
www.auupdates.com
Q. 30. Find the inverse Z-transform of the function,
Ans. Given
From above equation we can say that if a complex sinusoidal signal is given as input
signal to LTI system, then the output is a sinusoid of the same frequency modified by
H(w). Hence H(w) is called the frequency response of the system. The H(w) produces a
change in the amplitude and phase of the input signal.
www.auupdates.com
The frequency response H(w) of LTI system is also given by the ratio of Fourier
transform of output to Fourier transform of input.
(b)When the ROC is interior of the circle, the signal x (n) is anticausal signal. Thus we
divide so as to obtain a series in power of z as follows.
www.auupdates.com
Ans. Given
www.auupdates.com
From above equation we can say that if a complex sinusoidal signal is given as input
signal to LTI system, then the output is a sinusoid of the same frequency modified by
H(w). Hence H(w) is called the frequency response of the system. The H(w) produces a
change in the amplitude and phase of the input signal.
The frequency response H(w) of LTI system is also given by the ratio of Fourier
transform of output to Fourier transform of input.
www.auupdates.com
Ans. Given
www.auupdates.com
System function
Ans.
The ROC is now the interior of a circle having radius I . This is shown in fig
below.
www.auupdates.com
The conditions for the existence of the Fourier transform is follows the Dirichlet
conditions which are:
The discrete time Fourier transform of finite energy aperiodic signal x(n) is
representation of signal in terms of complex exponential sequence where w is a
real frequency variable.
Ans. There are certain applications in which selected number of DFT values are
required, but not the entire DFT. In such cases the direct computation of DFT is more
efficient than FFT algorithms. The direct computation of DFI for selected values can be
realized using linear filtering approach. This type of computation can be performed using
this algorithm called as Goertzel algorithm.
definition of DFT.
Note that here we have used notation x (m) for input sequence.
Eq. (2) & (7) are identical. Thus we can conclude that DFT, X(k) can be obtained as
output of LTI system at n = N. But in this case will get X(k) only at one value of k. So we
need to use parallel systems to obtain X(k) at different values of k. Goertzel algorithm is
efficient when X(k) is to be computed at points less than log2N.
Ans. Round off error in FFT algorithm are more quantization errors. In FFT, the
basic operation is butterfly computation. For radix-2 DIT FFT algorithm butterfly is
characterized as. -
Where x & y are the inputs to butterfly, x’ and y’ are outputs, Wk is a twiddle factor.
www.auupdates.com
Thus all these variables are complex valued. Butterfly computation is carried out using
real arithmetic.
Each butterfly computation requires for multiplications and six real additions. Hence each
product will require approx. twice as many bits to represent as the operand themselves.
For example, if the variables are represented as 16—bits numbers, then after
multiplication each product will require 32-bits to represent. To overcome this problem,
truncating or rounding each product back to 16 bits is done. But it produces an error
called round off error.
In this case, we can associate four round off noise sources to each butterfly. One for
each product and so the round off noise power at the output of each butterfly is given
as
where
& the system wordlength is B bits. This noise generated by a butterfly at one stage is fed
into subsequent stages. Consider implementation of 8 points radix-2.DIT FFT algorithm.
In this it is seen that each FFT output X(k) can be traced back to (N—i> butterflies. Each
FFT output is connected to all N/2 butterflies in stage 1, N/4 butterflies in stage 2, N/8 in
stage 3 and so on. Assuming that each butterfly generates identical but uncorrected
errors, the maximum noise power at each FF1 0/P is
Thus the noise power is directly proportional to the transform size. Doubling N, which is
equivalent to adding a stage o the FFT, doubles the noise power. To retain the same noise
power we increase the word length by 1 bit since the noise power is proportional to N and
to
Ans. Consider we have two finite duration sequences of lengths N, x1 (n) & x2 (n).
. If we multiply the two DFT’s together, the results in a DFT say X3 (k) of a sequence
x3(n) of length N. Let us determine the relationship between x 3(n) and the sequences
x1(n) & x2(n).
Suppose that we substitute for is (4) using the DFT’s given in (1) & (2).
Thus we obtain.
www.auupdates.com
The inner sum in brackets in (5) has form.
where a is defined as
We observe that a = I when m - n - 1 is multiple of N. On the other hand ar” = I for any
value of Consequently (6) reduces to
If we substitute the result (7) in (6) we obtam the desired expression for x3 (m) in ‘form
The expression (8) has form of a convolution sum. However it is not the ordinary linear
convolution which relates the output sequence y (n) of a linear system to input sequence
x (n) and the impulse response h (n). Instead the convolution sumin (8) involves the index
((m—n))N and is called circular convolution.
The basic difference between these two types of convolution is that in circular
convolution the folding & shifting operations are performed in circular fashion by
computing the index of one of the sequences module N. In linear convolution, there is no
module N operation. Basically circular convolution y (n) contains same number of
samples as that of x (n) & h (n). In case of linear convolution no. of samples are given by
N.
N=L+M-1
www.auupdates.com
L = No. of samples in x (n)
That’s why the result of linear and circular convolution are not same.
To obtain the same result both convolutions, the following, steps are used
2. By doing zero padding make the length of every sequence equal to N. That means in
this case we need to add zeros in x (n) as well as Ii (n).
3. Perform the circular convolution. The result of circular convolution & linear
convolution will be same.
We have studied the periodicity property of DFT. Suppose input discrete time sequence is
x(n) then, the periodic sequence is denoted by xp(n). The period of xp(n) is ‘N’ which
means after ‘N’ the sequence x(n) repeats itself. Now we can write the sequence x p (n) as,
We will consider one example. Let x (n) {1, 2, 3, 4). This sequence is shown in Fig. The
periodic sequence xp(n) is shown in fig.
We will delay the periodic sequence xp(n) by two sample as shown in Fig. This sequence
is denoted by xp(n —2). Now the original signal is present in the range n = 0 to n = 3. In
the same range we will write the shifted signal as shown in fig. This signal is denoted by
x’(n).
www.auupdates.com
www.auupdates.com
Now observe Equations (2) and (5). We can say that the sequence x’ (n) is obtained
circularly shifting sequence x(n), by two samples. That means x’ (n) is related to x(n)
circular shift. i.e. called circular symmetry of the sequence.
It means that divide (n - k) by N and retain the remainder only. We can also use the short
hand notation as follows:
Ans. The symmetry properties for DFT can be obtained by applying the methodology as
used for fourier transform. Let us assume that the N-point sequence x (n) and its DFT are
both complex valued. Then the sequences can be expressed as
www.auupdates.com
Real valued sequences : If the sequence x(n) is real, it follows directly from DFT that
Futhermore, x1 (n) = 0 and therefore x(n) can be determined from (5) which is another
form for the IDFT
1. Periodicity
Let us consider a sequence x (n) of length N which is defined for 0 n N - 1. The sample
value of such sequence is zero for n <0 and n N. For any arbitrary integer k, the shift
sequence x1 (n) = x (n — k) is no longer defined for the range 0 n N - 1. Therefore we
need to define another type of shift that will always keep the shifted sequence in the
range 0 n N - 1.
This shift is known as circular shift that can be represented as the index modulo N. Thus
we can write,
www.auupdates.com
where x (n) is represented the circular shift of x (n). Or more generally we can
define
Here we wish to determine the sequence x3 (n) for which the DFT is,
The equation (6.12) has the form of convolution sum. However it differs from a linear
convolution of x1 (n) and x2 (n) as defined in unit-TI. In linear convolution the
computation of the sequence x3 (n) involves multiplying one sequence by a folder and
linear shifted version of the other and then summing the values of the product x1 (m) x2
(n - m) for all values of n.
Instead the convolution sum in eqn. (6.12), the second sequence is circularly time
reversed and circularly shifted w.r.t. of first. The equation (6.12) is called circular
convolution of two finite duration sequences.
www.auupdates.com
Thus we conclude that multiplication of the DFTs of two sequences is equivalent to the
circular convolution of the two sequences in time domain. The operation of forming
Hence, when the N-point sequence is reverse in time, it is equivalent to reversing the
DFT values. The time reversal is illustrated in Fig.
www.auupdates.com
If we change the index from n to m by defining m = N - n, then,
Proof.
We know circular convolution of the two sequences is just equal to the multiplication
11. DF of even and odd sequences : The DFT of an even sequence is purely real.
www.auupdates.com
The DFT of an odd sequence is purely imaginary. Therefore DFT can be evaluated using
cosine and sine transforms for even and odd sequences respectively.
Q. 9. Develop a Radix-2, 8-point DIF FFT algorithm with neat flow chart.
Ans. Decimation in frequency stands for splitting the sequences in terms of frequency.
That means we have split output sequences into smaller subsequences. This decimation is
done as follows.
Note that at this stage we have decimated the sequence of ‘N’ pomt DFT mto two N/2
point DFT’s given by eq (17) & (18) Let us consider an example of 8 pomt OFT That
means N = 8 So considermg (17) & (18) (that means N/2=4) we can obtain N (8-point)
www.auupdates.com
DFT. This is first stage of decimation. Note that eq. (17) indicate 4 (N/2) point OFT of
IN\
g(n) and eq (18) indicates 4 (N/2) pomt DFT of h(n) For 8 pomt OFT eq (15) becomes
Here we are computing ‘4’ point DFT, So range of ‘n’ is n=0 to n=3. Putting these
Using equations (20) & (22) & eq. (17) & (18) we can draw the flow graph of the
Second stage of decimation: In the first stage of decimation we have used 4-point DFT.
We can further decimate the sequence by using 2 point DFT. The second stage of
decimation is shown in fig below.
Third stage of decimation : In the second stage of decimation we have used 2- point DFT.
So further decimation is not possible. Now we will use a butterfly structure to obtain 2 -
point DFT. Thus the total flow graph of 8 point DIF-FFT is shown below.
www.auupdates.com
Q. 10.Discuss DIT and DIF algorithms and also compare the two algorithms.
Ans. Radix-2 Decimation in Time (DIT) Algorithm (DIT FFT) : To decimate means to
break into parts. Thus DIT indicates dividing (splitting) the sequence in time domain. The
different stages of decimation are as follows:
First stage of decimation Let x(n) be the given input sequence containing ‘N’ samples.
Now for decimation in time we will divide. x (n) into even and odd sequences.
Input sequence x(n) has ‘N’ samples. So after decimation;f1(m) and f2(m) will contain N
j- samples.
The first summation represents even sequence. So we will put n = 2m in first summation.
While the second summation represents odd sequence, so we will put n =(2m+1)
(2m +1) in second summation. Since even and odd sequences contain N/2 samples each;
But x (2m) is even sequence, so it is f1(m) and x(2m +1) is odd sequence, so it is f2
(m).
Now F1(k) and F2(k) are 4-point (N/2) DFTs. They are periodic with period N/2.
We are considering an example of 8 point DFT (N = 8). So in Equations (15) and (16), k
varies from 0 to 3. Now putting k = 0 to 3 in Equations (15) and (16) we get,
www.auupdates.com
means for 8-point DFT (N = 8); the length of each sequence is ‘4’ as given by Equations
(19) and (20). We discussed that we have to continue this process till we get ‘2’ point
sequence.
We can further decimate f1(m) into even and odd samples. Let g11(n)= f1(2m), which
contains even samples and let g12(n) = f1(2m +1), which contains odd samples of f1(m).
Now recall equations (15) and (16). We obtained sequences X(k) and X(k+N/2)
from F1(k) and F2(k). The length of each sequence was N/2. Here in the second stage of
decimation. We are further dividing the sequences into even and odd parts. So similar to
Equations (15) and (16) we can write; For F1(k),
Here the values of K are ‘0’ and 1. That means it is 2-point DFT. Thus Equations (23)
and (24) shows that we can obtain 4-point DFT by combining two 2-point DFTs. The
graphical representation is shown in Fig.
www.auupdates.com
Now similar to Equations (21) and (22) we can write equations for F2(k) as follows:
Combining Fig. we get the combination of first and second stage of decimation. It is
shown in Fig.
At this stage we N/4 have that means 2 point sequences. So further decimation is
We will use Equation (31) to compute 2-point DFT. From Fig. consider the first block of
2-point DFT. It is separately drawn as shown in Fig.
Here input sequences are g11(0) and g11(1). We can denote it by g11(n); where n
www.auupdates.com
varies from 0 to 1. Now the output sequences are G 11(0) and G11(1). We can denote it by
G11(k); where ‘k’ varies from 0 to 1. Here G 11(k) is DFT of g11(n).
Using Equations (33) and (35), we can represent the computation of 2-point DFT
as shown in Fig. This structure looks like a butterfly. So it is called as FFT butterfly
structure.
Now we know that . Thus we can modify Equation (33) and (35) as
Follows:
The total signal flow graph is obtained by interconnecting all stages of decimation. In this
case, it is obtained by interconnecting first and second stage of decimation. But the
starting block is the block used to compute 2-point DFT (butterfly structure). The total
signal flow graph is shown in Fig.
www.auupdates.com
Q. 11. Draw a 8 point radius 2 FF1’ DIT flow graphs and obtain DF1’ of the
following
sequence
Ans.
www.auupdates.com
Q. 12. Compute 4-point DFT of causal three sample sequence given by.
www.auupdates.com
Ans. By definition of N-point DFT, the kth is complex co-efficient of X (k) for
is given by
The three sample sequence and its periodic extension are shown in Fig. below.
Q. 13. Discuss the properties of Radix-2 decimation in time algorithm. Find 8- point
DFT of sequence.
Now radix means base and if its value is ‘2’ then it is called as radix 2 Thus when
So for 8 point DFT, there are three stages of FFT algorithm. While computing FFT,
divide number of input samples by 2, till we reach minimum two samples. Based on this
division there are two algorithms as follows.
In D1T the input is bit reversed while the output is in natural order. DYE can be go from
normal to shuffled data or vice versa.
If the observe the basic computation performed at every stage of DIT rodix 2, we
(4) The product b is subtracted from complex number a to form new complex
number B.
The above basic computation can be expressed by a signal flow graph shown in fig
below.
Given sequence is
Thus we have
www.auupdates.com
Q. 14. A finite duration sequence of x (n) of length 8 has 8-point DFT X(k) as shown
in fig. A new sequence y(n) of the length is defined by.
Therefore, 16 point DFT of interpolated signal y(n) contains two copies of 8 point DFT
of x(n). Since for Y (k), N 8 therefore Y (k) is periodic with period 8.
(a) N = even
(b)N= odd.
Ans.
www.auupdates.com
1. For N even
(B)For N odd
The magnitude and phase of are illustrated in Fig for L = 10. The N point of
Q. 17. By means of the DFT & IDFT, determine the sequence x3 (n) corresponding
to the circular convolution of the sequence x1 (n) and x2(n).
Q. 19. By means of the DFT & IDFT, determine the response of the FIR filter with
impulse response.
Ans. The input sequence has length L = 4 and the impulse response has length M = 3.
Linear convolution of these two sequences produces a sequence of length N = 6.
Consequently, the size of the DFT must be at least six.
For simplicity we compute eight point DFT’s. We should also mention that the efficient
computation of the DFT via the Fast Fourier Transform (FFT) algorithm is usually
performed for a length N, that is power of 2. Hence eight point DFT of x(n) is
www.auupdates.com
www.auupdates.com
Q. 20. An 8-point sequence is given by x (n) = {2, 2, 2, 2, 1, 1, 1, 1). Compute 8-point
DFT of X(n) by radix -2 DIT FFT. Also sketch the magnitude and phase spectrum.
Ans. The given sequence is first arranged in the bit reversed order.
For 8-point DFT by radix 2 FFF we require 3 stages of computation wits 4 butterfly
computations in each stage. The sequence rearranged in the bit reversed order forms the
input to the first stage. For other stages of computation the 0/P of previous stage will be
I/P for current stage.
Ans. For 8 point DFT by radix 2 FF1 we require 3-stages of computation with 4 butterfly
computation in each stage.
The given sequence is the input to the first stage. For other stages of computation, the
output of the previous stage will be the input for the current stage.
Ans. Linear Filtering Methods Based on the DFT : Since the DFT provides a discrete
frequency representation of a finite-duration sequence in the frequency domain, it is
interesting to explore its use as a computational tool for linear system analysis and
especially, for linear filtering. We have already established that a system with frequency
response H (), when excited with an input signal that has a spectrum X (w), possesses an
output spectrum Y (w) = X (w) H (w). The output sequence y (n) is determined from its
spectrum via the inverse. Fourier transform. Computationally, the problem with this
frequency domain approach is that X (w). H (w) and Y (cv) are functions of the
continuous variable cv. As a consequence, the computations cannot be done on a digital
www.auupdates.com
computer, since the computer can only store and perform computations on quantities at
discrete frequencies.
On the other had, the DFT does lend itself to computation on a digital computer. In the
discussion that follows, we describe how the DFT can be used to perform linear filtering
in the frequency domain. In particular, we present a computational procedure that serves
as an alternative to time-domain convolution. In fact, the frequency-domain approach
based on the DFT, is computationally more efficient than time-domain convolution due
to the existence of efficient algorithms for computing the DFT. These algorithms, which
are described in Chapter 6, are collectively called fast Fourier transform (FFT)
algorithms.
Use of the DFT in Linear Filtering: In the preceding section it was demonstrated that the
product of two DFTs is equivalent to the circular convolution of the corresponding time-
domain sequences. Unfortunately, circular convolution is of no use to us if our objective
is to determine the output of a linear filter to a given input sequence. In this case we seek
a frequency-domain methodology equivalent to linear convolution.
Suppose that we have a finite-duration sequence x (n) of length L which excites an FIR
filter of lenth M. Without loss of enerality, let
The output sequence y (n) of the FIR filter can be expressed in the time domain as the
convolution of x (n) and h (n), that is:
Since h (n) and x (n) are finite-duration sequences, their convolution is also finite in
duration. In fact, the duration of y (n) is L + M - 1.
Now if
www.auupdates.com
then ………………..(3)
where {X (k)) and {H (k)) are the N-point DFI’s of the corresponding
sequences x
(n) and h (n), respectively. Since the sequences x (n) and h (n) have a duration less than
N, we simply pad these sequences with zeros to increase their length to N. This increase
in the size of the sequences does not alter their spectra which are
continuous spectra, since the sequences are aperiodic. However, by sampling their spectra
at N equally spaced points in frequency (computing the N-point DFTs), we have
increased the number of samples that represent these sequences in the frequency domain
beyond the minimum number (L or M, respectively).
Since the N = L + M - I point DFT of the output sequence y (n) is sufficient to represent y
(n) in the frequency domain, it follows that the multiplication of the N-point DFTs X (k)
and H (k), according to (3), followed by the computation of the N-Point IDFT, must yield
the sequence {y (n)). In turn, this implies that the N-point circular convolution of x (n)
with h (n). In other words, by increasing the length of the sequences x (n) and h (n) to N
points (by appending zeros), and then circularly convolving the resulting sequences, we
obtain the same result as would have been obtained with linear convolution. Thus with
zero padding, the DFT can be used to perform linear filtering.
Since linear filtering performed via the DFT involves operations on a block of data,
which by necessity must be limited in size due to limited memory of a digital computer, a
long input signal sequence must be segmented to fixed-size blocks prior to processing.
Since the filtering is linear, successive blocks can be processed one at a time via the DFT
and the output blocks are fitted together to form the overall output signal sequence.
We now describe two methods for linear FIR filtering a long sequence on a block - by-
block basis using the DFT. The input sequence is segmented into blocks and each block
is processed via the DFT and IDFT to produce a block of output data. The output blocks
are fitted together to form an overall output sequence which is identical to the sequence
obtained if the long block had been processed via time-domain convolution.
The two methods are called the overlap-save method and the overlap-add method. For
both methods we assume that the FIR filter has duration M. The input data sequence is
www.auupdates.com
segmented into blocks of L points, where, by assumption, L>> M without loss of
generality.
Overlap-save method : In this method the size of the input data blocks is N = L + M -1
and the size of the DFTs and IDFT are of length N. Each data block consists of the last
m - 1 data points of the previous data block followed by L new data points to form a
data sequence of length N = L + M - 1. An N-point DFT is computed for each data block.
The impulse response of the FIR filter is increased in length by appending L — 1 zeros
and an N-point DFT of the sequence is computed once and stored. The multiplication of
the two N-point DFTs for the mth block of data yields..
Since the data record is of length N, the first M — 1 points of are corrupted by
aliasing and must be discarded. The last L points of are exactly the same as the
result from linear convolution and, as a consequence,
To avoid loss of data due to aliasing, the last M — 1 points of each data record are saved
and these points become the first M - 1 data points of the subsequent retord, as indicated
above. To begin the processing, the first M - 1 points of the first record are set to zero.
Thus the blocks of data sequences are
www.auupdates.com
and so forth. The resulting data sequences from the IDFT are given by (8), where the first
M - I points are discarded due to aliasing and the remaining L points constitute the
desired result from linear convolution. This segmentation of the input data and the fitting
of the output data blocks together to form the output sequence are graphically illustrated
in fig.
Overlap-add method : In this method the size of the input data block is L points. and the
size of the DFTs and IDFT is N = L + M - 1. To each data block we append M - 1 zeros
and compute the N-points DFT. Thus the data blocks may be represented as:
and so on. The two N-point DF’Ts are multiplied together to form
The IDFT yields data blocks of length N that are free of aliasing since the size of
Since each data block is terminated with M - I zeros, the last M — I points from each
output block must be overlapped and added to the first M - I points of the succeeding
block. Hence this method is called the overlap-add method. This overlapping and adding
yields the output sequence.
The segmentation of the input data into blocks and the fitting of the output data
blocks to form the output sequence are graphically illustrated in fig. 11.
At this point, it may appear to the reader that the use of the DFT in linear FIR filtering is
not only an indirect method of computing the output of an FIR filter, but it may also be
more expensive compositionally since the input data must first be convected to the
frequency domain vai the DFT, multiplied by the DFT of the FIR filter, and
finally, converted back to the time domain via the IDFr. On the contrary, however, by
using the fast Fourier transform algorithm, as will be shown in Chapter 6, the DFTs and
IDFT require fewer computations to compute the output sequence than the direct
www.auupdates.com
realization of the FIR filter in the time
domain. This computational efficiency is the basic advantage of using the DFT to
compute the output of an FIR filter.
Q. 1. Determine the cascade and parallel realizations for the system described by the
system function
Cascaded Realization:
Ans.
www.auupdates.com
Parallel realization:
Ans.
www.auupdates.com
Q. 3. Obtain the block diagram representations of Direct form I and II realizations
of the system with transfer function.
Ans. Given
Ans. Given
www.auupdates.com
www.auupdates.com
The parallel realization is shown in fig. below.
Q. 5. Draw the canonical cascade realization diagram for the system given by:
Ans. Given
Q. 6. Explain with neat sketches, the cascade and parallel realization forms of
digital filters.
Ans. Cascade form structures : To obtain the cascade form realization, the numerator and
denominator of given transfer function H(z) is factored into the product of second order
terms.
Here H1(z), H2(z) Hk(z) are second order polynomials Then each subtransfer function
(H1, H2 etc.) can be realised using direct form I or direct form II structures. The total
www.auupdates.com
transfer function is obtained by connecting all second order subsystems in series as
shown in fig below.
Now we have the general difference equation for discrete time Lii system given by.
We can write the second order differential equation for H k(z) by putting M = N =2 in eq.
(2).
By using partial fraction expansion we can express the overall transfer function
H(z)as:
The general block schematic of parallel realization structure for hR system is shown
below:
www.auupdates.com
Here H1(z), H2(z) etc. can be realised by using direct-I or direct-Il structures. Then all
these structures are connected in parallel to obtain parallel form realization for hR
system.
Q. 7. Obtain direct form-I, direct form-Il, cascade and parallel structure for the
system described by:
1. Direct form-I
the order of
Q. 8. What are the limitations of IIR filter design by impulse invariance method ?
How are they over come by bilinear transformation method. Convert the analog
filter with system function.
Ans. In impulse invariant method we have replace analog filter by digital filter. The
limitations of impulse invariance method are given below:
www.auupdates.com
1. We know that
s
is analog frequency and its range is from . While
2. Analog filters are not band limited so there will be aliasing due to sampling process.
Because of this aliasing, the frequency response of resulting digital filter will not be
identical to the original frequency response of analog filter.
3. The change in the value of sampling time has no effect on the amount of
method as follows
Given
Now we will find the value of sampling time using the relation.
Ans.
Q. 11. What is the difference between butterworth and chebyshev filters in terms of
frequency response?
Ans. Butterworth filters are all pole filters characterized by the magnitude required
frequency response.
www.auupdates.com
where N is the order of the filter, is its —3dB frequency (àsually called the out- off
frequency), is the passband edge frequency and is the band edge value
(i+e)
figure below.
There are two types of chebyshev filters. Type I chebyshev filters are all pole filters that
exhibit equiripple behaviour in the passband and a monotonic characteristic in the
stopbond. On the other hand the family of type II Chebyshev filters contains both poles
and zeros and exhibits a monotonic behaviour in the passband. The magnitude squared of
the frequency response characteristics of a type I Chebyshev filter is given as:
Where e is a parameter of the filter related to the ripple in the passband and
frequency
……….(1)
Now we will find out the value of sampling time (T5) using we relation.
www.auupdates.com
Using bilinear transformation H(z) can be obtained by puffing
Q. 13. An IIR low pass filter is to be designed to meet the following specifications.
Ans. In the problem the specifications of required digital filter will be given and it will
be asked to design a particular, discrete time butlerworth’s filter. Then the following
steps should be used.
Ans. First we will calculate the values of the edge frequency for analog filter.
4. Calculation of poles
5. Calculate roles:
www.auupdates.com
Q. 15. Using impulse invariant method, obtain the digital filter realization of the
analog filter shown in fig.
Ans. Let
The unit sample response derived by sampling every second is given by:
www.auupdates.com
Q 17 Design a chebyshev filter for the following specification using (a) bilinear
transformation (b) Impulse invariance method.
Ans. Given
www.auupdates.com
Let
Taking z-Transform
www.auupdates.com
Assume T =1 sec.
Uptil now we have studied the design of low pass filter only. Now if it is asked to design
other filter like high pass, band pass or band reject filter then we have to use the
frequency transformation.
1.Low pass to low pass : Suppose it is asked to design another LPF with new passband
edge frequency Then use the transformation,
LP
2.Low pass to high pass: Suppose we have to design HPF with cut off frequency
then use,
3.Low pass to bandpass : Suppose we have to design bandpass filter with higher
www.auupdates.com
cutoff frequency and lower cut off frequency then use the transformation,
4.Low pass to bandstop or notch or band reject : Suppose we have to design notch filter
with higher cut-off frequency and lower cut off frequency then use the
transformation,
Note : These formulae are applicable for analog frequency transformation. Similarly, we
can transform the LPF in digital domain by using the formulae for digital frequency
transformation.
systems.
Ans. Lattice Structure for FIR Filters : Consider Mth order FIR system with the transfer
function.
Now the same output can be obtained by using the structure shown in Fig. (b). This
structure is called as single stage lattice structure. This structure provides two outputs
We know that Equation (7 (b)) is obtained by using single stage lattice structure.
That means the same output can be obtained using single stage lattice structure.
As M = 2 we have to cascade two stages to obtain two stage lattice structure as shown in
Fig. (c).
Here k1 and k2 are reflection coefficients The same way we can increase the number of
stages Finally Mth stage lattice structure is obtained as shown in Fig (d)
www.auupdates.com
While implementing filter in hardware, the coefficient values must be quantized to the
accuracy of digital number system used in hardware. The filter coefficients should be
adjusted depending upon the number of bits supported by the hardware. Because of this,
the error is automatically introduced; which causes the frequency response of filter to
deviate from the desired response. It may happen that the positions of poles or zeros may
change.
How to minimize this error ? This coefficients quantization error can be minimized by
realizing higher order filter with either single pole or double pole filter sections. The
single pole filter sections have complex poles. This requires complex arithmetic
calculations. To avoid this, complex conjugate poles should be combined to form second
order filter sections.
Generally digital FIR filters are designed such that they have linear phase characteristic
in the passband. If FIR filters are realized using direct form realization then linear phase
is maintained even when the quantization of filter coefficients is done. That means the
quantization does not affect the phase characteristics of FIR filter. But it affects the
magnitude response. To avoid this effect; the cascade form realization should be used and
12 to 14 bits should be used to represent the coefficients. Similarly the number of bits per
coefficient must be increased to maintain the same error in the frequency response
characteristics of the filter.
Let us say each filter coefficient is rounded to (b +1) bits. Then the maximum error in the
coefficient value is bounded as,
If in the realization of digital filter; one or more quantizers are used then, it results in a
non-linear characteristic. This characteristic may be significantly different than that of
ideal characteristic.
As a result of finite precision arithmetic operations performed in the digital filter; some
registers may overflow when the input signal level becomes large. The overflow is
defined as “When two numbers of ‘b’ bits are added and the sum cannot be represented
by b bits because of the overflow, then very large positive number becomes a very large
negative number and vice versa.
Because of this non-linearity effect; it becomes difficult to analyze the digital filters
precisely. To perform analysis of .quantization effects, a statistical characterization of
quantization effect is adopted.
Consider a digital filter which is characterized by the set of coefficients X1. With the
infinite precision realization, let the values of these coefficients be XR. Now at the
condition the magnitude of transfer function of the filter is exactly equal to 1.
This shows that the transfer function has zero sensitivity.
Whenever the multiplication operation is done in designing of digital filter, then the
rounding of the result of the multiplication is done. Because of this the errors are
generated. These errors are called as product round-off errors.
Now the quantization of the product of two numbers cause the overflow and the response
becomes non-linear. In order to obtain the more general result; the quantization errors in
the multiplication is modeled as an additive noise sequence, e (n).
Consider an additive noise model for the quantization error in a single pole system as
shown in fig.
www.auupdates.com
We can write the difference equation as follows,
The effect of rounding the product is modeled as a noise sequence e(n) and it is
added to the actual output .Equation (1) indicates that there are two
parts in the output. One is the response of system to the input x(n) and the other is the
response of system to the additive quantization noise e(n). Thus we can write Equation
(1) as,
Now as shown in Fig. the error sequence is fedback to the input. This reduces the
amount of noise power at the output.
We have discussed the effect of quantization in the design of digital filter. We have also
studied that the non-linearities occur in the output because of the finite precision
arithmetic operations. This causes the periodic oscillations in the output; even when the
input is zero or constant. Such oscillations in the recursive systems are called as limit
cycles.
These limit cycles occur as a result of quantization effects in the multiplications. When
the input sequence x(n) becomes zero then the output of system enters into the limit
cycle. The output remains in the limit cycle until another input applied to the system to
drive the system out of the limit cycle.
2.Overflow limit cycle: As the name indicates; this limit cycle occurs because of the
overflow taking place in the implementation of digital filters.
After quantizing the filter co-efficients, the transfer function of the hR system can
be written as:
www.auupdates.com
The direct form structure of H(z) is shown below:
If we compare the poles of H(z) and we can observe that both quantized and
unquantized poles of deviate very much from the original poles.
Q. 6. Describe the magnitude and phase response of FIR filters. How is linear phase
FIR filter defined.
this polynomial constitute the zeroes of the filter. The frequency response of eq. (1) is
givr’ .by
We can write
which gives us
symmetrical about , then its phase is piecewise linear. Fig. below shows the
property of. eq. (5), for N = 6 and N = 5.
In both the cases when N = 6 and N = 5 in the general case, the unit impulse
response sequence satisfying eq. (5). is symmetrical about For N odd, there is
Antisymmetric Condition:
For this
Then
www.auupdates.com
Therefore FIR filters have constant group delay and not constant phase delay when
The filters that satisfy the above conditions and have a delay of N—i samples but
their impulse response are antisymmetric around the centre of the sequence, as opposed
to the true linear phase sequence that are symmetric around the centre of the sequence.
Hence
www.auupdates.com
Q 7 Discuss design of FIR filter using window method Also compare design using
Kaiser and Hanrnng Windows
Ans. FIR Filter Design using Windows Different types of windows are used to design
FIR filter First we will discuss the design of FIR filter using rectangular window The
rectangular window is as shown in fig.
Let be infinite duration impulse response. We know that the finite impulse
response h(n) is obtained by multiplying
Figure below illustrates the plot of equation (2). The transition width of the main labe is
approximate . The first sidelobe will be 13dB down the peak of main lobe and the
roll off will be at 20dB per decade. For a causal rectangular window, the frequency
response can be written as
www.auupdates.com
From equation (2) and (3), it may be noted that the linear phase response of the the causal
filter is written as and the non causal impulse response will have a
zero phase shift.
It may be observed that the non-causal Hamming Window function is related to the
first side lobe is at —43dB. The side lobe roll off is 20 dB/decade.
Ans. FIR filter is said to be having a linear phase structure if its unit impulse
sequence is either symmetric or antisymmetric about some point in time. That means FIR
filter has linear phase if it satisfies the condition.
Here
………(7)
……….(8)
For
Given,
From the frequency response, we can find that the given response is a symmetrical
N odd response.
Step 2. To find
In general,
www.auupdates.com
Step 3. To find h(n):
So
use 10 tap filter and obtain the impulse response of the desired filter.
Therefore
Sol. Step 1. Draw the ideal desired frequency response of bandpass filter.
Form the desired frequency response, we can find that the given response is symmetric N
odd
Step 2. To find
Q. 13. Design an ideal band reject filter with a desired frequency response
Sol. Step 1. Draw the ideal desired frequency response of band reject filtr.
From the desired frequency response, we can find that the given response is symmertric,
N-odd.
Step 2. To find
www.auupdates.com
In general,
From the desired frequency response, we can find that the given response is
symmetric.
Step 2. To find
We know that,
Step 1. The filter co-efficients can be obtained from part (a), step (2) and step (5)
Q. 15. Discuss signal flow graph representation and lattice structures for hR
systems.
Ans. It is noted that the computational algorithm of an LTI digital filter is conveniently
represented as block diagram using basic building blocks tepresenting the unit
delay or storage element, the multiplier and the adder. Figure shows these basic
building blocks.
As an example, for a first-order digital system (i.e., filter), we can write the difference
equation as under:
Figure illustrates the basic realization block diagram for equation (4) and also the
corresponding structure of the signal flow graph.
www.auupdates.com
Note : From fig., it is quite obvious that there is a direct correspondence between
branches in the digital realization structure and branches in the corresponding signal flow
graph. However, in the signal flow graph, the nodes represent both branch points and
adders in the digital realization block diagram.
……….(1)
………(3)
can obtain
This output can also be obtained from a two-stage lattice filter as shown in figure
Conversion from Lattice Structure to Direct form Structure For N = 3 we can write the
difference equation for an hR filter as below
www.auupdates.com
and from the lattice structure, we can write
And
Now, substituting equations (27) and equation (29) in eqauation (25), we obtain
The equation (32) canbe used to convert lattice structure to direct form.
www.auupdates.com
Q. 16. Discuss various steps for the design of linear phase FIR filters using window
method.
Ans. Design of Linear Phase FIR Filters Using Windows: Let us consider that the digital
filter which is to the designed have the frequency response This is also called the
desired frequency response. As discussed earlier, the required frequency response of a
digital filter is periodic in frequency and may be expanded in a Fourier series, i.e.,
Then, we have
The Fourier Series coefficients of the series h (n) are similar to the impulse response of a
digital filter. Infect, there are two difficulties in the implementation of expression in
equation (33) for designing a digital filter. Firstly, the impulse response is of infinite
duration and secondly, the filter is non-causal and unrealisable. No finite amount of delay
can make the impulse response realisable. Therefore, the filter resulting from a Fourier
series representation of is an unrealisable hR filter.
The finite duration impulse response may be converted to a finite duration impulse
response simply by truncating the infinite series n ± N. However, this results in
undesirable oscillations in the passband and stop band of the digital filter. This is because
of the slow convergence of the Fourier series near the points of discontinuity. These
undesirable oscillations can be reduced by using a set of time, limited weighting
functions, to known as window functions, to modify the Fourier coefficients. The
windowing technique has been illustrated in Fig.
www.auupdates.com
The required frequency response and its Fourier coefficients {h (n)} have been
shown at the top of this figure The finite duration weighting function and is Fourier
transform are shown in the second row. The Fourier transform of the weighting
function contains a main label, which consists of most of the energy of the
window function and side lobes which decay rapidly. The sequence
A major effect of windowing is that the discontinuities in are converted into transi,
ion bands between values on either side of the discontinuity. The width of these transition
bands depends on the width of the main lobe of produces approximation errors for
all w. Based on the above discussion, the desirable characteristics can be listed as under
(i) The Fourier transform of the window functin must have a small width of main
lobe having as mush of the total energy as possible.
(ii) The Fourier transform of the window function should have side lobeswhich
decrease in energy rapidly as w tends to r. Some of the most frequently used window
functions are described in the following sections to follow
Figure illustrates the plot of eqation. The transition width of the main lobe is
approximaty . The first sidelobe will be 13dB down the peak of the main lobe and
the roll off will be at 20 d19 per decade. For a causal rectangular window, the frequency
resiponse can be written as:
From above equations, it may be noted that the linear phase response of the causal
Q.17 Discuss about the effects of finite word length precision in digital filters.
Rounding Noise
When a signal is sampled or a calculation in the computer is performed, the
results must be placed in a register or memory location of fixed bit length. Rounding the
value to the required size introduces an error in the sampling or calculation equal to the
value of the lost bits, creating a nonlinear effect. Typically, rounding error is modeled as
a normally distributed noise injected at the point of rounding. This model is linear and
allows the noise effects to be analyzed with linear theory, something we can handle. The
www.auupdates.com
noise due to rounding is assumed to have a mean value equal to zero and a variance given
in Equation 3:
For a derivation of this result, see Discrete Time Signal Processing.1 Truncating
the value (rounding down) produces slightly different statistics. Multiplying two B-bit
variables results in a 2B-bit result. This 2B-bit result must be rounded and stored into a
B-bit length storage location. This rounding occurs at every multiplication point.
Scaling We don't often think about scaling when using floating-point calculations
because the computer scales the values dynamically. Scaling becomes an issue when
using fixed-point arithmetic where calculations would cause over- or under flow. In a
filter with multiple stages, or more than a few coefficients, calculations can easily
overflow the word length. Scaling is required to prevent over- and under flow and, if
placed strategically, can also help offset some of the effects of quantization.
Z-Transform:
Where:
if
then
www.auupdates.com
If the input sinusoidal frequency has an amplitude of one and a phase of zero, then
the output is a sinusoidal (of the same frequency) with a magnitude
and phase
:
(Filter Synthesis)
www.auupdates.com
If the linear, constant coefficient difference equation is implemented directly:
There are two main effects which occur when finite precision arithmetic is used to
implement a DIGITAL FILTER: Multiplier coefficient quantization, Signal quantization
The multiplier coefficient value has been quantized to a six bit (finite precision) value.
The value of the filter coefficient which is actually implemented is 52/64 or 0.8125
AS A RESULT, THE TRANSFER FUNCTION CHANGES!
The magnitude frequency response of the third order direct form filter (with the gain or
scaling coefficient removed) is:
2. Signal quantization
www.auupdates.com
The signals in a DIGITAL FILTER must also be represented by finite, quantized binary
values. There are two main consequences of this: A finite RANGE for signals (I.E. a
maximum value) Limited RESOLUTION (the smallest value is the least significant bit)
For n-bit two's complement fixed point numbers:
If two numbers are added (or multiplied by and integer value) then the result can be
larger than the most positive number or smaller than the most negative number. When
this happens, an overflow has occurred. If two's complement arithmetic is used, then the
effect of overflow is to CHANGE the sign of the result and severe, large amplitude
nonlinearity is introduced.
For useful filters, OVERFLOW cannot be allowed. To prevent overflow, the digital
hardware must be capable of representing the largest number which can occur. It may be
necessary to make the filter internal word length larger than the input/output signal word
length or reduce the input signal amplitude in order to accommodate signals inside the
DIGITAL FILTER.
Due to the limited resolution of the digital signals used to implement the DIGITAL
FILTER, it is not possible to represent the result of all DIVISION operations exactly and
thus the signals in the filter must be quantized.
The nonlinear effects due to signal quantization can result in limit cycles - the filter
output may oscillate when the input is zero or a constant. In addition, the filter may
exhibit dead bands - where it does not respond to small changes in the input signal
amplitude. The effects of this signal quantization can be modeled by:
www.auupdates.com
where the error due to quantization (truncation of a two's complement number) is:
By superposition, the can determine the effect on the filter output due to each
quantization source. To determine the internal word length required to prevent overflow
and the error at the output of the DIGITAL FILTER due to quantization, find the GAIN
from the input to every internal node. Either increases the internal wordlengh so that
overflow does not occur or reduce the amplitude of the input signal. Find the GAIN from
each quantization point to the output. Since the maximum value of e(k) is known, a
bound on the largest error at the output due to signal quantization can be determined
using Convolution Summation. Convolution Summation (similar to Bounded-Input
Bounded-Output stability requirements):
If
then
An alternate filter structure can be used to implement the same ideal transfer function.
Note that the effects of the same coefficient quantization as for the Direct Form filter (six
bits) does not have the same effect on the transfer function. This is because of the
reduced sensitivity of this structure to the coefficients. (A general property of integrator
based ladder structures or wave digital filters which have a maximum power transfer
characteristic.)
Note that all coefficient values are less than unity and that only three multiplications are
required. There is no gain or scaling coefficient. More adders are required than for the
direct form structure.
www.auupdates.com
Of course, a finite-duration impulse response (FIR) filter could be used. It will still have
an error at the output due to signal quantization, but this error is bounded by the number
of multiplications. A FIR filter cannot be unstable for bounded inputs and coefficients
and piecewise linear phase is possible by using symmetric or anti-symmetric coefficients.
But, as a rough rule an FIR filter order of 100 would be required to build a filter with the
same selectivity as a fifth order recursive (Infinite Duration Impulse Response - IIR)
filter.
Effects of finite word length
Quantization and multiplication errors
Multiplication of 2 M-bit words will yield a 2M bit product which is or to an M bit word.
Truncated rounded
Suppose that the 2M bit number represents an exact value then:
Exact value, x' (2M bits) digitized value, x (M bits) error e = x - x'
Truncation
x is represented by (M -1) bits, the remaining least significant bits of x' being discarded
Quantization errors
Quantization is a nonlinearity which, when introduced into a control loop, can lead to or
Steady state error
www.auupdates.com
Limit cycles
Stable limit cycles generally occur in control systems with lightly damped poles detailed
nonlinear analysis or simulation may be required to quantify their effect methods of
reducing the effects are:
- Larger word sizes
- Cascade or parallel implementations
- Slower sample rates
Integrator Offset
Consider the approximate integral term: