You are on page 1of 6

2012 9th International Conference on Electrical Engineering, Computing Science and Automatic Control

Mexico City, Mexico. September 26-28, 2012

A Novel Adaptive Filtering for Audio Signals


Using Artificial Hydrocarbon Networks
H. Ponce, P. Ponce, A. Molina
Posgrados en Ingeniería; Escuela de Diseño, Ingeniería y Arquitectura
Tecnológico de Monterrey, Campus Ciudad de México; Mexico City, Mexico
E-mail: hiram.ponce@itesm.mx, pedro.ponce@itesm.mx, armolina@itesm.mx
Thus, an overview of artificial hydrocarbon networks is
Abstract –– The present paper introduces a novel adaptive presented in the following section. Then, Section III
filtering for audio signals corrupted with white noise. The describes the proposed adaptive filter using artificial
audio filter is based on artificial hydrocarbon networks hydrocarbon networks. In Section IV, experimental results
(AHNs), a novel approach inspired on organic chemistry for
on noisy audio signals are summarized. One sample audio
stability, well-forming and easy-spanning topologies. In that
sense, an AHN-molecular structure adapts its parameters in a extracted from a popular rock song is filtered with the
specific window to cancel signal noise from original audio proposed filter and it is compared with a classical finite
sequence using the notion of filtering given by AHN-topologies. impulse response (FIR) filter. In addition, a DSP NI-Speedy
Results of the present approach show that artificial 33 hardware system implements the AHN-filter offline.
hydrocarbon networks can achieve audio filtering for noisy Finally, conclusion and future work is depicted.
signals. Then, a comparison between AHN-filtering and FIR
filtering is presented. In addition, the AHN-filtering is
implemented on DSP NI-Speedy 33 hardware. II. ARTIFICIAL HYDROCARBON NETWORKS
Keywords –– Artificial hydrocarbon networks, audio
filtering, DSP. Recently, Ponce and Ponce [10] proposed a new
algorithm inspired on organic compounds called artificial
organic networks (AON). These nets derive from the
I. INTRODUCTION necessity of being stable, well formed and easily spanning
structures. [10], [11] and [9] reported the mathematical
Many signal processing applications are corrupted with formalization and the usage of graph theory to define
noise signals. For example: images, sound, data acquisition, artificial organic networks.
electrical engineering, transmission signals, and so on [1],
[2], [5], [6], [7], [8]. In AONs, the simplest unit is the atom. A punch of
atoms can interact among them via a collection of bonds in
Audio applications are not the exception. Thus, the order to form molecules. In particular, bonds or links appear
usage of audio filters to shape noisy audio signals is very between two atoms only when they have at least one degree
common [3], [5]. Specifically, white noise is a kind of noise of freedom, so-called valence electrons [10]. In addition,
signal with a uniform frequency spectrum, i.e. it contains when a molecule fills up all its valence electrons is said to
every frequency components with the same amplitude. In be a stable molecule; otherwise, it is considered an unstable
that sense, linear filters do not have good responses and molecule. On the one hand, stable molecules are stable in
nonlinear filters such as adaptive filters are proposed. steady state and they do not allow forming new molecules.
Tendencies on adaptive filtering cover artificial neural On the other hand, unstable molecules are not so stable in
networks, fuzzy systems, and more precisely, artificial steady state but they allow to link new atoms to it in order to
intelligence techniques [6], [8]. perform complex actions [10]. Furthermore, primitive
molecules are unstable molecules used to generate well-
In that sense, this paper introduces a novel adaptive formed artificial organic compounds [9].
filtering for audio applications using a recent artificial
intelligence technique called artificial hydrocarbon networks Links are of two types: polar covalent bonds which
(AHN) [9], [10], [11]. This algorithm is bio-inspired on links two similar atoms, and non-polar covalent bonds
organic chemistry for stability, well-forming and easy- which links two different atoms [10].
spanning topologies. In fact, several results presented on
[10], [11] and [9] suggest that artificial hydrocarbon Formally, an artificial organic network is a graph AON
networks might be used as filters. However, since there is no (1) with a set C of primitive molecules Mi of the form (2),
previous information about AHN-based filtering, this work all linked with a collection B of polar covalent bonds; so-
aims to prove filtering approaches on audio signals called a compound with functional group G [10]. A is a set
corrupted with white noise. of atoms of primitive molecules and BN is a set of non-polar
covalent bonds of the same primitive molecules. Figure 1
shows the basic structure of an artificial organic network.

