0% found this document useful (0 votes)
73 views50 pages

CPEN 304 L01 - Introduction

CPEN 304 is an introduction to digital signal processing course taught by Dr. Godfrey A. Mills. The lecture outline covers what digital signal processing is, why it is used, its tasks and applications. It discusses the advantages and limitations of analog and digital processing. Key components of DSP systems include analog anti-aliasing and reconstruction filters, and analog-to-digital and digital-to-analog converters to interface between analog and digital domains. Hardware and software implementations of DSP are also covered.

Uploaded by

Phoebe Mensah
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
73 views50 pages

CPEN 304 L01 - Introduction

CPEN 304 is an introduction to digital signal processing course taught by Dr. Godfrey A. Mills. The lecture outline covers what digital signal processing is, why it is used, its tasks and applications. It discusses the advantages and limitations of analog and digital processing. Key components of DSP systems include analog anti-aliasing and reconstruction filters, and analog-to-digital and digital-to-analog converters to interface between analog and digital domains. Hardware and software implementations of DSP are also covered.

Uploaded by

Phoebe Mensah
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 50

CPEN 304 Digital Signal Processing

Lecture 1
Introduction to Digital Signal Processing
September 20, 2021
Dr. Godfrey A. Mills
Email: [email protected]
Phone: 020-549-6944
1 CPEN 304 Lecture 1
LECTURE #1 OUTLINE
— What is digital signal processing
— Why digital signal processing
— Digital signal processing tasks
— Advantages and limitation of analog processing
— Advantages and limitations of digital processing
— Components of DSP systems and functions
— Architecture of DSP processor and functions
— Hardware DSP implementation
— Software DSP implementation
— Application areas and scope of DSP
2 CPEN 304 Lecture 1
What is Signal Processing
— Signal >> physical phenomenon that varies with respect to
time, space or other independent variable that contains
information about the behavior or nature of a phenomenon.
— System >> an operator (physical device or software) that
performs an operation on a signals applied to its terminal
based on well-defined rules to produce an output response
— Signal processing >> operation of processing signals to
extract information content for various applications.
— When we pass a signal through a system (as in filtering), we
refer to the process as “processing of the signals”
— Why perform signal processing >> One key reason is
to eliminate or reduce the effect of undesirable signals (noise
and interference) on the information bearing signals.
3 CPEN 304 Lecture 1
What is Signal Processing
— Cont’d……
— Many signals encountered in practice are analog in nature >>
to process these signals digitally requires converting the analog
signals into a digital form for processing
— Analog signals can be processed directly using appropriate
analog systems (such as amplifier, filters, frequency analyzers
or frequency multipliers) to change the signal characteristics
or extract the desired data

4 CPEN 304 Lecture 1


What is Digital signal processing
— Digital signal processing >> application of mathematical
operations to manipulate analog signals (such as voice, audio,
video, pressure, temperature, position), that are represented
in digital form (sequences of samples) using a program or a
computer (or special purpose processor);
— We refer to the method or rules for implementing a system to
perform signal processing operation as the DSP algorithm.
— The algorithm must have large mathematical operations that
must be performed quickly and must repeat on series of data
— Example, program a computer to perform digital filtering
— The general goal of a digital signal processing is to measure,
filter and/or compress digital signals to desired form

5 CPEN 304 Lecture 1


What is Digital signal processing
— Cont’d….
— Processing analog signals in digital form require an interface
between the analog signal and digital processor >> ADC
— Once signal has been reduced to discrete samples/numbers,
we can isolate, analyze, and rearrange the components more
easily than if it were in analog form.
— Digital processors used for processing the discrete data may
be a programmable digital computer or a microprocessor
programmed to perform desired operation on signal

6 CPEN 304 Lecture 1


What is Digital signal processing
— Cont’d….
— The digital processor may be hardwired processor that may
be configured to perform specified set of instructions
— With programmable digital computers (DSP processors),
there is flexibility to change the signal processing operations
via changes in the software
— Hardwired implementation are useful in situations where
the signal processing operations are well defined
— When output is required in analog form (example speech
communication), another interface must be required
between the digital processor and the output >> DAC
— In situations where output is not required in another form,
then there is no need for requirement of a DAC
7 CPEN 304 Lecture 1
Why we need digital processor
— We need a digital signal processor to perform the following
digital signal processing tasks in real time:
— Signal modelling
— Difference equation
— Convolution
— Transfer function
— Frequency response
— Signal processing
— Data manipulation
— Algorithms
— Filtering
8 — Estimation
CPEN 304 Lecture 1
Task of DSP systems
— DSP system tasks require :
— Repetitive numeric computations
— Attention to numeric fidelity
— High memory bandwidth, mostly via array accesses
— Real-time processing
— To achieve the above task, a DSP design should minimize :
— Cost
— Power
— Memory use
— Development time

