Jump to content

Best ascent path for mechjeb


Coupon

Recommended Posts

In mechjeb ascent guidance, the default ascent path settings are:

Turn start altitude: 5 km

Turn end altitude: 70 km

Final flight path angle: 0 degrees

Turn shape: 40%

Could these be changed to make the launch more efficient? I heard that mechjeb ascent guidance isn't the most efficient, I use it anyway because I'm lazy. But what settings should be used for an 80 km orbit?

Edited by Coupon
Link to comment
Share on other sites

If your rocket can go fast (light), point horizontally (early turn start).

If your rocket goes slowly (drag), point vertically (late turn start). The faster you get out of the atmosphere - the better.

Link to comment
Share on other sites

I'd like to know other people's opinions about this as well.

Coupon, I personally use this profile:

Turn start 10 km, turn end 70 km, turn shape 35%, max acceleration 35 m/s2.

Back in the days, after quite a lot of testing, the results showed a slightly better efficiency with a 35% shape instead of 40%.

Link to comment
Share on other sites

  • 3 weeks later...

I don't use mechjeb anymore, as i usually get better results flying by hand, but during some engine comparison testing i stumbled upon quite nice profile.

6km turn start - Flying with hand i sometimes i do it even earlier. Starting grav turn early isn't bad if you rotate slowly. The trick is to not fly with less than 60deg attitude before reaching 300m/s

50km turn end - This is important part, as it makes MJ use the Oberth effect well, it can sometimes point the ship slightly downward which is good also. The idea is to accelerate as much as possible while still around 50km altitude.

0deg andgle

50% profile

80km final orbit

I think it's important to note what general TWR's are best used for a MJ ascent plan, as the best ascent path varies from rocket to rocket. I used 3 stage launcher with quite standard not to big TWR:

Stage 1 (lanuch) 1,9 TWR

Stage 2 at 6-7km (gravity turn) 1,65 TWR

Stage 3 at around 800m/s 1,2 TWR

Launched to 80km orbit, using around 4330m/s Dv with payload mass being 17% of launch mass (quite good).

Results from using this profile may vary depending on rocket design, but the general idea is to start gravity turn at around 180m/s, be at 60deg attitude when flying 300m/s, then at 45deg - 500m/s and at 30deg having Ap above 50km. From there attitude should drop to 0 before 50km.

Link to comment
Share on other sites

Several months ago, I collected some data to determine this scientifically. This chart is old, but the drag model hasn't changed since then, so it should still be accurate. Basically, I launched the same rocket over and over again, with slightly different settings in the MechJeb Turn Shape dialog.

GravityTurns.JPG

The result of the study is (for that particular rocket, TWR = 2.0) the ideal turn start is around 6-10 km, with a shallow-ish trajectory. Steep trajectories were quickly fatal, but it's possible to go too shallow. Maybe someday I'll do another study with different altitudes, per Nao's suggestion.

Another thing I learned in this study goes contrary to what most people think:

• if your rocket is slow (TWR < 2.0) climb shallow to reduce gravity drag;

• if your rocket is fast (TWR > 2.0) climb steep to reduce atmospheric drag;

• so basically adjust turn shape to keep speed at terminal velocity and full power.

Of course, this doesn't account for space planes. That's a completely different can of worms!

Edited by Zephram Kerman
Link to comment
Share on other sites

Personally I find Turn End Altitude to be the most important variable impacting ascent efficiency. Depends on your TWR obviously, but for many of my designs the Oberth-vs-drag tradeoff favors getting a high periapsis before raising apoapsis to the target altitude.

Link to comment
Share on other sites

Personally I find Turn End Altitude to be the most important variable impacting ascent efficiency. Depends on your TWR obviously, but for many of my designs the Oberth-vs-drag tradeoff favors getting a high periapsis before raising apoapsis to the target altitude.
Yes, that's definitely a big deal. Any target altitude above 70 km should be reached by first circularizing, then losing weight, then Hohman transfer.
Link to comment
Share on other sites

