20-6554: Digital Signal Processing

pancakesbootΤεχνίτη Νοημοσύνη και Ρομποτική

24 Νοε 2013 (πριν από 3 χρόνια και 10 μήνες)

85 εμφανίσεις

20
-
6554: Digital Signal Processing

Chapter 10


Random DSP

DSP principally concerned with processing signals; this chapter aims to
answer the following questions:

Chapter 10: Introduction


10.2



next page….

BSc 4 Mathematics. 20
-
6554: Digital Signal Processing


How are the statistical measures of random signals and noise affected by
processing?


If we know these at the input to a filter/process, can we predict what they
will be at the output?


Can we design an optimum processor for enhancing a signal contaminated
by noise?

BSc 4 Mathematics. 20
-
6554: Digital Signal Processing


10.3

next page….

10.2 Response of Linear Processors

Compare input and output of an LTI processor to a random sequence.
Reconsider digital convolution of this signal.

Section 2.4 illustrated the process of using the impulse response of a system,
h[n], to find the response to a signal x[n] (flip and shift).

Apply the same process here.

For a random signal
-

do not know the individual sample values, just the
statistical properties
-

cannot do the calculation directly. However:


Outputs are the weighted sum of random inputs, the weights from h[n].
Successive outputs are now not mutually independent.


The correlation increases with the number of terms in h[n]


a long h[n]
implies a narrow frequency band. Narrow band
-
pass filters therefore
result in highly correlated output data.


If the input is white then the outputs are weighted sums of random
numbers


for which the means and variances are additive. The mean of
the output is then the mean of the input multiplied by the sum of the
impulse response terms.

BSc 4 Mathematics. 20
-
6554: Digital Signal Processing


10.4

next page….

The mean expected value of the output sequence is:





[ ] [ ] [ ] [ ]
y x
k k
m E y n E x n k h k m h k
 
 
   
 
The mean of the output is the mean of the input multiplied by the sum of the
impulse response terms.

Intuitive


remember the GAIN of the filter? See the example 10.1 (p319)


included as

sec10.1.xls
.

BSc 4 Mathematics. 20
-
6554: Digital Signal Processing


10.5

next page….

Output ACF


from the convolution sum, we can follow the maths on pp320,321 to get







yy xx
q
m m q j q
 


 



j q
[ ]
h n
, where

is the ACF*N of

Note that
j
[
q
] is not strictly speaking the ACF of
h
[
n
] since it is not the
average

product.

In summary:

The ACF of the output of a LTI processor is the convolution of the ACF of the
input with the ACF*N of the impulse response of the processor.

The Excel worksheet 10.2, in the workbook
sec10.1.xls

illustrates this.

BSc 4 Mathematics. 20
-
6554: Digital Signal Processing


10.6

next page….

Variance:


Output variance = central value of output covariance function:

2 2
[0] [0]
y
y yy yy
m
  
  
and since

[0] [ ] [ ]
yy xx
m
m j m
 




we get



2
2
[ ] [ ]
y xx x
m n
m j m m h n
 
 
 
 
 
 
 
 
For zero mean,



2
[0] [ ]
y yy xx
m
m j m
  


 

BSc 4 Mathematics. 20
-
6554: Digital Signal Processing


10.7

next page….

Power Spectrum:







2
yy xx
P H P
   
Output power spectrum is the input spectrum multiplied by the squared
magnitude of the processor’s frequency response

BSc 4 Mathematics. 20
-
6554: Digital Signal Processing


10.8

next page….

10.3: White Noise Through a Filter

Must process a signal in an appropriate fashion


if it is noise, we may wish to
filter it out; if it is a wanted signal we may need to enhance or extract it.

Measures such as the mean, variance, ACF and power spectrum are used.

The previous formulae are simplified for white noise, which has zero
mean and unit variance.

The statistical properties of the input are therefore:





2
0,1,
x x xx
m m m
  
  
and equation 9.14

gives:

( ) [ ]
j m
xx xx
m
P m e


 

 
 

 






0
1
j m j m
xx xx
m
m
P m e e


   


   

confirming that the power spectrum of the sequence is ‘flat’ or white.

