08-19-2013 03:33 AM
Hi labview user fellows,
Background: Now I am using Labview PID controller to stabilize the flow rate of my experimental loop. What I am doing is flow boiling study in multi-microchannels. The flow rate flucuated during the flow transition from liquid phase to liquid-vapor phase. So I need PID to make the flow rate (or mass flux, i.e. process variables) as stable as possible. The analoge voltage (control parameter) generated by labview DAQ was used to control the pump, in an effort to manipulate the flow rate.
Range: for mass flux: G=0:3000, for voltage V = 0:2.6v
Objective: the voltage will be aumatically increased when there was an obvious flucuation of flow rate.
Strategy: implenting PID controller to stablize the flow rate. I have already purchased PID.vi from NI. Also I have an made-in-house code.
Results: After testing the PID vi, the output value of PID was either 0, 2.6v (i.e. the lower limit and higher limit), like a digital signal. So the mass flucuated hugely. Apparantly it's not satisfactory.
the following is my Labview Code
the block of process control is like this:
Question: 1) What's the output of PID controller? What's the relationship between PID output and my desired voltage value used to manipulate the pump?
2) In my labview code, I supposed the PID output value was the desired voltage. Apparently it was wrong because the PID output was either lower limit or upper limit. So what should be the right one?
Any help or suggestions would be appreciated. Thank you very much.
Best regards,
Houxue.
08-19-2013 04:02 AM
@Microwinner wrote:
Question: 1) What's the output of PID controller? What's the relationship between PID output and my desired voltage value used to manipulate the pump?
2) In my labview code, I supposed the PID output value was the desired voltage. Apparently it was wrong because the PID output was either lower limit or upper limit. So what should be the right one?
Any help or suggestions would be appreciated. Thank you very much.
Best regards,
Houxue.
Your understanding seems to be correct (or I should say alingned to my understanding). PID output is 'Manipulated Variable'
Fluctualtions are because, PID controller isn't tuned properly.
08-19-2013 04:11 AM
Hi moderator,
Good to see you and thank you for your reply.
But the question is the relationship betweem PID output and the desired voltage value. Currently I could not find it.
According to the therory
if we consider the units, the PID output should have the same unit as the Process variable and set point. Right? So what I am thinking is probably one transfer function between PID output and desired voltage value is missing. What do you think?
Thanks a lot.
08-19-2013 11:12 AM
@Microwinner wrote:
if we consider the units, the PID output should have the same unit as the Process variable and set point. Right? So what I am thinking is probably one transfer function between PID output and desired voltage value is missing. What do you think?
No. The PID gains have units. The proportional gain is [output units/measurement units]. The integral time and derivative gain have units of [time]. Work this through and you'll see that the output is in [output units]. You could choose your proportional gain to have some other units, for example percentage of full-scale output.
As everyone else has said, if your PID output oscillates, your gains are chosen poorly (or, less likely, your loop is not fast enough relative to your process). Did you use a tuning method such as Ziegler-Nichols or Cohen-Coon? It is very difficult to get good PID tuning through random guesses at the gains. It's also possible there's a problem somewhere else with your code.
On another note, I don't recommend putting the LabVIEW PID block inside a case structure. If you have any integral component, you can end up with a huge unexpected integrated error if you use the PID, switch to the other case, then switch back to the PID. If you must put it inside a case structure, make sure you set the reset input to true for one cycle each time you switch to that case.
08-19-2013 11:25 AM
Hi Nathand,
Thank you for your reply.
No I did not tune it yet. Currently I am confused by the PID gains and output. I see some stardard method to tune PID gians. However before this step, I would like to make sure that if my code was designed in a proprer way regardless of the proper tuning.
My question is: if I tune it well, the output of PID would be the desired voltage value that I need to manipulate the pump. Right?
In this case, no other transfer function between the PID output value and the desired voltage value? Right?
Looking forward to your reply.
Thank you.
08-19-2013 11:36 AM
@Microwinner wrote:
No I did not tune it yet. Currently I am confused by the PID gains and output. I see some stardard method to tune PID gians. However before this step, I would like to make sure that if my code was designed in a proprer way regardless of the proper tuning.
I can't tell because you showed so little of your code. If you're still confused about the meaning of the PID gains, I provided some explanation here (spread across multiple messages, so read through the thread).
@Microwinner wrote:
My question is: if I tune it well, the output of PID would be the desired voltage value that I need to manipulate the pump. Right?
In this case, no other transfer function between the PID output value and the desired voltage value? Right?
That's correct.
08-19-2013 12:05 PM
Thank you for your confirmation.
I will go through PID tuning. I will post here if I have questions. Thank you very much.