9 CPEN 304 Lecture 1


Advantages of Analog Processing
— Advantages of analog signal processing :
— Low cost and simple in implementation ;
— Analog filters for operation are simple to build >>
attenuators and amplifiers >> active lowpass RC circuit
— Low signal levels ;
— Infinite effective sampling rate ;
— Infinite resolution in frequency
— No aliasing and reconstruction issues
— Infinite resolution in amplitude ;
— No quantization noise

10 CPEN 304 Lecture 1


Limitations of Analog Processing
— Challenges of analog signal processing :
— Accuracy limitations due to component tolerances,
undesired nonlinearities, etc.
— Difficulty associated with repeatability due to tolerance of
components, changes in environmental conditions such as
temperature and vibration effects
— High sensitivity to electrical noise;
— Inflexibility to changes ;
— Difficulty of implementing certain operations such as:
— Nonlinear operations; time-varying operations, etc.
— Difficulty of storing data ; issues with programmability
11 CPEN 304 Lecture 1
Advantages of Digital Processing
— Advantages of digital signal processing are :
— DSP operations can easily be changed through changes in
the program (in digital programmable processors) >>
this gives a flexible systems via software implementation.
— Better control of accuracy can be obtained by changing
(increasing) the number of bits for data representation
— Digital signals are easily stored on storage media without
loss of quality of reproduction of signal.
— Digital signals sensitivity to electrical noise is minimal in
comparison with the analog signal
— Digital circuits are less sensitive to tolerances of the circuit
component values.
CPEN 304 Lecture 1
12
Advantages of Digital Processing
— Cont’d……
— Digital signals can be easily processed offline and thus, are
easily transported
— Digital information can be easily encrypted for security
— Digital systems are independent of external factors such as
temperature, ageing and other external parameters.
— Flexibility can be achieve with software implementations;
— The DSPs can be cascaded without any loading problems
as exist in analog processing systems (example cascading
of multiple analog filters vrs cascading of digital systems)
13 CPEN 304 Lecture 1
Limitations of Digital Processing
— Limitations of digital signal processing :
— Sampling of signals are required >> lead to loss of data;
— ADC and DAC devices are required >> requirements of
mixed-signal hardware;
— Limited speed of processors
— Quantization and round-off errors introduced due to the
operations >> lead to loss of information

14 CPEN 304 Lecture 1


Components of DSP System
— Architecture of a DSP system comprises 3 main components
— Analog filters (anti-aliasing + reconstruction filters);
— ADC and DAC (mixed signal circuits or elements); and
— Digital processor (microprocessor unit)

15 CPEN 304 Lecture 1


Anti-aliasing filter systems
— Practically, most continuous time signals contain some other
frequency components (noise signals) whose frequencies are
higher than the folding frequency (Nyquist sampling rate) or
the maximum frequency content of signal
— These higher frequencies must be removed before we satisfy
sampling theorem condition >> band-limit the input signal
so that all the frequencies will be less then folding frequency
— To accurately describe an audio signal with frequencies up
to 20 kHz, ADC must sample at a minimum of 40 kHz
— We remove the higher frequencies by passing the analog
signals through a low-pass filter system (anti-aliasing
filter), before passing the filtered signals to the ADC.

16 CPEN 304 Lecture 1


Reconstruction filter systems
— Output signals from the DAC system usually takes the form
of stair-case like waveform which requires smoothing;
— Smoothening in the signal is achieved via use of a low-pass
analog filter (interpolator) called reconstruction filter
>> refer to CPEN 301 on sampling and reconstruction

17 CPEN 304 Lecture 1


ADC and DAC of DSP System
— The ADC operation can be viewed as a 3 stage process:
— Sampling >> discretization of analog signals by taking
samples at discrete instances of time
— Quantization >> conversion of discrete time sampled
signals into a discrete valued signal
— Value of each signal sample is represented by a value
selected from a finite set of integer values
— Difference between the unquantized sample and the
quantized output is called the quantization error
— Coding >> representing each of the discrete time values
by a b-bits of binary sequence

