Skip to main content

Posts

Showing posts with the label Pulse Modulation

MATLAB Code for Pulse Position Modulation (PPM) and Demodulation

  MATLAB Code % Set parameters fs = 1000; % Sampling rate in Hz t = 0:1/fs:1; % Time vector spanning 1 second analogSignal = (sin(2 * pi * 2 * t) + 1) / 2; % Generate a 2 Hz sine wave, scaled to [0,1] samplesPerPulse = 100; % Define number of samples per pulse ppmWidthFraction = 0.1; % Fraction of samplesPerPulse used for pulse width % Perform PPM modulation [ppmSignal, ppmPulseTrain] = ppmModulate(analogSignal, samplesPerPulse, ppmWidthFraction); % Perform PPM demodulation demodulatedSignal = ppmDemodulate(ppmSignal, samplesPerPulse); % Display the demodulated signal values disp('Demodulated Signal:'); disp(demodulatedSignal); % Plot results figure; % Plot original analog signal subplot(3, 1, 1); plot(t, analogSignal, 'b'); title('Original 2 Hz Sine Wave'); xlabel('Time (s)'); ylabel('Amplitude'); % Plot modulated PPM signal subplot(3, 1, 2); stem(ppmSignal(1:1000), 'filled'); title('Pulse Position Modulated (PPM) Signal'); xlabe...

Pulse Width Modulation (PWM)

Pulse-width modulation (PWM), or pulse-duration modulation (PDM), is a method of controlling the average power delivered by an electrical signal.   Fig: An example of PWM in an idealized inductor driven by a blue line voltage source modulated as a series of sawtooth pulses, resulting in a red line current in the inductor.    Generating a PWM Signal The simplest way to generate a PWM signal is the intersection method, which requires only a sawtooth or a triangle waveform (easily generated using a simple oscillator) and a comparator. When the value of the reference signal is more than the modulation waveform, the PWM signal (magenta) is in the high state; otherwise, it is in the low state.      Duty cycle A low duty cycle equates to low power because the power is off for most of the time; the word duty cycle reflects the ratio of "on" time to the regular interval or "period" of time. The duty cycle is measured in percent, with 100% representing full o...

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...

Quantization Signal to Noise Ratio (Q-SNR)

What is Quantization? Quantization: Quantization in DSP is the process of mapping a large set of input values to a smaller set. It’s essential for converting analog signals into digital form. × Quantization Explanation For a signal varies from -8 V to +8 V, giving a total quantization range of 16 V. If the number of quantization levels is 4, the step size will be: \[ v_{\min} = -8, \quad v_{\max} = 8, \quad L = 4 \] Quantization step size: \[ \Delta = \frac{v_{\max} - v_{\min}}{L} = \frac{8 - (-8)}{4} = \frac{16}{4} = 4 \] Partition boundaries (decision levels): \[ p_0 = -8, \quad p_1 = -8 + 4 = -4, \quad p_2 = 0, \quad p_3 = 4, \quad p_4 = 8 \] Quantization codebook (reconstruction levels): \[ c_i = v_{\min} + \left(i + \frac{1}{2}\right) \Delta, \quad i = 0, 1, 2, 3 \] Calculate each codeword: \[ c_0 = -8 + \left(0 + \frac{1}{2}\right) \times...

MATLAB Code for Delta Modulation (DM) and Demodulation

📘 Overview & Theory 🧮 MATLAB Code 🧮 Other Pulse Modulation Techniques (e.g., PWM, PPM, DM, and PCM) 📚 Further Reading   MATLAB Script  clc; clear all; close all; fs = 10000; fm = 100; t = 0:1/fs:1000/fs; % Time Duration = 1000/10000 = 0.1 second x = 5*sin(2*pi*100*t); % Define Message Signal with peak voltage 5V and frequency 100Hz plot(t, x); hold on y = [0]; % Output DM signal i.e. stream of 1 or 0 xr = 0; % Output of Integrator i.e. staircase approximation; initial value = 0 del = 0.4; % Stepsize for i = 1:length(x)-1 if xr(i) <= x(i) % If current sample greater than the previous values or output of the integrator, output of DM = 1 d = 1; xr(i+1) = xr(i) + del; % Staircase approximated value else d = 0; xr(i+1) = xr(i) - del; % If current sample less than the previous values or output of the integrator, output of DM = 0 end y = [y d]; end stairs(t, xr); % Show the staircase approximated signal title('Staircase Approximated Sig...

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 *