Author Topic: PID Help  (Read 10337 times)

plc_user

  • Guest
PID Help
« on: July 10, 2005, 05:25:09 PM »
I was wondering if my thinking is on the right track.  I was going to implement a PID servo-hydraulic system in another project I am working on.  I was wondering how much the I & D are going to make a impact on my system.  I was going to institute a system that changed a set point instantly.  I wasn't going to adjust the setpoint over time to arrive at a certain position.  I just wanted to enter the set point and set the positioning system in motion in relation to the error that is generated after comparing the set point to a feed back device such as a incremental encoder.

I seen motion profiles that looked trapazoidal.  Does the PIDcompute function create this type of profile.  When I change the setpoint to a new location, the error is at a maximum.  As the motion of the machine moves the error decrease until the position is achieved.  If anyone can set me on the right path I would deeply appreciate it.
 

EDGAR

  • Jr. Member
  • Posts: 60
  • Automating concepts around the world!
    • View Profile
    • Kinemics
Re:PID Help
« Reply #1 on: July 14, 2005, 08:45:34 PM »
well Lets look at the P.I.D. and how these parameter affect the Output

P = PROPORTIONAL BAND IE: IS THE AREA AROUND THE SETPOINT WHERE THE PLC IS ACTUALLY CONTROLLING THE PROCESS

I= INTEGRAL (RESET) IT CORRECT ANY OFFSET BETWEEN THE SETPOINT AND THE PV(PROCESS VARIABLE) AUTOMATICALLY BY SHIFTING THE PROPORTIONAL BAND. IT REDIFINE THE OUTPUT REQUIREMENT AT THE SETPOINT UNTIL THE SP AND PV ARE EQUAL.
A VALUE TOO LOW MAY CAUSE CONTINOUS OSCILLATION IE: IT CAN OVER RESPOND, IF IS TOO LONG IT WILL TAKE LONGER TO SETTLE.

D- DERIVATIVE(RATE) SHIFT THE PROPORTIONING BAND IN A SLOPE CHANGE OF THE P.V. THIS IS THE BRAKES PADS OF THE PROCESS, IT PREVENT THE OVER AND UNDER SHOOT ON PROCESS UPSETS. THE RATE IS USUALLY SET LOWER THEN THE RESET.


SO THE "I" AND "D" THE HAVE MOST OF THE PROCESS CONTROL LIKE IN TEMPERATURE CONTROL SYSTEM IF YOU HAVE A SETPOINT OF 200?F
AND THE TEMPERATURE IS 150 NOW THE (I-RESET) WILL NOW MOVE THE PROPORTIONAL BAND TO SET THE OUTPUT AND THE (D-RATE) PREVENT THE OUTPUT OVER AND UNDER SHOOT.

      P.V. =150?F
0      |---->                   200?F                                   300?F
<-------------|--------------SP------------------|----------->
               100%             50%                  0%
                  |<---PROPORTIONAL BAND-->|

THE RESET MOVE THE PV FROM L/R AND R/L UNTIL THE SP AND PV ARE EQUAL @ 50%...
I'M IMPLEMENTING THE PID FUNCTION IN VB6 IF YOU LIKE WHEN I'M DONE I CAN GIVE YOU THE FUNCTION CODE AND YOU WILL SEE HOW EVERYTHING WILL TAKE EFFECT ON CLOSE LOOP CONTROL.
POST YOU EMAIL FOR LATTER. NOW I HAVE IMPLEMEMT AN OPC CLIENT PID CONTROL LETS SAY IF YOU USE ALL THE PID CHANNEL(1 TO 16) "IMPOSSIBLE" IN THE PLC THEN YOU CAN USE YOUR HOST PC TO DO SO..

IF THIS INFORMATION IS INCORRECT IN SOME WAY. FOR SOME OF YOU GUYS THAT KNOW THE PID LOOP WELL BETTER THAN I, FEEL FREE TO POINT OUT WHERE I MESS UP OR COMMENT IT HAS BIN A LONG WEEK AND JUST LIKE TO HELP A LITTER HAHAHAHA LOL.
i HOPE THAT HELPS...

REGARDS,
EDGAR


Low cost Modbus OPC DA Server, supporting Modbus RTU, ASCII, and TCP. Download your demo today! Go to www.kinemics.com/modbus.

evanh

  • Guest
Re:PID Help
« Reply #2 on: August 06, 2005, 09:47:52 PM »
The servo loop is what contains the PID function.

The trapedziodal function, you refer to, is a separate part of motion control systems.  It's what's called the profile generator and is fire-and-forget in nature, ie: Open-loop, it's not reactive to feedback.  Typically, this is used to produce smooth lines from geometrical descriptions but also is used to achieve simultaneous synchronous moves.

As you have already been thinking, the profile generator can be replaced with a simple "setpoint"  that is shifted around in a step like manner.  This is how most temperature controllers are configured and it's simple for operators to manage.

If you don't care when the hydraulic rams pass any given intermediate positions then you can indeed construct the servo to handle a large step function instead of smooth profile.  If you want speed then Prop+Diff for the servo are what's needed, the derivative in this case is oddly constructed.  Intergral, all by itself, is only to be used for slow steady reaction to the step.

However, having said all that, I recommend going the path of following a defined profile and use a normal PID function.  This will give reliable smooth control that can be set to alarm-out on tight tolerances hopefully preventing possible damage and safety concerns.

Note:  Your description of setpoint is really a cut-to-length function that is generated from the setpoint and, yes, this will be a trapeziodal or S-curve profile.

To answer your first question, I and D often don't make a difference.  D in particular can add unwanted wear to the machinery.  It depends on how accurate and fast the mechanics are verses their need.  Commissioning is usually a time of redevelopment ... ;)


Evan

evanh

  • Guest
Re:PID Help
« Reply #3 on: August 06, 2005, 10:36:17 PM »
Actually, thinking about your typical hydraulic system, you will be either using digital outputs with fixed speed rams or proportional valves that have their own servo electronics.  In both cases your servo code vanishes.

In the on/off case you can only move-untill-target-reached so the profile generator also vanishes.

The proportional case further sub-divides into velocity and position based profile.  Position based being the prefered method for rams as they only have a limited length that is easily represented with an analogue or PWM position output.  Just remember, when generating the profile, that it is in the velocity, not position, domain that the trapezoid shape is formed.


Evan