# What is a "Unidirectional Input" (?) Closed Loop Control Algorithm Called and How Does it Work?

PID systems inherently require some amount of overshoot in order to stabilize around a target. This often requires adding or subtracting some resultant term in order to shrink the relative error. However, there are many physical applications where the input of the closed-loop system is unidirectional and/or finite.

For example: You use a closed loop control algorithm to launch and perform in-flight adjustments on a model rocket in order to achieve Y target apogee. The rocket can ADD thrust in-flight if it calculates the trajectory to be too low, but it can never SUBTRACT thrust that's already been applied. Thus, vanilla PID (as I understand it) cannot effectively run this control loop.

For my actual application, I'm interested in using pressure transducer feedback alongside a booster pump, in order to boost the volume downstream of the pump up to X target pressure. The system can't easily bleed pressure if the pump overshoots, so as far as the control-loop goes, I can only add pressure.

The easy solution would be do basic on/off "am I there yet?" control. However, I'm more interested in a control loop that produces a curve that asymptotes at X target pressure. So my questions are:

• What is the name of this type of control algorithm (I assume there are a few methods)?
• How does the feedback and relative-error-reduction system work?
• Perhaps this is an X/Y problem. Please describe your application in detail. Is the control system purely mechanical, or is the PID implemented in analog / digital electronics ? Does the target pressure vary with time ?
– AJN
Jan 8 at 2:49

Perhaps this is an X/Y problem. But here are some suggestions.

## 1

Design an over damped PID closed loop system. An over damped system will have poorer rise time. Assumptions required for this to work are

1. The target pressure is a constant; i.e. the command to the system is a step input.
2. The PID (particularly the D) can be designed to result in a stable over damped system.
3. Deviation of the actual system from the modeled system (values of parameters, non-linearities etc.) do not result in an overshoot for the designed PID.

## 2

Make the system tolerant towards overshoot. Due to variation of the real system from its theoretical model, one should always expect some overshoot. Make the system tolerant to the expected amount of overshoot (and some more).

## 3

Reduce absolute overshoot in the response by giving the final target pressure in steps separated by adequate time gaps; i.e., a stair case input from 0 to target in n steps instead of a step input from 0 to target. This (or a variation of this) is called input shaping.

Below is an example of the effect of input shaping.

The Octave / Matlab code used to generate the above plot

% closed loop system with overshoot characteristic.
sys = tf([100], [1, 5, 100]);

t = [0:0.01:4]';

% step input
u1 = (t>= 1) * 1.0;

% staircase input
u2 = ((t>=1) + (t>=1.5) + (t>=2) + (t>=2.5))/4;

% ramp input
u3 = (t>=1 & t<2.5).*(t-1)/(2.5-1) + (t>=2.5) * 1.0;

% step input "shaped" (filtered) by first order filter
tunable_filter_parameter = 3.0;
u4 = (1 - exp(-(t-1)*tunable_filter_parameter)) .* u1;

% simulate the response
y(:, 1) = lsim(sys, u1, t);
y(:, 2) = lsim(sys, u2, t);
y(:, 3) = lsim(sys, u3, t);
y(:, 4) = lsim(sys, u4, t);

% plot
subplot(2,1,1);
plot(t, [u1, u2, u3, u4]);

subplot(2,1,2);
plot(t, y);

% overshoot
ovs = max(y)';
ovs = (ovs-1) * 100;

• I am not sure if some of these methods will work since the input in your application is unidirectional and general PID controller output signals are bi directional. without a detailed description of the plant and the controller it may not be possible to tell.
– AJN
Jan 8 at 6:55
• Thank you for the thorough response and the example code! In this application, we can assume that the target pressure is constant. The actual system is an electro-pneumatic regulator that I'm controlling to apply air to a pneumatic booster pump. For example, assume the pumping ratio is 10x, if I apply 100psi air to the pump, the pump will generate 1000psi w/ my source gas. I had a hunch that the stair-step method would ultimately be easiest to implement, but I was curious about more efficient alternatives. I will look further into a filtered-step approach to see if I can find a good tune. Thx! Jan 10 at 17:46

SMALL SIGNAL

Let's assume a typical loop. Controller and plant in forward path, unity feedback. Let's add a pre-filter.

Let

C = controller transfer function; P = plant transfer function; F = input filter transfer function

(side note: it's possible to put part of the controller in the reverse path. Those configurations could be rearranged to small-signal-equivalent in this form, for this analysis)

Transfer functions:

output/input = FCP/(1+CP)

plant_signal/input = FC/(1+CP) = (FC/P) / (C + 1/P)

Because the plant is "one sided", we should make sure that the second expression above, plant/input, is well damped and does not overshoot on step response.

Note that C typically has zeros (as in controller forms PI, PD, PID, lead/lag etc). Zeros in the loop bandwidth also produce step response overshoot. So this suggests using poles in F to cancel or be dominant over the zeros in the numerator as necessary.

LARGE SIGNAL

Here it's especially important to make sure our integrator-anti-windup (ARW) strategy is effective. Large signal issues can also cause overshoots. Messy topic as far as I know it, and it should be its own question. One super short version: If rate or value are saturated high, don't add to the integrator. If saturated low, don't subtract from the integrator.

HOW DO WE COME DOWN

You'll have to bring your output back down somehow. So a more realistic model might be that the there is something like a constant bleed on the output pressure.

• Thank you! This is helpful. I guess the key is to heavily overdamp the system and apply an input filter tF(x). Bleeding pressure is controlled via a separate system, but is something that I'd rather not be actuating while the pump is pressurizing -- which is why I want the pressurization to be unidirectional. Thanks! Jan 10 at 17:48