logo Welcome, Guest. Please Login or Register.
September 22, 2018, 10:07:11 PM
Home Help Search Login Register
 News: Self-Registration temporarily suspended due to abuse.To Register as a member, please email to webmaster@triplc.com with your email and username.

  Internet PLC Forum
  General
  Frequently Asked Questions
(Moderator: support)
  PID FMD 88-10
? previous next ?
Pages: [1] Go Down Reply Notify of replies Send the topic Print
   Author  Topic: PID FMD 88-10  (Read 3508 times)
acxysty
Newbie
*

Posts: 28



I'm a llama!

View Profile
PID FMD 88-10
« on: January 25, 2014, 02:17:44 PM »
Reply with quote

Hi,

My system is as follows, I have two gas lines with on each line a proportional valve and a pressure sensor.

At first I opened my first proportional valve with setPWM function.

I'd like to do a pressure regulator to compensate the pressure that I have on the first line of gas by opening my second line to have a delta of zero pressure.

For this I use the PID function with the FMD 88-10 and a PWM to manage the opening and closing of each of my proportional valves.

My problem is that I don't know how the PID on FMD works including the PIDcompute function.

Can you help me?

Thanks
Report to moderator   Logged
support
Global Moderator
*****

Posts: 3070





View Profile WWW E-Mail
Re:PID FMD 88-10
« Reply #1 on: January 27, 2014, 02:16:11 AM »
Reply with quote

Assuming that you can measure the pressure X using the analog input #1 and convert it to percentage of fullscale ADC readings:

X = 10000*ADC(1)/4096   

X will be in the range of 0 to 10000 representing 0.00% to 100.00% of full scale ADC. This is your process variable.

Now suppose you have a set point pressure S that you want the control system to reach. Whatever unit your pressure is measured you should convert it into the same unit as X using TBASIC. E.g  if your ADC returns 0 to 100% of full scale for pressure of 0 to 50.0 psi,  and say if you want the set point to be 30 psi, => S = 30*10000/50 = 6000 (60% of fullscale ADC).

The ERROR signal is E = S X. 

The control output Y is controlled by the PWM duty cycle (0 to 10000 representing 0 to 100% duty cycle). The purpose of PID control is to determine the value of  Y from E, which is obtained by the following:

1)Use PIDDEF to set the P, I and D term (only do this once during initialization)
2)Use  Y = PIDCompute(E)  to compute the output Y.
3)SETPWM 1, Y, f    where f is the frequency recommended by your valve supplier.

Note: Fx1616-BA, Fx2424, SmartTILE-Fx and EZWire1616 all support floating point math so P, I and D could be floating point numbers or variables.

However, Since Nano-10 and FMD PLCs do not support floating point,  you can get fractional P, I and D term by representing each unit of these term as 0.1.  So for a proportional term of 4.0 you will use P =40 and for integral term of 0.3  you will use I = 3.  You will need to divide the result from PIDcompute() function by 10 in order to obtain the actual output Y

i.e. Y = PIDcompute(E)/10    For P, I, and D that are 0.1 per unit

As for the value of P, I and D, this is usually done by experimentation. A starting point may be P = 4 (40 if you use 0.1 per unit). In order to have zero steady state error you must have an Integral term (i.e. non zero I term). You can start with I = 0.1 and D = 0. You can gradually increase/decrease these values to alter the response time of your control system in order to reach the Set Point pressure where E = 0.
 
Some references regarding how to determine starting P term (proportional gain) can be found here:

http://control.com/thread/1026188392

« Last Edit: April 06, 2015, 12:06:09 PM by support » Report to moderator   Logged

Email: support@triplc.com
Tel: 1-877-TRI-PLCS
Pages: [1] Go Up Reply Notify of replies Send the topic Print 
? previous next ?
Jump to: 


Login with username, password and session length

Powered by MySQL Powered by PHP Internet PLC Forum | Powered by YaBB SE
© 2001-2004, YaBB SE Dev Team. All Rights Reserved.
Valid XHTML 1.0! Valid CSS!