Motorola Digital Signal Processing
Motorola Digital Signal Processing
Motorola Digital Signal Processing
rJ1
~
=
~
Digital S·
~ AND THE MICR
_.
~
~
'J:J
'J:J
=
~
»
z
0
-i
I
m
$:
-
0
:0
0
0
0 T
Z
-i
:0
0
r
r
m
:0 •
Digital
Signal
Processing
and
The Microcontroller
Mark McQuilken
Microprocessor and Memory Technologies Group
Motorola, Inc.
Austin, Texas
James P. LeBlanc
Electrical Engineering Department
Cornell University
Ithaca, New York
All rights reserved.
Scott Anderson and Tom Marischen for their commitment to "doing the right thing"
regardless of division boundaries.
Arie Brish for reviewing many of the chapters, even over the holidays, for technical
accuracy. His responsiveness and willingness to "dig-in" and help resolve production
schedule crises made delivery of this work possible. Arie, should we have reserved this
acknowledgement for the next edition?
Francis Christian for sharing his field experience and insights, and for technically
reviewing some of the material.
James LeBlanc, former Motorolan, who left the "rat race" to obtain his PhD. and further
his already extensive knowledge of DSP. Despite a myriad of personal pressures, he
still managed to fulfill his commitment to Motorola and provide us with high quality
material for chapters four through seven (and then some!). Without his contributions,
this book would not have been possible. Now if we could just get him to stop listening
to "The Buzzcocks".
Steve Marsh, who mandated that this book be written, left for "greener pastures", and
thenstood back and watched the fun! Despite this, he and his wife Jackie most graciously
edited, proofread, and critiqued various versions of the manuscript.
Mark McQuilken, who deserves much more than a thank you for the enormous amount
of effort and time spent, much of it at his family'S expense, in authoring chapters one
through three, editing and reviewing all material, preparing figures and drawings, and
coordinating the whole project. His never-ending patience was much appreciated. And,
special thanks go to Mark's wife, Beth, for so graciously putting up with it all, and for
her help in editing some of the material.
Judy Racino, who got saddled, during the last two weeks ofthe production cycle, with
the responsibility to complete this work on-time. Her honest, clear-minded approach to
problem solving avoided many potential obstacles. She willingly spent many long hours
and did "whatever it took" (e.g., writing, editing, proofreading, going for sandwiches,
etc.) to deliver this book to the printer on-time.
Tanya Tussing, who spent untold time and effort in editing and reviewing, including the
removal of thousands of prepositional phrases, to ensure technical accuracy and under-
standability.
Brian Wilkie for his negotiating skills, financial and moral support of this project.
A "tip of the hat" to Tim Ahrens, Robert Chretien, Mark Glenewinkel, Mark Johnson,
and Craig Haller for helpful edits, suggestions, and moral support.
Special thanks go to Staats Falkenberg & Partners for their assistance with many of the
figures and for designing the cover art: especially to Jack Robberson for his willingness
to always help in tight situations and for being so very organized.
Admundson and Associates for providing the required last minute resources, and
especially to (Iast-but-not-least) Wendy Heath for her editing!layout skills, creativity,
shortened honeymoon, and for sticking with us to the end (well, at least the end of this
edition). Wendy, what time did you finish last night?!
PREFACE
Microcontrollers are signal processors. This may come as a surprise to some, but in the
strictest interpretation it's true: microcontrollers (rviCUs) are almost always used to
evaluate inputs (signals) from sensors and the like, then manipulate (process) the digital
form of those inputs and produce some relevant output. If you're like most of us
however, we don't think of MCUs when we think of digital signal processing (DSP).
That's probably because of two general misconceptiom: I) DSP may only be accom-
plished with ultra-fast processors that have been designed for the purposes of doing DSP,
and 2) you have to be a brilliant person just to understand DSP, let alone use it. This
guidebook will show that both of these are truly misconceptions.
The smaller geometries achieved by the semiconductor industry has made possi ble more
highly integrated microcontrollers; practically a full computer system on one chip.
Because of these advances in technology, digital signal processing (DSP) functions are
being integrated as part of the microcontroller. As a result of high integration levels and
diversity offunctions now available on a single chip, electrical engineers are becoming
exposed to areas that were previously covered by specialists. Digital signal processing
is a prime example.
This book is intended to help bridge the knowledge gap between the two technologies:
digital signal processors and microcontrollers. The target audience is design engineers,
programmers, technicians, and students who deal with embedded control applications,
but need to have a working knowledge of DSP concepts. Most digital signal processing
books are highly theoretical and focus on the mathematics behind DSP. The style of this
book is a little different - it is written in a more casual tone. We believe this type of
presentation will help the reader enjoy and understand the topics discussed.
Chapter Descriptions
Chapter 1 introduces the microcontroller in general, and in particular, discusses the traits,
and extols the space-and-cost-saving virtues of the Motorola MC68HC705C8 (C8). The
C8 is then used in a proto-typical application, a household thermostat, to illustrate an
MCU's usage in the "real-world". As part of this illustration, a noise problem is
hypothetically encountered which is resolved by having the MCU average the readings
coming from the Analog-to-Digital Converter (ADC). This averaging process is then
graphically developed into a "lattice diagram", a graphic device which displays the
process of traditional digital filtering. The rudiments of Analog-to-Digital conversion
and specific ADC types are then briefly presented.
Chapter 2 discusses the strengths and weaknesses of "doing things digitally" with MCV s.
The digital domain strengths are shown two ways: a) through the development of an
MCV-based magnetic tape noise reduction system, and, b) through the implementation
of an MCV-based "digital delay". Although both the noise reduction and delay units
have typically and traditionally been implemented using analog circuits, the digital
MCV versions are shown to be superior because of the inherent strengths of the digital
domain. The details, of each application, even including assembly code segments are
shown. This chapter is closed with a brief overview of the disadvantages of working in
the digital domain.
Chapter 3 shows the benefits and practical details of remapping our "oscilloscope-view"
of signals (classically referred to as the "time-domain") to a frequency response view
(classically referred to as the "frequency domain") for use by an MCV. This remapping
is accomplished by using the Fourier transform (FT). The FT is presented as a set of
paired signals (transform pairs; time domain and frequency domain versions of a given
signal) and a set of rules, including FT properties, rather than as mathematical manipu-
lations of the messiest kind. The transform pairs and rules are then used to review the
thermostat example of Chapter 1 as a digital filter. In addition, the Nyquist criteria for
digitally sampled systems and signal aliasing are "proven" by intuitively applying the
FT. The chapter is closed with a brief list of recommendations for continuing to learn
Digital Signal Processing.
Chapter 6 begins the discussion of digital signal processing with an emphasis, as with
previous chapters, on filtering. The moving average filter, like that of Chapter 1's
thermostat example, is presented along with the mathematics. The relationship between
this filter type and the digital version of convolution (the convolution sum) is defined.
A connection between the concept of impulse response and frequency response is
presented. By combining the impulse and frequency response concepts with the transfer
function, two classes of filter types are constructed which are expressed through the
lattice diagram and the "z -1" unit time delay. The last item covered in this chapter is a
characterization of the frequency response of a discrete time system.
Chapter 7 discusses the development of digital filters. A comparison between FIR and
IIR filter types is presented. This chapter is the culmination of basic signal processing
building blocks and requires some understanding of the topics in previous chapters.
Notes
Some micro controller prices are mentioned in this book. These are general price ranges
and not actual price quotes. If you are interested in obtaining prices for Motorola
microcontrollers, please contact your nearest Motorola sales office or Motorola author-
ized distributor.
Practical implementations of DSP theory sometimes requires a few extra steps, which
frequently are not included in this book. For more rigorous discussions of 1) all the
required assumptions about signals and systems for DSP theory to be true, and 2)
additional transfer functions that do front-end signal manipulations required for real-
time DSP functions, consult one or more of the books listed in our reference section (at
the end of this book).
Digital Signal Processing And The Microcontroller is a preliminary edition especially
developed as an educational tool and specifically to be part of the "HC16 Tool Kit."
Motorola plans to have future editions available, which will be published by Prentice-
Hall. We appreciate your constructive comments and suggestions. After reviewing this
guidebook, please take time to fill out the business reply card included with the kit and
return it to Motorola.
CONTENTS
Chapter 1
The Microcontroller
What is an MCU? 1-1
A Sample MCU 1-2
What A MCU Is Not 1-5
The Human Factor 1-7
ATypicalMCU Application 1-11
ADC Basics 1-24
Chapter 2
Digital Domain
TheAdvantages 2-1
Digital Domain Strengths 2-3
The MCU As Analog Circuit 2-10
HCIINR and Digital Advantages 2-11
A Perfect Solution 2-19
Chapter 3
Representation of Signals
Pulling It All Together 3-18
Digital Strengths Revisited 3-25
Averaging Filter Summary 3-26
Chapter 4
Fundamentals of DSP
Continuous Time Systems 4-1
Sinusoids and Spectra 4-1
The Frequency Description 4-3
The Sinusoid and Delta Function 4-4
Amplitude and Phase Description 4-7
Sinusoid Basis of Signals 4-14
Real and Complex Modulation 4-15
Frequency Shifting Properties 4-18
Imaginery Numbers 4-19
Chapter 5
Chapter 6
Chapter 7
major elements of a computer system. The MCU not only includes the central
processing unit (CPU), comprised of the arithmetic logic unit (ALU) and execu-
tion unit (EU), but the peripheral devices and memory arrays as well. The common
MCU peripherals and memories coresident with the CPU include such diverse
devices as:
• Analog-to-Digital Converters (ADCs)
• Digital-to-Analog Converters (DACs)
• Digital input/output lines
• H-hridge motor drivers
• Voltage comparators
• Math coprocessors
• Light-emitting Diode (LED) drivers
• Random-Access-Memory (RAM)
• Read-Only-Memory (ROM)
• Electrically-Erasable Programmable ROM (EEPROM)
• Electrically-Programmable ROM (EPROM)
• Timer/counters
• Watchdog timers
• Low-voltage detectors
• High-speed Synchronous Peripheral Interface (SPI)
• Universal Asynchronous ReceiverlTransmitters (UART)
This list is certainly not exhaustive and
changes almost weekly. It does, however, represent a good cross section of the
diversity of peripherals available on today's MCUs.
Typically, these peripherals and memo-
ries are not on a single chip; although this is technically feasible, each periph-
eral/memory adds more costs to the MCU. As we will reveal later, "an expensive
MCU" is an oxymoron like "jumbo shrimp."
1-1
Chapter 1 - The Microcontroller
, - - , - - . . _ PAl
Vpp PAS
PA5
PM
PAl
PA2
PAl
'---'--"~ P'"
, - - , - - . . _ PS7
PB6
PBS
PB4
P83
P82
PSI
'---'--"~ PlIO
, - - , - - . . - PC7
PCS
PC,
Pel
PC3
PC2
PCI
'---'--1'- PCO
~~~IP07
PO,
P04
PO,
PO,
POI
OSCI POO
OSC2~~bd
TCIAP
TCAP
Figure 1-1
C8 Block Diagram
1-2
Chapter 1 - The Microcontroller
1-3
Chapter 1 - The Microcontroller
peripheral was not really used in the old days, probably because CPUs
had their buses laid bare for the world to use. These buses could be easily
and directly connected to the peripheral, rather than through an inter-
mediate interface system like the SPI. Since a single-chip MCU is
self-contained when used as a single-chip, and the internal CPU bus is
not available to the off-chip world, there is a considerable benefit to
expanding I/O through such an SPI system.
• 16-bit timer subsystem. This system gives us the ability to time external
events relative to CPU activity as well as to generate events. This is
similar in function to a MC6840 Programmable Timer Module ... yes,
another old part and a 28-pin DIP.
Let's count up the packages we can
eliminate by using an MCU along with the type, size, pin count, and area each
package occupies. Table 1-1 contains this information.
Table 1-1
Multi-chip equivaleut of 68HC705 C8's peripherals
1-4
Chapter 1 - The Microcontroller
·--1
0.5 sq.ii
J
MCU CPU
Solution Solution
Figure 1-2
A comparison of areas required by like-functioned MCU and CPU systems.
1-5
Chapter 1 - The Microcontroller
1-6
Chapter 1 - The Microcontroller
An Engineering View
If you've been engineering for a while,
you know engineers never make mistakes. In fact, this may actually be Newton's
long-lost fourth law. In any case, whenever there is a schedule slip:
a) It's usually the technician's fault, and/or,
b) The MegaBug lO00X compiler/assembler keeps
randomly inserting HCF (Halt and Catch Fire)
opcodes in your code, and/or,
c) The purchasing department still hasn't placed the
part order you submitted a year ago last Tuesday.
Whatever the cause, the engineer always
has to modify the design at the last minute. Fortunately, one of the advantages of
MCU-based designs is they are easily modified. This is because, like most
computers, the bulk of the MCU systems' performance lies in its programming.
Consequently, from an engineer's perspective, the MeU is a hedge against
schedule slips from other people's screw-ups.
1-7
Chapter 1 - The Microcontroller
some Motorola MCUs. He worked very hard to design in an MCU at the core of
the power supply. His boss later pointed how much easier his job would have
been had he used an adjustable linear regulator, a potentiometer instead of an
MCU, and a half dozen other ICs and components. In all seriousness, the design
did have some advantages - the output voltage could be set under computer (PC
type) control by using the MCUs built-in serial interface. That's a feature we pay
a lot for these days in commercial power supply units.
Easy Prototyp,ing
Actually, the reason I mentioned this
power supply is to illustrate the MCU's usefulness to the engineer as a very
friendly and quick-prototyping environment. Even in the case of the programma-
ble power supply, the real value of that approach is to provide an experimental
platform for similar projects whose characteristics, such as rise and fall times,
could be quickly modified. This quick tum-around of ideas in solving problems
can make or break its success. During the early development stages of production
test stations, we would often use the Motorola EVM in conjunction with "experi-
menter's boards" to generate signals which looked similar to the device under test
(DUT). This allowed us to easily validate the performance of the production tester
with known, measurable excitation. It took us no more than an hour with this
approach compared to the time to do the same thing by wiring a bunch of counters
and gates together.
1-8
Chapter 1 - The Microcontroller
MCU
Figure 1-3
MCV drives LED directly
display. This eliminates the middleman, that is, the middlecircuit, consisting of
the MC14499 and its supporting components. Since the MCV software decides
the decoding sent to the display, characters appear that aren't supported by the
MC14499.
Despite the flexibility of the MCU in a
prototyping and brainstorming environment, don't throwaway all your non-MCU
components. There are some things other components can do that the MCU can't
- it's just the MCU may be the easiest, most flexible component in your bag of
tricks. Some feature or function implemented with the MCU, to one degree or
another, can replace each of the devices already mentioned.
Product Enhancements
1-9
Chapter 1 - The Microcontroller
Vpiezo
ID
MCU
Figure 1-4
Very often a product change means software change only
capacitors in lO,OOO final assemblies before shipping your product! An MCU can
avoid many, but not all, uncomfortable situations like this one: an MCU-based
unit could be easily removed and replaced with updated software without risking
any damage the to PCB/assembly. There are many other situations where
easily-altered MCUs can make a lot of cost-effective and face-saving sense.
1-10
Chapter 1 - The Microcontrolier
A To air conditioner
Vsensor~---'
B To heater
Figure 1-5
A Window Comparator
1-11
Chapter 1 - The Microcontroller
Vee
"Temperature Set"
To AC relay
Temp.
Sensor
To heater relay
Figure 1-6
A typical household thermostat circuit
of a thermostat is a metallic strip usually wound in a coil used as a lever
(contractor) in a single-pole double-throw switch. When the metal in the strip
contracts from the cold, the lever is pulled one direction toward another contact
point, which then completes a circuit and turns on the heat. The heat expands the
metallic strip, and the lever moves in the opposite direction completing another
circuit to tum on the air conditioner. Although this will vary from design to design,
this describes the basic operation of a mechanical thermostat.
When such simple mechanisms are so
reliable, an engineer must have many compelling reasons to use more complex
and costly circuitry. Or the engineer has to be just plain crazy. Jim Sibigtroth, the
original designer of an MCU-based thermostat, had some compelling reasons to
design such an application. The block diagram for this thermostat is shown in
Figure 1-7 .
1-12
Chapter 1 - The Microcontroller
Figure 1-7
An MeV-based thermostat
Basic MCU Thermostat Operation
The microcontroller (MCU) reads the
current room temperature through a solid-state temperature sensor whose output
is translated by an Analog-to-Digital Converter (ADC) for the MCU. The ADC' s
output is interpreted by the MCU's software to determine the appropriate action
for any temperature. Through a keypad, someone specifies the "trip points" that
define the "comfort zone" for the heater and air conditioner which is indicated by
liquid crystal display (LCD). The MCU acknowledges this operation through a
piezobuzzer.
Furthermore, the MCU' s serial interface
is made accessible to allow some debugging without affecting the entire assembly.
This is a very typical MCU application. Figure 1- shows the flowchart of the
main control program.
1-13
Chapter 1 - The Microcontrolier
MAIN
....
~~
~
'f
Timed out?
Yes
TIC =TIC+ 1
TIC = 20?
~
Yes
.....
2) Service Keypad
3) Service Beeper
Figure 1-8
Main Control Program for Honsehold Temperature Control
1-14
Chapter 1 - The Microcontroller
A Hypothermal Hypothetical
Let's say doing an MCU-based thermo-
stat appeals to your sense of HTF (High Toy Factor) and has enticed you to try to
build this thermostat project. So you send away to your area's Motorola sales
office for the M68HC05 Applications Guide (M68HC05AG/AD) that has the
details for the project. After painstakingly building the hardware, writing the
software, and installing the thermostat in your wall, you discover the thermostat
is acting strangely. At first, you're not even sure anything is wrong ... but then ... you
notice: it's December, you live in Alaska, and your air conditioner has just kicked
on! But you can to hook up your PC to the thermostat through a serial port and
RS-232 level-shifters. Consequently, you can debug the problem without having
to gouge the thermostat out ofthe wall. Fortunately, you are able to "look at" the
data from the ADC and thus can ascertain, at the very least, if the problem is a
malfunction with the temperature sensor or ADC. So, you set up your PC to take
readings for a 12-hour period and retire to your igloo with a few extra dogs that
night (a three-dog night, thanks to the air conditioner).
After a bone-chilling night of restless
sleep, you get up to compile and graph your data from the previous 12 hours. This
is the graph in Figure 1-. Being an astute observer, you notice two things: a)
the word "comfort" is misspelled due to your typing "i" instead of "0" because of
your hypothermally-induced shaking, and b) the readings from the sensor are
Too Hot--turn on AC
1-15
Chapter 1 - The Microcontroller
(most reJ;~Ts~~~~11-7 0
________
L-_ _ _ _
.---~
• 64 Bytes
•
TBUfEnd'I-- - - - - - - - 1
(oldest sample)L-----------'
1-16
Chapter 1 - The Microcontroller
*********************************************************
* A2D - Check temp. sensors (via SPI and MC145041) *
* If TIC 0, send addr 0 ignore return data *
* 1fT IC 1, send addr 1 ret urn dat a is ch. 0 va I *
* 1fT I C 2, send addr 2 ret urn dat a is ch. 1 va I *
* If TIC> 2, skip A2D routine *
* To compensate for sensor & op-amp offset, AID result *
* wi I I be modified by subtracting an offset constant *
*********************************************************
A2D EOU * Check temp. sensors
LOA TIC If Tic 0,1,or2writetoSPI
CMP #2
BHI XA2D 1fT i c > 2; Ex i t
ASLA Move TIC # 0-2 to upper nibble
ASLA
ASLA
ASLA 4 bit left sh i ft
TST SPSR Reads SPIF (part of SP1F clear)
BCLR 3,PORTC Drive low true SAID CEO to 0
STA SPDR Initiates a transfer
Figure 1-10
ADC routine for thermostat
1-17
Chapter 1 - The Microcontrolier
TimeBufr ------I
f-I
EJ·[___3
[=____1
Figure 1-11
ADC Samples memory locations
1-18
Chapter 1 - The Microcontroller
*****"'***************.*******"'*"*****************-*****"""'<****
*t!ane:LowPasi9
"'Use: poss lalest sample from ADC to this routine uio RCCA.
segPAGEORAM
TellpSllpl rnb 1
RccnSB I"lIIb 1
TellpCotc rnb 1
TimeBufr rmbM
TBufTop eQu'"
segProgran
1151' AccMSB
1'01'0
IsrAccMSB
l"orQ
lsI' AccMSB
"01'0
AvgDone I"t8
Figure 1-12
64-point moving average routine
1-19
Chapter 1 - The Microcontroller
*
I
~
I
Figure 1-13
Figure 1-14
1-20
Chapter 1 - The Microcontroller
T~
"
Figure 1-15
1-21
Chapter 1 - The Microcontroller
Figure 1-16
Lattice Diagram
1-22
Chapter 1 - The Microcontroller
Too Hot--turn on AC
w
a:
::I
~
W
a..
:E
w
I-
WithoutAverating
Too Hot--turn on AC
COMFORT ZONE
WithAveraging
Figure 1-17
Thermal sensor before and after averaging routine
program a new RC05 with the improved software, and then trade the socketed
MCV for the new version. Compare this to pulling the thermostat out of the wall,
desoldering discrete components, and spending untold hours changing resistor-
capacitor values until the problem disappeared. Granted, you have to know about
software, but the ease of working in the digital domain justifies the effort to
becomes fluent with this software stuff.
1-23
Chapter 1 - The Microcontroller
1-24
Chapter 1 - The Microcontroller
Ih
I
I
fm1
Figure 1-18
Sampling an Analog Signal with Sample and Hold Amplifier
Vet) = Asin(21tft)
1-25
Chapter 1 - The Microcontroller
inputs to the comparator are equal, the analog voltage generator stops and the
digital code associated with the internal analog voltage generator at that moment
represents the analog signal. Let's see how this mechanism is applied with the
various converters.
IntegratingADC
Another popular converter used for
much slower but typically much higher resolution conversions is the integrating
type converter. This converter applies our generalized converter form in a unique
way: it substitutes a charging capacitor for the DAC of our generalized ADC. The
capacitor is charged by the input signal voltage and discharged by a constant
current source. The time it takes for the voltage ramp, created from discharging
the capacitor, to reach zero voltage is directly proportional to the analog input
voltage that originally charged the capacitor. The linear voltage ramp is timed by
a digitally clocked counter until reaching zero, at which time the digital counter
stops. The resulting count shown by the counter is directly proportional to the
input voltage. This type of AID process is good for 10 Ilsec or higher conversion
times and resolutions typically in the 18- and 20-bit range.
Flash Converter
Another conversion process is the
''flash'' converter, which uses a string of voltage comparators. Each comparator
has one input tied to successively increasing reference voltages. The input voltage
is applied to all of the other comparator's inputs that have all been tied together.
The outputs of the comparators are sent through a digital logic array to produce
1-26
Chapter 1 - The Microcontroller
a convenient output code as a function of the input voltage. Let's say we have
three voltage comparators. The comparator's individual inverting inputs are
connected to 1.2SV, 2.5V, and SV, respectively, so the comparators are referenced
to 1.2SV, 2.SV, and SY. Let us then apply our input voltage to the other input. If
the input voltage is less than the reference voltages, none of the comparators will
trip. Once the input voltage increases above 1.2SV, the comparator having the
1.2SV reference will change from logic 0 to logic I. The other comparators will
remain unchanged until the input voltage rises above their respective reference
voltages. Because its performance depends primarily upon the comparator's
response speed, the flash converter is very useful for high-speed concertinas.
1-27
2
CHAPTER
The Digital Domain
2-1
Chapter 2 - The Digital Domain
in temperature. Such analog circuit traits are manageable, but ifwe can reduce
drifting parameters, then let's do it. With any carefully implemented digital
domain design, sources of parametric drift are eliminated completely within
specified error bounds.
Unnatural Responses
We have assumed the digital pot example
is just a straight translation of the analog pot function. Another advantage of the
digital domain is the ability to achieve "unnatural" responses including extraor-
dinary analog-like responses. The word "unnatural" in this case is meant to imply
a system response not easily implemented with analog components. So, even
though a single $1 pot could replace our more expensive digital example, would
the analog pot be an equally good solution if there were additional "unnatural"
performance criterion? That depends on what it is. If the analog pot must respond
to the commands from a personal computer (PC) via its RS-232 port, which of
the two makes sense? Right, our digital pot. An analog pot doesn't to respond to
your Pc.
2-2
Chapter 2 - The Digital Domain
2-3
Chapter 2 - The Digital Domain
2-4
Chapter 2 - The Digital Domain
Danger of tape
saturalionatlower
levels'causeol~
boosledhighs.
~+12 o~
O~
2.5 kHz 10 kHz
PRE-EMPHASIS FILTER
I I\ I
2.5 kHz
~~2
10 kHz
DE-EMPHASIS FILTER
Audio Audio
highs highs
boosted boosted,lapehiss
normal
Audio
Audio In--to tape highs
normal,tape hiss
reduced
Figure 2-1
Tape Noise Example
2-5
Chapter 2 - The Digital Domain
frequencies of our signal during recording and playback. While compressing the
signal during record to avoid premature distortion, we use the complement of
compression, called expansion, to restore the original signal's dynamic range on
playback.
Encode/Decode NR System
Figure 2-2 shows a block diagram for
implementing an encode/decode type of tape noise reduction (NR) system. Within
the box marked "process" is the compressor and preemphasis filter to encode the
signal going to the tape. This system view of the NR system allows you to see the
actual mechanics of how the NR works without getting bogged down in the details.
Basically, the process block produces a known output, a(t), when presented with
the signal, s(t), that we want to record. The signal that actually gets recorded onto
tape, however, is the sum of these two, that is, a(t) + s(t). During playback, we
change the configuration slightly of the process and summing amplifier. The point
of the decode process is to retrieve the original unencoded signal s(t). By inverting
the phase of the process block and taking its input from the output of the summer,
we get a decode process that is the mirror image of the encode process and that
strips the encoded part of the signal, a(t), from the signal stored on the tape.
Remember, the process function produces a(t) if s(t) is presented at its input. It is
also true if s(t) is at the output of the summer and the phase of the process is
inverted that the system-level equations work out:
ENCODE PROCESS
~ O'-----Proce_ss~~ .,.,"
DECODE PROCESS
Figure 2-2
EncodeIDecode Tape Noise Reduction
2-6
Chapter 2 - The Digital Domain
log(vin )
Linear-ta-Log Converter
f-
iF-
RMS·to-DC
-
I
•
--- ~
0----/1+12
r- -----<
500 12 kHz
2.16
+
1 to
from
SOURC E T APE
Figure 2-3
Noise Reductiou Encoder Detailed Block Diagram
2-7
Chapter 2 - The Digital Domain
Performance Requirements
After identifying the key concepts for a
noise reduction system, I established a set of performance standards for the NR
system. They were:
• The NR system will have the lowest possible cost, specifically, less than
$25 per channel.
The NR Prototype
The analog-based prototype has two
noteworthy features: an RMS-to-DC converter, with built-in logarithmic output
for driving the VCA, and a thermal tracking resistor. The resistor is required to
keep the RMS-to-DC converter's output voltage from drifting.
2-8
Chapter 2 - The Digital Domain
NR Implementation Problems
2-9
Chapter 2 - The Digital Domain
2-10
Chapter 2 - The Digital Domain
--
12 PC3
13 PC4
14 PCS MC68HC11A1
15 PC6
16 PC?
17 Resel\
18 XIRQI
191RQI
JJ,:')~
20 PDO
f---
RMS-to-OC
Figure 2-4
68 HCll Can Replace Both the RMS-TO-DC
Chip and the Linear Log Weighting
e) Flexible performance.
2-11
Chapter 2 - The Digital Domain
2-12
Chapter 2 - The Digital Domain
I
ITOw)1 =
11 • 'wRCI
J =
-J (1)' + (·jwRC) 2
= 1
11+jwRCI -J(1)'+OWRC) 2
Figure 2-5
All Pass Filter
2-13
Chapter 2 - The Digital Domain
7 0 7 0
"A"IIIIIIIII.a ~.IIIIIIIII
a) Move data from
"A" DAC.
location to
• b) Move data from
ADC
to location "A".
Figure 2-6
Single Stage Delay
2-14
Chapter 2 - The Digital Domain
7 o
\• • • •
7 o o 7 o o
w ~
~
samples ~ .,
Figure 2-7
Longer RAM Buffer is Used to Achieve Longer Delay
2-15
Chapter 2 - The Digital Domain
**************************************************************
* Name: Ti meOe I ay
*
* Purpose: To illustrate a 61 sample digital delay,
*
**************************************************************
w PRGEORRM
7 o
TempSmp I rmb I
TimeBufr rmb 64
TBufEnd equ *
se8 Program
•
Ti meDe I ay sta TempSmpl
Ida TBufEnd
;this contains the latest
; ROC !amp Ie, Save it,
; Get very last samp Ie,
•••
MoveSmp I s
sta
I dx
Ida
sta
dex
ORC
ITBufEnd-1
O,x
I, x
;Send it to ORC,
;start moving data from here,
; get samp I e
; move it down t he line,
TBulEnd_
cpx 'TimeBufr-1 ;check for latest sample location,
bne MoveSmp I s
inx ; leave x point ing to TimeBufr
Ida RDCResu I t
sta O,x ;put latest result into buffer,
rts
Figure 2-8
Implementing Digital Delay Line with 68HCOS
2-16
Chapter 2 - The Digital Domain
1430Q
Q 01~F
2740Q
100 kQ 10.0kQ
.01 ~F
1---.--1+
10.0 kQ
2150Q
Figure 2-9
100 Ilsec delay all-pass filter
2-17
Chapter 2 - The Digital Domain
1, and the right side is the averaging routine from our discussion on filtering
thermostat data. The heavy-lined rectangle highlights the common code segments
between the time delay routine and the averaging routine. The time delay code is
exactly duplicated in the lowpass filtering routine. Time delay is an important
and integral part of the filtering process.
**************************************************************
* Hame:TimeDelay
*
* Purpose: To illustrate a 64 sample digital delay.
*
**************************************************************
seg PAGEORAM
TempSmpl rmb
TimeBufr rmb 64
TBufEnd equ *
seg Program
Ida ADCResuit
st a 0, x j put Iat est resu Itint 0 bu ff er.
rts
Figure 2-10
Time Delay is an Integral Part of Averaging Data
2-18
Chapter 2 - The Digital Domain
2-19
Chapter 2 - The Digital Domain
2-20
3
C HAP T E R
The Representation of Signals
3-1
Chapter 3 - The Representation of Signals
3-2
Chapter 3 - The Representation of Signals
of time domain signals. For example, my stereo, if excited with a 50 hertz sine
wave of .775 Vrms, will put out a 50 hertz sine wave of such-and-such size.
Imagine doing this for a collection of sine waves of various frequencies. It might
look something like Table 3-1.
Table 3-1
1.0
0.9
0.8
0.7
en
::2; 0.6
es 0.5
gJ
0 0.4
>
0.3
0.2
0.1
0.0
10 100 1000 10000 100000
Frequency (in Hertz)
Figure 3-3
Frequency Plot of a Stereo Amplifier
3-3
Chapter 3 - The Representation of Signals
fx= 5kHz
3-4
Chapter 3 - The Representation of Signals
Figure 3-6
Low-pass Frequency Response of Thermostat
Averaging Filter of
3-5
Chapter 3 - The Representation of Signals
3-6
Chapter 3 - The Representation of Signals
The Impulse
An impulse is a concept represented by
a vertical arrow:
f
The impulse is a periodic event the con-
verter uses to initiate taking a sample of the incoming analog wave form. It also
can represent a sample clock, like that used by the ADC process. Actually, a single
impulse is not used to model the ADC, but a "train" of impulses is used. The train
of impulses is usually regarded as stretching infinitely in time. Two useful
characteristics of these impulses are:
1) The magnitude can be 1, and when multiplied by
the input signal gives us a rudimentary under-
standing of the process of digitally sampling ana-
log signals.
2) Also, the time-based infinite train of impulses
gives us a corresponding infinite train of impulses
in the frequency domain, and the distance between
impulses is given by the inverse relationship
f=I!f, where "f' denotes the frequency and "T"
the period of the time signal.
Looking at this graphically as in Figure
3-7 , we see as the distance in the time-based train of impulses is decreased, the
distance of the frequency-based train of impulses increases. Conversely, as the
distance between the time domain impulses increases, the distance between the
frequency domain impulses decreases. The importance of this characteristic will
become evident shortly. Keep it in mind.
3-7
Chapter 3 - The Representation of Signals
~
I-- 31.---J
...
":1 t
!
t... ..
i
j f4- ~T
4 t t t t t t t t f: t
• i
1--.57T --I I-- 1.751 0
Multiplication
Earlier we discussed the frequency re-
sponse of a stereo system. We went through a brief exercise of multiplying a
frequency response by a rectangular shape. We just discussed how mUltiplying a
train of impulses by an analog signal models the process of sampling that signal.
Based on just these two scenarios, the process of multiplication in either the time
or frequency domain is useful. But are they really the same thing? That is, is
multiplication in the frequency domain the same type of multiplication in the time
domain? Let me say definitively: yes and no. An explanation is in order.
The mechanics of multiplication are the
same regardless of the domain you are working in. The same old multiplication
you and I have been doing for many years now is implemented the same in either
domain. That is not to say if we multiply something in one domain we are also
simultaneously mUltiplying in the other domain. On the contrary. Remember we
are using the FT to go between the time and frequency domains. Because of this
mapping process, multiplication in one domain translates into a different opera-
3-8
Chapter 3 - The Representation of Signals
tion in the other domain, just as adding in the log domain results in multiplication
in the linear domain. The results are always the same. It's just that the steps, or
mechanics of the processes are different depending upon which domain you are
working in.
Convolution
If you derive an output in the time do-
main by multiplying a signal by a function, what is the equivalent operation used
on that signal and function in the frequency domain? It's called convolution. If
you applied convolution to an input and a function in the time domain, what is
the corresponding operation used in the frequency domain? It's multiplication.
In DSP lingo:
y(t) = x(t) * h(t) => Y(f) = X(f) * H(f)
and
3-9
Chapter 3 - The Representation of Signals
.... l . . . . t . . . . J"""
,
Figure 3-8
Rectangular Pulse (a) and a Train ofImpulses (b)
Figure 3-9
Convolution of Fig. 3-8 (a) & 3-8 (b)
3-10
Chapter 3 - The Representation of Signals
.. ...tlttttltt~tttt!ttt ..·~
",
~
Figure 3-10
A sine wave (a) and a train of impulses (b) to sample it
ft
Figure 3-11
The Sine Wave of Fig. 3-10 Multiplied by a Train of Impulses
n n
II nil nil
Ii' ...J I I I ..J III
I III IIIIII IIIIII
I I I I II II I I I I
IIII IIII
U II UII
w
3-11
Chapter 3 - The Representation of Signals
3-12
Chapter 3 - The Representation of Signals
3-13
Chapter 3 - The Representation of Signals
f
Figure 3-15
The Fourier Transfonn of a Sine or Cosine Wave
3-15
Chapter 3 - The Representation of Signals
Figure 3-16
DC and Its Spectrum
3-16
Chapter 3 - The Representation of Signals
3-17
Chapter 3 - The Representation of Signals
3-18
Chapter 3 - The Representation of Signals
3-19
Chapter 3 - The Representation of Signals
Figure 3-17
An Imagined Output of a Thermal Sensor Plus Noise (60Hz)
10 20 30 40 50 60 70 80 90 100
Figure 3-18
Spectrum of Thermal Sensor Output Plus Noise of Fig. 3-17
3-20
Chapter 3 - The Representation of Signals
.... F
has been defined, the signal must be digitized. In this case, we will use a sampling
rate 10 times greater than the frequency of the 60 Hz sine wave. Remember,
I I I I I t I
10 203040 50 60 70 80 90 100 F
I I I ~
Figure 3-19
A 60 Hz Sine Wave and Its Spectrum
3-21
Chapter 3 - The Representation of Signals
_~]]lllllllllllllllilli
Figure 3-20
Digitally Sampled Thermal Sensor Output
We'll call this TempNnoyz(nT). Notice
the use of "nT" to distinguish the signal's sampled timebase from the continuous
time designation of "t." What does the spectrum of this digitized function look
like? You are correct if you guessed the composite function of Figure 3-18
duplicated wherever there is an impulse in the frequency domain. This function
is Figure 3-21 and occurs because time domain multiplication translates to
frequency domain convolution. And convolving a wave shape by a train of
impulses duplicates the wave shape everywhere there is an impulse. To sample
TempNnoyz(t), we multiplied it by a train of time domain impulses which resulted
in TempNnoyz(nT). The frequency domain translation of this time domain activity
is to convolve the FT TempNnoyz(t), which is given by TempNnoyz(f), by a
frequency domain impulse train. This process of sampling translates the continu-
ous time function into a stream of numbers. We then need to feed these into the
process represented by the lattice diagram. Let's look at the lattice diagram we
developed earlier:
t+ L t+..,
Figure 3-21 Figure 3-22
Spectrum of Sampled A Lattice Diagram
Sensor Output
3-22
Chapter 3 - The Representation of Signals
Figure 3-23
Representation of Lattice Diagram Coefficients as a Sampled Rectangular
Pulse
3-23
Chapter 3 - The Representation of Signals
Figure 3-24
Spectrum of Sampled Rectangular Pulse of Fig. 3-23
-'.
Figure 3-25
Sinc Function Low-pass Filter
Figure 3-26
Ideal Low-pass Filter Frequency Response
3-24
Chapter 3 - The Representation of Signals
Figure 3-27
Multiplying Thennal Sensor Output Spectrum (Plus Noise) by Sinc Func-
tion Results in Reduced Noise Component
3-25
Chapter 3 - The Representation of Signals
3-26
Chapter 3 - The Representation of Signals
3-27
C HAP T E R
Fundamentals of DSP
4
T he purpose of this chapter is to
. present some basic concepts
needed for the use and apply Digi-
tal Signal Processing (DSP). The presentation of this chapter may be different
than the reader is accustom to. I have attempted to present topics through the use
of arguments and concepts. Mathematics is omitted where verbal and graphical
presentations may better convey an idea. For more in-depth applications, you are
directed to one of several texts on the subject.
4-1
Chapter 4 - Fundamentals of DSP
manner and as a tone, tells us how fast or how often it is moving. This is an example
of the frequency domain description of the signal. Both the time and frequency
domain descriptions accurately described the phenomena. To understand digital
signal processing, we will need to accept, understand, and use the two different
yet intimately related descriptions of signals in the time andfrequency domains.
4-2
Chapter 4 - Fundamentals of DSP
Figure 4-3
4-3
Chapter 4 - Fundamentals of DSP
4-4
Chapter 4 - Fundamentals of DSP
Area under
1 ------
spike = 1
<=>
~ ' - - - v - ... f
zero zero
Figure 4-6 Sine Figure 4-7 Spectra
Wave with
Area under
spike = 2
<=>
'---v-' ' - - - - - v - - ....... f
zero zero
4-5
Chapter 4 - Fundamentals of DSP
with a square (base = 1, height = 1, thus area = 1 x 1). Notice that for each
successive rectangle we have shortened the base and are forced to increase the
height in order to maintain a total area of one. It is in our interest to continue this
process until our rectangle is so narrow that its base is zero. How tall would the
last rectangle have to be to maintain its area of one? In a rough sense, it would
have to have infinite height to make up for its zero width.
Area = 1
I
~}
AREA
~
base = 1
he;ght _ 1
W
A
E
A
-
base
he;ght _
1
= 2'"
2
base
1
= 4""
f
base
he;ght-oo
= 0
Figure 4-10
Delta Function has zero width, infinite height, and area one
If we place the last rectangle on an axis, we
can consider this as a function that was zero everywhere except at a certain point
where the area under the curve is one. This is precisely the Delta function.
4-6
Chapter 4 - Fundamentals of DSP
4-7
Chapter 4 - Fundamentals of DSP
Figure 4-14
Figure 4-13
A: ~~ x(i)
~~ <->
--~--- -
Phase
I.
Figure 4-15
Figure 4-16
B:
~_u<=>'(fj
Phase
c: x(i)
~~
---~I
---<=> Phase
4-8
Chapter 4 - Fundamentals of DSP
Importance Of Phase
If the previous description of phase is any
indication, the concept of phase doesn't seem too difficult, then why is it so
misunderstood? The difficulty doesn't begin with the phase, but with the question
of when does t = O. Viewing Figure 4-13, it is easy to know when t = O. Simply
look at the plot, point to where t =0, and you have it. Look at the dial tone example
in Figures 4-21 through 4-23. Let's define t =0 as the exact moment you pick up
the receiver. When the receiver is picked up you can "look" at the waveform,
determine its phase as shown in the figures, and complete the amplitude, phase
and frequency descriptions. Sometimes it can be picked up exactly when the
waveform equals zero and increasing (0 degrees phase, Figure 4-21), and other
times when it equals one and decreasing (90 degrees phase). Simple enough?
Suppose someone left the receiver off the hook before you arrived. You are asked·
to give the waveform description as before. How do you determine the phase?
Well, you can't. Sometimes phase doesn't matter, ~only the amplitude and
frequency are important.
Xa
Figure 4-21
Xc
Figure 4-23
4-9
Chapter 4 - Fundamentals of DSP
Relative Phase
... J K7
Figure 4-24
... ~ ...
Figure 4·25
...~
Figure 4-26
....
4-10
Chapter 4 - Fundamentals of DSP
Figure 4-27
... -----...;....------
Figure 4-28
By now, you've had it with sinusoids, phase, etc. What has this all have to do with
DSP? It is time for a technical teaser, a simple concept that is at the very root of
filtering (including digital filtering). It also starts us thinking about the interplay
between time and frequency. Consider Figures 4-29. The sinusoid shows a phase
equal to zero (solid line). Also found is a delayed version of the same (dotted line).
The time delay between the two is "t" seconds. We can visually estimate the
relative phase between the two to be approximately 3/4 1t (about 120 degrees).
Let's add the delayed version to its original and look at the output. Notice the
amplitude has been effected. The original and delayed amplitude both had an
amplitude of one, but their sum has a smaller amplitude.
amplitude of the result is different from the inputs (Figure 4-32). But more
importantly, we see the resulting amplitude is different from that offigures 4-30.
Chapter 4 - Fundamentals of DSP
Fig u re 4-30
Figure 4-29
1t •••••••••••••••••
LlO=2
Input
L .. d::>-Output
I Delay ~
4-12
Chapter 4 - Fundamentals of DSP
Frequency Descriptions
We have been adding signals of the same
frequency to each other without a problem. Let's investigate two signals of
different frequencies. Figures 4-33,4-35, and 4-37 show signal A, alowfrequency
sinusoid, added to B, a higher frequency sinusoid, to produce C which exhibits
sinusoids of both frequencies. The time domain plot of C visibly shows the two
frequencies. The large amplitude-slow fluctuations are due to A, while the small
and fast fluctuations are due to signal B. The frequency domain representations
may also describe the phenomena here Figures 4-34 through 4-36).
r\A
Xa(t)
A:
Figure 4-33
<=>
11------Figure 4-34
---i~
Xh(t)
B:
r---
Figure 4-35
<=>
J----.--Figure 4-36
f--
Xc =Xa +Xb
c: r'tFtFigure 4-37
<=> LL-L- Figure 4-38
.1'~
D:
. .ft;r~J\:. <=> Jlt,tcu ___._
Figure 4-39 Figure 4-40
4-13
Chapter 4 - Fundamentals of DSP
Figure 4-1
4-14
Chapter 4 - Fundamentals of DSP
4-15
Chapter 4 - Fundamentals of DSP
Xa(t)
t time
t frequency
t
time frequency
Xc = Xa(t) * Xb(t)
---Ih /\ /---
V~~
time
1
frequency
Figure 4-44
Figure 4-45
Xg(t)
Xi=Xg 'Xh
r"=7c=:==-,'C:7-==----'C7c='\" <=>
Figure 4-46
4-16
Chapter 4 - Fundamentals of DSP
Real Modulation
The mathematical basis for exactly how
the frequency is affected is given by the trigonometric identity found in at the
bottom of the page. However, even without using the identity, we can visualize
some of its qualities. We start with two sinusoids of frequency f and 3f Figures
4-47 through 4-52. These two are multiplied together. Notice the resulting wave
looks a bit different, it doesn't really match either of the original two waves.
Take a closer look. Its not too hard to
imagine that within the resulting wave we see something happening twice as often
as f and maybe something else happening at four times as often as f. Just for grins,
let's plot waves with frequencies of 2f and 4f. As a check, we added the waves of
f = 2 and f = 4 and verified their sum to be the same as when we multiplied waves
withf= 1 andf=3.
~1\1[\/\J[\I\A
Figure 4-49 Figure 4-50
4-17
Chapter 4 - Fundamentals of DSP
tz-Jl
I ~f I, t I >
Figure 4·54
Figure 4·53
tz+Jl
tz
v···t·····"'1 ~ II t ~
~ Signal with f2
Figure 4·59
4-18
Chapter 4 - Fundamentals of DSP
Q: What is 2i + 3i ?
A: 5i.
Q: What is 5i . i ?
4-19
Chapter 4 - Fundamentals of DSP
A: Add the real parts together and add the imaginary parts together to get 6+4i.
=8 + 6i + 4i + 3i 2
=8 + 10i + (-3)
= 5 + 10i
The letter z is often used to denote a
complex variable. Further convention uses x to represent the real component and
y to represent the imaginary component (foreshadowing?):
z =X + iy
Real(z) =X
Imag(z) = y
-----7
Figure 4-60
4-20
Chapter 4 - Fundamentals of DSP
Figure 4-61
Figure 4-62
4-21
Chapter 4 - Fundamentals of DSP
Euler's Formula
Also remember:
I·0 =1, ·1
I
.
= I, ·2
I =-1, I·3 =-I,. ·4
I =1, I·5 =I. ...
4-22
Chapter 4 - Fundamentals of DSP
Z= x+ jy
but,
X= ICOS(<1»
Y= fSin(<1»
so,
Z = r [cos(<1» + i sin(<1»]
\/ eH
Since,
Then,
4-23
Chapter 4 - Fundamentals of DSP
Figure 4-63
Figure 4-64
4-24
Chapter 4 - Fundamentals of DSP
Figure 4-65
Figure 4-66
Figure 4-66
4-25
Chapter 4 - Fundamentals of DSP
Figure 4-67
Figure 4-68
Figure 4-69
4-26
Chapter 4 - Fundamentals of DSP
cos(2rrJt) = [ 2
l
ei2.1tf + e-i2.1tf
ei2.1tf - e-i2.1tfj
sin(2nft) = j ( 2
Figure 4-70
ei2.1tf + e-i2.1tfj
cos(2nft) = ( 2
4-27
Chapter 4 - Fundamentals of DSP
but t=O,
cos(O) = (
eiO +
2
e-iOj
So one phasor is at eiO (but e iO=l) and
the other is at e -iO (but e- iO=l), so plotting these phasors we have the following:
Figure 4-71
4-28
Chapter 4 - Fundamentals of DSP
4-29
Chapter 4 - Fundamentals of DSP
1
cos(x) cos(y) = 2 [coS(X- y) + cos(x+ y)]
[~~e--) ["'Y~e-"Y)
mUltiplying term by term,
rearranging,
1
2[COS(X + y) + cos(x - y)]
t t
4-30
Chapter 4 - Fundamentals of DSP
r_ -1" _
Figure 4-74
4-31
Chapter 4 - Fundamentals of DSP
{r=:J
j
Figure 4-75
!
Figure 4-76
4-32
Chapter 4 - Fundamentals of DSP
figure 4-77 we can see that there is the same amount of positive area above the x
axis as there is negative area below the axis. These two are equal; however,
opposite sign areas cancel each other. The integral of the sinusoid's cycle is zero.
We can extend this reasoning for a sinusoid that continues to infinity. Still there
are equal positive and negative areas that cancel each other; thus, the integral of
the infinite sine wave is zero. Notice, that this result is true regardless of the
frequency, amplitude or phase of the sine wave. All infinite duration sinusoids
have an integral of zero.
Figure 4-77
t
Figure 4-78
Area
4-33
Chapter 4 - Fundamentals of DSP
F[x(t)]
8~0
Figure 4-79
4-34
Chapter 4 - Fundamentals of DSP
~y ~~
~ ~
Figure 4-80
4-35
Chapter 4 - Fundamentals of DSP
Figure 4-81
Figure 4-82
4-36
Chapter 4 - Fundamentals of DSP
X(f) = F[x(f)]
X(~ = f ctoo
x(f) e-j2rcft dt
x( f) e-j2rctt dt
4-37
Chapter 4 - Fundamentals of DSP
,,
,,
,,
,,
,,
,,
Figure 4-85
Figure 4-86
4-38
Chapter 4 - Fundamentals of DSP
Figure 4-87
I I
>1 I I
4-39
Chapter 4 - Fundamentals of DSP
know that by rule number one that the modulation shifted the spectra of x(t) by
f=3. So that the DC component ofx '(t) is the f=3 component of the original x(t).
Thus, we can now fill in the point on the spectral plot for f=3.
X(O)
X(O)
-ccc:--+-,-+, +~-+-,_t!---+~--1TL-/~'- __
,.
Figure 4-88
lDIII'I,,.
Figure 4-89
-,----------
Figure 4-90 Entire spectrum of x(t)
4-40
Chapter 4 - Fundamentals of DSP
4-41
Chapter 4 - Fundamentals of DSP
1 ·f+co 1+=
= 2" eJ<l> -co 1 dt+ 2" f_ cocos (21tft + <1» dt
1+00
f
+ 2" _=sin(2nft + <1» dt
4-42
Chapter 4 - Fundamentals of DSP
1 +00 1
X(t) = - ej$f 1 dt= - e j$ ;1(+00) - t(-oo) = 00 for f= fc
2 -DO 2
1 . +00 1·
+ - e-1$f 1 dt= - efCP ;1(+00) - t(-oo) = 00 for f= -fc
2 -00 2
1
-!c
1
Ie
Figure 4-3
4-43
Chapter 4 - Fundamentals of DSP
sin(2nft) = ??
Figure 4-91
r ,n
-}-
,n
}-
l
_I !!_~§(f- fc) + e 2 8(f+ fc) 1
-L 2 J
4-44
Chapter 4 - Fundamentals of DSP
jy
Figure 4-92
jy
Figure 4-93
4-45
Chapter 4 - Fundamentals of DSP
4-46
Chapter 4 - Fundamentals of DSP
mag
.11
t t
4-47
Chapter 4 - Fundamentals of DSP
Duality
A quick note on a concept that can save us
tim. This concept is called duality.
+00
F[x(t)] = f x(t) e-j2rcft dt= X(fJ
F- 1[X(fJ] = f
+00 .
X('> e J2rcft df= x(t)
Now, not only is the above true, but now we also have:
and
4-48
Chapter 4 - Fundamentals of DSP
4-49
Filters and Transfer Functions
C HAP T E R
5
W e briefly mentioned (signal)
filters earlier. The signal filter
in concept is no different than
Filters and
Transfer
Functions
a coffee filter or an oil filter. A coffee filter lets the coffee through but filters out
the grinds. A signal filter lets some components of the signal through but filters
out the other components of the signal (hopefully the noise.) But let's make it a
little more formal.
A signal filter (from now on called a filter)
is typically drawn as a box (Figure 5-1). By conventionx(t) represents the filter's
input signal, y(t) the output signal. The filter is described by a function that is
usually given the letter h(t). Filter impulse response is the name given to h(t) .
...Y(t)
x(t) h(t)
input Filter output
x(f)
input
H(f)
Filter output
5-1
Chapter 5 - Filters and Transfer Functions
XCD
input
11(1)
Filter
YCD = HCD XCD
output
-
Figure 5-3
Y(f)
H(f)=-
X(f)
5-2
Chapter 5 - Filters and Transfer Functions
- - - - -.~1
l. H(Q ?
YCf)
..
HCf) • 1 = HCf)
t
Determination of H(f)
Figure 5-4
[~(f)-;---:'=-; iW·
___ l
------~-~IL___H_Cf_)_~_- _ _____ ~--------
:a
---::::.=--=:.. •. i-::..:::·
Determination of h(t)
Figure 5-5
5-3
Chapter 5 - Filters and Transfer Functions
Y(f) = H(f) X(f) let's take the 1FT (Inverse Fourier transform)
5-4
Chapter 5 - Filters and Transfer Functions
by definition, we get:
so rewriting we have,
rewriting again,
now let's relate t' and t by 't = t - t', substitute and rewrite
5-5
Chapter 5 - Filters and Transfer Functions
Figure 5-6
5-6
Chapter 5 - Filters and Transfer Functions
Figure 5-8
Figure 5-7
T I r r1
Figure 5-9
5-7
Chapter 5 - Filters and Transfer Functions
Figure 5-10
Figure 5-11
Argument #3) Without explicitly stating it, we assumed our discussion is based
on linear time invariant systems. (Non-linear systems and their analysis can get
quite complicated and are beyond the scope of this book.) What linear means to
us is a linear system that has the property that "the sum of the input components
produce an output equal to the sum of the outputs if the individual components."
This is known as superposition. Pictorially it is simple:
5-8
Chapter 5 - Filters and Transfer Functions
xa(t)
·1 h(t)
Ya(t)
~
Figure 5-12
Xb(t)
·1 h(t)
Yb (t)
~
Figure 5-13
Figure 5-14
5-9
Chapter 5 - Filters and Transfer Functions
-1 h(t) ~
x(t) ~
Figure 5-15 Figure 5-16
Figure 5-17
Figure 5-18
5-10
Chapter 5 - Filters and Transfer Functions
Figure 5-19
5-11
Chapter 5 - Filters and Transfer Functions
This means the output signal yet) is the collection of the outputs of each of the
impulse inputs. (Since again we've got an infinite number, we'll get an integral.)
Voila, the convolution integral. In spite of
the looks of this integral equation, it really does make sense.
Duality Revisited
5-12
Chapter 5 - Filters and Transfer Functions
t t t t
\
t t t t
Figure 5-21
5-13
Chapter 5 - Filters and Transfer Functions
Figure 5-22
Figure 5-23
Figure 5-24
5-14
Chapter 5 - Filters and Transfer Functions
Figure 5-25
Figure 5-26
5-15
Chapter 5 - Filters and Transfer Functions
Figure 5-27
5-16
Chapter 5 - Filters and Transfer Functions
\
Figure 5-28
Figure 5-29
5-17
Chapter 5 - Filters and Transfer Functions
Realistic Filters
I Figure 5-30
Figure 5-31
5-18
Chapter 5 - Filters and Transfer Functions
things as phase response, overshoot, etc. Fine, but I will still call the above
parameters the basic filter design parameters.)
Passband Edges
/{
Passband Ripple
Stopband Edges
Figure 5-32
5-19
Chapter 5 - Filters and Transfer Functions
5-20
Chapter 5 - Filters and Transfer Functions
X(j) = F(sin(2nft»
Figure 5-34
Figure 5-33
Figure 5-35
More On Windowing
5-21
Chapter 5 - Filters and Transfer Functions
a.m.
8:21 a.m.
Figure 5-36
~I
Figure 5-37
5-22
Chapter 5 - Filters and Transfer Functions
wet),
\.10 1 i
Figure 5-38
Xbc(t)= w(t)·s(t)
Figure 5-39
S(f)
I
Figure 5-40 Figure 5-41
5-23
Chapter 5 - Filters and Transfer Functions
·1 '--------------'
Figure 5-42
5-24
Chapter 5 - Filters and Transfer Functions
Windowing Interplay
Use the same setup as before but change
the length of the time window that we'll use to examine the sinusoid. Instead of
a couple of minutes before coffee, let's examine it all morning from 9am to 11:30
am. We'll call this Xam(t), what's its spectrum look like now?
Figure 5·45
(JO(\Of) (JO(\Of)
O~VO O~VO
5-25
Chapter 5 - Filters and Transfer Functions
Figure 5-49
Figure 5-50
Figure 5-51
5-26
Chapter 5 - Filters and Transfer Functions
Figure 5-52
Windows Wrap-up
Hopefully the preceding pages have driven
home the point that the chosen window can have a big impact on your spectral
analysis. It's a simple point, but one that is sometimes forgotten. For instance,
forgetful engineers have been known to try to do spectral analysis in the 20-50
Hz region using a window only a few millisecond long. The figure below may
give an intuitive feel to how accurate their results might have been.
Figure 5-53
Alternative Windows
We may have lead the reader erroneously
to believe that the only window function to use is the rectangular window that
we've been discussing. This is not true. It just happens to be the simplest to use
and easiest for illustrative purposes. In the rectangular window we presented,
you're either looking at the signal or you're not. There's a negative point about
5-27
Chapter 5 - Filters and Transfer Functions
the rectangular window and that is its frequency domain description. W(t) is
bumpy with many local rninimas and local maximas (sidelobes).
A better approach may be to avoid using
the rectangular window and its "I'm looking, I'm not looking" approach. A
different windowing function will allow for a more gradual transition between
looking and not looking.
See the example of the Hamming Window.
Instead of multiplying the signal set) by the rectangular window wet) of duration
of two minutes, we'll use the hamming window Whamm(t) of the same duration.
Start viewing at the signal a little bit at first, then more and more till we taper the
view back down to zero.
\J~ \J \J~ C7
Figure 5-54
Figure 5-55
f\hf\
Figures 5-56
5-28
Chapter 5 - Filters and Transfer Functions
... - ... , ,
,,
Figure 5-57
\ , ,,
'. \ J l ..
Figures 5-58
Windows Caveat
Compare the plots of the spectral estimates
for the two minute rectangular window and the two minute hamming window on
the next page.
5-29
Chapter 5 - Filters and Transfer Functions
Figures 5-59
Voice Signals
Let's look at an arbitrary voice spectra.
We'll find most of its content is located in the maybe 200Hz to 3200 Hz range.
This total span of frequencies where there are appreciable spectral components,
3200 Hz, is called the Signal Band Width. Thus, any system which is used to
carry voice signals should have the ability to carryall these frequencies. (In fact,
the frequencies listed here are the frequencies generally used for telephone
applications). If this is so, we say that this system has a System Band Width of
3200 Hz. In general, it's a good idea for the system bandwidth at least as large
as the signal bandwidth for good results.
Musical Signals
The range of human hearing is generally
20 to 20,000 Hz. So, a good musical reproduction system should have a
bandwidth of 20,000 Hz.
5-30
Chapter 5 - Filters and Transfer Functions
5-31
6
C HAP T E R
signal processing.
Signal processing is a general term used to
describe the various functions are performed on signals usually to improve or
enhance the original signal. The specific improvement or enhancement differs
greatly from application to application and the type of signals involved. Perhaps
a quick sketch of various applications of signal processing, specific signals and
types of processing will help. Let's start with a few classic examples.
6-1
Chapter 6 - General DSP Concepts
and solutions have been known for a long time, that is since the beginning of
radio. Simple components such as tubes, transistors, inductors, capacitors,
resistors and vinyl or magnetic tape, are used to compose the elements of the
signal processing gear. The functional elements of signal processing are filters,
variable gain amplifiers, mixers, and oscillators.
6-2
Chapter 6 - General DSP Concepts
6-3
Chapter 6 - General DSP Concepts
?rrrrllr. pllrrrIL
Figure 6-1 An Arbitrary Sampled Input Sigual
Figure 6-2
6-4
Chapter 6 - General DSP Concepts
o = x(n)
_ = x(n-4)
I I
I I
.
I ..
I I
I ..
= sin( 21tnO.1 )
6-5
Chapter 6 - General DSP Concepts
1 9
y(n) = 10 L x(n - k)
k=O
1 1 1 1 1
yCn) = 10 x(n) + 10 x(rr-1) + 10 x(rr-2) + 10 x(rr-3) + ... + 10 x(rr-9)
9 1
yCn) = L h(k) * x(rr-k) where h(k) = -10 for k=O, 1, 2, ... 9
k=O
yCt)=f h('t)*x(t-'t)d't
6-6
Chapter 6 - General DSP Concepts
y(n) = I k=Q
h(k) * x(n-k)
(For a particular pattern we have h(k) = /0 for k=O, 1, ... 9 and zero every-
where else.)
6-7
Chapter 6 - General DSP Concepts
Ifn =9, then all the n-I, n-2, n-3, ... , n-9,
are now strictly greater than zero, thus all other x(n-k)'s are again zero.
~ rrrrrrrrrr~~::-.--o-"
-2 -1 a 1 2 3 4 5 6 7 8 9 10 11 12 • • •
values. The actual impulse response is ten values, each equal to 1110. These output
values are exactly described by the terms of h(i). Indeed, h(i) is the impulse
response. So what about frequency responses?
6-8
Chapter 6 - General DSP Concepts
fre =0
0.5
-0.5
-1
0 50 100
Figure 6-5
6-9
Chapter 6 - General DSP Concepts
fre = 0.04
0.5
-0.5
50 100
Figure 6-6
fre = 0.08
0.5 -
-0.5
-10~----------~5~0----------~100
Figure 6-7
fre = 0.1
0.5
o --------
-0.5
-I ------"------------'
o 50 100
Figure 6-8
fre = 0.12
0.5
o 50 100
Figure 6-9
6-10
Chapter 6 - General DSP Concepts
fre =0.14
0.5
Figure 6-10
0.5
_IL-_ _ _ _ _ _ _ _ _ _ _ ~ ~
o 50 100
Figure 6-11
~ 0.6
0.4
0.2
0
0 0.5
flfs Frequency
Figure 6-12
Frequency Response of a
Moving Average Operator
6-11
Chapter 6 - General DSP Concepts
3 4 6 7 8 10
Figure 6-13
Figure 6-14
6-12
Chapter 6 - General DSP Concepts
Figure 6-15
Figure 6-16
6-13
Chapter 6 - General DSP Concepts
Figure 6-17
Conjecture Investigated
6-14
Chapter 6 - General DSP Concepts
(constant) and one with a frequency of fs/2. These are chosen simply because
they are so easy to work with and still provide useful information.
-0.1
Figure 6-18
Impulse Response that Alternates in Sign
x - Data samples
Figure 6-19
h(n) and x(n-k) lined up so each pair is either
positive or negative
6-15
Chapter 6 - General DSP Concepts
-Hl1[11--
o - Filter impulse response
Figure 6-20
What occurs when hen) and x(n-k) are lined up with
opposite signs.
6-16
Chapter 6 - General DSP Concepts
digital filter of a desired frequency response, you must determine the correspond-
ing impulse response.
Implementing Response
6-17
Chapter 6 - General DSP Concepts
Z -1 has
the same
meaning as
Delay and
is discussed
on page 6-20.
Figure 6-21
The Direct Form or Canonical Form of FIR Filter
1) They are inherently stable (as opposed to the next filter type to be pre-
sented).
6-18
Chapter 6 - General DSP Concepts
2) The dynamic range of the states of the filter is easily computed. This is
important to prevent clipping of the signal.
4) FIR tap gains for a given desired frequency response and can be easily
computed by Fourier transform techniques.
Z -1 has
the same
meaning as
Delay and
is discussed
on page 6-20.
6-19
Chapter 6 - General DSP Concepts
The Delay
6-20
Chapter 6 - General DSP Concepts
6-21
Chapter 6 - General DSP Concepts
6-22
C HAP T E R
• Stopband Edge(s)
• Stopband Attenuation
• Filter Order
7-1
Chapter 7 - Digital Filter Design
we are required to present some basic facts and generalities on the issue of llR
vs. FIR.
7-2
Chapter 7 - Digital Filter Design
FIR:
7-3
Chapter 7 - Digital Filter Design
IIR:
7-4
Chapter 7 - Digital Filter Design
or fixed hardware state machine) with lesser numerical accuracy. In this case, we
cannot implement the "true 32 bit floating point" desired coefficients, but are
forced to accept something reasonably close. The term used for, not surprisingly,
known as coefficient quantization. Typical quantization values for fixed point
coefficients are 12, 14, 16, or 24 bits. In making this transition from high accuracy
design to limited accuracy implementation we must take care. Some implemen-
tation forms are more sensitive to coefficient quantization than others. To be a
bit simplistic, we'll say here that FIR structure implementations are generally less
susceptible to this quantization than I1R filters. Furthermore, among IIR imple-
mentations there are some forms more sensitive than others.
-1 "-----'------'-----'
Figure 7 - 3 The Limit Cycle
7-5
Chapter 7 - Digital Filter Design
7-6
Chapter 7 - Digital Filter Design
• What does linear phase mean? Linear phase means that the phase
delay between filter input and output is a linear function with re-
spect to frequency. For example, the phase delay at 200 Hz will be
some constant times the phase delay at 100 Hz. The actual mean-
ing of linear phase becomes easier to see with a small excursion,
looking at a few equations with our linear phase filter. Consider a
simple, sinusoidal input:
input: output:
cos(w ·t) -----> A· cos(w . t + <p)
<p = - a·w
7-7
Chapter 7 - Digital Filter Design
sinusoid as output. What happens if the input was of a different frequency? Let's
see, using 3. 00 instead of 00:
-----> Acos(3oo(t-a))
• (N/2)-1 =(N/2)+ 1
(N/2)-2 = (N/2)+2 picture of symmetric hen)
7-8
Chapter 7 - Digital Filter Design
before this infinite tail. But, this would give us problems with respect to causality.
So, the goal of finding a causal, linear phase IIR filter seems elusive.
7-9
Chapter 7 - Digital Filter Design
a false constraint could have a tremendous impact on the system solution, as IIR
and FIR filters of similar performance can be of considerably different order.
7-10
GLOSSARY
ALL-PASS FILTER: A filter that allows all frequencies to pass through the circuit.
AMPLITUDE 1 (OR, AMPLITUDE OF ONE): When this phrase is used, the author
is referring to the maximum intensity of unit 1 that a signal reaches. It may
refer, for example to voltage, current, or, power signals. In the case of a signal
which repeats itself periodically, such as a sine wave, this phrase refers to the
intensity that a signal may reach on its upward or downward swing.
ANALOG DOMAIN: This phrase refers to the category under which all continuous
actions fall; or to everything in the universe that can be said to be continuous
and analog. For example, we can say that the motion of the sun is part of the
analog universe. However, in the unlikely event that something breaks the
motion of the sun from its normal path, we would cease to think of its motion
as continuous and analog in that moment (see "Discrete" and "Digital").
G-1
Glossary
ARITHMETIC LOGIC UNIT (ALU): The ALU is the portion of the Central
Processing Unit (CPU) which interprets and performs arithmetic and
logic commands which we issue to the CPU.
ASCII: This acronym stands for American Standard Code for Information
Interchange. This is the standard which defines certain digital bit patterns
to stand for common symbols such as our alphabet and our number
system. The bit pattern, 0011000, for example, stands for the number
zero.
BANDSTOP FILTER: This filter passes frequencies higher than the upper
bandedge, and lower than the lower bandedge, while attenuating all those
in between the bandedges; this is commonly referred to as a "notch
filter." This filter is the opposite of a bandpass Filter. The ideal filter has
an absolute transition to zero, rather than the non-ideal attenuation:
G-2
Glossary
BASEBAND: This is an often-used term to refer to the original form of a signal before
it was modified by a DSP filtering technique.
BLACKMAN HARRIS WINDOW: (See "Windows") -C- CERAMIC RESONA-
TOR: This is a frequency-producing device whose ceramic material is so
strong and responsive that it can be made to resonate, or vibrate, at a very
high frequency when an electrical signal is applied (see "Natural Fre-
quency").
BREADBOARDED: To build up the circuit with the intent of trying it to see if it
works.
CARRIER FREQUENCY: This can best be understood in terms of the example
given in the textbook. We know that the audible range of musical signals is
from 20 Hertz to 20000 Hertz. However, it turns out that when FM radio
stations want to broadcast these signals, they do so at a considerably higher
frequency; somewhere between 88000 Hertz and 108000 Hertz. The musical
signals are being 'carried' by another signal; hence the term "Carrier Fre-
quency."
CAUSAL: This concept refers to the idea that any signal which we create, and which
we begin to see at the output of our system, was created from previous inputs.
That is, the causal system never anticipates what the input might be; but it
depends on a new value at the input to create another output value.
CENTRAL PROCESSING UNIT (CPU): This is the "brain of the computer. The
CPU analyzes and interprets the commands that we give it, and then it
executes those commands in an orderly fashion.
COEFFICIENT: This is also known as a Coefficient Multiplier. This is a number by
which each point in a signal is multiplied in order to alter it in predetermined
way. More than one coefficient is generally used to accomplish the signal
processing objective.
CONVERSION TIME: Length of time to convert a signal from analog to digital.
CONVOLUTION: This is the process whereby 2 or more signals are mixed together
to form a new signal.
G-3
Glossary
D.C. (OR, DIRECT CURRENT): Whenever the term "dc," or "level," is used,
it refers simply to the constant voltage level of a signal which exists
without a frequency component.
G-4
Glossary
DELTA FUNCTION: The delta function is a tool used in many areas of Electrical
Engineering to describe a single, infinitely small occurrence of a signal
whether it be in the Frequency Domain, or in the Time Domain. It can be
viewed as the smallest, simplest element of any signal, out of which all signals
are built. The delta function is to the atom, as signals are to matter.
DIGITAL: Digital simply means having a value of "1" or '0", as opposed to analog,
which could have any value in between. It often implies computers or
computing devices. The word digital is best thought of in connection with the
words analog and discrete. A signal being received by a computer is at first
analog in nature since it is generally a continuous wavefonn. The analog
signal then passes through a device which converts the analog signal into a
set of discrete quantifiable sub-signals. These sub-signals are then put into
memory within the computer where they can officially be termed "digital."
DIGITAL SIGNAL PROCESSING, OR, DSP: This is what this book is all about
and aims to explain. Briefly, DSP refers to the way in which computers are
used to alter signals which have already passed out of the analog domain,
into the discrete domain, and finally into the digital domain. Once in the
digital domain, the DSP engineer uses the processing power of the computer
to alter the properties of the signal before it is passed back out of the computer
into the analog world again.
G-5
Glossary
DUALITY: Without meaning to sound cosmic about it, this is a concept which
refers to the "twoness" in the universe. But more important to DSP, it
refers to the reciprocal relationship between the time and the frequency
domains which makes possible the the very powerful tool of the Fourier
Transform Pairs.
DYNAMIC RANGE: This refers to the frequency range of a signal. Since most
signals are composed of many sub- signals, it is helpful to speak of its
dynamic range, or the range of frequencies of which it is composed.
EXECUTION UNIT: This part of the Central Processing Unit (CPU) coordi-
nates and synchronizes all actions which the Arithmetic Logic Unit
(ALU) performs.
G-6
Glossary
FOURIER TRANSFORM PAIRS: Table XX given on page YY lays them out for
perusal. Such frequent use of these particular bridges, so to speak, between
the frequency and the time domains (and back again)is made, that it finally
became prudent simply to put one of these tables in just about every DSP
reference manual or textbook in existence.
FREQUENCY: Intuitively, we know that this word means how often something
happens. In the DSP sense, we mean how quickly a signal finishes one of its
cycles (see "Sine Function").
FREQUENCY DOMAIN: This domain gives information about how often a signal
completes one of its cycles, and how many major sub-signals there are
contained in the signal. A signal can be composed of many individual signals
where each one of those signals has its own cycle, or, frequency, associated
with it ( see "Sine Function," or, "Cosine Function" ). So, one can imagine
that, upon viewing a complicated signal in the frequency domain, one would
see a full range of main lobes, indicating that the signal has many concen-
trations of single frequencies within it.
GmB'S PHENOMENON: These are oscillations in the time or the frequency domain
which occur at any sharp transition point in a signal. The famous mathema-
tician, Josiah Gibbs, proved that when we are attempting to create a square
wave (which is a wholly owned subsidiary of the human mind -they do not
occur in nature) or, whenever we are trying to create a signal in the frequency
or the time domain which exhibits sharp transitions, small oscillations start
to occur. These oscillations are also known as ringing (See "Ringing").
GROUP DELAY: In the DSP sense, this takes each increment of phase change, and
ratios it with the amount of frequency change during the same increment.
When the signal is demonstrating Gibb's Phenomenon in the frequency
domain, for example, the ratio is not constant; but for as long as the amplitude
was flat, the ratio was a constant.
G-7
Glossary
G-8
Glossary
Needless to say, the ideal does not occur naturally; but it is a convenient form to tum
to since it is easier to draw when we are trying to explain something.
IDEAL LOWPASS FILTER: (See "Ideal Filter," and "Low Pass Filter").
LINEARITY: In the DSP sense, and in almost any other sense, this idea refers to the
constant ratio associated with incremental changes in cause and effect. For
example, if time changes and voltage changes with it, and the ratio between
them remains a constant, then we have a linear relationship.
G-9
Glossary
MAIN LOBE: The main lobe is located by searching, in the frequency domain,
for the largest peak among a group of smaller peaks which taper up to
it. The main lobe represents the area within which most of the signal's
frequency is found. If the signal were composed of exactly one sinusoid
operating at a frequency of exactly 440 Hertz, we would find, ideally
speaking, a spike at 440 Hertz on the frequency plot.
G-10
Glossary
G-11
Glossary
PHASE: Phase is a measure which helps to show us the difference between two
cyclical signals. Below we see a graph of a sine wave and a cosine wave.
If each cycle takes one second, we can see that the time delay between
them is 114 of a second; however, the phase delay would be expressed
not in terms of time, but in terms of cycle differences. In this case we
see that we have a 1/4 cycle difference between the two signals. In other
words, if we moved the sine wave over by 114 of a cycle, we would get
the cosine wave.
PHASE, ABSOLUTE: Under this condition we know exactly when the signal
started up(See "Phase").
PREEMPHASIS: A frequency enhancer; that is, a device that will boost the
frequencies that we choose to boost (See "Weighting").
RAM BUFFER: Random Access Memory (RAM) where we store the quantized
signal and the coefficients we will be using to modify it.
REAL-ESTATE: Surface area, in this case referring to printed circuit board area.
G-12
Glossary
G-13
Glossary
SIGNAL PROCESSING: This the general title for the branch of Electrical
Engineering which is devoted finding new ways to alter electrical signals
for useful ends whether it be by analog, or digital means.
SINC PULSE: This refers to the dual of the sinc function in the opposite domain
which is always a rectangular pulse(See "Sinc Function").
G-14
Glossary
For an explanation of the mathematical detail behind these descriptions, please refer
to a Signal Processing text.
SINUSOIDS: One idea in DSP which one should understand is that of the Sinusoid.
Sinusoids are the signals which when combined in various ways compose all
other signals that occur naturally or synthetically in the universe. These are
the signals which the DSP enthusiast will filter orreshapefor whateverreason.
When the mathematician, Joseph Fourier, examined these signals, he made
the remarkable discovery that all the signal he studied are part of the set of
signals which are composed entirely of sine waves and cosine waves.
SPEC: Specification.
SPECTRA: This word is the plural form of the word, spectrum (see "Spectrum").
G-15
Glossary
SPECTRAL SPIKE: Please refer to the graphic under the glossary heading
"Cosine Wave," or, "Sine Wave." A spectral spike in each of those cases
is that which is described graphically in the second figure of each entry.
It is the single frequency associated with a simple sinusoid.
SPECTRUM: This word refers to the way a signal looks when we view its
frequency characteristics. For example, when we look at a rainbow, we
are actually looking at how often particular light waves finish one cycle
of their life. If one of them finishes one cycle in 15 seconds, then when
we view its frequency domain description, we see that its spectrum, or
range of frequencies fall into the category of blue colors. A spectrum is
simply a range of frequencies.
SPIKE: In the frequency domain, this is an area, denoted by a main lobe, where
we would find a major concentration of a particular frequency. In the
time domain, this can be a representation of an instantaneous energy
surge which appears suddenly in time, and disappears just as quickly;
which we would view as a spike on an oscilloscope.
SQUARE WAVE: In this section of his chapter, the author is attempting to show
how all signals are composed of one or more simple sinusoids. The
square wave is a signal which looks like one might expect:
G-16
Glossary
TIME DELAY: The time delay is the difference in time between two signals.
TIME DOMAIN: When we speak of the time domain, we are signifying that we
are interested in any signal behavior, which we observe over time. We
could, for example, observe this behavior on an oscilloscope.
G-17
Glossary
VOLTAGE FOLLOWER: Circuitry whose voltage output tracks the voltage input.
To be more precise, it makes a fine high current buffer because it has high
input impedance, low output impedance and unity gain.
WATCHDOG TIMER: These timers are used to protect against faulty computer
programs, or situations in which an instruction sequence begins to repeat
itself indefinitely and in a way that is outside the control of the user. This
countdown timer detects these situations by allowing only a certain number
of repetitions to occur before timing out and giving control back to the user.
WEIGHTING: Basically, this is a constant assigned to, say, one frequency item, in
order to indicate its importance. In general, it is any constant assigned to any
part of a signal to emphasize or de- emphasize it.
G-18
Glossary
is relative to the main lobe, and how 'quickly' the other sidelobes taper
off to nothing; and, (4) the amount of area beneath the window function's
frequency domain description. (Adapted from DSP in VLSI, by Richard
1. Higgins).
G-19
References
Signals And Systems. Alan V. Oppenheim and Alan S. Willsky with Ian T. Young,
Prentice-Hall, 1983.