Personally I find Turn End Altitude to be the most important variable impacting ascent efficiency. Depends on your TWR obviously, but for many of my designs the Oberth-vs-drag tradeoff favors getting a high periapsis before raising apoapsis to the target altitude.

Agree 100%.

Interesting byproduct of this is the fact that if we use turn end altitude that is in the atmosphere, getting to 100km orbit takes roughly the same Dv as getting to 70km.

If we use the same turn end altitude inside atmosphere the 70x70 orbit flight will ascent much slower from it's turn end altitude and end up getting a lot more drag losses.

So the higher the target orbit altitude is the more of the Oberth effect we can use (by lowering the turn end) and thus the net Dv does not change much.

Personally I've found that 40-50 km is best for turn end on standard rockets.

Also its kind of funny that with ferram aerospace mod, the best launch profile (lowest fuel consumption and launch mass) i got is by finishing burn at only 22-27km with turn start almost at launchpad and having TWR of 3-4.

edit:

Yes, that's definitely a big deal. Any target altitude above 70 km should be reached by first circularizing, then losing weight, then Hohman transfer.

I would say the opposite, any target orbit above 70km is best done inside the atmosphere (at around 40-50km) so that we get an orbit for example 100km x 10km while still at an 50km altitude, so that circularization at Ap will take only ~50-70m/s Dv

Edited by Nao
Link to comment
Share on other sites

Also its kind of funny that with ferram aerospace mod, the best launch profile (lowest fuel consumption and launch mass) i got is by finishing burn at only 22-27km with turn start almost at launchpad and having TWR of 3-4.

Yikes, I'm glad you tested that. I haven't played much with FAR since I'm concerned about how it will change rocket flight. Looks like that strays a bit too far from reasonable, here's hoping Squad checks this balancing carefully when they improve stock aero instead of just adopting all of FAR.

Link to comment
Share on other sites

Yikes, I'm glad you tested that. I haven't played much with FAR since I'm concerned about how it will change rocket flight. Looks like that strays a bit too far from reasonable, here's hoping Squad checks this balancing carefully when they improve stock aero instead of just adopting all of FAR.

FAR feels quite nicely, more realistic, when flying standard rockets but if you have a good setup for frontal area, then you can achieve orbit using only ~3100-3200m/s Dv on pretty powerful engines, and Mainsail happens to be almost always the best option, with LV-T30 coming close second.

I think with the density of the air drops too quickly with FAR, if the atmosphere spanned to 120-150km with little stronger drag effects at sea level it would end up being great.

Also more updates on Mechjeb to orbit stock front.

Using stock Kerbal X i've run a series of 50 tests. Each launch was up to 100x100 orbit, every test was ran without terminal velocity limit as Kerbal X is nicely designed around that already. (I'm showing the more interesting ones only to save space).



T start T End Angle shape acc lim Dv fuel left in capsule
5 40 0 75 4399 637 - my personal go to model for most rockets
6 40 0 75 23 4379 644 - giving acceleration limit on my "go to" profile resulted in -20m/s Dv, (the KerbX has more thrust than my standard rockets)
3 35 0 100 4403 635 - most efficient i found for 100% shape, also includes turn start alt of 3km
6 40 -5 75 4400 636 - best one including negative angle, (small sample)
7 45 0 50 23 4397 637 - smallest Dv found for 50% shape, (small sample)
8 35 5 66,6 23 4376 645 - smallest turn end (efficiency dropped hard below 35km)

8 37 5 66,6 22 4375 645 - best profiles found.
7 40 3 66,6 23 4375 645

I feel like 66,6 - 75% shape is the sweet spot for many setups.

The limit on acceleration for the Kerbal X was pretty big deal, as the mainsail was giving 5+ g's at burnout. Having shallower, slower ascent seemed to get the most out of Oberth effect. Positive turn end angle helped in keeping nose pointed as close to the velocity vector as possible. (Negative turn end angles can be good for ships that have less TWR in mid to late ascent - happens often with LV-N engines).

I've included amount's of fuel left in capsule for comparison if somebody wants to try this without any mods with stock Kerbal X.

If somebody has a profile that goes well below 4375m/s Dv to 100x100 orbit with KerbX please post the profile :), as my test's had quite a lot of bias from my standard hand flown profiles.

