Skip to content
sreeramathrijPublic

About

No description, website, or topics provided.

Resources

Stars

4 stars

Watchers

0 watching

Forks

Repository files navigation

DSPLab

This repository contains code for digital signal processing (DSP) lab experiments. It is designed to generate and visualize basic discrete-time signals commonly used in DSP. Currently, the repository includes Experiment 1: Basic Signals, with each signal implemented in a separate Python script under the experiment1/ directory. Each script generates one signal and plots its waveform.

🔧 Setup and Installation

To run the experiments, you need Python 3 with NumPy and Matplotlib. Follow these steps:

  1. Clone the repository:

    git clone https://github.com/sreeramathrij/DSPLab.git
    cd DSPLab
  2. Create a virtual environment (optional but recommended):

    python -m venv venv
  3. Activate the virtual environment:

    • On Linux/macOS:
      source venv/bin/activate
    • On Windows:
      venv\Scripts\activate
  4. Install required packages:

    pip install numpy matplotlib
  5. Run the experiment scripts:

    python experiment1/sine.py

Experiment 1: Elementary Signals

AIM:

To plot sine, cosine, ramp, exponential, impulse, rectangular, bipolar pulse and triangular signals in continuous and discrete forms.

File Description
sine.py Generates a sine wave
cosine.py Generates a cosine wave
triangular.py Generates a triangular waveform
rectangular.py Generates a rectangular pulse
bipolar.py Generates a bipolar waveform
impulse.py Generates a unit impulse
ramp.py Generates a ramp function
exponential.py Generates an exponential signal

📐 Signal Equations

sin

📷 Example Outputs

Each script generates and plots a waveform. Add the output images in the respective directory and name them as follows:

SINE

sin


COSINE

cos


EXPONENTIAL

exp


RAMP

ramp


RECTANGULAR

rect


IMPULSE

impulse


BIPOLAR

bipolar


TRIANGULAR

triangle


COMPOSITE

composite


TRUNCATED

truncated


SINC

sinc


Experiment 2: Basic Time Functions on Signals

AIM:

To plot shifting, scaling, reversing and their combination of elementary signals.

File Description
basicOperationsContinuos.py Generates all the time functions in continuous time
basicOperationsDiscrete.py Generates all the time functions in discrete time
impulseFromUnit.py Generates a dirac delta function from unit step function
inverseShiftedExponential.py Generates the $-(2^n) u(-n-1)$ signal
scaledRect.py Generates the $rect(8t)$ and $rect(t / 8)$ signals
scaledShiftedUnit.py Generates the $u(-3t + 5)$ signal

📐 Signal Equations

All Experiment 2 Equations

📷 Example Outputs

BASIC OPERATIONS (CONTINUOUS)

basicOperationsContinuous


BASIC OPERATIONS (DISCRETE)

basicOperationsDiscrete


IMPULSE FROM UNIT

Impulse From Unit


SCALED SHIFTED EXPONENTIAL

Scaled Shifted Exponential


SCALED RECT

Scaled Rect


SCALED AND SHIFTED UNIT

Scaled Shifted Unit


👤 Author

Developed by sreeramathrij

About

No description, website, or topics provided.

Resources

Stars

4 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages