Signal Analysis with MATLAB
The aim of this is to present some of the basic signal processing
tools within MATLAB.
The following examples use Keith Thorne's Channel class data access
method.
To get the codes running you need to have the Channel class installed into your MATLAB path and set up to access local files
and the 80 Mb tar file of frames.
To do this follow the instructions here.
Make sure you have the MATLAB function dir2framelist.m in your MATLAB path.
All the example files are contained in the following tar ball.
MATLAB Examples (psu_matlab_example.tar.gz 8.3kb)
You should execute these example files in the same directory that you unpacked the frame file tar ball.
This code loads 300 seconds of data and then calculates the
PSD before and after
downsampling from the full rate data at 16384Hz to 4096Hz.
A high pass filter is then applied to reduce the low frequencies and
the PSD plotted again.
Using the same source data as before this program selects a
frequency band and
displays the power spectra of that data before and after base-banding.
Thisis a useful technique if one is interested only in a particular
frequency range of the
full data.
This code uses the blimit.m
base-banding code. blimit.m uses the fir1 and resample methods
from the Signal Analysis Toolkit. The technique applies
low/high pass filtering and heterodyning
and the default filter used - an 11th order Hanning window - is
generally insufficiently aggressive
to base-band successfully.
The code example shows a filter (determined using remez) which was
calculated for S2 data.
It does a much better job, however since it was designed on S3 data
exhibits some aliasing at the
high end of the band due to increased relative low frequency noise.
Hw: Determine the correct filter parameters to remove the aliasing.
3) Heterodyning and Windowing - toylineamp.m
This function takes a channel, a GPS start time, a vector of
frequencies and determines the
signal amplitude and phase for user defined duration.
The code uses Hanning windows which are the length of the data
(i.e NSec long)
For example: [a,phi,t,fs]=toylineamp('H1:LSC-AS_Q',754562512,[41.25
151.3,973.3],15,40);
Will produce the calibration line amplitudes of H1
using 15 sec averages, producing 40 data points.
An example plot of the output is given in Line-H1-754562512-15.eps.
Produces a simple spectrogram of 300s of data using default settings.
Mike Ashley
Tiffany Summerscales
Last modified: Fri Aug 20 15:26:36 EDT 2004