top of page
Search

#14 Transform sensor - problem solving with assumptions

  • Writer: Aurel
    Aurel
  • Apr 3, 2022
  • 3 min read

Updated: Apr 19, 2022

After having done many tests in simulation, I have come to the assumption that the "Angle" from transform sensor might be the wrong option to use and sense the angle which I need.

In short, the Transform Sensor should work like an IMU/Gyroscope, but at the moment it isn't.


I have continuously tried to perform tests and simulations by modifying values from the step input of the Desired Angle, then from the PID block, I have tried to modify the damping coefficients, the masses, the simulink converters and nothing worked, in fact all other ones made less sense than what I have tried so far, so here I am just theorizing what could be the main issue of why I am not able to get the desired outcome. I have even added another sensor to sense the position of the wheels on the Z direction and perhaps use that as a Setpoint, but still it din't seem to be any close to realistic simulation. I ended up with a lot of scopes and 2 sensors to try and debug every test I have done, and the resulting system (below) is what I managed to have, but at the moment I am stuck.

ree

As I have seen so far, the problem seems to be within the way the sensor perceives the orientation, and I came up with a potential theory that could put me on the right track if I am right. The following theory is based on taking a conventional axis for ease when making an assumption, and in this case I have chosen the Z axis to be my conventional one.


My main assumption is that the way the angle is being sensed or measured juggles between multiple axes, so for example when it is meant to measure between the frame of the world and the frame of the robot, it can take angles at the same time because they are both right.

In the following drawing, ZY are the axes of the world and the Z'Y' are the axes of the robot, and if I measure the ZZ' angle (noted as β / beta), I can see that it is equal to -Z-Z' angle (noted as γ / gamma), which would mess the orientation, since +Z means "up" and -Z means "down", the robot tries to achieve both at the same time:

ree

This could be why some values make the robot keep flying and spinning without slowing down, not because the controller PID is not tuned, but because it tries to reach 2 setpoints with the same value based on the drawing.


This could leave me to try and either TEST every other option from the Transform Sensor OR study a little bit about each of them and choose one or two to test which make more sense in theory.

I might go with the second, which is study a bit about each of them and make a more educated choice on which option from the block to use, because as seen in the image below there are just too many option to try make tests with all of them:

ree


In conclusion, I will try to find the best option by trying to make short researches about them, and also will try to get into contact with someone from the Mathworks community to how if there are similar issues that others have tried out and successfully overcame, or if there is a better block or library that I could use and simulate an IMU / Gyroscope.

 
 
 

1 Comment


磊磊
磊磊
Apr 19, 2023

May I ask if the subsystem connected to the wheels and vehicle body in the system is different from the previous article? When I tried it, I seemed to have some issues with that subsystem and couldn't produce the same effect. I suspect that I connected the subsystem incorrectly. I look forward to your answer.

Like
bottom of page