Need some help generating White Noise Source

1 Comment
Hi @Yogesh,
Please see my response to your comments, “I am trying to generate White noise source for my phase modulation technique.The procedure is to pass the signal through a rectangular band filter to imprint the sinc envelope onto the waveform.”
L = 10; % [m] Fiber length
PS = 1;
n = 1.45;
eps0 = 8.854e-12; % [F/m] Vacuum permittivity
mu0 = 4 * pi * 1e-7; %[H/m] Vacuum permeability
c = 2.9979e8; % [m/sec] Speed of light
Z0 = sqrt(mu0 / eps0); %[Ohm] Vacuum impedance
dt = 6e-12;
dz = dt * c / n; % Spacial and Temporal step sizes
Fs = 1 / dt;
N = round(L / dz); % Fiber length discretization
T = 10 * 2 * L * n / c; % Time taken for 10 round trips
Nt = round(T / dt);
% Material characteristics
A = 80e-12; % [m^2] Fiber's effective area
I1_0 = PS / A;
% Generating White Noise
white_noise = randn(1, Nt); % Generating white noise signal
% Phase Modulation Technique
phase_modulated_signal = sin(2 * pi * white_noise); % Phase modulation
% Rectangular Band Filter to Imprint Sinc Envelope
sinc_envelope = sinc(linspace(-5, 5, Nt)); % Generating sinc envelope
filtered_signal = conv(phase_modulated_signal, sinc_envelope, 'same'); % Filtering the signal
% Plotting
figure;
subplot(3,1,1);
plot(white_noise);
title('White Noise Signal');
subplot(3,1,2);
plot(phase_modulated_signal);
title('Phase Modulated Signal');
subplot(3,1,3);
plot(filtered_signal);
title('Filtered Signal with Sinc Envelope');
So, in the provided modified code, generated white noise using randn function. Performed phase modulation on the white noise signal, created a sinc envelope using the sinc function, filtered the phase-modulated signal with the sinc envelope using convolution and finally, plot the white noise signal, phase-modulated signal, and the filtered signal with the sinc envelope. Please see attached plot.

Hope this is what you were looking for.
Answers (0)
Categories
Find more on Multirate Signal Processing in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
