SlideShare a Scribd company logo
ACEEE Int. J. on Signal & Image Processing, Vol. 01, No. 03, Dec 2010




                          Conditional Averaging
                     a New Algorithm for Digital Filter
                                                  Sukesh Rao M, NMAMIT,
                                                    E&C Dept, Nitte, India.
                                             Email: sukesh_muligar@yahoo.co.in
                                         Dr. S. Narayana Iyer, NMAMIT, Nitte, India.
                                              Email: iyer_narayana@yahoo.com

Abstract—This paper aims at designing a new algorithm for               1) For a fixed sampling frequency, the sample of the
digital filters. The traditional methods like FIR, IIR have been        incoming signal is processed for three different levels of
improved in recent times with new approaches. However, the              conditionality, resulting in three different types of cutoff
developments have used complex arithmetic calculation and               frequencies or the signal bandwidth.
dedicated DSP processors. In this research project, effort has
been made to reduce such complexities using a procedure
                                                                        2) A relation is formed between the conditional statements
based on the technique of Conditional Averaging. The entire             and the cutoff frequencies which remain true for any
algorithm is developed using more of conditional statements             number of remaining conditional statements and the
and less of arithmetic calculations.                                    desired cutoff frequencies.
           Digital signals are filtered at different stages of          3) A mixed harmonic signal is fed to the system to obtain
signal processing. However high speed processor is used for             the system response for different cutoff frequencies.
different calculations associated with filtration process. An
averaging is one such scheme used in simple FIR filter, which             II. CONDITIONAL AVERAGING- THE PROPOSED
performs low pass filtering operation. Conditional Averaging
                                                                                         TECHNIQUE
is a new technique, which is one of the improvements in
continuous time averaging. Conditional Averaging algorithm                  Conditional averaging is a new scheme proposed in the
is explained in this practice with different examples for the           area of different averaging techniques [1]. Simple
design of low pass filter. This algorithm has been successfully         averaging with N points will reduce any of the AC
tested using digital starter kit with TMS3206416v DSP
                                                                        components corresponding to the amplitude variations. All
processor. Using code composer studio, the entire algorithm is
written in C/C++ language and compiled into an assembly                 averaging techniques act as low pass filter with the filter
language. Conditional averaging can be implemented with any             coefficients equal to 1/N. conditional averaging will not
general purpose processor to arrive at other types of filters           use any such kind of filter coefficients and any definite
with certain necessary modifications.                                   mathematical relation as such.
                                                                           The Fast Fourier Transform (FFT) is the method used in
Index Terms— FFT, DSP, LPF
                                                                        the DSP (digital signal processing) to find out the
                                                                        frequency spectrum of any given signal. It is a
                      I. INTRODUCTION
                                                                        mathematical operation for obtaining the accurate
    Filter is a system which selectively changes the wave               frequency spectrum. It is also possible to predict the
shape, amplitude, frequency content and phase                           frequency spectrum of the signal with signal amplitude
characteristic of a signal as desired. In digital signal                variations. The spectrum so obtained may not be accurate
processing, based on the design constraints digital filters of          and it is approximated. If we know the sampling frequency
FIR, IIR or even other types are commonly in usage. In real             or the timing interval of the incoming signal, it is possible
time signal processing, these filters use dedicated                     to predict the harmonics present in the signal. Figure 1
Microprocessor system to carry out complex floating point               shows a random signal. We can determine the frequency
arithmetic operation. To acquire high accuracy and high                 plot accurately for the signal shown in figure 1 using the
precision of the system response, high frequency                        frequency transform techniques. Also possible to predict
supportive DSP processor is used. The scope of this work                approximately the harmonics present in the signal by
namely Conditional Averaging is to minimize the complex                 knowing the sampling frequency. Let us assume that the
arithmetic operation and obtain better response for the                 signal is sampled at a rate of fs Hz and figure 2 (a) shows
required design using general purpose microprocessor.                   the resulting discrete samples.
                                                                            From the sampled signal, one can conclude that, (1/ fs)
 A. Problem Definition
                                                                        is the time gap between two samples. If the signal varies
    A specially devised technique of conditional averaging              with more number of successive samples, then it
has been developed to design a low pass filter. The term                corresponds to lower harmonics
‘conditional averaging’ has been assigned to this method as             Fluctuation with lesser number of successive samples
it performs the averaging of a given data set based on                  corresponds to higher harmonics. All such samples
certain attributed conditions. This algorithm has been tested           which contribute to the frequency component less than fs
for different cutoff frequencies maintaining the sampling               can be easily predicted. These samples are marked and
frequency at a fixed rate. MATAB simulation technique                   shown in figure 2(a). The samples marked in red, blue and
has been used to confirm and validate the algorithm. The                yellow color; corresponds to different frequency
algorithm is verified with the following criteria.                      components within the bandwidth fs. The higher harmonic

© 2010 ACEEE                                                       28
DOI: 01.IJSIP.01.03.188
ACEEE Int. J. on Signal & Image Processing, Vol. 01, No. 03, Dec 2010



is marked in red color and it contains approximately 7                        samples considered for the averaging. Apart from this type
samples. This corresponds to a frequency component                            of averaging one more kind can be introduced, which
(1/7)fs. The next harmonic is marked in blue color. It                        performs the sample modification similar to the averaging.
                                                                              Consider red colored samples from the figure 2 (b) for the
                                                                              sample modification. To remove the fluctuation of this
                                                                              signal, a linear path is predicted between first and the last
                                                                              sample. The linear path is formed between time index t=1
                                                                              and t=8. It is shown in figure 2 (b). If there are even
                                                                              number of samples, then a value is obtained at the center
                                                                              [t=4.5] of first and last sample. From this value at t=4.5, the
                                                                              averaging with first and last sample leads to two more new
                                                                              sample sets corresponding to t=3 and t=6. Same method of
                                                                              averaging is performed to obtain the values at t= 2, 4, 5 and
                   Figure 1. An arbitrary Signal
