Top Banner
CHAPTER -1 INTRODUCTION 1.1 OVERVIEW:- It may be worth trying to understand the meaning of the terms ‘Adaptive’ and ‘filters’ in a very general sense. The adjective ‘Adaptive’ can be understood by considering the system which is trying to adjust itself so as to respond to some phenomenon that is taking place in its surrounding. In other words the system tries to adjust its parameters with the aim of meeting some well-defined goal or target which depends upon the state of the system as well as its surrounding. This is what ‘Adaptation’ means. Moreover, there is a need to have a set of steps or certain procedure by which this process of ‘Adaptation’ is carried out. And finally, the ‘system’ that carries out and undergoes the process of ‘Adaptation’ is called by the more technical, yet general enough, name ‘filter’. The subject of adaptive filters constitutes an important part of statistical signal processing. Whenever there is a requirement to process signals that result from operation in an environment of unknown statistics or one that is inherently non-stationary, the use of an adaptive filter offers a highly attractive solution to the problem as it provides a significant improvement in performance over the use of a fixed filter designed by conventional methods. Furthermore, the use of adaptive filter provides 1
58
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: File 2

CHAPTER -1 INTRODUCTION

1.1 OVERVIEW:-

It may be worth trying to understand the meaning of the terms ‘Adaptive’ and

‘filters’ in a very general sense. The adjective ‘Adaptive’ can be understood by

considering the system which is trying to adjust itself so as to respond to some

phenomenon that is taking place in its surrounding. In other words the system tries to

adjust its parameters with the aim of meeting some well-defined goal or target which

depends upon the state of the system as well as its surrounding. This is what

‘Adaptation’ means. Moreover, there is a need to have a set of steps or certain procedure

by which this process of ‘Adaptation’ is carried out. And finally, the ‘system’ that carries

out and undergoes the process of ‘Adaptation’ is called by the more technical, yet

general enough, name ‘filter’.

The subject of adaptive filters constitutes an important part of statistical signal

processing. Whenever there is a requirement to process signals that result from operation

in an environment of unknown statistics or one that is inherently non-stationary, the use

of an adaptive filter offers a highly attractive solution to the problem as it provides a

significant improvement in performance over the use of a fixed filter designed by

conventional methods. Furthermore, the use of adaptive filter provides new signal

processing capabilities that would not be possible otherwise. We thus find that adaptive

filters have been successfully applied in such diverse fields as communications, control,

radar, sonar & biomedical engineering, among others.

The term estimator or filter is commonly used to refer to a system that is designed

to extract information about a prescribed quantity of interest from noisy data. Clearly,

depending upon the time required to meet the final target of the adaptation process,

which we call convergence time, and the complexity/resources that are available to carry

out the adaptation, we can have a variety of adaptation algorithms and filter structures.

From this point of view, we may go through the adaptive algorithms like LMS, NLMS,

VSLMS, VSNLMS, RLS..

1

Page 2: File 2

1.2 OBJECTIVE OF THE PROJECT

Nowadays there are so many cases where the noise is unknown and variable. This kind

of noises cannot be suppressed by using fixed filters like notch, etc. To suppress this kind

of noise Adaptive Filter is used. Adaptive means tendency to adapt different situations.

The use of an adaptive filter offers a highly attractive solution to the problem as it

provides a significant improvement in performance over the use of a fixed filter designed

by conventional methods. This seminar is based on various techniques and algorithms for

noise cancellation like LMS, NLMS, RLS,etc..

1.3 PROJECT SCOPE

This project is focused to design and build a adaptive filter that would filter

the unwanted noise by using various algorithms like LMS, NLMS, RLS,etc .This type

of filters can be used in many practical applications such as in ear phones.

1.4 ANALYZING THE PROJECT:-

The use of adaptive filter provides new signal processing capabilities that would

not be possible otherwise. We thus find that adaptive filters have been successfully

applied in such diverse fields as communications, control, radar, sonar & biomedical

engineering, among others[1]. The term estimator or filter is commonly used to refer to a

system that is designed to extract information about a prescribed quantity of interest from

noisy data. Clearly, depending upon the time required to meet the final target of the

adaptation process, which we call convergence time, and the complexity/resources that

are available to carry out the adaptation, we can have a variety of adaptation algorithms

and filter structures. From this point of view, we may go through the adaptive algorithms

like LMS, NLMS, VSLMS, VSNLMS, RLS

1.5) IMPROVEMENT TO THE PREVIOUS PROJECT:-

Digital signal processing (DSP) has been a major player in the current technical

advancements such as noise filtering, system identification, and voice prediction.

Standard DSP techniques, however, are not enough to solve these problems quickly and

obtain acceptable results. Adaptive filtering techniques must be implemented to promote

accurate solutions and a timely convergence to that solution.

2

Page 3: File 2

1.6) THESIS ORGANIZATION

This thesis consists of six chapters. This chapter discuss about overview of

project, objective research, project scope, problem statement and thesis organization.

Chapter 2 contains a detailed description of adaptive filtering and the

blocks involved in their design.

Chapter 3 includes the project methodology. It will explain how the project is

organized and the flow of process in completing this project. Also in this topic

discusses the methodology of the system, circuit design, software design and the

mechanical design.

Chapter 4 contained detailed description about hardware development.

It will explain more detail about the electronic component that had been used and the

method used to develop hardware.

Chapter 5 includes the software methodology. This will discuss more about the

software that had been use to design a programming for the whole project and the

software that had been used to design a Printed Circuit Board (PCB).

Chapter 6 will discuss more about the result and discussion. This chapter will

show the result of this project step by step.

3

Page 4: File 2

CHAPTER 2

ADAPTIVE FILTERING

2.1) INTRODUCTION:

A filter is designed and used to extract or enhance the desired information

contained in a signal. An adaptive filter is a filter with an associated adaptive

algorithm for updating filter coefficients so that the filter can be operated in an

unknown and changing environment. The adaptive algorithm determines filter

characteristics by adjusting filter coefficients (or tap weights) according to the signal

conditions and performance criteria (or quality assessment). A typical performance

criterion is based on an error signal, which is the difference between the filter output

signal and a given reference (or desired) signal. An adaptive filter is a digital filter

