A discrete linear control theory model of a generic model of a replenishment rule is presented. The replenishment rule, which we term a Deziel Eilon-automatic pipeline, inventory and order-based production control system, is guaranteed to be stable. From a z-transform model of the policy, an analytical expression for bullwhip is derived that is directly equivalent to the common statistical measure often used in simulation, statistical and empirical studies to quantify the bullwhip effect. This analytical expression clearly shows that we can reduce bullwhip by taking a fraction of the error between the target and actual inventory and pipeline (or work in progress (WIP) or orders placed but not yet received) positions. This is in contrast to the common situation where ordering policies account for all of the error every time an order is placed. Furthermore, increasing the average age of the forecast reduces bullwhip, as does reducing the production/distribution lead-time. We then derive an analytical expression for inventory variance using the same procedure to identify the closed form bullwhip expression. We assume that a suitable objective function is linearly related to the bullwhip and inventory variance amplification ratios and then optimise the PIC system for different weightings of order rate and inventory level variance. We highlight two forms of the objective function, one where the golden ratio can be used to determine the optimal gain in the inventory and WIP feedback loop and another that allows the complete range of possible solutions to be visualised. It is interesting that the golden ratio, which commonly describes the optimum behaviour in the natural world, also describes the optimal feedback gain in a production and inventory control system.