0% found this document useful (0 votes)
6 views

PID Controller

The PID (Proportional Integral Derivative) Controller is an algorithm used to correct a robot's movement based on sensor readings through feedback. It consists of three main components: Proportional, Derivative, and Integral, each serving a specific function to minimize errors and ensure smooth operation. The controller utilizes various gains to adjust the influence of each component, allowing for precise control of the robot's actions.

Uploaded by

Eunita Korankye
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views

PID Controller

The PID (Proportional Integral Derivative) Controller is an algorithm used to correct a robot's movement based on sensor readings through feedback. It consists of three main components: Proportional, Derivative, and Integral, each serving a specific function to minimize errors and ensure smooth operation. The controller utilizes various gains to adjust the influence of each component, allowing for precise control of the robot's actions.

Uploaded by

Eunita Korankye
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

PID Controller

Proportional Integral Derivative Controller


PID Controller
The PID is an algorithm that is used to correct a system or robot based on it’s sensor
values.
The PID controls the robot by taking in the sensor readings and moving the robot’s
motors to correct the sensor readings.
The PID is able to do this because of a concept called “Feedback”.
Feedback is basically when you have the opportunity to access some data from your
previous actions.
This feedback helps the PID a lot, the PID with the help of the feedback is able to
anticipate some “errors” it can make in the future.
With the future in full view the PID acts to solve it before it happens.
PID Controller
Let’s take a look at how the PID is able to do all of this. Before we do that we have to
understand some words:
Error is the difference between two sensor values or the difference between a
reference value and a sensor value.
A Reference value is a carefully selected value that is used as a mark for the robot to
maintain.
Proportional is when a value is directly related to another value by just one factor or
multiplying the value by just one number.
Derivative is a fancy word for the change or difference between two values.
Integral is basically the sum of a range of values
PID Controller
Let’s take a deeper look at the inner workings of the PID.
The PID has three main parts:
• The Proportional part
• The Derivative part
• The Integral Part
The Proportional Part:
The proportional part is represented by this equation:
𝑒𝑟𝑟𝑜𝑟 = 𝑅𝑒𝑓𝑒𝑟𝑒𝑛𝑐𝑒 𝑣𝑎𝑙𝑢𝑒 − 𝑆𝑒𝑛𝑠𝑜𝑟 𝑅𝑒𝑎𝑑𝑖𝑛𝑔
𝑃𝑟𝑜𝑝𝑜𝑟𝑡𝑖𝑜𝑛𝑎𝑙 𝐸𝑟𝑟𝑜𝑟 = 𝑒𝑟𝑟𝑜𝑟 × 𝑃𝑟𝑜𝑝𝑜𝑟𝑡𝑖𝑜𝑛𝑎𝑙 𝐺𝑎𝑖𝑛
PID Controller
The Proportional Gain is a value that is multiplied by the error.
It is a value that can take any value from greater than 0.
The proportional gain is usually kept as small as possible to make the robot move
smoothly and straight on the line.
The Derivative Part:
The derivative part is used to check how much the errors are changing as the robot
follows the line.
The derivative part is represented by these equations:
𝐸𝑟𝑟𝑜𝑟 𝐶ℎ𝑎𝑛𝑔𝑒 = 𝐸𝑟𝑟𝑜𝑟 − 𝑃𝑟𝑒𝑣𝑖𝑜𝑢𝑠 𝐸𝑟𝑟𝑜𝑟
𝐷𝑒𝑟𝑖𝑣𝑎𝑡𝑖𝑣𝑒 𝐸𝑟𝑟𝑜𝑟 = 𝐸𝑟𝑟𝑜𝑟 𝐶ℎ𝑎𝑛𝑔𝑒 × 𝐷𝑒𝑟𝑖𝑣𝑎𝑡𝑖𝑣𝑒 𝐺𝑎𝑖𝑛
PID Controller
The Previous Error variable is the way feedback is achieved. It is where the error from
the previous movement is stored.
This is how feedback is achieved:
𝑃𝑟𝑒𝑣𝑖𝑜𝑢𝑠 𝐸𝑟𝑟𝑜𝑟 = 𝐸𝑟𝑟𝑜𝑟
The Derivative gain is a value that is multiplied by the change in error.
This helps the robot to be able to anticipate any errors it and correct them before they
happen.
The Derivative Gain can have any value, it is advised to use values in the tens (10, 20,
etc.)
PID Controller
The Integral part:
The integral part is used to fine tune the whole algorithm.
It makes the robot run smoothly on the line.
It is represented by these equations:
𝐼𝑛𝑡𝑒𝑔𝑟𝑎𝑙 𝐸𝑟𝑟𝑜𝑟 = 𝐹𝑜𝑟𝑔𝑒𝑡𝑓𝑢𝑙 𝐹𝑎𝑐𝑡𝑜𝑟 × 𝐼𝑛𝑡𝑒𝑔𝑟𝑎𝑙 𝐸𝑟𝑟𝑜𝑟
𝐼𝑛𝑡𝑒𝑔𝑟𝑎𝑙 𝐸𝑟𝑟𝑜𝑟 = 𝐼𝑛𝑡𝑒𝑔𝑟𝑎𝑙 𝐸𝑟𝑟𝑜𝑟 + 𝐸𝑟𝑟𝑜𝑟 × 𝐼𝑛𝑡𝑒𝑔𝑟𝑎𝑙 𝐺𝑎𝑖𝑛
𝑃𝐼𝐷𝐸 = 𝐼𝑛𝑡𝑒𝑔𝑟𝑎𝑙 𝐸𝑟𝑟𝑜𝑟 + 𝑃𝑟𝑜𝑝𝑜𝑟𝑡𝑖𝑜𝑛𝑎𝑙 𝐸𝑟𝑟𝑜𝑟 + 𝐷𝑒𝑟𝑖𝑣𝑎𝑡𝑖𝑣𝑒 𝐸𝑟𝑟𝑜𝑟
Forgetful Factor is a value that is multiplied with the Integral error to reduce its value.
The forgetful factor is given a very small value usually in the order of × 10−5
PID Controller
The Integral Gain is a factor that is multiplied by the sum of the integral error and
error.
Integral Gain is often kept very small also to reduce the effect of the Integral Error on
the robot.

You might also like