Sunteți pe pagina 1din 8

DSP Tutorial I

1. Why is Multirate data conversion important to DSP?

It replaces analog components with software, a clear economic


advantage in mass-produced products,
It can achieve higher levels of performance in critical applications. (e.g.
compact disc audio systems use techniques of this type to achieve the
best possible sound quality.

2. What is the jitter requirement for an audio signal sampled at 44.1 kHz
with an ADC that has 8-bit resolution?

3. The information obtained from a digitized signal is limited compared to


the original analogue signal.
i. What limit the information content of the digital signal?
a. The antialias filters step, pass band ripple and cut-off
frequency sharpness
b. Sampling - information between samples is lost
c. Quantization
Inaccuracies in the measurement
- Uncertainty in timing
- Limits on the duration of the measurement

ii.

Why are digital signals preferred compared to analogue signals?

They are easy to process


Digital signals make automation easier
Versatility reprogrammable, ported to different hardware
Repeatability duplicated, no strict component tolerances and
aging, no drift with temperature
Simplicity easier to process
noise is easy to control after initial quantization
highly linear (within limited dynamic range)
complex algorithms fit into a single chip
flexibility, parameters can easily be varied in software,
environmental conditions, electromagnetic interference

discrete-time processing artifacts (aliasing)


can require significantly more power (battery, cooling)
digital clock and switching cause interference

4. What influences the precision of the analogue to digital converter used


for audio applications?
a) How much noise is already present in the analog signal?
b) How much noise can be tolerated in the digital signal?

5. Briefly outline the main advantages and disadvantages of digital signal


processing (DSP) as opposed to analogue signal processing.
Advantages

More and more signals are being transmitted and /or stored in digital
form so it makes sense to process them in digital form also.
DSP systems can be designed and tested in simulation using
universally available computing equipment ( e.g. PCs with sound and
vision cards ).
Guaranteed accuracy, as pre-determined by word-length and
sampling rate.
Perfect reproducibility. Every copy of a DSP system will perform
identically.
The characteristics of the system will not drift with temperature or
ageing.
Advantage can be taken of the availability of advanced
semiconductor VLSI technology.
DSP systems are flexible in that they can be reprogrammed to
modify their operation without changing the hardware. Products can
be distributed / sold and updated via Internet.
Digital VLSI technology is now so powerful that DSP systems can now
perform functions that would be extremely difficult or impossible in
analogue form. Two examples of such functions are :(i) adaptive
filtering ( where the parameters of a digital filter are variable and
must be adapted to the characteristics of the input signal) and, (ii)
speech recognition which is again based on information obtained
from speech by digital filtering.
Disadvantages

DSP designs can be expensive especially for high bandwidth signals


where fast analogue/digital conversion is required.
The design of DSP systems can be extremely time-consuming and a
highly complex and specialized activity. There is an acute shortage
of electrical engineering graduates with the knowledge and skill
required.
The power requirements for DSP devices can be high, thus making
them unsuitable for battery powered portable devices such as mobile
telephones. Fixed point processing devices ( offering integer
arithmetic only ) are available which are simpler than floating point
devices and less power consuming. However the ability to program
such devices is a particularly valued and difficult skill.
discrete-time processing artifacts (aliasing)
digital clock and switching cause interference

6. i) Explain why analogue signals are generally low-pass filtered before they are converted
to digital form.
The DTFT of {x[n]} obtained by sampling xa(t) at intervals of T
seconds is :

X(e jT ) =

1
T

X a ( j ( n 0 ))

with 0 2 / T

If xa( t ) is band-limited between -/T and +/T radians/sec ( fs/2


Hz ), then
Xa( j ) =0 for /T.
It follows that :
X( ejT ) = ( 1/T ) Xa( j )
for -/T < < /T
This is because Xa( j( - 2/T ) ), Xa( j( + 2/T ) ) and Xa( j ) do not
overlap.
Where Xa(j) is not band-limited to the frequency range -/T to /T,
overlap occurs.
If now we take Xs( ejT ) to represent Xa( j )/T for -/T < < /T, it will
be distorted.
This is aliasing distortion.
To avoid aliasing distortion, low-pass filter xa( t ) to band-limit the
signal to fS/2 Hz
before sampling at fs Hz. It then satisfies Nyquist sampling
criterion .

ii) For a given signal, use simple diagrams to illustrate why increasing the sampling rate
simplify the analogue filter required?
Assuming xa(t) is band-limited to F Hz, in theory, we could choose
fS = 2F Hz.
There are two related problems with this choice.
(1) Need very sharp analogue anti-aliasing filter to remove
everything above F Hz.
(2) Need very sharp analogue reconstruction filter to eliminate
images (ghosts):

