Jump to content

How to calculate DeltaV to get to orbit or to get from orbit to land


Recommended Posts

How much of http://link.springer.com/article/10.1007%2Fs12555-011-0618-0 (click "look inside") can you guys see if you're not coming from an academic domain? I was going to start from those dynamic equations on page 2, but do a simpler discretization than the pseudospectral stuff they used, and not impose some of the constraints they had that are unnecessary for crazy KSP landings. Start with equatorial for simplicity, so phi = alpha = v_phi = 0.

Can only see the first two pages. I found this paper: http://trs-new.jpl.nasa.gov/dspace/bitstream/2014/41890/1/11-0208.pdf which seems to suggest that the optimal descent has a constant vertical velocity and a linear ramp for horizontal velocity.

This one (I don't know where it's from)

shows constant thrust but varying pitch.

And here's a 2D version of the paper you linked (by the same author) http://ijass.org/On_line/admin/files/(288-295)10-013.pdf which suggests linearly varying the pitch relative to retrograde during the powered descent, while increasing the throttle during the same.

Link to comment
Share on other sites

The JPL paper is treating gravitational acceleration as constant, which is probably accurate enough for the real moon with its radius of 1737 km. But in KSP, the bodies are small enough that we should really consider variation of gravity with altitude, and curvature of the surface.

I'm pretty sure both of the Park and Tahk papers have typos in the dynamic equations, though the 2D paper's typo is worse. In equation (3) of the 2D paper, that last term r v_theta omega doesn't make much sense. Compare to equation (4) of the 3D paper, I think the r omega^2 cos phi term should be r omega^2 cos^2 phi, but at least that gives the same result for equatorial phi = 0. And later in the paper on page 5 in section 4.4, it is written as cos^2.

I'm less concerned with the results from the literature, since most papers I found were applying constraints for visibility or safety or landing-site selection reasons that are less important in KSP. I just want a reliable source to cite for the dynamics, preferably in polar coordinates. It's easy enough to just work from http://en.wikipedia.org/wiki/Polar_coordinate_system#Vector_calculus, on the other hand.

Edited by tavert
Link to comment
Share on other sites

Let's do the calculus then. Simple-ish, nonlinear so we'll need to pick some example cases and integrate numerically. Perhaps a new thread on numerical trajectory optimization is in order?

It's pretty straight forward. You have a craft traveling at velocity u and you use dv of your delta-V reserve to try and slow down. The total change in velocity is du = dv + g dt. However, what you are interested in is optimizing d||u||. If you break it down to components and take appropriate limits, you get maximum d||u|| when dv runs along -u.

But yeah, I can do numerical integration of these trajectories. I've been doing a lot of these for trying to optimize ascent with air resistance. In vacuum, it's almost trivial. I'll do a full write-up.

Link to comment
Share on other sites

Yes, of course applying a given delta-V results in the largest instantaneous change in speed if applied in the prograde or retrograde direction. That's not the same question as minimizing total delta-V over any trajectory starting in a low circular orbit and ending stationary on the ground, subject to gravity changing as a function of position, and most importantly, a maximum thrust magnitude. The impulsive problem has a substantially different solution than the finite-thrust problem.

As an example, take a craft with initial mass 2.5 tons, using an ant engine, orbiting Minmus. I need to fix my simple spreadsheet to account for the rotation of the surface, so for the purposes of the following numbers just pretend there's no rotation. If you start in a circular orbit at 6451 meters and burn retrograde, after about 436.5 seconds you will come to a stop at roughly zero altitude, zero horizontal and vertical speed, with remaining mass 2.27 tons. Delta-V expended = 290*9.81*ln(2.5/2.27) = 275 m/s.

If you instead do a Hohmann transfer from 6451 meters to a circular orbit at 0 meters, that takes about 9 m/s, reducing mass from 2.5 tons to 2.5/exp(9/(290*9.81)) = 2.49 tons. If you then burn to maintain constant altitude of zero, you'll reach zero horizontal speed after about 345 seconds with remaining mass 2.31 tons. Delta-V expended = 290*9.81*ln(2.5/2.31) = 225 m/s.

Edited by tavert
Link to comment
Share on other sites

