DSP Project (draft)
Project 1: Real-Time Audio Noise Reduction (Fixed-Filter Based)
Theme/domain: Speech/audio enhancement using classical fixed digital filters.
Goals/Objectives:
Design and implement FIR and IIR filters (low-pass, band-pass, notch) to remove background noise (hiss, hum, ambient sounds) from live speech. Compare filter types in terms of noise reduction, phase distortion, and computational cost.
Signal acquisition:
Electret microphone module (e.g., MAX4466) with ADC on ESP32 or Arduino. Optional USB audio interface. Sample at 8–16 kHz.
Processing Tasks:
- Design FIR band-pass filter (300–3400 Hz) using window method (Hamming, Kaiser).
- Design IIR Butterworth/Chebyshev band-pass and notch (50/60 Hz) filters.
- Implement real‑time filtering on microcontroller (Direct Form I or transposed).
- Compare fixed‑point vs. floating‑point performance (if using ESP32).
- Optional: implement spectral subtraction (offline in Python/MATLAB).
Output Analysis:
- Compute SNR improvement (dB) using pre‑recorded noisy speech.
- Plot spectrograms before/after filtering.
- Measure group delay and CPU cycles per sample.
- Conduct subjective listening tests.
Deliverables:
- C/C++ code for microcontroller (real‑time filtering).
- Python/MATLAB scripts for filter design and offline evaluation.
- Report with frequency response plots, latency measurements, and listening test results.
Extensions:
- Multi‑band graphic equalizer.
- Adaptive LMS noise cancellation (as a second, separate mode).
- Deploy on Raspberry Pi with GUI.
Project 2: Adaptive Noise Cancellation & Acoustic Echo Cancellation
Theme/domain: Adaptive filtering for real‑time noise and echo suppression.
Goals/Objectives:
Implement an adaptive filter (LMS/NLMS) to cancel ambient noise using a reference microphone (feed‑forward ANC) or to remove acoustic echo in a hands‑free communication system.
Signal acquisition:
- ANC: Two microphones (primary + reference) + speaker; ESP32 or Teensy.
- Echo cancellation: One microphone + speaker (far‑end signal+echo).
Sample rate: 2–8 kHz.
Processing Tasks:
- Implement LMS or NLMS adaptive FIR filter (64–256 taps).
- For ANC: measure secondary path (speaker→error mic) and use Filtered‑X LMS (FxLMS).
- For echo cancellation: model echo path and adapt to suppress echo in near‑end signal.
- Compare adaptive performance with a fixed Wiener filter.
- Handle double‑talk detection (optional).
Output Analysis:
- Compute Echo Return Loss Enhancement (ERLE) or noise reduction (dB).
- Plot learning curves (error vs. time).
- Measure convergence rate and steady‑state misalignment.
- Test with different noise types (fan, speech, broadband).
Deliverables:
- Real‑time C/C++ implementation on ESP32/Teensy.
- Python script for offline secondary path identification and analysis.
- Report discussing step‑size selection, filter length trade‑offs, and stability.
Extensions:
- Add double‑talk detection logic.
- Implement variable step‑size LMS.
- Use a third microphone for multi‑channel ANC.
Project 3: ECG Signal Processing and Heart Rate Monitoring
Theme/domain: Biomedical DSP – cleaning ECG and extracting heart rate.
Goals/Objectives:
Acquire raw ECG, remove baseline wander, power‑line interference, and muscle noise using cascaded digital filters. Implement QRS detection to compute beats per minute (BPM) in real time.
Signal acquisition:
AD8232 ECG sensor module with Arduino or ESP32. Sample at 250–500 Hz. Stream data to PC for analysis or display on OLED.
Processing Tasks:
- Design IIR high‑pass (Butterworth, fc = 0.5 Hz) to remove baseline drift.
- Design IIR notch (center = 50/60 Hz, bandwidth 2–5 Hz) for power‑line hum.
- Design FIR low‑pass (Kaiser window, fc = 40 Hz, order 64–128) for muscle noise.
- Implement Pan‑Tompkins QRS detection (or simplified threshold+refractory).
- Compare FIR vs. IIR implementations in terms of phase distortion and real‑time latency.
Output Analysis:
- Plot raw vs. filtered ECG time series and power spectral density (PSD).
- Validate heart rate against a commercial pulse oximeter or manual count.
- Measure detection accuracy (true positives, false positives).
- Quantify filter delay and its effect on R‑R interval timing.
Deliverables:
- Microcontroller code for real‑time filtering and BPM display.
- Python/MATLAB scripts for offline filter design and performance evaluation.
- Report with PSD plots, accuracy metrics, and discussion of filter trade‑offs.
Extensions:
- Add motion artifact reduction using an accelerometer as reference (adaptive filtering).
- Detect arrhythmias (e.g., missed beats, tachycardia).
- Transmit BPM via Bluetooth to a smartphone app.
Project 4: Vibration Analysis for Machine Fault Detection
Theme/domain: Industrial IoT / condition monitoring using vibration signals.
Goals/Objectives:
Acquire vibration data from a motor or fan, remove noise, extract fault signatures (imbalance, bearing wear) using FFT and envelope analysis, and classify machine health.
Signal acquisition:
Accelerometer (MPU6050, ADXL335, or ADXL345) mounted on a small DC motor/fan. Sample at 1–3.2 kHz. Introduce faults by adding imbalance (tape on blade) or simulating bearing looseness.
Processing Tasks:
- Design FIR high‑pass (fc = 10 Hz) to remove DC offset.
- Design band‑pass FIR/IIR filters to isolate rotational frequency and bearing defect frequencies.
- Implement envelope detection (rectify + low‑pass filter, or Hilbert transform).
- Compute FFT of filtered and envelope signals.
- Extract features: RMS, kurtosis, peak amplitude at fault frequencies.
Output Analysis:
- Compare FFT spectra for healthy vs. faulty conditions.
- Compute vibration RMS and set threshold for alarm.
- Generate waterfall plots showing fault harmonics over time.
- Evaluate detection accuracy (ROC curve) using multiple trials.
Deliverables:
- Arduino/ESP32 code for real‑time vibration logging and LED/buzzer alert.
- Python/MATLAB script for offline FFT, envelope analysis, and dashboard.
- Report with spectral plots, threshold justification, and classification results.
Extensions:
- Use Goertzel algorithm for specific fault frequencies (reduces FFT computation).
- Train a simple classifier (SVM, k‑NN) on extracted features.
- Send alerts via WiFi (MQTT) to a monitoring station.
Project 5: Digital Image Smoothing and Edge Enhancement
Theme/domain: 2D signal processing – image filtering.
Goals/Objectives:
Implement 2D FIR filters (smoothing, blurring, edge detection) on live camera input. Compare separable vs. non‑separable convolution and quantify noise reduction vs. edge preservation.
Signal acquisition:
USB webcam or ESP32‑CAM capturing greyscale images (e.g., 320×240 resolution).
Processing Tasks:
- Implement 2D convolution (C/Python) with kernels: averaging, Gaussian blur, Sobel, Laplacian.
- Design separable FIR filters to reduce computational complexity.
- Compare different window types for Gaussian kernel design.
- Optionally implement median filter (non‑linear) for salt‑and‑pepper noise.
Output Analysis:
- Visual comparison of filtered images (display on screen or serial plot).
- Compute quantitative metrics: PSNR, SSIM, edge sharpness (gradient magnitude).
- Measure execution time for separable vs. non‑separable convolution.
Deliverables:
- Python script (OpenCV + NumPy) or C++ (OpenCV) for real‑time webcam filtering.
- Report showing kernels, frequency response (via 2D FFT of kernel), and metric comparisons.
- Demo video of different filter effects.
Extensions:
- Implement unsharp masking for edge enhancement.
- Apply filtering to video stream with performance optimization (multithreading).
- Design a custom kernel for a specific effect (emboss, sharpen).
Project 6: Speech Command Recognition and Environmental Sound Classification
Theme/domain: DSP pipeline for preprocessing followed by simple classification.
Goals/Objectives:
Acquire audio, apply pre‑emphasis and band‑pass filtering, extract features (MFCCs, spectral energy), and train a lightweight classifier to recognize spoken keywords or environmental sounds (e.g., glass break, doorbell).
Signal acquisition:
MEMS microphone (e.g., INMP441 with I2S) on ESP32, or a laptop microphone. Sample at 16 kHz. Record commands ("start", "stop", "left", "right") or use public dataset (ESC‑50) for environmental sounds.
Processing Tasks:
- Pre‑emphasis filter (FIR: H(z)=1−αz⁻¹).
- Band‑pass FIR (300–3400 Hz for speech; wider for general sounds).
- Framing, windowing (Hamming), and FFT.
- Extract MFCCs (Python librosa or custom DCT after mel‑filterbank).
- Train a simple classifier: k‑NN, DTW, or SVM in Python.
- Optional: implement classifier on ESP32 using TensorFlow Lite Micro.
Output Analysis:
- Compare recognition accuracy with and without the filtering pipeline (confusion matrix).
- Measure accuracy vs. SNR for noisy test data.
- Plot feature distributions (PCA or t‑SNE).
- Compute real‑time latency per audio frame.
Deliverables:
- Python/MATLAB scripts for offline training and evaluation.
- Microcontroller code for real‑time feature extraction and classification (if feasible).
- Report with spectrograms, accuracy tables, and discussion of filtering impact.
Extensions:
- Deploy a neural network (simple MLP) for keyword spotting.
- Add voice activity detection (VAD) to reduce false triggers.
- Stream features to cloud for more powerful classification.
Project 7: Digital Audio Equalizer
Theme/domain: Audio DSP – graphic/parametric equalizer with user controls.
Goals/Objectives:
Design a 3–10 band equalizer (bass, mid, treble) using IIR biquad filters or FIR filters. Adjust gains in real‑time using potentiometers or a GUI, and measure the resulting frequency response.
Signal acquisition:
I2S microphone (e.g., INMP441) and I2S speaker (MAX98357A) connected to ESP32 or Teensy. Alternatively, line‑in/line‑out on a PC with Python real‑time processing.
Processing Tasks:
- Design peaking/shelving IIR biquad filters for each band (center frequencies per ISO).
- Or design FIR filters using windowed sinc (graphic EQ).
- Implement cascade of biquads (Direct Form I or Transposed) in C/Python.
- Read potentiometers (ADC) to update gain coefficients smoothly (avoid zipper noise).
- Generate measurement tone (sine sweep) to verify equalizer response.
Output Analysis:
- Plot measured magnitude response (using sweep + FFT) against theoretical design.
- Compare IIR vs. FIR: phase linearity, computational load, memory usage.
- Conduct A/B listening test with music.
- Measure total harmonic distortion (THD) at different gain settings.
Deliverables:
- Fully functional equalizer code (microcontroller or Python).
- Python script for sweep measurement and frequency response plotting.
- Report with filter coefficient tables, Bode plots, and subjective evaluation.
Extensions:
- Add real‑time spectrum analyzer (LED matrix) using FFT.
- Implement room response correction: measure impulse response and compute inverse filter.
- Build a web‑based control dashboard (ESP32 + WebSockets).
Project 8: DTMF (Dual‑Tone Multi‑Frequency) Tone Decoder
Theme/domain: Telecommunications – detecting telephone keypad tones.
Goals/Objectives:
Build a system that listens to DTMF tones (generated by a phone app or signal generator), decodes the pressed key (0‑9, *, #), and displays it. Test robustness under noise using a filter bank or Goertzel algorithm.
Signal acquisition:
Electret microphone module or direct audio line‑in to ESP32/Arduino ADC. Sample at 8 kHz.
Processing Tasks:
- Design 8 narrow band‑pass IIR filters (one per DTMF frequency: 697, 770, 852, 941, 1209, 1336, 1477, 1633 Hz).
- Alternative: implement Goertzel algorithm for each frequency (more efficient).
- Implement energy detection and timing validation (require simultaneous low‑group and high‑group tone for ≥40 ms).
- Compare computational cost of filter bank vs. Goertzel vs. full FFT.
Output Analysis:
- Measure decoding accuracy vs. signal‑to‑noise ratio (SNR) by adding white/background noise.
- Generate confusion matrix over hundreds of tones.
- Plot magnitude response of each band‑pass filter.
- Measure real‑time decoding latency (from tone start to display).
Deliverables:
- C/C++ code for microcontroller with LCD or serial output.
- Python/MATLAB simulation validating filter/Goertzel design on recorded tones.
- Report with accuracy curves, filter specs, and complexity analysis.
Extensions:
- Generate DTMF tones (DAC) and implement full loopback test.
- Add error correction (e.g., majority vote over multiple frames).
- Deploy on a mobile phone using microphone input.
Project 9: Digital Communication Channel Equalizer
Theme/domain: Communications DSP – mitigating intersymbol interference (ISI).
Goals/Objectives:
Design an FIR equalizer to compensate for channel distortion (multipath, bandwidth limitation). Compare fixed zero‑forcing equalizer with adaptive LMS equalizer in terms of bit error rate (BER) and eye diagram opening.
Signal acquisition:
Generate a modulated signal (e.g., BPSK) via DAC or simulated in Python. Add channel impulse response (multipath) and AWGN noise. No hardware acquisition required; use offline or real‑time Python simulation.
Processing Tasks:
- Design a fixed FIR equalizer using zero‑forcing or MMSE criterion (solve Wiener‑Hopf).
- Implement an adaptive LMS equalizer (training mode with known preamble).
- Simulate channel: e.g., H(z)=1+0.5z⁻¹+0.3z⁻².
- Compute equalized signal and recover symbols.
- Optional: implement on microcontroller with real‑time generated signal.
Output Analysis:
- Plot eye diagrams before and after equalization.
- Compute BER as a function of SNR.
- Show convergence of LMS weights.
- Compare equalizer length vs. performance.
Deliverables:
- Python/MATLAB script for channel simulation, equalizer design, and BER analysis.
- C code for real‑time LMS equalizer (if using hardware).
- Report with eye diagrams, BER curves, and discussion of equalizer trade‑offs.
Extensions:
- Use decision‑directed mode after training (blind equalization).
- Implement DFE (decision feedback equalizer).
- Test with QPSK or 16‑QAM modulation.
Project 10: Gesture Recognition Using IMU and Sensor Fusion
Theme/domain: Motion processing – filtering and fusion for orientation estimation.
Goals/Objectives:
Acquire accelerometer and gyroscope data from an IMU, remove high‑frequency noise, fuse sensors to obtain stable orientation, and detect simple gestures (swipe, shake, tap) using filtered signals.
Signal acquisition:
MPU6050 (or MPU9250) connected to Arduino/ESP32 via I2C. Sample at 100–200 Hz.
Processing Tasks:
- Design low‑pass FIR (e.g., order 20, cutoff 10 Hz) to reduce mechanical vibration and gyro noise.
- Implement a complementary filter or a simplified Kalman filter (recursive IIR structure) to fuse accelerometer (long‑term) and gyroscope (short‑term).
- Compare phase lag of different filters.
- Implement gesture detection: threshold‑based FIR integrator of angular velocity or peak detection in linear acceleration.
Output Analysis:
- Plot raw vs. filtered orientation (roll/pitch) in real time (serial plotter or Python).
- Compute mean squared error against a reference (if available).
- Measure gesture detection accuracy (confusion matrix for 3–5 gestures).
- Quantify filter delay and jitter reduction.
Deliverables:
- Microcontroller code with real‑time orientation filtering and gesture detection (LED/serial output).
- Python/MATLAB script for offline filter design and data visualization.
- Report comparing complementary vs. Kalman filter performance.
Extensions:
- Use Madgwick or Mahony filter for quaternion estimation.
- Send orientation data over Bluetooth to a 3D visualizer (Unity/Processing).
- Recognize more complex gestures (circle, figure‑eight) using machine learning.
Project 11: Ultrasonic Distance Sensor with Digital Signal Enhancement
Theme/domain: Embedded sensing – DSP to improve time‑of‑flight measurements.
Goals/Objectives:
Improve accuracy and robustness of an ultrasonic distance sensor (HC‑SR04) using matched filtering, median filtering, and temperature compensation.
Signal acquisition:
HC‑SR04 or separate ultrasonic transducer pair with Arduino/ESP32. For advanced version, capture raw analog echo signal using an op‑amp and ADC. Measure distances from 10 cm to 3 m.
Processing Tasks:
- Model the transmitted pulse (burst shape, center frequency ~40 kHz).
- Implement matched filter (FIR cross‑correlation with transmitted pulse template) to improve SNR and time‑of‑flight resolution.
- Apply median filter (non‑linear) to outlier distance estimates (rejects multipath/spikes).
- Compensate for sound speed using temperature sensor (DHT22).
- Optional: implement low‑pass IIR filter on envelope of received echo.
Output Analysis:
- Compare raw vs. processed distance measurements against a ruler (mean error, standard deviation, max error).
- Test robustness: soft surfaces, angled targets, multiple obstacles.
- Plot time‑series of distance with and without median filtering.
- Compute SNR improvement from matched filter.
Deliverables:
- Arduino/ESP32 code for real‑time distance measurement with filtering.
- Python script for offline matched filter design and performance analysis.
- Report with accuracy plots and discussion of improvement.
Extensions:
- Implement pulse compression using chirp instead of simple burst.
- Build a 2‑D scanning system (servo + ultrasonic) for simple mapping.
- Detect multiple objects using deconvolution.
Project 12: Digital Stethoscope for Heart/Lung Sound Separation
Theme/domain: Biomedical acoustics – separating overlapping physiological sounds.
Goals/Objectives:
Acquire chest sounds using a stethoscope‑mounted microphone, then design filters to separate low‑frequency heart sounds (S1, S2) from higher‑frequency lung sounds (wheezes, crackles). Compute heart rate from the filtered heart channel.
Signal acquisition:
Electret microphone inside a stethoscope bell or a commercial stethoscope adapter. Interface with ESP32 (ADC) or USB audio interface. Sample at 2–4 kHz.
Processing Tasks:
- Design IIR low‑pass Butterworth (fc = 150 Hz) to extract heart sounds.
- Design FIR band‑pass (200–800 Hz) to extract lung sounds (equiripple or window method).
- Implement both filters in cascade/parallel on microcontroller.
- Compute heart rate via autocorrelation or peak detection on the low‑pass output.
- Optional: use adaptive filtering to reduce heart sound contamination in lung channel.
Output Analysis:
- Plot time and frequency domain (PSD) of raw, heart‑filtered, and lung‑filtered signals.
- Compare phase distortion (IIR vs. FIR) and its effect on clinical interpretation.
- Validate heart rate against a pulse oximeter.
- Record lung sound segments with and without wheezes – demonstrate filtering preserves abnormalities.
Deliverables:
- C/C++ firmware for real‑time stethoscope processing (headphone output or serial streaming).
- Python/MATLAB scripts for filter design and offline analysis.
- Report with spectrograms, filter responses, and heart rate accuracy.
Extensions:
- Add a wireless Bluetooth link to a PC for recording and visualization.
- Implement simple classification (normal vs. wheeze/crackle) using features extracted from lung‑filtered output.
- Use a dual‑microphone setup for ambient noise cancellation.