To parabolas, and beyond!
Summary
As it is described in the OP, this method is not likely to work very well
To zeroth order the inlet flow will cycle indefinitely between constant offsets above and below the outlet flow, and the level will cycle between constant offsets above the high level and below the low level.
Caveat
The modeling below uses a constant outlet flowrate
Details
I think the plots in the image below, describing the behavior around a low-level event, represent a simple, but reasonable, model, for the process and feedback control described in the OP. N.B. after the sixth second, the net (outlet - inlet) flow rate will be +3gal/s, so the tank volume will increase to the High Level Trigger Point at that rate, and then execute similar behavior to the plots in reverse.
To first order, considering actual dynamics, such as hysteresis in the level switches and temporal transients between inlet flow setpoint and actual values, the offsets between which it cycles may increase, both in flow and in level.
That said, it does look like giving back half of the change in flow rate change applied during any level event, once that level was recovered, would have a decent chance of setting inlet flowrate near the outlet flowrate.
Although shown in discrete form here, for the continuous process, which a PLC running scans at order 1kHz would approximate, the governing first-order differential equations:
- dVolume/dt = Flow
- dFlow/dt = ±Constant
- Flow(t) = Flow(t=0) ± (Constant * t)
- Volume(t) = Volume(t=0) + (Flow(t=0) * t) ± ((Constant * t**2) / 2)
are the same as the height of a ball thrown upward and acted on by a constant gravitational acceleration:
- dHeight/dt = Velocity
- dVelocity/dt = Constant Acceleration = -g
- Velocity(t) = Velocity(t=0) - (g * t)
- Height(t) = Height(t=0) + Velocity(t=0) * t) - ((g * t**2) / 2)
I.e. the profiles of both Height and Volume over time are parabolas.
Cf.
https://cnx.org/contents/udH40vG5@2/Motion-in-Two-Dimensions-Grade-12
Cf.
https://stickmanphysics.com/stickma...mensional-motion/acceleration-due-to-gravity/