Need some help generating White Noise Source

6 views (last 30 days)
Yogesh
Yogesh on 29 Jul 2024
Commented: Umar on 29 Jul 2024
clear all
close all
clc
tic
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.
%dz=2.5e-4;
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;
% figure;
FA=(-Nt/2:Nt/2-1)*Fs/Nt;
fc=3e9;
X = randn(1,Nt); %random noise generation
Y1 = 10*lowpass(X, fc, Fs, Steepness=0.8);
ypm1 = 1.2743e+06*exp(1i*Y1);
figure;
plot(FA,abs(fftshift(fft(Y1/Nt))));
xlim([-20e9 20
e9]);
figure;
semilogy(FA,(2*n*c*eps0*A*abs(fftshift(fft(ypm1/Nt).^2))))
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.
Likewise I have generated random noise and passed through low pass filter of 3GHz but the fft of the product is not upto the figure.
Can anyone suggest any changes.
  1 Comment
Umar
Umar on 29 Jul 2024

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.

Sign in to comment.

Answers (0)

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!