with coefficients that are determined and updated by an adaptive algorithm.

Therefore, the adaptive algorithm behaves like a human operator that has the ability to

adapt in a changing environment. For example, a human operator can avoid a

collision by examining the visual information (input signal) based on his/her past

experience (desired or reference signal) and by using visual guidance (performance

feedback signal) to direct the vehicle to a safe position (output signal).

2.2)Adaptive Filtering System Configurations :

There are four major types of adaptive filtering configurations; adaptive system

identification, adaptive noise cancellation, adaptive linear prediction, and adaptive

inverse system. All of the above systems are similar in the implementation of the

algorithm, but different in system configuration. All 4 systems have the same general

parts; an input x(n), a desired result d(n), an output y(n), an adaptive transfer function

w(n), and an error signal e(n) which is the difference between the desired output u(n)

and the actual output y(n). In addition to these parts, the system identification and the

inverse system configurations have an unknown linear system u(n) that can receive

an input and give a linear output to the given input.

2.2.1)Adaptive System Identification Configuration

The adaptive system identification is primarily responsible for

determining a discrete estimation of the transfer function for an

4

Page 5: File 2

unknown digital or analog system. The same input x(n) is applied to

both the adaptive filter and the unknown system from which the

outputs are compared (see figure 1). The output of the adaptive filter

y(n) is subtracted from the output of the unknown system resulting in a

desired signal d(n). The resulting difference is an error signal e(n) used to manipulate

the filter coefficients of the adaptive system trending towards an error signal of zero.

Both of the noise signals for this configuration need to be uncorrelated to the signal

s(n). In addition, the noise sources must be correlated to each other in some way,

preferably equal, to get the best results. Do to the nature of the error signal, the error

signal will never become zero. The error signal should converge to the signal s(n), but

not converge to the exact signal. In other words, the difference between the signal s(n)

and the error signal e(n) will always be greater than zero. The only option is to

minimize the difference between those two signals.

2.2.2)Adaptive Linear Prediction Configuration

Adaptive linear prediction is the third type of adaptive configuration (see figure 3).

This configuration essentially performs two operations. The first operation, if the

output is taken from the error signal e(n), is linear prediction. The adaptive filter

coefficients are being trained to predict, from the statistics of the input signal x(n),

what the next input signal will be. The second operation, if the output is taken from

y(n), is a noise filter similar to the adaptive noise cancellation outlined in the previous

section.

5

Page 6: File 2

As in the previous section, neither the linear prediction output nor the noise

cancellation output will converge to an error of zero. This is true for the linear

prediction output because if the error signal did converge to zero, this would mean

that the input signal x(n) is entirely deterministic, in which case we would not need

to transmit any information at all.

In the case of the noise filtering output, as outlined in the previous section, y(n) will

converge to the noiseless version of the input signal.

2.2.3)Adaptive Inverse System Configuration

The final filter configuration is the adaptive inverse system

configuration as shown in figure 4. The goal of the adaptive filter here

is to model the inverse of the unknown system u(n). This is particularly

useful in adaptive equalization where the goal of the filter is to

eliminate any spectral changes that are caused by a prior system or

transmission line. The way this filter works is as follows. The input x(n)

is sent through the unknown filter u(n) and then through the adaptive

filter resulting in an output y(n). The input is also sent through a delay

to attain d(n). As the error signal is converging to zero, the adaptive

filter coefficients w(n) are converging to the inverse of the unknown

system u(n).

6

Page 7: File 2

For this configuration, as for the system identification configuration, the error can

theoretically go to zero. This will only be true, however, if the unknown system

consists only of a finite number of poles or the adaptive filter is an IIR filter. If neither

of these conditions are true, the system will converge only to a constant due to the

limited number of zeroes available in an FIR system.

2.3)APPLICATIONS OF ADAPTIVE FILTERING:-

Adaptive filtering finds practical applications in many diverse fields such as

communications, radar, sonar, control, navigation, seismology, biomedical

engineering and even in financial engineering [1–7]. In Section 1.6, we will introduce

some typical applications using adaptive filtering.

2 . 4CONCLUSION :

This chapter also briefly introduces subband adaptive filters that are more

computationally efficient for applications that need a longer filter length, and are

more effective if the input signal is highly correlated. For example, high-order

adaptive filters are required to cancel the acoustic echo in hands-free telephones [2].

The high-order filter together with a highly correlated input signal degrades the

performances of most time-domain adaptive filters. Adaptive algorithms that are

effective in dealing with ill-conditioning problems are available; however, such

algorithms are usually computationally demanding, thereby limiting their use in many

real-world applications.

7

Page 8: File 2

CHAPTER-3 ADAPTIVE ALGORITHMS3.)INTRODUCTION:

An adaptive algorithm is a set of recursive equations used to adjust the weight

vector w(n) automatically to minimize the error signal e(n) such that the weight vector

converges iteratively to the optimum solution wo that corresponds to the bottom of the

performance surface, i.e. the minimum MSE Jmin. The least-mean-square (LMS)

algorithm is the most widely used among various adaptive algorithms because of its

simplicity and robustness

3.2 LMS algorithm:The least mean square (LMS) algorithm is the simplest and is the most universally

applicable adaptive algorithm to be used. This algorithm is used for the descending on

the performance surface, and is known as the least mean square algorithm. The weights

are updated using this algorithm. This algorithm uses a special estimate of the gradient

that is valid for the adaptive linear combiner. This algorithm is important because of its

simplicity and ease of computation, and it doesn’t require off-line gradient estimations or

repetitions of data. If the adaptive system is an adaptive linear combiner, and if the input

vector x(n) and the desired response d(n) are available at each iteration, the LMS

algorithm is generally the best choice for many different applications of adaptive signal

processing [Kuo96].

3.3 Filtered- X LMS algorithm:

The use of adaptive filter is complicated by the fact that electrical reference signal must

be obtained from the acoustic pressure using a microphone. Also, an electrical error

signal must be obtained from the residual acoustic noise using as error microphone.

Finally, the canceling sound must be produced from the electrical output signal using a

loud speaker. Therefore, a number of other transfer functions must be included. The

