Skip to main content

Posts

Home Wireless Communication Modulation MATLAB Beamforming Project Ideas MIMO Computer Networks Lab 🚀

Search for Wireless Communication

Search Search Any Topic from Any Website Search
Recent posts

Welch Method for Spectral Estimation in MATLAB

MATLAB Code % The code is developed by SalimWireless.com clc; clear; close all; % Input Signal and Parameters Fs = 1000; % Sampling frequency t = 0:1/Fs:0.3; % Time vector x = cos(2*pi*200*t) + randn(size(t)); % Signal: 200 Hz cosine + noise % Welch's Method Parameters segmentLength = 256; % Length of each segment overlapFraction = 0.5; % Fractional overlap (50%) overlapSamples = floor(segmentLength * overlapFraction); % Overlap in samples step = segmentLength - overlapSamples; % Step size N = length(x); % Length of the input signal % Define Hann Window hannWindow = 0.5 * (1 - cos(2 * pi * (0:segmentLength-1)' / (segmentLength - 1))); windowEnergy = sum(hannWindow.^2); % Normalization factor % Segment the Signal into Overlapping Windows numSegments = floor((N - overlapSamples) / step); % Number of segments segments = zeros(segmentLength, numSegments); for i = 1:numSegments startIdx = (i - 1) * step + 1; endIdx = star...

DSB-SC in MATLAB

  MATLAB Script % The code is developed by SalimWireless.Com clc; clear; close all; % Parameters frequency = 10; % Message signal frequency (Hz) carrier_frequency = 100; % Carrier signal frequency (Hz) fs = 1000; % Sampling frequency % Time values t = linspace(0, 1, 10000); % Message signal message_signal = sin(2 * pi * frequency * t); % Carrier signal carrier_signal = cos(2 * pi * carrier_frequency * t); % DSB-SC Modulation dsbsc_modulated_signal = message_signal .* carrier_signal; % DSB-SC Demodulation dsbsc_demodulated_signal = dsbsc_modulated_signal .* carrier_signal; % Low-pass filter lpf_cutoff = frequency; % Low-pass filter cutoff frequency [b, a] = butter(6, lpf_cutoff / (0.5 * fs)); % 6th-order Butterworth filter dsbsc_demodulated_signal_filtered = filter(b, a, dsbsc_demodulated_signal); % Plot results figure; % Subplot 1: Message signal subplot(3, 1, 1); plot(t, message_signal, 'b'); title('Message Signal'); xlabel('Time'); yl...

Pulse Position Modulation (PPM)

Pulse-position modulation (PPM) is a form of signal modulation in which M message bits are encoded by transmitting a single pulse in one of 2M possible required time shifts. This is repeated every T seconds, such that the transmitted bit rate is M/T bits per second. Pulse position modulation is one type of analog modulation which allows variation within the position of the pulses based on the sampled modulating signal’s amplitude is called PPM or Pulse Position Modulation. In this type of modulation, the amplitude & width of the pulses are kept stable & the position of the pulses only varied. The PPM technique allows computers to transmit data by simply measuring the time taken to reach each data packet to the computer. So is frequently used within optical communication where there is small multi-pathway interference. This modulation totally transmits digital signals & cannot be utilized by analog systems. It transmits simple data which is not efficient while transferring f...

Periodigram in MATLAB

Step 1: Signal Representation Let the signal be x[n] , where: n = 0, 1, ..., N-1 (discrete-time indices), N is the total number of samples. Step 2: Compute the Discrete-Time Fourier Transform (DTFT) The DTFT of x[n] is: X(f) = ∑ x[n] e -j2Ï€fn For practical computation, the Discrete Fourier Transform (DFT) is used: X[k] = ∑ x[n] e -j(2Ï€/N)kn , k = 0, 1, ..., N-1 Here: k represents discrete frequency bins, f_k = k/N * f_s , where f_s is the sampling frequency. Step 3: Compute Power Spectral Density (PSD) The periodogram estimates the PSD as: S_x(f_k) = (1/N) |X[k]|² Where: S_x(f_k) represents the power of the signal at frequency f_k . The factor 1/N normalizes the power by the signal length. Step 4: Convert to Decibels (Optional) For visualization, convert PSD to decibels (dB): S_x dB (f_k) = 10 lo...

