EET 357 Realtime Digital Signal Processing - PowerPoint PPT Presentation

1 / 56
About This Presentation
Title:

EET 357 Realtime Digital Signal Processing

Description:

Contacts x and y, along with brushes a and b, form a commutator. The purpose of the commutator is to reverse the magnetic field every half ... commutator ... – PowerPoint PPT presentation

Number of Views:38
Avg rating:3.0/5.0
Slides: 57
Provided by: petego
Category:

less

Transcript and Presenter's Notes

Title: EET 357 Realtime Digital Signal Processing


1
EET 357Realtime Digital Signal Processing
  • Peter Goodmann, P.E.

2
Digital Signal Processing
The applications of electronic technology may be
grouped into two broad categories digital
computation, and signal processing. Signal
processing can be defined as the use of
electrical quantities (current, Voltage, etc.) to
represent other physical quantities of interest
such as position, sound pressure, or light
intensity (or many, many other quantities), and
the processing of these electrical quantities (or
signals) to extract or insert useful
information. Since the electrical signal
represents a physical quantity by analogy, this
is often called analog signal processing.
3
Digital Signal Processing
Digital signal processing (DSP) is the confluence
of signal processing and digital computation
electrical signals representing physical
quantities (analog signals) are converted to
sequences of numbers representing those same
physical quantities (digital signals). These are
processed using the techniques of digital
computation to extract or insert useful
information, and may then be converted back to
analog signals. Thus, an embedded digital
computer may be used to replace an analog signal
processing system. Products as diverse as
cellphones and electric motors now contain
embedded computers which are optimized for DSP
algorithms because it allows products to be built
which are flexible and upgradeable.
4
Digital Signal Processing
Digital Represented by integers
Signal Carries information
  • Sound
  • Radio
  • Picture
  • Position (motion control)
  • Etc.

Processing Using or Transforming
5
Digital Signal Processing
  • Changing or Transforming Information which is
    Represented by Integers

