01-24-2022 04:12 AM
Hello Dear LabVIEW Experts.
As a Beginner i am working on a Project with real Hardware now, where i have a Flowmeter measuring Flow and a Pressure controlled valve that can regulate the flow. when i give the device a value of 0 it keeps the flow at the same point fluctuating 0.1 l/min around that point.
if i give a value between 0-250 it opens the valve further and if i set it back to 0 it keeps it at that point same goes for 0- minus 250 where it takes of pressure and closes the valve a bit reducing the flow.
So far so good i have that Part in a While loop and now i want to PID controll it therefore i wanted to use the LabVIEW example Advanced autotuning PID control loop. where the Flow is my Process Vaiable(PV) and the pressure is the manipulated variable(MV).
And here is my Problem the PID VI is in a seperate while loop and its a simulation loop with a simulated plant.
i wanna replace the "fake plant" with my plant that gets the MV and measures the PV and gives it back to the loop.
Id love to hear your ideas guys thanks in advance and sorry for my english im non native.^^
Solved! Go to Solution.
01-24-2022 04:17 AM
PS: If you need any further context or have questions feel free to ask 😃
01-24-2022 04:22 AM
Hi Tom,
@Tomlab wrote:
i wanna replace the "fake plant" with my plant that gets the MV and measures the PV and gives it back to the loop.
No, you don't want to replace that "Plant.vi" in a 2nd loop.
You want to place the PID function inside your DAQ loop!
That's it…
Have you taken over that project from your collegue? There was a very similar question some days ago…
01-25-2022 06:56 AM - edited 01-25-2022 06:57 AM
Hello Gerd,
thank you for your help on this topic it "worked" so far programmatically.
Now i find myself with the autocontrol algorithm and i see, that it jumps between 10l/min and 0 max and min so i plan on doing a ziegler nichols i hoped the program may be able to find optimal values on its own but that seems to not be the case here.
Also the post you refered to was in the other labview forum where you told me about the examples thank you for that aswell the problem here is that from my workplace i cant access that forum because we have a work vpn and it flagged the whole copany as spam apparently thats why i am now here.
As i know you are german aswell
Liebe Grüße aus Berlin
Tomlab
PS: sorry for not answering yesterday but as a new account i had uses all my messages for the day.
01-25-2022 08:43 AM
Hi Tom/Laborbesichtigungsanfänger,
@Tomlab wrote:
Now i find myself with the autocontrol algorithm and i see, that it jumps between 10l/min and 0 max and min so i plan on doing a ziegler nichols i hoped the program may be able to find optimal values on its own but that seems to not be the case here.
Also the post you refered to was in the other labview forum where you told me about the examples thank you for that
I never used those autotuning routines from NI, I always made a small measurement campaign and calculated PID gains "manually".
Most often a simple "jump" measurement is sufficient: switch off the PID, change control output value from 10% to 40% and measure the resulting pv behaviour. Use that measurement to determine PID gains…
01-26-2022 04:38 AM
Hi Gerd,
today i tried to get the First measurements for Kp by obtaining a closed loop jump Response on the real hardware.
the problem that occured is that for a flow of 4 liter/min the Kp is different from the Kp for 1 liter/min but i am supposed to find an option for all flows from 1-12 liter/min are there tricks to achieve that or is that impossible?
if its important for 4 liter/min i got a P=1,27 and for 1 liter/min i got P=4,3 wich to me seems pretty weird.
I need a good Kp for the Ziegler-Nichols but i dont think i should do it 12 times right?
Thank you for your help
Best regards,
Tomlab
01-26-2022 05:06 AM
Hi Tom,
@Tomlab wrote:
the problem that occured is that for a flow of 4 liter/min the Kp is different from the Kp for 1 liter/min but i am supposed to find an option for all flows from 1-12 liter/min are there tricks to achieve that or is that impossible?
if its important for 4 liter/min i got a P=1,27 and for 1 liter/min i got P=4,3 wich to me seems pretty weird.
I need a good Kp for the Ziegler-Nichols but i dont think i should do it 12 times right?
Some general thoughts:
In general I started with a simple PID with average PID gains for systems with different PID gains for different working points…
What's the problem to determine the PID gain for several working points? That's a one-time measurement!