SlideShare a Scribd company logo
1 of 4
Download to read offline
Stochastic Section # 9
Adaptive Filtering
Eslam Adel
May 21, 2018
1 Introduction
• Adaptive: Automatic adjustment over time.
• Used to deal with none-stationary signals (Varying with time)
• It is an iterative method or (Numerical method).
1.1 Main block diagram
Following figure shows the main block diagram of adaptive filtering.
Figure 1: General block diagram of adaptive filtering
General Algorithm steps
• Initialize filter coefficients with zeros
• Get output signal ˆx(n) where ˆx(n) = H ∗ y(n)
• Get error signal e(n) = x(n) − ˆx(n)
• Update filter coefficients using LMS equation
ak(n + 1) = ak(n) + µe(n)y(n − k)
where ak is filter coefficients.
• Stop when ak(n + 1) ∼ ak(n)
1
2 Adaptive Frequency Estimation (System identification)
Objective
Identify system or estimate its frequency response. The configuration is a special case from the general config-
uration as follow. see figure 2
• We have unknown system i.e its frequency response is unknown.
• The process can be considered as a calibration of the unknown system till finding its response.
• After convergence, adaptive filter coefficients will be almost the same coefficients of the unknown system
as error almost goes to zero. So we have identified the system.
Figure 2: Adaptive filters for frequency estimation or system identification
3 Adaptive Noise cancelling
Objective: Cancelling the noise and getting the desired signal from noisy one.
The configuration of adaptive noise canceller is shown in figure 3.
Figure 3: Adaptive noise canceller configuration
• We assume that our signal x(n) has two components s(n) and y1(n) i.e x(n) = s(n) + y1(n).
• We have a similar noise signal y2(n).
• Adaptive filter gives us an estimate (ˆy1(n)) of the noise component y1(n).
• Subtracting the estimated signal ˆy1(n) from signal x(n) gives us an estimate of the desired signal ˆs(n).
2
4 Adaptive Line Enhancement
• Adaptive line enhancer is a special case of adaptive noise canceller.
• Only source signal is available and no information about noise component.
• Noise will be same in both versions of signal (Original and delayed one) and adaptive filter will remove
this correlation and cancel the noise.
Figure 4: Adaptive Line enhancer configuration
5 Example
For system identification configuration figure 2. Given
x(n) = [−1, −1.5, −0.5, 0.5, 1.5, 1]
And
y(n) = [−2, −1, 0, 1, 2]
Assuming first order filter H = a0 +a1z−1
and initial values are a0 = 0.2, a1 = 0.3. Adaptation step µ = 0.2.
Identify the unknown system (using three iterations).
Solution
At first Make sure that signals are zero mean, if not subtract the mean. Here our signals are zero mean.
Algorithm steps
• Initialize filter coefficients
• Get output signal ˆx(n) where ˆx(n) = H ∗ y(n).
For first order filter ˆx(n) = a0y(n) + a1y(n − 1)
• Get error signal e(n) = x(n) − ˆx(n)
• Update filter coefficients using LMS equation
a0(n + 1) = a0(n) + 0.2 ∗ e(n)y(n).
a1(n + 1) = a1(n) + 0.2 ∗ e(n)y(n − 1).
Solution is shown is table 1.
Solution is obtained using following python script. We can see that the error is decreasing and values of our
filter is converging. Unknown system will the same as our adaptive filter.
3
Table 1: Results of first three iteration of adaptive filtering example
Iteration n ˆx(n) e(n) a0(n + 1) a1(n + 1)
1 0 -0.4 -0.6 0.44 0.3
2 1 -1.04 -0.46 0.532 0.484
3 2 -0.484 -0.016 0.532 0.4872
1 #!/ usr / bin /env python3
2 # −∗− coding : utf −8 −∗−
3 ”””
4 Created on Mon May 14 18:36:49 2018
5
6 @author : eslam
7 ”””
8 import numpy as np
9
10 # x(n) s i g n a l
11 x = np . array ([ −1 , −1.5 , −0.5 , 0.5 , 1.5 , 1 ] )
12 # y(n) s i g n a l
13 y = np . array ([ −2 , −1, 0 , 1 , 2 ] )
14
15 #I n i t i a l i z e a0 and a1 with 0.2 and 0.3
16 # We can n i t i a l i z e them with zeros but we need to converge f a s t e r
17 a0 , a1 = 0.2 , 0.3
18 # Adaptation step
19 mu = 0.2
20 # Number of i t e r a t i o n s
21 num iterations = 3
22 # Results of each i t e r a t i o n ( to f i l l the table )
23 r e s u l t s = np . zeros (( num iterations , 4 ) )
24 f o r i in range ( num iterations ) :
25 # Boundary condition
26 i f i == 0:
27 #y[ −1] = 0
28 xhat = a0∗y [ i ]
29 e l s e :
30 #Get estimate of x ( xhat ) using convolution with a0 and a1
31 xhat = a0 ∗y [ i ] + a1 ∗y [ i −1]
32 #Get the e r r o r
33 e = x [ i ] − xhat
34 #Update your f i l t e r c o e f f s
35 a0 = a0 + mu∗e∗y [ i ]
36 #Checking f o r boundary condition
37 i f i !=0:
38 a1 = a1 + mu∗e∗y [ i −1]
39 # Add to r e s u l t s matrix
40 r e s u l t s [ i , : ] = np . array ( [ xhat , e , a0 , a1 ] )
6 Useful Links
• Overview of adaptive filtering
• LMS adaptive filter (Matlab)
4

