PID controller function block

mehrab
2014-06-16
2014-07-09
  • mehrab - 2014-06-16

    Can anyone please help me understand better the PID Function block.

    I can't seem to find much on the internet that makes sense and the Help file within Codesys is totally useless.

    I understand the principles of it.

    Can I get an example of how to set up my block?

    Let's say its for a central cooling/heating system.

    Range is 0 - 25 (*C)

    If below 10C = turn on heater
    If above 20
    C = turn on fan
    Setpoint = 15*C

    I need it to slow down the cooling/heating or close the valves slowly as it approaches setpoint.

    Actual = "read_from_meter"
    SET_POINT = 15
    KP = ???
    TN = ???
    Y_OFFSET = ???
    Y_MIN = 10
    Y_MAX = 20
    MANUAL = "man_button:=BOOL"
    RESET = "reset_button:=BOOL"

    Any help would be great.
    Thanks

     
  • shooter - 2014-06-17

    what function block are yoiu using? the one in util, or the one from oscat.de
    first only use the P
    then add I until it starts oscilating.

     
  • RBS - 2014-06-19

    mehrab hat geschrieben:
    Can anyone please help me understand better the PID Function block.
    I can't seem to find much on the internet that makes sense and the Help file within Codesys is totally useless.
    I understand the principles of it.
    Can I get an example of how to set up my block?
    Let's say its for a central cooling/heating system.
    Range is 0 - 25 (C)
    If below 10
    C = turn on heater
    If above 20C = turn on fan
    Setpoint = 15
    C
    I need it to slow down the cooling/heating or close the valves slowly as it approaches setpoint.
    Actual = "read_from_meter"
    SET_POINT = 15
    KP = ???
    TN = ???
    Y_OFFSET = ???
    Y_MIN = 10
    Y_MAX = 20
    MANUAL = "man_button:=BOOL"
    RESET = "reset_button:=BOOL"
    Any help would be great.
    Thanks

    Sounds like you have an on and off control.
    Usually PID's are mostly used to control analog inputs, such as VFD's,
    Stepper Regulating Valves, Dampers etc.
    Y_min and Y_max is basically the scale function on this function block and it is strongly recommended
    to set it at 0-100%. In Codesys the Y_Min/Max increases as the Actual_Value decreases and vise versa.
    KP:= Proportional normally set at 1;
    TN:= The integral part normally set from 1 and above;
    TV:= The Derivative action and normally set at 1
    Does this heater has a analog control either 4-20mA or 0-10VDC reference signal?
    Cause I would use a Hysteresis Control or IF statements to drive digital outputs rather than using a PID controller.

     
  • sarathbabu - 2014-07-09

    Hi

    If you are doing dynamic winding up

    you can use FT_PIDW from OSCAT

    It is helpful

     

Log in to post a comment.