summing junction represents acoustic superposition in the space from the canceling

loudspeaker to the error microphone, where the primary noise is combined with the

output of the adaptive filter. Therefore it is necessary to compensate for the secondary

path transfer function S(z) from y(n) to e(n),which includes the D/A converter,

reconstruction filter, power amplifier error microphone etc. [Kuo96].

3.4Transform Domain Adaptive Algorithm:

The main shortage of the filtered –X LMS algorithm, which is widely used in a variety of

active noise control (ANC) systems, is that its convergence behavior highly depends on8

Page 9: File 2

the power spectrum of the filtered reference signal. The more correlated reference signal

is the slower convergence speed the adaptive filter can achieve. Transform domain

adaptive filter (TDAF) into ANC to solve this problem. To strongly correlate broadband

signal, TDAF can achieve much faster convergence speed than LMS with relative low

computational cost [Son02]. These three algorithms are elaborated in Appendix A.

3.5)Practical applications

Noise canceling headphones are particularly useful for workers, operating or working

near heavy machinery and engines. The noise is selectively eliminated thus enabling the

reception of the desired sounds, such as speech and warning signals.

Cabin noise in small aircraft is a combination of noise from a variety of sources,

the major ones being the engine, wind, and propeller. So plane pilots routinely wear

noise attenuating headsets to get rid of the unwanted noise. Such headsets usually

employ passive noise attenuation in the form of an annular cushion carried on the rim of

each earcup. But NCH is proved to be worthy in attenuating noise to a further level

which makes the pilot as well as passengers to hear warnings and instructions

effectively. In hospitals to diagnose the hearing defects in human ear and speech

discrimination,

noiseless room is required which is highly expensive. Most of the hospitals cannot afford

to procure such rooms. The noise canceling headphone along with audiometry

apparatus can be useful in this application.

The proposed NCH for audiometry is as shown in Fig.6. A test tone is given toheadphone as input. A microphone is placed inside the headphone which senses noisealong with tone. The test tone is subtracted from the microphone output using spectralsubtraction before it is given as input to LMS block. The output of the LMS block is ananti noise signal which is added to test tone at the summing block. Finally the speakergives an output which is a combination of anti noise signal and tone so that anti noisesignal cancels the noise and listener only gets test tone. The attenuation required foraudiometry application is high compared to other applications of NCHs. So the betterpassive attenuation as well active attenuation is required.

9

Page 10: File 2

In military applications, the soldiers usually work noisy environments. NCH are handy inhearing commands through mobile sets devoid of any noise. As a commercial application NCHs along with personalized music system (Walkman,etc.) can provide better listening conditions for music. Sony, NCT, Aiwa, and BoseCorporation are producing these headphones, mainly used for audio listening.Information of these is given in Appendix B.

CHAPTER-4 MATHEMATICAL EQUATIONS TO VARIOUS ALGORITHMS LMS AlgorithmThe LMS algorithm is used to create a filter w. The input is defined as the vector x, the

output is the scalar y, and the desired output is the scalar d. The output is calculated

according to

y(n) = x(n)T w(n) (1)

where the subscript n defines the time indexing. The scalar error e(n) is defined as

e(n) = d(n) – y(n) and the filter is updated according to w(n+1) = w(n) + 2 m e(n) x(n)

(3) where m is an update coefficient that determines the speed of the adaptation. We also

define R = E[xxT] (where E[·] denotes expectation) as the autocorrelation matrix. The

largest valid value of m is 1/lmax, where lmax is the largest eigenvalue of R. Larger

values of m will cause instability and the weights will not converge. The error signal will

decrease as the weights converge, and follow a set of exponential curves, each with time

constant tn = 1/ (4mln) where ln is the nth eigenvalue of R.

The LMS algorithm is one of a class of gradient descent algorithms. Another

variant, known as the a-LMS algorithm is given by

w(n+1)= w(n) + a e(n)x(n)/|x(n)|2

10

Page 11: File 2

Figure.7 System identification block diagram,

Note that 2m has been replaced by a, and the input signal x(n) is scaled by its

magnitude. These changes remove the need for eigenvalue estimation to choose m.

Values in the range 0 < a < 2 converge, and the time constants are unchanged since the

ratio of eigenvalues in R are still the same. This algorithm is particularly useful in the

face of nonstationary x signals. In this case, the assumption that scaling x(n) leaves the

eigenvalue ratio unchanged is false. However, it still relieves us of the estimation of

values for m and thus it is useful for nonstationary x. The main drawback of the LMS

algorithm is the speed of convergence becomes very slow if there is a big spread among

the eigenvalues of R and changes in the feedback path. The existence of the secondary

path affects the performance of ANC filter and the convergence of the LMS algorithm .

Filtered –X LMS algorithm

Figure.8 Block diagram of ANC system using the FXLMS algorithm, from [Kuo96].

The compensation can be carried by placing an inverse filter in series with the

loudspeaker or placing as identical filter in the reference signal path to the weight update

of LMS algorithm. The placement of the secondary path transfer function following the

digital filter W(z) controlled by the LMS algorithm is shown in figure 8.The residual

error is expressed as

e( n) =d(n)-y’(n)

=d(n)-s(n) * y(n)

