From 7cc3174ec926e7b5285c56183057af440d8663a8 Mon Sep 17 00:00:00 2001 From: devtty1er Date: Tue, 15 Mar 2022 22:21:30 -0400 Subject: [PATCH] Fix bug in Capon beamforming Fixes #43 --- mmwave/dsp/angle_estimation.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mmwave/dsp/angle_estimation.py b/mmwave/dsp/angle_estimation.py index 19e0d87f..37c80346 100644 --- a/mmwave/dsp/angle_estimation.py +++ b/mmwave/dsp/angle_estimation.py @@ -239,7 +239,7 @@ def aoa_capon(x, steering_vector, magnitude=False): Rxx = cov_matrix(x) Rxx = forward_backward_avg(Rxx) - Rxx_inv = np.linalg.inv(Rxx) + Rxx_inv = np.linalg.pinv(Rxx) # Calculate Covariance Matrix Rxx first = Rxx_inv @ steering_vector.T den = np.reciprocal(np.einsum('ij,ij->i', steering_vector.conj(), first.T))