consists of approximately 15 samples, which contributes to                    7.
(1/15)fs frequency spectrum of the signal. Similarly the                          The newly obtained values will make the signal shown
yellow colored sample set belongs to lowest harmonic of                       in figure 2 (c). Same kind of averaging is performed to the
the signal and this frequency is less than (1/40)fs.                          yellow colored samples. Since we perform the averaging
   To suppress the two harmonics with samples red and                         only for a set of samples with certain conditions on
blue colors and maintain only the harmonic lower than                         amplitude variations, this algorithm is named as
                                                                              “conditional averaging”. It indicates that this proposed
                                                                              algorithm results in reduced computations, which is
                                                                              certainly an overwhelming advantage.
                                                                                  Signal averaging is performed on the basis of the
                                                                              variation in the magnitude of the incoming samples, the
                                                                              averaging takes place always between two samples.
                                                                              Averaging of two samples is performed over N points to
                                                                              determine the new possible sample of the signal. Not all the
           (a)   Samples set identified with different color                  incoming signal sample undergo for the averaging
                                (b)                                           operation.
                                                                                    To test this algorithm, consider a signal, which is
                                                                              sampled at a rate of fs with four different frequency
                                                                              components f1, f2, f3 and f4 with different phase angle Φ1,
                                                                              Φ2, Φ3 and Φ4.We express this signal as follows.



          (b) Magnified view of samples with red color
                                                                                   By assuming suitable values of these frequencies and
                                                                              phase angles, the simulation of the conditional averaging is
                                                                              carried out. Consider f1, f2, f3 and f4 to be 600 Hz, 50 Hz ,
                                                                              2000 Hz and 800 Hz respectively with phase angle of 2Π/3,
                                                                              0, Π/5 and Π/2.




       (c) Final reconstructed Signal
                            Figure 2

(1/40)fs, we can think of a technique which will process
only these samples. Continuous averaging will suppress the
higher frequency components depending on the number of




© 2010 ACEEE                                                             29
DOI: 01.IJSIP.01.03.188
ACEEE Int. J. on Signal & Image Processing, Vol. 01, No. 03, Dec 2010



                                                                          bandwidth at
                                                                          i.e.
                                                                          After performing the conditional averaging, the resulting
                                                                          sample is shown in figure 4 (b) with its FFT.
                                                                               The frequency 1250 Hz corresponds to the m=25 and
                                                                          all the values with m>25 are attenuated. Hence it is




        Figure 3 Resulting wave for 100 samples after sampling

    Conditional averaging is performed for the first 100
samples of the sampled input signals as shown in figure 4
(a) to get different cutoff frequency for a LPF. The
conditional averaging is carried out for three different cases
a) Four sample-conditional Averaging
b) Eight sample- conditional Averaging                                                         (a) Input FFT
c) Sixteen sample- conditional Averaging
A. Four sample-conditional Averaging
  Four sample-conditional averaging uses only four sample
buffers. The samples in the buffer are used for the
comparison process to check the conditions of a relational
set. A relational set is an array, which is obtained by
comparing two samples each from the main sample set and
contains combination of only two values. If the signal
frequency of interest is f, then the sampling should be
carried out at the rate more than 4f. It is also possible that if
a signal is sampled at fs, then the signal can be band
limited to minimum of fs/4. Conditional averaging with
four sample is the minimum possible selection of the cutoff
                                                                                              (b) Output FFT
frequency for the design of LPF.
The Algorithm uses following steps                                        functioning like a LPF for the designed frequency fs/4. The
1) Take new signal sample to the buffer of size four in first-            process introduces a delay of 4 sample time between an
in last-out order.                                                        input and the output value at any instant of time. The
2) Check the relation between all 4 samples by getting a                  algorithm mentioned for the conditional averaging is
new set of relational array with 3 elements.                              implemented in the C language.
3) In the relational array search for the unwanted sequence
and eliminate that sequence in the buffer by performing                   B. Eight sample-conditional Averaging
Averaging of four samples.                                                   Four sample-conditional averaging is simpler and the
4) From the updated buffer, the last sample is taken as                   basic averaging. Whereas eight sample-conditional
output and entire process is repeated from step 1.                        averaging includes the signal constraints of 4 sample
    In the figure 3 or figure 4 (a), samples are taken at                 conditional averaging also. An 8 sample buffer is
5000Hz sampling rate and a 100 point FFT is obtained for                  maintained for the comparison process to check for the
the frequency analysis. Here m varies from 0 to 99 and                    conditions. Eight sample conditional averaging gives a
m=100 correspond to the Nyquist rate, i.e. 5000 Hz in this                signal bandwidth of fs/8. Conditional averaging with eight
case.                                                                     sample uses the algorithm used similar to that of four
To find the frequency of analysis ‘f’ from the                            sample-conditional averaging to get the bandwidth for the
above FFT                                                                 desired of LPF.
                                                                              To find the frequency of analysis ‘f’ from the FFT
                                                                          shown in figure 5.

Where N=100 an fs =5000 Hz
The four samples conditional averaging will result in a

© 2010 ACEEE                                                         30
DOI: 01.IJSIP.01.03.188
ACEEE Int. J. on Signal & Image Processing, Vol. 01, No. 03, Dec 2010




 Where N=100 an fs =5000 Hz
