Control system

# Control system

Discussion

Encyclopedia
A control system is a device, or set of devices to manage, command, direct or regulate the behavior of other devices or system.

There are two common classes of control systems, with many variations and combinations: logic or sequential controls
Logic gate
A logic gate is an idealized or physical device implementing a Boolean function, that is, it performs a logical operation on one or more logic inputs and produces a single logic output. Depending on the context, the term may refer to an ideal logic gate, one that has for instance zero rise time and...

, and feedback
Feedback
Feedback describes the situation when output from an event or phenomenon in the past will influence an occurrence or occurrences of the same Feedback describes the situation when output from (or information about the result of) an event or phenomenon in the past will influence an occurrence or...

or linear
Linear
In mathematics, a linear map or function f is a function which satisfies the following two properties:* Additivity : f = f + f...

controls. There is also fuzzy logic
Fuzzy logic
Fuzzy logic is a form of many-valued logic; it deals with reasoning that is approximate rather than fixed and exact. In contrast with traditional logic theory, where binary sets have two-valued logic: true or false, fuzzy logic variables may have a truth value that ranges in degree between 0 and 1...

, which attempts to combine some of the design simplicity of logic
Logic
In philosophy, Logic is the formal systematic study of the principles of valid inference and correct reasoning. Logic is used in most intellectual activities, but is studied primarily in the disciplines of philosophy, mathematics, semantics, and computer science...

with the utility of linear control. Some devices or systems are inherently not controllable
Controllability
Controllability is an important property of a control system, and the controllability property plays a crucial role in many control problems, such as stabilization of unstable systems by feedback, or optimal control....

.

## Overview

The term "control system" may be applied to the essentially manual controls that allow an operator, for example, to close and open a hydraulic press, perhaps including logic so that it cannot be moved unless safety guards are in place.

An automatic sequential control system may trigger a series of mechanical actuator
Actuator
An actuator is a type of motor for moving or controlling a mechanism or system. It is operated by a source of energy, usually in the form of an electric current, hydraulic fluid pressure or pneumatic pressure, and converts that energy into some kind of motion. An actuator is the mechanism by which...

s in the correct sequence to perform a task. For example various electric and pneumatic transducers may fold and glue a cardboard box, fill it with product and then seal it in an automatic packaging machine.

In the case of linear feedback
Feedback
Feedback describes the situation when output from an event or phenomenon in the past will influence an occurrence or occurrences of the same Feedback describes the situation when output from (or information about the result of) an event or phenomenon in the past will influence an occurrence or...

systems, a control loop, including sensor
Sensor
A sensor is a device that measures a physical quantity and converts it into a signal which can be read by an observer or by an instrument. For example, a mercury-in-glass thermometer converts the measured temperature into expansion and contraction of a liquid which can be read on a calibrated...

s, control algorithms and actuators, is arranged in such a fashion as to try to regulate a variable at a setpoint
Setpoint
Setpoint is the target value that an automatic control system, for example PID controller, will aim to reach. For example, a boiler control system might have a temperature setpoint, that is a temperature the control system aims to attain....

or reference value. An example of this may increase the fuel supply to a furnace when a measured temperature drops. PID controller
PID controller
A proportional–integral–derivative controller is a generic control loop feedback mechanism widely used in industrial control systems – a PID is the most commonly used feedback controller. A PID controller calculates an "error" value as the difference between a measured process variable and a...

s are common and effective in cases such as this. Control systems that include some sensing of the results they are trying to achieve are making use of feedback and so can, to some extent, adapt to varying circumstances. Open-loop control systems
Open-loop controller
An open-loop controller, also called a non-feedback controller, is a type of controller that computes its input into a system using only the current state and its model of the system....

do not make use of feedback, and run only in pre-arranged ways.

## Logic control

Logic control systems for industrial and commercial machinery were historically implemented at mains voltage
Mains electricity
Mains is the general-purpose alternating current electric power supply. In the US, electric power is referred to by several names including household power, household electricity, powerline, domestic power, wall power, line power, AC power, city power, street power, and grid power...

using interconnected relay
Relay
A relay is an electrically operated switch. Many relays use an electromagnet to operate a switching mechanism mechanically, but other operating principles are also used. Relays are used where it is necessary to control a circuit by a low-power signal , or where several circuits must be controlled...

Ladder logic is a programming language that represents a program by a graphical diagram based on the circuit diagrams of relay logic hardware. It is primarily used to develop software for programmable logic controllers used in industrial control applications...

