Electronica

Solo disponible en BuenasTareas
  • Páginas : 6 (1261 palabras )
  • Descarga(s) : 0
  • Publicado : 19 de octubre de 2010
Leer documento completo
Vista previa del texto
Moving Average Filter
M. Cobos, A. Izquierdo Digital Signal Processing Facultad de Ciencia y Tecnología, Universidad delAzuay
Abstract
A moving average filter, the most common filter in DSP because it is the easiest digital filter to understand, is used to analyze a set of data points from an input signal by creating a series of averages of different subsets of the full data set, it is optimal for reducing random noise while retaining a sharp step response. Moving average filters are divided by the way theyaverage a number of points from the input signal, and we have two types: the forward average filter and the symmetric average filter.

1. Introduction

A moving average filter, the most common filter in DSP because it is the easiest digital filter to understand, is used to analyze a set of data points from an input signal by creating a series of averages of different subsets of the full data set,it is optimal for reducing random noise while retaining a sharp step response. Moving average filters are divided by the way they average a number of points from the input signal, and we have two types: the forward average filter and the symmetric average filter.
2. Forward Average Filter
This Filter is based on the Eq.(1):
Yi=1M*j=0m-1X[i+j] Eq.(1)
Where “M” Is the number of points to beaveraged, “j” Index of points being averaged and “i” Input array index. In this type of filters the output signal will be delayed.
Example 1:
Taking X[90] and M=5
Y90=X90+X91+X92+X93+X[94]5

3. Symmetric Average Filter
This filter is based on the Eq.(2):
Yi=1M*j=-M2M2Xi+jEq.(2)
Where “M” Is the number of points to be averaged, “j” Index of points being averaged and “i” Input array index.In this type of filters the output signal will also be delayed but not as much as the forward filter.
Example 2:
Taking X[90] and M=5
Y90=X88+X89+X90+X91+X[92]5

4. M.A.F Simulation in LabView
In Figure1.FrontPanel we have 3 Waveform Graph Indicators that will show us our input signal, forward output signal and symmetric output signal, we have a Knob that is a numeric control that will giveus the possibility to change the noise amplitude in our input signal, there is a menu ring which changes the source of the input signal and we also have a numeric control to change the value of M.

Figure 1.FrontPanel
In Figure2.BlockDiagramA we can observe that the input signal can be generated by a simulate signal device or a DAQ (Data Acquisition Device) in our case we will use asimulate signal device to generate the input signal, this signal can have a certain amount of noise generated by the noise amplitude knob, and can be seen by the input signal waveform graph.

Figure 2.BlockDiagramA
In Figure 3.BlockDiagramB we have the forward average filter process, in this case we are using two for loops, now if we remember Eq.(1) we can notice that the internal for looprepresents the “j” variable and that the external for loop represents the “i” variable. Our input signal, that is a dynamic data type signal, will be connected to a dynamic data type converter, that will convert our input signal in to an array of numeric values, and from here it will be connected to an array element called array size function which Returns the number of elements in each dimension ofarray. The array size element will be connected to the external for loop “i” to represent the set of data points from an input signal that are going to be analyzed. The internal for loop “j” is connected to a numeric control that represents the value of M (number of data points being averaged), but if we put attention we can notice that before this element is connected to the for loop “j” its value...
tracking img