Inst ToolsInst ToolsInst Tools
  • Ask
  • Courses
  • Videos
  • Q & A
    • Interview
      • Instrumentation
      • Electronics
      • Electrical
      • Practical Questions
    • MCQ
      • Instrumentation MCQ
      • Electrical MCQ
      • Electronics MCQ
      • Control Systems MCQ
      • Analog Electronics MCQ
      • Digital Electronics MCQ
      • Power Electronics MCQ
      • Microprocessor MCQ
      • Multiple Choice Questions
  • EE
    • Electronics
      • Electronics Q & A
      • Electronic Basics
      • Electronic Devices & Circuits
      • Electronics Animation
      • Digital Electronics
    • Electrical
      • Electrical Basics
      • Electrical Q & A
      • Power Electronics
      • Electrical Machines
      • Electrical Animation
      • Power Systems
      • Switchgear & Protection
      • Transmission & Distribution
  • Measure
    • Control Valves
    • Calibration
    • Temperature
    • Pressure
    • Flow
    • Level
    • Analyzers
    • Switches
    • Vibration
    • Solenoid Valve
  • Control
    • PLC Tutorials
    • Control Systems
    • Safety Instrumented System (SIS)
    • Communication
    • Fire & Gas System
  • More
    • Design
    • Tools
    • Animation
    • Basics
    • Formulas
    • Standards
    • TextBooks
    • Common
    • Software
    • Excel Tools
    • Erection & Commissioning
    • Process Fundamentals
    • Videos
    • Books
Search
All rights reserved. Reproduction in whole or in part without written permission is prohibited.
Reading: PID Controller Theory
Share
Notification Show More
Font ResizerAa
Inst ToolsInst Tools
Font ResizerAa
  • Courses
  • PLC Tutorials
  • Control Systems
Search
  • Ask
  • Courses
  • Videos
  • Q & A
    • Interview
    • MCQ
  • EE
    • Electronics
    • Electrical
  • Measure
    • Control Valves
    • Calibration
    • Temperature
    • Pressure
    • Flow
    • Level
    • Analyzers
    • Switches
    • Vibration
    • Solenoid Valve
  • Control
    • PLC Tutorials
    • Control Systems
    • Safety Instrumented System (SIS)
    • Communication
    • Fire & Gas System
  • More
    • Design
    • Tools
    • Animation
    • Basics
    • Formulas
    • Standards
    • TextBooks
    • Common
    • Software
    • Excel Tools
    • Erection & Commissioning
    • Process Fundamentals
    • Videos
    • Books
Follow US
All rights reserved. Reproduction in whole or in part without written permission is prohibited.
Inst Tools > Blog > Control Systems > PID Controller Theory

PID Controller Theory

Last updated: July 29, 2019 10:23 am
Editorial Staff
Control Systems
12 Comments
Share
13 Min Read
SHARE

Anatomy of a Feedback Control System

Contents
PID ControllerUnderstanding the PID controllerProportional (P)Integral (I)Derivative (D)Under The Hood of The PID ControllerDerivativesIntegrativesProportional controlA match made in heaven:Adjusting the Integral ActionDerivative Action – predicting the futureArticles You May Like :

Here is the classic block diagram of a process under PID Control.

PID Controller

PID Controller Block DiagramWhat’s going on this diagram?

The Setpoint (SP) is the value that we want the process to be.

For example, the temperature control system in our house may have a SP of 22°C. This means that

“We want the heating and cooling process in our house to achieve a steady temperature of as close to 22°C as possible”

The PID controller looks at the setpoint and compares it with the actual value of the Process Variable (PV). Back in our house, the box of electronics that is the PID controller in our Heating and cooling system looks at the value of the temperature sensor in the room and sees how close it is to 22°C.

If the SP and the PV are the same – then the controller is a very happy little box. It doesn’t have to do anything; it will set its output remain same value.

However, if there is a disparity between the SP and the PV we have an error and corrective action is needed. In our house this will either be cooling or heating depending on whether the PV is higher or lower than the SP respectively.

Let’s imagine the temperature PV in our house is higher than the SP. It is too hot. The air-con is switched on and the temperature drops.

The sensor picks up the lower temperature, feeds that back to the controller, the controller sees that the “temperature error” is not as great because the PV (temperature) has dropped and the air con is turned down a little.

This process is repeated until the house has cooled down to 22°C and there is no error.

Then a disturbance hits the system and the controller has to kick in again.

In our house the disturbance may be the sun beating down on the roof, raising the temperature of the air inside.

So that’s a really, really basic overview of a simple feedback control system. Sounds dead simple eh?

Understanding the PID controller

Unfortunately, in the real world we need a controller that is a bit more complicated than the one described above, if we want top performance form our loops. To understand why, we will be doing some “thought experiments” where we are the controller.

When we have gone through these thought experiments we will appreciate why a PID algorithm is needed and why/how it works to control the process.

We will be using the analogy of changing lanes on a freeway on a windy day. We are the driver, and therefore the controller of the process of changing the car’s position.

