Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

Adaptive Noise Cancellation using ANFIS Algorithm: A Study on Signal Restoration, Study notes of Electrical and Electronics Engineering

A project aimed at canceling noise in a signal using the adaptive neuro-fuzzy inference system (anfis) algorithm. The project was carried out in matlab 7.0 with the fuzzy logic toolbox. The main objective was to produce an output with minimal noise, allowing for precise measurement of the information signal. The concept of noise, its sources, and the methods of adaptive noise cancellation. It also provides code snippets for generating the noise source signal, interference signal, and the three-dimensional graph for visualizing the interference and noise.

Typology: Study notes

Pre 2010

Uploaded on 08/19/2009

koofers-user-8ek-2
koofers-user-8ek-2 🇺🇸

10 documents

1 / 12

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
“Adaptive Noise Cancellation using the Adaptive Neuro-Fuzzy Inference System
Algorithm”
Yassir A. Granillo
April 20, 2006
EE 5390: Fuzzy Logic and Engineering
Professor: Dr. Thompson Sarkodie-Gyan
pf3
pf4
pf5
pf8
pf9
pfa

Partial preview of the text

Download Adaptive Noise Cancellation using ANFIS Algorithm: A Study on Signal Restoration and more Study notes Electrical and Electronics Engineering in PDF only on Docsity!

“Adaptive Noise Cancellation using the Adaptive Neuro-Fuzzy Inference System Algorithm” Yassir A. Granillo April 20, 2006 EE 5390: Fuzzy Logic and Engineering Professor: Dr. Thompson Sarkodie-Gyan

Abstract The main goal of this project is to cancel the noise generated in the signal and produce an output with as little as noise as possible. The concepts used in this project will be dealt with in Signal-to-Noise Ratio, or SNR. This means how much signal there is compared to the noise generated. Of course the higher the SNR the better but that is not always the case. To implement this process of noise cancellation, the software that will be used is MATLAB 7.0 with the help of the Fuzzy Logic Toolbox, using a very advanced algorithm called the adaptive neuro-fuzzy inference system better known as the command “anfis”. Introduction In electronic systems, the one parameter that can not be eliminated completely is called noise. To be more technical, noise is any unwanted signal at any frequency that accompanies the desired signal and tends to contaminate it. Noise limits measurement, precision, and signal detectability. These noises are infiltrated in the system by internal and external means. External noise is any noise due to the environment, such as power frequency interference, auto ignition, radio and television, lighting, and structure vibration. Some of this noise is also generated internally, as in resistors, diodes, and amplifiers, electronic systems and equipment. Methods of adaptive noise cancellation were proposed by Widrow and Glover in

  1. The methods were applied successfully in the areas of image processing and communications [1], [2]. The main objective of adaptive noise cancellation is to filter out an interference parameter. This is done by identifying a model between a measurable noise source and the corresponding non-measurable interferences. In many and in fact in most situations, a linear model operates exceptionally. But nevertheless, a linear model does not perform well in situations that nonlinear phenomena occur [3]. This is the main reason why the need for adaptive nonlinear filtering is approached. Experimental Procedure The very first step for this project was the generation of a sinusoidal wave, which is the information signal of the system using MATLAB 7.0. A sinusoidal was used because it is a continuous function with infinite energy that is very common in all electronic applications, such as an AC source signal, whether it is a current or a voltage source, a heart monitor, radiated electromagnetic and sound waves, and many other forms. The creation of the sinusoidal was rather simple; no complex parameters were added to the sinusoidal. The sinusoidal was defined from time zero seconds (0) all the way to time ten (10) seconds with an increment of 0.01 seconds. Proceeding the generation of the sinusoidal, a noise source signal had to be implemented because the information signal can not be measured without an interference signal. The reason is stated in the introduction; because the main goal of adaptive noise cancellation is to filter out an interference parameter. Hence the implementation of the interference signal is necessary. A perfect example of this is the apparatus of the heart monitor. The heart monitor reads the activity of the heart, but there are interferences inside the human body that can not make the reading of the heart precise; but with the help of the adaptive noise cancellation, interferences from outside source can be dealt with and thus the desired reading of the human heart activity is made possible. This noise source signal is generated by the function “randn” which produces a random signal of size t, where t is the range of the information signal spread out over a

signal and the interference signal. To generate the hypothetical information signal, the user implemented in MALTAB a sinusoidal wave. The code for looks as follows: t = (0:0.01:10)'; x = sin(42pi*t); plot(t,x); title('Information Signal x'); xlabel('TIME'); ylabel('GAIN');

Fig. 1: A hypothetical information signal x sampled at 100Hz over 10 seconds. The next data acquired for project was the noise source signal. Again the noise source signal is needed in order to generate the interference signal. The code for the generation of the noise source signal, n1, is as follows: n1 = randn(size(t)); plot(t, n1); title('Noise Source Signal'); xlabel('TIME'); ylabel('Noise');

Fig.2: Random Noise Source Signal Next, the three-dimensional plot is shown. This plot shows the behavior of the interference signal n2 that appears in the measured signal is assumed to be generated via an unknown nonlinear equation: n 2 = cos( n 1 ) (Eq.1)

The code for the 3-D plot is as follows: d = linspace(min(n1), max(n1), 20); [xx, yy] = meshgrid(d, d); zz = 4*cos(xx); surf(xx, yy, zz); xlabel('Noise 1'); ylabel('No Affect'); zlabel('Interference Signal'); title('Unknown Parameters That Generate Interference'); axis([min(d) max(d) min(d) max(d) min(zz(:)) max(zz(:))]); set(gca, 'box', 'on');

