7

Say you switch from your current guidance program to a brand new program that commands your spacecraft to a different attitude. Assume the new attitude is a discontinuous step change from your previous commanded attitude.

If the step change is large, it will trigger large corrections from your attitude controllers, which will cause the spacecraft to rush to the new commanded attitude, and quite possibly overshoot it, while also subjecting it to large loads you'd rather avoid.

So clearly step changes in attitude commands from guidance are a problem to be avoided.

My question is how? By ramping the attitude command from the previous command? By ramping the attitude error instead (spacecraft to commanded attitude)? By filtering the signal to smooth it (though the filtering time constant would have to be very large to accommodate large attitude step changes)?

I would love to know this. I've been avoiding the problem by ramping between old and new attitude errors (using a linear equation of the type y = ax + b), and this avoids the large problematic corrections that my controllers shouldn't be issuing (as my spacecraft goes out of control), but it eats at me that I haven't seen this done in any of the space shuttle papers I've read on GNC---and I'm convinced this is not the way to solve this.

So how do spacecraft handle sudden transitions between attitude commands when the changes are large? Please help me avoid nonsense in my model.

  • 1
    Many vehicles place a limit on rotational rate and employ a burn-coast-burn strategy to achieve large changes in attitude. – David Hammen May 05 '21 at 10:37
  • OK so after some experimenting I've found that passing my attitude error signal through a rate limiter works well to prevent excessive corrections by the rocket when you suddenly switch to a new program with a new attitude command far from the previous setpoint. I already had a rate limiter in my model and had only to put it downstream of the error signal calculation with an appropriate rate limit to fix the issues posed in my question. The limiter takes in the error signal, looks at the commanded rate, then replaces that with the limit if too high before integrating to get a new error signal. –  May 17 '21 at 15:49

1 Answers1

10

A naive bang-bang approach can consume excessive amounts of propellant when the vehicle needs to achieve large changes in attitude. The rotation rate can get excessively large at the switchover point. The solution is simple: Don't do that. There's typically no reason to make (for example) a 180° rotation in the minimum amount of time required.

Many vehicles place an upper limit on the vehicle's rotational rate and employ what is essentially a burn-coast-burn strategy to achieve large changes in attitude. Many vehicle's attitude control systems also limit percent on-time to something less than 100% as saturation (100% on-time) is a key indicator that the vehicle has lost controllability.

The burn phases of a large attitude change maneuver are done at less than 100% on-time. The coast phase is not pure coast; some minor corrections may be needed to keep the coast phase on target for the final burn phase. But the strategy essentially remains burn-coast-burn for large attitude changes.

As noted by BrendanLuke15, this is easily accomplished with a phase plane controller. A simplified phase plane control diagram is depicted below.

Simplified phase plane control diagram. Image is described in the text.

A phase plane control diagram depicts how the vehicle should respond to errors in the vehicle's attitude and attitude rate. In the simplified diagram depicted above, attitude error is on the horizontal axis and rate error is on the vertical axis. I'm calling the diagram "simplified" because many phase plane control diagrams are considerably more complex than the above diagram. A phase plane control diagram comprises multiple regions. One region results in thrusters being selected to increase the attitude rate, another to decrease the attitude rate, and yet other areas with no thrusters being fired at all.

In the above diagram, the areas where thrusters are not commanded to fire are labeled as drift channels and attitude hold channel. The attitude hold channel slopes downward to the right, is centered around the origin, and transitions to the drift channels that go horizontally to the edges of the diagram at -180° and +180°.

It is the drift channels that naturally accommodate the large attitude errors that suddenly result from commanded attitude changes. The thrusters will be commanded to change the attitude rate to begin rotating the vehicle in the right direction, but thrusting stops once the vehicle enters the drift channel. It coasts as it transitions from the drift channel to the attitude hold channel, and only starts firing again (in the opposite direction) when it exits the attitude hold channel. Finally, the vehicle enters a hysteresis loop centered around the origin, with only occasional thruster firings needed to keep the vehicle centered around the desired attitude and attitude rate.