The eight sample-Conditional Averaging will give cutoff
value at fs/8. i.e. 5000/8=625 Hz .This can be verified by
figure5.

  The frequency 625 Hz corresponds to m=12.5 and all the
values m>12.5 are attenuated. Hence it is acting like a LPF
for the desired bandwidth. The whole process introduces a
delay of 8 sample time between an input and the output.




                                                                                 Figure 6 outputs FFT of 16 sample conditional averaging



                                                                                                   III. RESULT
                                                                             Conditional averaging algorithm is verified in real time
                                                                         to compare the result of the theoretical simulation. To
                                                                         perform this operation DSP Starter kit (DSK6416) is used
        Figure 5. Output FFT of 8 sample conditional averaging           for the programming and the debugging. TMS320C6416v
                                                                         is the key element in DSK6416 system and it has got all the
                                                                         other speech processing peripherals interfaced to it. Input
C. Sixteen sample -conditional Averaging                                 signal are fed using audio codec and then processed by the
   In this Averaging technique only sixteen sample buffers               DSP processor.
are maintained for the comparison process to check the                        Audio codec performs analog to digital conversion and
conditions. Sixteen sample-conditional averaging includes                vice versa. Analog signals are mixed using simple passive
the both the processing stages of four and eight sample                  components to get the mixture of all the input signals.
averaging. For a sampling frequency fs, the sixteen sample               Signal selections are made such that, they will be within
conditional averaging given a bandwidth limit of fs /16 in               the sampling frequency of the system. The sampling
the design of LPF. To find the frequency of analysis ‘f’                 frequency of the DSK6416 is selected by the program
from the above FFT shown in figure 6.                                    command to set at 8 KHz. All input signals are band
                                                                         limited to less than 4 KHz to satisfy the Nyquist rate.
                                                                         A real time testing has been carried out for sixteen sample
                                                                         conditional      averaging.    Sixteen    sample-conditional
 where N=100 an fs =5000 Hz. The eight sample-
                                                                         averaging gives a very small bandwidth of fs /16. More
conditional Averaging will give cutoff value at fs /8. i.e.
                                                                         conditional statements has to be included in the processing
5000/16=312.5 Hz .This can be verified by figure 6.
                                                                         of the signal, given that the number of samples considered
  The frequency 312.5 Hz corresponds to m=6.25 and all
                                                                         are more for the signal processing. The time domain input
the values m>6.25 are attenuated. Hence it is behaving like
                                                                         and the output signal after the processing through
a LPF. The whole process introduces a delay of 16 sample
                                                                         conditional averaging are shown in the figure 7 (a).
time between an input and the output.
                                                                            A test is conducted with different input FFT, wherein a
   FIR filtering obeys sinusoidal functional manipulation,
                                                                         signal of higher frequency component within the input
hence the output samples are also the part of sine or cosine
                                                                         band limit is fed into the system. The output FFT obtained
functions. The above work is still modified for the better
                                                                         clearly shows the attenuation of the signal above 500Hz in
performance for different frequencies. When more samples
                                                                         the spectrum. The signals above 4 KHz are also attenuated,
are taken for a particular conditionality, it is possible to
                                                                         as the signal was sampled at 8 KHz rate and hence it can
modify the range of the bandwidth. Conditional Averaging
                                                                         not reconstruct the signal beyond 4 KHz (refer figure 7
makes use of the deterministic signals like ECG, EMG and
                                                                         (c)). Including more conditional statements for a signal of
EEG, which are the better sources of signals for the
                                                                         higher frequency value, the output response of the system
analysis. To reiterate, this algorithm reduces the
                                                                         we find is much better.
computation.




© 2010 ACEEE                                                        31
DOI: 01.IJSIP.01.03.188
ACEEE Int. J. on Signal & Image Processing, Vol. 01, No. 03, Dec 2010



                                                                     processing, but the conditional averaging uses only limited
                                                                     number of samples, which satisfy the conditional array set.
                                                                     This results in reduced computational time and burden on
                                                                     the processor.
                                                                        Any type of general purpose processor can be used to
                                                                     design the system for the signal processing using this
                                                                     algorithm. Thus, unlike other algorithm, this method
                                                                     requires only a general purpose processor. However, in the
                      (a) Input and Output signal
                                                                     proposed algorithm, in order to verify all the sets of
                                                                     possible combination within the short period of time,
                                                                     before the next sample arrives, a high speed general
                                                                     purpose processor is required. This processor should be
                                                                     able to execute minimum of 100 to 1000 instructions
                                                                     within one sampling time. For the lower bandwidth, system
                                                                     undergoes more conditional statements and therefore it
                                                                     requires more instruction for the processing.
                                                                        Conditional algorithm can also be developed for the
                                                                     analysis of ECG, EEG signals as well. Therefore,
                                                                     conditional averaging becomes a very useful filtering
                                                                     algorithm to analyze the biomedical signals. All such
                                                                     biomedical signals are of low frequency and any high
                                                                     frequency noise or the signal surge can be easily detected
           (b)Input signal FFT                                       using the conditional averaging.
                                                                       The main drawback of the system is that, it may distort
                                                                     the signal by adding many other lower harmonics within
                                                                     the bandwidth. To alleviate this and get a desired
                                                                     bandwidth, it is necessary to include more conditional
                                                                     statements during processing.
                                                                      This conditional averaging is possible to be applied to high
                                                                     pass filtering operation also. It may not be just averaging as
                                                                     performed in the case of the low pass filter design. Design
                                                                     of narrow band pass filter using the conditional averaging
                                                                     algorithm is another future work.

                                                                                              REFERENCES
            (c) Out put FFT                                          [1]    Welch P. D “ The use of Fast Fourier Transform for the
                                                                           estimation of power spectra: A method based on time
             Fig 14                                                        averaging over short, Modified periodgrams” IEEE
                                                                           transaction on audio and electroacoust., Vol. AU-15 No.2
                           CONCLUSION                                      June 1967
                                                                     [2]    Richard G Lyons, Understanding Digital signal processing
    The desired bandwidth for the proposed low pass filter                 Pearson Education third edition.2001.