More Related Content

What's hot

Applied Digital Signal Processing 1st Edition Manolakis Solutions Manual
Applied Digital Signal Processing 1st Edition Manolakis Solutions ManualApplied Digital Signal Processing 1st Edition Manolakis Solutions Manual
Applied Digital Signal Processing 1st Edition Manolakis Solutions Manualtowojixi
 
Num Integration
Num IntegrationNum Integration
Num Integrationmuhdisys
 
MATLAB - Aplication of Arrays and Matrices in Electrical Systems
MATLAB - Aplication of Arrays and Matrices in Electrical SystemsMATLAB - Aplication of Arrays and Matrices in Electrical Systems
MATLAB - Aplication of Arrays and Matrices in Electrical SystemsShameer Ahmed Koya
 
Seismic data processing lecture 3
Seismic data processing lecture 3Seismic data processing lecture 3
Seismic data processing lecture 3Amin khalil
 
8.7 numerical integration
8.7 numerical integration8.7 numerical integration
8.7 numerical integrationdicosmo178
 
Advanced matlab codigos matematicos
Advanced matlab codigos matematicosAdvanced matlab codigos matematicos
Advanced matlab codigos matematicosKmilo Bolaños
 
Numerical differentiation integration
Numerical differentiation integrationNumerical differentiation integration
Numerical differentiation integrationTarun Gehlot
 
Perforacion de pozos, grupo d3 b, tarea numero 1
Perforacion de pozos, grupo d3 b, tarea numero 1Perforacion de pozos, grupo d3 b, tarea numero 1
Perforacion de pozos, grupo d3 b, tarea numero 1Kt Silva
 
10CSL67 CG LAB PROGRAM 4
10CSL67 CG LAB PROGRAM 410CSL67 CG LAB PROGRAM 4
10CSL67 CG LAB PROGRAM 4Vanishree Arun
 
3.2.interpolation lagrange
3.2.interpolation lagrange3.2.interpolation lagrange
3.2.interpolation lagrangeSamuelOseiAsare
 

What's hot (19)

Applied Digital Signal Processing 1st Edition Manolakis Solutions Manual
Applied Digital Signal Processing 1st Edition Manolakis Solutions ManualApplied Digital Signal Processing 1st Edition Manolakis Solutions Manual
Applied Digital Signal Processing 1st Edition Manolakis Solutions Manual
 