=d(n – s(n) * [w T(n) x(n)]

11

Page 12: File 2

where s(n) is the impulse response of the secondary path S(z) at time n,* denotes linear

convolution,

w(n)= [w0(n) w1(n) . . . w L-1(n)]T

is the coefficient vector of W(z) at times n,

x(n) = [x(n) x(n-1) … x(n-L+1)]T

is the signal vector at time n and L is the order of the filter W(z)

The objective of the adaptive filter is to minimize the instantaneous squared error,

xˆ(n) =e2(n) .The most widely used method to achieve this is the stochastic gradient or

LMS algorithm, which updates the coefficient in the negative gradient direction with step

size m

w(n+1)=w(n)-2ˆ(n) where xˆ(n) is an instantaneous estimate of the MSE gradient at time n, and can be

expressed as W(n) = w(n) + m x’(n) e(n)

The implementation of the filtered-x LMS algorithm is more complicated than that of

the normal LMS algorithm because of the need to generate the filtered reference signal.

Also the stability of the algorithm depends on the accuracy of the estimated

filter Sˆ(z)modeling the true secondary path [Kuo96].

Transform Domain Adaptive Algorithm

Figure.9 Feedforward ANC headset, from [Son02].The main difference between Filtered X DCT- LMS and Filtered X- LMS algorithms is

that two orthogonal transform parts of Sliding DCT (SDCT) are interposed. The

reference signal x(n) is acquired through reference microphone as the error signal e(n)

through the error microphone. The primary path P(z) describes the acoustic response

from reference microphone to error microphone while the secondary path S(z) consists

of transfer functions from adaptive filter output to error microphone .W(z) is the adaptive

12

Page 13: File 2

filter to minimize the residual error signal e(n).To compensate the secondary path effect,

Sˆ(z) ,the estimate of S(z),is introduced to filter x(n) .

Figure.10 Block diagram of Filtered X DCT-LMS algorithm, as described in [Son02].The Filtered X DCT-LMS algorithm can provide not only fast, but also uniform

convergence speed throughout whole broadband [Son02].

CHAPTER-5 APPLICATIONS OF ADAPTIVE FILTERING

Adaptive filters are used in many applications because of their ability to operate

in unknown and changing environments. Adaptive filtering applications can be classified

in four categories: adaptive system identification, adaptive inverse modeling, adaptive

prediction and adaptive array processing.

In this section, we introduce several applications of adaptive filtering. These

applications are implemented in MATLAB code for computer simulation. MATLAB

examples include acoustic echo cancellation, adaptive interference cancellation, adaptive

line enhancer, active noise control, adaptive channel equalizer, acoustic feedback

reduction for hearing aids and adaptive array processing. These applications provide a

useful platform to evaluate the performance of different adaptive algorithms. Several

plots include an ensemble or time-averaged square error, and the norm of weight error,

echo return loss, spectrogram of error signal and magnitude-squared coherence, etc., are

used to evaluate the performance of these algorithms.

1.6.1 Adaptive system identification

A structure of adaptive system identification (or modeling) is shown in Figure 1.5, where

13

Page 14: File 2

the adaptive filter is placed in parallel with an unknown system (or plant) to be

identified.

The adaptive filter provides a linear model that is the best approximation of the unknown

system. The excitation signal u(n) serves as the input to both the unknown system and

the adaptive filter, while η(n) represents the disturbance (or plant noise) occurring within

the unknown system. The objective of the adaptive filter is to model the unknown system

such that the adaptive filter output y(n) closely matches the unknown system output d(n).

This can be achieved by minimizing the error signal e(n), which is the difference

between the physical response d(n) and the model response y(n). If the excitation signal

u(n) is rich in frequency content, such as a white noise, and the plant noise η(n) is

small and uncorrelated with u(n), the adaptive filter identifies the unknown system from

the input–output viewpoint.

Figure 1.5 Block diagram of adaptive system identification

The adaptive system identification has been widely applied in echo cancellation,active

noise control, digital control, geophysics and communications. In fact, many problems

can be formulated from the adaptive system identification point of view. A typical

example is the acoustic echo cancellation (AEC), which finds many applications in

hands-free telephones, audio (or video) conferencing systems, hearing aids, voice-control

systems and much more. This book uses the adaptive identification of unknown systems

with a long impulse response in later chapters to illustrate the performance of subband

adaptive filters.

14

Page 15: File 2

1.6.1.1 Acoustic echo cancellation

The acoustic echo in hands-free telephones arises when the microphone picks up the

sound radiated by the loudspeaker and its reflections in a room. Figure 1.6 shows a

general AEC configuration for hands-free telephony systems. Speech originating from

the far-end talker is amplified and reproduced by a loudspeaker. The output of the

loudspeaker will be picked up by the microphone via the acoustic echo path in the room.

This signal is transmitted back to the far-end user where it is perceived as acoustic echo.

The far-end user is annoyed by listening to his/her own speech delayed by the round-trip

traveling time of the system. The acoustic echo can be canceled electronically using an

adaptive filter, as illustrated in Figure 1.6.

Figure 1.6 Block diagram of an acoustic echo canceller

The adaptive filter models the acoustic echo path between the loudspeaker and

microphone. The estimated transfer function is used to filter the far-end speech signal

u(n) to generate an echo replica y(n), which is then used to cancel the acoustic echo

components in the microphone signal d(n), resulting in the echo-free signal e(n).

The following three factors make the AEC a very difficult task:

(i) The acoustic echo path usually has long impulse response. The characteristics of

the acoustic path depend on the physical conditions of the room. For a typical office, the

duration of the impulse response (i.e. the reverberation time) is about 300 ms. At 8 kHz

sampling frequency, an adaptive FIR filter of 2400 taps is required to model the acoustic

echo path. As discussed in Section 1.4, a long adaptive FIR filter incurs a heavy

15

Page 16: File 2

computational load and results in slower convergence because of small step sizes, as

indicated .

(ii) The characteristics of the acoustic echo path are time varying and may change

rapidly due to the movement of people, doors opening or closing, temperature changes in

the room, etc. Therefore, an adaptive algorithm has to converge quickly to track any

changes by continuously updating the adaptive filter.

(iii) The excitation speech signal is highly correlated and nonstationary. For a short

speech segment, the spectral density may differ by more than 40 dB at different

frequencies. This also results in slow convergence, as shown in Equation .

1.6.1.2 Active noise control

A single-channel active noise control (ANC) for suppressing acoustic noise in an air duct

is shown in Figure 1.7 [4]. The input signal u(n) is acquired by a reference microphone

placed near the noise source. The primary noise travels to the error microphone via

Figure 1.7 An example of single-channel active noise control viewed as an adaptivesystem identification problem

an unknown plant. At the same time, the canceling loudspeaker generates a secondary

canceling noise that propagates to the error microphone via the secondary path. This

secondary noise has the same amplitude with opposite phase to cancel the primary noise

based on the principle of acoustic superposition. The residual noise picked up by the

error microphone is used as the error signal e(n) to update the adaptive filter. The ANC

system operates in the electrical domain, while the unknown plant and secondary path

16

Page 17: File 2

are located in the electroacoustic domain. ANC is a challenging application since there

are many considerations such as secondary path modeling and compensation, fast

changing environment and noise characteristics, interactions between acoustic and

electrical domains, placement of microphones and loudspeakers, and undesired acoustic

feedback from the canceling loudspeaker to the reference microphone. The script M-file

of the ANC application is ANC.m and its partial listing is shown below.

1.6.1.3 Adaptive noise cancellation

Adaptive noise (or interference) cancellation, illustrated in Figure 1.8, can be classified

as an adaptive system identification problem [6]. The system response d(n) consists of

the desired signal s(n) corrupted by noise v(n), i.e. d(n) = s(n) + v(n). Since there is

spectra overlap between the desired signal and noise, conventional fixed filters may

not be an effective solution in attenuating this noise. As shown in Figure 1.8, the input

signal u(n) consists of a noise v(n) that is correlated to v(n), but must be uncorrelated

with s(n). The adaptive filter produces an output signal y(n) that estimates v(n). Thusthe error signal approximates the signal s(n). If the signal s(n) is considered as thedisturbance η(n) shown in Figure 1.5 and the noise path is treated as the unknownsystem, adaptive noise cancellation can be considered as a system identification problem

Figure 1.8 Block diagram of the adaptive noise canceller

When the signal s(n) is absent during silent periods, the error signal approaches zero

and an accurate system identification of the noise path can be obtained. The script M-file

of the adaptive interference cancellation system is AIC.m and its partial listing is shown

below.

1.6.1.4 Acoustic feedback cancellation in hearing aids

17

Page 18: File 2

A hearing aid modifies and amplifies incoming sound to make it audible for people with

hearing loss [2]. Hearing aids are normally small in size to fit into the ear canal or

worn behind the ear. Due to the close proximity between the sound emitting transducer

(or receiver) and the microphone, acoustic feedback can occur in hearing aids or other

hearing devices such as Bluetooth headsets. Figure 1.9 shows the model of hearing aids

and the application of the adaptive filter to remove the acoustic feedback (leakage) from

the receiver to the microphone. The forward path is the processing unit of the hearing

aids and its output u(n) is fed into the adaptive filter and the receiver. The reference

signal d(n) picked up by the microphone is the summation of incoming sound and the

Figure 1.9 Block diagram of the hearing aids with acoustic feedback cancellation

feedback signal. The error signal e(n) is derived by subtracting the adaptive filter output

from the reference signal. Due to the high correlation between the reference signal d(n)

and the input signal u(n), the adaptive filter cannot model the feedback path accurately.

A delay is used in the cancellation path to decorrelate the reference signal and the input

signal. This acoustic feedback cancellation is also classified as the adaptive system

identification problem that uses the adaptive filter to model the feedback path. The script

M-file of the hearing aids application is HA.m and its partial listing is shown below.

1.6.2 Adaptive prediction

Adaptive prediction is illustrated in Figure 1.10, where the desired signal d(n) is assumed

18

Page 19: File 2

to have predictable signal components [3]. This signal is delayed by samples to

form the input signal for the adaptive filter to minimize the error signal e(n). The

adaptive filter predicts the current value of the desired signal based on the past samples.

A major application of adaptive prediction is the waveform coding of speech, such as the

adaptive differential pulse code modulation . In this application, the adaptive filter

exploits the correlation between adjacent samples of speech such that the prediction error

is much smaller than the original signal on average. This prediction error is then

quantized using fewer bits for transmission, resulting in a lower bit rate. Other

applications of adaptive prediction include spectrum estimation and signal whitening.

Adaptive prediction is also used to separate the signal from noise based on differences

between the signal and noise correlation. Depending on whether y(n) or e(n) is the

desired output, the adaptive predictor enhances the narrowband signal corrupted by

broadband noise or removes the narrowband interference from the corrupted broadband

signal. With reference to Figure 1.10, the input of the adaptive line enhancement consists

Figure 1.10 Block diagram of the adaptive predictor

of desired narrowband (or tonal) components t (n) corrupted by broadband noise v(n),

i.e. d(n) = t (n) + v(n). The delay must be sufficiently large to decorrelate the

broadband noise components, but the narrowband components still correlate in d(n) and

u(n). The adaptive filter compensates for the delay (or phase shift) in order to cancel the

narrowband components in d(n). Therefore, the filter output y(n) estimates the

narrowband components t (n) only, while the error signal e(n) approximates the

wideband noise v(n). This structure enhances the narrowband signal at the adaptive filter

output y(n) and is called the adaptive line enhancer. Usually, = 1 is adequate for

19

Page 20: File 2

white noise and >1 is used for color noise. The script M-file of the adaptive line

enhancer is ALE.m and allows the user to select different modes of operations.

1.6.3 Adaptive inverse modeling

Adaptive filters can be applied for adaptive inverse modeling (or channel equalization)

applications [7], where an unknown system is cascaded with an adaptive filter, as

illustrated in Figure 1.11. The desired signal d(n) is derived by delaying L samples of the

input signal s(n) using a delay unit z −L to compensate for the overall propagation delay

through the unknown system and the adaptive filter. The proper delay allows the

adaptive filter to converge to a causal filter that is the inverse of the unknown system.

Thus the adaptive filter equalizes the unknown system to recover the delayed version of

signal s(n − L) at the output y(n). The combined transfer function of the unknown system

and the adaptive filter approaches z −L. In some applications, such as the adaptive

channel equalizer in data modems, the desired signal is derived from the predefined data

sequence during the training stage.

Figure 1.11 Inverse channel modeling using an adaptive filter

Similar to the system modeling shown in Figure 1.5, if s(n) has a flat spectrum and

the plant noise is small and uncorrelated with s(n), the adaptive filter can adapt to an

accurate inverse model of the unknown system.

The above description of an adaptive channel equalizer assumes that the additive

noise η(n) shown in Figure 1.11 can be ignored. When significant noise is present, the

adaptive filter cannot converge to the exact inverse of the channel as effort is also needed

to minimize the additive noise. In addition, due to the channel inversion function, the

adaptive filter may amplify the noise at frequency bands where the unknown system

has small magnitude responses. Therefore, special considerations are needed to prevent

20

Page 21: File 2

excessive equalization at the expense of noise enhancement. Inverse modeling is widely

used in adaptive control, deconvolution and channel equalization.

For example, the adaptive equalizer is used to compensate the distortion caused

by transmission over telephone and radio channels [5]. In adaptive channel equalization,

s(n) is the original data at the transmitter that is transmitted to the receiver through the

unknown communication channel. At the receiver, the received data u(n) is distorted

because each data symbol transmitted over a time-dispersive channel extends beyond the

time interval used to represent that symbol, thus causing an overlay of received symbols.

Since most channels are time varying and unknown in advance, the adaptive filter is

required to converge to the inverse of the unknown and time-varying channel so that

y(n) approximates the delayed version of s(n).

After a short training period using pseudo-random numbers known to both the

transmitter and receiver in modems, the transmitter begins to transmit the modulated data

signal s(n). To track the possible changes in the channel during data transmission, the

adaptive equalizer must be adapted continuously while receiving the data sequence.

However, the desired signal is no longer available to the adaptive equalizer in the

receiver located at the other end of the channel. This problem can be solved by treating

the output of the decision device at the receiver as correct and using it as the desired

signal d(n) to compute the error signal, as shown in Figure 1.12. This technique is called

the decision-feedback equalizer, which works well when decision errors occur

infrequently.

1.6.5 Summary of adaptive filtering applications

A summary of adaptive filtering applications is listed in Table 1.1 to highlight the main

differences among different applications. It is noted that the desired (or reference) signal

is not always available for a given application. The reference signal d(n) may be derived

from the input signal u(n). For example, in the adaptive channel equalization operating in

the decision-directed mode (Figure 1.12), the desired signal is derived from a nonlinear

decision device. Alternatively, the error signal e(n) may be derived without the reference

signal. For example, a constant modulus adaptive algorithm [5] is applied to a constant-

envelope signal in communications. Based on a priori information that the amplitude of

signal is constant, we can compare the adaptive filter output to this constant value and

derive an error signal without the desired signal. Another example is the active noise

control shown in Figure 1.7, where the noise cancellation (acoustic superposition) is

21

Page 22: File 2

performed in the acoustic domain. Therefore, a microphone is used to sense the residual

noise as the error signal e(n) for filter adaptation.

CHAPTER 6

Performance Measures in Adaptive Systems

Six performance measures will be discussed in the following sections; convergence rate,

minimum mean square error, computational complexity, stability, robustness, and filter

length.

Convergence Rate

The convergence rate determines the rate at which the filter converges to it’s resultant

state. Usually a faster convergence rate is a desired characteristic of an adaptive system.

Convergence rate is not, however, independent of all of the other performance

characteristics. There will be a tradeoff, in other performance criteria, for an improved

convergence rate and there will be a decreased convergence performance for an increase

in other performance. For example, if the convergence rate is increased, the stability

characteristics will decrease, making the system more likely to diverge instead of

converge to the proper solution. Likewise, a decrease in convergence rate can cause the

system to become more stable. This shows that the convergence rate can only be

considered in relation to the other performance metrics, not by itself with no regards to

the rest of the system.

22

Page 23: File 2

Minimum Mean Square Error

The minimum mean square error (MSE) is a metric indicating how well a system can

adapt to a given solution. A small minimum MSE is an indication that the adaptive

system has accurately modeled, predicted, adapted and/or converged to a solution for the

system. A very large MSE usually indicates that the adaptive filter cannot accurately

model the given system or the initial state of the adaptive filter is an inadequate starting

point to cause the adaptive filter to converge. There are a number of factors which will

help to determine the minimum MSE including, but not limited to; quantization

noise, order of the adaptive system, measurement noise, and error of the

gradient due to the finite step size.

Computational Complexity

Computational complexity is particularly important in real time adaptive filter

applications. When a real time system is being implemented, there are hardware

limitations that may affect the performance of the system. A highly complex algorithm

will require much greater hardware resources than a simplistic algorithm.

Stability

Stability is probably the most important performance measure for the adaptive system.

By the nature of the adaptive system, there are very few completely asymptotically stable

systems that can be realized. In most cases the systems that are implemented are

marginally stable, with the stability determined by the initial conditions, transfer function

of the system and the step size of the input.

Robustness

The robustness of a system is directly related to the stability of a system. Robustness is a

measure of how well the system can resist both input and quantization noise.

Filter Length

The filter length of the adaptive system is inherently tied to many of the other

performance measures. The length of the filter specifies how accurately a given system

can be modeled by the adaptive filter. In addition, the filter length affects the

23

Page 24: File 2

convergence rate, by increasing or decreasing computation time, it can affect the stability

of the system, at certain step sizes, and it affects the minimum MSE. If a the filter length

of the system is increased, the number of computations will increase, decreasing the

maximum convergence rate. Conversely, if the filter length is decreased, the number of

computations will decrease, increasing the maximum convergence rate. For stability, due

to an increase in length of the filter for a given system, you may add additional poles or

zeroes that may be smaller than those that already exist. In this case the maximum step

size, or maximum convergence rate, will have to be decrease to maintain stability.

Finally, if the system is under specified, meaning there are not enough pole and/or zeroes

to model the system, the mean square error will converge to a nonzero constant. If the

system is over specified, meaning it has too many poles and/or zeroes for the system

model, it will have the potential to converge to zero, but increased calculations will

affect the maximum convergence rate possible.

24

Page 25: File 2

CHAPTER-7

CONCLUSIONS AND APPLICATIONS

7.1)CONCLUSIONS:-

