Multiple input output PID controller

You should scale it, not clamp. Otherwise the PID node does not know that it is off the end of the linear scale and will keep trying to increase the current. Then when it gets near the setpoint the integral term will have to wind back the excess till it gets below the limit again. That will increase the overshoot that you get.

Yes it is scaled, I have just scaled the output to correlate with current instead of just an analog value

Hi @FHI, this is interesting. Albeit I know little about it, I would like to know more. Would you mind describing or even posting a small sample flow so that the interested reader can try what you are doing?
Also, may I ask how you have coupled the node red to the hardware; i.e. what's the hardware that allows node-red to control the thyristor?

That is not what I understand from your description. Can you export the pid node and the nodes preparing the current setpoint so that I can understand?

Or to ask the question a different way, if the limit is 50A, and the outer PID sends an output of 0.7, what setpoint is passed to the current pid? If the outer PID sends 0.8 what setpoint is passed to the current pid?

so if the main pid controller outputs a value of 0,7 i take that and multiply is by the limit, in this case 50. the set point for the slave pid will therefor then be 35

Hi Camoeo69,
Cascade control is common in industrial heating applications, I have implemented similar systems in the past where i need to control and internal temperature via a external heater on some reactor systems. For this project I was stuck thinking that i need something more complex to manage the control becase of the two outputs required, luckily Colin made several good suggestions that was easy to implement and made the system function as required.

The flow is quite simple where the inputs are a set point value that I get from a dashboard input. A analog input from a type k signal conditioner that is scaled to the process temperature, all of the inputs are connected to a node_red_contrib_pid node and a scaled output is routed to a analog output this is the complete loop for the temperature control. This loop is than duplicated for the current control with a few differences. The current pid controller receives its set point value from the temperature pid output ( he output is scaled to current with a max allowable current limit) the output from this pid is also routed to a analog output and on to the thysristor
I will post the complete flow once I have it working perfectly.
I am using a Industrial Shields Raspberry pi plc to control the thyristor.

That seems ok, but I am still confused by your description, which does not seem to say that.

Which seems to say that, for a max current of 50, that if the pid output scaled to 100 is less than 50 then that is passed straight through, but if it is greater than 50 then it is 'modified to the max value'. So any PID value > 0.5 would be set to 50.

I would have thought that all you need is a node to multiply the PID output by the maximum allowed current.

I have now simplified it further, I now use the 0 to 1 output from the master pid and simply multiply that by the max current allowed this is then the set point for the cascade pid

Great, that is the way I would do it.

It took a while but i got there in the end. I now need help with a sequence unit to control the ramp rate. I have made a new topic for it

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