. Today, most such systems are constructed with programmable logic controller
Programmable logic controller
A programmable logic controller or programmable controller is a digital computer used for automation of electromechanical processes, such as control of machinery on factory assembly lines, amusement rides, or light fixtures. PLCs are used in many industries and machines...

s (PLCs) or microcontroller
Microcontroller
A microcontroller is a small computer on a single integrated circuit containing a processor core, memory, and programmable input/output peripherals. Program memory in the form of NOR flash or OTP ROM is also often included on chip, as well as a typically small amount of RAM...

s. The notation of ladder logic is still in use as a programming idiom for PLCs.

Logic controllers may respond to switches, light sensors, pressure switches, etc., and can cause the machinery to start and stop various operations. Logic systems are used to sequence mechanical operations in many applications. Examples include elevators, washing machines and other systems with interrelated stop-go operations.

Logic systems are quite easy to design, and can handle very complex operations. Some aspects of logic system design make use of Boolean logic
Boolean logic
Boolean algebra is a logical calculus of truth values, developed by George Boole in the 1840s. It resembles the algebra of real numbers, but with the numeric operations of multiplication xy, addition x + y, and negation −x replaced by the respective logical operations of...

.

## On–off control

For example, a thermostat
Thermostat
A thermostat is the component of a control system which regulates the temperature of a system so that the system's temperature is maintained near a desired setpoint temperature. The thermostat does this by switching heating or cooling devices on or off, or regulating the flow of a heat transfer...

is a simple negative-feedback
Negative feedback
Negative feedback occurs when the output of a system acts to oppose changes to the input of the system, with the result that the changes are attenuated. If the overall feedback of the system is negative, then the system will tend to be stable.- Overview :...

control: when the temperature (the "process variable" or PV) goes below a set point (SP), the heater is switched on. Another example could be a pressure switch on an air compressor: when the pressure (PV) drops below the threshold (SP), the pump is powered. Refrigerators and vacuum pumps contain similar mechanisms operating in reverse, but still providing negative feedback to correct errors.

Simple on–off feedback control systems like these are cheap and effective. In some cases, like the simple compressor example, they may represent a good design choice.

In most applications of on–off
Bang-bang control
In control theory, a bang–bang controller , also known as a hysteresis controller, is a feedback controller that switches abruptly between two states. These controllers may be realized in terms of any element that provides hysteresis...

feedback control, some consideration needs to be given to other costs, such as wear and tear of control valves
Control valves
Control valves are valves used to control conditions such as flow, pressure, temperature, and liquid level by fully or partially opening or closing in response to signals received from controllers that compare a "setpoint" to a "process variable" whose value is provided by sensors that monitor...

and maybe other start-up costs when power is reapplied each time the PV drops. Therefore, practical on–off control systems are designed to include hysteresis
Hysteresis
Hysteresis is the dependence of a system not just on its current environment but also on its past. This dependence arises because the system can be in more than one internal state. To predict its future evolution, either its internal state or its history must be known. If a given input alternately...

, usually in the form of a deadband
A deadband is an area of a signal range or band where no action occurs . Deadband is used in voltage regulators and other controllers...

, a region around the setpoint value in which no control action occurs. The width of deadband may be adjustable or programmable.

## Linear control

Linear control systems use linear
Linear system
A linear system is a mathematical model of a system based on the use of a linear operator.Linear systems typically exhibit features and properties that are much simpler than the general, nonlinear case....

negative feedback
Feedback
Feedback describes the situation when output from an event or phenomenon in the past will influence an occurrence or occurrences of the same Feedback describes the situation when output from (or information about the result of) an event or phenomenon in the past will influence an occurrence or...

to produce a control signal mathematically based on other variables
Continuous function
In mathematics, a continuous function is a function for which, intuitively, "small" changes in the input result in "small" changes in the output. Otherwise, a function is said to be "discontinuous". A continuous function with a continuous inverse function is called "bicontinuous".Continuity of...

, with a view to maintaining the controlled process within an acceptable operating range.

The output from a linear control system into the controlled process may be in the form of a directly variable signal, such as a valve that may be 0 or 100% open or anywhere in between. Sometimes this is not feasible and so, after calculating the current required corrective signal, a linear control system may repeatedly switch an actuator, such as a pump, motor or heater, fully on and then fully off again, regulating the duty cycle
Duty cycle
In engineering, the duty cycle of a machine or system is the time that it spends in an active state as a fraction of the total time under consideration....

using pulse-width modulation
Pulse-width modulation
Pulse-width modulation , or pulse-duration modulation , is a commonly used technique for controlling power to inertial electrical devices, made practical by modern electronic power switches....

