MuMech / MechJeb2

MechJeb2 - KSP mod
Other
990 stars 251 forks source link

Ascent AP to hold attitude during staging #72

Closed asmi84 closed 5 years ago

asmi84 commented 11 years ago

The basic problem is that vessel need to be stable during strapons jettison otherwise they can recontact with the rest of the vessel. Sounds like one more checkbox :)

Tallinu commented 11 years ago

Separatrons. Also, flight path without sudden turns (I find 5, 50, 0, 75% with corrective steering OFF is the most fuel efficient for many of my ships, and it's a gradual turn). Having corrective steering off makes a big difference, since it avoids constantly swinging the rocket 10 degrees or more for what should be tiny course corrections.

Aquilux commented 11 years ago

I tend to turn it on only after the velocity vector goes from below my nose to above. That way it takes the momentum that would have flung it outward into a steeper climb, and uses it to bring my periapsis up instead and make the circularization burn less stressful.

Tallinu commented 11 years ago

The path I listed tends to raise periapsis above zero before the apoapsis reaches the target, at least on the heavier rockets I often fly. I've done a lot of testing with various ascent paths to come up with the most fuel efficiency possible, balancing atmospheric drag against gravity. My circularization burns are often in the mere 100-300 m/s range. :grinning:

Just ran another test flight, watching for some things I didn't have specific numbers for... Looks like the nose dips below the prograde mark at 45 km, with it around 15 degrees elevation, and by 50 km it's pointing along the horizon, which gets prograde down to 5 degrees by 65 km. When periapsis flipped to positive, apoapsis was at 89 km. When AA reached 200 km, PA was 69 km. Circularization burn is 96 m/s. Although I just encountered an odd bug where the delta-V display by the nav ball isn't showing up properly, for some reason. Who knows if that's related to MechJeb or not... http://i.imgur.com/mC3rDzi.png http://i.imgur.com/dxu9xD4.png http://i.imgur.com/ZjXkt8o.png

gmcnew commented 11 years ago

Despite what the UI might suggest, the ascent and staging modules act independently. To implement your suggestion, the staging controller would need to temporarily lock the attitude controller so that the ascent autopilot's steering commands are ignored for a brief period of time.

@Tallinu's suggestion to use a smoother ascent profile is a good one. What ascent path are you using, and where in the ascent are you having problems? I hesitate to add yet another checkbox if people can just avoid this by using better ascent paths.

Tallinu commented 11 years ago

Corrective steering could probably benefit from some improvements though. Like I said, during the first couple minutes of flight it tends to swing the rocket up to 10 degrees off-course to correct very tiny deviations in the flight path, and ends up swapping back and forth between correcting one way and then the other. It would be much better to have it use smaller changes in heading. It looks like it's meant to, but something isn't quite right.

asmi84 commented 11 years ago

The problem usually occurs with heavy rockets. For example BobCat's Buran-Energia stack NEVER cleanly separated when I was using autostaging, but manually I have 100% success rate. Or this: http://www.asmitech.com/Stuff/KSP/SHLV_Pad2.png I do have separatrons, but still AP almost always runs into one or more booster(s). In both cases, if I disengage AP and keep rocket stable separation goes through smoothly.

asmi84 commented 11 years ago

@Tallinu I have corrective steering Off until I'm out of atmosphere as I have FAR installed and overcorrections almost always causes rocket to tip over and break apart.

Tallinu commented 11 years ago

What other mods' parts are on that pictured rocket? Can it be flown without FAR installed? I'd love to have a look at it and see if I can identify why you're having problems where I'm not...

asmi84 commented 11 years ago

@Tallinu It uses KW Rocketry + Energia boosters and some other parts (docking port, Proton retrorockets) from BobCat's Soviet Pack. This is actually amazing rocket - having GLOW of 819 mT it can put 130 mT payload to 100 km circ orbit! Craft is here: http://www.asmitech.com/Stuff/KSP/SHLV.zip

asmi84 commented 11 years ago

@Tallinu That is for the abovementioned rocket separation issues. For overcorrection breaking apart that is caused by FAR because that is what would happen in real life if you dip too low :) This mechanic simply doesn't present in stock "bugodynamics" (that is what there is instead of aerodynamics)...

Tallinu commented 11 years ago

@asmi84 Right. :) Sounds nice, I'll have a look at this.

asmi84 commented 11 years ago

@Tallinu you will probably need EdTools mod that expands VAB as I doubt this rocket would fit within stock VAB - it's WAY too tall for that :)