Cheers!

Link to comment
Share on other sites

Was corrective steering on or off for those runs? That can make a fair amount of difference too.

It was off for every launch. I don't fully understand how it works but i tested one launch with it and it took 32m/s more Dv with it to achieve orbit for the best profile and 25m/s more for "go to" one (without acceleration limit).

I did some more runs trying to improve performance with CS on but the best i got was only... (edit): 4393 Dv with 5/45/7/66,6/23 setup.

I see now that the CS really likes to clinch to the turn end altitude (and probably whole launch path) so when its low it wastes some fuel going excessively downwards. (can be counteracted with path angle as there is good old hardcoded -10deg as maximum downward attitude, with +7 from shape like in above example it maxes out on -3deg). I remember such problems with early mechjeb :).

It would probably work well with high Turn Ends but that wastes Oberth effect, so for me launching without CS is the way to go.

Edited by Nao
Link to comment
Share on other sites

With CS off, your spacecraft points according to the turn profile.

With CS on, mechjeb points so as to make your spacecraft trajectory follow the turn profile. With high TWR, that means you'll be pointing at the ground; with low TWR, you'll be pointing into the sky.

Link to comment
Share on other sites

What numerobis said.

Corrective steering tends to increase steering losses, but can increase the probability of successfully reaching orbit for more sets of turn parameters if your TWR is unusually low. And it makes the ascent trajectory a bit more similar for the same set of turn parameters between craft with very different TWR. It's also useful for jet-powered craft, pitching a bit below the horizon when you're at higher altitude than the turn end.

Link to comment
Share on other sites

  • 1 month later...

The result of the study is (for that particular rocket, TWR = 2.0) the ideal turn start is around 6-10 km, with a shallow-ish trajectory. Steep trajectories were quickly fatal, but it's possible to go too shallow. Maybe someday I'll do another study with different altitudes, per Nao's suggestion.

Another thing I learned in this study goes contrary to what most people think:

• if your rocket is slow (TWR < 2.0) climb shallow to reduce gravity drag;

• if your rocket is fast (TWR > 2.0) climb steep to reduce atmospheric drag;

• so basically adjust turn shape to keep speed at terminal velocity and full power.

Of course, this doesn't account for space planes. That's a completely different can of worms!

Man,

Excelent explanation! Me and my friend was almost figthing because I ALWAYS say (and swearing) for him that all of my big rockets (beetwen 600 till 1200tons) it must a very shallow, (almost completly vertical till 45, 50k), I agreed with your conclusion at the end, oh god know how much!! :))))

I would like to thank you very much! As I understand my litfs and travel till orbits are not just a "waste of efficiency"!! But, correct me if I am wrong: Vertical climb makes reduce of atmospheric drag fastest as possible, or not?! Because if a ultra-hiper-mega-rocket have 10m/s directly for up, the same rocket with the same speed, IN A VERY HORIZONTLY CLIMB OF 10º (in relation to surface) would need "LUDICROUS MORE time, AND FUEL of course. But in majority of my missions and plans, I am using my Hercules MK XRTX or the biggest, Colossus Tiamat Ultra (872ton!) so Always, and ever, and ever when I try (even a micro inclination of 10º) a inclination, that it is! The rocket beguin a turn and turn till my rocket'cone is completly downside, lol!!

Please, I would like to ask some of great help for me, can you tell me if with aeroplanes or horizontal takeoffs rockets the same conclusions aplly?!? If you can tell your guess I will be very glad because I am beguining "in AEROPLANES mode" and my mania for big things continues, so my flights are almost allll catastrophic when airplane brake 33, 35k!! Lol!

Again, great work sr.!!

P.S. Some of you already see a F-16 take-off with a incrediable climb till exactly vertical in a matter of 4seconds?! Is completly unbeliable!

Link to comment
Share on other sites

  • 5 months later...