Exponential functions (1)
Exponential functions (1)Exponential functions (1)
Exponential functions (1)
 
Num Integration
Num IntegrationNum Integration
Num Integration
 
MATLAB - Aplication of Arrays and Matrices in Electrical Systems
MATLAB - Aplication of Arrays and Matrices in Electrical SystemsMATLAB - Aplication of Arrays and Matrices in Electrical Systems
MATLAB - Aplication of Arrays and Matrices in Electrical Systems
 
Seismic data processing lecture 3
Seismic data processing lecture 3Seismic data processing lecture 3
Seismic data processing lecture 3
 
DSP 05 _ Sheet Five
DSP 05 _ Sheet FiveDSP 05 _ Sheet Five
DSP 05 _ Sheet Five
 
Interpolation
InterpolationInterpolation
Interpolation
 
Interpolation
InterpolationInterpolation
Interpolation
 
Numerical methods generating polynomial
Numerical methods generating polynomialNumerical methods generating polynomial
Numerical methods generating polynomial
 
Teknik Simulasi
Teknik SimulasiTeknik Simulasi
Teknik Simulasi
 
8.7 numerical integration
8.7 numerical integration8.7 numerical integration
8.7 numerical integration
 
Advanced matlab codigos matematicos
Advanced matlab codigos matematicosAdvanced matlab codigos matematicos
Advanced matlab codigos matematicos
 
Bisection and fixed point method
Bisection and fixed point methodBisection and fixed point method
Bisection and fixed point method
 
Randomized algorithms ver 1.0
Randomized algorithms ver 1.0Randomized algorithms ver 1.0
Randomized algorithms ver 1.0
 
Numerical differentiation integration
Numerical differentiation integrationNumerical differentiation integration
Numerical differentiation integration
 
Perforacion de pozos, grupo d3 b, tarea numero 1
Perforacion de pozos, grupo d3 b, tarea numero 1Perforacion de pozos, grupo d3 b, tarea numero 1
Perforacion de pozos, grupo d3 b, tarea numero 1
 
10CSL67 CG LAB PROGRAM 4
10CSL67 CG LAB PROGRAM 410CSL67 CG LAB PROGRAM 4
10CSL67 CG LAB PROGRAM 4
 
Es272 ch5a
Es272 ch5aEs272 ch5a
Es272 ch5a
 
3.2.interpolation lagrange
3.2.interpolation lagrange3.2.interpolation lagrange
3.2.interpolation lagrange
 

Similar to Section9 stochastic

Convolution problems
Convolution problemsConvolution problems
Convolution problemsPatrickMumba7
 
cab2602ff858c51113591d17321a80fc_MITRES_6_007S11_hw04.pdf
cab2602ff858c51113591d17321a80fc_MITRES_6_007S11_hw04.pdfcab2602ff858c51113591d17321a80fc_MITRES_6_007S11_hw04.pdf
cab2602ff858c51113591d17321a80fc_MITRES_6_007S11_hw04.pdfTsegaTeklewold1
 
cab2602ff858c51113591d17321a80fc_MITRES_6_007S11_hw04.pdf
cab2602ff858c51113591d17321a80fc_MITRES_6_007S11_hw04.pdfcab2602ff858c51113591d17321a80fc_MITRES_6_007S11_hw04.pdf
cab2602ff858c51113591d17321a80fc_MITRES_6_007S11_hw04.pdfTsegaTeklewold1
 
DSP_2018_FOEHU - Lec 03 - Discrete-Time Signals and Systems
DSP_2018_FOEHU - Lec 03 - Discrete-Time Signals and SystemsDSP_2018_FOEHU - Lec 03 - Discrete-Time Signals and Systems
DSP_2018_FOEHU - Lec 03 - Discrete-Time Signals and SystemsAmr E. Mohamed
 
