This is an old revision of the document!
Milestone 2, Task 3: Signal Processing of Complete System
Overview
This task involves putting the various parts of the signal processing algorithm together. This task will help you see the entire signal processing algorithm at work, and will demonstrate that the filters you designed in Tasks 1 and 2 actually do what they were designed to do.
Essentially, this milestone combines Task 1 and Task 2 together.
General Requirements
Add a square wave at one of the player frequencies to the optical noise provided in Task 2. Remember that these signals should all be sampled at 100 ksamples/s.
Decimate the signal (a two-step process):
Filter the resulting 10 ksamples/s signal using the 10 IIR bandpass filters
Calculate and display the signal energy of each of the 10 resulting filtered signals
General Notes
For your convenience, the measured signal from the fluorescent lights can be found here: light.zip
The ten player frequencies (in Hz) are: 1471, 1724, 2000, 2273, 2632, 2941, 3333, 3571, 3846, 4167
Specifications
Low pass filter
FIR
length 81
Bandpass filters
IIR
length 11
Ten filters centered at player frequencies
Pass Off
Show the following plots for a shot by player 1.
Square wave for player 1
f=1471Hz
Amplitude of 0.1V (square wave with voltage of either 0 or 0.1V)
x-axis of 4 ms near the middle of the spectrum
y-axis of -1V to 1V
Sampling frequency of Fs=100kHz
Optical noise (from lights.mat)
Same axis as square wave
Sum of optical noise and square wave
Same axis as square wave
Decimated signal
Low pass filtered and then down-sampled to Fs=10kHz
Same axis as square wave
Signal filtered by bandpass filter centered at f=1471Hz
The power for the signal through all 10 bandpass filters
Signal length of 200ms
Resources
Here is the MATLAB code for creating the signal.
%Load in optical noise
load light
%we only want 200ms of data or 200e-3*100e3 = 20000 sample
t=linspace(0,.2,20000)';
y=y(1:20000);
%create the square wave signal
freq=1471;
y1=0.1*(0.5+0.5*square(2*pi*freq*t));
%Add square wave to the noise
y2=y+y1;
After creating the signal you will be using the MATLAB code that you developed as part of Task 1 and Task 2.