PID, strange behavior

stable situation:
setpoint: 26
pv (temperature): 30
payload: 0


after I put the setpoint at 28, and the payload goes to 0.26 and then drops with each hit


because it makes this output that the temperature is 30 .. and the setpo int at 28 is still lower and therefore should remain 0

Sorry, I don't fully understand. Generate a chart showing the setpoint, the temperature and the node output and post the result. Drawing charts is the only way to see what is happening with PID.

when I input setpoint, near to temperature, but not greater than the current temperature
I view payload number > 0

it should stay 0

Make a chart please.

But also remember, if you increase the setpoint then the output power will probably increase, that is the way pid works. Once the loop has been tuned properly it will make sense. If it is not yet properly tuned then the operation may appear to be illogical. So if you have not tuned it yet then do that first.

I want use pid for command a fancoil with 3 fan speed and off
pid between 0 - 0.33 -> speed 1
pid between 0.34 - 0.66 -> speed 2
pid between 0.67 - 1 -> speed 3
pid 0 -> off

I suppose that should work, obviously it won't be able to sit accurately on the setpoint as you cannot get full proporional control of the power so the best it can do is to settle out switching between two fan speeds. However the tuning algorithm should work ok to get initial values for the loop. Have you tried the tuning algorithm suggested in the readme?

Don’t work for fancoil because at off (pid=o) doesn’t arrive never.
What read me?
This example?

In the node's page on the node red flows site, npm and github it says
"A tuning guide that walks through a simple tuning procedure using the above flow is available at"

Are you not able to use a time proportion output in order to get full control of the fan?

I use for cold

I add a function

var pid = 1 - msg.payload;
msg.payload = pid

return msg;

Schermata 2020-06-19 alle 10.16.06

You have a massive proportional band (22 degrees) so from the point of view of the pid the temperature is well within the proportional band as the error is only a few degrees. However even so, the power should eventually go to zero.
I suspect that proportional band setting is much too large, but as I said the first thing to do is to use the tuning algorithm to get initial approximate values for the proportional and integral settings. You probably won't need derivative.
For the chart I suggest scaling the output value up a bit so that will be easier to see.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.