i want to design a temperature controller using lm35 and pic16f876 and control the heater through pid method.
i have finished with the lm35 temperature display with pic.
now i am stuck with pid. i have to control heater with user programmable "p", "i" and "d" seperately.that means . if the user sets a value of p then the control of heater should change accordingly. similarly other two.
If you google there's plenty of examples out there, I also seem to recall there's a MicroChip application note about PID?, not to mention information on the PICList.
In order to do a PID algorithm, you must understant the meaning of the I and the D in the acronym PID. The I stands for integral, and the D stands for derivative. If you don't know what these terms mean then I think you will have a difficult time understanding how to construct and tune the algorithm.
You already have figured out that P stands for proportional. That's one down and two to go.
neelam, have u done some projects on pic r ru trying pid directly, i have done some projects on pic, i was been asked to do project on pid controller and i was help less if u know this plz mail me on mudassirxlnc@yahoo.co.in
You must not have read my previous post where I defined:
'p' is for proportional.
'i' is for integral.
'd' is for derivative.
Do you know, or can you have someone trnaslate those words for you? If you do not understnad their meaning then constructing and tuning a PID algorithm will be difficult.
The basic idea of the algorithm is to compare a controled variable, V, with a setpoint, S. The difference is an error signal E.
Code:
E = V - S
To get the proportional term we multiply the error signal, E by some constant Kp. Kp is often call the constant of proportionality. To get the integral term we multiply the integral of (E*dt) by a constant Ki. To get the derivative term we multiply the derivative of E with respect to time ( dE/dt) by a constant Kd. In continuous time, the value of the controlled variable V, is set equal to the sum of the three terms.
thanks for help. but m not able to understand that wht is the value of kp that i have to give in the formula and also how to find kp and other ki and kd stuff.