I did a rough and ready spreadsheet calc for the scenario I described. (I did not assume constant gravity tavert. Didn't make a huge difference.)

For the retrograde burn, turns out you need a TWR of 7.943 to land successfully at constant thrust, which results in a total delta-V of 585.2 m/s.

TODO: Add constant altitude results and link the spreadsheet.

EDIT: Edited the results to account for non-constant gravity.

Edited by Mr Shifty
Link to comment
Share on other sites

I did a rough and ready spreadsheet calc for the scenario I described.

For the retrograde burn, turns out you need a TWR of 7.971 to land successfully, which results in a total delta-V of 585.3 m/s.

TODO: Add constant altitude results and link the spreadsheet.

Methinks waiting to start the landing burn until 1 km altitude is a bit restrictive. You only need to have TWR > 1 at touchdown for landing to be feasible, as long as you give it enough time/distance to do so.

Link to comment
Share on other sites

Methinks waiting to start the landing burn until 1 km altitude is a bit restrictive. You only need to have TWR > 1 at touchdown for landing to be feasible, as long as you give it enough time/distance to do so.

Right. And in a real landing, you'd change thrust when you start accelerating upward. But yeah, if you wait until 1km to start your landing burn with a low TWR, you're toast. I'm learning a bunch just by running the sheet. Should be able to modify it to start from higher altitude. Better yet, I'll write some code to do the work for me.

Edited by Mr Shifty
Link to comment
Share on other sites

Over 1 km for your case on the Mun relative to its radius of 200 km, gravity doesn't change much. Over 6 km relative to Minmus' radius of 60 km though, bit more of a difference. Don't forget the Coriolis term if you're using polar coordinates - your horizontal speed increases as you fall, at least until your thrusting brings horizontal speed down to zero.

Edited by tavert
Link to comment
Share on other sites

Presumably there's a tradeoff between landing engine size and deltaV lost due to lower TWR. A big engine will do a last-second stop beautifully but will take a lot of fuel to pull it off because the engine itself is more massive. Personally I find the limit being in controllability during landing with respect to throttle sensitivity. 10:1 TWR is great to stop be terrible for a gentle touchdown. My fingers are only so precise.

This is seat of the pants but for most landings I wouldn't budget more than 10% of the vehicle mass as engine or 5:1 TWR, whichever yields the lesser engine.

Link to comment
Share on other sites

Presumably there's a tradeoff between landing engine size and deltaV lost due to lower TWR. A big engine will do a last-second stop beautifully but will take a lot of fuel to pull it off because the engine itself is more massive. Personally I find the limit being in controllability during landing with respect to throttle sensitivity. 10:1 TWR is great to stop be terrible for a gentle touchdown. My fingers are only so precise.

This is seat of the pants but for most landings I wouldn't budget more than 10% of the vehicle mass as engine or 5:1 TWR, whichever yields the lesser engine.

Yep. Thrust isn't free, engine mass is important. Even TWR of 5 is on the high side. Higher TWR means it takes less delta-V to land, but that's about it. When you consider payload mass as a fraction of lander mass, there's an optimal TWR (depends which engine you use) and it's a lot lower than you think.

Here's the thread from last month I was referring to, where Nao convinced me that retrograde is wrong: http://forum.kerbalspaceprogram.com/showthread.php/34354-Land-on-Tylo-with-low-Thrust-to-Weight-Ratio/page2

He also has a great plot there comparing payload fraction vs TWR for different lander engines.

Edited by tavert
Link to comment
Share on other sites

Yes, of course applying a given delta-V results in the largest instantaneous change in speed if applied in the prograde or retrograde direction. That's not the same question as minimizing total delta-V over any trajectory starting in a low circular orbit and ending stationary on the ground, subject to gravity changing as a function of position, and most importantly, a maximum thrust magnitude. The impulsive problem has a substantially different solution than the finite-thrust problem.

Actually, it is the same thing. Gravity variations are going to be minimal. A burn that optimizes local d||u|| will therefore also minimize time spent under influence of gravity, and that's the only way you inflate required delta-V. In other words, if you minimize time required for braking and find locally optimal d||u||/dv, you have an optimal solution. It's all nicely monotonous, so there is just no room for it to be anything else.

Edit: Turns out I'm wrong. At low TWR, maintaining 0 vertical velocity does reduce fuel requirement by a few percent. I'll upload the computations in a bit. Now I just need to figure out why it works out that way. Could be the fact that this allows for lowest periapsis. This would be consistent with the fact that increasing TWR seems to reduce the advantage almost to nothing. Naturally, with higher TWR, suicide burn can be initiated at a lower altitude.

Edited by K^2
Link to comment
Share on other sites

I'm sure the mathematical optimum is low but my skills enjoy a little margin for error.

My current M.O. is to come down at a safe minimum altitude and burn a variable angle profile to maintain constant height to a point in space (PiS) above the landing site and then transition to a hover landing. I budget about 60 seconds * local gravity in deltaV for the landing. I'm sure it's not perfect but it's modular, safe, and reliable. The hardest part is ending the horizontal burn over the desired touchdown point. On the Mun I never have to go vert more than 20 degrees so the steering loss can't be that bad.

Link to comment
Share on other sites

Actually, it is the same thing. Gravity variations are going to be minimal. A burn that optimizes local d||u|| will therefore also minimize time spent under influence of gravity, and that's the only way you inflate required delta-V. In other words, if you minimize time required for braking and find locally optimal d||u||/dv, you have an optimal solution. It's all nicely monotonous, so there is just no room for it to be anything else.

Edit: Turns out I'm wrong. At low TWR, maintaining 0 vertical velocity does reduce fuel requirement by a few percent. I'll upload the computations in a bit. Now I just need to figure out why it works out that way. Could be the fact that this allows for lowest periapsis. This would be consistent with the fact that increasing TWR seems to reduce the advantage almost to nothing. Naturally, with higher TWR, suicide burn can be initiated at a lower altitude.

About 20%, for my somewhat extreme example of an LV-1 powered 2.5 ton lander on a hypothetical non-rotating Minmus. I'm doing in-game tests and the rotation obviously reduces the delta-V requirement a bit. The constant-altitude trajectory is much harder to fly, so I haven't been able to quite match my 50 m/s improvement prediction. It's more noticeable somewhere big like Tylo, or Vall or Moho, but getting a controlled landing altitude is trickier when you don't have the big lakebeds to shoot for. Looks like there's a crater on Tylo's equator that's pretty flat, could maybe do the trick.

It's counterintuitive, definitely. The burn time is shorter for the constant-altitude landing, since you aren't letting gravity speed you up at all. The speed you gain from gravity during a low-TWR retrograde braking burn ends up larger than the off-axis delta-V you need to apply to counter gravity and maintain constant altitude.

Pandora's box opened...walking away now...thanks for answering my original question K^2! I like math as much as the next person but this is a little bit next level for me. :D

Sorry for thread-jacking!

Edited by tavert
Link to comment
Share on other sites

The constant-altitude trajectory is much harder to fly, so I haven't been able to quite match my 50 m/s improvement prediction.

Practicality is a consideration. Doing the retrograde burn requires knowing exactly when to start the burn, or you'll either overshoot and blast back off into space or undershoot and see how much surface area your vessel can occupy. I did a landing on Moho yesterday twice: once with a long retrograde burn (I had to vary the thrust) that turned out pretty well, but drained my fuel quite a bit. The second try was two impulse burns (the vehicle was fairly high TWR): once to kill horizontal velocity at about 5 km altitude, then another to kill vertical velocity at about 800 meters. Then I used low thrust adjustments to keep vertical speed to 10-20 m/s until just before touchdown. Used about 50% less fuel than the first method. I suspect the impulse method should be less efficient, but it's easier to implement more efficiently. So practically, for most pilots, it's going to be more efficient.

Link to comment
Share on other sites

It's counterintuitive, definitely. The burn time is shorter for the constant-altitude landing, since you aren't letting gravity speed you up at all.

I know my intuition on the matter has been compromised, but I don't think it's that simple. Yes, you don't let gravity speed you up, but you are burning at an angle as well. In fact, early on you have to burn towards the ground. So you have to assist gravity in keeping you at zero vertical velocity.

I would test one more procedure. Instead of starting the burn at the periapsis and maintaining constant altitude, how about starting the burn before periapsis in such a way that you always stay on the same elliptical trajectory and come to halt exactly at the periapsis. Now you are always burning angled down, preventing gravity from altering your trajectory, but your altitude and vertical velocity are changing.

If the main reason why constant altitude woks has to do with not allowing gravity to speed you up, this should work even better, since you never burn towards the ground. If the reason constant altitude works well is because all of the burn is done at minimal altitude, then this new approach should perform worse.

Link to comment
Share on other sites

Anything towards the ground would be brief and not by much - only while you're moving faster than circular orbital speed for the current altitude. A few m/s (in the retrograde direction - times 1 minus the cosine of a small angle for the off-axis component) if your parking orbit is already low. That's dwarfed by what happens for the longer period of time you're moving slower than orbital speed. And practically speaking, you can get most of the benefit of a "constant-altitude" trajectory by allowing a very small but controlled vertical descent.

I'm not sure I see why what you're proposing would help. You're suggesting coming on along the same trajectory as the parking-to-0 transfer orbit, but at slower speeds in order to land?

If you're moving slower than orbital speed, gravity is greater than centripetal acceleration and you need to apply vertical thrust or you'll accelerate radially downward. Decreasing altitude and nonzero horizontal speed results in a nonzero Coriolis acceleration that increases horizontal speed. Calling this "gravity speeding you up" is a bit simplistic, doesn't fully capture the indirect effect that is going on.

Edited by tavert
Link to comment
Share on other sites

Well, the constant-altitude approach is effectively flying a circular-orbit-only-slower. So I don't really see the difference in that regard. And I only have to consider Coriolis acceleration in the rotating frame.

And yes, for the landing I was looking at, the burn towards the ground is only 2s out of 40, but still, if you are right about why it works, coming down along elliptic instead of circular should still improve on that, even if by very small amount.

Link to comment
Share on other sites

The difference between circular-orbit-only-slower and elliptical-orbit-only-slower is the former has zero vertical speed, the latter has nonzero vertical speed. Again, I should be clearer about my terminology. I don't mean the rotating-frame Coriolis effect due to the surface rotation. I mean the "Coriolis-like" rdot*phidot term in the angular acceleration in polar coordinates: http://en.wikipedia.org/wiki/Polar_coordinate_system#Vector_calculus. Even if you use Cartesian coordinates, the results are equivalent.

Link to comment
Share on other sites

Yes, but the r-dot phi-dot term is just coordinate acceleration. It's not true acceleration. The fact that it goes away in Cartesian coordinates is the simple test for that. More importantly, it will never alter the speed of the craft. So I don't have to worry about it with the landing.

But at any rate, the best way to resolve this is just to run the test. I just need to finish programming the thrust function to make sure it maintains proper orbit. (For constant altitude I did use polar coordinates to simply counter the effective weight of gravitational + centrifugal acceleration, but I really don't want to mess with all of the relevant terms for elliptic orbit. I'll just do constrained motion with undetermined multiplier.)

Edit: Oh, and yes, I kind of forgot about moon's rotation, so I'm also doing a non-rotating case. For the Mun, though, I doubt 9m/s of sidereal velocity will make that much difference.

Link to comment
Share on other sites

It doesn't "go away" in Cartesian coordinates, it just expresses itself less intuitively. It's part of the transformation between Cartesian and polar, to get matching dynamics between the two coordinate systems. It does alter the speed of the craft - speed at periapsis is greater than speed at apoapsis in free orbit. In Cartesian coordinates it's messier than an rdot*phidot term (or immediate from conservation of angular momentum, but that's not a Cartesian expression either), but you still get the same behavior: as you fall, you speed up.