Here’s the Block Diagram we used before, with the labels changed to represent the car-on-windy-freeway control loop.

PID Controller Example

Notice how important closing the feedback loop is. If we removed the feedback loop we would be in “open loop control”, and would have to control the car’s position with our eyes closed!

Thankfully we are under “Closed loop control” -using our eyes for position feedback.

As we saw in the house-temperature example the controller takes the both the PV and SP signals, which it then puts through a black box to calculate a controller output. That controller output is sent to an actuator which moves to actually control the process.

We are interested here in what the black box or controller actually does, which is that it applies 1, 2 or 3 calculations to the SP and Measured PV signals.

These calculations, called the “Modes of Control” include:

  1. Proportional (P)

  2. Integral (I)

  3. Derivative (D)

Under The Hood of The PID Controller

Here’s a simplified block diagram of what the PID controller does:

PID Controller Functionality

It is really very simple in operation. The PV is subtracted from the SP to create the Error. The error is simply multiplied by one, two or all of the calculated P, I and D actions (depending which ones are turned on). Then the resulting “error x control actions” are added together and sent to the controller output.

These 3 modes are used in different combinations:

P – Sometimes used

PI – Most often used

PID – Sometimes used

PD – rarely used but can be useful for controlling servomotors.

Derivatives

Go into the control room of a process plant and ask the operator:

“What’s the derivative of reactor 4’s pressure?”

And the response will typically be:

“Bugger off smart arse!”

However go in and ask:

“What’s the rate of change of reactor 4’s pressure?”

And the operator will examine the pressure trend and say something like:

“About 5 PSI every 10 minutes”

He’s just performed calculus on the pressure trend! (Don’t tell him though or he’ll want a pay raise)

So derivative is just a mathematical term meaning rate-of-change. That’s all there is to it.

Integratives

Is it any wonder that so many people run scared from the concept of integrals and integration, when this is a typical definition?

The integral of a signal is the sum of all the instantaneous values that the signal has been, from whenever you started counting until you stop counting.

So if you are to plot your signal on a trend and your signal is sampled every second, and let’s say you are measuring temperature. If you were to superimpose the integral of the signal over the first 5 seconds – it would look like this:

Integral Controller Response

The green line is your temperature, the red circles are where your control system has sampled the temperature and the blue area is the integral of the temperature signal. It is the sum of the 5 temperature values over the time period that you are interested in. In numerical terms it is the sum of the areas of each of the blue rectangles:

(13 x 1)+(14×1)+(13×1)+(12×1)+(11×1) = 63 °C s

The curious units (degrees Celsius x seconds) are because we have to multiply a temperature by a time – but the units aren’t important.

As you can probably remember from school –the integral turns out to be the area under the curve. When we have real world systems, we actually get an approximation to the area under the curve, which as you can see from the diagram gets better, the faster we sample.

Proportional control

Here’s a diagram of the controller when we have enabled only P control:

Proportional Controller Block Diagram

In Proportional Only mode, the controller simply multiplies the Error by the Proportional Gain (Kp) to get the controller output.

The Proportional Gain is the setting that we tune to get our desired performance from a “P only” controller.

A match made in heaven:

The P + I Controller If we put Proportional and Integral Action together, we get the humble PI controller. The Diagram below shows how the algorithm in a PI controller is calculated.

PI Controller Block Diagram

The tricky thing about Integral Action is that it will really screw up your process unless you know exactly how much Integral action to apply.

Adjusting the Integral Action

The way to adjust how much Integral Action you have is by adjusting a term called “minutes per repeat”. Not a very intuitive name is it?

So where does this strange name come from? It is a measure of how long it will take for the Integral Action to match the Proportional Action.

In other words, if the output of the proportional box on the diagram above is 20%, the repeat time is the time it will take for the output of the Integral box to get to 20% too.

And the important point to note is that the “bigger” integral action, the quicker it will get this 20% value. That is, it will take fewer minutes to get there, so the “minutes per repeat” value will be smaller.

In other words the smaller the “minutes per repeat” is the bigger the integral action.

To make things a bit more intuitive, a lot of controllers use an alternative unit of “repeats per minute” which is obviously the inverse of “minutes per repeat”.

The nice thing about “repeats per minute” is that the bigger it is – the bigger the resulting Integral action is.

Derivative Action – predicting the future

OK, so the combination of P and I action seems to cover all the bases and do a pretty good job of controlling our system. That is the reason that PI controllers are the most prevalent. They do the job well enough and keep things simple. Great.

But engineers being engineers are always looking to tweak performance.

They do this in a PID loop by adding the final ingredient: Derivative Action.

So adding derivative action can allow you to have bigger P and I gains and still keep the loop stable, giving you a faster response and better loop performance.

If you think about it, Derivative action improves the controller action because it predicts what is yet to happen by projecting the current rate of change into the future. This means that it is not using the current measured value, but a future measured value.

The units used for derivative action describe how far into the future you want to look. i.e. If derivative action is 20 seconds, the derivative term will project the current rate of change 20 seconds into the future.