The project described here can be beneficial in long run to many industries. Active

noise cancellation is a method to cancel out undesirable sound in real time.The adaptive

filter is used to estimate the error in noisy wave.Many algorithms are used in adaptive

filter like LMS RLS & MSE and the better is RLS

7.2)APPLICATIONS:

25

Page 26: File 2

0 100 200 300 400 500 600-5

0

5Pure Signal

0 100 200 300 400 500 600-5

0

5Noisy Signal

0 100 200 300 400 500 600-5

0

5Filter Output

0 100 200 300 400 500 600-5

0

5Error Signal

• Adaptive filters respond in real-time to statistical properties of signals

• Many adaptive filters are based on the discrete Wiener filter and the Widrow-

Hoff least-mean-squares algortithm.

• Several applications were illustrated:

– Adaptive predictor: removal of noise or interfering tones from signals

– System identification: sonar/radar ranging and design of FIR filters with a

classic IIR response.

Applications are many

Digital Communications (OFDM , MIMO , CDMA, and RFID)

Channel Equalisation

26

Page 27: File 2

Adaptive noise cancellation

Adaptive echo cancellation

System identification

Smart antenna systems

Blind system equalisation

And many, many others

New Trends in Adaptive Filtering

Partial Updating Weights.

Sub-band adaptive filtering.

