LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

PID Control Design -For Flow control Valve


@SELVAN.skp wrote:
In FPGA :

-> PID control loop will run and its set point, process variable pid gains and other inputs if any will be given through RT via fpga ref.
-> control loop wil run with 1 ms loop rate

This doesn't make any sense. Please look up the definition of "process variable." What is the process variable in your system? How will you read it?


@SELVAN.skp wrote:
In RT:

-> a loop will be running which calculate absolute pressure (set point) value to bleed [will measure the voltage and will do calibration to get equivalent pressure ] (eg ...if bleed rate 120psi/min then 1 set point 1000 , 2 set point 999.8 since bleed loop run in 1 ms the set point for next value will be incoming pres - .002)

Do you care about the average bleed rate being correct over the entire length of time, or the instantaneous rate? In your example, you are always basing the new setpoint on the current pressure. Let's say the actual pressure is changing faster or slower than you expect. For example, if the pressure doesn't change between two loops even though the setpoint has changed, you'll calculate the same setpoint on the next loop iteration. Is that what you want, or would you prefer to maintain a constant rate of change in the setpoint, and hope that the bleed rate averages to the correct rate over a longer period? If so, you can simply pass that rate to the FPGA and let the FPGA handle all the calculations, since it will just be linearly adjusting the setpoint on each loop cycle.


@SELVAN.skp wrote:
It is possible to work as expected without that flow control valve work around (hardware will be delayed to receive)

I do not know what this means. Is this a question or a statement?


@SELVAN.skp wrote:
1.What would my process variable in my first loop iteration and after that ..something the difference of prevoius and new pressure

2.Determine the pid gains for different rate ( since for all rate its too difficult to tune and also hardware availability is not feasible)

1. See above question where I ask what your process variable will be.

2. Why do you think you will need different PID gains for different rates?

0 Kudos
Message 11 of 15
(1,194 Views)

Hi 

 

Thanks for you reply.

 

@SELVAN.skp wrote:
In FPGA :

-> PID control loop will run and its set point, process variable pid gains and other inputs if any will be given through RT via fpga ref.
-> control loop wil run with 1 ms loop rate 

@nathand wrote:

 

This doesn't make any sense. Please look up the definition of "process variable." What is the process variable in your system? How will you read it?

 

____________________________________________________________________________________________________________________________________________________________________________

 

You mean to say everthing should happen in FPGA itself,If so we will do that as well. Also the,

 

First Case: Set point will be bleed rate it can be 120 psi/min or 30 psi/min (and this will calculate to FPGA loop rate eg:120 psi/min wil be caculated to .002psi/ms based on control loop time in this its 1ms)

and process variable will be difference of bleed amount from previous pressure to pressure after bleed and if this logic works,we will implement this.

 

Second case:

Set point will be Absolute pressure and will be ramp down to next iterations (suggested in this post itself).But no idea how to implement this.

 

 

@SELVAN.skp wrote:
In RT:

-> a loop will be running which calculate absolute pressure (set point) value to bleed [will measure the voltage and will do calibration to get equivalent pressure ] (eg ...if bleed rate 120psi/min then 1 set point 1000 , 2 set point 999.8 since bleed loop run in 1 ms the set point for next value will be incoming pres - .002)
@nathand wrote:

Do you care about the average bleed rate being correct over the entire length of time, or the instantaneous rate? In your example, you are always basing the new setpoint on the current pressure. Let's say the actual pressure is changing faster or slower than you expect. For example, if the pressure doesn't change between two loops even though the setpoint has changed, you'll calculate the same setpoint on the next loop iteration. Is that what you want, or would you prefer to maintain a constant rate of change in the setpoint, and hope that the bleed rate averages to the correct rate over a longer period? If so, you can simply pass that rate to the FPGA and let the FPGA handle all the calculations, since it will just be linearly adjusting the setpoint on each loop cycle.

________________________________________________________________________________________________________________________________________________________________________

I think your are refering to my first case of logic implementation.If first case  works fine, its better for us (keeping rate as constant  set point ie .002 psi/ms and difference in bleed amt  as process variable.)

 

 

@SELVAN.skp wrote:
It is possible to work as expected without that flow control valve work around (hardware will be delayed to receive)

I do not know what this means. Is this a question or a statement?


@SELVAN.skp wrote:
1.What would my process variable in my first loop iteration and after that ..something the difference of prevoius and new pressure

2.Determine the pid gains for different rate ( since for all rate its too difficult to tune and also hardware availability is not feasible)
@nathand wrote:

1. See above question where I ask what your process variable will be.

2. Why do you think you will need different PID gains for different rates?

 

________________________________________________________________________________________________________________________________________________________________________

2.not sure on same PID will work for other bleed rate.may be need to test .

 

 

0 Kudos
Message 12 of 15
(1,170 Views)

Hi All,

 

This is what I am doing to control Gas Bleed at defined rate (Say 200 psi/min   ,20 psi/min ),Bleed can be Started at any Pressure range say 20000 psi or 10000 psi 

 

 

RT side:

 

1.Control Loop runs as below 

 

Loop rate:500 ms so i need to reduce the Presssure at 1.6 psi/500ms for 200 psi/min and 0.16 psi/500 ms for 20 psi/min.

 

 

PID Vi:

 

SP will be the bleed rate ie:1.6 psi/500 ms

 

PV will be Difference of  Old Pressure Value and New Pressure.

 

Time 0.5 secs

 

Output control signal (Range 0-10 V) is sent to valve from RT to Fpga (Voltage FXp control will be created in fpga and called in RT)

 

 

Issue is I couldnt able to achieve exact ( some + or - is ok) BLEED RATE WHEN DOING THIS KIND OF LOGIC.

 

Any suggestions pls.

 

What is best to achive good result?

 

Attached my loop pic for ref and front panel with gains

Download All
0 Kudos
Message 13 of 15
(1,135 Views)

May I ask something? What is the reason you follow this kind of complicated way?

 

You have a gas vessel, and you measure the pressure on this vessel. You want to decrease the pressure in this vessel by a certain rate, yes? All you need is an "off the shelf" flow controller (Bronkhorst, MKS, Pfeiffer, pick whatever you prefer).

I used to have in a similar application a Bronkhorst flow controller, they give good LabVIEW support and drivers (with some MKS products I did not have luck regarding to LabVIEW drivers). You just connect the flow controller to your computer via serial (RS232) and voilá, the system is ready to run. The pressure decrease will be proportional to the flow rate, and the PID control is built-in inside the flow controller, you do not need to worry about the PID programming/tuning...

Sorry if I misunderstood your requirements, but this seems to be very simple...

0 Kudos
Message 14 of 15
(1,108 Views)

It's hard to see what's going on from the limited screenshot of your code. Also, what are you trying to show in your chart? Why are only two of the four plots visible? What's the difference between Output and Voltage?

 

How fast does your valve respond? How noisy is the pressure measurement? How did you pick 500ms as your loop time? I highly recommend NOT wiring the dt input to the PID block, let the PID handle that internally (wiring dt is useful only when the actual dt doesn't match the sampling rate of the data, for example if you're running a simulation faster than real time).

 

If the pressure measurement is noisy, and causes the output signal to jump around a lot, consider filtering the pressure measurement. You may also want a faster loop rate if your valve can handle it.

0 Kudos
Message 15 of 15
(1,088 Views)