0
$\begingroup$

hope you are all doing well.

We are doing a project where a quadcopter is controlled by an ordinary joystick. We have constructed the Control Algorithm and the joystick to move the quadcopter in accordance with the joystick inputs (roll, pitch, yaw_speed, z_speed).

However, I have some questions on my mind.

Right now, we designed a linear controller, where the roll and pitch inputs are saturated within +/- 20 degrees. Therefore, the joystick directly gives roll and pitch reference angles. For the yaw angle, we read joystick as the yaw_velocity. Then we integrate it to have the reference yaw angle. We use thrust input from the joystick as the velocity in z-axis. Is this a logical mapping from the joystick to the quadcopter for linear control? Is there any (kind of) universal mapping for linear control?

The second part of the project contains non-linear control of the quadcopter, where we aim to have the quadcopter do 360 spins. In order to achieve that, how should we map the joystick inputs? Should we read all of them as roll, pitch, yaw velocities?

My final question is: Or mapping these values to the body frame (p, q, r, and w) is a more preferred way?

Edit: Since I received no answers, I wanted to up the question (I will not be doing that continuosly, this is the first and last time I do that).

$\endgroup$
1
  • 1
    $\begingroup$ A universal control like a neural network? If controlling an UAV is so easy, many other teams would have implemented such a reward based system in the past. $\endgroup$ Sep 2, 2021 at 18:40

1 Answer 1

1
$\begingroup$

Let me preface this by saying I've never done quadcopter controls before.

With a vehicle, the gas pedal doesn't control speed or position, it controls torque. For a quadcopter, the equivalent would be the horizontal forces. The roll/pitch angles would be an input to the horizontal force, but thrust is also an input and the relationship is nonlinear: $F_{horizontal} = Tsin(\theta)$.

If you want to have the joystick inputs map directly to the roll/pitch angles then I'm sure that's fine and you'll definitely get results, but I think a more elegant way to do it would be to have the joysticks map to the horizontal force and let your controller calculate the appropriate roll/pitch angles. In doing it this way your horizontal response becomes linear - double the joystick motion produces double the acceleration - and also becomes thrust-independent, in that you get the same planar performance while changing altitude as you do at constant altitude.

Mapping to velocity probably makes the most sense for altitude control.

$\endgroup$
1
  • 1
    $\begingroup$ That definitely sounds more efficient than what I did earlier. Will definitely try that, thank you! $\endgroup$
    – kucar
    Sep 3, 2021 at 8:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.