colinl / node-red-contrib-pid

A node-red PID loop controller node intended for the control of real world processes
Apache License 2.0
26 stars 17 forks source link

Integral Locked, not expected to be locked, as SetPoint and Payload is close to each other. #31

Closed oivheg closed 3 months ago

oivheg commented 3 months ago

Hello.

I am trying to use this node for my heatpump, controlling the temperature and speed.
I am using the generated output between 0 and 1 to controll the speed etc. I have tried using your example and doing some configurations my self.

It works for a while, but after a period of time i get Integral Locked and i do not completly understand why. Because the SetPoint and Payload value are almost the same, eg SetPoint 20 and Payload = 19 . Then i expect the output value to be closer to 0, as there is little difference.

When i get the Integral Locked, then the output payloada is always 1, resulting in my heatpump running at full speed, etc.. wich is outside what i expects as the temperatures i input are almost the same value, and i am expecting it to be clsoe to 0.

I check for values every 10 minutes and run it troug the PID.

when i try to fix it, my soulution have been to creat a new pid, with the same data, and thet it works for a while, before it gets locked again.

My Questions are:

I am using Node-RED 4.0.0 Beta2.

image image

oivheg commented 3 months ago

I found i had configured the Proprotional bad wrong in this case, that fixed it for mabye 10 minutes So is it mabye the Maxium Sample interval, that i have configured wrongly?

image

image

colinl commented 3 months ago

To see what is going on you need to plot a chart showing the PID node output and the PV value (and the setpoint if that is changing). That should show us what is going on.

I check for values every 10 minutes and run it troug the PID.

Do you mean that you are only sending the pid node a new PV value every 10 minutes? You probably need to feed it in about once a minute.

oivheg commented 3 months ago

To see what is going on you need to plot a chart showing the PID node output and the PV value (and the setpoint if that is changing). That should show us what is going on.

I check for values every 10 minutes and run it troug the PID.

Do you mean that you are only sending the pid node a new PV value every 10 minutes? You probably need to feed it in about once a minute.

Yes i only send every 10 minutes, as i do not need to check/change the heatpump every minute..
But if that is needed to have it working ,then i can work around that.

colinl commented 3 months ago

i only send every 10 minutes, as i do not need to check/change the heatpump every minute

The PID needs to be given information more rapidly than anything can change in the process in order to learn about the process and how to control it. The room temperature (I presume that is what you are measuring) could change by several tenths of a degree in 10 minutes, and the PID node needs to know that. You have the integral time set to 5 minutes, which is probably much too small. Did you go through the tuning algorithm I link to from the node's readme?

oivheg commented 3 months ago

I did not go trough the tuning algorithm link , so i have to take a closer look at that.

Thanks for the help.