Skip to main content

Posts

Search

Search Search Any Topic from Any Website Search
Recent posts

Comparing Baseband and Passband Implementations of m-ary QAM

  Let's assume your original message signal is: 1, 0, 1, 1, 1, 0, 1, 1, 0, 1. If you want to modulate it using 4-QAM, then your baseband signal will be: 4-QAM Symbols (Real + jImag) Symbol 0: -1.00 + j-1.00 Symbol 1: 1.00 + j-1.00 Symbol 2: -1.00 + j-1.00 Symbol 3: 1.00 + j-1.00 Symbol 4: 1.00 + j1.00   Now, if you want to transmit them through a typical wireless medium, you need to modulate the baseband signal with a carrier frequency (in our case, 50 Hz). The resulting passband signal looks like this               In the above code, the symbol rate is 5 symbols per second.   Detailed explanation 4-QAM Constellation Points In typical normalized 4-QAM, each symbol is mapped to a complex number: Bits Symbol (I + jQ) 00 -1 - 1j 01 -1 + 1j 11 +1 + 1j 10 +1 - 1j Each point lies on a square centered at the origin with I and Q values either +1 or -1. ...

MATLAB Code for Zero-Forcing (ZF) Beamforming in 4×4 MIMO Systems

MATLAB Code for Zero-Forcing (ZF) Beamforming in 4×4 MIMO Systems clc; clear; close all; %% Parameters Nt = 4; % Transmit antennas Nr = 4; % Receive antennas (must be >= Nt for ZFBF) numBits = 1e4; % Number of bits per stream SNRdB = 0; % SNR in dB numRuns = 100; % Number of independent runs for averaging %% Precompute noise standard deviation noiseSigma = 10^(-SNRdB / 20); %% Accumulator for total errors totalErrors = 0; for run = 1:numRuns % Generate random bits: [4 x 10000] bits = randi([0 1], Nt, numBits); % BPSK modulation: 0 → +1, 1 → -1 txSymbols = 1 - 2 * bits; % Rayleigh channel matrix: [4 x 4] H = (randn(Nr, Nt) + 1j * randn(Nr, Nt)) / sqrt(2); %% === Zero Forcing Beamforming at Transmitter === W_zf = pinv(H); % Precoding matrix: [Nt x Nr] txPrecoded = W_zf * txSymbols; % Apply ZF precoding % Normalize transmit power (optional but useful) txPrecoded = txPrecoded / sqrt(mean(abs(txPrecoded(:)).^2)); %% Channel transmission with AWGN noise = noiseSigma * (randn(...

GANs for Beginners: Generate & Enhance Images

    Generative Adversarial Network (GAN) generates synthetic images based on dataset. Then perform image super-resolution using a separate CNN-based model   Generator (G) Step:  Generate fake image.  Fool discriminator (i.e., get output close to 1).  Update generator. Discriminator (D) Step: Real image → Discriminator → should output 1.  Fake image → Discriminator → should output 0.  Loss is binary cross entropy for both real and fake. Update discriminator using loss_real + loss_fake. Super-Resolution Network A simple CNN that: Upscales 28×28 → 56×56. Uses Conv2d, ReLU, Upsample, and final Tanh.   Summary GAN - Train generator to create realistic dataset images. Generator - Takes noise and produces fake images. Discriminator - Distinguishes between real and fake images. BCE Loss - Binary cross-entropy for discriminator and generator training. Super-Resolution - A separate CNN model that enhances image resolution. Normalization - Maps...

Spectral Estimation Methods - Periodogram, Correlogram, Welch, Bartlett ...

  Periodogram     Fast but high variance.     Take the raw time-domain signal x[n]x[n] of length NN.     Optionally apply a window (e.g., Hann, Hamming) to reduce spectral leakage.     Compute the DFT or FFT of the (optionally windowed) signal.     Estimate the power spectral density (PSD) from the squared magnitude of the FFT. Welch’s Method     Averaged periodogram with reduced variance.     Divide the signal into overlapping segments.     Apply a window function to each segment.     Compute the FFT and PSD of each windowed segment.     Average the PSDs across all segments. Correlogram     Estimate the autocorrelation function (ACF) of the full signal.     Apply a window if desired.     Compute the Fourier Transform of the autocorrelation to obtain the PSD. Blackman–Tukey Method     Estimate the autocorrelation function (ACF) of the signal fo...

Online Channel Impulse Response Simulator

  Fundamental Theory of Channel Impulse Response The fundamental theory behind the channel impulse response in wireless communication often involves complex exponential components such as: \( h(t) = \sum_{i=1}^{L} a_i \cdot \delta(t - \tau_i) \cdot e^{j\theta_i} \) Where: \( a_i \) is the amplitude of the \( i^{th} \) path \( \tau_i \) is the delay of the \( i^{th} \) path \( \theta_i \) is the phase shift (often due to Doppler effect, reflection, etc.) \( e^{j\theta_i} \) introduces a phase rotation (complex exponential) The convolution \( x(t) * h(t) \) gives the received signal So, instead of representing the channel with only real-valued amplitudes, each path can be more accurately modeled using a complex gain : \( h[n] = a_i \cdot e^{j\theta_i} \) Channel Impulse Response Simulator Input Signal (Unit Impulse x[n]) Multipath Delays (samples): Path Am...

PyTorch Tabular Data Classification (Personality Type Classification)

  In this article, we will explore how to classify categories from tabular data stored in a .csv file using a neural network built with PyTorch . Suppose you're given a dataset where each row corresponds to an instance, and it includes both numerical features and a target class label such as Class1 , Class2 , or Class3 . Your task is to train a model that can predict the correct class based on the input features. In our example, the target classes are Introvert , Extrovert , and Ambivert , and the dataset contains 29 other columns representing various input features. We aim to build a classification model using a feedforward neural network in PyTorch. This includes defining multiple layers, selecting an appropriate loss function (e.g., CrossEntropyLoss ), and optimizing the model using techniques like the Adam optimizer to improve accuracy. In the field of machine learning (ML) and deep learning (DL) , machines are particularly good at detecting patterns in data. While convo...

Image Classification using Machine Learning and PyTorch (Step-by-Step Guide)

In machine learning and deep learning (ML/DL) , machines are quite effective at recognizing patterns. They apply various convolutional operations to extract meaningful features for tasks such as object recognition . These systems can identify not only objects but also more abstract patterns—such as word sentiment or classifying inputs into multiple categories . Today, artificial intelligence (AI) has become so advanced that it can converse like a human , provided it has some contextual input or product details. AI can also summarize and translate languages in real time using different pretrained models . These models are trained on millions of data samples, making them highly accurate. For example, ResNet-18 is a pretrained model trained on millions of images, and it is considered highly effective for image classification tasks. In this tutorial, we will use the PyTorch library to classify images. PyTorch i...

Python DSA Cheat Sheet

🧮 Binary Search 🧮 Two, Three, or Four Pointer Sum 🧮 Sliding Window: Check if any contiguous subarray of length 2, 3, and 4 sums to target 🧮 Activity Selection Problem using the Greedy algorithm 🧮 More ... 📚 Further Reading   Binary Search  arr = [10, 3, 5, 7] target = 3 # Store original indices with values indexed_arr = list(enumerate(arr))  # [(0, 10), (1, 3), (2, 5), (3, 7)] # Sort by value indexed_arr.sort(key=lambda x: x[1])  # [(1, 3), (2, 5), (3, 7), (0, 10)] def binary_search_with_original_index(arr, target):     left = 0     right = len(arr) - 1     while left <= right:         mid = (left + right) // 2         if arr[mid][1] == target:             return arr[mid][0]  # Return original index         elif arr[mid][1] < target:             left = mid + 1 ...

People are good at skipping over material they already know!

View Related Topics to







Admin & Author: Salim

s

  Website: www.salimwireless.com
  Interests: Signal Processing, Telecommunication, 5G Technology, Present & Future Wireless Technologies, Digital Signal Processing, Computer Networks, Millimeter Wave Band Channel, Web Development
  Seeking an opportunity in the Teaching or Electronics & Telecommunication domains.
  Possess M.Tech in Electronic Communication Systems.


Contact Us

Name

Email *

Message *