18 CPEN 304 Lecture 1


ADC and DAC of DSP System
— Cont’d…..
— ADC sampling rate depends on bandwidth of the analog
signals being sampled >> this rate sets the pace at which
the samples are made available to processor for processing.
— The sampling rate is determined by the amount of signal
required for processing for a given application.

19 CPEN 304 Lecture 1


ADC and DAC of DSP System
— Cont’d…..

20 CPEN 304 Lecture 1


ADC and DAC of DSP System
— Cont’d….
— For ADC to give accurate output, input analog signals to the
ADC must remain constant in amplitude during the
read-in time until the conversion is complete.
— To account for this, a sample-and-hold (S/H) circuit is
usually used in conjunction with the ADC.
— The S/H circuit consists of analog switch, a shunt
capacitor, and a voltage follower >> the circuit is
supplied by a source voltage Vin with internal resistor, Rs.
— If the analog signal is changing too fast, the S/H circuit can
be used to freeze the input voltage during the conversion.
21 CPEN 304 Lecture 1
ADC and DAC of DSP System
— Cont’d….
— Performance of signal processing system depends to a large
extent on the ADC.
— ADC is specified by number of bits which defines its
resolution and conversion time decides the sampling time.
— The errors in ADC are due to the finite number of bits and
finite conversion time.
— Some times noise may be introduced by the switching
circuits.
— Similarly, a DAC is represented by number of bits and the
settling time at the output
22 CPEN 304 Lecture 1
The DSP Processor
— Digital processor of DSP system is special type of processor
designed for performing the mathematics involved in DSP
operations >> most of the processors are programmable
>> can be used for manipulating different types of
information such as sound, images, video, audio, speech, etc
— Variety of processors available for DSP implementation :
— General Purpose Processors (GPP) >> microprocessors;
— Specialized purpose processors >> DSP processors;
— Purpose-built processors or hardware >> Application-
Specific Integrated Circuit (ASICs), Field-programmable
gate arrays (FPGAs);
— Difference between DSP processor and others ???

23 CPEN 304 Lecture 1


The DSP Processor
— Cont’d….
— Processors used in a wireless cellular communication system

24 CPEN 304 Lecture 1


The DSP Processor
— Cont’d….
— Mapping of the the processors with the functions of the
components of the wireless cellular system on a chip

25 CPEN 304 Lecture 1


DSP algorithm format and notation
— DSP is mainly designed to perform mathematical functions
like "add", "subtract", "multiply" and "divide" quickly.
— Consider a simple filter system described by equation below

— Recall output of discrete time system using convolution sum


— We observe from the format above that the output y[n] of the
system (for N input samples) above is combination of sum
of products of coefficients and past input values
— DSP culture has graphical representation to describe the math
— Sketch the implementation diagram for the case of N = 4 >>
26
write a Lecture
CPEN 304 C/C++ 1 code to implement case for N=10 samples
DSP algorithm format and notation
— Cont’d……

27 CPEN 304 Lecture 1


DSP algorithm format and notation
— Cont’d……
— We also also from the expression a flowchart for formulas,
we have inner loops, and not programs.
— We have summation for add, multiplication, and other
variable that denote delay/storage (z-1)
— DSP algorithms such as filter above spends most of the their
execution time in loops >> same set of program instructions
will continually pass from program memory to CPU
— In DSPs, algorithms are kings while software is not in DSPs
>> specification of DSP is on 4 key algorithms >> IIR
filters, FIR filters, FFT (for the DFT), DCT, convolution
28 CPEN 304 Lecture 1
DSP algorithm format and notation
— Cont’d….
— FIR filters or discrete time systems
— FIR filters reduce signal noise and enhance image or signal
quality by removing unwanted frequencies.
— FIR compute output that depends only on the input sequence
and the impulse response.
— The algorithm has the following structure :
— N most recent samples in the delay line (Xi)
— New sample moves data down delay line
— “Tap” is a multiply-add
— Each tap nominally requires: Two data fetches, Multiply,
29 Accumulate,
CPEN 304 Lecture 1 Memory write-back to update delay line
DSP algorithm format and notation
— Cont’d……
— To implement the FIR discrete time system (filter), the DSP
processor will perform the following operations:
— Initialize accumulator;
— Fetch coefficients and other data;
— Do multiply-accumulate (MAC); >> mul + add
— Memory write back to update line
— Repeat fetch & MAC until done