IEEE Catalog Number: CFP12827-CDR


ISBN: 978-1-4673-2168-6 277
978-1-4673-2169-3/12/$31.00 ©2012 IEEE
2012 9th International Conference on Electrical Engineering, Computing Science and Automatic Control
Mexico City, Mexico. September 26-28, 2012

of the functional group CH or family (4). Figure 2 shows the


basic structure of an artificial hydrocarbon network.

However, the definition of (6) allows shaping a very


simple compound. In order to improve more complex
compounds, [11] also presents the way to associate different
simple compounds into a more sophisticated compound via
chemical balance inspiration using (7); where {aj} are
constant parameters also known as stoichiometric
coefficients and Mj is any molecule or compound. Figure 3
presents a basic interaction among molecules or compounds.

On the other hand, the algorithm for approximating


Fig. 1. Structure of an artificial organic network. functions proposes that a given function can be divided into
n segments, and each of them can be approximated by n
AON = (C, B) ! G (1) molecules or compounds selected from a catalog of
molecules (see details on [9]). In addition one CH molecule
M i = (A, BN )i (2)
excited with a zero-value offsets the approximation.
Hydrogen atom values and stoichiometric coefficients can
In addition, organic chemistry notices that hydrocarbons be easily obtained using the least squares estimation (LSE)
are the simplest and most stable organic compounds [12], method [9]. Additionally, in order to assure stability,
[13]. Based on that fact and assuming a topological structure hydrogen atom values have to be inside the real close
like artificial organic networks, Ponce and Ponce [10], [11], interval | H i |! 4 . The optimal artificial hydrocarbon network
[9] proposed a particular structure so-called artificial
structure is the one that cannot be reduced by eliminating
hydrocarbon networks (AHN) which uses the functional
molecules or compounds [9].
group CH and only two different atoms.

The two simplest units of AHNs are the hydrogen atom


H and the carbon atom C, defined as (3) and (4); where, h0 is
a constant value, r is the number of atoms connected to C up
to 4 which is the number of valence electrons associated to
C, and x is the input value in the open interval |x| < 1 [11],
[9]. Interestingly, hydrogen atoms associated to C represent
the zeros of the carbon atom; then, the function of a carbon
atom is normalized and its convergence can be easily
computed using the ratio test [14], [11]. In fact, (4) is known
as the family of all primitive CH molecules inside the
functional group CH [9].

Two or more primitive molecules can be associated


Fig. 2. Structure of an artificial hydrocarbon network.
using a polar covalent bond Bk defined as (5), in which e is
the exponential function and Mi and Mj is a pair of
molecules [9].

H = h0 (3)
r
C = " (x ! H i ) (4)
i=1
M i +M j
Bk ( M i , M j ) = e (5)

Formally, the artificial hydrocarbon network [10] is a


graph AHN defined as (6) under the AON properties. Thus,
an AHN is a compound of primitive molecules Mi linked
among them by a set of polar covalent bonds Bk; and,
assuming that the set of primitive molecules is a proper set
Fig. 3. Interaction of molecules and compounds via chemical balance.

IEEE Catalog Number: CFP12827-CDR


ISBN: 978-1-4673-2168-6 278
978-1-4673-2169-3/12/$31.00 ©2012 IEEE
2012 9th International Conference on Electrical Engineering, Computing Science and Automatic Control
Mexico City, Mexico. September 26-28, 2012

AHN = ( M, Bk ) ! CH (6)

AHN = ! ai M i (7)
i

III. DESCRIPTION OF THE PROPOSED AHN-FILTERING

This section introduces the proposed artificial


hydrocarbon network based adaptive filtering for audio
signals corrupted with white noise.