DSP_FOEHU - MATLAB 01 - Discrete Time Signals and Systems
DSP_FOEHU - MATLAB 01 - Discrete Time Signals and SystemsDSP_FOEHU - MATLAB 01 - Discrete Time Signals and Systems
DSP_FOEHU - MATLAB 01 - Discrete Time Signals and SystemsAmr E. Mohamed
 
Digital Signal Processing[ECEG-3171]-Ch1_L03
Digital Signal Processing[ECEG-3171]-Ch1_L03Digital Signal Processing[ECEG-3171]-Ch1_L03
Digital Signal Processing[ECEG-3171]-Ch1_L03Rediet Moges
 
DSP Lab Manual (10ECL57) - VTU Syllabus (KSSEM)
DSP Lab Manual (10ECL57) - VTU Syllabus (KSSEM)DSP Lab Manual (10ECL57) - VTU Syllabus (KSSEM)
DSP Lab Manual (10ECL57) - VTU Syllabus (KSSEM)Ravikiran A
 
A Novel Methodology for Designing Linear Phase IIR Filters
A Novel Methodology for Designing Linear Phase IIR FiltersA Novel Methodology for Designing Linear Phase IIR Filters
A Novel Methodology for Designing Linear Phase IIR FiltersIDES Editor
 
chapter1.pdf ......................................
chapter1.pdf ......................................chapter1.pdf ......................................
chapter1.pdf ......................................nourhandardeer3
 

Similar to Section9 stochastic (20)

adspchap1.pdf
adspchap1.pdfadspchap1.pdf
adspchap1.pdf
 
3.pdf
3.pdf3.pdf
3.pdf
 
Convolution problems
Convolution problemsConvolution problems
Convolution problems
 
cab2602ff858c51113591d17321a80fc_MITRES_6_007S11_hw04.pdf
cab2602ff858c51113591d17321a80fc_MITRES_6_007S11_hw04.pdfcab2602ff858c51113591d17321a80fc_MITRES_6_007S11_hw04.pdf
cab2602ff858c51113591d17321a80fc_MITRES_6_007S11_hw04.pdf
 
cab2602ff858c51113591d17321a80fc_MITRES_6_007S11_hw04.pdf
cab2602ff858c51113591d17321a80fc_MITRES_6_007S11_hw04.pdfcab2602ff858c51113591d17321a80fc_MITRES_6_007S11_hw04.pdf
cab2602ff858c51113591d17321a80fc_MITRES_6_007S11_hw04.pdf
 
lecture4signals-181130200508.pptx
lecture4signals-181130200508.pptxlecture4signals-181130200508.pptx
lecture4signals-181130200508.pptx
 
DSP_2018_FOEHU - Lec 03 - Discrete-Time Signals and Systems
DSP_2018_FOEHU - Lec 03 - Discrete-Time Signals and SystemsDSP_2018_FOEHU - Lec 03 - Discrete-Time Signals and Systems
DSP_2018_FOEHU - Lec 03 - Discrete-Time Signals and Systems
 
DSP_FOEHU - MATLAB 01 - Discrete Time Signals and Systems
DSP_FOEHU - MATLAB 01 - Discrete Time Signals and SystemsDSP_FOEHU - MATLAB 01 - Discrete Time Signals and Systems
DSP_FOEHU - MATLAB 01 - Discrete Time Signals and Systems
 
Introduction to Adaptive filters
Introduction to Adaptive filtersIntroduction to Adaptive filters
Introduction to Adaptive filters
 
Digital Signal Processing[ECEG-3171]-Ch1_L03
Digital Signal Processing[ECEG-3171]-Ch1_L03Digital Signal Processing[ECEG-3171]-Ch1_L03
Digital Signal Processing[ECEG-3171]-Ch1_L03
 
Dsp manual
Dsp manualDsp manual
Dsp manual
 
