Model number
0352

  

Simple low pass, high pass, and bandpass filters are illustrated by four examples.

Description

This program convolves low pass and high pass filters with a time series
of Gaussian white noise. The ends of the series are "wrapped." 

An example will clarify this.
Let A3 be the filter (1/3, 1/3, 1/3). We will convolve it with series
Y=(y0, y1,y2,y3,y4,y5):
A3(t) convolved with Y(t)=H(t) =[ (y5+y0+y1)/3, (y0+y1+y2)/3, ... (y4+y5+y0)/3 ]. 
Note how y5 and y0 are wrapped. It is as if the series was
[y5, y0, y1, y2, y3, y4, y5, y0].

A high pass filter can be generated by differencing adjacent points.

By combining low and high pass filters, bandpass filters can be constructed.
Filtering operations can introduce phase shifts in the estimated Fourier
coefficients.

A Fourier transform of a time series is a least squares fit of the
time series with a set of sine and cosine functions. Since the chosen
frequencies used in the transform are orthogonal functions, their coefficients
can be found indpendently.

The periodogram at a give frequency is constructed by adding the squares
of the Fourier coefficients, i.e.,

P(f)=A(f)*A(f)+B(f)*B(f).

This is called a Power Spectrum and is usually plotted log(P) vs. log(f).
It is important to note that the Power Spectrum is not the spectrum of
the time series. It is a biased estimate of the spectrum.
The Fourier transform can be used to compute the periodogram of the 
original series, P1, and the filtered series, P2. The ratio P2/P1
is the periodogram of the Filter.

In Example 1, a series of 365 Gaussian random numbers has been
generated and low passed with a 7 point low pass filter. It should be noted
that although the periodograms of the time series before and after
filtering are noisy, the frequency response of the filter is smooth.

In Example 2, the same series is low passed twice with the 7 point
filter. Note that the Frequency response of the Filter appears to be
the same, but notice the scaling of the amplitude--it doubles.

In Example 3, the same series is high passed with a two point difference
filter.

In Example 4, the same series is band passed.

These are simple examples and more complex kinds of filters have been
designed.

럏1

The four panels illustrate a low-pass filter.
Upper Left: The first 60 points of a 365 point series are plotted (black). A seven point running average is applied, and the result is plotted in red.
Upper Right: The periodogram of the original series is plotted log-log.
Lower Left: The periodogram of the series after filtering is plotted log-log.
Lower Right: The ratio of the two periodograms is plotted log-log showing the frequency response of the seven point running average filter.

Equations

See Description above.

The equations for this model may be viewed by running the JSim model applet and clicking on the Source tab at the bottom left of JSim's Run Time graphical user interface. The equations are written in JSim's Mathematical Modeling Language (MML). See the Introduction to MML and the MML Reference Manual. Additional documentation for MML can be found by using the search option at the Physiome home page.

Download JSim model project file

Help running a JSim model.

References
en.wikipedia.org/wiki/Filter_design

en.wikipedia.org/wiki/Window_function

en.wikipedia.org/wiki/Fourier_transform
Key terms
time series
filter
filtering
low pass
high pass
bandpass
band pass
Fourier
Acknowledgements

Please cite https://www.imagwiki.nibib.nih.gov/physiome in any publication for which this software is used and send one reprint to the address given below:
The National Simulation Resource, Director J. B. Bassingthwaighte, Department of Bioengineering, University of Washington, Seattle WA 98195-5061.

Model development and archiving support at https://www.imagwiki.nibib.nih.gov/physiome provided by the following grants: NIH U01HL122199 Analyzing the Cardiac Power Grid, 09/15/2015 - 05/31/2020, NIH/NIBIB BE08407 Software Integration, JSim and SBW 6/1/09-5/31/13; NIH/NHLBI T15 HL88516-01 Modeling for Heart, Lung and Blood: From Cell to Organ, 4/1/07-3/31/11; NSF BES-0506477 Adaptive Multi-Scale Model Simulation, 8/15/05-7/31/08; NIH/NHLBI R01 HL073598 Core 3: 3D Imaging and Computer Modeling of the Respiratory Tract, 9/1/04-8/31/09; as well as prior support from NIH/NCRR P41 RR01243 Simulation Resource in Circulatory Mass Transport and Exchange, 12/1/1980-11/30/01 and NIH/NIBIB R01 EB001973 JSim: A Simulation Analysis Platform, 3/1/02-2/28/07.