I did some testing with the turn shape. Turn start was 8 km and turn end at 50 km for all launches, with target orbit either at 100 km or 400 km. Testing was done with a pretty simple 5000 Dv (atmo) rocket and with Corrective Steering on for all launches. TWR in the lower atmosphere was mostly between 2.0-2.5, dropping to 1.5-2.0 in the middle (for 60 seconds) and rising back to 2.0-3.0 in the upper atmosphere.

Bolded lines mark the most effective launch trajectories:

Target orbit at 400 km:

With 33% trajectory the remaining Dv at the end of the gravity turn was 1030 m/s.

With 40% trajectory the remaining Dv at the end of the gravity turn was 1092 m/s.

With 50% trajectory the remaining Dv at the end of the gravity turn was 1124 m/s.

With 66% trajectory the remaining Dv at the end of the gravity turn was 1100 m/s.

Target orbit at 100 km:

With 33% trajectory the remaining Dv at the end of the gravity turn was 1281 m/s.

With 50% trajectory the remaining Dv at the end of the gravity turn was 1335 m/s.

With 66% trajectory the remaining Dv at the end of the gravity turn was 1264 m/s. (When the apoapsis was raised further to 400 km from the 100 km periapsis, the craft had 1071 m/s Dv remaining at the end of the maneuver, meaning that launching directly to a target altitude of 400 km was more effective than first reaching a 100 km orbit.)

Tweaking the turn end altitude:

Considering that 50% turn shape gave the best result in both scenarios, I tested the effect of changing the turn end altitude to 70 km for both launch scenarios:

With 50% trajectory the remaining Dv at the end of the gravity turn was 1107 m/s - compare to 1124 m/s Dv remaining when the gravity turn ended at 50 km.

With 50% trajectory the remaining Dv at the end of the gravity turn was 1431 m/s - compare to 1335m/s Dv remaining when the gravity turn ended at 50 km.

Conclusion:

The difference in fuel consumption with different turn shapes is ultimately quite small, with changes in the turn shape saving less than 2% of the craft's total Dv or between 5-8% of the craft's remaining Dv at the end of the gravity turn.

The effect of changing the gravity turn end height from 50 km to 70 km was inconsistent, but seems to favor ending the gravity turn lower in the atmosphere if your target orbit is not much above the limit of the atmosphere. With a higher target orbit a longer gravity turn is marginally more efficient.

It would be interesting to test the effect of the turn start altitude together with different turn shapes, but with no time warp available during burns it's way too time consuming for me to bother testing it further, given that the differences found in these tests proved to be so small (although not insignificant, depending on your mission and its margins of error your craft has for pulling it off successfully).

Edited by Exel
Link to comment
Share on other sites

Yikes, I'm glad you tested that. I haven't played much with FAR since I'm concerned about how it will change rocket flight. Looks like that strays a bit too far from reasonable, here's hoping Squad checks this balancing carefully when they improve stock aero instead of just adopting all of FAR.
FAR feels quite nicely, more realistic, when flying standard rockets but if you have a good setup for frontal area, then you can achieve orbit using only ~3100-3200m/s Dv on pretty powerful engines, and Mainsail happens to be almost always the best option, with LV-T30 coming close second.

I think with the density of the air drops too quickly with FAR, if the atmosphere spanned to 120-150km with little stronger drag effects at sea level it would end up being great.

I think that FAR's aerodynamics are how it works in real life. The atmosphere thins out pretty quickly above sea level. I think anything above 10,000 ft and you need a pressure suit (or pressurized cabin like commercial jets cruising at 30,000-40,000 ft). 10,000 ft is maybe 2 of the 60 or so miles until you are in space and even so the atmosphere is quite sparse.

That said, this makes the atmosphere feel a little non-existant when it is only 70 km deep. I agree that it would definitely feel a little better if the stmosphere went up to around 130 km or something.

I should point out (in order to dispell thoughts that FAR makes it easier) that the fact you have to make a reasonably aerodynamic rocket/payload to get anywhere definitely adds more challenge than it takes away by requiring less dV.

Link to comment
Share on other sites

Several months ago, I collected some data to determine this scientifically. This chart is old, but the drag model hasn't changed since then, so it should still be accurate. Basically, I launched the same rocket over and over again, with slightly different settings in the MechJeb Turn Shape dialog.