Lecture 4: Classification of system
Lecture 4: Classification of system Lecture 4: Classification of system
Lecture 4: Classification of system
 
Signals and Systems Homework Help.pptx
Signals and Systems Homework Help.pptxSignals and Systems Homework Help.pptx
Signals and Systems Homework Help.pptx
 
Signal Processing Assignment Help
Signal Processing Assignment HelpSignal Processing Assignment Help
Signal Processing Assignment Help
 
Dsp Lab Record
Dsp Lab RecordDsp Lab Record
Dsp Lab Record
 
DSP Lab Manual (10ECL57) - VTU Syllabus (KSSEM)
DSP Lab Manual (10ECL57) - VTU Syllabus (KSSEM)DSP Lab Manual (10ECL57) - VTU Syllabus (KSSEM)
DSP Lab Manual (10ECL57) - VTU Syllabus (KSSEM)
 
Signal Processing Assignment Help
Signal Processing Assignment HelpSignal Processing Assignment Help
Signal Processing Assignment Help
 
df_lesson_01.ppt
df_lesson_01.pptdf_lesson_01.ppt
df_lesson_01.ppt
 
A Novel Methodology for Designing Linear Phase IIR Filters
A Novel Methodology for Designing Linear Phase IIR FiltersA Novel Methodology for Designing Linear Phase IIR Filters
A Novel Methodology for Designing Linear Phase IIR Filters
 
chapter1.pdf ......................................
chapter1.pdf ......................................chapter1.pdf ......................................
chapter1.pdf ......................................
 

More from cairo university

Tocci chapter 13 applications of programmable logic devices extended
Tocci chapter 13 applications of programmable logic devices extendedTocci chapter 13 applications of programmable logic devices extended
Tocci chapter 13 applications of programmable logic devices extendedcairo university
 
Tocci chapter 12 memory devices
Tocci chapter 12 memory devicesTocci chapter 12 memory devices
Tocci chapter 12 memory devicescairo university
 
Tocci ch 9 msi logic circuits
Tocci ch 9 msi logic circuitsTocci ch 9 msi logic circuits
Tocci ch 9 msi logic circuitscairo university
 
Tocci ch 7 counters and registers modified x
Tocci ch 7 counters and registers modified xTocci ch 7 counters and registers modified x
Tocci ch 7 counters and registers modified xcairo university
 
Tocci ch 6 digital arithmetic operations and circuits
Tocci ch 6 digital arithmetic operations and circuitsTocci ch 6 digital arithmetic operations and circuits
Tocci ch 6 digital arithmetic operations and circuitscairo university
 
Tocci ch 3 5 boolean algebra, logic gates, combinational circuits, f fs, - re...
Tocci ch 3 5 boolean algebra, logic gates, combinational circuits, f fs, - re...Tocci ch 3 5 boolean algebra, logic gates, combinational circuits, f fs, - re...
Tocci ch 3 5 boolean algebra, logic gates, combinational circuits, f fs, - re...cairo university
 
A15 sedra ch 15 memory circuits
A15  sedra ch 15 memory circuitsA15  sedra ch 15 memory circuits
A15 sedra ch 15 memory circuitscairo university
 
A14 sedra ch 14 advanced mos and bipolar logic circuits
A14  sedra ch 14 advanced mos and bipolar logic circuitsA14  sedra ch 14 advanced mos and bipolar logic circuits
A14 sedra ch 14 advanced mos and bipolar logic circuitscairo university
 
A13 sedra ch 13 cmos digital logic circuits
A13  sedra ch 13 cmos digital logic circuitsA13  sedra ch 13 cmos digital logic circuits
A13 sedra ch 13 cmos digital logic circuitscairo university
 
A09 sedra ch 9 frequency response
A09  sedra ch 9 frequency responseA09  sedra ch 9 frequency response
A09 sedra ch 9 frequency responsecairo university
 
