Main Content

phased.TOAEstimator

Time-of-arrival estimation

Since R2024a

Description

The phased.TOAEstimator System object™ estimates times of arrival (TOAs) or time differences of arrival (TDOAs) of signals at known anchor points. The System object uses time estimates to perform 2-D or 3-D target positioning of objects. Anchors can encompass receivers or transmitters, such as cellular base stations, Wi-Fi® access points, ground radar stations, or sonobuoys with known positions and targets with having unknown positions.

To estimate TOA or TDOA and estimate target positions:

  1. Create the phased.TOAEstimator object and set its properties.

  2. Call the object with arguments, as if it were a function.

To learn more about how System objects work, see What Are System Objects?

Creation

Description

estim = phased.TOAEstimator creates a default TOA or TDOA estimator System object, estim.

example

estim = phased.TOAEstimator(Name=Value) creates a TOA or TDOA estimator estim System object with each specified property Name set to the specified Value. Specify optional pairs of arguments as (Name1=Value1,...,NameN=ValueN) where Name is the argument name and Value is the corresponding value. Name-value arguments must appear after other arguments, but the order of the pairs does not matter.

Properties

expand all

Unless otherwise indicated, properties are nontunable, which means you cannot change their values after calling the object. Objects lock when you call them, and the release function unlocks them.

If a property is tunable, you can change its value at any time.

For more information on changing property values, see System Design in MATLAB Using System Objects.

Signal propagation speed, specified as a real-valued positive scalar. Units are in m/s.

Example: PropagationSpeed=3e8

Data Types: single | double

Measurement model, specified as "TOA" or "TDOA".

  • For "TOA", the object estimates TOA using TOA spectrum analysis followed by a TOA positioning algorithm.

  • For "TDOA", the object calculates TDOA measurements from TOA measurements and then applies a TDOA positioning algorithm.

Example: Measurement="TDOA"

Data Types: char | string

TOA spectrum analysis method, specified as "FFT" or "MUSIC".

  • For "FFT", the object uses an FFT algorithm to obtain the TOA spectrum.

  • For "MUSIC", the object uses a MUSIC super-resolution algorithm to obtain the TOA spectrum.

Example: SpectrumMethod="MUSIC"

Data Types: char | string

Enable the input of known or estimated delay offset between anchors and target, specified as a logical 0 (false) or logical 1 (true). When true, use the object input argument delayoffset to specify delay offsets. When false, the object assumes that delay offsets are 0.

Example: DelayOffsetInputPort=true

Data Types: logical

Enable the output of estimated TOA or TDOA variances using the var output argument, specified as a logical 0 (false) or logical 1 (true). Set this property to true to enable output of the estimated variances. Set this property to false to not output the estimated variances.

Example: VarianceOutputPort=true

Data Types: logical

