Author: Joe H., Inflow Engineer

In my last post, Control Systems and Feedback Loops, we talked about a type of control system called a PID controller or a Proportional-Integral-Derivative controller. The key point to remember for the purposes of this article is that a PID controller uses three mathematical operations to adjust the input (and therefore the output) of a process, and each of those three operations has its own multiplier. By changing the values of each multiplier, we can change the effect of a PID controller on a process. In other words, a PID controller is a multi-variable control system. The practice of adjusting a multi-variable system to get a desired output is called optimization, and that’s the topic we’ll be covering in this post.

In order to optimize a system, you need to determine some details about the system in question. First, you need to know exactly what your desired output looks like. It’s important to note that in many cases, your system will never actually reach the exact desired output, but the goal of optimization is to get as close to that output as possible (we’ll come back to this later on). Secondly, you need to know what your control inputs are. These are the inputs that change the behavior of the system. In a PID controlled system, the control inputs are the multiplier values, but other systems will have different control inputs. In a stereo system, for example, the control inputs are the bass, treble, and volume setting values. Once you know these two details, you can optimize the system.

Optimization is a common engineering challenge and for widely used control systems, such as PID controllers, several optimization algorithms and software optimization programs have been developed. However, not every control system has these tools readily available, so we’re going to focus on manual tuning for today. The first step in manually tuning a multi-variable system is to determine which control input has the greatest impact on your system, which has the second greatest, etc. This can be done by changing one control input at a time and measuring the change in the output. With most systems, you’ll find that each control input you change has a different effect on the output. Changing one control input might cause the output to scale up, while changing another control input might cause the output to respond to input changes more quickly. Ideally, you want to be able to say “When I change this control input by this value, the output changes in this way, by this much.” There’s a good deal of trial and error involved in this process, although the more you know about the system you are optimizing, the more quickly you’ll be able to figure out the input/output relationships.

Once you’ve determined what each control input does to the output, you can move on to the next step of optimization. Starting with the most impactful input, adjust the input value until the output is in the ballpark of the desired value. In a PID system, the P multiplier is adjusted first, the I multiplier is adjusted second, and the D multiplier is adjusted last. (If you want to see this tuning in action, click here.)  In many systems, increasing a control input too much will cause the output to start behaving in an unstable manner, so it’s important to avoid over-adjusting at first. Move on to the next most impactful control input and so on, until you’ve adjusted all your controls. If you’ve done everything right, you should have an output that is very close to ideal. More likely, however, you’ll have an output that isn’t quite where you want it. To resolve that, use an iterative approach and go back to the most impactful control input. When you’ve reached a point where every change you make moves your output away from the desired output, you’ve optimized your system.

Again, an optimized system doesn’t necessarily produce an ideal output, but it should produce the best output the system is capable of generating. As such, optimizing a poorly designed system is, generally speaking, a waste of time since no amount of tuning will produce a good enough result. The upshot of this is that when we have a black box system and our optimization efforts fail, we know that we have to go back and redesign how the system works. It’s a very useful tool in determining when a black box approach may not be appropriate.

One other point to remember when optimizing a system is that in the real world, there may be a limit to how you can set your control inputs. For example, if you have a process where the output increases based on how many man-hours you can spend on it, you will only be able to dedicate a certain amount of time. You may have a perfect process, which could be highly optimized if you can spend 200 man-hours a week on it, but if you only have two employees, you will never be able to optimize your process. Often times, when you design a system or process, you get attached to your solution, and it can be tempting to blame failures on a lack of input resources, but the reality is, if your design can’t accomplish what is needed with the resources available, you haven’t actually created a solution. By understanding the nature of optimization, you can prevent wasting time and resources on a system that can never produce the desired output, and instead spend the time developing a better solution.

As I said at the beginning of this post, there are plenty of algorithms for optimizing specific systems. We’ve approached the topic from an engineering perspective, but there are professional organizations such as the Workflow Management Coalition and the Association of Business Process Management Professionals, which focus on optimization from a business process perspective, so if you’re interested in learning more about the topic from that viewpoint, I recommend taking a look at their websites. If you want to try your hand at manually tuning a PID controller, there are several PID simulators available for free online. I recommend the one offered by the PID Control Laboratory. In my next post, we’ll be covering risk assessment, so be sure to check back for that.

-Joe H., Inflow Engineer


At Inflow we solve complex terror and criminal issues for the United States Government and their partners, by providing high quality and innovative solutions at the right price through the cultivation of a corporate culture dedicated to being #1 in employee and customer engagement. We Make it Matter, by putting people first! If you are interested in working for Inflow or partnering with us on future projects, contact us here