Adaptive Kalman filtering.

Affine Projection Method.

Time-Space adaptive processing.

Non-Linear adaptive filtering:-

Neural Networks.

The Volterra Series Algorithm .

Genetic & Fuzzy

CHAPTER -8

APPENDIX

ABOUT SOFTWARE

Software used:Matlab

27

Page 28: File 2

Matlab Code

Below is the Matlab Code that was used in the simulations above.

% Adaptive System Identification

% This M file recursively calculated the coefficients of

% an unknown system.

% mu - specifies the rate of convergence of the adaptive

% algorithm. mu must be less than the smallest eigenvalue

% of the unknown system for the adaptive filter to be

% properly conditioned.

% len - the order of the adaptive filter.

% len must be greater than or equal to the order of the

% unknown filter to model the unknown filter properly.

% lin - the number of iterations to take place.

% xin - Gaussian white noise input signal to the system.

% This M file uses unsys.m

% By Thomas Drumright

% 12/12/97

clear

% Initializations

INPUTVEC = 0; % Initialize a global variable

mu = .1; % Convergence factor

len = 8; % Filter length

lin = 200; % Number of iterations

xin = randn(lin,1); % Input white noise

mse = 0;

x = 0*(1:len)'; % Initial input

w = 0*(1:len); % Initial filter coefs.

28

Page 29: File 2

% Calculate first iteration

d = unsys(x(1)); % Send x(1) to the unknown sys.

y = w*x; % Calculate output of adapt. filt.

e = d-y; % Calculate error signal

mse(1) = e^2; % Calculate mean square error

w = w + mu*e*x'; % Calculate next set of coeficients

% Calculate Nth iteration

for j = 1:lin

for n = len:-1:2

x(n) = x(n-1); % Delay the Nth sample

end

x(1) = xin(j); % Get a new sample

d = unsys(x(1)); % Send the new sample to unk. sys.

y = w*x;

e = d-y;

mse(j+1) = e^2; % Calculate Nth MSE value

w = w + mu*e*x';

end

% Calculate and display the frequency spectrum of the final

% unknown system.

figure(1)

hold on

[H,f] = freqz(w,1,512,'whole');

subplot(2,1,1),plot(f,abs(H),'b')

xlabel('frequency')

ylabel('magnitude')

subplot(2,1,2),plot(f,angle(H),'b')

29

Page 30: File 2

xlabel('frequency')

ylabel('phase')

% Calculate and plot the mean squared error for

% each iteration.

num = 0:length(mse)-1;

figure (2)

hold on

grid on

%title ('Plot of Mean Square Error vs. Iteration Number')

ylabel('MSE')

xlabel('Iteration')

plot(num,mse,'b')

% Calculate coefficient and final MSE values.

disp('Estimated coeficients w =')