BSc 4 Mathematics. 20
-
6554: Digital Signal Processing


10.9

next page….

After filtering, the mean value of the output,

y
m
will be 0.

For the ACF











[ ]
yy xx
q q
m m q j q m q j q j m
  
 
 
    
 
For the variance:





2 2
0 0 [0]
y yy y yy
m j
  
   
… so the ACF of the output = the ACF of the filter/processor itself

So,
for white noise input
, the output properties (ACF and spectrum) reflect the
properties of the processor rather than the signal.

The statistical properties of the output are therefore:









2
2
0,[0],,
y y yy yy
m j m j m P H
 
     
See
worksheet 10.6
to illustrate Figures 10.6 and 10.7 from the book.

BSc 4 Mathematics. 20
-
6554: Digital Signal Processing


10.10

next page….

10.4 System Identification by Cross
-
Correlation

For input in the form of ‘white’ noise, the CCF between the input and the
output characterises the system



any ‘non
-
whiteness’ in the output is due to the frequency
-
selective properties
of the system itself.

The cross
-
correlation function is:

[ ] [ ] [ ]
xy xx
k
m m k h k
 


 

The output y[n] is the convolution of the input x[n] with the impulse response h[n].

For white noise input (mean=0, variance=1), the ACF is a delta function, so:

[ ] [ ] [ ] [ ]
xy
k
m m k h k h m
 


  

So, given a white noise input, the input/output CCF is identical to the system’s
impulse response, which completely defines it in the time domain.

See example on worksheet 10.8.

BSc 4 Mathematics. 20
-
6554: Digital Signal Processing


10.11

next page….

Generate random x[n] and apply a filter h[n] by convolution to get y[n].

Take the CCF of this x and y and find that it matches h[n]:

In the frequency
-
domain convolution is replaced by multiplication:







xy xx
P P H
   
For white noise (mean=0, variance=1)



1
xx
P
 




xy
P H
  
so

Note the non
-
linear discussion on p332/3.

BSc 4 Mathematics. 20
-
6554: Digital Signal Processing


10.12

next page….

10.5 Signals in Noise

One of the most important application areas of DSP is the extraction of
signals from noise. There are usually three aims:


Recovery



extracting the detail of the signal from the noise. We will look at
an example dealing with narrow
-
band signal with wide
-
band noise.


Detection



determining whether a signal of known shape is present. Dealt
with using a technique known as
matched

filtering
.


Enhancement of a repetitive signal



by averaging over many repetitions.

BSc 4 Mathematics. 20
-
6554: Digital Signal Processing


10.13

next page….

1. Signal Recovery

Recovery of narrow
-
band signal from wide
-
band noise. Predict improvement in
signal/noise ratio that can be gained from linear filtering.

Output noise power is



2
1
[0]
2
yy yy
P d



  





2
2
1
[0]
2
yy xx
H P d



   

If the form of



2
H

is as given in fig 10.10:



2
1
[0]
2
yy xx
P d



  

and if the noise spectrum is white,

2
1
[0] 1
2
yy
d

 


 

So the reduction in total noise power (or variance) through the filter is just the
ratio of the filter bandwidth to


BSc 4 Mathematics. 20
-
6554: Digital Signal Processing


10.14

next page….

2. Matched
-
Filter Detection

One of the most important techniques.

In this case we assume we
know

the shape (or waveform) of the signal we are
looking for. We need to determine
if

and
when

it occurs.

Convolution and correlation are very similar


the only real difference is that in
the case of convolution one of the two signals being multiplied and summed is
reversed in time.

The operation of the matched filter illustrates this


it is in effect a
matched
correlator
, producing an output similar in form to the ACF of the signal to which
it is matched.

The matched filter is the signal x[n], but time
-
reversed.

The output from a matched filter is a signal, and a function of the time parameter
n, not the lag m.

Its peak central value occurs at the instant when the complete signal has entered
the filter, not at n=0, but the form is the same as the ACF.

BSc 4 Mathematics. 20
-
6554: Digital Signal Processing


10.15

next page….

Object is not to extract a signal but to find a filter that gives the maximum
output whenever the signal waveform occurs.

