03-27-2023 10:40 AM
I wanted to create an interesting topic because there is no labview example 🙂
Let's say that Euler angles, Quaternion, Rotation matrix information are read from IMU without any problem. There is no deviation in Yaw angle.
For example, what algorithm can be used if an RC plane needs to fix both the roll and yaw angles at 0 degrees while climbing upwards at a 90 degree pitch angle?
-It definitely sounds like Euler angles cannot be used due to the gimbal lock problem and therefore it should use Quaternions.
But another small question arises, how to send the quaternion information to the servo?
That is, how should I send the error between the desired position and the current position to the servo motor (1000-2000 pwm)?
It's nice to push the limits even if it sounds like a crazy idea 🙂
After doing a lot of research and even though the cells in my brain now smell of burning, I continue further.
I've looked at a few examples, but I don't understand much because they are not created with labview. Anyone have any ideas on this?
03-27-2023 11:24 AM
i don't have any answers, nor do I have any experience in this area, but I do applaud your efforts to expand your knowledge!
03-28-2023 02:59 AM
Hi constructionworker,
This sounds like an interesting problem. I don't have any suggestions as to what algorithms to use, but I can contribute to your servo motor problem. Are you using a RC servo motor for your rudder? You can translate the angle of the RC motor into the pulse width of the pulse train signal that you use to control the RC servo motor.
I'm guessing you are using myRIO? You can see here for a RC motor tutorial:
https://www.theengineeringprojects.com/2017/08/servo-motor-control-using-myrio.html
BR
John
Add motion to LabVIEW in 30min or less - TENET EMotion
Finding it hard to source NI hardware? Try NI Trading Post
03-28-2023 04:05 AM
Thank you billko.
Learning and knowing something makes me understand life better. (A little note: I have no choice but to learn) 🙂
Thanks for trying to help RIObotics
I am using servo motor and myRIO. Controlling the servo via serial or PWM is not very important here, the important thing is to stabilize it with Quaternion or rotation matrices.So my main goal is to learn how to use this logic as a start.
If a stabilization with Euler angles is desired;
motor 1(Aileron)=desired angle-current angle
Here it is necessary to use a PID and convert the result from the PID to the desired values. If it is pwm, it should be a pwm between 1000-2000. If it is a positioning servo (180 degrees center angle, that is, the angle where the fin is straight), a value should be given accordingly.
But this only applies to euler angles. But Euler angles have a gimbal lock issue.
The real question here is how can it be done if it is meant to be done with Quaternion or rotation matrices?
03-29-2023 12:59 AM
If anyone has anything to do with this topic, the code below is a code written for V-Tail.
I don't know if it's exactly right 🙂
I would be happy to hear any ideas or suggestions if anyone has knowledge and experience on this subject.