The big problem with D control is that if you have noise on your signal (which looks like a bunch of spikes with steep sides) this confuses the hell out of the algorithm. It looks at the slope of the noise-spike and thinks:

“Holy crap! This process is changing quickly, lets pile on the D Action!!!”

And your control output jumps all over the place, messing up your control.

Of course you can try and filter the noise out, but my advice is that, unless PI control is really slow, don’t worry about switching D on.

Finally understand the knowledge of P, I & D Controllers Philosophy and apply the same to your process requirement and tune the controllers with maximum bumpless control.

Articles You May Like :

How to tune a PID Controller ?

Integral Liquid Level Control

Control System Architecture

PID Controller Gains Effect

Industrial Control Systems

Don't Miss Our Updates
Be the first to get exclusive content straight to your email.
We promise not to spam you. You can unsubscribe at any time.
Invalid email address
You've successfully subscribed !
Recognizing a Porpoising PID Controller
Introduction to PlantPAx Distributed Control System
How to Download PlantPAx Library?
Derivative (Rate) Control Theory
Difference between DCS, PLC, and RTU ?
Share This Article
Facebook Whatsapp Whatsapp LinkedIn Copy Link
Share
12 Comments
  • Anonymous says:
    May 13, 2015 at 4:03 am

    Simple explanations on controllers. Thanks

    Reply
    • Hemal Vadgama says:
      June 22, 2015 at 4:27 am

      Thanks & Very Easy to Learn Instrumentation Controllers

      Reply
  • Hemal Vadgama says:
    June 22, 2015 at 4:28 am

    Very Easy to learn about Controllers.

    Reply
    • S Bharadwaj Reddy says:
      June 22, 2015 at 5:50 am

      You are welcome my friend. Thanks for sharing your opinion with us. Keep visiting.

      Thanks
      S Bharadwaj Reddy

      Reply
  • RAB NAWAZ KHAN says:
    August 23, 2015 at 7:47 am

    Plz Explan local instrument and remote instrument with example.
    Thanks a lot.

    Reply
    • S Bharadwaj Reddy says:
      August 25, 2015 at 7:41 am

      Local instrument : Field transmitter reading in field, Pressure gauge, Loop power indictaor
      Remote instrument : PID controller in DCS or PLC, Transmitter reading in control room

      Reply
  • Neeraj Sharma says:
    January 29, 2016 at 10:56 am

    thanks sir
    please add more topics about vfd ( Variable frequency drive)

    Reply
  • Tarun says:
    May 27, 2016 at 5:45 pm

    Simple to understand….Sir I want to know the basics of plc,please help me..

    Reply
  • Saud says:
    May 30, 2016 at 5:22 pm

    Thanks alot it is very clear and simple

    Reply
  • Manikandan R says:
    September 16, 2016 at 5:59 pm

    Dear sir,
    What is smart positioner how its work , what is the differents (smart positioner) with display unit and without display unit , how to take maintenance and calibration etc…

    Reply
  • yhnm says:
    December 22, 2017 at 3:35 pm

    Thank you a simple method for learning control systems

    Reply
  • Gadisa Bikila says:
    March 9, 2020 at 6:27 pm

    Best of the processing

    Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Stay Connected

128.3kFollowersLike
69.1kFollowersFollow
208kSubscribersSubscribe
38kFollowersFollow

Categories

Recent Comments

  • Guifty Shimica on Top Non-PLC Certification Courses for Automation Professionals
  • Guifty Shimica on Top Non-PLC Certification Courses for Automation Professionals
  • MIHARITSOA Aina Sitraka on Top Non-PLC Certification Courses for Automation Professionals
  • Vaishnavi on Free Instrumentation Course for Trainee Engineers

Related Articles

Distributed Control System Architecture

Control System Architecture

Maintenance Override Switch (MOS)

What is Maintenance Override Switch (MOS) ?

Electrical Circuit Label Schematic

Label the Electrical Circuit Schematic

Alarm prioritization

What is Alarm Prioritization? – Types of Alarms

Why Grounding

Basics of Grounding

Opposite Acting Valves

What is Split Range Control Loop ?

Loop Power Indicator Principle

Basics of Loop Powered Devices

NAMUR OPEN ARCHITECTURE

What is NAMUR OPEN ARCHITECTURE?

More Articles

SIL Levels

Understanding Safety Integrity Level IEC 61511

Advantages & Disadvantages of Air Insulated Substation

Advantages & Disadvantages of Air Insulated Substation

Types of Batteries

Cells and Batteries – Types, Applications, Explanation

Combining Independent Current Sources in Parallel

Combining Independent Current Sources in Parallel

PLC Documents

PLC System Documentation

Transducers MCQ

Transducers MCQ

Weigh feeders Principle

What is a Weigh Feeder?

Hydrazine analyzer Working Principle

Hydrazine Analyzer Working Principle

Follow US
All rights reserved. Reproduction in whole or in part without written permission is prohibited.
Welcome Back!

Sign in to your account

Username or Email Address
Password

Lost your password?