Increasing fS, e.g. to 44.1 kHz when F is fixed at 20 kHz modifies this
diagram as follows:-

Analogue filtering is now easier. Need only remove everything above


fS - F Hz. If fs is further
increased, and F does not change, removing spectrum above fs -F
without affecting -F to F
becomes even easier.

7. In the absence of an anti-aliasing input filter, what would be the result of sampling an 8
kHz sine-wave at (i) 10 kHz, (ii) 6 kHz and (iii) 4 kHz
i) We obtain an aliased sine wave of frequency 5 -3 kHz = 2 kHz
ii) (ii) we obtain aliased sine wave of frequency 2 kHz
iii) (iii) A constant (dc) signal seen. No sine wave at all.

8. Explain the term quantisation noise. A DSP system, with a 16-bit uniformly quantising
analogue-to-digital converter and a sampling rate of 20 kHz, is used to process analogue
signals band-limited to the frequency range 0 Hz to 5 kHz. Estimate the maximum
achievable signal-to-quantisation noise ratio (SQNR) for sinusoidal input signals, and
state what assumptions are reasonable to make about the statistical and spectral properties
of the quantisation noise.
Quantisation noise power : 2/12 where is quantisation step.
Sinusoidal signal power = A2 / 2 where A is the maximum
possible signal amplitude.
16- bit ADC, therefore 216 quantisation levels.
A = 2 15
Signal-to-quantisation noise ratio (SQNR) = (A2/2) / ( 2 / 2)
= 2 29 2 / ( 2 /12)
= 2 31 x 3 = 25.166 x 10 6
In dB SQNR = 10 log10(2

31

x 3)

97.7 dB

( = 6 x 16 + 1.7)

The quantisation noise spectrum may be assumed white in the


frequency range 0 to fs / 2 Hz.
In the time-domain, the quantisation error samples may be
assumed random and statistically uniformly distributed
between - /2 and /2.

9. i) A digital signal processing system, with a twelve-bit uniformly quantising analogue-todigital converter and a sampling rate of 16 kHz, is used to process analogue signals band-

limited to the frequency range 0 Hz to 7 kHz. Estimate the maximum achievable signalto-quantisation noise ratio (SQNR) for sinusoidal input signals.
Quantisation noise power: 2/12 where is quantisation step.
Sinusoidal signal power = A2 / 2 where A is the maximum
possible signal amplitude.
Twelve bit ADC, therefore 212 quantisation levels.
A = 2 11
Signal-to-quantisation noise ratio (SQNR) = (A2/2) / (2 / 2)
= 2 21 2 / (2 /12)
= 2 23 x 3 = 25.166 x 10 6
In dB SQNR = 10 log10(2 23 x 3) = 73.7 dB ( = 6 x 12 + 1.7)
The quantisation noise spectrum may be assumed white in the
frequency range 0 to fs / 2 Hz.
In the time-domain, the quantisation error samples may be
assumed random and statistically uniformly distributed
between -/2 and /2.

ii) How and to what extent would the maximum achievable SQNR be affected by
increasing the sampling rate to 32 kHz and replacing the 12-bit analogue-to-digital
converter by a 16-bit converter?
Doubling fs does not change the SQNR directly, but spreads
the quantisation noise across spectrum -16 kHz to 16 kHz. We
can filter off noise above 7 kHz thus removing approximately
half its power saving 3 dB in SQNR.
Replacing the 12-bit ADC by a 16-bit device gains 24 dB.
Therefore the SQNR increases to 97.7 + 3 dB. = 100.7 dB.

10. Applications of digital signal processing (DSP) may be divided into two
categories: 'real time' and 'non real time'. Explain these terms and
give one example of a common application in each category.
Applications of digital signal processing can be divided into 'real time' and
'non real time' processing. A mobile phone contains a 'DSP' processor that
is fast and powerful enough to perform the mathematical operations
required to filter digitised speech (and process it in other ways as well) as
the speech is being received. This is real time processing.
A standard PC can perform 'non-real time' DSP processing on a stored
recording of music and can take as much time as it needs to complete this
processing. Non real time DSP is extremely useful in its own right;
consider MP3 compression as an example. It is also used to 'simulate' the
software for real time DSP systems before they are actually built into
special purpose hardware, say for a mobile phone. The simulated DSP
systems may be tested with stored segments of speech representative of
what is expected when people talk into a mobile phone for real.