However, the user does not know n2. The only signals available to the user are the noise signal n1 and the measured signal m, and the user’s task is to recover the original information signal x. The code for this signal is described below: m = x + n2; plot(t, m) title('Measured Signal'); xlabel('TIME');

Fig. 5: The measured signal composed of the information and interference signals. Fuzzification and Rule-Based System The fuzzification of the project dealt with the commands “ evalfis ”, “ genfis1 ”, and “ anfis ”. The first part of the project that was fuzzified was the delayed signal of the noise source signal, the measured signal, and the noise source signal. These three functions were put into a matrix together before they were fuzzified. The user calls the matrix in which the delayed noise source signal, the noise source signal, and the measured signal a training data matrix. This occurs since n2 is not directly available to the user, a corrupted version of n2 is taken from the measured signal, m. Before fuzzifying the training data matrix, the user needs to determine the number of membership functions that will be used in this project. For this particular example, the user decided to use two membership functions because of the order of the nonlinear channel (the 3-D plot). After having decided the number of membership functions to be used in this project, the number of rules are now determined. Because of the command “ anfis ” the assignment of two membership functions to each input is assigned. Since the user’s order of the nonlinear channel is 2, the user also assumes two (2) inputs to the system. Because of the number of inputs the user has and because of the number of membership functions the user has, the quantity of rules used in this project is four rules (4). Finally, the step size of the system is 0.2. Having defined these parameters, the user is now ready to fuzzify the functions. After having put n1_1, the delayed noise source signal, n1, the noise source signal, and m, the measured signal, into a training data matrix, the

assembled training data matrix is not the input to the fuzzy inference system (FIS) with two membership functions. The fuzzification looks as follows: d_n1 = [0; n1(1:length(n1)-1)]; training = [d_n1 n1 m]; mf = 2; ss = 0.2; in=genfis1(training, mf); The command “ genfis1 ” is used to fuzzify the training data matrix. “ GENFIS1 ” generates a Sugeno-type FIS structure used as initial conditions (initialization of the membership function parameters) for anfis training. “ GENFIS1 ” (data, number of membership functions, in membership function type, out membership function type) generates a FIS structure from a training data set, using a grid partition on the data (no clustering). The next step was to fuzzify the output of the system. This was done by the command “ anfis ”. “ ANFIS ” uses a hybrid learning algorithm to identify parameters of Sugeno-type fuzzy inference systems. It applies a combination of the least-squares method and the back-propagation gradient descent method for training FIS membership function parameters to emulate a given training data set [3]. The code implemented for this project using “ anfis ” goes as follows: Out=anfis(training, in, [nan nan ss]); The final step that the user took was to evaluate the fuzzy inference system using the command “ evalfis ”. This function was used to get the estimated interference signal by using the training data and the fuzzification of the output. The code for this process is: e_n2 = evalfis(training(:, 1:2), out); Finally, in order to get the recovered signal, the user subtracted e_n2, the estimated interference signal, from the measured signal, m. e_x=m - e_n2; Defuzzification The advanced algorithms used in this project such as “ anfis ” and “ genfis1 ” have their own defuzzification method. Since in this project involves Sugeno-Type Fuzzy Inference Systems, the defuzzification method used in this project is weighted average process. This defuzzification model involves for both commands “ genfis1 ” and “ anfis ”. In weighted average defuzzification method, the output is obtained by the weighted average of the each output of the set of rules stored in the knowledge base of the system. The weighted average defuzzification technique can be expressed as

1 1

= =

n

i

i i

n

i

x mi^ w m (Eq. 2)

where x* is the defuzzified output, mi^ is the membership of the output of each rule, and wi is the weight associated with each rule [4]. Results The results for this project were rather astounding. First at the fuzzification process, the graph of the estimated interference signal was generated with the command “ evalfis ”. The code for the generated estimated interference signal looks as follows: a1 = [min(t) max(t) min([n2; e_n2]) max([n2; e_n2])]; plot(t, e_n2);

Finally, the user compares the graph of the original information signal to that of the reconstructed information signal.

Fig 8: The top graph represents the original signal and the bottom graph represents the reconstructed signal. Conclusion and Recommendation for Future Enhancement Fuzzy logic is an excellent way to implement signal reconstruction process. The algorithm “ anfis ” is a very practical and very proficient function that can do the job; and the beauty of this algorithm, it works with nonlinear processes. The good thing about this algorithm also is that it can do the job also without having to implement a training data matrix. The “ anfis ” algorithm helps better the signal-to-noise ratio in electronic apparatus such as the heart monitor discussed previously. The less noise the electronic system has, the better it is; hence the “ anfis ” helps in systems cancel unwanted signal such as noise using fuzzy logic. A group of Asian graduates from Singapore made a similar approach to the project just presented, it is called Adaptive Noise Cancellation Using Enhanced Dynamic Fuzzy Neural Networks, and this article was published in the IEEE journal. The group was composed of three graduate students and a professor from the University of Singapore. They conducted very extensive research and came up with an interesting algorithm, called the Modified Dynamic Fuzzy Neural Networks (mdfnn). They compared the mdfnn algorithm with the anfis algorithm. These graphs are their testing results:

Fig. 9: The top part is a test simulation with ANFIS and the bottom with MDFNN.

Notice that the bottom signal has much less noise than the top graph. In the user’s opinion, the signal is cleaner and more precise to the original function. This is algorithm is by far better that the command “ anfis ” and gives better representation of the original information signal. This algorithm is an enhancement of the “ anfis ” command.