Edited by tavert
Link to comment
Share on other sites

as you fall, you speed up.

This must be because of planetary curvature. If the surface of the planet was flat, you couldn't speed up horizontally by accelerating vertically. It's because your horizontal vector in 60 seconds will be pointing slightly vertical compared to now.

Link to comment
Share on other sites

There is an actual force acting on the craft. It has nothing to do with the r'Æ' term in the equation. Consider a particle moving in a straight line in polar coordinates. The straight line x=r0 is r(Æ) = r0 sec(Æ). For a particle moving at constant velocity, Æ(t) = arctan(vt/r0). Therefore, we get r(t) = (r0² + t²v²)1/2.

Acceleration in polar coordinates is given by a = (r'' - r Æ'², Æ'' + 2 r' Æ' / r). Substituting the above r(t) and Æ(t), you get a = (0, 0). The r'Æ' term is still there, but it cancels perfectly with the Æ'' term. This is the difference between proper acceleration and coordinate acceleration, as this article discusses.

Link to comment
Share on other sites

Sure. It is the actual net force of thrust and gravity (varying in direction and magnitude as a function of position) that changes the speed of the craft. Makes more sense to me in polar, but it's true in Cartesian as well.

If you had a flat surface and vertical gravity, then yes only horizontal thrust can change horizontal speed. But we have neither of those.

Anyway, please go ahead and try the elliptical trajectory. I expect it to be in between the pure-retrograde and constant-altitude results, but I don't think your supposed conclusion from that result (if it turns out to be the case) about "preventing gravity from altering your trajectory" is a good interpretation, as the net effect of gravity on the magnitude of velocity depends on both position and velocity. At circular orbit velocity, gravity just changes the direction. At any other velocity, gravity changes both the direction and the magnitude.

It does probably make sense to start a small initial portion of the burn before hitting periapsis, such that you reach circular orbit speed as you hit periapsis then maintain constant altitude from there. I don't see why you'd want to start the burn even earlier such that you land when you first reach periapsis.

Edited by tavert
Link to comment
Share on other sites

Yes, I also expect it to be in between. And maybe you're right. Maybe it is all about keeping gravity perpendicular to the velocity vector.

As far as starting the burn a bit before periapsis, it might make sense to go from transfer orbit to a circular with a pure retrograde burn, and then switch to constant altitude. One more thing to try, I guess. But damn, these thrust equations are starting to get complicated.

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...