In this section, we will find any how of the PID algorithm, how to take the system of the lò sưởi systems and apply the PID algorithm in the control. Setting the set for we ta that the temperature is an extent control mong muốn, with the low as invalid number as better. Because the temperature of the temperature is exists to 400oC difficult can be temperature type, we should select the PT100 sensor sensor to the temperature on 400oC. PT100 made a metal type of the change of the power value when the changing temperature.                                                                            

                          

Resistance

100Ω at 0°C

Accuracy

-1 Model ± 0.5W

-2 Model ± 0.22W

Stability

< 0.2°C drift/year

Temperature range

-200°C to +232°C

Response time

 

(lag on metal surfaces)

Self Heating

15mW/°C (on metal surface)

 

We use the PT100 to update the temperature from the furnace, the ability to update the temperature as well as the sensitivity of PT100 is relatively slower than other temperature sensors such as LM35, DS18B20 ..., at 00 degrees of resistance of PT100 is 100Ω, incrementally 10C, the PT100 increases by 0.39Ω. That means the return value is very small. So we need a solution to solve that problem, and the option of AT-COM is to use a differential amplifier to amplify the received signal.

In addition, we need a current source to stabilize the current passing through the PT100, the common current-limiting IC is the LM334.

That is our whole system, here is the block diagram:

Stable current:

            We can refer to the schematic diagram of the LM334 current circuit in the manufacturer's datasheet.


Circuit amplification algorithm:

At 00C, the resistance of the PT100 is 100Ω. If using a 1mA current regulator, the voltage applied to its ends is U = I.R = 1 * 0.1 = 0.1V. Similarly, if the temperature is 200 degrees Celsius, the PT100 end resistance is about 178Ω (1oC resistance increases 0.35Ω), or the voltage applied to both ends of the PT100 will be U = 1 * 0.178 = 0.178V, we The voltage is very small compared to the input voltage of the PIC16F877A microcontroller is 0-5V, we use the differential amplifier to amplify the voltage in the region from 0-5V.

 Introducing the PID algorithm:

PID is the spelling of Propotional, Integral, and Derivative. To give you a better understanding of this algorithm AT-COM would like to introduce a specific example as follows:

Suppose we have a motorized toy car that pushes the car forward or pulls back in a straight line.

Let F be the force that drives the car to point O, with the requirement of speed, accuracy and stability. Let e be the distance from A to O, or call it a distance error, in fact, if the greater the distance error, then we need a sufficient force F to push the car quickly to O. mode:

          F = Kp * e (1)

          Where Kp is a positive constant we call it a P (Propotional gain), e is the distance error or is the distance from the vehicle to the destination, the goal is to bring the car to O as fast as possible. Well, in fact, if we increase the larger K, the greater the force F or the faster the O. However, according to Newton's Law 2, if the force F is too large, it accelerates faster (F = ma). The car goes to position O because of its large inertia. Although F = 0 the car is still moving out of the O loop, the value of the error is now called overshot. The overshot value shows the eigenvalue error, but this time it is negative, creating an inverted force F that pulls the car back to point O. But once again, the value Kp is large. The F force is also large and again pushes the car off the O position. The process continues to move around the O point.

          It is ideal that if we add the winning element, when the vehicle is far from the O, the F force is large to push the car back to O, when the car reaches O, the winning element will stop the car. We need to know, the maximum speed when the car is in the equilibrium position or accuracy of the car is at position O. Or in the position O error e will change the most. On the other hand, the rate of change of e can be calculated by the derivative of this variable over time. Thus, when the car from A goes to O, the derivative c increases the value of f, but vice versa with force F. If using the derivative as the win, it can reduce the overshot of the car. So we will have controllers like stars:

          F = Kp * e + Kd * (de / dt) (2)

          In it, (de / dt) is the velocity of change of the error e, Kd is the non-negative constant called the Derivative gain.

          The presence of D reduces the overshot of the vehicle, as the car approaches O. The force F consists of two components Kp * e> = 0 and Kd * (de / dt) <= 0.

          Assuming that component D is much larger than component P or that the component P is very small, then the car approaches O or not really to O, the car has stopped, the component D is zero. will stop because of component P and error e is too small to overcome static friction, the error e is now called steady state error. In order to avoid static errors, one adds a component to the error control function. When the static state occurs, the two components P and D lose their effect. The addition of the error line increases the force F over time. At some point the force F is sufficient to overcome the static friction. O. The main component of the error is component I in the PID controller. It is computed by the integral of e over time.

          Here we have a full PID controller as a star:

          F = Kp * e + Kd * (de / dt) + Ki * (3)

          So we have a complete algorithm to control. The important thing is how do we apply it on a case by case basis.

 

Control circuit for furnace control system using PIC16F877A:

 

With the above schematic, we will develop a heating system, using a heat resistor to heat the furnace, the PT100 measures the temperature within the range 0 ° to 400 ° C, the voltage value introduced through an algorithmic amplifier to amplify the high signal and bring it into the VDK (VDK here is the PIC 16F877A) calculate the PID parameters and the effect on the thermal resistance by PWM pulse. We can also develop a VB interface for easy tracking and computation.