Signal Processing of Complete System

Table of contents

  1. Overview
  2. General Requirements
  3. General Notes
  4. Specifications
  5. Resources
  6. What is Needed in the Lab Report
  7. Pass Off

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 1. Remember that these signals should all be sampled at 80 ksamples/s.
  • Decimate the signal (a two-step process):
    • Filter the 80 ksamples/s signal using your lowpass FIR filter
    • Downsample the signal to 10 ksamples/s
  • 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_80kHz.mat

The ten player frequencies (in Hz) are: 1250, 1481, 1739, 2000, 2353, 2667, 3077, 3333, 3636, 4000

Specifications

  1. For the anti-aliasing filter, use your lowpass filter designed in Task 1
    1. Filter is Finite Impulse Response (FIR)
    2. Filter is described by 81 ‘b’ coefficients
    3. Of the ‘a’ coefficients of an FIR filter, only a_0 is non-zero, and has a value of 1
    4. For this task, you should just read in your ‘b’ coefficients from the file you saved them in when you designed the filter in Task 1
  2. Use your bank of bandpass filters designed in Task 2
    1. Filters are Infinite Impulse Response (IIR)
    2. Each filter is described by several cascaded second-order sections (SOS).
    3. The center-of-passband frequencies for the filters are the ten player frequencies
    4. For this task, you should read in your SOS coefficients from the file(s) you saved them in when you designed the filter in Task 2

Resources

Here is the MATLAB code for creating the simulated receiver signal:

% Clear command window & workspace, and close all figures
clc, clear, close all;

f_players = [1250, 1481, 1739, 2000, 2353, 2667, 3077, 3333, 3636, 4000];
f_s = 80000; % our sampling frequency in Hz

%%%%%%%%%%%%%%%%%%%% Setup Receiver Signal %%%%%%%%%%%%%%%%%%%%
% 40,000 samples, 80 kHz sample frequency, 12.5 us sample period
% y: optical noise data, t: time stamp in seconds, both in columns
load light_80kHz

T_SHOT = 0.2; % shot time in seconds
L = f_s*T_SHOT; % keep first 200ms of optical noise
y = y(1:L);
t = t(1:L)-t(1); % start time at 0

f_no = 1; % player frequency number (channel)
ys = 0.1*(0.5+0.5*square(2*pi*f_players(f_no)*t)); % square wave
ya = y + ys; % add square wave to noise

After creating the signal, use the filters that you developed as part of Task 1 and Task 2 to simulate the entire signal processing system that can detect this weak player signal embedded in significant optical noise.

A simple way to calculate the signal energy for each player frequency is to use the MATLAB dot function on each of the IIR filter outputs.

% yd is a vector of samples representing a 200 ms window in time.
energy = dot(yd, yd);

What is Needed in the Lab Report

Please include the following in the Lab Report for Milestone 2, Task 3:

  1. Clearly labeled versions of the graphs required for pass off, with a brief description for each graph of exactly what we are looking at, and how we can tell from the graph that things are working correctly. (For example, on the frequency-domain plot of noise + the player 1 square wave signal, note where the fundamental player 1 frequency peak from the square wave appears in the plot, and note the major noise peaks that we see in the spectrum.)
  2. Brief summary (1 paragraph) of what was accomplished

Pass Off

Show the following plots for a shot by player 1:

  1. Time-domain plot of square wave for player 1
    1. f = 1250Hz
    2. Peak-to-peak amplitude of 0.1V (square wave with voltage of either 0 or 0.1V)
    3. Zoom in on a section of the x-axis 4ms wide when you are showing this for pass off
    4. y-axis of -1V to 1.5V
    5. Sampling frequency of Fs = 80kHz
  2. Time-domain plot of optical noise (from lights.mat)
    1. Same axis as square wave
    2. Can be overlaid with previous plot in different color
  3. Time-domain plot showing sum of optical noise and square wave
    1. Same axis as square wave
  4. Frequency-domain plot of sum of optical noise and square wave on an axis going from 0 to 40 kHz
  5. Frequency-domain plot of decimated signal (filtered and downsampled) on an axis going from 0 to 5 kHz
  6. Frequency-domain signal filtered by bandpass filter centered at f = 1250Hz (player 1 frequency)
  7. Frequency-domain signal filtered by bandpass filter centered at another player frequency
  8. The signal energy for the player 1 signal through all 10 bandpass filters shown as a bar chart
    1. Signal length of 200ms