Enable output of the FFT-based TOA response argument toaresp, specified as a logical 0 (false) or logical 1 (true. Set this property to true to output the TOA response. Set this property to false to not output the TOA response.

Example: TOAResponseOutputPort=true

Dependencies

To enable this property, set the Measurement property to "TOA", and set the SpectrumMethod property to "FFT".

Data Types: logical

Enable the output of the estimated target position tgtposest, specified as a logical 0 (false) or logical 1 (true. This property also enables the input of anchor positions using the anchorpos argument. Set this property to false to not allow input of anchor positions and suppress output of the target position.

Example: TargetPositionOutputPort=true

Data Types: logical

Source of the noise power values used for TOA or TDOA variance estimation, specified as "Property" or "Input port". When you set NoisePowerSource to "Property", the NoisePower property represents the noise power of the received data. When you set the NoisePowerSource property to "Input port", you can specify the noise power using the npow input argument.

Example: NoisePowerSource="Input port"

Data Types: logical

Noise power for the received signal, specified as a positive scalar or a length-L real-valued nonnegative vector where L is the number of anchors. If NoisePower is a scalar, the noise power is the same for all L anchors. If NoisePower is an length-L vector, each noise power value is applied to one of the L anchors. Units are in watts.

Example: [0.5 0.7 0.8]

Dependencies

To enable this property, set the NoisePowerSource property to "Property".

Data Types: single | double

Enable forward-backward averaging, specified as a logical 0 (false) or logical 1 (true. Forward-backward averaging mitigates rank-deficiency in a source covariance matrix used in the MUSIC spectrum analysis estimation method. Forward-backward averaging is useful when you have a small number of independent samples of the channel estimate. Set this property to true to enable forward-backward averaging.

Dependencies

To enable this property, set the SpectrumMethod property to "MUSIC".

Data Types: logical

Spatial smoothing factor, specified as a nonnegative scalar or L-element vector of nonnegative values. This value specifies the effective reduction in the number of subbands for TOA estimation due to spatial smoothing, specified as a nonnegative integer. You can use spatial smoothing to mitigate rank-deficiency in the source covariance matrix estimation of the MUSIC spectrum method. Use this technique when you have a small number of independent samples of a channel estimate.

If there are N subbands and the value of the SpatialSmoothing property is K, you and form ( K + 1 ) maximally-overlapped bands of N-K. Then, (K+1) covariance matrices are estimated for signals on the (K + 1) overlapped bands and these (K + 1) covariance matrices are averaged together to produce a spatially smoothed (N-K)-by-(N K) covariance matrix.

Increasing K by 1 increases the rank of the spatially smoothed covariance matrix by 1, until the range reaches its maximum. However, doing so reduces the effective number of subbands for TOA estimation by 1. The minimum value of K is 0, which implies no spatial smoothing. The maximum value of K is N – 2, resulting in (N – 1) overlapped bands of two subbands.

If SpatialSmoothing is a scalar, the object applies the same spatial smoothing for all L anchors. If SpatialSmoothing is a length-L vector, each spatial smoothing value is applied to each of the L anchors.

Dependencies

To enable this property, set the SpectrumMethod property to "MUSIC".

Data Types: single | double

Usage

Description

Y = estim(X,freqspacing) estimates the time of arrival (TOA) or time difference of arrival (TDOA) Y of signals at anchors from the channel estimation matrix X. This syntax assumes that the anchors and the target are synchronized in time.

  • If the Measurement property is set to "TOA", the object estimates the TOA between each anchor and the target.

  • If the Measurement property is set to "TDOA", the object performs TOA estimation first and then uses the TOA measurements to calculate TDOA.

The freqspacing argument represents the channel frequency spacing.

example

Y = estim(X,freqspacing,delayoffset) performs TOA or TDOA estimation when the anchors and target are not synchronized in time. The object compensates the TOA and TDOA estimation results Y by the specified delayoffset argument. To enable this syntax, set the DelayOffsetInputPort property to true.

[Y,var] = estim(X,freqspacing,delayoffset) returns the measurement variances var. To enable this syntax, set the VarianceOutputPort property to true.

[Y,var] = estim(X,freqspacing,npow) returns the measurement variances var for input Gaussian white noise power npow. To enable this syntax, set the NoisePowerSource to true.

[Y,var,toaresp,toagrid] = estim(X,freqspacing,___) returns the FFT-based TOA response toaresp and the TOA grid toagrid. To enable this syntax, set the TOAResponseOutputPort property to true.

[Y,___,tgtposest,tgtposcov] = estim(X,freqspacing,___,anchorpos) returns the estimated target position tgtposest and the estimated target position covariance tgtposcov. This syntax also accepts the anchor positions anchorpos as input. To enable this syntax, set the TargetPositionOutputPort property to true.

Input Arguments

expand all

Frequency-domain channel estimation matrices, specified as an N-by-M-by-L array or a 1-by-L cell array.

  • When the channel estimation matrix is an N-by-M-by-L array, each page of the array is an N-by-M channel estimation matrix for the Lth anchor. All channel estimation matrices must be the same size.

  • When the channel estimation matrices is a 1-by-L cell array, each cell contains a frequency-domain channel estimation matrix from one of the L anchors. The sizes of the channel estimation matrices can differ between anchors.

Each column of a channel estimation matrix represents a sample of a channel estimate of N uniformly spaced subbands. The total bandwidth is freqspacing times N. Each row of a channel estimation matrix represents M samples of a channel estimate of one subband.

Frequency spacings of channel estimates, specified as a positive scalar or a 1-by-L vector of positive values. If freqspacing is a scalar, the frequency spacing is the same for all L anchors. If freqspacing is a 1-by-L vector, each element specifies the frequency spacing for the corresponding. Units are in Hz.

Example: [10e6 15e6 20e6]

Data Types: single | double

Known delay offset between the target and anchors, specified as a scalar or a real-valued 1-by-L vector. If delayoffset is a scalar, the delay offset is the same for all signals from or to all L anchors. If delayoffset is a 1-by-L vector, each element specifies the delay offset for the corresponding anchor. You can use delayoffset to compensate TOA and TDOA estimation results Y. Units are in seconds.

Example: [0.5; -0.25; .1]

Dependencies

To enable this argument, set the DelayOffsetInputPort property to true.

Data Types: single | double

Gaussian white noise power, specified as a positive scalar or a real-valued 1-by-L vector of positive values. If npow is a scalar, the noise power is the same for all L anchors. If npow is a 1-by-L vector, each element specifies the noise power of the corresponding anchor. You can use npow to calculate the output argument var. Units are in watts.

Example: 0.4

Dependencies

To enable this argument, set the NoisePowerSource property to "Input port".

Data Types: single | double

Anchor positions, specified as a Q-by-L real-valued matrix representing the position of the L anchors in Q-dimensional Cartesian space (Q can be 2 or 3). Each column contains the position of an anchor in two-dimensional or three-dimensional Cartesian space.

Dependencies

To enable this argument, set the TargetPositionOutputPort property to true.

Data Types: single | double

Output Arguments

expand all

Estimated times-of-arrival or time-differences of arrival from a target at L anchors, returned as a 1-by-L real-valued vector or a 1-by-(L –1) real-valued vector.

  • If the Measurement property is "TOA", Y is an L-element real-valued vector. You can write the signal model of the TOA output at the anchor L as Y(l) = min(taul), for l = 1,2,...,L, where taul is the vector of received multipath delays at anchor L.

  • If the Measurement property is "TDOA", then Y is a 1-by-(L – 1) real-valued vector. You can write the signal model of the TDOA output at anchor L – 1 as Y(l-1) = min(taul)-min(reftau), for l = 2,3,...,L. taul is the vector of received multipath delays at the anchor-L, and reftau is the vector of received multipath delays at the first anchor.

Units are in seconds.

Data Types: single | double

  • If the Measurement property is "TOA", then var is a 1-by-L positive real-valued vector representing the estimated TOA variance.

  • If the Measurement property is "TDOA", then var is a 1-by-(L – 1) positive real-valued vector representing the estimated TDOA variance.

Units are in seconds-squared. The TOA or TDOA estimator obtains var through its Cramer-Rao lower bound (CRLB).

Dependencies

To enable this argument, set the VarianceOutputPort property to true.

Data Types: single | double

FFT-based TOA response, returned as a P-by-M-by-L array or 1-by-L cell array.

If the channel estimate X is an N-by-M-by-L array, the TOA response toaresp is a P-by-M-by-L array where P is the number of TOA grid samples.

If the channel estimate X is a 1-by-L cell array, the TOA response toaresp is a 1-by-L cell array, containing the TOA response for each of the L anchors.

Dependencies

To enable this argument, set the TOAResponseOutputPort property to true.

Data Types: single | double
Complex Number Support: Yes

Time-of-arrival grid, returned as P-by-L matrix or a 1-by-L cell array. The object restricts times-of-arrival to this grid.

  • If the channel estimate X is an N-by-M-by-L array, toagrid is a P-by-L matrix, where P is the number of TOA grid samples.

  • If the channel estimate X is a 1-by-L cell array, toagrid is a 1-by-L cell array, containing the TOA grid for each of the L anchors.

Units are in seconds.

Dependencies

To enable this argument, set the TOAResponseOutputPort property to true.

Data Types: single | double

Estimated target position, returned as a real-valued Q-element vector representing the estimated target position obtained from TOA and TDOA measurements. Q is two for a two-dimensional space or three for a three-dimensional space. Units are in meters.

Dependencies

To enable this argument, set the TargetPositionOutputPort property to true.

Data Types: single | double

Target position covariance matrix, returned as a real-valued positive semi-definite Q-by-Q matrix. The covariance matrix represents the estimated target position covariance based on TOA measurements. tgtposcov is calculated through Cramer-Rao lower bound (CRLB) of the TOA position estimator. Calculation of the covariance requires the knowledge of toavar. When toavar is inaccurate, tgtposcov is also inaccurate. When toavar is accurate and small, the tgtposcov achieves the TOA position estimate CRLB. Units are in ㎡eters-squared.

Dependencies

To enable this argument, set the TargetPositionOutputPort property to true.

Data Types: single | double

Object Functions

To use an object function, specify the System object as the first input argument. For example, to release system resources of a System object named obj, use this syntax:

release(obj)

expand all

plotTOASpectrumEstimate and plot signal time-of-arrival (TOA) spectrum
toaposestEstimate target position using TOA measurements
stepRun System object algorithm
releaseRelease resources and allow changes to System object property values and input characteristics
resetReset internal states of System object

Examples

collapse all

Use received signals from five anchors having known positions to perform FFT-based TOA estimation. Obtain TDOA measurements,and then perform two-step WLLS-based TDOA positioning. Use the data from the TOAEstimatorExampleData file, which contains these variables:

Variable

Definition

toa

Anchor TOAs

N

Number of sub-bands

M

Number of channel samples

freqspacing

Frequency spacing

npow

Noise power

anchorpos

Anchor positions

tgtpos

Actual target position

First, load the data from the file.

load TOAEstimatorExampleData

Create an exponential signal in a noise-free frequency-domain channel.

expsignal = exp(-1j*2*pi*(1:N)'*freqspacing*toa);

Create frequency-domain channel estimate.

X = cell(1,L);
for l = 1:L
    X{l} = expsignal(:,l)*ones(1,M) + ...
        sqrt(npow/2)*(randn(N,M)+1j*randn(N,M));
end

Configure a TDOA estimator to perform FFT-based spectrum analysis.

tdoaEstimator = phased.TOAEstimator(Measurement="TDOA", ...
    SpectrumMethod="FFT",NoisePower=npow, ...
    VarianceOutputPort=true,TargetPositionOutputPort=true);

Estimate TDOA from the estimated TOA.

[tdoaest,tdoavar,tgtposest] = tdoaEstimator(X,freqspacing,anchorpos);

Find the rmse target position estimate.

rmsetgtpos = rmse(tgtposest,tgtpos);
disp(["RMS TDOA positioning error = ",num2str(rmsetgtpos), "meters."])
    "RMS TDOA positioning error = "    "0.10657"    "meters."

Plot the TOA spectrum.

[toaGrid,toaSpectrum,toaEst] = plotTOASpectrum( ...
    tdoaEstimator,freqspacing,AnchorIndex=1, ...
    MaxDelay=200e-9);

Figure contains an axes object. The axes object with title FFT TOA Spectrum, xlabel TOA (ns), ylabel Power (dB) contains 2 objects of type line. One or more of the lines displays its values using only markers These objects represent TOA Spectrum, TOA Estimate.

Use received signals from five anchors having known positions to perform FFT-based TOA estimation. Obtain TDOA measurements,and then perform two-step WLLS-based TDOA positioning. Use the data from the TOAEstimatorExampleData file, which contains these variables:

Variable

Definition

toa

Anchor TOAs

N

Number of sub-bands

M

Number of channel samples

freqspacing

Frequency spacing

npow

Noise power

anchorpos

Anchor positions

tgtpos

Actual target position

First, load the data from the file.

load TOAEstimatorExampleData

Create an exponential signal in a noise-free frequency-domain channel.

expsignal = exp(-1j*2*pi*(1:N)'*(freqspacing*toa));

Create frequency-domain channel estimate with added Gaussian white noise.

  X = cell(1,L);
  for l = 1:L
      X{l} = expsignal(:,l)*ones(1,M) + ...
          sqrt(npow/2)*(randn(N,M)+1j*randn(N,M));
  end

Configure TOA estimator for MUSIC-based spectrum analysis.

toaEstimator = phased.TOAEstimator(Measurement="TOA", ...
SpectrumMethod="MUSIC",VarianceOutputPort=true, ...
NoisePower=npow,ForwardBackwardAveraging=true, ...
SpatialSmoothing=ceil(N/2));

Perform TOA estimation.

[toaest,toavar] = toaEstimator(X,freqspacing);

Perform TOA-based position estimation.

[tgtposest,tgtposcov] = toaposest(toaest,toavar,anchorpos);

Compute the RMSE target position estimate.

rmsepos = rmse(tgtposest,tgtpos);
disp(["RMS TOA positioning error = ", num2str(rmsepos), " meters."])
    "RMS TOA positioning error = "    "0.10669"    " meters."

Plot the TOA spectrum.

[toaGrid,toaSpectrum,toaEst] = plotTOASpectrum( ...
    toaEstimator,freqspacing,AnchorIndex=1, ...
    MaxDelay=200e-9);

Figure contains an axes object. The axes object with title MUSIC TOA Spectrum, xlabel TOA (ns), ylabel Power (dB) contains 2 objects of type line. One or more of the lines displays its values using only markers These objects represent TOA Spectrum, TOA Estimate.

Algorithms

expand all

References

[1] Zekavat, Seyed A., and R. Michael Buehrer, eds. Handbook of Position Location: Theory, Practice, and Advances. IEEE Series on Mobile & Digital Communication. Hoboken, New Jersey: Wiley-IEEE Press, 2019.

[2] Molisch, Andreas F. Wireless Communications: From Fundamentals to Beyond 5G. Third edition. IEEE Press. Hoboken, NJ: Wiley-IEEE Press, 2023.

[3] Chan, Y.T., and K.C. Ho. “A Simple and Efficient Estimator for Hyperbolic Location.” IEEE Transactions on Signal Processing 42, no. 8 (August 1994): 1905–15. https://doi.org/10.1109/78.301830.

[4] Stoica, P., and Arye Nehorai. “MUSIC, Maximum Likelihood, and Cramer-Rao Bound.” IEEE Transactions on Acoustics, Speech, and Signal Processing 37, no. 5 (May 1989): 720–41. https://doi.org/10.1109/29.17564.

Extended Capabilities

C/C++ Code Generation
Generate C and C++ code using MATLAB® Coder™.

Version History

Introduced in R2024a