PID regulator problem

I am trying to use a PID node.
Node-red-node-pidcontol works weird. If you change the setpoint using msg.setpoint, then although the value on the dashboard changes, but in fact the PID works with the previous setpoint.
How to work with other PID nodes (for example, node-red-contrib-pid) I can not understand. The coefficients are in seconds. How do I set them if I had these values:
image

For node-red-contrib-pid see this guide to tuning. PID loop tuning using node-red-contrib-pid in node red

The reason that the proportional band is in real world units (degrees C for example) and the integral and derivative terms are in seconds is so that they relate to the real world. Work through the tuning guide and you should see what I mean.

Can't I just convert my coefficients to seconds?

The node you have used has the coefficients in non-meaningful units. The values depend on the overall scaling of the process value. There is no direct conversion unless you can tell me what the coefficients actually mean. For example what does Kp=0.1 actually mean?

I don't really know. Some times ago, I spent a lot of time to experimentally select these coefficients. The process itself - ventilation speed based on data from the CO2 sensor.

Exactly, it does not mean anything in the real world. The node you were using was written by a mathematician, not an engineer.
Follow my tuning guide and you should have it going in little time. Make sure you chart the output, the setpoint and the power output so you can see how it is going. If you are not using something like influxdb and grafana so you can go back and look at old charts, then take screenshots of each run and keep a note of the settings so that you can look back at previous runs.

1 Like

Thank you. I tried to understand the article.

  1. What value should be set in the first step? Proportional band - 0, integral time - 9999, derivative time - 0?
  2. The integral locked error appears all the time. What is the reason?

Yes, though with pb=0 the control is on/off so it doesn't matter what Td and Ti are set to.

That tells you that the current value is outside the proportional region, which it will always be when pb=0.

There is no time to tune your PID controller yet. But I realized what was wrong with Node-red-node-pidcontol. I have the PID set to REDUCED CO2 to 550ppm with ventilation. But when there is no one in the room CO2 drops to 400ppm and the PID starts trying to "raise" the value up to the setpoint. In this case, the value at the PID output reaches several thousand! (normally 0-100). Because CO2 does not rise if no one is breathing, even if the fan is not running.
Apparently, since this PID does not have a separation between HEAT and COOL and there is no limit on the output value, then this cannot be corrected.

That is what the integral lock is designed to prevent.

Can you give me some advice? I have a heated vent. Now a PID has been made that controls the temperature of the air leaving the fan. I want to put a temperature sensor in the room and maintain the desired temperature in it. Do I need to reconfigure the PID for the sensor in the room, or is it better to make a second PID that will change the setpoint of the first PID?
I hope I was able to explain clearly.

Better to make a second PID that controls the setpoint of the first PID based on the room temperature. That is called cascade control and will give better control that just having the one loop.

Just read PID ... remembered "Colin" and bingo he is active here :wink:
Hope you are fine ... Greetings from Germany :wave:
(Finally started with NR .. New Year, new luck)

Hi @gNeandr, greetings and welcome to the forum.

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