title: Proportional control
text: # Proportional control
  
  Proportional control, in engineering and process control, is a type of linear feedback control system in which a correction is applied to the controlled variable, and the size of the correction is proportional to the difference between the desired value (setpoint, SP) and the measured value (process variable, PV). Two classic mechanical examples are the toilet bowl float proportioning valve and the fly-ball governor.
  
  The proportional control concept is more complex than an on–off control system such as a bi-metallic domestic thermostat, but simpler than a proportional–integral–derivative (PID) control system used in something like an automobile cruise control. On–off control will work where the overall system has a relatively long response time, but can result in instability if the system being controlled has a rapid response time. Proportional control overcomes this by modulating the output to the controlling device, such as a control valve at a level which avoids instability, but applies correction as fast as practicable by applying the optimum quantity of proportional gain.
  
  A drawback of proportional control is that it cannot eliminate the residual SP − PV error in processes with compensation e.g. temperature control, as it requires an error to generate a proportional output. To overcome this the PI controller was devised, which uses a proportional term (P) to remove the gross error, and an integral term (I) to eliminate the residual offset error by integrating the error over time to produce an "I" component for the controller output.
  
  ## Theory
  
  In the proportional control algorithm, the controller output is proportional to the error signal, which is the difference between the setpoint and the process variable. In other words, the output of a proportional controller is the multiplication product of the error signal and the proportional gain.
  
  This can be mathematically expressed as
  
      $P_{\mathrm {out} }=K_{p}\,{e(t)+p0}$
  
  where
  
  * $p0$: Controller output with zero error.
  * $P_{\mathrm {out} }$: Output of the proportional controller
  * $K_{p}$: Proportional gain
  * $e(t)$: Instantaneous process error at time t. $e(t)=SP-PV$
  * $SP$: Set point
  * $PV$: Process variable
  
  Constraints: In a real plant, actuators have physical limitations that can be expressed as constraints on $P_{\mathrm {out} }$. For example, $P_{\mathrm {out} }$ may be bounded between −1 and +1 if those are the maximum output limits.
  
  Qualifications: It is preferable to express $K_{p}$ as a unitless number. To do this, we can express $e(t)$ as a ratio with the span of the instrument. This span is in the same units as error (e.g. C degrees) so the ratio has no units.
  
  ## Development of control block diagrams
  
  Proportional control dictates ${\mathit {g_{c}=k_{c}}}$. From the block diagram shown, assume that r, the setpoint, is the flowrate into a tank and e is error, which is the difference between setpoint and measured process output. ${\mathit {g_{p}}},$ is process transfer function; the input into the block is flow rate and output is tank level.
  
  The output as a function of the setpoint, r, is known as the closed-loop transfer function. ${\mathit {g_{cl}}}={\frac {\mathit {g_{p}g_{c}}}{1+g_{p}g_{c}}},$ If the poles of ${\mathit {g_{cl}}},$ are stable, then the closed-loop system is stable.
  
  ### First-order process
  
  For a first-order process, a general transfer function is $g_{p}={\frac {k_{p}}{\tau _{p}s+1}}$. Combining this with the closed-loop transfer function above returns $g_{CL}={\frac {\frac {k_{p}k_{c}}{\tau _{p}s+1}}{1+{\frac {k_{p}k_{c}}{\tau _{p}s+1}}}}$. Simplifying this equation results in $g_{CL}={\frac {k_{CL}}{\tau _{CL}s+1}}$ where $k_{CL}={\frac {k_{p}k_{c}}{1+k_{p}k_{c}}}$ and $\tau _{CL}={\frac {\tau _{p}}{1+k_{p}k_{c}}}$. For stability in this system, $\tau _{CL}>0$; therefore, $\tau _{p}$ must be a positive number, and $k_{p}k_{c}>-1$ (standard practice is to make sure that $k_{p}k_{c}>0$).
  
  Introducing a step change to the system gives the output response of $y(s)=g_{CL}\times {\frac {\Delta R}{s}}$.
  
  Using the final-value theorem,
  
  $\lim _{t\to \infty }y(t)=\lim _{s\,\searrow \,0}\left(s\times {\frac {k_{CL}}{\tau _{CL}s+1}}\times {\frac {\Delta R}{s}}\right)=k_{CL}\times \Delta R=y(t)|_{t=\infty }$
  
  which shows that there will always be an offset in the system.
  
  ### Integrating process
  
  For an integrating process, a general transfer function is $g_{p}={\frac {1}{s(s+1)}}$, which, when combined with the closed-loop transfer function, becomes $g_{CL}={\frac {k_{c}}{s(s+1)+k_{c}}}$.
  
  Introducing a step change to the system gives the output response of $y(s)=g_{CL}\times {\frac {\Delta R}{s}}$.
  
  Using the final-value theorem,
  
  $\lim _{t\to \infty }y(t)=\lim _{s\,\searrow \,0}\left(s\times {\frac {k_{c}}{s(s+1)+k_{c}}}\times {\frac {\Delta R}{s}}\right)=\Delta R=y(t)|_{t=\infty }$
  
  meaning there is no offset in this system. This is the only process that will not have any offset when using a proportional controller.
  
  ## Offset error
  
  Offset error is the difference between the desired value and the actual value, SP − PV error. Over a range of operating conditions, proportional control alone is unable to eliminate offset error, as it requires an error to generate an output adjustment. While a proportional controller may be tuned (via p0 adjustment, if possible) to eliminate offset error for expected conditions, when a disturbance (deviation from existing state or setpoint adjustment) occurs in the process, corrective control action, based purely on proportional control, will result in an offset error.
  
  Consider an object suspended by a spring as a simple proportional control. The spring will attempt to maintain the object in a certain location despite disturbances that may temporarily displace it. Hooke's law tells us that the spring applies a corrective force that is proportional to the object's displacement. While this will tend to hold the object in a particular location, the absolute resting location of the object will vary if its mass is changed. This difference in resting location is the offset error.
  
  ## Proportional band
  
  The proportional band is the band of controller output over which the final control element (a control valve, for instance) will move from one extreme to another. Mathematically, it can be expressed as:
  
  $PB={\frac {100}{K_{p}}}\$
  
  So if $K_{p}$, the proportional gain, is very high, the proportional band is very small, which means that the band of controller output over which the final control element will go from minimum to maximum (or vice versa) is very small. This is the case with on–off controllers, where $K_{p}$ is very high and hence, for even a small error, the controller output is driven from one extreme to another.
  
  ## Advantages
  
  The clear advantage of proportional over on–off control can be demonstrated by car speed control. An analogy to on–off control is driving a car by applying either full power or no power and varying the duty cycle, to control speed. The power would be on until the target speed is reached, and then the power would be removed, so the car reduces speed. When the speed falls below the target, with a certain hysteresis, full power would again be applied. It can be seen that this would obviously result in poor control and large variations in speed. The more powerful the engine, the greater the instability; the heavier the car, the greater the stability. Stability may be expressed as correlating to the power-to-weight ratio of the vehicle.
  
  In proportional control, the power output is always proportional to the (actual versus target speed) error. If the car is at target speed and the speed increases slightly due to a falling gradient, the power is reduced slightly, or in proportion to the change in error, so that the car reduces speed gradually and reaches the new target point with very little, if any, "overshoot", which is much smoother control than on–off control. In practice, PID controllers are used for this and the large number of other control processes that require more responsive control than using proportional alone.
  
  