could be achieved after the simulation and debugging of              [3]   TMS320C6713 DSK Technical Reference, SPECTRUM
the algorithm using the conditional averaging, which works                 DIGITAL, INC
as a low pass filter. It may be noted that filter uses simple        [4]   TMS320 DSP datasheet by Texas instrumentation.
two values averaging at a time and gives the corrected               [5]    Emmanuel C. Ifeachor, Digital Signal Processing, Pearson
output by consuming less processing time. Normally time                    Education
domain averaging uses all the incoming samples for the




© 2010 ACEEE                                                    32
DOI: 01.IJSIP.01.03.188

More Related Content

PDF
Ee463 communications 2 - lab 1 - loren schwappach
PDF
Iy2617051711
PDF
Dwpt Based FFT and Its Application to SNR Estimation in OFDM Systems
PPTX
FILTER BANKS
PDF
Real-time DSP Implementation of Audio Crosstalk Cancellation using Mixed Unif...
PDF
Multistage Implementation of Narrowband LPF by Decimator in Multirate DSP App...
PDF
Audio/Speech Signal Analysis for Depression
PPTX
1 AUDIO SIGNAL PROCESSING
Ee463 communications 2 - lab 1 - loren schwappach
Iy2617051711
Dwpt Based FFT and Its Application to SNR Estimation in OFDM Systems
FILTER BANKS
Real-time DSP Implementation of Audio Crosstalk Cancellation using Mixed Unif...
Multistage Implementation of Narrowband LPF by Decimator in Multirate DSP App...
Audio/Speech Signal Analysis for Depression
1 AUDIO SIGNAL PROCESSING

What's hot (20)

PPTX
Subband Coding
PDF
Fb24958960
PDF
A New Method for Pitch Tracking and Voicing Decision Based on Spectral Multi-...
PDF
Z4301132136
PDF
Closed loop DPCM
PDF
Multirate signal processing and decimation interpolation
PDF
Speech Compression Using Wavelets
DOCX
Voice biometric recognition
PDF
Simulation of Adaptive Noise Canceller for an ECG signal Analysis
PDF
IRJET- Reconstruction of Sparse Signals(Speech) Using Compressive Sensing
PDF
Speaker Recognition System using MFCC and Vector Quantization Approach
PDF
Compressive Sensing in Speech from LPC using Gradient Projection for Sparse R...
PDF
L046056365
PPTX
Speaker recognition systems
PDF
Defying Nyquist in Analog to Digital Conversion
PDF
Matrix Padding Method for Sparse Signal Reconstruction
PDF
Comparative performance analysis of channel normalization techniques
PDF
A review on sparse Fast Fourier Transform applications in image processing
Subband Coding
Fb24958960
A New Method for Pitch Tracking and Voicing Decision Based on Spectral Multi-...
Z4301132136
Closed loop DPCM
Multirate signal processing and decimation interpolation
Speech Compression Using Wavelets
Voice biometric recognition
Simulation of Adaptive Noise Canceller for an ECG signal Analysis
IRJET- Reconstruction of Sparse Signals(Speech) Using Compressive Sensing
Speaker Recognition System using MFCC and Vector Quantization Approach
Compressive Sensing in Speech from LPC using Gradient Projection for Sparse R...
L046056365
Speaker recognition systems
Defying Nyquist in Analog to Digital Conversion
Matrix Padding Method for Sparse Signal Reconstruction
Comparative performance analysis of channel normalization techniques
A review on sparse Fast Fourier Transform applications in image processing
Ad

Viewers also liked (11)

PDF
Random Valued Impulse Noise Removal in Colour Images using Adaptive Threshold...
PDF
Communication by Whispers Paradigm for Short Range Communication in Cognitive...
PDF
Extraction of Circle of Willis from 2D Magnetic Resonance Angiograms
DOC
Production log
PDF
Design of Equitable Dominating Set Based Semantic Overlay Networks with Optim...
PDF
Analysis of GPSR and its Relevant Attacks in Wireless Sensor Networks
PDF
A Traffic-Aware Key Management Architecture for Reducing Energy Consumption i...
PDF
Design and Analysis of Adaptive Neural Controller for Voltage Source Converte...
PDF
The Effectiveness of PIES Compared to BEM in the Modelling of 3D Polygonal Pr...
PDF
Optimally Learnt, Neural Network Based Autonomous Mobile Robot Navigation System
PDF
Power System State Estimation - A Review
Random Valued Impulse Noise Removal in Colour Images using Adaptive Threshold...
Communication by Whispers Paradigm for Short Range Communication in Cognitive...
Extraction of Circle of Willis from 2D Magnetic Resonance Angiograms
Production log
Design of Equitable Dominating Set Based Semantic Overlay Networks with Optim...
Analysis of GPSR and its Relevant Attacks in Wireless Sensor Networks
A Traffic-Aware Key Management Architecture for Reducing Energy Consumption i...
Design and Analysis of Adaptive Neural Controller for Voltage Source Converte...
The Effectiveness of PIES Compared to BEM in the Modelling of 3D Polygonal Pr...
Optimally Learnt, Neural Network Based Autonomous Mobile Robot Navigation System
Power System State Estimation - A Review
Ad