.

### Proportional control

When controlling the temperature of an industrial
Industry
Industry refers to the production of an economic good or service within an economy.-Industrial sectors:There are four key industrial economic sectors: the primary sector, largely raw material extraction industries such as mining and farming; the secondary sector, involving refining, construction,...

furnace
Furnace
A furnace is a device used for heating. The name derives from Latin fornax, oven.In American English and Canadian English, the term furnace on its own is generally used to describe household heating systems based on a central furnace , and sometimes as a synonym for kiln, a device used in the...

, it is usually better to control the opening of the fuel valve
Valve
A valve is a device that regulates, directs or controls the flow of a fluid by opening, closing, or partially obstructing various passageways. Valves are technically pipe fittings, but are usually discussed as a separate category...

in proportion to the current needs of the furnace. This helps avoid thermal shocks and applies heat more effectively.

Proportional negative-feedback systems are based on the difference between the required set point (SP) and process value (PV). This difference is called the error. Power is applied in direct proportion to the current measured error, in the correct sense so as to tend to reduce the error (and so avoid positive feedback
Positive feedback
Positive feedback is a process in which the effects of a small disturbance on a system include an increase in the magnitude of the perturbation. That is, A produces more of B which in turn produces more of A. In contrast, a system that responds to a perturbation in a way that reduces its effect is...

). The amount of corrective action that is applied for a given error is set by the gain
Gain
In electronics, gain is a measure of the ability of a circuit to increase the power or amplitude of a signal from the input to the output. It is usually defined as the mean ratio of the signal output of a system to the signal input of the same system. It may also be defined on a logarithmic scale,...

or sensitivity of the control system.

At low gains, only a small corrective action is applied when errors are detected: the system may be safe and stable, but may be sluggish in response to changing conditions; errors will remain uncorrected for relatively long periods of time: it is over-damped
Damping
In physics, damping is any effect that tends to reduce the amplitude of oscillations in an oscillatory system, particularly the harmonic oscillator.In mechanics, friction is one such damping effect...

. If the proportional gain is increased, such systems become more responsive and errors are dealt with more quickly. There is an optimal value for the gain setting when the overall system is said to be critically damped
Damping
In physics, damping is any effect that tends to reduce the amplitude of oscillations in an oscillatory system, particularly the harmonic oscillator.In mechanics, friction is one such damping effect...

. Increases in loop gain beyond this point will lead to oscillations in the PV; such a system is under-damped
Damping
In physics, damping is any effect that tends to reduce the amplitude of oscillations in an oscillatory system, particularly the harmonic oscillator.In mechanics, friction is one such damping effect...

.

#### Under-damped furnace example

In the furnace example, suppose the temperature is increasing towards a set point at which, say, 50% of the available power will be required for steady-state. At low temperatures, 100% of available power is applied. When the PV is within, say 10° of the SP the heat input begins to be reduced by the proportional controller. (Note that this implies a 20° "proportional band" (PB) from full to no power input, evenly spread around the setpoint value). At the setpoint the controller will be applying 50% power as required, but stray stored heat within the heater sub-system and in the walls of the furnace will keep the measured temperature rising beyond what is required. At 10° above SP, we reach the top of the proportional band (PB) and no power is applied, but the temperature may continue to rise even further before beginning to fall back. Eventually as the PV falls back into the PB, heat is applied again, but now the heater and the furnace walls are too cool and the temperature falls too low before its fall is arrested, so that the oscillations continue.

#### Over-damped furnace example

The temperature oscillations that an under-damped furnace control system produces are unacceptable for many reasons, including the waste of fuel and time (each oscillation cycle may take many minutes), as well as the likelihood of seriously overheating both the furnace and its contents.

Suppose that the gain of the control system is reduced drastically and it is restarted. As the temperature approaches, say 30° below SP (60° proportional band or PB now), the heat input begins to be reduced, the rate of heating of the furnace has time to slow and, as the heat is still further reduced, it eventually is brought up to set point, just as 50% power input is reached and the furnace is operating as required. There was some wasted time while the furnace crept to its final temperature using only 52% then 51% of available power, but at least no harm was done. By carefully increasing the gain (i.e. reducing the width of the PB) this over-damped and sluggish behavior can be improved until the system is critically damped for this SP temperature. Doing this is known as 'tuning' the control system. A well-tuned proportional furnace temperature control system will usually be more effective than on-off control, but will still respond more slowly than the furnace could under skillful manual control.

### PID control

