How to read the real-time electrical angle or mechanical angle?

As far as I know, to achieve field-oriented control of the motors, the Sapog/Télega has a good estimation of the shaft position. In the project I am working on, I need to know the real-time absolute shaft position. I am wondering whether Sapog/Télega provide an option to read the angle value. I came up with some possible ways, but am not sure which one might work based on currently available documentations. Could you tell me which one would work?

  • Use Babel or DroneCode Probe to connect with Orel 20 ESC. From Sapog manual, shaft angle is not included in the normal UAVCAN communication. Is there a way to read inner parameters(like shaft angle) of the ESC? If that is the case, what should I do? What is the difference between Babel or DroneCode Probe in terms of reading inner parameters?

  • Connect Myxa to PC with a USB cable. From the Kucher GUI video, I saw a parameter named electrical_angle. Is it the parameter indicating the absolute shaft position. In the video, the GUI was not updating electical_angle. Is there a way I can read this realtime value?

Another question is if there exists a way to know the shaft position, how is the accuracy of the estimation?

Thanks in advance.

What you are looking for is possible to some extent, but it is not yet part of the stable interface. It will be supported better via the new Register API when UAVCAN v1 is available.

Correct. Generally, under steady state operation, the accuracy is better than 30^{\circ} electrical.

At the moment, it is not possible to obtain this information via CAN, but you can read it via either USB or UART (you can access UART using DroneCode Probe or any other UART-capable hardware at 115200-8N1). In order to obtain this value, just read the value of the register observer.x (it has the type float32[4]) and take the last element, which contains the current electrical angle in radians. It is not possible to resolve the integer ambiguity that arises when you map the electrical angle onto the mechanical angle in multi-pole-pair motors.

I recommend you to follow the approach outlined here to find out how to read the register: Short coding example for serial interrogation of Myxa - #10 by pavel-kirienko. You can use Kucher either via UART or USB.