disp(w')

disp('Final error e =')

disp(abs(e))

30

Page 31: File 2

% Adaptive noise cancellation

% This M file recursively calculated the coeficients of

% an unknown system. The value mu specifies the rate

% of convergence of the adaptive algorithm. mu must

% be less that the smallest eigenvalue of the unknown

% transfer function for the adaptive filter to be properly

% conditioned. len is the order of the filter.

% lin is the number of iterations to take place.

% x is the input signal to the system.

% n0, n1 are two independent noise sources.

% Author: Thomas Drumright

% Date: 6/11/98

clear

mu = .01; % Convergence factor

len = 40; % Filter length

lin = 1000; % Number of iterations

n1 = 0.7*randn(lin,1); % Input white noise

n0 = n1;

mse = 0;

for n=1:lin

s(n) = sin(2*pi*(n)/abs(10*sin(pi*(1000+n)/3000)));

end

% Apply the adaptive algorithm

sn = s'+n1;

x = 0*(1:len)'; % Initial input

w = 0*(1:len); % Initial filter coefs.

% Calculate first iteration

31

Page 32: File 2

y = w*x;

e = n0(1)-y;

mse(1) = e;

w = w + mu*e*x';

% Calculate Nth iteration

for j = 1:lin

for n = len:-1:2

x(n) = x(n-1);

end

x(1) = n0(j);

y = w*x;

e = sn(j)-y;

mse(j) = e;

w = w + mu*e*x';

end

% Display the time domain of the input and

% the error.

f = 0:length(sn)-1;

W = fft(w,512);

figure(1)

hold on

xlabel('time')

ylabel('noisy signal')

plot(f,sn,'b')

% Calculate and plot the mean squared error for

% each iteration.

num = 0:length(mse)-1;

32

Page 33: File 2

figure (2)

hold on

xlabel('time')

ylabel('filtered signal')

plot(num,mse,'b')

% Calculate and plot the frequency spectrums of the

% filtered and unfiltered signals.

figure (4)

hold on

t = 0:8000/(length(W)-1):8000;

plot(t,abs(W))

figure (5)

hold on

xlabel('frequency')

ylabel('noisy signal')

plot(t,abs(fft(mse,512))./512,'b')

figure(6)

hold on

xlabel('frequency')

ylabel('filtered signal')

plot(t,abs(fft(sn,512))./512,'b')

figure(7)

hold on

xlabel('time')

ylabel('MSE')

plot(f,(s-mse).^2,'b')

% Display final coeficients and MSE

33

Page 34: File 2

disp('Estimated coeficients w =')

disp(w')

disp('Final error e =')

disp(abs(e))

snr = 10*log10(sum(abs(fft(s)).^2)/sum(abs(fft(sn-s')).^2))

snrf = 10*log10(sum(abs(fft(s)).^2)/sum(abs(fft(mse-s)).^2))

% Adaptive Linear Predictive Coding

% This M file recursively calculated the coeficients of

% an unknown system. The value mu specifies the rate

% of convergence of the adaptive algorithm. mu must

% be less that the smallest eigenvalue of the unknown

% transfer function for the adaptive filter to be properly

% conditioned. len is the order of the filter.

% lin is the number of iterations to take place.

% x is the input signal to the system.

% n0, n1 are two independent noise sources.

% Author: Thomas Drumright

% Date: 6/11/98

mu = .0007; % Convergence factor

len = 100; % Filter length

lin = 5000; % Number of iterations

n0 = .5*randn(lin,1); % Input white noise

a = 0;

mse = 0;

% Create input of the modeled system.

s = 0;

for n=1:(lin);

34

Page 35: File 2

s1(n) = 1*sin(2*pi.*n/abs(50*sin(pi*(2500.+n)/10000))).*sin(2*pi*n/200);

end

s = s1+n0';

% Apply the adaptive algorithm

x = 0*(1:len)'; % Initial input

w = 0*(1:len); % Initial filter coefs.

% Calculate Nth iteration

for j = 1:lin

y = w*x;

a(j) = y;

for n = len:-1:2

x(n) = x(n-1);

end

x(1) = s(j);

e = x(1)-y;

mse(j+1) = e;

w = w + mu*e*x';

end

% Display the time domain of the filtered and

% unfiltered system.

f = 0:length(a)-1;

figure(1)

hold on

title('y(t)')

35

Page 36: File 2

plot(f,a)

l = 0:len-1;

figure (2)

hold on

title('w(t)')

plot (l,w)

% Calculate and plot the mean squared error for

% each iteration.

num = 0:length(mse)-1;

figure (3)

hold on

title('e(t)')

plot(num,mse)

% Calculate and plot the frequency spectrums of the

% filtered and unfiltered signals.

W = fft(s,512);

figure (4)

hold on

title('S(w)')

t = 0:length(W)-1;

plot(t,abs(W))

figure (5)

hold on

title('s(t)')

t = 0:length(s)-1;

plot(t,s)

W = fft(a,512);

36

Page 37: File 2

figure (6)

hold on

title('Y(w)')

t = 0:length(W)-1;

plot(t,abs(W))

W = fft(mse,512);

figure (7)

hold on

title('E(w)')

t = 0:length(W)-1;

plot(t,abs(W))

% Display final coeficients and MSE

%disp('Estimated coeficients w =')

%disp(w')

%disp('Final error e =')

%disp(abs(e))

% Adaptive Inverse System

% This M file recursively calculated the coeficients of

% an unknown system. The value mu specifies the rate

% of convergence of the adaptive algorithm. mu must

% be less that the smallest eigenvalue of the unknown

% transfer function for the adaptive filter to be properly

% conditioned. len is the order of the estimating filter.

% len must be greater than or equal to the order of the

% unknown filter to model the unknown filter properly.

% lin is the number of iterations to take place.

% xin is the input signal to the system.

37

Page 38: File 2

% By Thomas Drumright

% 11/20/97

% Initialize variables

INPUTVEC = 0; % Initialize a global variable

mu = .005; % Convergence factor

len = 20; % Filter length

lin = 5000; % Number of iterations

mse = 0;

x = 0*(1:len)'; % Initial delayed input vector

w = 0*(1:len); % Initial filter coefs.

x1 = 0*(1:len)'; % Initial input vector

n0 = .1*randn(lin,1); % Unity Gaussian white noise

% Calculate input signal

n = 0:lin-1;

xin = n0'+sin(2*pi*n./(sin(2*pi*(n+1)/11000)));

% Calculate Nth iteration

for j = 1:lin

for n = len:-1:2

x1(n) = x1(n-1);

end

x1(1) = unsys2(x(1));

b(j) = x1(1);

y = w*x1;

a(j) = y;

e = x(1)-y;

mse(j+1) = e^2;

w = w + mu*e*x1';

38

Page 39: File 2

for n = len:-1:2

x(n) = x(n-1);

end

x(1) = xin(j);

end

w'

[H,f] = freqz(w,1,512);

figure(1)

hold on

subplot(2,1,1), plot(f,20*log(abs(H)),'b')

ylabel('H(w)^2')

xlabel('w')

subplot(2,1,2), plot(f,angle(H),'b')

ylabel('Phase')

xlabel('w')

% Calculate and plot the mean squared error for

% each iteration.

num = 0:length(a)-1;

figure (2)

hold on

grid on

title ('y(n)')

plot(num,a,'b')

figure (3)

hold on

grid on

title ('x(n)')

39

Page 40: File 2

plot(num,xin,'b')

figure(4)

w1 = [1 0.2790 -1.4488 -1.0700 0.4678 0.8100];

hold on

[H,f] = freqz(w1,1,512);

subplot(2,1,1), plot(f,20*log(abs(H)),'b')

ylabel('H(w)^2')

xlabel('w')

subplot(2,1,2), plot(f,angle(H),'b')

ylabel('Phase')

xlabel('w')

figure(5)

hold on

grid on

title ('UW(k)*W(k)')

w2 = conv(w1,w);

[H,f] = freqz(w2,1,512);

subplot(2,1,1), plot(f,20*log(abs(H)),'b')

ylabel('H(w)^2')

xlabel('w')

subplot(2,1,2), plot(f,angle(H),'b')

ylabel('Phase')

xlabel('w')

disp('Final error e =')

disp(abs(e))

40

Page 41: File 2

REFERENCES:

1.Haykin, Simon, Adaptive Filter Theory, Prentice Hall, Upper Saddle River, New Jersey, 1996.

2. Honig, Michael L., Messerschmitt, David G., Adaptive Filters, Structures, Algorithms and Applications, Kluwer Academic Publishers, Boston, 1984.

3. Jenkins, W. Kenneth, Hull, Andrew W.,Strait, Jeffrey C., Schnaufer, Bernard A., Li, Xiaohui, Advanced Concepts in Adaptive Signal Processing, Kluwer Academic Publishers, Boston, 1996.

41