Apart from sluggish performance to avoid oscillations, another problem with proportional-only control is that power application is always in direct proportion to the error. In the example above we assumed that the set temperature could be maintained with 50% power. What happens if the furnace is required in a different application where a higher set temperature will require 80% power to maintain it? If the gain was finally set to a 50° PB, then 80% power will not be applied unless the furnace is 15° below setpoint, so for this other application the operators will have to remember always to set the setpoint temperature 15° higher than actually needed. This 15° figure is not completely constant either: it will depend on the surrounding ambient temperature, as well as other factors that affect heat loss from or absorption within the furnace.

To resolve these two problems, many feedback control schemes include mathematical extensions to improve performance. The most common extensions lead to proportional-integral-derivative control, or PID control
PID controller
A proportional–integral–derivative controller is a generic control loop feedback mechanism widely used in industrial control systems – a PID is the most commonly used feedback controller. A PID controller calculates an "error" value as the difference between a measured process variable and a...

.

#### Derivative action

The derivative
Derivative
In calculus, a branch of mathematics, the derivative is a measure of how a function changes as its input changes. Loosely speaking, a derivative can be thought of as how much one quantity is changing in response to changes in some other quantity; for example, the derivative of the position of a...

part is concerned with the rate-of-change of the error with time: If the measured variable approaches the setpoint rapidly, then the actuator is backed off early to allow it to coast to the required level; conversely if the measured value begins to move rapidly away from the setpoint, extra effort is applied—in proportion to that rapidity—to try to maintain it.

Derivative action makes a control system behave much more intelligently. On systems like the temperature of a furnace, or perhaps the motion-control of a heavy item like a gun or camera on a moving vehicle, the derivative action of a well-tuned PID controller can allow it to reach and maintain a setpoint better than most skilled human operators could.

If derivative action is over-applied, it can lead to oscillations too. An example would be a PV that increased rapidly towards SP, then halted early and seemed to "shy away" from the setpoint before rising towards it again.

#### Integral action

The integral term magnifies the effect of long-term steady-state errors, applying ever-increasing effort until they reduce to zero. In the example of the furnace above working at various temperatures, if the heat being applied does not bring the furnace up to setpoint, for whatever reason, integral
Integral
Integration is an important concept in mathematics and, together with its inverse, differentiation, is one of the two main operations in calculus...

action increasingly moves the proportional band relative to the setpoint until the PV error is reduced to zero and the setpoint is achieved.

### Other techniques

It is possible to filter
Filter (signal processing)
In signal processing, a filter is a device or process that removes from a signal some unwanted component or feature. Filtering is a class of signal processing, the defining feature of filters being the complete or partial suppression of some aspect of the signal...

the PV or error signal. Doing so can reduce the response of the system to undesirable frequencies, to help reduce instability or oscillations. Some feedback systems will oscillate at just one frequency. By filtering out that frequency, more "stiff" feedback can be applied, making the system more responsive without shaking itself apart.

Feedback systems can be combined. In cascade control, one control loop applies control algorithms to a measured variable against a setpoint, but then provides a varying setpoint to another control loop rather than affecting process variables directly. If a system has several different measured variables to be controlled, separate control systems will be present for each of them.

Control engineering
Control engineering
Control engineering or Control systems engineering is the engineering discipline that applies control theory to design systems with predictable behaviors...

in many applications produces control systems that are more complex than PID control. Examples of such fields include fly-by-wire
Fly-by-wire
Fly-by-wire is a system that replaces the conventional manual flight controls of an aircraft with an electronic interface. The movements of flight controls are converted to electronic signals transmitted by wires , and flight control computers determine how to move the actuators at each control...

aircraft control systems, chemical plants, and oil refineries. Model predictive control
Model predictive control
Model Predictive Control, or MPC, is an advanced method of process control that has been in use in the process industries such as chemical plants and oil refineries since the 1980s...

systems are designed using specialized computer-aided-design software and empirical mathematical models of the system to be controlled.

## Fuzzy logic

Fuzzy logic
Fuzzy logic
Fuzzy logic is a form of many-valued logic; it deals with reasoning that is approximate rather than fixed and exact. In contrast with traditional logic theory, where binary sets have two-valued logic: true or false, fuzzy logic variables may have a truth value that ranges in degree between 0 and 1...

is an attempt to get the easy design of logic controllers and yet control continuously-varying systems. Basically, a measurement in a fuzzy logic system can be partly true, that is if yes is 1 and no is 0, a fuzzy measurement can be between 0 and 1.

