MATLAB Code
Output
Workflow of the Multi-Antenna Signal Processing and MUSIC/MVDR Code
This section describes the step-by-step workflow of the MATLAB code that simulates multiple sources, separates them using subspace methods, and reconstructs signals via MVDR beamforming.
-
Step 1: Parameter Initialization
Define key parameters including:
- Number of array sensors (
M) - Sensor spacing (
d) - Number of sources (
K) - Number of snapshots (
N) - True source angles (
theta) - Signal-to-noise ratio (
SNR)
These parameters form the foundation for the simulation.
- Number of array sensors (
-
Step 2: Generate Source Signals
Create narrowband complex exponential signals representing the sources:
s1 = exp(1j*2*pi*0.05*t);s2 = exp(1j*2*pi*0.1*t);These signals form the source matrix
S. -
Step 3: Construct Steering Matrix
Compute the steering vectors for each source direction and form the matrix
A. Each column represents the array’s response to a source angle. -
Step 4: Generate Received Signals
The array receives a combination of source signals and additive noise:
X = A*S + noise;This models the real-world scenario of multiple antennas capturing overlapping signals with noise.
-
Step 5: Covariance Matrix Estimation
Compute the sample covariance matrix of the received signals:
R = (X*X')/N;This matrix captures correlations between sensors and is essential for subspace separation.
-
Step 6: Eigenvalue Decomposition
Decompose the covariance matrix into eigenvalues and eigenvectors:
[Evec, Eval] = eig(R);Eigenvalues indicate the power in each subspace, separating signal and noise components.
-
Step 7: Sort Eigenvalues and Eigenvectors
Sort eigenvalues in descending order to identify the signal subspace (largest eigenvalues) and noise subspace (smallest eigenvalues).
-
Step 8: Subspace Separation
Define:
- Signal subspace:
Es = Evec_sorted(:,1:K) - Noise subspace:
En = Evec_sorted(:,K+1:end)
Noise and signal subspaces are orthogonal, which is the foundation for MUSIC.
- Signal subspace:
-
Step 9: MUSIC Spectrum Calculation
Scan angles using steering vectors and compute the pseudo-spectrum:
Pmusic(i) = 1/(steering'*(En*En')*steering);Peaks in the spectrum indicate the directions of arrival (DOAs) of the sources.
-
Step 10: MVDR Beamforming
For each source, apply MVDR weights to reconstruct the signal while minimizing noise:
w_mvdr = (R\ a_k) / (a_k' * (R\ a_k));S_beamformed(k,:) = w_mvdr' * X;This produces clean estimates of each source signal from the mixed array observations.
Summary: The workflow models a practical multi-antenna system: simulate sources, capture them with an array, compute correlations, separate signal/noise subspaces, find DOAs (MUSIC), and reconstruct signals (MVDR beamforming). This closely mimics real-world array signal processing in radar, wireless communications, and MIMO systems.