4
$\begingroup$

I am new to robotics, and currently trying to develop a purely numerical simulation of a quadcopter. As I understand, the problem of quadcopter control includes take-off control, hover stabilization and landing. However, I am only working with navigation control right now, foregoing take-off and landing. I am imagining a scenario wherein the quadcopter is already off the ground at a certain height (is that called hovering?) and it has to follow a trajectory in the presence of simulated noise (which I intend to introduce through random deviations in the angular orientations of the quadcopter) . The trajectory is nothing but a finely discretized curve in XYZ space (with a constant Z for now).

I am trying to build on this tutorial. It's a highly simplified model, just taking into account the thrust, external torques and frictional forces on the quadcopter. I have two questions here: 1. Is my setup even feasible just to demonstrate a proof of concept fuzzy control? 2. In this setup, and according to the initial condition mentioned above, I understand that if the quadcopter already has to be at a certain height h, then the net thrust in Z direction should balance the gravitational force. However, that would be the case at any height above the ground. But to get it to height h, how do I calculate the angular velocities in body frame that are required to keep it at that height? I am asking this because by means of affecting these velocities I'll be able to add some noise to the system and then work my way from there.

The platform for this numerical simulation is to be Matlab, if that information adds anything. I am planning to use only Matlab scripts for now, and not Simulink. As for my knowledge of dynamic systems, I understand basics of linear and rotational kinematics. I have only worked with implementing text book algorithms in a standard computer science course, and that's as far as my programming experience goes.

$\endgroup$
  • $\begingroup$ Can you clarify the following questions [they will guide answer posters towards a correct approach and will eliminate unnecessary basic stuff]. 1) your knowledge on dynamic systems (Newton's laws) 2) your level of experience in programming / solving differential equations 3) will you use simulink or only matlab scripts? $\endgroup$ – Gürkan Çetin Oct 17 '17 at 19:01
  • $\begingroup$ "to get it to height h, how do I calculate the angular velocities in body frame that are required to keep it at that height?" You need a trim state (a set of states where derivatives are zero). And so you don't need angular velocities but angles themselves (roll and pitch and yaw). Finding trim state is kind of an optimization problem with several parameters. (Which is the core of the question Actually) $\endgroup$ – Gürkan Çetin Oct 17 '17 at 19:20
  • $\begingroup$ @GürkanÇetin made the necessary edits, thanks! $\endgroup$ – alannaC Oct 18 '17 at 7:32
1
$\begingroup$

Here's a quick answer. We can work on it to improve.

What you are searching for is the "trim state" of the vehicle for a given height and velocity (or hover). Methodologies for finding trim state is given in textbooks as "trim theory".

There are a few very general trim search methods:

1) solving an optimization problem: iteratively trying several values for states (attitudes, linear velocities, control positions, etc) Matlab has some built in functions for non linear optimization. Namely, fminsearch, fmincon, fsolve, etc. of course, you could write your own optimization script as well. Not too difficult, and definitely worth the effort.

2) using a gentle autopilot to converge on the desired flight conditions (requires a working flight controller, at least a SAS and an attitude hold mode)

Answers to particular questions:

  1. Is this a feasible approach? Yes. Although a bit simplified, the method results in a representative vehicle that control algorithms can be developed on. However if the research is only about the controller side, a functional, working, linearizable plant would be a better option. Consumes less energy for making it work, and leaves more energy for designing a controller.

  2. How to get to a particular height? You simply start your simulation at that height, and see what happens. For quadrotors, the RPM would need to be increased as air density decreases with altitude.

I couldn't understand why you'd need angular velocities in body frame, to catch an altitude. You need to have zero angular velocities during a trimmed flight condition. (Unless it's a trim of a maneuver like coordinated turn, or a wind up turn).

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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