The rules of the system are written in natural language and translated into fuzzy logic. For example, the design for a furnace would start with: "If the temperature is too high, reduce the fuel to the furnace. If the temperature is too low, increase the fuel to the furnace."

Measurements from the real world (such as the temperature of a furnace) are converted to values between 0 and 1 by seeing where they fall on a triangle. Usually the tip of the triangle is the maximum possible value which translates to "1."

Fuzzy logic, then, modifies Boolean logic
Boolean logic
Boolean algebra is a logical calculus of truth values, developed by George Boole in the 1840s. It resembles the algebra of real numbers, but with the numeric operations of multiplication xy, addition x + y, and negation −x replaced by the respective logical operations of...

to be arithmetical. Usually the "not" operation is "output = 1 - input," the "and" operation is "output = input.1 multiplied by input.2," and "or" is "output = 1 - ((1 - input.1) multiplied by (1 - input.2))". This reduces to Boolean arithmetic if values are restricted to 0 and 1, instead of allowed to range in the unit interval
Unit interval
In mathematics, the unit interval is the closed interval , that is, the set of all real numbers that are greater than or equal to 0 and less than or equal to 1...

[0,1].

The last step is to "defuzzify" an output. Basically, the fuzzy calculations make a value between zero and one. That number is used to select a value on a line whose slope and height converts the fuzzy value to a real-world output number. The number then controls real machinery.

If the triangles are defined correctly and rules are right the result can be a good control system.

When a robust fuzzy design is reduced into a single, quick calculation, it begins to resemble a conventional feedback loop solution and it might appear that the fuzzy design was unnecessary. However, the fuzzy logic paradigm may provide scalability for large control systems where conventional methods become unwieldy or costly to derive.

Fuzzy electronics
Fuzzy electronics
Fuzzy electronics is an electronic technology that uses fuzzy logic, instead of the two-state Boolean logic more commonly used in digital electronics. It has a wide range of applications, including control systems and artificial intelligence.- Bibliography :...

is an electronic technology that uses fuzzy logic instead of the two-value logic more commonly used in digital electronics.

## Physical implementations

Since modern small microprocessors are so cheap (often less than \$1 US), it's very common to implement control systems, including feedback loops, with computers, often in an embedded system
Embedded system
An embedded system is a computer system designed for specific control functions within a larger system. often with real-time computing constraints. It is embedded as part of a complete device often including hardware and mechanical parts. By contrast, a general-purpose computer, such as a personal...

. The feedback controls are simulated by having the computer make periodic measurements and then calculating from this stream of measurements (see digital signal processing
Digital signal processing
Digital signal processing is concerned with the representation of discrete time signals by a sequence of numbers or symbols and the processing of these signals. Digital signal processing and analog signal processing are subfields of signal processing...

, sampled data systems
Sampled data systems
A sampled-data system is a control system where continuous-time plant is controlled with a digital device. Under periodic sampling, the sampled-data system is time-varying but also periodic, and thus it may be modeled by a simplified discrete-time system obtained by discretizing the plant...

).

Computers emulate logic devices by making measurements of switch inputs, calculating a logic function from these measurements and then sending the results out to electronically-controlled switches.

Logic systems and feedback controllers are usually implemented with programmable logic controller
Programmable logic controller
A programmable logic controller or programmable controller is a digital computer used for automation of electromechanical processes, such as control of machinery on factory assembly lines, amusement rides, or light fixtures. PLCs are used in many industries and machines...

s which are devices available from electrical supply houses. They include a little computer and a simplified system for programming. Most often they are programmed with personal computers.

Logic controllers have also been constructed from relay
Relay
A relay is an electrically operated switch. Many relays use an electromagnet to operate a switching mechanism mechanically, but other operating principles are also used. Relays are used where it is necessary to control a circuit by a low-power signal , or where several circuits must be controlled...

s, hydraulic and pneumatic devices, and electronics
Electronics
Electronics is the branch of science, engineering and technology that deals with electrical circuits involving active electrical components such as vacuum tubes, transistors, diodes and integrated circuits, and associated passive interconnection technologies...

using both transistor
Transistor
A transistor is a semiconductor device used to amplify and switch electronic signals and power. It is composed of a semiconductor material with at least three terminals for connection to an external circuit. A voltage or current applied to one pair of the transistor's terminals changes the current...

s and vacuum tube
Vacuum tube
In electronics, a vacuum tube, electron tube , or thermionic valve , reduced to simply "tube" or "valve" in everyday parlance, is a device that relies on the flow of electric current through a vacuum...

s (feedback controllers can also be constructed in this manner).