This project implements a Dual-Tone Multi-Frequency (DTMF) Decoder using integer-based digital signal processing (DSP) techniques. DTMF is the standard used in telecommunication systems to encode keypresses as pairs of audio frequencies. The decoder processes input audio signals to determine the corresponding keypad symbols while adhering to the DTMF standard.
The project was designed as part of a coursework assignment at Cal Poly to explore digital filter design.
- Decodes DTMF signals into corresponding keypad symbols.
- Implements integer-based filters for computational efficiency.
- Supports narrow bandpass filters for high selectivity.
- Adheres to the DTMF standard frequencies:
- Low frequencies: 697 Hz, 770 Hz, 852 Hz, 941 Hz
- High frequencies: 1209 Hz, 1336 Hz, 1477 Hz, 1633 Hz
- Measures and minimizes ISI to improve detection accuracy during symbol transitions.
The system includes the following components:
- Signal Detection: Isolates and detects the presence of specific DTMF frequencies using bandpass filters.
- Rectification and Low-Pass Filtering: Processes the filtered signal to compute the DC value.
- Threshold Comparison: Determines if the tone is present by comparing the filtered signal against a predefined threshold.
- Symbol Decoding: Combines detected frequencies to identify the corresponding keypad symbol.
- Achieved ISI: ~7.8% for slow signals (50 ms between symbols), ~18% for fast signals (20 ms between symbols).
- Integer-based filter coefficients for optimized computation:
- Example:
b0 = 17,a1 = -108,a2 = 108(scaled byC = 128).
- Example:
- Programming Language: Python
- Digital Filters: Implemented using integer coefficients to enhance efficiency on DSP systems.
- Development Tools:
- MATLAB for filter design and analysis.
- Python for simulation and implementation.
- Sampling Rate: 4000 Hz
- Filter Design:
- Bandpass filters are designed using pole-zero placement.
- Integer coefficients are computed by scaling and rounding fractional values.
- Successfully decoded DTMF signals while maintaining low ISI.
- Optimized filter designs for integer-based computation with reduced round-off errors.
- Demonstrated efficient detection of symbols even under faster communication rates.
-
Clone the repository:
git clone https://github.com/luketrusheim/dtmfdecoder cd dtmf-decoder -
Change fpath_sig_in to the appropriate text file:
fpath_sig_in = 'dtmf_signals_slow.txt'or:
fpath_sig_in = 'dtmf_signals_fast.txt' -
Run the decoder:
python dtmf.py
-
View results:
- The output includes detected symbols and performance metrics such as ISI.
Future enhancements could include:
- Dynamic ISI Reduction: Implement adaptive thresholds for symbol transitions.
- Higher-Order Filters: Improve frequency selectivity and reduce ISI.
- Support for Real-Time Decoding: Extend the system to process live audio signals.
This project was developed as part of the CPE 367 - Digital Signals & Systems course under the guidance of Professor Wayne Pilkington. The files sig_analyzer.py and wav.py are courtesy of Dr. F. DePiero and were included as a part of this project.


