Skip to main content

MUSIC Algorithm Explained (with MATLAB + Simulator)


Practical Implementation of the MUSIC Algorithm

The focus is on how the algorithm works computationally, not just theory, and it explains the denominator (aH En EnH a) mathematically and intuitively.

1. Introduction

The MUSIC (Multiple Signal Classification) algorithm is a high-resolution method used in signal processing and array processing to estimate the Direction of Arrival (DOA) of signals received by a sensor array.

Unlike classical beamforming methods, MUSIC uses eigenvector decomposition of the covariance matrix to separate the signal subspace and noise subspace, allowing it to achieve much higher angular resolution.

In practical implementations, MUSIC works by:

  • Simulating or collecting array signals
  • Computing the covariance matrix
  • Performing eigenvalue decomposition
  • Separating signal and noise subspaces
  • Scanning possible angles using a steering vector
  • Constructing a pseudo-spectrum where peaks indicate signal directions

2. Signal Model

Two complex exponential signals are generated as examples:

s1 = exp(1j*2*pi*0.05*t);
s2 = exp(1j*2*pi*0.1*t);

These represent two narrowband sources.

The signals received by the antenna array follow the standard array model:

X = A*S + N

Where:

  • X → received signal matrix
  • A → steering matrix
  • S → source signals
  • N → noise

Each column of A corresponds to a steering vector for one source direction.

3. Steering Vector

For a Uniform Linear Array (ULA), the steering vector is:

steering = exp(-1j*2*pi*d*(0:M-1)'*sin(theta));

Mathematically:

a(θ) = [
1
e^(-j2πd sin(θ))
e^(-j2π 2d sin(θ))
⋮
e^(-j2π (M-1) d sin(θ))
]

This vector represents the phase delays across sensors for a signal arriving from angle θ. Each element corresponds to the response of a specific antenna element.

4. Covariance Matrix

R = (X*X')/N;

Mathematically:

R = E[ X X^H ]

The covariance matrix contains information about:

  • signal correlations
  • noise characteristics
  • spatial structure of the received signals

5. Eigenvalue Decomposition

R = E Λ E^H

Where:

  • E → eigenvectors
  • Λ → eigenvalues

Large eigenvalues correspond to signal components, while smaller ones correspond to noise.

6. Signal and Noise Subspaces

Es = Evec_sorted(:,1:K);
En = Evec_sorted(:,K+1:end);

Key property:

E_n^H a(θ_i) = 0

for true signal directions. This means the steering vector is orthogonal to the noise subspace.

7. MUSIC Spectrum Computation

The pseudo-spectrum used in MUSIC is:

P(θ) = 1 / (a^H(θ) E_n E_n^H a(θ))

Implementation:

Pmusic(i) = 1/(steering'*(En*En')*steering);

8. Meaning of the Denominator

The denominator aH En EnH a measures the energy of the steering vector projected onto the noise subspace. Step by step:

  1. Projection matrix: En EnH projects any vector onto the noise subspace.
  2. Apply to steering vector: EnH a(θ) measures how much the steering vector lies in noise. If θ corresponds to a true signal, EnH a(θ) ≈ 0.
  3. Energy in noise subspace: aH En EnH a = ||P_n a(θ)||² = ||E_n^H a(θ)||².

9. Why Peaks Appear

If the tested angle equals a true signal direction:

E_n^H a(θ) ≈ 0
a^H E_n E_n^H a ≈ 0
P(θ) = 1 / 0 → large peak

These peaks indicate the Direction of Arrival (DOA).

10. Practical Interpretation

The denominator measures how much the steering vector looks like noise:

  • If it looks like noise → denominator large → spectrum small
  • If it looks like signal → denominator small → spectrum peak

MUSIC finds angles where the steering vector is orthogonal to the noise subspace.

11. Angle Scanning

Scan angles (e.g., -90° to 90°). For each angle:

  1. Generate steering vector
  2. Project onto noise subspace
  3. Compute pseudo-spectrum

The result is a spatial spectrum where peaks correspond to signal directions.

12. Final Result

The final plot shows:

  • x-axis → angle
  • y-axis → MUSIC spectrum

Sharp peaks appear at the true source angles.

13. Key Practical Insight

The MUSIC algorithm works because:

  • Signals occupy a low-dimensional subspace
  • Noise occupies the remaining orthogonal subspace
  • Steering vectors of real signals lie orthogonal to the noise space

The denominator aH En EnH a acts as a test measuring whether a steering vector belongs to the signal space or noise space.



Summary

The denominator aH En EnH a measures the projection energy of the steering vector onto the noise subspace, and MUSIC finds angles where this energy is nearly zero, indicating the presence of a signal.

Why Do We Need the Covariance Matrix and Eigen Vectors?

Received signal model:

For an array of M sensors and K narrowband sources:

X = A*S + N

Where:

  • X — M×N received data matrix (N snapshots)
  • A = [a(θ₁), …, a(θK)] — M×K steering matrix
  • S — K×N source signal matrix
  • N — noise, assumed white Gaussian

Covariance Matrix

We compute the sample covariance:

R = (1/N) * X * X^H

Why compute R?

  • R contains all correlations between sensors.
  • It separates the signal subspace (strong eigenvalues) from the noise subspace (small eigenvalues).
  • MUSIC requires eigen decomposition of R to identify the noise subspace.
  • Without R, we cannot identify the direction-independent noise subspace, which is crucial.

2. Eigen-decomposition

Decompose R:

R = E * Λ * E^H

Where:

  • E — eigenvectors
  • Λ — eigenvalues

Sort eigenvalues in descending order:

  • First K eigenvectors → signal subspace Es
  • Remaining M−K eigenvectors → noise subspace En

3. Why the Steering Vector is Orthogonal to Noise Eigenvectors

Key property: For a true signal from angle θi, the steering vector lies exactly in the signal subspace:

a(θ_i) ∈ span(E_s)

Since signal and noise subspaces are orthogonal:

E_s^H * E_n = 0

Thus:

E_n^H * a(θ_i) = 0

Mathematically:

  • E_n * E_n^H — projection onto noise subspace
  • a^H * E_n * E_n^H * a — energy of steering vector projected onto noise

If θ = θi (true signal angle):

E_n^H * a(θ_i) = 0

So the denominator of the MUSIC pseudo-spectrum goes to zero, producing a peak.

 

Further Reading

  1. MATLAB Code for MUSIC 
  2. MUSIC Online Simulator 

Contact Us

Name

Email *

Message *

Popular Posts

Rayleigh vs Rician Fading (with MATLAB + Simulator)

  In Rayleigh fading , the channel coefficients tend to have a Rayleigh distribution, which is characterized by a random phase and magnitude with an exponential distribution. This means the magnitude of the channel coefficient follows an exponential distribution with a mean of 1. In Rician fading , there is a dominant line-of-sight component in addition to the scattered components. The channel coefficients in Rician fading can indeed tend towards 1, especially when the line-of-sight component is strong. When the line-of-sight component dominates, the Rician fading channel behaves more deterministically, and the channel coefficients may tend towards the value of the line-of-sight component, which could be close to 1.   MATLAB Script clc; clear all; close all; % Define parameters numSamples = 1000; % Number of samples K_factor = 5; % K-factor for Rician fading SNR_dB = 20; % Signal-to-noise ratio (in dB) % Generate complex Gaussian random variable for Rayleigh fading channel h_r...

UGC-NET Electronic Science Question Paper With Answer Key and Full Explanation [Dec 2023]

    UGC-NET Electronic Science Question Paper With Answer Key Download Pdf [Dec 2023] Download Question Paper               See Answers   2025 | 2024 | 2023 | 2022 | 2021 | 2020 UGC-NET Electronic Science  2023 Answers with Explanations 51. (A): The stacking fault is the most common area defect found in silicon. These faults typically occur along the 111 plane. In the crystalline structure of silicon, atoms are arranged in a specific pattern known as a diamond lattice. A stacking fault refers to a disruption in the normal order of atomic layers within this lattice, which usually occurs in the 111 plane due to the geometric arrangement of the atoms. This type of defect can affect the electrical and mechanical properties of the material, such as the mobility of charge carriers and mechanical strength. 52. (C): The important figure of merit for the microwave application of a Schot...

UGC NET Electronic Science Previous Year Question Papers

Home / Engineering & Other Exams / UGC NET 2022 PYQ 📥 Download UGC NET Electronics PDFs Complete collection of previous year question papers, answer keys and explanations for Subject Code 88. Start Downloading UGC-NET (Electronics Science, Subject code: 88) Subject_Code : 88; Department : Electronic Science; 📂 View All Question Papers Q. UGC Net Electronic Science Question Paper [June 2025] A. UGC Net Electronic Science Question Paper With Answer Key Download Pdf [June 2025] with full explanation Q. UGC Net Electronic Science Question Paper [December 2024] A. UGC Net Electronic Science Question Paper With Answer Key Download Pdf [December 2024] Q. UGC Net Electronic Science Question Paper [Aug 2024] A. UGC Net Electronic Scien...

BER vs SNR for M-ary QAM, M-ary PSK, QPSK, BPSK, ...(MATLAB Code + Simulator)

Bit Error Rate (BER) & SNR Guide Analyze communication system performance with our interactive simulators and MATLAB tools. 📘 Theory 🧮 Simulators 💻 MATLAB Code 📚 Resources BER Definition SNR Formula BER Calculator MATLAB Comparison 📂 Explore M-ary QAM, PSK, and QPSK Topics ▼ 🧮 Constellation Simulator: M-ary QAM 🧮 Constellation Simulator: M-ary PSK 🧮 BER calculation for ASK, FSK, and PSK 🧮 Approaches to BER vs SNR What is Bit Error Rate (BER)? The BER indicates how many corrupted bits are received compared to the total number of bits sent. It is the primary figure of merit for a...

Theoretical vs. simulated BER vs. SNR for ASK, FSK, and PSK (MATLAB Code + Simulator)

📘 Overview 🧮 Simulator 💻 Theoretical Code 📊 Simulated Code 📚 Resources Overview BER vs. SNR denotes how many bits in error are received for a given signal-to-noise ratio, typically measured in dB. Common noise types in wireless systems: 🚀 1. Additive White Gaussian Noise (AWGN) 🌊 2. Rayleigh Fading AWGN adds random noise; Rayleigh fading attenuates the signal variably. A good SNR helps reduce these effects. Bit Error Rate (BER) Equations BER formulas for ASK, FSK, and PSK modulation schemes. ASK BER = 0.5 × erfc(0.5 × √SNR) FSK BER = 0.5 × erfc(√(SNR / 2)) PSK BER = 0.5 × erfc(√SNR) erfc / Q-function (Click here) Live BER S...

Constellation Diagrams of ASK, PSK, and FSK (with MATLAB Code + Simulator)

Constellation Diagrams: ASK, FSK, and PSK Comprehensive guide to signal space representation, including interactive simulators and MATLAB implementations. 📘 Overview 🧮 Simulator ⚖️ Theory 📚 Resources Definitions Constellation Tool Key Points MATLAB Code 📂 Other Topics: M-ary PSK & QAM Diagrams ▼ 🧮 Simulator for M-ary PSK Constellation 🧮 Simulator for M-ary QAM Constellation BASK (Binary ASK) Modulation Transmits one of two signals: 0 or -√Eb, where Eb​ is the energy per bit. These signals represent binary 0 and 1. BFSK (Binary FSK) Modulation Transmits one...

Fourier Transform of Unit Step Function Using MATLAB

  MATLAB Script  clc; clear; close all; % Time domain setup Fs = 1000;               % Sampling frequency T = 1/Fs;                % Sampling interval L = 2048;                % Number of samples t = (-L/2 : L/2 -1)*T;   % Symmetric time vector % Unit step function u(t) ≈ heaviside(t) x = double(t >= 0);      % Discrete unit step % FFT and frequency axis X = fftshift(fft(x));    % Shift zero freq to center f = (-Fs/2):(Fs/L):(Fs/2 - Fs/L);   % Frequency vector % Normalize FFT output X = X / L; % Plot time-domain signal figure(); plot(t, x, 'LineWidth', 1.5); title('Unit Step Function u(t)'); xlabel('Time (s)'); ylabel('Amplitude'); grid on; xlim([-0.01 0.01]); % Plot frequency-domain magnitude figure(); plot(f, abs(X), 'LineWidth', 1.5); title('Fourier Transform of a Rectangular Function'); xlabel('Frequency (Hz...

OFDM vs SC-OFDM

  The main difference between OFDM and SC-OFDM is that SC-OFDM transmits the signal using a single carrier, while OFDM uses multiple subcarriers. However, in SC-OFDM, the signal is generated with different sub-bands, but it is transmitted through a single carrier (more technically, through a wideband carrier signal). Block Diagram of OFDM: Data → Modulation → Serial-to-Parallel → IFFT → Add CP → Transmit Received Signal → Remove CP → FFT → Parallel-to-Serial → Demodulation → Data Block Diagram of SC-OFDM: Data → Modulation → DFT → IFFT → Add CP → Transmit Received Signal → Remove CP → FFT → Demodulation → Data    In the case of OFDM, the input modulated data is converted from a serial stream to parallel streams, and different subcarriers are assigned to each chunk. Then, IFFT is applied to these chunks, and a cyclic prefix is added to each one. Each chunk is technically referred to as an OFDM symbol . Unlike OFDM, SC-OFDM does not perform serial-to-parallel conversion ...