Firstly, the original audio signal is divided into batches, Fig. 4. Segment of audio signal showing partitioned window.
so-called windows. Each window has a finite size measured
in seconds, i.e. milliseconds. Particularly to this work, all
windows are subjected to the same size. In addition, each IV. RESULTS
window is equally divided into several partitions. Thus,
partitions represent approximating regions for AHN- The proposed AHN-based filtering for audio signals
molecules. Figure 4 shows a partitioned window. with white noise was implemented computationally. Five-
second mono-channel audio signal segment sampled at
In that sense, AHN-molecules will approximate the 44.10KHz of a popular rock band was extracted and
function of the current window, acting as a filter. Moreover, normalized. Additionally, it was corrupted with white noise
the structure of the AHN will change for different windows, of variance 0.013. Figure 5 shows the original audio signal
given to it the adaptive property. and the noisy audio signal.
The above description is summarized in the following In order to prove filtering via AHN-molecules, the
steps: response signal is compared to a classical FIR filter because
its simplicity of implementation and well-known response
1. Determine the size of window tW in seconds. for lowpass filtering. For instance, the FIR filter is expressed
2. Determine the number of molecules n for each as a finite weighted sum of the form in (8); where, x[n] is a
approximating window. finite sequence of data representing the input signal, bk are
3. For each window: filter coefficients found by designing methods (e.g.,
a. Determine the approximating region windowing), y[n] is the output signal, and M represents the
(partition) size tP, in seconds, using the order of the FIR filter [1], [2].
ratio between tW and n.
b. For each partition, find the best real values M
for hydrogen atoms associated to the y[n] = " b k x[n ! k] (8)
AHN-molecule via LSE.
k=0
c. Build the AHN structure with all AHN-
molecules, using (7) via general LSE.
In addition, the notion of how well AHN-molecules can
d. Run the proper AHN trained so far.
filter is measured by the short-time objective intelligibility
(STOI) value, which represents a monotonic relation with
In order to find real hydrogen parameters as fast as
the average intelligibility of filtering signal [15]. In that
possible, primitive CH molecules are proposed. This means
sense, STOI metric was selected to measure – in an
that only one of the following molecules can be used for
objective, non-qualitative, way – the intelligibility of the
partitions: CH, CH2 or CH3. Notice that there are less or
filtered signal with respect to the original signal.
equal than three real roots on each molecule. It is precise to
say if complex roots are obtained by LSE, then it has to be
Thus, in the first experiment, the proposed AHN were
modified in order to find only real roots.
built using 10 primitive CH3 molecules. The size of the
window was fixed to 20ms with 2ms partitions. Figure 6.a
At the end, artificial hydrocarbon networks will act as
present the results of filtering the noisy audio signal. In
an adaptive filter for the original noisy audio signal with few
order to compare it, a classical 30th order FIR of the noisy
real hydrogen-parameters.
signal was implemented (Figure 6.b); cut-off frequency and
attenuation were calculated by spectral analysis.

IEEE Catalog Number: CFP12827-CDR


ISBN: 978-1-4673-2168-6 279
978-1-4673-2169-3/12/$31.00 ©2012 IEEE
2012 9th International Conference on Electrical Engineering, Computing Science and Automatic Control
Mexico City, Mexico. September 26-28, 2012

In addition, Figure 7 shows a comparative chart in


frequency domain in which classical FIR filter preserves the
magnitude of the signal slightly better than the proposed
AHN-filter. Graph in Figure 7.a depicts the noisy signal in
frequency domain in which the frequency components of the
clean audio fades out at approximately 2000Hz.

Interestingly, both AHN-filtering signal (Figure 7.b) and


FIR-filtering signal (Figure 7.c) in frequency spectrum show
that lowpass filtering is performed with a cut-off frequency
(a) close to 2000Hz. Since, Figure 7 qualitatively proves that
artificial hydrocarbon networks can perform lowpass filters
similarly to classical filters; STOI values were also
measured in AHN-filtering and FIR-filtering signals
obtaining 0.6036 and 0.7916, respectively. In that sense, the
higher STOI value (e.g., in the interval from 0.0 to 1.0), the
better intelligibility audio signal; thus, the FIR-filter is
relatively 23.7% more efficient than the AHN-filter.

(b)
Fig. 5. Audio segment: (a) original signal, (b) noisy signal.

As notice in Figure 6, the proposed adaptive AHN


structure can achieve audio filtering, at least corrupted with
white noise.
(a)

(a) (b)

