Reference Frame for Forces Going into 6DOF (Euler Angles)

I am trying to make a model for a quadcopter using simulink and I am using the 6DOF (Euler Angles) block and I am wondering what goes into the F_xyz (N) input. I curently have 4 forces from each of the 4 motors going into a add block then into the F_xyz (N). These forces are all in the Z direction and I was wondering if what I did is valid. Attached is a picture of the problem area. Do I need to run the forces through a rotation matrix first? I am new to both Simulink and controls...
Thanks

 Accepted Answer

According to 6DOF (Euler Angles), the force inputs are the components of the net force resolved in Body Coordinates. If the "Z direction" is in the body-fixed frame, then no furher action needed. If the "Z direction" is fixed to each motor, then the model needs to resolve the force vector applied by each motor into Body Coordinates before summing each motor force to get the net force resolved in Body Coordinates.

7 Comments

Alright that makes sense. They are body fixed so no further action needed. I do have a followup question: If I had a force coming in the X direction as well as the force in the Z, how would I input that into the 6DOF block. (If I used a Mux block, how would it know which was the X and which was the Z? Would it be based on the order going into the Mux block?).
Thank you!
How do you produce the differential force with the 4 rotors so that the drone flies in the x-direction?
What config is your drone?
Quad X. I was asking about the x direction force just to get a better understanding of how the 6DOF block works. Like I could have a motor in the back pushing the drone forward (Which I don't, but I wanted to see how I would go about adding a force not in the Z)
Referring to the attached .jpg and based on the "Z direction" I assume the F1, F2, F3, and F4 are all 3-element vectors of the form [0 0 value1], etc. If you were to add a fifth motor that produces a force in the X direction, that would go into "Forces and Moments" block, where it might contribute to the sum of the moments and be output as F5 in the from of [vaue5 0 0], and then added with the rest. But I could be wrong on the polarity because I don't know why that multiplication of the net force by -1 is in the model.
So right now the forces and moments are spitting out an intiger, not a vector... I might be going about this wrong. Attached is a look inside the Forces and Moment's block. I multiplied by -1 because my resultant force was going in the positive Z axis (which is pointing down) and I want my drone to fly so just flipped the sign. Again, I am new to this and still figuring out how everything connects.
I have found an image that shows the forward flight is achieved by tilting the drone through a negative pitch rotation about the y-axis.
Thus, I think there should be a transformation matrix that describes
More generally, each propeller generates a force vector Fi. Each force vector needs to be resolved in the coordinate frame fixed to the body of the quad copter. These are then summed together to form the F_xyz input to the 6-DOF block. And the units have to be correct.
Each propeller force produces exerts a moment around the quad copter body c.g. For each propeller force, the moment is cross(ri,Fi) where ri is the vector from the body c.g. to the point of application of the propeller force. It would be easiest to carry out the cross products with ri and Fi both resolved in body coordinates. The moment vectors from each propeller are summed to form the M_xyz input to the 6DOF block. And the units have to be correct.
The 6DOF block assumes a rigid body, which the quad copter isn't. But a rigid body approximation may be sufficent, or at least good enough to start, depending on the quad-copter configuration and how those propellers are actuated to control the flight in pitch, yaw, and roll. I don't know anything about quad copters, so don't have any insight here.

Sign in to comment.

More Answers (0)

Categories

Products

Asked:

on 12 Jul 2023

Commented:

on 14 Jul 2023

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!