Welcome to the Signal Processing Toolbox repository!
This toolbox provides a comprehensive set of functionalities for signal processing, covering both time domain and frequency domain tools.
The toolbox is designed to be user-friendly and customizable for various signal processing tasks.
This is implementation of digital signal processing tasks for 4th year CS students in the Faculty of Computer Science at Ain Shams University.
The course aims to provide students with a comprehensive understanding of digital signal processing and its applications in various fields.
To get started with the Signal Processing Toolbox, follow these steps:
Make sure you have the following prerequisites installed on your system:
- Python (version 3.x)
- Dependencies: numpy, matplotlib (install using
pip install numpy matplotlib
)
Clone the repository to your local machine:
git clone https://github.com/Andrew-A-A/DSP_tasks
Navigate to the project directory and run the main script:
python main.py
This will launch the Signal Processing Toolbox application, and you will be presented with a menu to choose from different signal processing tasks.
- Read samples of a signal from a txt file and display it in both continuous and discrete representations.
- Generate sinusoidal or cosinusoidal signals with user-specified parameters:
- Type (sine or cosine)
- Amplitude (A)
- Phase shift (theta)
- Analog frequency
- Sampling frequency
- Add, subtract, and multiply input signals and display the resulting signal.
- Square a signal and display the resulting signal.
- Shift a signal by a positive or negative constant.
- Normalize the signal within a user-specified range (-1 to 1 or 0 to 1).
- Accumulate input signals.
- Quantize an input signal based on user-specified levels or number of bits.
- Display the quantized signal, quantization error, and encoded signal.
- Apply Fourier transform to any input signal.
- Display frequency versus amplitude and frequency versus phase relations.
- Prompt the user to enter the sampling frequency in HZ.
- Allow modification of the amplitude and phase of the signal components.
- Allow signal reconstruction using Inverse Discrete Fourier Transform (IDFT).
- Save frequency components in a txt file in polar form (amplitude and phase).
- Read a txt file containing frequency components in polar form and reconstruct the signal using IDFT.
- Compute DCT for a given input signal and display the result.
- Allow the user to choose the first m coefficients to be saved in a txt file.
- Remove the DC component in the time domain.
- Compute moving average (y(n)) for signal (x(n)), letting the user enter the number of points included in averaging.
- Compute and display (y(n)) representing:
- First Derivative of the input signal: (Y(n) = x(n) - x(n-1))
- Second Derivative of the input signal: (Y(n) = x(n+1) - 2x(n) + x(n-1))
- Delay or advance a signal by (k) steps.
- Fold a signal.
- Delay or advance a folded signal.
- Remove the DC component in the frequency domain.
- Perform fast convolution on two signals.
- Perform fast correlation on two signals.
- Compute and display cross-correlation between two signals.
- Convolve two signals using the direct method.