Instruction 95- pid4 – Maple Systems MAPware-7000 User Manual

Page 158

Advertising
background image

MAPware-7000 Ladder Logic Guide

150

1010-1041 rev. 00

Instruction 95- PID4

Expression:

Space Requirement: 1 line x 6 column Location Requirement: Middle, Right rail

Function:

This function performs PID (Proportional, Integral, and Derivative) control which is a
fundamental method of feed-back control.

The basic idea behind the PID controller is to read a sensor, then compute the desired actuator
output by calculating proportional, integral, and derivative responses, then sum those three
components to derive an output value.

PID4 is based upon the following formula:

--P--|------------------I---------------------|---------D----------|

M= M

-1

+ K

P

* (ee

-1

+ (e/T

I

) * (T

S

+1)) + K

D

(e – 2e

-1

+ e

-2

)

where:

M= manipulation value (range: 0 to 4095)

M

-1

= previous calculated manipulation value (range: 0 to 4095)

Kp = the proportional gain constant (range: -32768 to +32767)

e = deviation or error value;

if Action Type = reverse action then e=S-P;

if Action Type = forward action then e=P-S

A = Action Type (range: 0 for forward, 1 for reverse); this determines if the manipulation
value increases/decreases as the present value increases. For example, if you have an
electric heater, you would want the manipulation value to increase as temperature goes
down (i.e. reverse action so e=S-P). On the other hand, if you have a control valve used
to put cold air into a system, you would want the manipulation value to decrease as
temperature goes down (i.e. forward action so e=P-S).

e

-1

= deviation of prior computation (range: -32768 to +32767)

e

-2

= deviation of second to last computation (range: -32768 to +32767)

T

I

= integral time value (range: 0 to +32767)

Advertising