Python source codes | DSP codes in Python

This section of source codes covers DSP codes in Python language. It covers python codes for correlation, convolution, FFT, DFT, string number conversion codes etc.

Python Programming Tutorial

Python programming tutorial.

Correlation python script

➨Refer Correlation python script which covers auto correlation and cross correlation with example input vectors and their respective inputs and outputs.

Convolution python script

➨Refer Convolution python script which covers convolution of real as well as complex numbers using NumPy module and Brute-force method.

Decimal to Hex conversion python code

➨Refer Decimal to Hex which covers conversion of hexadecimal to decimal and vice versa.

Number to string conversion python code

➨Refer Number to string which covers conversion of string to number and vice versa.

BPSK, QPSK, 16QAM, 64QAM python code snippets

➨Refer data mapping python code which covers BPSK, QPSK, 16QAM and 64QAM modulation code for random binary stream of data.

16 Point FFT (Decimation in Frequency)

➨Refer 16 point FFT which mentions python snippet using decimation in frequency and compares the output with built-in scipy FFT output.

OFDM Transmitter Simulation (256 point FFT)

➨Refer OFDM simulation >> which covers python code of OFDM transmitter simulation consisting of binary payload generation, QPSK data mapping (i.e. modulation), OFDM symbol formation, 256 point IFFT and CP (Cyclic Prefix) insertion.

AWGN python code

➨Refer AWGN python script >> which covers addition of AWGN to the signal vector as per desired user SNR (dB).

Rayleigh channel python code

➨Refer Rayleigh python script >> which covers rayleigh channel simulation code.

Rician channel python code

➨Refer Rician python script >> which covers rician channel simulation code.

ASK python code

➨Refer ASK python script >> which covers ASK (Amplitude Shift Keying) modulation simulation code.

FSK python code

➨Refer FSK python script >> which covers FSK (Frequency Shift Keying) modulation simulation code.

PSK python code

➨Refer PSK python script >> which covers PSK (Phase Shift Keying) modulation simulation code.

FIR filter python code

➨Refer FIR python script >> which covers FIR filter simulation for LPF type.

IIR filter python code

➨Refer IIR python script >> which covers IIR filter simulation for LPF, HPF, BPF and BSF types.

OFDMA Simulation python code

➨Refer OFDMA python script >> which simulates generalized OFDMA for two users.

QPSK mapping and demapping python code

➨Refer QPSK python script >> which simulates QPSK modulation and QPSK demodulation functions viz. mapping and demapping respectively.

File based floating point to fixed point conversion

➨Refer Floating point to fixed point conversion python script >>

Spectral analysis using python

➨Refer Spectral analysis python script >> which simulates time domain and frequency domain plots such as Amplitude versus time, Power vs time and Power vs frequency.

Differential encoder decoder python code

➨Refer Differential encoder decoder python script >> which simulates binary differential encoder decoder based on modulo-2 sum and delay functionalities.

AM Modulation Demodulation python code

➨Refer Amplitude Modulation-Demodulation python script >> which simulates analog amplitude modulator and demodulator functionalities.

FM Modulation Demodulation python code

➨Refer Frequency Modulation-Demodulation python script >> which simulates analog frequency modulator and demodulator functionalities.

PM Modulation Demodulation python code

➨Refer Phase Modulation-Demodulation python script >> which simulates analog phase modulator and demodulator functionalities.



Useful Links to MATLAB codes

RF and Wireless tutorials