Jump to content

Pressure Control in a Tank


Recommended Posts

Hello, 

Wanted to get feedback on the project I'm working on.  I've attached what I have so far. SD portion still under construction

Overview: 

Controlling pressure with a heating element inside a tank utilizing PIDs

 

Specs:

PLC: V700

Snap on: V200-E3/4XB

AI:

Pressure Sensor: 0-145 psi/ 4-20ma

Temp Sensor PT100: -50-300 C

Question:

How should I implement the selector switch logic/code to choose between the pressure/temperature loop?

 

Feedback:

Auto tune parameters

Linearization Block

Overall Check of Program would be appreciated 

 

 

 

 

loop.PNG

sp.vlp

Link to comment
Share on other sites

  • MVP 2023
16 hours ago, bbcxo said:

How should I implement the selector switch logic/code to choose between the pressure/temperature loop?

This reminds me of chamber controls I did to cure rubber.

First you need to define your selector rules.  Which is more important?

Do you really need PID control?  What is the tolerance of your temperature and pressure? 

What type of fluid are you heating?  Does it have a high specific heat like water or a lower one like oil?  If it's oil or something else, what is the watt density of the heating elements?  Or are you using steam?

 

Details, details.....

Joe T.

Link to comment
Share on other sites

  • MVP 2023

If I read your response correctly, you're only heating air.

You didn't say what the volume of the tank was, but for purposes of discussion let's say that 300W is plenty of heat for your temperature needs.  I'm also assuming the heating element is either designed for heating air or is integrated into the tank and there's no limit on how hot it can get.

Let's have some fun on a Sunday night and look at this from a thermodynamics design standpoint.  I refer to the ideal gas law, or pV=nRT.  

https://en.wikipedia.org/wiki/Ideal_gas_law

This is actually one of the things you learn in school that is useful in real life.  It can be re-written as P1V/ T1  = P2V/ T2 .  In your case, the volume is constant so it can be eliminated from the equation, so P1 / T1  = P2/ T.

If you're doing this by the book P is in Pascals and T is in Kelvin.  We'll use ambient absolute pressure and temperature at sea level as a starting point, so P = 14.7 psia = 1.01 x 105 Pa and T = 70F = 294 K.

Your maximum pressure is 15 psi, which is 29.7 psia = 2.04 x 10Pa.

Now let's see how hot we need to get the air to hit your 15 psi limit:

1.01 x 10/ 294 = 2.04 x 105 / T2  .

T2 = 593 K = 607 F.

So what you're trying to do is possible.

The gas law is a linear equation, so it really doesn't matter whether you point the loop at temperature or pressure.  I would use pressure as the input to the PID loop as you've indicated this is what you care about.  Adding selector logic over-complicates things.   I would put a simple compare block on the temperature to disable the pressure control if it gets too hot.

I took a quick look at your program and you'll want to feed the output of your Pressure loop into a PWM block for the heater.  Look at the Help on the PWM block for a better understanding, but I modified some parameters in some of your blocks for you.  You typically want the cycle time to be one second and the PWM cycle time units are 2.5 ms, so the cycle time value is 400.  The block is looking for an input of 0-100.0%, or 0-1000 from the PID block.

The RTD input will return a value with 0.1 deg C resolution, so either modify your displays or divide it by 10 before you do anything.

Before you call AutoTune, manually set your Proportional band to 10.0%, or 100.  The AutoTune will modify it.

You called the Heater output coil O0 in two different places, which is a big PLC no-no.  The coil will be in the state where it was last called; in your program this is the temperature loop.  So if the pressure loop is calling for heat but the temperature loop is not the output will be off.  I disabled the net in Temperature Loop for now.

Your Linear block is configured correctly.  Since the input to the PID block is scaled pressure, you set the Low and High limits to your scaled values.

Let us know what other questions you have.  I modified your program in Visilogic 9.8.94.

Joe T.

 

 

sp JT.vlp

  • Like 1
  • Thanks 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...