5 sedra ch 05 mosfet revision
5  sedra ch 05  mosfet revision5  sedra ch 05  mosfet revision
5 sedra ch 05 mosfet revisioncairo university
 
Lecture 2 (system overview of c8051 f020) rv01
Lecture 2 (system overview of c8051 f020) rv01Lecture 2 (system overview of c8051 f020) rv01
Lecture 2 (system overview of c8051 f020) rv01cairo university
 
Lecture 1 (course overview and 8051 architecture) rv01
Lecture 1 (course overview and 8051 architecture) rv01Lecture 1 (course overview and 8051 architecture) rv01
Lecture 1 (course overview and 8051 architecture) rv01cairo university
 

More from cairo university (20)

Tocci chapter 13 applications of programmable logic devices extended
Tocci chapter 13 applications of programmable logic devices extendedTocci chapter 13 applications of programmable logic devices extended
Tocci chapter 13 applications of programmable logic devices extended
 
Tocci chapter 12 memory devices
Tocci chapter 12 memory devicesTocci chapter 12 memory devices
Tocci chapter 12 memory devices
 
Tocci ch 9 msi logic circuits
Tocci ch 9 msi logic circuitsTocci ch 9 msi logic circuits
Tocci ch 9 msi logic circuits
 
Tocci ch 7 counters and registers modified x
Tocci ch 7 counters and registers modified xTocci ch 7 counters and registers modified x
Tocci ch 7 counters and registers modified x
 
Tocci ch 6 digital arithmetic operations and circuits
Tocci ch 6 digital arithmetic operations and circuitsTocci ch 6 digital arithmetic operations and circuits
Tocci ch 6 digital arithmetic operations and circuits
 
Tocci ch 3 5 boolean algebra, logic gates, combinational circuits, f fs, - re...
Tocci ch 3 5 boolean algebra, logic gates, combinational circuits, f fs, - re...Tocci ch 3 5 boolean algebra, logic gates, combinational circuits, f fs, - re...
Tocci ch 3 5 boolean algebra, logic gates, combinational circuits, f fs, - re...
 
A15 sedra ch 15 memory circuits
A15  sedra ch 15 memory circuitsA15  sedra ch 15 memory circuits
A15 sedra ch 15 memory circuits
 
A14 sedra ch 14 advanced mos and bipolar logic circuits
A14  sedra ch 14 advanced mos and bipolar logic circuitsA14  sedra ch 14 advanced mos and bipolar logic circuits
A14 sedra ch 14 advanced mos and bipolar logic circuits
 
A13 sedra ch 13 cmos digital logic circuits
A13  sedra ch 13 cmos digital logic circuitsA13  sedra ch 13 cmos digital logic circuits
A13 sedra ch 13 cmos digital logic circuits
 
A09 sedra ch 9 frequency response
A09  sedra ch 9 frequency responseA09  sedra ch 9 frequency response
A09 sedra ch 9 frequency response
 
5 sedra ch 05 mosfet.ppsx
5  sedra ch 05  mosfet.ppsx5  sedra ch 05  mosfet.ppsx
5 sedra ch 05 mosfet.ppsx
 
5 sedra ch 05 mosfet
5  sedra ch 05  mosfet5  sedra ch 05  mosfet
5 sedra ch 05 mosfet
 
5 sedra ch 05 mosfet revision
5  sedra ch 05  mosfet revision5  sedra ch 05  mosfet revision
5 sedra ch 05 mosfet revision
 
Fields Lec 2
Fields Lec 2Fields Lec 2
Fields Lec 2
 
Fields Lec 1
Fields Lec 1Fields Lec 1
Fields Lec 1
 
Fields Lec 5&6
Fields Lec 5&6Fields Lec 5&6
Fields Lec 5&6
 
Fields Lec 4
Fields Lec 4Fields Lec 4
Fields Lec 4
 
Fields Lec 3
Fields Lec 3Fields Lec 3
Fields Lec 3
 