Tallinu commented 11 years ago

I have that. :) I have a lot of mods installed - my parts folder contains 494.

I just gave this a launch using MJ2 and it had absolutely no problems, except for what I would consider too much wobble at the upper stage engine decoupler and a bit of 'damage' from the booster separation retros. No collisions, no breakage. It actually hit the acceleration cap of 40m/s/s just before the boosters dropped off, and I was afraid something would collapse, but it didn't. After flinging its nosecone into a stable orbit, it would have circularized just fine if I had deployed the solar panels before the power ran out (I'm used to having at least one RTG on all my unmanned ships).

If you're interested in suggestions, I think some of the wobble could be reduced by combining the two half-size fuel tanks above the orange one into another full size one (there's a white 'KSP' version of the orange one, you know), and then using some struts from the inside of the decoupler to the engine above it, perhaps quantum struts like you used under the nosecone. And I think the "orbital nosecone" could be prevented by using a pair of standard separatrons instead of 4 of the powerful ullage motors.

asmi84 commented 11 years ago

@Tallinu That's because I have "separatrons" there. I flew this thing manually and I separated boosters cleanly without separatrons. I don't think it's a good idea to require rockets to have seps just because MJ can't figure out to stay straight for a new seconds. Or maybe in addition to "Auto" thing in ASS when AP is active there could be a second button to temporary force MJ to keep direction. And the issue of overcorrections and breaking apart is still there. Eventually stock "bugodynamics" will be replaced with more realistic aerodynamics, and this will become an issue even in stock. Right now disabling these corrections from lift-off till 40km or so seem to fix issue, but I don't think that the function or this checkbox is to cause crazy pitching occilations (in some cases particularily with low T/W amplitude reaches 15-20°!!).

asmi84 commented 11 years ago

@Tallinu In real life rockets are bottom-heavy and so inherently unstable, they will turn tail-first if engine is shut down.

Tallinu commented 11 years ago

I flew this with corrective steering completely disabled - it isn't required to get a good orbit. I agree that it performs suboptimally on heavy rockets, as per my previous comment.

As for the "separation motors should not be required" idea... I tend to disagree. As far as I know all real rockets have some kind of method for pushing separated stages away from the rest.

And yeah, even in stock KSP you can get that shuttlecock effect at times, especially on reentry. :) Can make it difficult to perform a braking burn properly!

asmi84 commented 11 years ago

@Tallinu Yes they do, but they usually are of mechanical nature (like KSP's decouplers ;)), but SRBs :)

asmi84 commented 11 years ago

@Tallinu I actually love how it's done in Soyuz LV in BobCat's mod - normally boosters would require seps to separate without collision. BUT if you detach them JUST before the fuel runs out (<10 units of fuel remaining) - not only they separate absolutely clean without any seps, but also form famous Korolyov's Cross :)

Aquilux commented 11 years ago

@asmi84 Fact check: "At T+126 seconds after launch, pyrotechnic fasteners released the SRBs and small separation rockets pushed them laterally away from the vehicle." http://en.wikipedia.org/wiki/Space_Shuttle#Launch

Though I wish someone would make a "linear" separation motor, similar to the linear RCS thruster, that fired for 1-3 seconds at the longest to help with the initial shove.

Tallinu commented 11 years ago

Yeah, I looked up the shuttle SRBs at one point because someone suggested they used thrust vectoring to separate. Apparently they actually lock in the neutral position and are pushed away by those rockets, probably angling them so the remaining thrust aids in separation I guess.

You can fake a linear thruster by rotating a separatron so the business end is sticking outward, btw. But I usually place them on the outside edge just above the stage's dry center of mass, pointing in different directions, so that the combined thrust vector pushes the stage directly away from the rocket without actually aiming the exhaust of the separatrons in toward the rocket. You can see it here: http://i.imgur.com/KliqhZb.jpg Having it just above the CoM results in the nose tipping outward, but not so quickly that the tail swings in and crashes with the rocket.

asmi84 commented 11 years ago

@Aquilux And your point is? Fact check: Soyuz LV does not use SRBs.

Tallinu commented 11 years ago

It would be interesting if something like those soyuz stages could auto-separate themselves at a defined fuel level, because MechJeb doesn't and probably won't ever understand how or when to do that.

asmi84 commented 11 years ago

@Tallinu the problem is that seps are way too powerful and the plumes often damage the rest of the stack. For soyuz - they can not because they are strapped on top of stock decouplers. If I understand it right, the way it works is decouplers push them outwards and since engines are still running they fly outwards. when engines stop, they begin tipping over and create that famous cross. In real life boosters separate due to their aerodynamic properties. Second-third stage separate with "hot-staging" (this BTW can be replicated in KSP and I do this just 'cause I'm reality freak :)), And third-payload separates by third stage opening oxygen valve and venting LOX provide thrust - very clever design I must say! :)

