6
$\begingroup$

Imagine a "drone" and a target point on a 2d plane. Assuming the target is stationary, there are eight parameters:

P = my position
Q = target's position
V = my velocity
I = my moment of inertia
w = my angular velocity
s = my angular position
T = max thrust
U = max torque

The drone's job is to get to the target as fast as possible, obeying max torque and max thrust. There are only two ways to apply the torque, since this is only in a 2d plane. Thrust is restricted to only go in one direction relative to the orientation of the craft, and cannot be aimed without rotating the drone. Neglect any resistance, you can just pretend it is floating around in 2d outer space. Let's say the drone checks an equation at time interval t (maybe something like every .01 seconds), plugs in the parameters, and adjusts its torque and thrust accordingly.

  • What should the equations for thrust and torque be?

What have we tried?

We know that the time it takes for the drone to reach the target in the x-direction has to be the same for the same time in the y-direction. There is going to have to be some integral over time in each dimension to account for the changing thrust based on total thrust, and total thrust in each direction given the changing angular position. I have no idea how to tie the torque and thrust together in a practical way where a function can just be called to give what thrust and torque should be applied over the interval t unless there is some other technique.

| improve this question | | | | |
$\endgroup$
  • $\begingroup$ There isn't much we can say here. Obviously there is not much to go on so the answers will not be very helpful. $\endgroup$ – Josh Vander Hook Apr 23 '13 at 21:33
  • 1
    $\begingroup$ One parameter is missing: mass. Unless your thrust is simply in terms of acceleration directly. In which case torque could be in terms of angular acceleration directly and then you wouldn't need moment of Inertia. $\endgroup$ – Octopus Apr 26 '13 at 5:03
  • 1
    $\begingroup$ Is the drone able to hover? The answer to this will depend on whether the vehicle is a holonomic or non-holonomic system. $\endgroup$ – Ian Apr 28 '13 at 19:12
4
$\begingroup$

You need to do a bit of Calculus.

First a note about your input parameters:

Actually acceleration depends on Force and mass. You don't specify what units your max. thrust is in so let's assume your max. thrust is your acceleration. We can do the same thing with your max. torque then and assume that it is also your acceleration (angular) and forget about moment of inertia. Actually you would divide torque by moment of inertia to get your angular acceleration,

So you can simplify by giving your drone two static properties:

 thrust as max acceleration
 and torque as max angular acceleration

instead of giving it four properties

Force and mass
and Torque and MoI.

And now crunch the numbers:

Now you have your drone's Position: Px, Py, S -- it's first derivative, velocity: Vx, Vy, W -- and it's second derivative, acceleration: Ax, Ay, U

Actually Ax, Ay will be calculated from S (angular position) and T (acceleration) by:

Ax = T ×  cos(S)
Ay = T × -sin(S)

That should get you a good way towards generating your formulas. Now you want to project a line from P that intersects Q in the least amount of time. Of course, it'll be a curve, not a straight line, so you'll have to use Calculus.

You could try asking the same question on math.stackexchange.com for specific formulas.

| improve this answer | | | | |
$\endgroup$
3
$\begingroup$

The solution is actually not quite linear. There are at least two cases: 1) The fastest solution does not require maximum turning at all times. 2) The fastest solution does require maximum turning at all times.

For an example of 1), consider the goal is straight ahead of the drone. For an example of 2), consider the goal is very close, but straight behind the drone; the fastest solution is a circle-like path.

Finally, the problem is somewhat under-specified, unless you also add desired velocity/spin at the time of arrival.

So, the problem, as stated (even with adding mass), requires solving discontinuous differential equations in an underspecified problem system. There may exist a closed form solution to this, but when I've had to do this (in simulation systems, not real-world systems) I've ended up using simple planners and PID-type beahviors, rather than finding the "optimal" solution.

For example, one simple planner could be to first apply torque in a closed form to turn to face the desired target point at spin zero (this is a simple quadratic equation) and then turn on max thrust; you will get to the point (at a pretty high velocity.) If you want to get to the point with velocity 0, then you have to reverse thrust at the middle of the trajectory.

| improve this answer | | | | |
$\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.