(b) (c)

Fig. 6. Audio segment filtering: (a) proposed AHN, (b) classical FIR. Fig. 7. Analysis of magnitude in frequency domain:
(a) noisy signal, (b) proposed AHN-filter, (c) classical FIR.

IEEE Catalog Number: CFP12827-CDR


ISBN: 978-1-4673-2168-6 280
978-1-4673-2169-3/12/$31.00 ©2012 IEEE
2012 9th International Conference on Electrical Engineering, Computing Science and Automatic Control
Mexico City, Mexico. September 26-28, 2012

On the other hand, in order to prove implementation of It also presents the output signal filtered (Figure 8.b)
adaptive AHN filters on hardware, it was implemented on with a 10 CH3-molecule AHN structure using a window of
DSP NI-Speedy 33 hardware. The latter is an educational 10ms (partition ratio of 1ms). A classical FIR filter was also
board for signal processing that can be programmed using implemented to compare results (Figure 8.c). Notice that
LabVIEW software [4]. offline is required to set the latter parameters. If online
filtering is required, real-time techniques may be used; but
In that sense, the audio signal is obtained through a presetting parameters is mandatory. As seen in Figure 8,
microphone connected to the analog input of the NI-Speedy classical FIR filter achieves lowpass filtering but attenuates
33. Then, the audio signal is analyzed with the methodology the original signal corrupted with some white noise. In
described in Section III using LabVIEW on a computer. All comparison, adaptive AHN-filter does not attenuate the
the process occurs offline. Finally, the audio signal filtering original signal but it filters with a cut-off frequency higher
is sent to the NI-Speedy 33, which reproduces the signal on than classical FIR’s; Figure 9 shows it as a spectral analysis
headphones connected to the analog output port. on both proposed AHN-filter and classical FIR filter. Notice
that input signal has the most frequency energy in the range
Figure 8 shows the 3-second audio signal collected from from 0 to 1000Hz (Figure 9.a). However, audio signal
NI-Speedy 33 sampled at 44.1KHz and corrupted filtering with AHN-molecules, apparently with 2500Hz cut-
programmatically with white noise of variance 0.013. off frequency does not eliminate all white noise (Figure 9.b).

(a) (a)

(b) (b)

(c) (c)

Fig. 8. DSP noisy audio segment filtering: Fig. 9. DSP-analysis of magnitude in frequency domain:
(a) original signal, (b) proposed AHN, (c) classical FIR. (a) noisy signal, (b) proposed AHN-filter, (c) classical FIR-filter.

IEEE Catalog Number: CFP12827-CDR


ISBN: 978-1-4673-2168-6 281
978-1-4673-2169-3/12/$31.00 ©2012 IEEE
2012 9th International Conference on Electrical Engineering, Computing Science and Automatic Control
Mexico City, Mexico. September 26-28, 2012