11. An analogue signal xa(t) is band-limited to a frequency range below F Hz. This
signal is sampled at fS Hz to obtain the discrete time signal {x[n]}. Explain

how it is possible, in principle, to reconstruct an exact replica of x a(t) from


{x[n]} provided fS > 2F.
Given {x[n]} where x[n]=xa(nT) for all n. Construct the impulse
sequence (an analogue signal) xs(t) as sketched below:

x s (t)

x[n] (t - nT)

x a (t) (t - nT) = sample T { xa(t) }

By the Sampling Theorem, the Fourier transform of x S(t) = 'sample


{ xa(t) }' is
(1/T) repeat

2 /T

{Xa(j )}.

1
1
1
X s ( j) X a ( j) X a ( j ( 2 / T)) X a ( j ( 2 / T))
T
T
T

The spectrum of this analogue signal is "the sum of an infinite


number of identical copies of Xa(j ) each scaled by 1/T and shifted up
or down in frequency by a multiple of 2 /T radians per second".
Tf Xa(j ) is confined within /T to /T there is no overlap between
frequency shifted copies of Xa(j ) and we only need to remove the
images from Xs(j ) by filtering to leave a signal proportional to x a(t).

Xa(j )

X (j)
s

/T

/
T

2/T

/T

/T

2/
T

Therefore ideal reconstruction is to construct the impulse sequence


xs(t) then filter it by an ideal low-pass filter with cut-off frequency /T
,i.e. half the sampling frequency, to remove the images. Then we
need to scale by multiplying by the sampling interval T.

12. With the aid of a block diagram, explain how analogue signals may be
processed by digital signal processing techniques implemented on special
purpose microprocessors. Briefly describe the function of each block in your
diagram and indicate how its specification is affected by the bandwidths of
the analogue input and output signals and the choice of sampling rate.

Block diagram of a typical DSP system for processing analogue


signals:

x(t)

Antialias
LPF

Sampling
clock
Analog
S/H

ADC

DSP
device

DAC

S/H
compensation
filter

Recon-structn
LPF

y(t)

Antialiasing LPF: Analogue low-pass filter with cut-off frequency less than
half the sampling frequency (fs) to remove (strictly, to sufficiently
attenuate) any spectral energy of the input signal x(t) above f s/2. When
x(t) is sampled, this spectral energy would otherwise produce, by aliasing,
lower frequency energy capable of distorting the digitised input signal in
the frequency range 0 to fs/2 .
Analogue S/H:The analogue S/H circuit holds the input steady while the A/D
conversion process takes place.
ADC: Converts from analogue voltages to binary numbers of a specified
wordlength. Quantisation error incurred. Samples taken at the "sampling
frequency" fs.
DSP device: Digital processing system. Normally controls S/H and ADC to
determine sampling rate which is normally fixed by a sampling clock
connected via an input port to the processor. The processor reads samples
from the ADC when they become available, processes them and outputs the
resulting samples to the DAC. Many special-purpose DSP devices
(microprocessors) have been designed specifically for this type of
processing.
DAC: Converts from binary numbers output by the processor to analogue
voltages. "Zero order hold" or "stair-case like" waveforms are normally
produced.
S/H compensation: Zero order hold reconstruction multiplies the spectrum
of the true output by sinc(pi f/fs) which drops to about 0.64 at f s/2. Hence
we lose up to -4 dB. The S/H filter compensates for this effect by boosting

the spectrum as it approaches fs/2. Can be done digitally before the DAC or
by an analogue filter after the DAC.
Reconstruction LPF: Removes "images" of -fs/2 to fs/2 band produced by S/H
reconstruction. Spec similar to that of input filter.
Effect on detailed specification of input signal bandwidth & choice of
sampling rate:
Input signal bandwidth determines lower bound for sampling rate f s which
must be must be greater than twice the input signal bandwidth. The closer
fs is to the theoretical minimum, however, the more critical will be the
required characteristics of the analogue low-pass and S/H compensation
filters. Increasing fs has advantages in simplifying the requirements for
these filters (their cut-off rates, for example) but the maximum possible
value of fs will ultimately be limited by the speed of the processor and the
complexity of the required processing. Increasing the sampling rate also
allows a reduction in the ADC and DAC wordlength to achieve the same
signal-to-quantisation noise ratio, since the quantisation noise will be
spread across a wider frequency domain, and some of it will be removed by
the analogue reconstruction filter. About 3dB may be saved for each
doubling of fs, therefore multiplying fs by 4 saves one bit. Bit-stream DAC
techniques are based on this principle.

S-ar putea să vă placă și