https://dl.dropboxusercontent.com/u/78157466/GravityTurns.JPG

The result of the study is (for that particular rocket, TWR = 2.0) the ideal turn start is around 6-10 km, with a shallow-ish trajectory. Steep trajectories were quickly fatal, but it's possible to go too shallow. Maybe someday I'll do another study with different altitudes, per Nao's suggestion.

Another thing I learned in this study goes contrary to what most people think:

• if your rocket is slow (TWR < 2.0) climb shallow to reduce gravity drag;

• if your rocket is fast (TWR > 2.0) climb steep to reduce atmospheric drag;

• so basically adjust turn shape to keep speed at terminal velocity and full power.

Of course, this doesn't account for space planes. That's a completely different can of worms!

I ran a few more tests with a heavier rocket (TWR < 2.0 at the start of each stage) and this time a shallower trajectory (33%) was more fuel efficient than the steeper trajectory (50%) that dominated the efficiency comparison with my faster rockets (first-stage TWR > 2.0). The difference to a circular 70 km orbit wasn't significant, but it was noticeable. So it confirms the above findings by Zephram Kerman that slow rockets should use a shallower climb while fast rockets should climb steeper - just don't overdo it.

Link to comment
Share on other sites

I also found turn start altitude to be a far greater factor than turn shape, again in line with Z.K.'s observations; a 10 km turn start saved almost 200 m/s of Dv compared to starting the turn at 6 km. That was over 10% of the total remaining Dv of the craft at the end of gravity turn, so a significant amount.

This was with a slow rocket. A faster rocket doing a steeper climb could well benefit from an earlier turn start, as Z.K.'s graph shows (yellow line).

Link to comment
Share on other sites

I think that FAR's aerodynamics are how it works in real life. The atmosphere thins out pretty quickly above sea level. I think anything above 10,000 ft and you need a pressure suit (or pressurized cabin like commercial jets cruising at 30,000-40,000 ft). 10,000 ft is maybe 2 of the 60 or so miles until you are in space and even so the atmosphere is quite sparse.

That said, this makes the atmosphere feel a little non-existant when it is only 70 km deep. I agree that it would definitely feel a little better if the stmosphere went up to around 130 km or something.

I should point out (in order to dispell thoughts that FAR makes it easier) that the fact you have to make a reasonably aerodynamic rocket/payload to get anywhere definitely adds more challenge than it takes away by requiring less dV.

Earth's atmosphere does thin out pretty quickly, but not quite that quick. Above 10,000 ft (3km) you need supplemental oxygen. Above 18,000 ft (5.5km) you need regulated oxygen. Above 25,000 ft (7.6km) you need partial pressurization or you won't get enough oxygen into your blood. And above 50,000 ft (15.2km) you need a pressure suit or your blood might boil. How does that scale up?

At 18,000 ft, you are at 50% the atmospheric density of sea level. At 25,000 ft you are at 33% sea level density, and at 50,000 ft, you are at 15%. It drops off quickly, then sort of tapers of slowly.

For compairson, the International Space Station is at 370 km.

Also, I think the best theoretical gravity turn starts as soon as you are clear of the launch tower. But I think in practice that has it's own challenges (like rockets breaking in half or tipping over). You want to start the turn soon and at slow speed to minimize the aerodynamic forces. So (without having used FAR), I agree with you that it seems a reasonable approximation.

Although I wouldn't want the atmosphere to go up to 130km until they update the stock aerodynamics. (but I'm just selfish that way)

Link to comment
Share on other sites

I also found turn start altitude to be a far greater factor than turn shape, again in line with Z.K.'s observations; a 10 km turn start saved almost 200 m/s of Dv compared to starting the turn at 6 km. That was over 10% of the total remaining Dv of the craft at the end of gravity turn, so a significant amount.

This was with a slow rocket. A faster rocket doing a steeper climb could well benefit from an earlier turn start, as Z.K.'s graph shows (yellow line).

Yep, its really impossible to define "perfect" turn shape as it changes with different crafts and other parameters.