Audio signal filtering with FIR filter cancels noise much Both extracted sample of recording and audio speech
more efficiently at 2000Hz cut-off frequency (Figure 9.c). implementation on DSP prove that artificial hydrocarbon
networks can perform audio filtering on signals with white
The qualitative comparison above is also complemented noise. Comparisons between AHN-filters and FIR-filters
with the quantitative STOI metric; in which, filtered audio were done, and similar responses were derived. In particular,
signal by the AHN-filter has a 0.6662 STOI value spectral analysis and STOI metrics were used. In fact, AHN
contrasting with the 0.9668 STOI value obtained from the structures can perform filtering applications, but a better
filtered audio signal using the FIR-filter. Thus, FIR-filter is algorithm to train them is also needed for more accuracy.
relatively 31.1% more efficient than the AHN-filter.
Further work on audio filtering applications using
In particular, the cut-off frequency of the AHN-filter is
artificial hydrocarbon networks focuses on other
explained by the partition ratio coefficient tP because it
relates the accuracy of the approximation. Let suppose that methodologies that minimize the amount of time required
the window size is fixed to be tW* and the number of data for training AHN-filters. Additionally, because AHNs
points inside the window is (n + 1). Then, the maximum primary centers on approximating functions, it might be
number of molecules used for approximate the (n + 1) data used for audio compression applications, too.
points is n. If fact, the number of AHN-molecules (or
partitions) used for approximate the data points lies on the
closed interval [1, n]. Finally, if the partition size is the ratio REFERENCES
between tW* and the number of AHN-molecules, then tP lies [1] T. W. Parks, C.S. Burrus, Digital Filter Design, United States of
on the closed interval [tW*, tW*/n]. Because the better America: Wiley-Interscience, 1987.
approximating function is done with n molecules, the [2] A. Antoniou, Digital Filters: Analysis, Design, and Applications,
smaller tP represents it, e.g. tW*/n. In that sense, a better United States of America: McGraw-Hill, 1993.
[3] L. Thede, Analog and Digital Filter Design using C, NJ:
approximation means a higher value of cut-off frequency for Prentice-Hall, 1996.
lowpass filters such as the proposed AHN-filter. [4] National Instruments (2011), LabVIEW platform software,
United States of America.
[5] J. O. Smith, Introduction to Digital Filters with Audio
Applications, United States of America: Stanford University,
V. CONCLUSION 2007.
[6] Di Ciura, M., Serina, N., Rizzotto, G., Adaptive Fuzzy Filterin
This paper introduces a novel adaptive filter using for Audio applications Using a Neuro-Fuzzy Modelization,
artificial hydrocarbon networks. In fact, previous works International Conference on Neural Networks, 4, pp. 2162 –
2166.
suggest that AHNs might be used as filtering, but there were [7] S. Winder, Analog and Digital Filter Design, United States of
no approaches. In that sense, this paper aims to show that America: Newnes, 2002.
AHNs can perform filtering. [8] Sadiki, T., Slock, D. (2005), Bayesian Adaptive Filtering at
Linear Cost, 13th Workshop on Statistical Signal Processing, pp.
141 – 146.
Using the description of the proposal, experimental [9] Ponce, H., Ponce, P. (2012), Artificial Hydrocarbon Networks: A
results reveal that artificial hydrocarbon networks can New Algorithm Bio-Inspired on Organic Chemistry, International
Journal of Artificial Intelligence and Computational Research,
perform lowpass audio filtering in signals corrupted with vol. 4(1), pp. 39 – 51.
white noise. In addition, the proposed AHN-filter lies on [10] Ponce, H., Ponce, P. (2011), Artificial Organic Networks,
nonlinear, adaptive filtering in which hydrogen-parameters Electronics, Robotics and Automotive Mechanics Conference
(CERMA), 2011 IEEE, pp. 29-34.
characterize the whole AHN-structure. In order to conform
[11] Ponce, H., Ponce, P. (2011), Artificial Hydrocarbon Networks,
the AHN topology, a partitioned window was defined to set IX Congreso Internacional sobre Innovación y Desarrollo
the number of molecules used for filtering. Moreover, the Tecnológico (CIINDET), pp. 614-618.
size of the window tW and the number of molecules n define [12] W. Brown, C. Foote, B. Iverson, E. Anslyn, Organic Chemistry,
United States of America: Cengage Learning, 2009.
the partition ratio tP needed to set the proper artificial [13] T. Brown, E. LeMay, B. Bursten, et. al., Chemistry: The Central
hydrocarbon network filter. It was observed that the ratio Science, United States of America: Prentice Hall, 2009.
coefficient is fundamental in AHN-filtering because it [14] D. G. Zil, W. S. Wright, M.R. Cullen, Advanced Engineering
Mathematics, United States of America: Jones & Bartlett
relates the accuracy of the approximation; and, the better Learning, 2009.
accuracy, the greater cut-off frequency for lowpass filtering. [15] Taal, C., Hendriks, R., Heusdens, R., Jensen, J. (2011), An
Algorithm of Intelligibility Prediction of Time-Frequency
Weighted Noisy Speech, IEEE Transactions on Audio, Speech,
On the other hand, the proposed adaptive AHN-filter and Language Processing, vol. 19 (7), pp. 2125 – 2136.
was implemented offline on DSP hardware. In that way,
parameter settings are done during the offline training
process of the artificial hydrocarbon network.

IEEE Catalog Number: CFP12827-CDR


ISBN: 978-1-4673-2168-6 282
978-1-4673-2169-3/12/$31.00 ©2012 IEEE

You might also like