Excel projectile trajectory

Click For Summary
SUMMARY

This discussion focuses on calculating the launch angle of a projectile in Excel based on a desired maximum height. The user initially attempted to derive a new angle using basic formulas but encountered issues due to the non-linear nature of drag. Recommendations include using Excel's Solver for optimization, specifically minimizing the squared difference between the maximum Y position and the target maximum height. Additionally, Goal Seek is suggested as a viable alternative for this single-parameter problem.

PREREQUISITES
  • Understanding of projectile motion and kinematics
  • Familiarity with Excel formulas and functions
  • Knowledge of Excel Solver for optimization tasks
  • Basic concepts of drag force in physics
NEXT STEPS
  • Learn how to implement Excel Solver for optimization problems
  • Explore the use of Goal Seek in Excel for single-variable scenarios
  • Study the principles of drag force and its impact on projectile motion
  • Investigate advanced data analysis techniques in Excel, including What-If Analysis
USEFUL FOR

Students, engineers, and data analysts interested in modeling projectile motion and optimizing parameters using Excel.

swemek
Messages
1
Reaction score
1
Hello!

I'm doing some research for a small project that I hope you can help me with. I'm not a math genius, I just have an idea.

I have an Excel document of a projectile trajectory with an angle of 8 degrees. (Can be any angle.) Blue projectile trajectory.

What I want to do is enter the maximum height (green dashed line) and get a new angle. Red projectile trajectory. Calculated on a different tab.
I only tried my way up to the angle of 6.68 degrees.

Formulas used in Excel:
X-pos =B3+D3*t
Y-pos =C3+E3*t
X-Velocity =V0*COS(LA) =D3+H3*t
Y-Velocity =V0*SIN(LA) =E3+I3*t
X-Drag =-1/2*Dc*A*p*D3^2
Y-Drag =-1/2*Dc*A*p*E3^2
X-Accel =F3/m
Y-Accel =(G3+m*g)/m
Picture.png

Is this doable?

Hope you can help me.:smile:
Thanks in advance /M
 

Attachments

  • 1716906755571.png
    1716906755571.png
    3.7 KB · Views: 80
  • 1716906889746.png
    1716906889746.png
    1.1 KB · Views: 75
  • Like
Likes   Reactions: berkeman
Physics news on Phys.org
swemek said:
X-Drag =-1/2*Dc*A*p*D3^2
Y-Drag =-1/2*Dc*A*p*E3^2
This won't work. Since drag is non-linear, you cannot split its calculation into X & Y components like that. You have to compute the total XY-speed, use that for total XY-drag, and split that in X & Y drag components.

As for your main question. You probably need something like this:
https://www.tutorialspoint.com/exce...a_analysis_optimization_with_excel_solver.htm
Decision Variable Cell : launch angle
Objective Cell (to be minimized) : (MAX(Y_POS) - TARGET_MAX_Y_POS)^2
 
Last edited:
  • Like
Likes   Reactions: Vanadium 50, pbuk and berkeman
A.T. said:
Objective Cell (to be minimized) : (MAX(Y_POS) - TARGET_MAX_Y_POS)^2
Is your recommendation of this rather than simply MAX(Y_POS) - TARGET_MAX_Y_POS based on experience?
 
pbuk said:
Is your recommendation of this rather than simply MAX(Y_POS) - TARGET_MAX_Y_POS based on experience?
If you minimise the difference I would expect the optimizer to aim for max(y_pos) tending to negative infinity, since that minimises the value. If you minimise the squared difference the optimiser should aim for equality.
 
  • Like
Likes   Reactions: A.T.
pbuk said:
Is your recommendation of this rather than simply MAX(Y_POS) - TARGET_MAX_Y_POS based on experience?
This won't work for the reason stated by @Ibix. One could try ABS(MAX(Y_POS) - TARGET_MAX_Y_POS), but squaring the difference is usually more numerically stable, because of the smooth 1st derivative.
 
  • Like
Likes   Reactions: Ibix
A.T. said:
This won't work for the reason stated by @Ibix. One could try ABS(MAX(Y_POS) - TARGET_MAX_Y_POS), but squaring the difference is usually more numerically stable, because of the smooth 1st derivative.
Ah sorry, I should have been clearer.

In solving similar problems I have always solved for a difference of zero by using Data -> What-If Analysis -> Goal Seek.

I do this because I have always done it this way and I wondered if you had experience that showed any option within the Analysis Tool Pack was faster/more stable/more accurate precise.

In any case for the problem in the OP, using Goal Seek would be perfectly adequate.
 

Similar threads

  • · Replies 2 ·
Replies
2
Views
1K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 36 ·
2
Replies
36
Views
22K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 8 ·
Replies
8
Views
6K
Replies
5
Views
5K
Replies
21
Views
3K
Replies
3
Views
2K
  • · Replies 1 ·
Replies
1
Views
6K
  • · Replies 3 ·
Replies
3
Views
2K