Lecture 2 (system overview of c8051 f020) rv01
Lecture 2 (system overview of c8051 f020) rv01Lecture 2 (system overview of c8051 f020) rv01
Lecture 2 (system overview of c8051 f020) rv01
 
Lecture 1 (course overview and 8051 architecture) rv01
Lecture 1 (course overview and 8051 architecture) rv01Lecture 1 (course overview and 8051 architecture) rv01
Lecture 1 (course overview and 8051 architecture) rv01
 

Recently uploaded

Processing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxProcessing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxpranjaldaimarysona
 
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSHARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSRajkumarAkumalla
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Christo Ananth
 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSKurinjimalarL3
 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escortsranjana rawat
 
Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxAsutosh Ranjan
 
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile servicerehmti665
 
Analog to Digital and Digital to Analog Converter
Analog to Digital and Digital to Analog ConverterAnalog to Digital and Digital to Analog Converter
Analog to Digital and Digital to Analog ConverterAbhinavSharma374939
 
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...ranjana rawat
 
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVHARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVRajaP95
 
Introduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxIntroduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxupamatechverse
 
the ladakh protest in leh ladakh 2024 sonam wangchuk.pptx
the ladakh protest in leh ladakh 2024 sonam wangchuk.pptxthe ladakh protest in leh ladakh 2024 sonam wangchuk.pptx
the ladakh protest in leh ladakh 2024 sonam wangchuk.pptxhumanexperienceaaa
 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
What are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxWhat are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxwendy cai
 
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )Tsuyoshi Horigome
 

Recently uploaded (20)

Processing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxProcessing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptx
 
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSHARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
 
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptxExploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
 
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
 
Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptx
 
Roadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and RoutesRoadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and Routes
 
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile service
 
Analog to Digital and Digital to Analog Converter
Analog to Digital and Digital to Analog ConverterAnalog to Digital and Digital to Analog Converter
Analog to Digital and Digital to Analog Converter
 
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
 
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVHARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
 
Introduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxIntroduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptx
 
the ladakh protest in leh ladakh 2024 sonam wangchuk.pptx
the ladakh protest in leh ladakh 2024 sonam wangchuk.pptxthe ladakh protest in leh ladakh 2024 sonam wangchuk.pptx
the ladakh protest in leh ladakh 2024 sonam wangchuk.pptx
 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
What are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxWhat are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptx
 
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )
 

