Intro to Control Theory and PID Loops
Control Examples
- Car cruise control
- Thermostat for Heat or Air Conditioning
- Navigational control for maintaining a ships heading
- Autopilot for an aircraft
- Keeping a Tesla in its own lane
Robotic Control Examples
Simple
- Set a motor speed by setting a voltage to be supplied immediately (MAX_SPEED)
- Stop a motor from running by setting the voltage to zero immediately
- Disadvantages?
- Advantages?
Trapezoidal
- Ramp the motor speed up to the set voltage
- Stop a motor from running by ramping the voltage down to zero.
- Disadvantages?
- Advantages?
Feedback/Closed Loop
- Keep a wheel spinning at a constant velocity, despite varying resistance slowing it down
- Maintain a constant speed up a ramp of varying inclination
- Rotate toward a target at a variable rate. The rate varies such that it rotates faster when it has more to turn.
See image: Stepped output and ramped output
Control Theory Intro
- Wikipedia Control Theory See Intro, Open-loop and closed-loop (feedback) control, and Other examples, where much of the following is cribbed from.
Control theory deals with the controlling dynamic systems. The objective is to develop a control model for controlling such systems using a control action in an optimum manner without delay or overshoot and ensuring stability.
To do this, a controller with the requisite corrective behavior is required. This controller monitors the controlled process variable (PV), and compares it with the reference or set point (SP). The difference between actual (PV) and desired value (SP) of the process variable, called the error signal, or SP-PV error, is applied as feedback to generate a control action to bring the controlled process variable to the same value as the set point. Other aspects which are also studied are controllability and observability. This is the basis for the advanced type of automation that revolutionized industries. This is feedback control, which involves taking measurements using a sensor and making calculated adjustments to keep the measured variable within a set range by means of a "final control element", such as a control valve.
Open Loop and Closed Loop
Fundamentally, there are two types of control loops: open loop control and closed loop (feedback) control.
In open loop control, the control action from the controller is independent of the "process output" (or "controlled process variable" - PV). A good example of this is a central heating boiler controlled only by a timer, so that heat is applied for a constant time, regardless of the temperature of the building. The control action is the timed switching on/off of the boiler, the process variable is the building temperature, but neither is linked.
In closed loop control, the control action from the controller is dependent on feedback from the process in the form of the value of the process variable (PV). In the case of the boiler analogy, a closed loop would include a thermostat to compare the building temperature (PV) with the temperature set on the thermostat (the set point - SP). This generates a controller output to maintain the building at the desired temperature by switching the boiler on and off. A closed loop controller, therefore, has a feedback loop which ensures the controller exerts a control action to manipulate the process variable to be the same as the "Reference input" or "set point". For this reason, closed loop controllers are also called feedback controllers.
The definition of a closed loop control system according to the British Standard Institution is "a control system possessing monitoring feedback, the deviation signal formed as a result of this feedback being used to control the action of a final control element in such a way as to tend to reduce the deviation to zero."
Likewise; "A Feedback Control System is a system which tends to maintain a prescribed relationship of one system variable to another by comparing functions of these variables and using the difference as a means of control."
Other Examples (straight from wikipedia)
An example of a control system is a car's cruise control, which is a device designed to maintain vehicle speed at a constant desired or reference speed provided by the driver. The controller is the cruise control, the plant is the car, and the system is the car and the cruise control. The system output is the car's speed, and the control itself is the engine's throttle position which determines how much power the engine delivers.
A primitive way to implement cruise control is simply to lock the throttle position when the driver engages cruise control. However, if the cruise control is engaged on a stretch of non-flat road, then the car will travel slower going uphill and faster when going downhill. This type of controller is called an open-loop controller because there is no feedback; no measurement of the system output (the car's speed) is used to alter the control (the throttle position.) As a result, the controller cannot compensate for changes acting on the car, like a change in the slope of the road.
In a closed-loop control system, data from a sensor monitoring the car's speed (the system output) enters a controller which continuously compares the quantity representing the speed with the reference quantity representing the desired speed. The difference, called the error, determines the throttle position (the control). The result is to match the car's speed to the reference speed (maintain the desired system output). Now, when the car goes uphill, the difference between the input (the sensed speed) and the reference continuously determines the throttle position. As the sensed speed drops below the reference, the difference increases, the throttle opens, and engine power increases, speeding up the vehicle. In this way, the controller dynamically counteracts changes to the car's speed. The central idea of these control systems is the feedback loop, the controller affects the system output, which in turn is measured and fed back to the controller.
Using Multiple (Different) Controls for Different Portions of a Non Linear Process
Suppose you have to control a single process variable, but you need it to behave differently near different setpoints or when approaching from above or below.
- Non-linear Processes and Design Level Of Operation (DLO) To tune a non-linear process that responds differently to changes at different levels of output, you need to determine a representative operating point (DLO). Maybe you need more than one because there is too much variation, in which case - you need more than one controller, each based on its own range of operation.
So the answer is to use different controllers for different portions of the response curve. You can choose from open or closed loop controllers, PID and non PID, or all PID but different parameters.
PID Loops
PID Control is a closed loop control architecture that uses monitoring and feedback to improve control of a process variable - that is something you wish to control. It is more robust than open loop controllers that have a set it and forget it type of mentality, which do not monitor what is happening.
- Control Gurus - The P-Only Control Algorithm A decent intro to Proportional Control, and a solid basis for understanding PID Control. Careful - ControlGuru uses Kc instead of Kp, and Kc/Ti instead of Ki. Essentially works the same.
- Wikipedia PID Controller
- Talon SRX PIDF controller PID Control built into the Talon SRX controllers
- Control Gurus - Table of Contents Some of the most comprehensive documentation on PID Control on the net. Includes beginner topics and advanced topics.