Tallinu commented 11 years ago

As I said, clever placement can keep separatrons from 'damaging' anything (although the only cases I've seen where that damage actually destroyed a part was when it was hitting an already overheating engine steadily for about a second). In fact I just got done fiddling with the one you posted and doing just that: two seps per "pair" of boosters instead of the four proton retros, no damage to anything in the log. And less wobbly in the middle. :)

I'm not an expert in real life rocketry by any means, and I'm sure aerodynamics and other things could be utilized, but this is KSP and we must work with what we are given. Not being able to use aerodynamic properties or other clever tricks is simply a limitation of the game engine. We know that at least some rocket designs use separation motors of some kind, whether it's the dregs of its main engine's fuel or specialized thrusters, so it isn't unrealistic to use such things in our designs as needed.

I've had rockets where no matter how stable it was when separation occurred, there was a high risk of the usual wobbling leaving one of the strap-ons with a bit of angular momentum that would cause it to collide with one of the still-attached tanks or engines and destroy the vehicle. It's nice when you don't have to worry about that, but I'm sure trying to program Jeb to rely on that could be pretty complicated, and we already have solutions for the problem available. On the other hand, doing something about the corrective steering on heavy rockets could help with both problems. I think that should be the first step.

I did try flying this thing with corrective steering on, and actually didn't run into that steering-oscillation issue, on this particular rocket at least. But I'm not running FAR. And I have had that issue with a couple of other rocket designs. shrug

asmi84 commented 11 years ago

@Tallinu There is a reliable way in KSP to detach just about anything radially-mounted without separatrons - make vessel rotate and then decouple - but this way is not very practical...

Tallinu commented 11 years ago

@asmi84 This is true! Sadly you're correct that it's not practical for ships with a low rotation power to mass ratio, such as practically anything probe-driven. Ships with crewed command pods can be powerful enough, again depending on mass...

There is a mod that adds high rotation power parts, "Torque Wheels", that can be radially attached, though. I use that a lot. And I hope that eventually the SAS system will get a revamp that makes them work in a similar fashion, because gyroscopic control is very useful.

Perhaps MechJeb could be set up to maintain a certain rotation rate during ascent (or even in space), assuming the vessel was capable of it? User-configurable, and you'd have to set it to something that wouldn't tear pieces off your ship, but that could actually be a great idea...

asmi84 commented 11 years ago

@Tallinu If by "this" rocket you mean the one I've mentioned, the lack of steering oscillations is explained by VERY wide gimbal range of Energia boosters and by very high T/W of stack during first stage - this gives rocket enormous control authority. If you ever flew a rocket with T/W of 1.1-1.3 (like most real rockets are), then you'll run into this steering oscillations issue. In KSP control authority does not depend on angle of attack, while in reality it does in a big way - infact vast majority of RL LVs would stall and crash if AoA is more than 5 or so degrees. Zenit rocket is notable exception - it turns VERY aggressively compared to other LVs, BUT it's only possible since Zenit has enormous T/W compared to other LVs...

Tallinu commented 11 years ago

@asmi84 Interesting, I didn't realize TWR was so low for real rockets. I don't think I've ever gone below 1.5 on first stages at liftoff, though many of my later stages are often in the 1.0 to 0.4 range.

By "this" I mean the one I downloaded from you. I was rather surprised when I first loaded it up and noticed that it started at 2.5 TWR or so and climbed to 4.5 before the boosters separate! It has acceleration to spare, at least with terminal velocity limiter on.

The main ship that I have difficulty with corrective steering on is a stock asparagus staged SHLV that starts off at 1294 tons and puts 164 tons into 400km orbit: http://i.imgur.com/Vlq7waJ.jpg / http://i.imgur.com/GWasKMd.jpg

It tends to get into a cycle about 10 seconds long of angling 10 degrees one way and then the other on a somewhat randomly chosen plane for the first couple minutes of flight, if I have that option on. But even if it's doing that it's still a very reliable ship.

lamont-granquist commented 5 years ago

This issue is being closed because it appears to be more of an issue with rocket design or physics that is not directly related to MechJeb issues or bugs and is more of a general KSP issue. It may also be a better question to answer on the forum thread