See example
worksheet 10.13
:

Matched filter behaviour when
the data have noise with 0
variance added

The noise has a variance of 0.3.
The signal is still evident in the
ACF.

In both cases the ACFs have
been offset by 1.5 for visibility.

Case 1

Case 2

BSc 4 Mathematics. 20
-
6554: Digital Signal Processing


10.16

next page….

To determine the improvement in signal to noise ratio, for the special case
of white noise:

The peak input signal is denoted by

ˆ
x
The peak output is the central value of the ACF

2
[0] ( [ ])
xx
n
x n





The variance of white noise through a linear filter increases by a factor

[0]
xx

so the overall S/N ratio due to matched filtering (measured via signal and noise
amplitudes) is:

2
(peak output)/(peak input)
ˆ
[0]/
ˆ
( [ ])
(peak output)/(peak input)
[0]
signal
xx
n
xx
noise
x
x n x




 

For the data used in the example above,

ˆ
x
=1

The S/N is calculated in the spreadsheet.

BSc 4 Mathematics. 20
-
6554: Digital Signal Processing


10.17

next page….

Cannot improve the S/N by repeating the matched filtering


the output
is already optimal.

The S/N improvement will increase for longer signals, and for signals which are
more ‘spread’ in time


the earlier equation above shows that this improvement
depends upon the ratio between the sum of the squares of the sample values
and the peak sample value.

The best results need a signal with a large sum of squares (large total energy)
and a small peak value.

The signal needs to be spread out with values more or less equal.

For the purposes of detection it would be helpful for the signal to have a strong
peak zero ACF and small values elsewhere.

Such a signal is known as a
Pseudo
-
Random Binary Sequence (PRBS)



a
random series of values +1 and
-
1.

In
worksheet 10.14
in the current Excel workbook this is simulated, reproducing
Figure 10.14 (p345) of the book.

BSc 4 Mathematics. 20
-
6554: Digital Signal Processing


10.18

next page….

A PRBS of length 64 is generated, and applied three times to a data set
of length 420 points, with two of them overlapping.

The matched filter’s impulse response (as normal) is a time
-
reversed version of
this, and the result of the filter is obtain by convolving the two.

This is illustrated in the figure


which is presented for several cases: no noise,
noise with a variance of 0.3 and (illustrating how well this process works, with a
variance of 1).

BSc 4 Mathematics. 20
-
6554: Digital Signal Processing


10.19

next page….

Note some ‘real
-
world’ examples of
this on p346.

BSc 4 Mathematics. 20
-
6554: Digital Signal Processing


10.20

next page….

10.5.4: Signal Averaging


For a repeated signal (over a known interval) in the presence of noise, we can
improve the S/N ratio by averaging over a number of samples.

Simulated in
worksheet 10.15
, where a repeated delta function has been filtered.

Noise is added with a given variance; the output is averaged a number of times.

The principle is that the signal values add but the noise values average out.

BSc 4 Mathematics. 20
-
6554: Digital Signal Processing


10.21

next page….

SUMMARY


Output values:



[ ] [ ] [ ] conv [ ],[ ]
y n h n x n x n h n
  
Output mean:



[ ]
y x
k
m m h k




Output ACF:





[ ] conv [ ],ACF [ ]
yy xx
m m h n
 

Output variance:



2
2 2
[0] [0] [0] [ ]
y yy yy y yy x
m m h n
   
    

when input is random and white,



0,0
x y
m m
  
2
[0]
y yy
 

[ ] [ ]
xx
m m
 



2
0
ACF [ ]
y
m
h n



,

,

BSc 4 Mathematics. 20
-
6554: Digital Signal Processing


10.22

( ) [ ]
j m
xx xx
P m e

 
 

2
( ) ( ) ( )
yy xx
P H P
   


[ ] conv [ ],[ ]
xy xx
m m h k
 

for white noise input,

[ ] [ ]
xy
m h m


(since

[ ] [ ]
xx
m m
 

)

( ) ( ) ( )
xy xx
P P H
   
for white noise input,

( ) 1
xx
P
 
and

( ) ( )
xy
P H
   
Summary #2: Power Spectra and ACF/CCF