Professional Documents
Culture Documents
Assgn 2
Assgn 2
Assgn 2
% Parameters
No = 1e-12; % Power spectral density of white Gaussian noise
fc = 1e6; % Mid-band frequency of the band-pass filter
B = 1e5; % Bandwidth of the band-pass filter
T = 1e-6; % Sampling period
Fs = 1 / T; % Sampling frequency
% Plot results
figure;
subplot(3,1,1);
plot(lag, autocorr_n);
title('Autocorrelation of White Gaussian Noise');
xlabel('Lag');
ylabel('Autocorrelation');
grid on;
grid minor;
subplot(3,1,2);
plot(lag, autocorr_in_phase);
title('Autocorrelation of In-phase Component');
xlabel('Lag');
ylabel('Autocorrelation');
grid on;
grid minor;
subplot(3,1,3);
plot(lag, autocorr_quadrature);
title('Autocorrelation of Quadrature Component');
xlabel('Lag');
ylabel('Autocorrelation');
grid on;
grid minor;
% Expressions
fprintf('Autocorrelation of White Gaussian Noise: E[n(t)*n(t+tau)] = No/2 *
delta(tau)\n');
fprintf('Autocorrelation of In-phase Component:
E[cos(2*pi*fc*t)*cos(2*pi*fc*(t+tau))] = (No/4) * cos(2*pi*fc*tau)\n');
fprintf('Autocorrelation of Quadrature Component:
E[sin(2*pi*fc*t)*sin(2*pi*fc*(t+tau))] = (No/4) * cos(2*pi*fc*tau)\n');