Helicopter Auto-Hover: Solve the Challenge in Minimal Time

  • Context: Comp Sci 
  • Thread starter Thread starter zazz0000
  • Start date Start date
  • Tags Tags
    Helicopter
Click For Summary
SUMMARY

The forum discussion focuses on developing AI instructions for a helicopter game to achieve auto-hover by simultaneously bringing velocity (V) and pitch angle (A) to zero in minimal time. The helicopter's acceleration is defined by thrust (t) and mass (m) as t * cos(A) / m, with pitch rate limits of dAMAX and ddAMAX. The conversation emphasizes the importance of understanding the relationship between pitch angle and velocity, and suggests creating a lookup table for pitch versus velocity to aid the AI in achieving the desired hover state.

PREREQUISITES
  • Understanding of helicopter dynamics and physics
  • Familiarity with thrust-to-weight ratio concepts
  • Knowledge of NVidia PhysX engine for realistic physics simulation
  • Basic principles of AI control systems in gaming
NEXT STEPS
  • Research how to implement thrust-to-weight ratio calculations in game physics
  • Explore the creation of lookup tables for AI decision-making in flight simulations
  • Learn about pitch control algorithms for helicopters in gaming environments
  • Investigate advanced physics modeling techniques using NVidia PhysX
USEFUL FOR

Game developers, AI programmers, and anyone involved in simulating realistic helicopter flight dynamics in video games.

zazz0000
Messages
10
Reaction score
2
Homework Statement
Auto-Hover instructions for the AI
Relevant Equations
Uncertain at this time
Hello again everybody.
Encountered another challenge with the helicopter game we've been writing.

For sake of simplicity, let's consider this to be a one-dimensional problem.
I have a helicopter traveling at speed V and an arbitrary pitch angle A.
The acceleration of the helicopter is defined thrust t and mass m as t * cos(A) / m.
The pitch rate has a max of dAMAX, and a maximum rate of change of ddAMAX.
Also there's simplified air drag R = ½v^2 * dragCoefficient, although that might be a needless complication for this problem.

The goal is to provide AI instructions to come to a hover in as little time as possible.
So basically achieve V=0 and A=0 simultaneously.

Made a little animation to show the approximate scenario:
Hover_1.gif
Any ideas would be appreciated.
Thanks in advance everybody.
 
Physics news on Phys.org
A game doesn't need to have all the physics right, it just needs to appear believable. Your image shown is good enough. The actual physics and any associated AI control system (or real modern control system of any sort) would be much, much more complicated than necessary.
 
Last edited:
@FactChecker Appreciate your response.
The slight issue is that the game already has all the physics mentioned above in place. I certainly already have some number "cheats" in the game, but I guess this is where I would like to draw the line.
While the biggest reason for me posting here is to find a solution, there is a secondary motive, and that is to engage brilliant minds in a problem they have not faced before.

A great example is this thread of mine from some time ago:
Solving for ballistic trajectory

As cool as it was to get a solution for what seems to be a somewhat unique problem, observing the collective brainstorm that happened around it was much more enjoyable.
 
I can imagine what kind of deep water such a question would get into in this forum. There are a lot of experts here. If possible, can you describe what kind of physical models and controls are used in video games? I can't imagine it is the same as would be used in the real design of modern control laws.
 
zazz0000 said:
Homework Statement:: Auto-Hover instructions for the AI
Relevant Equations:: Uncertain at this time

I have a helicopter traveling at speed V
V should have some relationship with pitch angle.
 
@256bits

The relationship of V to pitch angle (A) is the acceleration of the helicopter.
The acceleration of the helicopter is t * cos(A) / m, where t (thrust) and m (mass).
Both t and m are constant, so those can be disregarded, so we just have acceleration = cos(A)

Hope that makes sense,
Thanks
 
zazz0000 said:
@256bits

The relationship of V to pitch angle (A) is the acceleration of the helicopter.
The acceleration of the helicopter is t * cos(A) / m, where t (thrust) and m (mass).
Both t and m are constant, so those can be disregarded, so we just have acceleration = cos(A)

Hope that makes sense,
Thanks
I don't get it.
Constant acceleration means the velocity of the helicopter is continuously changing due to the constant thrust T at pitch angle A.
 
@256bits

Hope I can clarify the problem a bit.
First the goal, which is to achieve a state where dV, V, and A are simultaneously equal to 0 in as little time t as possible.

So I believe that can be expressed as 0tdV dt = initial 0tsin(A) dt = -Vinitial, at least if we disregard air drag R for now

hover_1.png


In order to achieve that, I believe we need to find Afinal, which is the greatest pitch angle made during the maneuver, occurring right before leveling the craft. If that angle is too high, the craft will drift backwards after levelling, too small and the craft drifts forward.

hover_2.png
@FactChecker
Other than a simplified drag system, the physics are actually fairly realistic. It relies on NVidia Physx, a popular and common engine. Could you specify what I could be missing in what is already given?
 
One issue is that helicopter in steady forward flight needs to be pitched down a bit to compensate for drag. Another issue is what is the thrust to weight ratio of the helicopter, which will limit the maximum angle that can be used for acceleration | deceleration. In the case of model aerobatic helicopters, the thrust to weight ratio is quite high, as seen in this video (skip to 18 seconds into the video):

 
  • Wow
  • Like
Likes   Reactions: 256bits and berkeman
  • #10
zazz0000 said:
Hope I can clarify the problem a bit.
First the goal, which is to achieve a state where dV, V, and A are simultaneously equal to 0 in as little time t as possible.
what you can do, is to make a table of results for the ai to look up the necessary pitch vs velocity. Assume that both forward and backward pitches act symmetrically on acceleration.

start from a hovering 0 velocity, do a pitch and record the velocity and acceleration for a period of time t.
work up to maximum pitch, recording results of v and t vs pitch to make the table.

then for deceleration,, the AI looks up from the table the necessary pitch characteristic to come to a hover.
 
  • Like
Likes   Reactions: Tom.G

Similar threads

Replies
5
Views
2K