positioning-algorithms-for-uwb-matlab icon indicating copy to clipboard operation
positioning-algorithms-for-uwb-matlab copied to clipboard

XY-coordinate as the input

Open nuradlinn opened this issue 1 year ago • 7 comments

Hi there,

I want to filter out the reading from UWB (particularly the UKF). But, instead of having tag to anchor distance as the input, I want to directly make the coordinate-xy as the input. Which parameter should be edited so that I can achieve the requirements below?

Input: XY-coordinate from UWB Output: Filtered XY-coordinate from UWB

Thank you.

nuradlinn avatar Jan 03 '23 10:01 nuradlinn

Hi @nuradlinn, The outputs from UKF in this repo are already filtered coordinate values. Please take a look at the demo for UKF implementation here, from which the filtered coordinates from UWB are stored in the variable named "xCorrectedUKF". Particularly for UKF and EKF, the implementation of the algorithms in this repo is based on the Control System Toolbox from Mathworks.

I hope this helps.

Best regards Cung

cliansang avatar Jan 05 '23 20:01 cliansang

Hi @cliansang, thank you very much for replying to my inquiries.

I am aware that the "xCorrectedUKF" is the output of filtered coordinates from the UWB. From the example, there are 4 inputs that is the distance from anchors to tag. I tried to substitute the 4 inputs to 2 inputs, which is the unfiltered UWB coordinates. Unfortunately, I got an error that says "The output from MeasurementFcn must have the same size and data type as the given measurement". Hence, I am currently looking at which point do I need to adjust the parameters to accommodate the new input.

nuradlinn avatar Jan 09 '23 11:01 nuradlinn

Hello!

My problem is: in this code: compare_EKF_UKF_Multilat_TS_Trilat_demo_SportHall_40x20compare_EKF_UKF_Multilat_TS_Trilat_demo_SportHall_40x20

In this place, the input Anchors are 2D coordinates (x, y), but in the actual experiment shouldn't there be 3 coordinates (x, y, z) for the Anchor to locate the Tags? Or does your code default the height of the Anchor to be the same as the height of the Tags? Looking forward to your reply, best wishes!

% Known anchors positions in Sporthall at 40x20 positions

A0_2d = [0, 0].

A1_2d = [20, 0].

A2_2d = [20, 40]; A3_2d = [0, 0].

A3_2d = [0, 40];% Known anchors positions in Sporthall at 40x20 positions

A0_2d = [0, 0]; A1_2d = [20, 40]; % Known anchor positions in Sporthall at 40x20 positions

A1_2d = [20, 0]; % Known anchors positions in Sporthall at 40x20 positions

A2_2d = [20, 40]; A3_2d = [0, 0].

A3_2d = [0, 40].

limingahua avatar Mar 20 '24 11:03 limingahua

Hello @limingahua ,

All the algorithms provided in the repository are capable of producing 3D coordinates, as you mentioned.

The specific file you mentioned was post-processed data packed into MAT file format for showcasing a 2D scenario. The main reason is that the setup in the provided experimental data, which can be seen here, was unfortunately based only on a coplanar plane or the rank of the matrix is only 2 (i.e., all the heights of Z values in the Anchors were the same (1.2m)). This poses a problem, e.g. for the Multilateration algorithm in the use case of 3D, especially when SVD is not used. Therefore, the Z values of the experiments were discarded in that data. In real-world use cases, please make sure to deploy at least one of the Z values of your Anchors at a different height than the others in a 3D use case. There is nothing to do with the height of the Tag in this specific case.

I hope this helps.

Best regards Cung

cliansang avatar Mar 20 '24 16:03 cliansang

Thanks for the reply, I probably understand what you mean. That is to say, the z coordinate of Anchor I mentioned above are 1.2m. in my research, I am interested in only the 2D coordinate of Tag i.e. (x, y), my actual experiment set the z coordinate of Anchor to 1.6m, how can I go about modifying your code please? Looking forward to your reply!

limingahua avatar Mar 21 '24 04:03 limingahua

@limingahua If you're only interested in 2D, the setup and height of your Z coordinate in Anchors don't matter that much. Generally, extract the ranges or distances between the tag and your anchors (assuming you achieve true ranges), plug them into any positioning algorithm, and you should simply obtain the tag's position. Then, you can process it as required, either in 2D (x,y) or in 3D (x,y,z). Please take a look at the demos provided in here, and adapt it based on your system and anchor setups.

cliansang avatar Mar 22 '24 14:03 cliansang

@cliansang Thank you so much, I seem to have found a solution to the above problem, it's a great guide in my field of research, thank you, best wishes!

limingahua avatar Mar 24 '24 13:03 limingahua