Matrix multiplication optimization for MUSIC DOA
Show older comments
Hi,
I am computing Direction of Arrival of wideband signal using MUSIC. Parameters are as below:
Antenna Array: L shape.
Signal freq. range: 20-80 MHz ( Narrow pulsed signals).
I am computing MUSIC Spatial spectrum as below code:
for dir=1:Total_dir
P_2D_MUSIC(dir,1:128)=mtimesx(mtimesx(A_all(1:3,dir,1:128),'c',V(1:3:,2:end,1:128),'SPEED'),mtimesx(V(1:3,2:end,1:128),'c',A_all(1:3,dir,1:128),'SPEED'),'SPEED');
end
Where P_2D_MUSIC is Music Spatial spectrum in each direction 'dir'. 'dir ' direction pair (Azimuth ,elevation) and there are about 55000 such pairs. V is eigen vectors of received signals by three antenna. A is direction array .
Anyway , A_all is of size 3x55000x128 , V is of 3x 2x128 matix. And above loop mulitply these matirices and compute P_2D_MUSIC for each direction at each frequency points (1:128). P= A'*V*V''*A
Problem: Present loop is taking about 3 sec for execution. However I need to run these loop for several data points (~ 500000) which will take a lot of time to finish.
I tried using 'parfor' but that takes more time than present 3 sec.
I am looking to optimise this loop processing in terms of speed.
regards
jayant
4 Comments
Walter Roberson
on 13 Aug 2020
P= A'*V*V''*A
does not make sense for size unless the V'' is V' instead.
Is it correct that you want to calculate a 55000 x 55000 x 128 matrix? If not then assuming that you want to calculate one of the 128 layers at a time, please show the expected size of each step of P= A'*V*V''*A
Jayant chouragade
on 13 Aug 2020
Walter Roberson
on 13 Aug 2020
A'*V is 55000 x 3 x 128 * 3 x 2 x 128 -> 55000 x 2 x 128
V' * A is 2 x 3 x 128 * 3 x 55000 x 128 -> 2 x 55000 x 128
and then when you multiply the two you get 55000 x 55000 x 128
That is, if you had 1 layer instead of 128 layers then the formula given would have a 55000 x 55000 output, not a 55000 x 1 output.
Jayant chouragade
on 13 Aug 2020
Accepted Answer
More Answers (0)
Categories
Find more on Direction of Arrival Estimation in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!