Process
6
Analog, Continuous Signal Processing
(Realtime)
Input Voltage or Current
Output Voltage or Current
Processed Speech, Music, Position, Etc.
Speech, Music, Position, Etc.
Filter, Amplifier, Etc.
7
Digital Processing of an Analog Signal
Input Voltage or Current
(Realtime)
Digital Output Signal
Digital Input Signal
Process
x(t)
y(t)
A/D
D/A
X(n)
Y(n)
Output Voltage or Current
Analog to Digital Converter
Digital to Analog Converter
8
Digital Processing of an Analog Signal
(Offline, not Realtime)
Process
x(t)
y(t)
A/D
D/A
X(n)
Y(n)
9
Digital Processing of an Analog Signal
Signal Analysis (Realtime)
Process
X(n)
x(t)
A/D
Display
Information About Signal (Spectrum, Statistics, Et
c.)
10
Digital Processing of an Analog Signal
Signal Analysis (Offline)
Process
x(t)
A/D
Display
X(n)
11
Analog Signals
An analog signal is a Voltage or current (usually
a Voltage) which represents some physical
quantity the instantaneous strength of a radio
field, the instantaneous pressure of air on a
microphone (sound pressure), the position of a
motor shaft, etc. Consider the signal shown at
left.
12
Analog Signals
This is a Voltage which represents the sound of
an actor saying There is no Keyser Soze! The
signal can have any value between -1 Volt and 1
Volt. This is a continuous range of Voltage,
with an infinite number of possible values. If
youre viewing the slide show, click on the
speaker icon to hear the sound.
13
Analog Signals
The signal exists (has a defined value) at every
value of t between 0 seconds and 1.935 seconds.
This is a continuous time range, with an infinite
number of possible values.
14
Analog Signals
Heres a segment of the same signal, magnified.
The Voltage passes through every value between
-0.6 Volts and about 0.7 Volts, while time passes
through every value from 0.2 sec. to 0.205 sec.
This is a continuous signal continuous in
time, continuous in Voltage.
15
Digital Signals
To understand digital signals, lets start with
this analog signal and, step by step, convert it
to a digital signal.
16
Digital Signals
First, lets magnifiy the signal some more,
looking at a shorter time interval 0.2 seconds
to 0.2004 seconds.
17
Digital Signals
Next, apply the signal V(t) to a sample and hold
circuit. This is a circuit which takes a
snapshot of V(t) at regular intervals. Well
take a snapshot 22,000 times per second. This is
a sample rate of 22 KHz or 22,000 samples per
second.
Sample and Hold
Sampled Analog Signal
Analog Signal
18
Digital Signals
Heres a simple sample and old circuit. 22,000
times per second, the switch closes just long
enough for the capacitor to charge so that its
Voltage is equal to V(t). Then the switch opens
until it is time for it to close again. While
the switch is open, the Voltage stored on the
capacitor keeps Vs(t) equal to V(t) the last time
the switch closed.
1
Analog Signal
Sampled Analog Signal
Switch closes very briefly, then opens, 22,000
times per second.
19
Digital Signals
Heres what the sampled and held Voltage looks
like
20
Digital Signals
The next step is quantization. We divide the
input Voltage range (-1 Volt to 1 Volt in this
example into a finite number of increments. To
make things simple, lets divide it into 8
intervals
If, for a given sample,
the quantized value is the integer -2. -2
represents a Voltage 0.25, and any Voltage from
-0.5 V tp -0.25 V is rounded down to -0.25.
Notice that these eight integers can be
represented by 3-bit, 2s complement numbers, so
this is 3-bit quantization.
21
Digital Signals
The quantizer produces a sequence of integers,
each one representing the Voltage of one sample.
This sequence of integers is stored in memory for
processing. Each integer has a position in the
sequence
The first sample occupies position 0, the second
position 1, and so on. Each is associated with a
time only by virtue of the sample rate. If the
sample rate is 22,000 kHz, there is a time
interval of 45.5 mS between samples. Sample 0
was taken at t 0, sample 1 at t 45.5 mS, etc.
22
Digital Signals
Here again is the sampled and held signal
Voltage.
23
Digital Signals
Heres the sampled and held Voltage, quantized to
3-bit resolution. We can improve the resolution
by dividing the Voltage range into a larger
number of smaller steps. We might divide the
range from -1 V to 1 V into 32 segments instead
of 8, a fourfold improvement in resolution This
means using 5 bits to represent each sample.
24
Digital Signals
Here again is the sampled and held signal
Voltage.
25
Digital Signals
Here again is the sampled and held signal
Voltage, quantized to 5-bit resolution. Notice
that it is much closer to the unquantized
Voltage. The number of bits used in an actual
application depends on the peformance
requirements the most common resolutions are 8,
12 or 16 bits. CD-quality audio uses 16 bit
integers.
26
Digital Signals
The sound used in this example was captured with
8-bit resolution, and sounds pretty good. To
hear the same sound quantized with 5-bit
resolution, click the speaker icon
Heres the same sound, at 3-bit resolution
Note the further degradation in quality. Heres
the same sound, at 1-bit resolution
It sounds horrible, but is still understandable.
27
Digital Signals
Once an analog signal has been sampled and
quantized, it really exists only as a stream of
integers. These integers arent inherently
associated with times. Even though the samples
from which they are derived are each associated
with a particular time, the quantized samples
only have an index an integer indicating the
position in the stream.
28
Digital Signals
Heres the quantized (8-bit) signal, represented
as a sequence of integers.
29
Digital Signals
Since the samples dont really exist between
sample times, this is a better way to illustrate
the digital sequence
30
Example Analog SSB Transmitter
Heres the block diagram of a simple analog
single sideband transmitter. The phase shifters,
multipliers, oscillator and summer are all analog
sin(wRFt)
functions. Their characteristics are determined
by resistors, capacitors, opamps, and possibly
transistors and inductors. None of these circuit
elements is ideal, and all exhibit variations in
critical parameters..
90 deg. Phase Shift
RF Oscillator
-
USB Output
S

cos(wRFt)
cos(wRFt)
90 deg. Phase Shift
change in critical parameters. This transmitter
is very susceptible to performance degradation
due variations in critical element values.
Audio Input
31
Example Analog SSB Transmitter
Another drawback of this transmitter is that
changing to a different form of modulation
requires a hardware change. Switching to lower
sideband
sin(wRFt)
takes a simple change, which could be
accomplished by flipping a switch. Changing to
FM or full-carrier AM would require a different
circuit.
90 deg. Phase Shift
RF Oscillator
-
USB Output
S

cos(wRFt)
cos(wRFt)
90 deg. Phase Shift
Audio Input
32
Digital SSB Transmitter
Heres a block diagram of a digital SSB
transmitter. The multipliers, lowpass filters,
synthesizers, and summer are all digital.
Lowpass Filter

cos(wRFt)
USB Output
S
Direct Digital Synthesizer
Direct Digital Synthesizer
DAC
cos(w1t)
sin(wRFt)

sin(w1t)
Lowpass Filter
Since all the functional elements are digital,
their characteristics are ideal and never vary.
The performance of the digital transmitter is
not perfect, but it is perfectly stable and
predictable.
ADC
Audio Input
33
Digital SSB Transmitter
The block diagram shown below is probably
implemented as an algorithm executed by a digital
signal processor (DSP) chip, or possibly as
reconfigurable logic.
Lowpass Filter

cos(wRFt)
USB Output
S
Direct Digital Synthesizer
Direct Digital Synthesizer
DAC
cos(w1t)
sin(wRFt)

sin(w1t)
Lowpass Filter
In either case, executing different software
switches the transmitter from USB to LSB, or full
carrier AM, FM, etc. This is often called a
software-defined radio.
ADC
Audio Input
34
DC Motor
Heres a simple DC motor. The armature winding
is mounted on a rotating shaft, and suspended
between two magnetic poles. In this motor, the
poles may be permanent magnets or electromagnets.
The shaft also has two contacts, x and y mounted
on it. These contacts
slide along the brushes a and b as the shaft
rotates. Consider the coil rotating, starting
from the horizontal position shown (q 0). The
direction of the current flowing in the rotor
coil is such that the poles repel the portion of
the rotor coil closest to them, making the rotor
turn in the clockwise direction.
DC Power Supply
brushes

-
a
b
coil
Shaft
S
N
x
y
commutator
35
DC Motor
As the coil passes through vertical (q 90
deg.), contact y leaves brush b and goes to brush
a contact x moves from a to b. This reverses
the current flowing in the rotor coil, so now
each of the poles attracts the portion of the
rotor coil closest to it, and the rotor continues
turning in the clockwise direction. After
another half revolution, the contacts move from
brush to brush again, reversing the rotor
current, and switching the magnetic force to
repulsion, pushing the rotor in the clockwise
direction. Thus, the rotor current is reversed
every half revolution.
DC Power Supply
brushes

-
a
b
coil
Shaft
S
N
x
y
commutator
36
DC Motor
Contacts x and y, along with brushes a and b,
form a commutator. The purpose of the commutator
is to reverse the magnetic field every
half-revolution, so the motor continues to turn.
Otherwise, the rotor would stop as the rotor coil
reached the vertical position.
The sliding action between the brushes and
contacts is obviously subject to wear, due to
friction. It also would exhibit higher
electrical resistance than a permanent
connection. Therefore, the commutator and
brushes are a weakness of this type of motor.
DC Power Supply
brushes

-
a
b
coil
Shaft
S
N
x
y
commutator
37
DC Motor
If the stator poles (N and S below) are poles of
an electromagnet, then instead of reversing the
rotors magnetic field every ½ revolution, we
could reverse the stator field by reversing the
stator current. This would make it unnecessary
to reverse the rotor current. Current
could be delivered to the rotor winding via slip
rings, or the rotor winding could be replaced by
one or more permanent magnets. If permanent
magnets were used, no mechanical slip rings or
brushes would be needed. This is an obvious
advantage.
DC Power Supply
brushes

-
a
b
coil
Shaft
S
N
x
y
commutator
38
DC Motor
But without some type of mechanical contacts,
what would cause the stator current to reverse at
the correct point in the rotors rotation? Of
course, we would use electronic switches, but how
would they know when to switch? Some sort of
sensor, such as a Hall-effect switch, could be
used to sense the shaft position and reverse the
current at the correct point in the motors
rotation.
The addition of sensors to control the electronic
commutation partially negates the advantage of
eliminating the brushes. Fortunately, theres
another way.
rotor
Shaft
S
N
S
N
commutator
39
DC Motor
When the rotor rotates inside the stator, its
magnetic field cuts the stator windings.
Faradays law says this induces an EMF across the
stator terminals. This is called counter EMF, or
back EMF. If the back EMF is converted to a
digital signal, a DSP control algorithm can use
it to generate a running estimate of the rotors
position. This estimate can, in turn, be used to
control the points in the motors rotation at
which the stator current is reversed. No brushes,
no slip rings, and no sensors! Nirvana!
40
Spectra of Digital Signals
Two areas in which digital signal processing is
very commonly used are audio or sound, and radio
signals. In both areas, and many others, its
often desirable to know at what frequencies
energy is concentrated in a given signal. Lets
take an absurdly simple example A 1 KHz sine
wave, sampled at 22,000 Hz. Heres the signal.
This view of the signal is called the time-domain
view, because its a plot of Voltage versus
time. Click the speaker to hear it.
41
Spectra of Digital Signals
Heres an alternate view of the signal. Its a
plot of power (or energy) density versus
frequency, and is the frequency domain view. It
shows at what frequencies or in what bands of
frequencies the signal power is concentrated.
For our 1 KHz sine wave, the signal power is
concentrated at 1 KHz. (Duh!) This is also
called the spectrum of the signal.
42
Spectra of Digital Signals
Heres the time-domain view of a 3 kHz sine wave,
also sampled at 22 KHz. Click the speaker to hear
this signal.
43
Spectra of Digital Signals
Heres the frequency-domain view of the 3 kHz
sine wave. Again, the power is concentrated at 3
kHz.
44
Spectra of Digital Signals
Heres a more complex signal, created by summing
the two previous signals together. If it got
much more complex, it would be difficult or
impossible to tell by inspecting a time-domain
plot at what frequencies the power was
concentrated. Click the speaker to hear this
signal, and notice that the 1 kHz component is
readily apparent, but its hard to discern the 3
kHz component
45
Spectra of Digital Signals
Heres the frequency-domain view. In this view,
both the 1 kHz and the 3 kHz component are
readily apparent.
46
Spectra of Digital Signals
Here again is the time-domain view of an actor
saying There is no Keyser Soze! Its virtually
impossible to gain any idea where in the
frequency domain the power is concentrated by
looking at the time-domain view.
47
Spectra of Digital Signals
Heres the spectrum of the signal from the last
slide, averaged over the 1.935 second duration of
the phrase. Now its easy to see that nearly all
the power is concentrated in the band from 0 Hz.
to 2 KHz, with a large concentration between 400
Hz. and 600 Hz.
48
Spectra of Digital Signals
Zooming in shows clearly where the power is
concentrated.
49
Spectra of Digital Signals
Heres the time-domain view of another actor
saying I work for Keyser Soze. Again, little
knowledge of its spectrum can be gained by
inspection.
50
Spectra of Digital Signals
Heres the spectrum of the phrase I work for
Keyser Soze. Notice how similar it is to the
spectrum of There is no Keyser Soze!
51
Spectra of Digital Signals
Again, zooming in shows clearly where the power
is concentrated.
52
Spectra of Digital Signals
Heres the spectrum of There is no Keyser Soze.
(The axis limits have been adjusted)
53
Spectra of Digital Signals
Heres the spectrum of There is no Keyser Soze,
shifted upward in pitch by 400 Hz. Click the
speaker to hear it. Notice that it looks very
much like the spectrum in the previous slide, but
has been shifted to the right by 400 Hz.
54
Spectra of Digital Signals
Here are the spectra of both the naturally-spoken
phrase and the same phrase shifted up in pitch by
400 Hz, for comparison.
55
Spectra of Digital Signals
The process which was used to shift the pitch is
exactly the same as the process for the SSB
transmitter which was presented earlier.
Lowpass Filter

cos(wRFt)
USB Output
S
Direct Digital Synthesizer
Direct Digital Synthesizer
DAC
cos(w1t)
sin(wRFt)

sin(w1t)
Lowpass Filter
This is called the Weaver architecture. An
m-file which implements it is available on the
website, under Matlab links. The simple
spectrum analyzer, which was used to generate the
spectrum plots, is also available.
ADC
Audio Input
56
Spectra of Digital Signals
If you would like to experiment with the Weaver
pitch shifter or the spectrum analyzer, download
the m-files and put them in your Matlab work
directory.
Lowpass Filter

cos(wRFt)
USB Output
S
Direct Digital Synthesizer
Direct Digital Synthesizer
DAC
cos(w1t)
sin(wRFt)

sin(w1t)
Lowpass Filter
ADC
Audio Input
Write a Comment
User Comments (0)
About PowerShow.com