Similar to Conditional Averaging a New Algorithm for Digital Filter (20)

PDF
FPGA Implementation of Large Area Efficient and Low Power Geortzel Algorithm ...
PDF
Digital Signal Processing Summary
PDF
D0542130
PPTX
mean_filter
PDF
D ESIGN A ND I MPLEMENTATION OF D IGITAL F ILTER B ANK T O R EDUCE N O...
PDF
(Original PDF) Applied Digital Signal Processing Theory and Practice
PDF
Construction of The Sampled Signal Up To Any Frequency While Keeping The Samp...
PDF
(Original PDF) Applied Digital Signal Processing Theory and Practice
PDF
DSP - Realization of Finite Impulse Response Filter
PDF
PPT s05-machine vision-s2
PDF
Paper id 252014119
PPTX
Multi resolution & Wavelet Transform.pptx
PDF
Solution Manual for Introduction to Digital Signal Processing, 1st Edition, D...
PDF
Solution Manual for Introduction to Digital Signal Processing, 1st Edition, D...
PDF
Refguide
PDF
Signal & Image Processing And Analysis For Scientists And Engineers Technical...
PDF
Filtering Electrocardiographic Signals using filtered- X LMS algorithm
PDF
Paper id 252014114
PPTX
ED5017 – Digital Signal Processing for Engineering Design_Lec1_3.pptx
PDF
Solution Manual for Introduction to Digital Signal Processing, 1st Edition, D...
FPGA Implementation of Large Area Efficient and Low Power Geortzel Algorithm ...
Digital Signal Processing Summary
D0542130
mean_filter
D ESIGN A ND I MPLEMENTATION OF D IGITAL F ILTER B ANK T O R EDUCE N O...
(Original PDF) Applied Digital Signal Processing Theory and Practice
Construction of The Sampled Signal Up To Any Frequency While Keeping The Samp...
(Original PDF) Applied Digital Signal Processing Theory and Practice
DSP - Realization of Finite Impulse Response Filter
PPT s05-machine vision-s2
Paper id 252014119
Multi resolution & Wavelet Transform.pptx
Solution Manual for Introduction to Digital Signal Processing, 1st Edition, D...
Solution Manual for Introduction to Digital Signal Processing, 1st Edition, D...
Refguide
Signal & Image Processing And Analysis For Scientists And Engineers Technical...
Filtering Electrocardiographic Signals using filtered- X LMS algorithm
Paper id 252014114
ED5017 – Digital Signal Processing for Engineering Design_Lec1_3.pptx
Solution Manual for Introduction to Digital Signal Processing, 1st Edition, D...

More from IDES Editor (20)

PDF
Artificial Intelligence Technique based Reactive Power Planning Incorporating...
PDF
Design and Performance Analysis of Genetic based PID-PSS with SVC in a Multi-...
PDF
Optimal Placement of DG for Loss Reduction and Voltage Sag Mitigation in Radi...
PDF
Line Losses in the 14-Bus Power System Network using UPFC
PDF
Study of Structural Behaviour of Gravity Dam with Various Features of Gallery...
PDF
Assessing Uncertainty of Pushover Analysis to Geometric Modeling
PDF
Secure Multi-Party Negotiation: An Analysis for Electronic Payments in Mobile...
PDF
Selfish Node Isolation & Incentivation using Progressive Thresholds
PDF
Various OSI Layer Attacks and Countermeasure to Enhance the Performance of WS...
PDF
Responsive Parameter based an AntiWorm Approach to Prevent Wormhole Attack in...
PDF
Cloud Security and Data Integrity with Client Accountability Framework
PDF
Genetic Algorithm based Layered Detection and Defense of HTTP Botnet
PDF
Enhancing Data Storage Security in Cloud Computing Through Steganography
PDF
Low Energy Routing for WSN’s
PDF
Permutation of Pixels within the Shares of Visual Cryptography using KBRP for...
PDF
Rotman Lens Performance Analysis
PDF
Band Clustering for the Lossless Compression of AVIRIS Hyperspectral Images
PDF
Microelectronic Circuit Analogous to Hydrogen Bonding Network in Active Site ...
PDF
Texture Unit based Monocular Real-world Scene Classification using SOM and KN...
PDF
Mental Stress Evaluation using an Adaptive Model
Artificial Intelligence Technique based Reactive Power Planning Incorporating...
Design and Performance Analysis of Genetic based PID-PSS with SVC in a Multi-...
Optimal Placement of DG for Loss Reduction and Voltage Sag Mitigation in Radi...
Line Losses in the 14-Bus Power System Network using UPFC
Study of Structural Behaviour of Gravity Dam with Various Features of Gallery...
Assessing Uncertainty of Pushover Analysis to Geometric Modeling
Secure Multi-Party Negotiation: An Analysis for Electronic Payments in Mobile...
Selfish Node Isolation & Incentivation using Progressive Thresholds
Various OSI Layer Attacks and Countermeasure to Enhance the Performance of WS...
Responsive Parameter based an AntiWorm Approach to Prevent Wormhole Attack in...
Cloud Security and Data Integrity with Client Accountability Framework
Genetic Algorithm based Layered Detection and Defense of HTTP Botnet
Enhancing Data Storage Security in Cloud Computing Through Steganography
Low Energy Routing for WSN’s
Permutation of Pixels within the Shares of Visual Cryptography using KBRP for...
Rotman Lens Performance Analysis
Band Clustering for the Lossless Compression of AVIRIS Hyperspectral Images
Microelectronic Circuit Analogous to Hydrogen Bonding Network in Active Site ...
Texture Unit based Monocular Real-world Scene Classification using SOM and KN...
Mental Stress Evaluation using an Adaptive Model

