Main Content

blePositionEstimate

Estimate Bluetooth LE node position

    Description

    example

    nodePosition = blePositionEstimate(locatorPosition,localizationMethod,direction) estimates the unknown Bluetooth® low energy (LE) node position, nodePosition, for the known Bluetooth LE locator positions, locatorPosition, and the localization method, localizationMethod. When you specify the localization method as 'angulation', the function calculates nodePosition by using the angle of arrival (AoA) or angle of departure (AoD), direction, between each locator and node.

    example

    nodePosition = blePositionEstimate(locatorPosition,localizationMethod,distance) estimates the unknown Bluetooth LE node position by using the localization method as 'lateration'. The distance input specifies the distance between each locator and Bluetooth LE node.

    nodePosition = blePositionEstimate(locatorPosition,localizationMethod,distance,direction) estimates the unknown Bluetooth LE node position by using the localization method as 'direction-angle'.

    Examples

    collapse all

    Set the positions of the Bluetooth LE receivers (locators).

    rxPosition = [-18 -40;-10 70];          % In meters

    Specify the azimuth angle of the signal between each Bluetooth LE receiver and transmitter.

    azimuthAngles = [29.0546 -60.2551];     % In degrees

    Specify the localization method. Because the angle of the signal between each Bluetooth LE receiver and transmitter is known, set the localization method to 'angulation'.

    localizationMethod = "angulation";

    Estimate the position of the Bluetooth LE transmitter. The actual position of the Bluetooth LE transmitter is at the origin: (0, 0).

    txPosition = blePositionEstimate(rxPosition,localizationMethod, ... 
        azimuthAngles)
    txPosition = 2×1
    10-4 ×
    
        0.2374
        0.1150
    
    

    Set the positions of the Bluetooth LE transmitters (locators).

    txPosition = [-5 -15 -30 -12.5;8.6603 -15 -17.3205 -21.6506; ...
        -17.3205 21.2132 20 43.3013];                                 % In meters

    Specify the distance between each Bluetooth LE transmitter and receiver.

    distance = [13.2964 33.4221 40 55.0728];                          % In meters          

    Specify the localization method. Because the distance between each Bluetooth LE transmitter and receiver is known, set the localization method to 'lateration'.

    localizationMethod = "lateration";

    Estimate the position of the Bluetooth LE receiver. The actual position of the Bluetooth LE receiver is [-7.5, 4.33, -5].

    rxPosition = blePositionEstimate(txPosition,localizationMethod, ...
        distance)
    rxPosition = 3×1
    
       -7.5001
        4.3304
       -4.9999
    
    

    Input Arguments

    collapse all

    Position of Bluetooth LE locators, specified as a two- or three- element column vector or a matrix of size 2-by-N or 3-by-N, where N is the number of Bluetooth LE locators in the network. Each column denotes the 2-D or 3-D position of the locator. Specify this input in meters.

    Data Types: double

    Localization method, specified as "angulation", "lateration", or "distance-angle". This value specifies the localization method that the function uses to estimate the position of the Bluetooth LE node.

    Data Types: char | string

    AoA or AoD between each Bluetooth LE locator and node, specified as a row vector of size 1-by-N or a matrix of size 2-by-N, where N is the number of Bluetooth LE locators in the network. The first row represents the azimuth angles between each locator and node, and the second row represents the elevation angles between each locator and node. Specify this value in degrees. The range of azimuth and elevation angles is [–180, 180] degrees and [–90, 90] degrees, respectively.

    Data Types: double

    Distance between each Bluetooth LE locator and node, specified as a row vector of size 1-by-N, where N is the number of Bluetooth LE locators in the network. Specify this value in meters.

    Data Types: double

    Output Arguments

    collapse all

    Estimated 2-D or 3-D position of the Bluetooth LE node, returned as a two- or three- element column vector denoting the 2-D or 3-D position, respectively. Units are in meters.

    Data Types: double

    References

    [1] Bluetooth Technology Website. “Bluetooth Technology Website | The Official Website of Bluetooth Technology.” Accessed November 22, 2021. https://www.bluetooth.com/.

    [2] Bluetooth Special Interest Group (SIG). "Bluetooth Core Specification." Version 5.3. https://www.bluetooth.com/.

    Extended Capabilities

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

    Version History

    Introduced in R2022a