Beam and Beyond: Wireless Localization Through Distributed Wireless Sensors

Mar 9, 2026

This article is part of a blog series called Beam and Beyond published by Mathworks on everything RF.

Accurate localization is becoming essential to how modern devices and wireless systems sense and interact with the world. Take, for instance, systems that identify and track objects indoors in real time, drones that navigate in total darkness without cameras, or lidar sensors or 5G base stations that steer beams towards moving network users. At their core lies a robust localization algorithm.

One way to achieve localization is through distributed sensors. By precisely controlling the timing and phase of signals across multiple antennas, the direction and the distance of incoming waves from an object can be accurately measured, even in scatter-rich environments.

These distributed sensors, often referred to as anchors, are placed at known locations. The anchors could be base stations, Wi-Fi access points, UWB anchors, etc., depending on the wireless application. By measuring the time taken for signals to travel between the anchors and the object to be tracked, estimates like time of arrival (TOA) and time difference of arrival (TDOA) become useful tools for localization.

Engineers often design and test localization algorithms in MATLAB. They can do so by modeling the entire wireless system end-to-end and implementing various scenarios, ensuring robustness of their applications.

Example: Building Scenarios for Wireless Localization 

Let’s implement and test a simple wireless scenario in MATLAB. As shown below, five anchors are simulated at known coordinates along with one moving device that is to be localized and tracked. The anchors are configured as transmitters and the device as a receiver.

Figure 1: Wireless scenario with known anchors.

% Device platform                                              

tgtpos = [8; 4; 0];                       % Device position (m)

tgtvel = [1; -1; 0.5];                  % Device velocity (m/s)

tgtplatform = phased.Platform('InitialPosition',tgtpos, ...    

              'Velocity',tgtvel);                              

% Stationary anchor platforms at known positions (x,y,z)       

anchorpos = [0 30 10 20 15; ...                                

            10 -5 -20 15 10; ...                               

             4 -10 10 5 -20];                                  

Isotropic antennas are used for both the transmitter and receivers, but this can be changed to other antenna configurations, including custom layouts.

% Create the transmitter and receiver components               

antenna = phased.IsotropicAntennaElement('BackBaffled',false); 

transmitter = phased.Transmitter('Gain',Gtx,'PeakPower',Pt);   

receiver = phased.Receiver('AddInputNoise',true,'Gain',Grx, ...

         'NoiseFigure',NF,'SampleRate',sampleRate);            

The propagation channel is set up as a free-space channel.

% Create a free space propagation channel                       

channel = phased.FreeSpace('PropagationSpeed',c, ...            

          'OperatingFrequency',fc,'SampleRate',sampleRate, ...

          'TwoWayPropagation',false);                           

An OFDM signal is used at each of the transmitters:

% BPSK symbol on each data carrier          

     bpskSymbol = randi([0,1],[N M])*2-1;   

% OFDM modulated signal with cyclic prefix  

         sigmod = ofdmmod(bpskSymbol,N,Ncp);

Localizing Synchronized Devices using Time of Arrival (TOA) estimations

Now that the scenario is in place, consider a case where the anchors and the device to be tracked are time-synchronized. Here, each measured delay of the signal reflected from the device corresponds directly to the range from an anchor. TOA measurements define a set of trilateration circles around each anchor and the intersection of these gives the position of the device.

Figure 2: Localization with TOA measurements.

The phased.TOAEstimator to process the measured signal delay. Two spectrum analysis methods can be used for TOA estimation: FFT and MUSIC. FFT is a fast but low-resolution algorithm, while MUSIC is a more computationally expensive but offers high-resolution.

% Synchronization error in seconds, here assumes perfect synchronization

delayoffset = 0;                                                        

% TOA estimation                                                        

toaEstimator = phased.TOAEstimator('PropagationSpeed',c, ...            

        'Measurement', 'TOA', 'SpectrumMethod','FFT', ...               

         'VarianceOutputPort',true,'DelayOffsetInputPort',true);        

[Y,var] = toaEstimator(X,freqSpacing,delayoffset);                      

Finally, the toaposest function, which converts the time measurements to a position estimate.

% Obtain TOA position estimate         

tgtposest = toaposest(Y,var,anchorpos);

Localizing Non-Synchronized Devices with Time Difference of Arrival (TDOA)

In most wireless systems, however, the device to be located is not synchronized to the anchors. This scenario introduces a common, unknown time offset into every delay measurement, invalidating the direct range calculation. Engineers address this challenge using Time Difference of Arrival (TDOA). TDOA uses the differences in arrival times between synchronous anchors. By subtracting the arrival times, the common unknown offset is mathematically canceled out, allowing users to estimate the location without needing synchronization between the anchor-device pairs.

Each TDOA measurement defines a hyperbolic surface of possible device positions. The target location is found at the intersection of several such hyperbolic surfaces.

Figure 3: Position estimate with TDOA measurements.

The same phased.TOAEstimator object can be used, but switch its measurement property to 'TDOA', enabling the estimator to calculate the differences in propagation time.

% Common synchronization error in seconds                              

delayoffset = 100e-9;                                                  

tdoaEstimator = phased.TOAEstimator('PropagationSpeed',c, ...          

        'Measurement','TDOA','SpectrumMethod','MUSIC’, ...             

        'VarianceOutputPort',true,'DelayOffsetInputPort',true, ...     

         'ForwardBackwardAveraging',true,'SpatialSmoothing',ceil(N/2));

% TDOA estimation                                                      

[Y,var] = tdoaEstimator(X,freqSpacing,delayoffset);                    

Design Insights for Phased Array Localization

While this simulation serves as a valuable initial step, engineers can explore how different configurations might affect localization performance, like the layouts of the anchors, array beamforming, bandwidth tradeoffs, clock and calibration errors and multipath propagation conditions.

Looking Ahead

Localization is now at the core of modern wireless networks. It is not just about finding where something is but enabling networks to understand and adapt to their environment.

Future developments may include:

  • Reconfigurable intelligent surfaces acting as virtual anchors
  • Joint beam steering and localization for millimeter-wave systems
  • Hybrid estimators that fuse TOA, TDOA, and angle of arrival information
  • Localization in a non-line-of-sight environment with multipath channels

Whether applications require the simplicity of TOA or the robustness of TDOA, the core challenge is modeling the entire system end to end. This includes everything from the complexities of the OFDM waveform and channel propagation to the mathematical precision of the final localization algorithms.

Modeling and simulation tools like MATLAB and Phased Array System Toolbox make it possible to explore these localization approaches in a controlled environment, enabling engineers to refine algorithms and test system performance before moving to expensive hardware prototyping.

Related Resources:

For more information on localization using phased arrays, visit the links below:

This article is part of a blog series called Beam and Beyond published by Mathworks on everything RF.

Contributed by

MathWorks

Country: United States
View Profile