David Hammen
  • 74,662
  • 5
  • 185
  • 283
  • 1
    @user39728_i_said_user_39728_i_ Elements of Spacecraft Design, Brown gives a nice overview of the phase plane control law, page 289-292 in this preview – BrendanLuke15 May 05 '21 at 11:19
  • 2
    @BrendanLuke15 I added a phase plane control diagram and a description of how they are used for attitude control. Thanks! – David Hammen May 05 '21 at 15:08
  • Thanks, David! I actually have deadband PD controllers for my cold gas thrusters and they're based on a diagram just like that one. They help tremendously to keep ratcheting down (when the required correction is small but a single firing is too powerful to produce it, so the vehicle winds up in a vicious cycle of overcorrecting, first one way, then the other). That's how I learned powerful cold gas thrusters aren't necessarily the best for attitude control. But a deadband controller helps. –  May 05 '21 at 15:16
  • But sorry, I'm going on a tangent here, and I wasn't very clear in my question. I guess I'm most struggling with setpoint transitions taking place during engine burns, when the engine has the control authority to very aggressively correct for attitude errors---which is normally good, except now suddenly the errors are very very large. This is less a problem for the weaker CGS, which in worst case scenario saturate and the rocket just turtles its way to the new commanded attitude. But with engines---how should I transition between setpoints to avoid the vehicle going wild? –  May 05 '21 at 15:19
  • OK, example: Say you launch a rocket that happens to be just finishing its pitchover maneuver. Pitch is 10 deg and the angle of attack is a few degrees---something that normally would drop to zero in short order as velocity builds up. But an emergency triggers the launch escape system, and the crew module fires away from the failing rocket stages. You want to differential-throttle the launch escape engines to track a zero-angle of attack trajectory... but you don't want to start with a wild 10 deg error and send your vehicle dancing... (continued) –  May 05 '21 at 15:29
  • @user39728_i_said_user_39728_i_ Don't use PID or PD for attitude control with thrusters. Phase plane control is the better choice. – David Hammen May 05 '21 at 15:31
  • You could filter the error signal to smooth it, but a 10 deg step would take a lot of smoothing, which would kill your controller's response in more normal situations. How would you transition up to that 10-deg pitch error? –  May 05 '21 at 15:32
  • But David, these PD controllers are phase-space controllers. The deadband is formulated so that your proportional gain comes from your error deadband, and your derivative gain comes from your error rate deadband. I got this formulation from a paper on the subject, and it works well. I pass the output of the deadband PD controller through a relay that fires only when a threshold is met (so the output is truly on/off, as a cold gas thruster would be). –  May 05 '21 at 15:35
  • If you plot attitude error in your phase space diagram, they would be on the horizontal axis, while the error rates would be on the vertical axis. Proportional gain acts on the errors (horizontal axis) and derivative gains acts on the error rates (vertical axis). You can calculate both gains from the deadband limits you've chosen. And if the deadband is linear, as in your example, then the proportional and derivative gains are related by a line equation of the type y = a*x + b... so once you've determined one gain, you've fully constrained the other gain. –  May 05 '21 at 15:41
  • But I concede this is probably not the way most people think of phase-space deadband controllers, and it's probably not obvious without some thought that you can model a phase-space deadband controller as a PD controller. I wouldn't have bought it if I hadn't found it in a respectable research paper. –  May 05 '21 at 15:43
  • In this formulation, P = 1 and D = dq/dw, where dq is the width of your error channel, and dw is the height of your error rate channel. When the error rate is zero, your controller outputs 1 * q, which triggers a full-thrust firing when q is over your deadband's dq threshold but stays dead otherwise. And when the error is zero, your controller outputs (dq/dw) * w, which triggers a full-thrust firing when w is over your deadband's dw threshold but stays dead otherwise. And at nonzero q and w, you fall somewhere on the linear diagonal deadband line. –  May 05 '21 at 16:00
  • @user39728_i_said_user_39728_i_ Re "How would you transition up to that 10-deg pitch error?" The controller commands thrusters to start the vehicle rotating to correct that error. Given the large error, the vehicle will enter the drift channel and stop thrusting. Stopping thrusting does not stop the vehicle from rotating. The ongoing rotation continues to work toward correcting that attitude error. It will eventually need to correct the rate error, and that will happen when the vehicle exits the deadband areas. There is no need for PID or PD. It just gets in the way. – David Hammen May 05 '21 at 16:03
  • PID / PD control is suitable for continuous attitude control devices such as magnetic torquers, reaction wheels, control moment gyros, etc. but not for thrusters. But even then, you need an equivalent for those drift channels to avoid problems associated with large attitude errors. – David Hammen May 05 '21 at 16:05
  • But we're talking about deadband PD controllers with discontinuous relays that trigger a full-strength firing above your deadband's error threshold and suppress all firings below that threshold. These PD controllers are formulated to be discontinuous. They just happen to express the deadband limits in terms of PD gains. –  May 05 '21 at 16:14
  • Thrust vectoring is what I would classify as continuous control devices. That's different. I assumed you are asking about selecting fixed orientation RCS thrusters which are either on or off, but with the on/off cycle rate typically being faster than that of the control system. Commands to most modern RCS jets are percent on-time for the next control system time step, but in non-continuous increments of percent on-time. – David Hammen May 05 '21 at 16:14
  • Sorry, I noticed you meant only continuous control after just I posted my comment, so I deleted it since it clearly didn't apply. Yes, I see your point. Cold gas thrusters are discontinuous and for them traditional PD control wouldn't be right. But these deadband PD controllers are discontinuous and just a different way to express phase-plane control ( in terms of PD gains). –  May 05 '21 at 16:18
  • OK I already use rate limiters in other parts of my model and maybe they’re a better approach to setpoint transitions than linear ramps. I got the rate limiters from the space shuttle papers so I know they were used somewhere, vs my linear ramps, which I just pulled out of thin air. –  May 05 '21 at 16:24
  • I’ll just have to tighten the rate limits where needed to prevent large errors from reaching my controllers during those particular setpoint transitions, and therefore to prevent those controllers from issuing outrageously aggressive commands that would cause the vehicle to go wild. –  May 05 '21 at 16:27
  • I should clarify that in these deadband PD controllers, the phase-space deadband is enforced by the discontinuous relays downstream of the PD controllers. The PD controllers pretty much just tell the relay when the error/error rate are outside the deadband. It’s the relay that issues the discontinuous binary on/off firing command. –  May 05 '21 at 16:34