Section9 stochastic

  • 1. Stochastic Section # 9 Adaptive Filtering Eslam Adel May 21, 2018 1 Introduction • Adaptive: Automatic adjustment over time. • Used to deal with none-stationary signals (Varying with time) • It is an iterative method or (Numerical method). 1.1 Main block diagram Following figure shows the main block diagram of adaptive filtering. Figure 1: General block diagram of adaptive filtering General Algorithm steps • Initialize filter coefficients with zeros • Get output signal ˆx(n) where ˆx(n) = H ∗ y(n) • Get error signal e(n) = x(n) − ˆx(n) • Update filter coefficients using LMS equation ak(n + 1) = ak(n) + µe(n)y(n − k) where ak is filter coefficients. • Stop when ak(n + 1) ∼ ak(n) 1
  • 2. 2 Adaptive Frequency Estimation (System identification) Objective Identify system or estimate its frequency response. The configuration is a special case from the general config- uration as follow. see figure 2 • We have unknown system i.e its frequency response is unknown. • The process can be considered as a calibration of the unknown system till finding its response. • After convergence, adaptive filter coefficients will be almost the same coefficients of the unknown system as error almost goes to zero. So we have identified the system. Figure 2: Adaptive filters for frequency estimation or system identification 3 Adaptive Noise cancelling Objective: Cancelling the noise and getting the desired signal from noisy one. The configuration of adaptive noise canceller is shown in figure 3. Figure 3: Adaptive noise canceller configuration • We assume that our signal x(n) has two components s(n) and y1(n) i.e x(n) = s(n) + y1(n). • We have a similar noise signal y2(n). • Adaptive filter gives us an estimate (ˆy1(n)) of the noise component y1(n). • Subtracting the estimated signal ˆy1(n) from signal x(n) gives us an estimate of the desired signal ˆs(n). 2
  • 3. 4 Adaptive Line Enhancement • Adaptive line enhancer is a special case of adaptive noise canceller. • Only source signal is available and no information about noise component. • Noise will be same in both versions of signal (Original and delayed one) and adaptive filter will remove this correlation and cancel the noise. Figure 4: Adaptive Line enhancer configuration 5 Example For system identification configuration figure 2. Given x(n) = [−1, −1.5, −0.5, 0.5, 1.5, 1] And y(n) = [−2, −1, 0, 1, 2] Assuming first order filter H = a0 +a1z−1 and initial values are a0 = 0.2, a1 = 0.3. Adaptation step µ = 0.2. Identify the unknown system (using three iterations). Solution At first Make sure that signals are zero mean, if not subtract the mean. Here our signals are zero mean. Algorithm steps • Initialize filter coefficients • Get output signal ˆx(n) where ˆx(n) = H ∗ y(n). For first order filter ˆx(n) = a0y(n) + a1y(n − 1) • Get error signal e(n) = x(n) − ˆx(n) • Update filter coefficients using LMS equation a0(n + 1) = a0(n) + 0.2 ∗ e(n)y(n). a1(n + 1) = a1(n) + 0.2 ∗ e(n)y(n − 1). Solution is shown is table 1. Solution is obtained using following python script. We can see that the error is decreasing and values of our filter is converging. Unknown system will the same as our adaptive filter. 3
  • 4. Table 1: Results of first three iteration of adaptive filtering example Iteration n ˆx(n) e(n) a0(n + 1) a1(n + 1) 1 0 -0.4 -0.6 0.44 0.3 2 1 -1.04 -0.46 0.532 0.484 3 2 -0.484 -0.016 0.532 0.4872 1 #!/ usr / bin /env python3 2 # −∗− coding : utf −8 −∗− 3 ””” 4 Created on Mon May 14 18:36:49 2018 5 6 @author : eslam 7 ””” 8 import numpy as np 9 10 # x(n) s i g n a l 11 x = np . array ([ −1 , −1.5 , −0.5 , 0.5 , 1.5 , 1 ] ) 12 # y(n) s i g n a l 13 y = np . array ([ −2 , −1, 0 , 1 , 2 ] ) 14 15 #I n i t i a l i z e a0 and a1 with 0.2 and 0.3 16 # We can n i t i a l i z e them with zeros but we need to converge f a s t e r 17 a0 , a1 = 0.2 , 0.3 18 # Adaptation step 19 mu = 0.2 20 # Number of i t e r a t i o n s 21 num iterations = 3 22 # Results of each i t e r a t i o n ( to f i l l the table ) 23 r e s u l t s = np . zeros (( num iterations , 4 ) ) 24 f o r i in range ( num iterations ) : 25 # Boundary condition 26 i f i == 0: 27 #y[ −1] = 0 28 xhat = a0∗y [ i ] 29 e l s e : 30 #Get estimate of x ( xhat ) using convolution with a0 and a1 31 xhat = a0 ∗y [ i ] + a1 ∗y [ i −1] 32 #Get the e r r o r 33 e = x [ i ] − xhat 34 #Update your f i l t e r c o e f f s 35 a0 = a0 + mu∗e∗y [ i ] 36 #Checking f o r boundary condition 37 i f i !=0: 38 a1 = a1 + mu∗e∗y [ i −1] 39 # Add to r e s u l t s matrix 40 r e s u l t s [ i , : ] = np . array ( [ xhat , e , a0 , a1 ] ) 6 Useful Links • Overview of adaptive filtering • LMS adaptive filter (Matlab) 4