Wide Sense Stationary Signal (WSS)

  Main Properties The mean and autocorrelation do not change over time. A wide-sense stationary (WSS) process has a constant mean, constant variance, and an autocorrelation function that depends only on the time difference (lag), not the absolute time. For a WSS input to an LTI system, you are expected to study the output's statistical properties (such as mean, variance, and autocorrelation). You will find that the output signal is also a WSS signal. If your input signal has zero mean and unit variance, then the LTI output will have the same nature as the input signal, but: The mean of the output is scaled by the DC gain of the LTI system. The variance of the output is scaled by the total power gain of the system. MATLAB Code %The code is developed by SalimWireless.com clc; clear; close all; % Generate a wide-sense stationary (WSS) signal with 0 mean and unit variance N = 1000; % Length of the signal X = randn(1, N); % WSS signal % Define the time indices t1 and t2 t1 = 0; % Time i...

Fourier Spectral Analysis

  We all know that for Fourier spectral analysis, you will get an impulse of significant magnitude at the frequency values of sine or cosine waves. Here, we will discuss the spectral analysis or frequency components when we add, subtract, multiply, convolve, integrate or differentiate signals, etc. For sinusoidal signals Addition When we add two sinusoidal signals, the frequency components of the combined signal will be the frequencies of the individual signals.  Subtraction Again, for subtraction, the frequency components of the combined signal will be the frequencies of the individual signals. But if the amplitudes and periods for both signals are the same, then the combined signal will be null. Multiplication The frequency domain components for the time domain multiplication of two sinusoidal signals will be f1 ± f2, where f1 is the frequency of the first sinusoidal signal and f2 is for the other. Convolution The frequency domain components for the time-domain convolut...

MATLAB Code for Constellation Diagrams of ASK, FSK, and PSK

  MATLAB Script % The code is developed by SalimWireless.Com clc; clear; close all; % Parameters numSymbols = 1000; % Number of symbols to simulate symbolIndices = randi([0 1], numSymbols, 1); % Random binary symbols (0 or 1) % ASK Modulation (BASK) askAmplitude = [0, 1]; % Amplitudes for binary ASK askSymbols = askAmplitude(symbolIndices + 1); % Modulated BASK symbols % FSK Modulation (Modified BFSK with 90-degree offset) fs = 100; % Sampling frequency symbolDuration = 1; % Symbol duration in seconds t = linspace(0, symbolDuration, fs*symbolDuration); fBase = 1; % Base frequency frequencies = [fBase, fBase]; % Same frequency for both % Generate FSK symbols with 90° phase offset fskSymbols = arrayfun(@(idx) ...     cos(2*pi*frequencies(1)*t) * (1-idx) + ...     1j * cos(2*pi*frequencies(2)*t) * idx, ...     symbolIndices, 'UniformOutput', false); % Extract last points (constellation points) fskConstellation = cellfun(@(x) x(end), fskSymbols); % PSK Mod...

Combine Images Online

Add Image: Rows: Columns: Image Combining Instructions 1. Upload Images Click on the Add Image input field to upload an image. Repeat this step for additional images. Make sure the total number of images matches or exceeds the grid size you want (based on the Rows and Columns inputs). 2. Set the Grid Size Adjust the Rows and Columns fields to define the grid layout for the combined image. For example, setting Rows = 2 and Columns = 2 will create a 2x2 grid for your images. 3. Combine Images Once you have selected your images and set the grid size, click the Combine! button to merge the images into one canvas. 4. Download the Combined Image After the images are combined, a preview of the merged image will appear. To save the merged image, click the Download Combined Image button, and it will download as a JPEG file named combined-image.jpg . Additional Notes ...

People are good at skipping over material they already know!

View Related Topics to







Admin & Author: Salim

profile

  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 *