Welcome again!!! Now as we are aware of the Drone or Multirotors, we must discuss about some of the OEM parts of rotors. Here we will get introduced about the one of the primary component of the whole Quadcopter/Multirotors system. Before knowing about what is pid you must know the **basics of Quadcopters or UAV or Multirotors**.As we are discussing about the PID so we must know the about the system on which we want to implement it.

### Content of Learning:

## What is PID?

PID (Propotional, Integral, Derivative) is a control ‘algorithm’ which means Proportional integral and derivative, control algorithm in sense it controls system’s current output with respect to Set value & previous output and the difference between these quantities is called Error. PID controller is always work with the **Close loop systems **as figure-1.

There are some points, you should know about them before move ahead:

**Set point or Set value:**Set point is that value which we want from our system.

**Set value = Desired output of our system**

**Error:**Error is basically the difference between set point and sensor measurement.

**Error = Set value –** **Sensor measurement**

**Control calculation:**That block consists of PID control algorithm which reduces the error value and give net value to our system**.**

** **Error is the key point. This is given to PID control block through feedback mechanism.

Now question rises, how do we measure the feedback to compare the output with set value? This job is done by the simple Sensors which are setup in between output and Set value.

Now comes to working of P, I and D.

__PROPORTIONAL__:

As its name suggests, Proportional part of PID control algorithm is that part which works like a camera and record each and every moments of error value which is basically the difference between the **Set value** and **previous output** of system.

Mathematically we can say that output of Proportional Block is directly proportional to Error value.

**Output=Gain(Kp) * Error**

As shown in figure camera capture each and every second image of running man.

__INTEGRAL__:

Integral means **Area under the curve,** it analysis area of the error curve. And after that integral algorithm try to reduce it towards zero by taking some favorable action.

**Let’s take an example:**

Suppose we have to design a system which makes Mr. A’s stomach healthy so we calculates how much food is currently present in Mr. A’s stomach, firstly we have to design a sensor which sense amount of food and gives the area taken by the food wrt. Area of the stomach and it varies every time when Mr.A comes from washroom. That difference is a Sinusoidal graph whose net area is calculated by **Integral algorithm** and try to reduce to make Mr. A healthy.

**Let’s take another example**:

In case of a water sprinkler system basically it design to sprinkling the water in garden initially it is an open loop system ,that means our system does not know at time t ,garden required more sprinkling or not or we can say that it is manually controlled .

Now we are going to put a moisture sensor in feedback and make it close loop system, and put a set value for comparison and error give into **I Controller **it calculate net area of error function and reduce it zero to make system more stable.

**Output=Gain (Ki) * ∫(Error) dt**

### __DERIVATIVE__:

Derivative part of PID algorithm calculates the slope of error curve at each point and find its equivalent slope of error and feed it to the system which reduces it to Zero to make system more stable.

**Let’s take an example: **

Suppose I want to move my car from start point to destination point and it has error of deviation from its path or overshoot the location of destination point. So we have to design a system which reduces these errors. First we took feedback from its output (which provides current location) at every point wrt. Start point and give it to the **D Controller** which is accelerate and retard the car according to destination point and reduce previous errors.

**Let’s take another example: **

Suppose we have to design a system which take care of human heart wrt a healthy heart it sense activity of heart through ECG machine and if an error occurs that means comparison is non-zero, then inject medicine till the slope of that error function at any point is not equal to zero. When the error becomes zero that means the system becomes stable i.e. the heart is healthier than before.

**Output=Gain(Kd) * d/dt(Error)**

So here we discussed about the various parameters of PID Control which are as follows:

**P** for Propotional

**I** for Integral

**D** for Derivative

Hope you liked the above article about **What is PID** ? How can we use it in various systems? If you liked the above given article do share us on social networking like Facebook, Google, Twitter and others.

What type of motors are you using?

hi laksh, recently we are testing our Quad with tiger motors , if you are interested to know about various parameters of motors then you can move on that-

http://dronepic.co.in/blog/category/quadcopter/motors

thank you!!