Barangay Council for the Protection of Children (BCPC) Orientation.pptx
Simulation and hardware implementation of Adaptive algorithms on tms320 c6713 digital signal processor
1. A
Dissertation Presentation
on
“Simulation and Hardware
Implementation of NLMS algorithm
on TMS320C6713 Digital Signal
Processor”
Presented by:
Raj Kumar Thenua
M.Tech IV Sem.
Roll No. 07ESODC611
Under Guidance of:
Mr. S.K. Agrawal
Associate Professor
Deptt. of ECE
Sobhasaria Engineering College, Sikar, Rajasthan
3. INTRODUCTION
During transmission of information, noise gets added to
the signal from the surroundings automatically .
Reduces the perceived quality or intelligibility.
Effective removal of noise is an active area of research .
Adaptive filters are capable of learning from the
statistics of current conditions.
Change filter coefficients in order to achieve a certain
goal.
Can work effectively in unknown environment.
3
4. Adaptive Filter
Three Major Specification
Input
Filter structure
Algorithm
FIR
IIR
NLMS
TVLMS
ECLMS
LMS
RLS
FT RLS
Fig.1 (a): Basic block diagram of an adaptive filter
4
5. Adaptive Noise Cancellation System
Adaptive
Algorithm
Fig.1(b): Block diagram of an adaptive noise cancellation system
5
6. Least Mean Squared (LMS) Algorithm
Filter weights are updated by the following formula for
each iteration:
w ( n 1) w ( n ) 2 e ( n ) x ( n )
Here x(n) is the input vector of time delayed input
values,
x ( n ) [ x ( n ) x ( n 1) x ( n 2 )..... x ( n N 1)]
T
w(n) represents the coefficients of the adaptive FIR
filter tap weight vector at time n.
μ is known as the step size, (fixed).
If μ is too small ;converge on the optimal solution will
be too long;
if μ is too large; the adaptive filter becomes unstable
and its output diverges.
6
7. Normalized Least Mean Squared (NLMS)
Algorithm
The step size is normalized by the input signal
power.
The NLMS is always the favorable choice of
algorithm for fast convergence speed and for nonstationary input.
w ( n 1) w ( n )
c x(n)
2
e(n) x(n)
α: NLMS adaption constant, which optimize the
convergence rate of algorithm.
0<α<2 (practically <1)
c : constant term for normalization
7
8. Recursive Least Square (RLS) Algorithm
RLS algorithms are known for excellent performance
when working in time varying environments.
Increased computational complexity and some
stability problems.
Filter tap weight vector is updated using equation
w n w
T
n 1 k n e n 1 n
Intermediate gain vector
k n u n / x
1
T
n u n
u ( n ) w ( n 1) x ( n )
The filter output is calculated using the filter tap weights from
the previous iteration and the current input vector.
y n 1 n w
T
n 1 x n
e n 1 n d n y n 1 n
8
9. Results Analysis
MATLAB Simulation
Tone Signal analysis( LMS, NLMS,RLS)
Performance Analysis of discussed algorithms
DSP Processor Implementation
Tone Signal Analysis( NLMS)
ECG Signal Analysis (LMS, NLMS)
9
10. Result Analysis (MATLAB Simulation)
Fig.2: MATLAB simulation for LMS algorithm; N=19, step size=0.001
10
21. Result Analysis (DSP Processor)
Tone Signal Analysis:
A clean tone ( Sinusoidal) signal of 2-dB power and
1 KHz frequency is generated using function generator.
Fig.11: Clean and Noisy tone signals
21
22. Result Analysis (DSP Processor) Contd...
Tone Signal Analysis:
Fig.12: Filtered output
22
23. Result Analysis (DSP Processor) Contd...
Tone Signal Analysis:
Fig.13: Time delay in filtered signal
23
24. Result Analysis (DSP Processor) Contd...
Tone Signal Analysis at various Frequencies:
Fig.14: Filtered output at 2kHz,3kHz,4kHz and 5kHz frequencies
24
25. Result Analysis (DSP Processor) Contd...
Tone Signal Analysis at various Amplitudes:
Fig.15: Filtered outputs for 2V,3V,4V and 5V input signals
25
26. Result Analysis (DSP Processor) Contd...
Tone Signal Analysis at High Noise Environment:
Fig.16: Filtered output at high noise
26
27. Result Analysis (DSP Processor) Contd...
Tone Signal Analysis
Table 3
SNR IMPROVEMENT VERSUS VOLTAGE AND FREQUENCY
S.N.
Amplitude
(V)
Frequency
(kHz)
1.
2.
3.
4.
5.
6.
7.
8.
2
3
4
5
2
2
2
2
1
1
1
1
2
3
4
5
SNR
Improvement
(dB)
11.00
11.52
11.93
12.80
11.58
11.93
12.08
11.66
27
28. Result Analysis (DSP Processor) Contd...
Tone Signal Analysis
Table 4
SNR IMPROVEMENT VERSUS NOISE LEVEL FOR A TONE SIGNAL
S.N.
Noise Level
Noise
Variance
1.
2.
3.
Low
Medium
High
0.02
0.05
0.15
SNR
Improvement
(dB)
13
12
10
28
29. Result Analysis (DSP Processor) Contd...
ECG Signal Analysis:
A clean (amplified) ECG signal with 1000 sample values, of
amplitude 260mV and frequency 35 Hz, generated through
twelve lead configurations, sampled at a frequency of 1.5 kHz.
Fig.17: Clean ECG signal
29
30. Result Analysis (DSP Processor) Contd...
ECG Signal Analysis: (Low level noise)
(a) LMS
(b) NLMS
Fig.18: Filter output at low noise level
30
31. Result Analysis (DSP Processor) Contd...
ECG Signal Analysis: (Medium level noise)
(a) LMS
(b) NLMS
Fig.19: Filter output at medium level noise
31
32. Result Analysis (DSP Processor) Contd...
ECG Signal Analysis: (High level noise)
(a) LMS
(b) NLMS
Fig.20: Filter output at high level noise
32
33. Result Analysis (DSP Processor) Contd...
ECG Signal Analysis:
Table 5
SNR IMPROVEMENT VERSUS NOISE LEVEL FOR AN ECG SIGNAL
S.N. Noise Level
1.
2.
3.
Low
Medium
High
Sampling
Rate (kHz)
1.5
1.5
1.5
SNR
Improvement
NLMS (dB)
9.89
8.62
6.38
SNR
Improvement
LMS (dB)
8.85
7.55
5.12
33
34. Result Analysis (DSP Processor) Contd...
The above results justify that the proposed real-time
hardware implementation of NLMS algorithm shows a
considerable improvement in the SNR of a noisy signal.
And the performance of the proposed system is better than
the LMS based systems.
The hardware implementation of NLMS algorithm enables
one to work with real-time biomedical and other kind of
signals whereas simulation does not provide real-time
working environment.
34
35. Conclusions
The three adaptive filter algorithms; LMS, NLMS & RLS are
implemented on MATLAB and the simulation results are
analyzed.
A fair performance comparison is presented among the
discussed algorithms based the various performance
parameters like MSE, convergence speed, computational
complexity etc.
The resulted best algorithm (i.e. NLMS) is implemented on
the TMS320C6713 processor for real-time noise
cancellation.
The real-time processor results are analyzed for two types
of signals; tone signal and ECG signal, with the help of DSO.
Filter performance is measured in terms of SNR
improvement.
35
36. Future Scope
Considering the nature of the experiment, there are a number
of viable directions for the extension of the research.
An interesting extension would be implementing different
kind of adaptive filters that will perform with faster
convergence and better noise reduction.
The system was implemented using auto C code generation
which takes more memory on the board which limits the
hardware performance. Coding in assembler could allow for
further optimization and an improvement in the systems
performance.
The implemented noise cancellation system is mainly
analysed for tone signals and ECG signals. However someone
can also analysed it for other kind of noise corrupted signals.
36
37. Future Scope Contd...
This Dissertation dealt with transversal FIR adaptive
filters, this is only one of many methods of digital filtering.
Other techniques such as infinite impulse response (IIR) or
lattice filtering may prove to be more effective in an
adaptive noise reduction application but asking for enough
memory requirements.
Wavelet transforms could give advantages or
disadvantages in different aspects of the application. Such
an experiment could be done on the same or similar
hardware as the one used in this experiment.
37
38. Real Time Applications of ANC System:
Application 1:
To measure the ECG of a pregnant lady and her
baby which is to be born, measurement of mother’s
ECG is simple but it is very difficult for the baby, here
the concept of adaptive filtering is used. The
mother’s heart sound acts as a noise signal and we
have to cancel that noise using various adaptive
algorithms.
38
40. Application-3:
The noise removal from the pilot’s microphone in the
airplane. Due to the high environmental noise produced by
the airplane engines, the pilot’s voice in the microphone is
distorted with a high amount of noise, and can be very
difficult to understand. In order to overcome the problem, an
adaptive filter can be used.
40
42. Publications
International/ National Journals
[1]
Raj kumar Thenua and S.K. Agarwal
“Simulation and Performance Analysis
of
Adaptive
Filter
in
Noise
Cancellation”, International Journal of
Engineering Science and Technology
(IJEST), ISSN: 0975-5462, Vol. 2(9),
2010, Page no. 4374-4379. (Published)
42
43. Publications Contd...
International/ National Conferences
[2] Raj kumar Thenua and S.K. Agarwal, “Hardware Implementation
of Adaptive algorithms for Noise Cancellation”, IEEE
International Conference on Network Communication and Computer
(ICNCC 2011), 21st -23rd Mar 2011, organized by International
Association of Computer Science and Information Technology
(IACSIT) and Singapore Institute of Electronics (SIE) at New Delhi,
India. (Published)
[3] Raj kumar Thenua, S.K. Agarwal and Ayub khan “Performance
analysis of Adaptive Noise Canceller for an ECG signal”
International Conference on Recent Trends in Engineering,
Technology and Management, 26th -27th Feb 2011 at BIET,
Jhansi. (Published).
[4] Raj kumar Thenua and S.K. Agarwal, “Hardware Implementation of
NLMS Algorithm for Adaptive Noise Cancellation”, National
Conference on Electronics and Communication (NCEC-2010)
on 22nd -24th December 2010 at MITS, Gwalior. (Published)
43
44. Publications Contd...
International/ National Conferences
[5] Raj kumar Thenua and S.K. Agarwal “Real-time Noise
Cancellation using Digital Signal Processor” National
conference on Electronics, Computers and Communications
(NCECC-2010) on 06th -07th March 2010 at MITS, Gwalior.
(Published)
44
45. References
[1] Bernard Widrow, John R. Glover, John M. Mccool, John Kaunitz, Charles S.
Williams, Robert H. Hean, James R. Zeidler, Eugene Dong, Jr. and Robert C.
Goodlin, “Adaptive Noise Cancelling: Principles and Applications”, Proceedings
of the IEEE, 1975, Vol.63 , No. 12 , Page(s): 1692 – 1716.
[2] Slock, D.T.M., “On the convergence behavior of the LMS and the normalized
LMS algorithms”, IEEE Transactions on Signal Processing, 1993, Vol. 41,
Issue 9, pp. 2811-2825.
[3] Abhishek Tandon, M. Omair Ahmad, “An efficient, low-complexity, normalized
LMS algorithm for echo cancellation” The 2nd Annual IEEE Northeast
Workshop on Circuits and Systems, 2004. NEWCAS 2004, Page(s): 161 – 164.
[4] Sanaullah Khan, M.Arif and T.Majeed, “Comparison of LMS, RLS and Notch
Based Adaptive Algorithms for Noise Cancellation of a typical Industrial
Workroom”, 8th International Multitopic Conference, 2004, Page(s): 169 – 173.
[5] Yuu-Seng Lau, Zahir M. Hussian and Richard Harris, “Performance of Adaptive
Filtering Algorithms: A Comparative Study”, Australian Telecommunications,
Networks and Applications Conference (ATNAC), Melbourne, 2003.
[6] Constantin Paleologu,“Variable Step-Size NLMS Algorithm for Under-Modeling
Acoustic Echo Cancellation” IEEE SIGNAL PROCESSING LETTERS, VOL.
15, 2008, Page(s): 5 – 8.
45
46. References
[7] DONG Hang and SUN Hong, “ Multirate Algorithm for Updating the
Coefficients of Adaptive Filter”, First International Conference on Intelligent
Networks and Intelligent Systems, Nov-2008,Page(s): 581 –
584.
[8] Ying He Hong He Li Li Yi Wu and Hongyan Pan, “The Applications and
Simulation of Adaptive Filter in Noise Canceling”, 2008 International
Conference on Computer Science and Software Engineering, 2008, Vol.4,
Page(s): 1 – 4.
[9] Michail D. Galanis and Athanassios Papazacharias, “A DSP Course for RealTime Systems Design and Implementation based on TMS320C6211 DSK”, 14th
International Conference on Digital Signal Processing, 2002, Vol.2,
Page(s): 853 – 856.
[10]Gaurav Saxena, Subramaniam Ganesan, and Manohar Das, “Real time
implementation of adaptive noise cancellation”, 2008 IEEE International
conference on electro/information technology , Page(s): 431 – 436.
[11]Duran Villalobos, C.A.; Tavares Reyes, J.A.; Sanchez Garcia, J.C,
“Implementation and Analysis of the NLMS Algorithm on TMS320C6713 DSP”,
52nd IEEE International Midwest Symposium on Circuits and Systems, Aug2009, Page(s): 1091 – 1096.
46
48. References
[19] Farid Ykhlef, A. Guessoum and D. Berkani, “Fast Recursive Least Squares
Algorithm for Acoustic Echo Cancellation Application”, 4th International
Conference: Sciences of Electronic,Technologies of Information and
Telecommunications March 25-29, 2007 – TUNISIA.
[20] G. Di Natale, A. Serra, C. Turcotti, “A Board Implementation for Fast APA Acoustic
Echo Canceller Using ADSP-21065L DSP”, IEEE International Conference on
Automation, Quality Testing and Robotics,May-2006,Vol-2, Page(s): 339 – 344.
[21] Wee Chong Chew and Dr B. Farhang Boroujeny, “Software Simulation and Realtime Implementation of Acoustic Echo Cancelling”, International Conference on
Information, Communications and Signal Processing, 1997, Vol.3, Page(s): 1270 –
1274.
[22] Andy W. H. Khong, “Stereophonic Acoustic Echo Cancellation Employing
Selective-Tap Adaptive Algorithms”, IEEE Transactions on Audio, Speech, and
Language Processing, Vol. 14, No. 3, May 2006.
[23] Sen. M. Kuo and Huan Zhao, “A Real-Time Acoustic Echo Cancellation System”,
IEEE International Conference on Systems Engineering, 1990, Page(s): 168 – 171.
[24] Masahiro Yukawa, Rodrigo C. de Lamare, and Raimundo Sampaio-Neto, “Efficient
Acoustic Echo Cancellation With Reduced-Rank Adaptive Filtering Based on
Selective Decimation and Adaptive Interpolation ”, IEEE Transactions on Audio,
Speech, and Language Processing, Vol. 16, No. 4, May 2008.
48
49. References
[25] Amit S. Chhetri, Jack W. Stokes, Dinei A. Florˆencio, “Acoustic Echo
Cancelation for High Noise Environments”, IEEE International Conference on
Multimedia and Expo 2006, Page(s): 905 – 908.
[26] Edgar Andrei Vega Ochoa and Manuel Edgardo Guzman Renteria, “A real time
acoustic echo canceller implemented on the Motorola DSP56307”, IEEE
International Symposium on Industrial Electronics, 2000, Vol.2,
Page(s): 625 - 630
[27] Irina Dornean, Marina Topa, Botond Sandor Kirei and Marius Neag, “SubBand Adaptive Filtering for Acoustic Echo Cancellation”, European Conference
on Circuit Theory and Design ,2009 , Page(s): 810 – 813.
[28] Thomas Schevtlev, “Selective Block Update of NLMS type Algorithms”, IEEE
International Conference on Acoustics, Speech and Signal Processing, 1998,
Vol.3, Page(s): 1717 – 1720.
[29] Texas Instruments Tutorial, “TMS320C6713 Floating-Point Digital Signal
Processor”, (December 2001 – Revised November 2005), SPRS186L
[30] http://www.dsprelated.com/groups/matlab/1.php
[31] http://www.mathworks.com/
49