Just looking at my previous post here with some data. The difference between best results for 100% shape and 50% one were only 6m/s Dv for KerbaX rocket and only ~25m/s less than the best 66% shape. Similarly even turn start at 3km with other settings tweaked could produce a good result within 28m/s of best one.

While the 200m/s of difference in your example is quite big, the results of ascent are a sum of many parameters that work together, turn start is just one of them.

If you for example take 6km turn start, just increasing turn end to like 70km and/or increasing turn shape could possibly increase efficiency to comparable levels.

After very long time learning ins and outs of ascents in this game, I think the single most important parameter that defines ascent path is vertical speed (especially in mid ascent, during gravity turn). If you look at flights with different ascent settings, you can notice that the best settings produce similar vertical speed profiles, even on crafts with different TWR. Turning too early will mean not enough VS to get out of thick atmosphere fast enough, too much and you are wasting a lot of dV (both for accelerating craft upwards and loosing on Oberth effect later in ascent).

Link to comment
Share on other sites

While the 200m/s of difference in your example is quite big, the results of ascent are a sum of many parameters that work together, turn start is just one of them.

If you for example take 6km turn start, just increasing turn end to like 70km and/or increasing turn shape could possibly increase efficiency to comparable levels.

Yes indeed. I achieved a similar level of efficiency with the 6 km turn start once I steepened the climb from 33% to 50%. So it seems that with any given craft there's more than one, potentially multiple, viable ascent paths to get roughly similar fuel efficiency. I'm sure there's a formula for calculating that, given that TWR, gravity and atmospheric drag are all known factors, but at least MechJeb doesn't seem to be aware of it.

After very long time learning ins and outs of ascents in this game, I think the single most important parameter that defines ascent path is vertical speed (especially in mid ascent, during gravity turn). If you look at flights with different ascent settings, you can notice that the best settings produce similar vertical speed profiles, even on crafts with different TWR. Turning too early will mean not enough VS to get out of thick atmosphere fast enough, too much and you are wasting a lot of dV (both for accelerating craft upwards and loosing on Oberth effect later in ascent).

Would the optimal ascent path be one where, as Z.K. suggested and as my data seems to also indicate, you can constantly maintain terminal velocity at full throttle but not go over that? In English that would mean that slow craft should turn earlier and with a more shallow profile, while fast craft should climb steep and turn late - so exactly opposite to what the KSP Wiki is telling us to do.

Link to comment
Share on other sites

Would the optimal ascent path be one where, as Z.K. suggested and as my data seems to also indicate, you can constantly maintain terminal velocity at full throttle but not go over that? In English that would mean that slow craft should turn earlier and with a more shallow profile, while fast craft should climb steep and turn late - so exactly opposite to what the KSP Wiki is telling us to do.

Not really unfortunately. I's hard to explain in detail. It's just that there are so many variables that optimal flight path would be very complicated function and would work only for one craft.

Also one thing to improve in MJ ascent path would be to add reduction in velocity requirement as gravity drag decreases due to centripetal force (as the idea of terminal velocity is to have drag loss equal the gravity one).

In the end, searching for minimal delta-v path is also not the end point of maximizing efficiency, as it is by principal not the most efficient for any given ship. That's because of engine weight, that is required to satisfy TWR demands, that impose higher weight cost than fuel saved from delta-v difference of less optimal path. For example we can do almost the same launch with lower engine mass (lower TWR), but constant 100% thrust, never reach terminal velocity and achieve orbit on less fuel spent even thou we used more delta-v. Going even further with lower TWR we can achieve lower launch mass for given payload by exchange engine mass for a little more fuel.

edit: hmm that wasn't worded right either :|. Let's just say that the most efficient craft will hardly ever reach terminal velocity so its hard to create a profile based on its ability to follow such speed.

edit2: And that would be my point... not only it would be hard to create optimal ascent profile based on things like steering looses (following vertical velocity vector) and balancing gravity and drag losses (following terminal velocity) but also depending on actual craft design there are more possible craft paths that give better results that mostly have a lot to do with craft dynamics (craft momentum, acceleration profiles, Oberth effect etc)

Edited by Nao
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...