Recently uploaded (20)

PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
Unlocking AI with Model Context Protocol (MCP)
PPTX
Programs and apps: productivity, graphics, security and other tools
PDF
Empathic Computing: Creating Shared Understanding
DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
Machine learning based COVID-19 study performance prediction
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
Review of recent advances in non-invasive hemoglobin estimation
Chapter 3 Spatial Domain Image Processing.pdf
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
NewMind AI Weekly Chronicles - August'25 Week I
Per capita expenditure prediction using model stacking based on satellite ima...
Advanced methodologies resolving dimensionality complications for autism neur...
Unlocking AI with Model Context Protocol (MCP)
Programs and apps: productivity, graphics, security and other tools
Empathic Computing: Creating Shared Understanding
The AUB Centre for AI in Media Proposal.docx
Building Integrated photovoltaic BIPV_UPV.pdf
Spectral efficient network and resource selection model in 5G networks
Machine learning based COVID-19 study performance prediction
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
20250228 LYD VKU AI Blended-Learning.pptx
Review of recent advances in non-invasive hemoglobin estimation

Conditional Averaging a New Algorithm for Digital Filter

  • 1. ACEEE Int. J. on Signal & Image Processing, Vol. 01, No. 03, Dec 2010 Conditional Averaging a New Algorithm for Digital Filter Sukesh Rao M, NMAMIT, E&C Dept, Nitte, India. Email: sukesh_muligar@yahoo.co.in Dr. S. Narayana Iyer, NMAMIT, Nitte, India. Email: iyer_narayana@yahoo.com Abstract—This paper aims at designing a new algorithm for 1) For a fixed sampling frequency, the sample of the digital filters. The traditional methods like FIR, IIR have been incoming signal is processed for three different levels of improved in recent times with new approaches. However, the conditionality, resulting in three different types of cutoff developments have used complex arithmetic calculation and frequencies or the signal bandwidth. dedicated DSP processors. In this research project, effort has been made to reduce such complexities using a procedure 2) A relation is formed between the conditional statements based on the technique of Conditional Averaging. The entire and the cutoff frequencies which remain true for any algorithm is developed using more of conditional statements number of remaining conditional statements and the and less of arithmetic calculations. desired cutoff frequencies. Digital signals are filtered at different stages of 3) A mixed harmonic signal is fed to the system to obtain signal processing. However high speed processor is used for the system response for different cutoff frequencies. different calculations associated with filtration process. An averaging is one such scheme used in simple FIR filter, which II. CONDITIONAL AVERAGING- THE PROPOSED performs low pass filtering operation. Conditional Averaging TECHNIQUE is a new technique, which is one of the improvements in continuous time averaging. Conditional Averaging algorithm Conditional averaging is a new scheme proposed in the is explained in this practice with different examples for the area of different averaging techniques [1]. Simple design of low pass filter. This algorithm has been successfully averaging with N points will reduce any of the AC tested using digital starter kit with TMS3206416v DSP components corresponding to the amplitude variations. All processor. Using code composer studio, the entire algorithm is written in C/C++ language and compiled into an assembly averaging techniques act as low pass filter with the filter language. Conditional averaging can be implemented with any coefficients equal to 1/N. conditional averaging will not general purpose processor to arrive at other types of filters use any such kind of filter coefficients and any definite with certain necessary modifications. mathematical relation as such. The Fast Fourier Transform (FFT) is the method used in Index Terms— FFT, DSP, LPF the DSP (digital signal processing) to find out the frequency spectrum of any given signal. It is a I. INTRODUCTION mathematical operation for obtaining the accurate Filter is a system which selectively changes the wave frequency spectrum. It is also possible to predict the shape, amplitude, frequency content and phase frequency spectrum of the signal with signal amplitude characteristic of a signal as desired. In digital signal variations. The spectrum so obtained may not be accurate processing, based on the design constraints digital filters of and it is approximated. If we know the sampling frequency FIR, IIR or even other types are commonly in usage. In real or the timing interval of the incoming signal, it is possible time signal processing, these filters use dedicated to predict the harmonics present in the signal. Figure 1 Microprocessor system to carry out complex floating point shows a random signal. We can determine the frequency arithmetic operation. To acquire high accuracy and high plot accurately for the signal shown in figure 1 using the precision of the system response, high frequency frequency transform techniques. Also possible to predict supportive DSP processor is used. The scope of this work approximately the harmonics present in the signal by namely Conditional Averaging is to minimize the complex knowing the sampling frequency. Let us assume that the arithmetic operation and obtain better response for the signal is sampled at a rate of fs Hz and figure 2 (a) shows required design using general purpose microprocessor. the resulting discrete samples. From the sampled signal, one can conclude that, (1/ fs) A. Problem Definition is the time gap between two samples. If the signal varies A specially devised technique of conditional averaging with more number of successive samples, then it has been developed to design a low pass filter. The term corresponds to lower harmonics ‘conditional averaging’ has been assigned to this method as Fluctuation with lesser number of successive samples it performs the averaging of a given data set based on corresponds to higher harmonics. All such samples certain attributed conditions. This algorithm has been tested which contribute to the frequency component less than fs for different cutoff frequencies maintaining the sampling can be easily predicted. These samples are marked and frequency at a fixed rate. MATAB simulation technique shown in figure 2(a). The samples marked in red, blue and has been used to confirm and validate the algorithm. The yellow color; corresponds to different frequency algorithm is verified with the following criteria. components within the bandwidth fs. The higher harmonic © 2010 ACEEE 28 DOI: 01.IJSIP.01.03.188
  • 2. ACEEE Int. J. on Signal & Image Processing, Vol. 01, No. 03, Dec 2010 is marked in red color and it contains approximately 7 samples considered for the averaging. Apart from this type samples. This corresponds to a frequency component of averaging one more kind can be introduced, which (1/7)fs. The next harmonic is marked in blue color. It performs the sample modification similar to the averaging. Consider red colored samples from the figure 2 (b) for the sample modification. To remove the fluctuation of this signal, a linear path is predicted between first and the last sample. The linear path is formed between time index t=1 and t=8. It is shown in figure 2 (b). If there are even number of samples, then a value is obtained at the center [t=4.5] of first and last sample. From this value at t=4.5, the averaging with first and last sample leads to two more new sample sets corresponding to t=3 and t=6. Same method of averaging is performed to obtain the values at t= 2, 4, 5 and Figure 1. An arbitrary Signal consists of approximately 15 samples, which contributes to 7. (1/15)fs frequency spectrum of the signal. Similarly the The newly obtained values will make the signal shown yellow colored sample set belongs to lowest harmonic of in figure 2 (c). Same kind of averaging is performed to the the signal and this frequency is less than (1/40)fs. yellow colored samples. Since we perform the averaging To suppress the two harmonics with samples red and only for a set of samples with certain conditions on blue colors and maintain only the harmonic lower than amplitude variations, this algorithm is named as “conditional averaging”. It indicates that this proposed algorithm results in reduced computations, which is certainly an overwhelming advantage. Signal averaging is performed on the basis of the variation in the magnitude of the incoming samples, the averaging takes place always between two samples. Averaging of two samples is performed over N points to determine the new possible sample of the signal. Not all the (a) Samples set identified with different color incoming signal sample undergo for the averaging (b) operation. To test this algorithm, consider a signal, which is sampled at a rate of fs with four different frequency components f1, f2, f3 and f4 with different phase angle Φ1, Φ2, Φ3 and Φ4.We express this signal as follows. (b) Magnified view of samples with red color By assuming suitable values of these frequencies and phase angles, the simulation of the conditional averaging is carried out. Consider f1, f2, f3 and f4 to be 600 Hz, 50 Hz , 2000 Hz and 800 Hz respectively with phase angle of 2Π/3, 0, Π/5 and Π/2. (c) Final reconstructed Signal Figure 2 (1/40)fs, we can think of a technique which will process only these samples. Continuous averaging will suppress the higher frequency components depending on the number of © 2010 ACEEE 29 DOI: 01.IJSIP.01.03.188
  • 3. ACEEE Int. J. on Signal & Image Processing, Vol. 01, No. 03, Dec 2010 bandwidth at i.e. After performing the conditional averaging, the resulting sample is shown in figure 4 (b) with its FFT. The frequency 1250 Hz corresponds to the m=25 and all the values with m>25 are attenuated. Hence it is Figure 3 Resulting wave for 100 samples after sampling Conditional averaging is performed for the first 100 samples of the sampled input signals as shown in figure 4 (a) to get different cutoff frequency for a LPF. The conditional averaging is carried out for three different cases a) Four sample-conditional Averaging b) Eight sample- conditional Averaging (a) Input FFT c) Sixteen sample- conditional Averaging A. Four sample-conditional Averaging Four sample-conditional averaging uses only four sample buffers. The samples in the buffer are used for the comparison process to check the conditions of a relational set. A relational set is an array, which is obtained by comparing two samples each from the main sample set and contains combination of only two values. If the signal frequency of interest is f, then the sampling should be carried out at the rate more than 4f. It is also possible that if a signal is sampled at fs, then the signal can be band limited to minimum of fs/4. Conditional averaging with four sample is the minimum possible selection of the cutoff (b) Output FFT frequency for the design of LPF. The Algorithm uses following steps functioning like a LPF for the designed frequency fs/4. The 1) Take new signal sample to the buffer of size four in first- process introduces a delay of 4 sample time between an in last-out order. input and the output value at any instant of time. The 2) Check the relation between all 4 samples by getting a algorithm mentioned for the conditional averaging is new set of relational array with 3 elements. implemented in the C language. 3) In the relational array search for the unwanted sequence and eliminate that sequence in the buffer by performing B. Eight sample-conditional Averaging Averaging of four samples. Four sample-conditional averaging is simpler and the 4) From the updated buffer, the last sample is taken as basic averaging. Whereas eight sample-conditional output and entire process is repeated from step 1. averaging includes the signal constraints of 4 sample In the figure 3 or figure 4 (a), samples are taken at conditional averaging also. An 8 sample buffer is 5000Hz sampling rate and a 100 point FFT is obtained for maintained for the comparison process to check for the the frequency analysis. Here m varies from 0 to 99 and conditions. Eight sample conditional averaging gives a m=100 correspond to the Nyquist rate, i.e. 5000 Hz in this signal bandwidth of fs/8. Conditional averaging with eight case. sample uses the algorithm used similar to that of four To find the frequency of analysis ‘f’ from the sample-conditional averaging to get the bandwidth for the above FFT desired of LPF. To find the frequency of analysis ‘f’ from the FFT shown in figure 5. Where N=100 an fs =5000 Hz The four samples conditional averaging will result in a © 2010 ACEEE 30 DOI: 01.IJSIP.01.03.188
  • 4. ACEEE Int. J. on Signal & Image Processing, Vol. 01, No. 03, Dec 2010 Where N=100 an fs =5000 Hz The eight sample-Conditional Averaging will give cutoff value at fs/8. i.e. 5000/8=625 Hz .This can be verified by figure5. The frequency 625 Hz corresponds to m=12.5 and all the values m>12.5 are attenuated. Hence it is acting like a LPF for the desired bandwidth. The whole process introduces a delay of 8 sample time between an input and the output. Figure 6 outputs FFT of 16 sample conditional averaging III. RESULT Conditional averaging algorithm is verified in real time to compare the result of the theoretical simulation. To perform this operation DSP Starter kit (DSK6416) is used Figure 5. Output FFT of 8 sample conditional averaging for the programming and the debugging. TMS320C6416v is the key element in DSK6416 system and it has got all the other speech processing peripherals interfaced to it. Input C. Sixteen sample -conditional Averaging signal are fed using audio codec and then processed by the In this Averaging technique only sixteen sample buffers DSP processor. are maintained for the comparison process to check the Audio codec performs analog to digital conversion and conditions. Sixteen sample-conditional averaging includes vice versa. Analog signals are mixed using simple passive the both the processing stages of four and eight sample components to get the mixture of all the input signals. averaging. For a sampling frequency fs, the sixteen sample Signal selections are made such that, they will be within conditional averaging given a bandwidth limit of fs /16 in the sampling frequency of the system. The sampling the design of LPF. To find the frequency of analysis ‘f’ frequency of the DSK6416 is selected by the program from the above FFT shown in figure 6. command to set at 8 KHz. All input signals are band limited to less than 4 KHz to satisfy the Nyquist rate. A real time testing has been carried out for sixteen sample conditional averaging. Sixteen sample-conditional where N=100 an fs =5000 Hz. The eight sample- averaging gives a very small bandwidth of fs /16. More conditional Averaging will give cutoff value at fs /8. i.e. conditional statements has to be included in the processing 5000/16=312.5 Hz .This can be verified by figure 6. of the signal, given that the number of samples considered The frequency 312.5 Hz corresponds to m=6.25 and all are more for the signal processing. The time domain input the values m>6.25 are attenuated. Hence it is behaving like and the output signal after the processing through a LPF. The whole process introduces a delay of 16 sample conditional averaging are shown in the figure 7 (a). time between an input and the output. A test is conducted with different input FFT, wherein a FIR filtering obeys sinusoidal functional manipulation, signal of higher frequency component within the input hence the output samples are also the part of sine or cosine band limit is fed into the system. The output FFT obtained functions. The above work is still modified for the better clearly shows the attenuation of the signal above 500Hz in performance for different frequencies. When more samples the spectrum. The signals above 4 KHz are also attenuated, are taken for a particular conditionality, it is possible to as the signal was sampled at 8 KHz rate and hence it can modify the range of the bandwidth. Conditional Averaging not reconstruct the signal beyond 4 KHz (refer figure 7 makes use of the deterministic signals like ECG, EMG and (c)). Including more conditional statements for a signal of EEG, which are the better sources of signals for the higher frequency value, the output response of the system analysis. To reiterate, this algorithm reduces the we find is much better. computation. © 2010 ACEEE 31 DOI: 01.IJSIP.01.03.188
  • 5. ACEEE Int. J. on Signal & Image Processing, Vol. 01, No. 03, Dec 2010 processing, but the conditional averaging uses only limited number of samples, which satisfy the conditional array set. This results in reduced computational time and burden on the processor. Any type of general purpose processor can be used to design the system for the signal processing using this algorithm. Thus, unlike other algorithm, this method requires only a general purpose processor. However, in the (a) Input and Output signal proposed algorithm, in order to verify all the sets of possible combination within the short period of time, before the next sample arrives, a high speed general purpose processor is required. This processor should be able to execute minimum of 100 to 1000 instructions within one sampling time. For the lower bandwidth, system undergoes more conditional statements and therefore it requires more instruction for the processing. Conditional algorithm can also be developed for the analysis of ECG, EEG signals as well. Therefore, conditional averaging becomes a very useful filtering algorithm to analyze the biomedical signals. All such biomedical signals are of low frequency and any high frequency noise or the signal surge can be easily detected (b)Input signal FFT using the conditional averaging. The main drawback of the system is that, it may distort the signal by adding many other lower harmonics within the bandwidth. To alleviate this and get a desired bandwidth, it is necessary to include more conditional statements during processing. This conditional averaging is possible to be applied to high pass filtering operation also. It may not be just averaging as performed in the case of the low pass filter design. Design of narrow band pass filter using the conditional averaging algorithm is another future work. REFERENCES (c) Out put FFT [1] Welch P. D “ The use of Fast Fourier Transform for the estimation of power spectra: A method based on time Fig 14 averaging over short, Modified periodgrams” IEEE transaction on audio and electroacoust., Vol. AU-15 No.2 CONCLUSION June 1967 [2] Richard G Lyons, Understanding Digital signal processing The desired bandwidth for the proposed low pass filter Pearson Education third edition.2001. could be achieved after the simulation and debugging of [3] TMS320C6713 DSK Technical Reference, SPECTRUM the algorithm using the conditional averaging, which works DIGITAL, INC as a low pass filter. It may be noted that filter uses simple [4] TMS320 DSP datasheet by Texas instrumentation. two values averaging at a time and gives the corrected [5] Emmanuel C. Ifeachor, Digital Signal Processing, Pearson output by consuming less processing time. Normally time Education domain averaging uses all the incoming samples for the © 2010 ACEEE 32 DOI: 01.IJSIP.01.03.188