Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

XY-coordinate as the input #1

Closed
nuradlinn opened this issue Jan 3, 2023 · 7 comments
Closed

XY-coordinate as the input #1

nuradlinn opened this issue Jan 3, 2023 · 7 comments

Comments

@nuradlinn
Copy link

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.

@cliansang
Copy link
Owner

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

@nuradlinn
Copy link
Author

nuradlinn commented Jan 9, 2023

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.

@limingahua
Copy link

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

@cliansang
Copy link
Owner

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

@limingahua
Copy link

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!

@cliansang
Copy link
Owner

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

@limingahua
Copy link

@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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants