Topic: PID in software

 

I wrote the code for the numeric differentiation and integration and applied for PID control. The control loop is not complete. The PID works on an artificial temperature difference profile.


I have not received the components from element14. So I could not complete the control loop. On Tuesday, I purchased most of the components from the local market. It was overcrowded, I had to spend the whole day there. But I could not finish the purchase. I have to go again. Today I purchased one more laptop for working in the college. The present laptop is working in the safe mode so PSOC creator could not be installed. Necessary installations took the whole day. It will take some more time to complete the installation.

 

I have got a temperature and humidity sensor. But I have to test it.  Now for the PID I created an artificial profile. Following gives the result in i2c communication for the temperature difference. The temperature difference is circled with green. In i2c I could transmit only uint8. So I scaled the float32 data, The zero temperature difference gets scaled to 7F. Execution is so fast in the very beginning of i2c operation, the control temperature was reached. So I put a huge delay in the loop. It can be seen that, after 1C iteration the controlled temperature is reached. After that it is looping. The last data is for 1E times looping.


post_9_i2c.jpg