30 CPEN 304 Lecture 1


Types of DSP Processors
— DSP multiprocessors on a die
— TMS320C80
— TMS320C6000
— 32-bit floating point DSPs
— TI TMS320C4X
— Motorola 96000
— AT&T DSP32C
— Analog devices ADSP21000
— 16-bit fixed point DSP
— TI TMS320C2X
— Motorola 56000
— AT&T DSP16
31 Analog
—CPEN Devices
304 Lecture 1 ADSP2100
Architecture of DSP Processor
— Architectural diagram of a typical DSP processor shows four
key elements that play independent role in the execution of
the program (refer to your computer architecture course)

32 CPEN 304 Lecture 1


Architecture of DSP Processor
— Cont’d….
— DSP processors are specialized microprocessors with
architectures that are optimized for fast operational needs:
— real time processing capabilities >> have to process
data in real time >> correctness of the operation depends
heavily on the time when the data processing is complete
— high throughput
— DSP processors architectures used are of three types:
— Von Neumann >> single memory and single bus
— Harvard >> separate memories for data and program code
— Super Harvard Architecture (SHARC) >> Harvard with
33
addition
CPEN 304 Lectureof
1 an instruction cache and an I/O controller
Features of DSP processor
— As a special microprocessor system, architectural features of
DSP processor >> CPU, ALU, memory, I/O, accumulators,
barrel shifter, multiplier unit, compare select and store unit,
DMA controller, and data and instruction buses
— These DSP features are organized into the following:
— Datapath configured for DSP
— Fixed point arithmetic and MAC
— Multiple memory banks and buses
— Specialized peripherals (I/Os) for DSP
— Specialized addressing modes
— Specialized instruction set and execution control
34 CPEN 304 Lecture 1
Features of DSP processor
— Cont’d….
— Computational engine of DSPs (central ALU)
— This part of DSP performs major arithmetic operations
or processing instructions like multiplication, addition,,
— The ALU is centered around the MAC unit, which is the
basic computational block of computing devices
— MAC unit consists of multiplier, adder, and accumulator
which performs multiplication and accumulation process
— The accumulator register holds intermediate results
— MAC unit of DSP determines the speed of overall system
>> part that makes the DSP so fast compared with other
traditional processors
CPEN 304 Lecture 1
35
Features of DSP processor
— Cont’d….
— Multiplier-Accumulator Unit
— DSP operations typically involves many time consuming
operations of multiplication and addition
— To make real-time operation faster, a MAC unit using
either fixed point or floating point arithmetic is mandatory
— MAC unit consists of a multiplier that has a pair or
two input registers (x and y) that hold the inputs to
the multiplier and a k-bit product register that holds
results of multiplication
— Output of the product register is connected to a double
precision accumulator where products are accumulated
CPEN 304 Lecture 1
36
Features of DSP processor
— Cont’d….
— Output of the product register is connected to a double
precision accumulator where products are accumulated
— Perform memory write back to update line

37 CPEN 304 Lecture 1


Features of DSP processor
— Cont’d….
— Since we do not want an overflow or scale the accumulator,
two options are possible to avoid such overflow conditions
— Option 1:
— When the accumulator is wider than the product bit, we
“guard bit”
— Option 2:
— We shift right and round the product before adder
— 3 DSP approaches for rounding
— Truncation >> chop off the results
— Round to nearest >> for < ½, round down
38 — Convergent
CPEN 304 Lecture 1 >> for < ½, round down, > ½ round up
Features of DSP processor
— Cont’d….
— Implementation of the “guard bit” and shift round product

39 CPEN 304 Lecture 1


Features of DSP processor
— Cont’d…..
— For example, we can map the discrete time system shown in
the implementation block diagram onto a DSP execution
unit as indicated on diagram below

40 CPEN 304 Lecture 1


Features of DSP processor
— Cont’d…..
— We observe from the implementation diagram that the
critical hardware unit in the DSP is the multiplier
— >> much of architecture is organized around allowing
use of the multiplier on every cycle
— This means we provide two operands on every cycle,
through multiple data and address buses, multiple address
units, and local accumulator feedback

41 CPEN 304 Lecture 1


Features of DSP processor
— Cont’d…..
— Memory (Program memory + Data memory)
— Program memory that stores the program or instructions
the DSP will use to process the data;
— Data memory that stores the information and data to be
processed
— Memory holds series of instructions which tell DSP
which operations to perform on data.
— In most cases the CPU of the DSP reads some data,
operates on it, and writes it back.
— Complete many memory accesses in a single clock cycle
— Almost all DSPs have some form of memory device –
whether on-chip memory or off-chip memory.
42 CPEN 304 Lecture 1
Features of DSP processor
— Cont’d…..
— Many memory access is completed in a single clock cycle
— Processor can fetch instructions while also fetching the
operands or storing to memory
— Example, in the simple filter expression shown earlier,
the system can operate a multiply and accumulate while
loading the operands and coefficients for the next cycle
— May perform three reads and one or two writes per cycle
— This operation may require multiple memory buses on the
same chip rather than simple address and data bus >>
Harvard architecture

43 CPEN 304 Lecture 1


Features of DSP processor
— Cont’d…..
— Specialized I/O peripherals for DSPs
(Synchronous serial ports, parallel ports, Timers,
on-chip ADC and DAC, D/A, host ports, bit I/O
port, on-chip DMA controller, clock generator)
— DSPs normally have internal ports that provide high
speed communication with other DSPs and converters.
— SHARC DSP >> at a 40 MHz clock speed, two serial
ports operate at 40 Mbits/s each while six parallel
ports with each providing 40 Mbytes/s data transfer
>> with all six parallel ports are used, we have data
transfer rate of 240Mbytes/s
— Ports are directly connected to internal bus to improve
44 CPENperformance
304 Lecture 1 and reduce external address decoding
DSP Hardware Implementation
— DSP processors characterized by a number of parameters
and the choice of a DSP processor is application dependent
— Consideration for DSP processor selection include following:
— Arithmetic format >> fixed point or floating point
— Bus widths >> fixed (usually 16 bits) or float (32 bits)
— Speed >> clock frequency (MHz), MIPS, MACs per sec,,,
— Memory/Bus/ISA architecture >> Harvard, SHARC,,,
— Development tools >> S/W tools (assemblers, linkers
simulators, debuggers, compliers, code library, RTOS),
H/W tools (emulators, development boards), JTAG
— Power consumption >> minimize Vcc to reduce power,
sleep mode operation, on-chip clock distribution, etc
— Cost >> limiting packaging cost, real design cost, etc
45 CPEN 304 Lecture 1
DSP Software Implementation
— DSP algorithms are programmed in the same languages as
any other Engineering tasks using programming tools such
as Basic, C, C++, Assembly, etc.
— C is often the preference of engineers due to its versatility.
— DSP programming can be divided into 3 levels:
— Assembly
— Compiled
— Application specific.
— Common DSP algorithms usually implemented are:
— Frequency domain filtering – FIR and IIR digital filters
— Frequency-time transformation – FFT

46 CPEN 304 Lecture 1


DSP application areas and scope
— DSP application area and scope by market summarized as:
— Telecommunication application
— Wireless >> cellular phones, base stations, gateways, fax
— Networking >> cable modems, ADSL, VDSL
— Audio application
— MPEG audio, portable audio, speech synthesis, voice
recognition, speech quality enhancement, speech encoder,
speech decoder, demodulator and synchronizer, equalizer,
— Music application
— Synthetic instruments, audio effects, noise reduction
— Consumer electronic
— DVD, digital camera, toaster, wireless headset, audio, etc
47 CPEN 304 Lecture 1
DSP application areas and scope
— Cont’d……
— Medical diagnostic application
— MRI, Ultrasonic imaging, computer tomography, ECG,
EEG, audiology, etc
— Aviation application
— Radar, radio navigation
— Geophysics application
— Seismology, oil exploration
— Security application
— Digital watermarking, biometric identification,
surveillance system, signal intelligence, steganography,
electronic warfare, information security
48 CPEN 304 Lecture 1
DSP application areas and scope
— Cont’d……
— Other related fields
— Electrical engineering, industrial control, data
compression, machine learning, real-time computing,
feature extraction for pattern recognition

49 CPEN 304 Lecture 1


DSP application areas and scope
— Cont’d……
— Other related fields
— Electrical engineering, industrial control, dataflow
engineering, data compression, machine learning, real-
time computing, vision, image compression, image
compositing, beamforming, spectral estimation, feature
extraction for pattern recognition

50 CPEN 304 Lecture 1

You might also like