(ebook) plc programming methods

Page 216

Chapter 10 - Closed Loop and PID Control equal to the slope m of the ramp, as shown in Figure 10-9b. For a ramp waveform, we can calculate the derivative by simply performing the “rise divided by the run” or m = )y/)t, where )y is the change in amplitude of the signal during the time period )t. As Figure 10-9b shows, our ramp has a slope of +0.5 during the time period 0 to 2 seconds, and a slope of -0.5 for the time period 2 to 4 seconds. y 1

m

t

1

y

0.5

0.5 0

1

2

3

4

t (seconds)

0

1

2

3

4

t (seconds)

-0.5 (a)

-1

(b)

Figure 10-9 - Slope (Derivative) of a Ramp Waveform

As another example, if we input any constant DC voltage into a derivative function, it will output zero because the slope of all DC voltages is zero. Although this seems simple, it becomes more complicated when the input signal is neither DC nor a linear ramp. For example, if the input waveform is a sine wave, it is difficult to calculate the derivative output because the slope of a sine wave constantly changes. Although the exact derivative of a sine wave (or any other waveform) can be determined using calculus, in the case of control systems, calculus is not necessary. This is because it is not necessary to know the exact value of the derivative for most control applications (a close approximation will suffice), and there are alternate ways to approximate the derivative without using calculus. Since the derivative function is generally performed by a digital computer (usually a PLC or a PID coprocessor) and the digital system can easily, quickly, and repeatedly calculate )y/)t, we may use this sampling approximation of the derivative as a substitute for the exact continuous derivative, even when the error waveform is non-linear. When a derivative is calculated in this fashion, it is usually called a discrete derivative, numerical derivative, or difference function. Although the function we will be using is not a true derivative, we will still call it a “derivative” for brevity. Even if the derivative function is performed electronically instead of digitally, the function is still not a true derivative because it is usually bandwidth limited (using a low pass filter) to exclude high frequency components of the signal. The reason for this is that the slopes of high frequency signals can be extremely steep (high values of m) which will cause the derivative circuitry to output extremely high and erratic voltages. This would make the entire control system overly sensitive to noise and interference. 10-9


Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.