algorithms, applications and systems for digital...
TRANSCRIPT
Algorithms, Applications and Systems for Digital
Signal Processing
Patrick Gaydecki
School of Electrical and Electronic EngineeringThe University of Manchester
PO Box 88Manchester M60 1QD
United Kingdom
www.sisp.manchester.ac.uk/dsp.shtml
[UK-44] (0) 161 306 4906
Signal Processing Seminar
Developing Good Practice in Metrology Applications
30th November 2005 - NPL, Teddington, UK
Overview of Presentation
• The advantages of real-time DSP in weak signal detection
• Typical real-time DSP hardware and software specifications
• Finite impulse response (FIR) design and applications
• Infinite Impulse response design and applications
• Inverse filter design and applications
• Case study: weak AC magnetic field detection
Characteristics of Real-Time DSP Systems
• DSP offers flexibility, allowing a single platform to be rapidlyreconfigured for different applications
• Operations such as modulation, phase shifting, signal mixing and delaying are simply performed in software
• System performance is far more accurate than equivalent analogue systems
• However, considerable intellectual investment is required to design and program DSP platforms
DSP Hardware and Software Specifications
(Signal Wizard, Developed at UoM)
• 24-bit codec resolution (1 part in 16777216, or 144 dB)
• Variable sample rate extending to 196 kHz
• Processor power of 100 million multiplication-accumulations per second (MMACS)
• Dual channel operation for signal referencing and mixing
• Non-volatile memory for retention of settings
• Standard PC interface
• Easy FIR, and IIR filter design, with other processing functions including mixing and phasing
An
ato
my o
f a T
yp
ica
l DS
P D
evic
e
AL
UA
LU
EF
CO
PE
FC
OP
Co
de
Co
de
Me
mo
ryM
em
ory
Da
taD
ata
Me
mo
ryM
em
ory
synchronous serialsynchronous serial
interfaceinterface
serial serial
communicationscommunications
interfaceinterface
parallel parallel
communicationscommunications
interfaceinterface
bu
s s
tructu
reb
us s
tructu
re
Components of the Real-Time DSP System
DSPDSP
FlashFlash
memorymemory
24
24-- b
it d
ua
lb
it d
ua
l
ch
an
ne
l co
dec
ch
an
ne
l co
dec
Inte
rface
Inte
rface
Vin
Vout
CodecCodec SSI of DSPSSI of DSP
Frame clock
Bit clock
Data
TS1TS1 TS2TS2 TS3TS3 TS4TS4
DataData
Frame clock
Bit clock
Data in normal mode
Data in network mode
The Inherent Versatility of the Synchronous
Serial Interface
550855001000
1100195250500
2750450100200
550088850100
1375024892040
2750048881020
550009888510
Filter coefficients, DSP56321
Filter coefficients, DSP56309
Nyquist frequency,
kHz
Sample frequency,
kHz
FIR Performance Figures for
DSP56309 and DSP56321
Final Realized Hardware
(Signal Wizard)
FIR and IIRFIR and IIR
design areadesign area
Graphical Graphical
display of filterdisplay of filter
Hardware control: download, gain, Hardware control: download, gain,
adaptive, delay, mixing etc.adaptive, delay, mixing etc.
Final Realized Software (Signal Wizard)
not in practiceyesArbitrary response
lowhighComputational load
Output signal
Transfer function
noyesUnconditional stability
yes
easy
good
yesAnalogue equivalent
unwieldyDesign ease
poorWord length immunity
∑−
=
−=1
0
][][][M
k
knxkhny
H zY z
X zh n z
n
n( )( )
( )[ ]= =
=
∞
−∑0
∑∑==
−−−=M
k
N
k
knykbknxkany10
][][][][][
∑
∑
=
−
=
−
−−
−−
+
=+++
+++=
N
n
n
M
m
m
n
m
znb
zma
znb...zb
zma...zaazH
1
0
1
1
][1
][
][]1[1
][]1[]0[)(
FIRProperty / Filter type IIR
Basic Linear Filter Theory: τττ dtxhty )()()( −= ∫∞
∞−
Finite Impulse Response (FIR) Filter Design
using the Frequency Sampling Approach
∑−
=
−=1
0
][][][M
k
knxkhny
[ ]
=
=
<<=
<<=
= −
elsewhere0][
elsewhere0][
][][
][][
][][][1
kH
kH
fkfkbkH
fkfkakH
kHFnwnh
i
r
li
lr
Arbitrary filter impulse response h[n] obtained by:
Output signal y[n] obtained by discrete-time convolution:
Windowing: Blackman v Rectangular
Impulse responseImpulse response
withwith
Blackman windowBlackman window
Frequency response Frequency response
withwith
Blackman windowBlackman window
Impulse responseImpulse response
withwith
rectangular windowrectangular window
Frequency response Frequency response
withwith
rectangular windowrectangular window
Precise phase control for each
harmonic, to a resolution of
0.0001 degree. Application:
real-time Hilbert transform.
{ } { })()()( 1 ωhh YFtyHty−==
<
>−=
0),(
0),()(
ωω
ωωω
jY
jYYh
Phase Control
Infinite Impulse Response (IIR) Filter Design
∑∑==
−−−=M
k
N
k
knykbknxkany10
][][][][][
Digital Emulation of Analogue Networks I:
Laplace to z-domain mapping
sL
1/sC
R
vin(t)
vout(t)
jω
-jω
σ-σ
j
-j
1-1
1)(
2 ++=
sRCLCs
sRCsH
s-domain
z-domain
ωσ js +=
TjTeez
ωσ=
1)(
2 ++=
sRCLCs
sRCsH
+
−=
−
−
1
1
1
12
z
z
Ts
11
12
1
12
1
12
)(
1
12
1
12
1
1
+
+
−+
+
−
+
−
=
−
−
−
−
−
−
z
zRC
Tz
zLC
T
z
zRC
TzH
LCT
b
T
RCa
22
2
=
=
11
1
1
1
1
1
1
1
)(
1
1
1
1
1
1
1
1
+
+
−+
+
−
+
−
+
−
=
−
−
−
−
−
−
−
−
z
za
z
z
z
zb
z
za
zH
21
2
)1()22()1()(
−−
−
+−+−+++
−=
zabzbba
azazH
)1(
)1(
)1(
)22(
)1(
2
1
0
++
+−=
++
−=
++=
ba
ab
ba
b
ba
a
α
α
α
2
2
1
1
2
0
1
)1()(
−−
−
++
−=
zz
zzH
αα
α
]2[]1[]2[][][ 2100 −−−−−−= nynynxnxny αααα
Substitutions:
Digital Emulation of Analogue Networks II:
The Bilinear z-transform (BZT)
Final difference equation:
Digital Emulation of Analogue Networks III:
Real-Time Performance
-15
-10
-5
0
5
10
15
0 0.005 0.01 0.015 0.02
Time, s
Vo
lts
0.00
0.20
0.40
0.60
0.80
1.00
1.20
0 2000 4000 6000 8000 10000
Frequency, Hz
Rela
tive m
ag
nit
ud
e
-0.4
-0.3
-0.2
-0.1
0
0.1
0.2
0.3
0.4
0 0.005 0.01 0.015 0.02
Time, s
Vo
lts
0.00
0.01
0.01
0.02
0.02
0.03
0.03
0.04
0 2000 4000 6000 8000 10000
Frequency, Hz
Rela
tive m
ag
nit
ud
e
Design
Realised
IIR Comb Filters and Pole-Zero Placement
))((
))((
))((
))((
))((
))(()(
12
12
32
32
10
101
0 −−
−−−
= −−
−−×
−−
−−×
−−
−−=
−
−= ∏
nn
nnn
k k
k
pzpz
zzzz
pzpz
zzzz
pzpz
zzzz
pz
zzzH KK
))((
))(()(
10
10
pzpz
zzzzzH
−−
−−=
111
110
001
000
βα
βα
βα
βα
jp
jp
jz
jz
−=
+=
−=
+=
2
1
2
11
2
0
2
00
βαε
βαε
+=
+=
[ ][ ][ ][ ] 2
11
2
0
1
0
1111
0000
21
21
)()(
)()()(
−
−−
+−
+−=
−−+−
−−+−=
z
zz
jzjz
jzjzzH
εα
εα
βαβα
βαβα
]2[]1[2]2[]1[2][][ 1100 −−−+−+−−= nynynxnxnxny εαεα
0.00E+00
5.00E+00
1.00E+01
1.50E+01
2.00E+01
2.50E+01
3.00E+01
0 2000 4000 6000 8000
Frequency, Hz
Rela
tive m
ag
nit
ud
e
0.00E+00
5.00E+00
1.00E+01
1.50E+01
2.00E+01
2.50E+01
3.00E+01
0 2000 4000 6000 8000
Frequency, Hz
Rela
tive m
ag
nit
ud
e
-600
-400
-200
0
200
400
600
0 0.01 0.02 0.03 0.04 0.05
Time, s
Vo
lts
-600
-400
-200
0
200
400
600
0 0.01 0.02 0.03 0.04 0.05
Time, s
Vo
lts
j
-j
1-1
Inverse Filters: Design and Applications
∑−
=
− −=1
0
1 ][][~
][M
k
knxkhny
Signal Shape Reconstruction
Essential Equations Describing Time Domain Deconvolution (Inverse Filtering)
for Real-Time and Off-Line Processing
)()()()(*)()( ωωω HXYthtxty =⇔=
= −
)(
)()( 1
ω
ω
H
YFtx
)()(*)()( tsthtxty +=
−= −
)(
)(
)(
)()( 1
ω
ω
ω
ω
H
S
H
YFtx
<<
<=
otherwises
Hif
s
,10
)(
1,0 γ
ω
+= −−
sHFth
)(
1)(
~ 11
ω
)(~
*)()( 1thtytx
−=
Simple Fourier domain scheme (rarely successful):
Fourier domain scheme with noise estimate:
Time domain scheme with noise estimate (surprisingly useful):
Finally:
Signal Shape Reconstruction in Practice
-0.2
-0.15
-0.1
-0.05
0
0.05
0.1
0.15
0.2
0.25
0.3
0.35
-0.003 -0.002 -0.001 0 0.001 0.002 0.003 0.004
time (s)
volts
-0.2
-0.15
-0.1
-0.05
0
0.05
0.1
0.15
0.2
0.25
0.3
0.35
-0.003 -0.002 -0.001 0 0.001 0.002 0.003 0.004
time (s)
volts
-0.1
-0.05
0
0.05
0.1
0.15
0.2
0.25
0.3
0.35
-0.003 -0.002 -0.001 0 0.001 0.002 0.003 0.004
time (s)
volts
-0.1
-0.05
0
0.05
0.1
0.15
0.2
0.25
0.3
0.35
-0.003 -0.002 -0.001 0 0.001 0.002 0.003 0.004
time (s)
volts
Signal comprising three impulses
Signal after inverse filtering in real-timeSignal after low-pass distortion
-0.15
-0.1
-0.05
0
0.05
0.1
0.15
0.2
0.25
0.3
0.35
0.4
-0.003 -0.002 -0.001 0 0.001 0.002 0.003 0.004
time (s)
volts
-0.15
-0.1
-0.05
0
0.05
0.1
0.15
0.2
0.25
0.3
0.35
0.4
-0.003 -0.002 -0.001 0 0.001 0.002 0.003 0.004
time (s)
volts
Case study 1: Detection of AC magnetic fields
propagated through a ferrous steel boundary:
The Skin Effect
)(. δ
ωδ
dtj
d
s eeJJ−−
=
σµωµδ
r0
2=
The strength of both the eddy currents and the associated magnetic field fall rapidly with depth in ferrous
materials. The equation which describes the fall in current density is given by:
Where Js is the current density on the surface, d is the depth within the material, δ is the skin depth, ω is
the angular frequency and J is the is the current density at depth d. The skin depth for a given material is
governed by the relationship:
where σ is the conductivity of the conductor or target, µr its relative permeability and µ0 is the absolute
permeability of a vacuum.
digital functiondigital function
generatorgenerator
InstrumentationInstrumentation
amplifieramplifier
(x 400)(x 400)
DigitalDigital
OscilloscopeOscilloscope
powerpower
amplifieramplifier
super super
narrowbandnarrowband
filterfilter
digital gaindigital gain
(x 4096)(x 4096)
DSPDSP
8.99 × 10-122.20 × 10-80.1144.09 × 10-413.0
7.89 × 10-114.57 × 10-70.1371.73 × 10-49.0
1.03 × 10-83.33 × 10-50.1943.1 × 10-44.5
Receivedfluxdensity, T
AttenuationSkin depth, mm
Transmittedfluxdensity, T
Frequency, kHz
Steel properties:
Relative permeability: 250
Conductivity: 6.0 × 106 Sm-1
Mild steel plate
Mild steel enclosure
Experimental Configuration
Laboratory System
-100
-90
-80
-70
-60
-50
-40
-30
-20
-10
0
0 5000 10000 15000 20000 25000
Frequency, Hz
Am
plit
ude,
dB
-0.923870.382680.923870.382689.0
-0.555560.831460.555560.831464.5
p1, imaginaryp
1, realp
0, imaginaryp
0, realCentre Frequency, kHz
Pole locations for two IIR filters
IIR Filter Frequency Response at 9 kHz
Line Scan Results at 4.5 kHz and 9 kHz
0
100
200
300
400
500
600
700
800
900
0 200 400 600 800 1000
Distance across plate, mm
mV
(R
MS
)
1.00E-07
1.00E-06
1.00E-05
1.00E-04
1.00E-03
1.00E-02
1.00E-01
1.00E+00
0 5000 10000 15000 20000 25000
Frequency, Hz
Log a
mplit
ude
0
200
400
600
800
1000
1200
1400
0 200 400 600 800 1000
Distance across plate, mm
mV
(R
MS
)
1.00E-07
1.00E-06
1.00E-05
1.00E-04
1.00E-03
1.00E-02
1.00E-01
1.00E+00
0 5000 10000 15000 20000 25000
Frequency, Hz
Log a
mplit
ude
4.5 kHz 9 kHz
Case study 2: Detection of low amplitude ultrasonic
pulses propagated through seawater
via a steel structure
7 m structure being lowered into the dockat Liverpool, UK
Location of transmitter
InstrumentationInstrumentation
amplifieramplifier
(x 400)(x 400)
DigitalDigital
OscilloscopeOscilloscope
super super
narrowbandnarrowband
filterfilter
digital gaindigital gain
(x 2048)(x 2048)
DSPDSP
MicrocontrolledMicrocontrolled
pulserpulser
TransmittingTransmitting
transducertransducer
ReceivingReceiving
transducertransducer
100 m100 m
650 nVPeak received signal
Geometric (1/r2)Attenuation
hemisphericalDivergence angle
20 VTransmission amplitude
40 kHzFrequency
Tone burstSignal type
Experimental Configuration
Time
Am
plit
ude
Time
Am
plit
ude
Time
Am
plit
ude
Typical Results
(a) Detail of original received signal
degraded by noise.
(b) Detail of received signal,
recovered by super narrowband
filter.
(c) Complete tone burst signal
detected after transmission
through water, recovered using
a super narrowband IIR filter.
(a)
(b)
(c)
Conclusions
• Flexibility ensures that real time DSP is suitable for many applications in weak field detection
• Software-realized processing yields very significant improvements with regard to stability, precision and repeatability
• Multiple frequencies can be interrogated simultaneously, unlike lock-in detection
• At least a factor of ten cheaper than lock-in detection
• New generation DSP devices are extending the range of signal frequencies over which real time discrete processing can be applied
• However: DSP system design requires investments in time and effort
Acknowledgements
With thanks to Bosco Fernandes, Rito Mijarez, Graham Miller and Muhammad Zaid. We also acknowledge the EPSRC for financially
supporting this work.