Characterization of Discrete-Time AR(1) Wide-Sense Stationary Gaussian Random Process

An academic investigation into the temporal and spectral properties of a discrete-time Wide Sense Stationary (WSS) Gaussian random process modeled as a first-order autoregressive, or AR(1), system.
📌 Project Overview
- Author: Aakash Nair (Reg. No: 24BEC0080)
- Course: Random Processes
- Faculty Advisor: Dr. Mugelan R K
- Tools: MATLAB & Python (NumPy, SciPy, Matplotlib)
This project provides complete mathematical formulation, empirical simulation, and statistical verification of an AR(1) Gaussian random process. The empirical estimates of mean, autocorrelation, and Power Spectral Density (PSD) are compared with theoretical closed-form expressions to validate wide-sense stationarity and spectral shaping properties.
1. Difference Equation
The first-order autoregressive process $X[n]$ driven by discrete-time zero-mean White Gaussian Noise (WGN) $W[n]$ is defined by:
$$X[n] = a X[n - 1] + W[n]$$
where:
- $a = 0.8$ is the autoregression coefficient. The stability and WSS condition requires $|a| < 1$.
- $W[n] \sim \mathcal{N}(0, \sigma_w^2)$ is discrete-time White Gaussian Noise with variance $\sigma_w^2 = 1.0$.
2. Theoretical Statistics
- Mean:
$$\mathbb{E}[X[n]] = 0$$
- Autocorrelation Sequence:
$$R_X[k] = \mathbb{E}[X[n]X[n-k]] = \frac{\sigma_w^2}{1 - a^2} a^{|k|}$$
- Process Variance (Zero-lag Autocorrelation):
$$\sigma_X^2 = R_X[0] = \frac{\sigma_w^2}{1 - a^2} = \frac{1.0}{1 - (0.8)^2} = \frac{1.0}{0.36} \approx 2.7778$$
- Power Spectral Density (DTFT of $R_X[k]$):
$$S_X(e^{j\omega}) = \frac{\sigma_w^2}{|1 - a e^{-j\omega}|^2} = \frac{\sigma_w^2}{1 - 2a \cos(\omega) + a^2}$$
- Low-frequency peak ($\omega = 0$): $S_X(e^{j0}) = \frac{1.0}{(1-0.8)^2} = 25.0$
- High-frequency roll-off ($\omega = \pm\pi$): $S_X(e^{j\pi}) = \frac{1.0}{(1+0.8)^2} \approx 0.3086$
1. Time-Domain Representation ($X[n]$)
Shows the first 200 samples of the synthesized random sequence oscillating about zero mean with short-term correlation.

2. Autocorrelation Function ($R_X[k]$)
Empirical autocorrelation sequence computed via biased cross-correlation against the theoretical exponential curve for $|k| \le 30$.

3. Power Spectral Density ($S_X(e^{j\omega})$)
Empirical PSD estimated using Welch’s averaged modified periodogram compared against the analytical DTFT spectrum across $[-\pi, \pi]$.

4. Combined Analysis Overview
Complete multi-panel visualization generated via Python simulation pipeline:

📈 Quantitative Validation Summary
| Metric |
Theoretical |
Empirical (Simulated) |
Absolute Error |
| Mean $\mathbb{E}[X[n]]$ |
$0.00000$ |
$-0.01071$ |
$0.01071$ |
| Variance $\sigma_X^2$ |
$2.77778$ |
$2.63486$ |
$0.14292$ |
| Zero-Lag $R_X[0]$ |
$2.77778$ |
$2.63497$ |
$0.14280$ |
| Autocorrelation MSE |
$0.00000$ |
$7.4293 \times 10^{-3}$ |
$7.4293 \times 10^{-3}$ |
| Peak PSD $S_X(e^{j0})$ |
$25.00000$ |
$30.25567$ |
$5.25567$ |
| Roll-off PSD $S_X(e^{j\pi})$ |
$0.30864$ |
$0.36248$ |
$0.05384$ |
🚀 How to Run
Option 1: MATLAB
Open MATLAB and execute:
run('project.m')
This runs the simulation, generates Figures 1, 2, and 3, and exports the high-resolution figures.
Option 2: Python
- Install dependencies:
pip install -r requirements.txt
- Execute the simulation script:
python simulate_ar1.py
This prints the statistical validation table and updates the figures in figures/.
📂 Repository Structure
├── README.md # Project overview, theoretical derivation, and results
├── LICENSE # MIT License
├── requirements.txt # Python dependencies
├── .gitignore # MATLAB, Python, and OS ignore rules
├── project.m # MATLAB simulation and figure export script
├── simulate_ar1.py # Python simulation script with statistical reporting
├── docs/ # Documentation and report files
│ ├── report.md # Detailed academic report
│ └── RP_Project.docx # Original docx project report
└── figures/ # High-resolution simulation plots
├── fig1_time_domain.png
├── fig2_autocorrelation.png
├── fig3_power_spectral_density.png
└── fig_combined_analysis.png
📜 License
This project is licensed under the MIT License - see the LICENSE file for details.
评论