PEG autopilot problem

george7378

DON'T PANIC
Addon Developer
Donator
Joined
Jun 26, 2009
Messages
1,045
Reaction score
0
Points
36
Hi all,

I am having some problems with the PEG autopilot:

[ame="http://www.orbithangar.com/searchid.php?ID=2783"]PEG Autopilot 070127[/ame]

and the stock Atlantis.

Sometimes, when I launch, the autopilot causes the Shuttle to pitch down into a dive, from which I can't recover. This always happens directly after SRB separation.

I think it is something to do with certain values I input into it, because the launch is normal when I program altitudes for the ISS into it (about 310 by 410 KM), and at the default 65 by 600 KM, it works too. I tried about 400 by 450 KM, and the problem persists.

If anyone could tell me what is happening, I would be thankful.

Thanks.

---------- Post added at 12:09 ---------- Previous post was at 12:04 ----------

Is it because the fuel won't allow these altitudes?
 
The Space Shuttle stack was designed to insert the Orbiter into a suborbital trajectory. Once you've released the tank, the procedure is to wait until Apogee and then burn to circularize. So entering a near-circular orbit will not work. What you might try is start with one set of values, then gradually raise the PeA until it is no longer able to insert there and use that number if you really want.
 
I'm having my own problems trying to use the PEG Autopilot with Francisdrakes Delta V Heavy Versatile. I've been aiming for Apollo style circular orbits (185km by 185km) but keep finding the spacecraft seemingly fly normally and then nosedive. Does anyone know of a good tutorial?
 
I'm having my own problems trying to use the PEG Autopilot with Francisdrakes Delta V Heavy Versatile. I've been aiming for Apollo style circular orbits (185km by 185km) but keep finding the spacecraft seemingly fly normally and then nosedive. Does anyone know of a good tutorial?

PEG is based off of an old algorithm from the 60s designed for real rockets. As such, it has some odd cases where if the performance of the vehicle is too great, such that the mass doesn't drop quickly enough, the algorithm diverges and the vehicle does exactly what you say.

Is the problem in the last few seconds of the launch, or in the middle? If it is the last few seconds, raise the TPEGStop variable from 7 to 20, 30 or more. This makes it shift to the more stable but less accurate cutoff guidance earlier. If its the middle of the launch, that won't help.

I have the shades of the start of a plan to fix this, but it has been forever since I have looked in to it. If anyone wants to take a crack at it, look at the estimated cutoff time variable T in the estimate() function. For certain values of old T and tau, the estimator diverges.
 
Is the problem in the last few seconds of the launch, or in the middle? If it is the last few seconds, raise the TPEGStop variable from 7 to 20, 30 or more. This makes it shift to the more stable but less accurate cutoff guidance earlier. If its the middle of the launch, that won't help.

The nosedive comes before the booster stages separate. I'll re-run the launch and attach the recording. Will also test the fix you have recommended and attach the recording from that.
 
I just tried out the Delta4H myself and found out that it has its own autopilot. On a fresh Orbiter install with no PEG, I launched it once and had to pull up constantly to get it to fly straight, and once I let up on the stick, the vehicle nosedived like you explained. The next time I flew it, I just turned on the main engines and let it fly itself, and it did, almost until the boosters dropped off, when it gave a nice message "Autopilot off: You have control".

So, it seems like PEG is arm-wrestling with the built-in autopilot and losing. Try commenting out (put a semicolon in front of) the initialheading line in the scenario to turn off the built-in autopilot.

Also, PEG is not a good fit to this vehicle in the first place. It is basically three-stage, and PEG is only good for one stage. For two stage vehicles, we can cheat by flying an open-loop pitch program for the first couple of minutes (TPEGStart) until the booster drops off. Delta 4 uses its boosters for three minutes, then its core for about four more minutes, then the upper stage. It's just too complicated. By the time PEG becomes valid, the vehicle already has 90% of its orbital speed.

I had multiple-stage PEG almost working before I ran out of gas myself on it.
 
I just tried out the Delta4H myself and found out that it has its own autopilot. On a fresh Orbiter install with no PEG, I launched it once and had to pull up constantly to get it to fly straight, and once I let up on the stick, the vehicle nosedived like you explained. The next time I flew it, I just turned on the main engines and let it fly itself, and it did, almost until the boosters dropped off, when it gave a nice message "Autopilot off: You have control".

So, it seems like PEG is arm-wrestling with the built-in autopilot and losing. Try commenting out (put a semicolon in front of) the initialheading line in the scenario to turn off the built-in autopilot.

In the launches I've done I've put a ';' in to disable the built in autopilot, so no arm wrestling occurs.
 
Back
Top