Main Content

toaposest

Estimate target position using TOA measurements

Since R2024a

    Description

    tgtposest = toaposest(toaest,toavar,anchorpos) estimates the position tgtposest of a target using multiple anchors, with known positions anchorpos, based on time-of-arrival (TOA) measurements between the target and anchors. toavar represents the variance of the time-of-arrival measurement.

    example

    tgtposest = toaposest(___,PropagationSpeed=C) also specifies the signal propagation speed C.

    [tgtposest,tgtposcov] = toaposest(___) returns the target position covariance matrix tgtposcov.

    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 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.

    Input Arguments

    collapse all

    Estimated times of arrival of signals between anchors and single target, specified as a 1-by-L element real-valued vector. Units are in seconds.

    Data Types: single | double

    Variances of the estimated times of arrival at anchors, specified as a 1-by-L element real-valued vector.

    When toavar is unknown, you can set it to be a 1-by-L element vector with identical finite values without affecting the solution tgtposest.

    Data Types: single | double

    Anchor positions, specified as 2-by-L real-valued matrix or 3-by-L real-valued matrix. A 2-by-L matrix represents the anchor positions in 2-D Cartesian space, while a 3-by-L matrix represents the anchor positions in 3-D Cartesian space.

    Data Types: single | double

    Signal propagation speed, specified as a positive real scalar. Units are in meters per second.

    Example: 3e8

    Data Types: single | double

    Output Arguments

    collapse all

    Estimated target positions, returned as a Q-by-1 vector representing the estimated target position obtained from TOA and TDOA measurements. Units are in meters.

    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 calculated from the Cramer-Rao lower bound (CRLB) of the TOA position estimator. Calculating the covariance requires the knowledge of toavar. When toavar is inaccurate, tgtposcov is also inaccurate. When toavar is accurate and small, the tgtposcov value represents the TOA position estimate CRLB. Units are in ㎡eters-squared.

    Data Types: single | double

    Algorithms

    collapse all

    Precision

    This function supports single and double precision floating point values for input arguments. If the input argument toaest is single precision, the outputs are single precision. If the input argument toaest is double precision, the outputs are double precision. The precision of the outputs is independent of the precision of the other arguments.

    Positioning Estimation

    This function uses a two-step weighted linear least squares (WLLS) algorithm to fuse the TOA measurements toaest and the known anchor positions anchorpos into a target position, tgtposest. The function calculates the weights used in the WLLS algorithm from toaest and the TOA estimation variance toavar. The two-step WLLS algorithm is an approximate realization of the maximum-likelihood estimation algorithm, and can attain the TOA position estimation Cramer-Rao lower bound (CRLB) when the TOA estimation errors are small.

    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