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.comclc;
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 index 1
t2 = 100; % Time index 2
% Initialize autocorrelation value
Rx_val = 0;
% Loop to compute the sum for autocorrelation at (t1, t2)
for n = 1:N
% Ensure indices (n + t1) and (n + t2) are within bounds
if (n + t1 <= N) && (n + t2 <= N)
Rx_val = Rx_val + X(n + t1) * X(n + t2);
else
break; % Stop if indices go out of bounds
end
end
% Normalize by the length of the signal
Rx_val = Rx_val / N;
% Define the time indices t1 and t2
t3 = 100; % Time index 1
t4 = 200; % Time index 2
% Initialize autocorrelation value
Rx_val1 = 0;
% Loop to compute the sum for autocorrelation at (t1, t2)
for n = 1:N
% Ensure indices (n + t1) and (n + t2) are within bounds
if (n + t3 <= N) && (n + t4 <= N)
Rx_val1 = Rx_val1 + X(n + t3) * X(n + t4);
else
break; % Stop if indices go out of bounds
end
end
% Normalize by the length of the signal
Rx_val1 = Rx_val1 / N;
% Display the result
disp(['R_X(', num2str(t2), ') = ', num2str(Rx_val)]);
disp(['R_X(', num2str(t3), ', ', num2str(t4), ') = ', num2str(Rx_val)]);