open-ephys / bonsai-commutator

Bonsai support for Open Ephys commutators
https://open-ephys.github.io/commutator-docs/index.html
MIT License
0 stars 0 forks source link

Consider renaming QuaternionToTwist #6

Closed glopesdev closed 1 week ago

glopesdev commented 3 months ago

I want to make a proposal that we reinstate the original name QuaternionTwistController.

The output of the current QuaternionToTwist is not twist, nor twist angle. The twist angle is calculated within the operator but is then converted into a feedback signal specifically to the commutator motor, in normalized units of turns. I don't want to give the impression that someone can use the output of this operator as a measure of twist.

The reason I used the name Controller is really that this operator is computing the feedback signal required to stabilize twist, hence control of twist, from a quaternion input. So QuaternionTwistController is an operator that computes the required feedback commands to the "plant" to keep the variable twist under control.

jonnew commented 3 months ago

We had a discussion on discord. The takeaways were

  1. The node is not make a feedback signal and is not a controller unless it is used in the context of a feedback control system. There is nothing inherent to this operator that forces that, so I don't think the name should indicate that it does.
  2. There is probably an assumption, given the current name, that the output is some sort of absolute or integrated amount of twisting about the defined axis. For that reasons, we could call it DeltaTwist or something to indicate that its producing a rough derivative signal between successive Quaternion inputs.However, although I'm out of my depth, it looks like "Twist" is a rate of axial rotation (https://en.wikipedia.org/wiki/Twist_(mathematics)).
glopesdev commented 3 months ago

This makes sense, and I agree with this interpretation. In that case maybe I would rename some internal variables of the algorithm to make things more clear (i.e. rename the feedback variable) and also change the description in the node attribute for consistency.