1 / 45

Lecture 6 Modeling in Digital Form

Lecture 6 Modeling in Digital Form. PID Controllers . Proportional Controller. Proportional Controller. Proportional Controller. Integral Controller. Derivative Controller. PID Controllers . E(s). P(s) = E(s) * [ K c + 1/T I s + T D s ] or

zasha
Download Presentation

Lecture 6 Modeling in Digital Form

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Lecture 6Modeling in Digital Form

  2. PID Controllers Proportional Controller Proportional Controller Proportional Controller Integral Controller Derivative Controller

  3. PID Controllers E(s) P(s) = E(s) *[Kc + 1/TI s + TDs] or P(s) = E(s) *[Kc(1 + 1/TI's + TD's)] or P(s) = E(s) *Kc(TI'TD's2 + TI's +1) TI's Proportional Controller Integral Controller There are some textbooks that consider placing these three modes in series: Putting PI controller in series will give Integral control with a gain of Kc/TI Putting PD controller in series will give Derivative control with a gain of KcTD Putting ID controller in series will give Proportional control with a gain of TD/TI Putting PID controller in series will give Proportional control with a gain of KcTD/TI Derivative Controller

  4. PID Controllers – Series Configuration E(s) P(s) Proportional Controller Proportional Controller Integral Controller Derivative Controller Putting PI and PD in series results in essentially the same control equation as PID - only the b term in the quadratic is different { TI' >>>> (TI' + TD')/ TI' }

  5. P, PI, and PID Controllers

  6. Analog Equations Proportional Integral Derivative

  7. Analog vs. Digital • Previous equations for controllers are analog • The initial value p0 is needed to use these equations in a continuous process unless deviation variables are used • Digital form is required for use on a computer • Digital form use with deviation variables is important so that you understand the need for deviation variables in each control mode

  8. Proportional-Integral-Derivative Control • This subtle change in form allows the equation to be used for real-time digital application in a computer subroutine tied to a process, a final control element, and a measurement block. • Take care to account for the change in error, since by including only the current error value, you will be implementing Integral control when you may intend to use Proportional control.

  9. Proportional Control Analog form: p(t) = Kcε(t) + p0 The initial value cannot be established, so we must consider the differences between the current and previous input and output values: change in output = Kc* change in error p(t) – p(t-1) = Kc*[ε(t) – ε(t-1)]

  10. P Control – comparison of step change Assume Kc = 25 and p0 = 325 Introduce a step change ε(t) = A where A = 1.0

  11. P Control – comparison of a ramp change Assume Kc = 25 and p0 = 325 Introduce a ramp change ε(t) = A*t where A = 1.0

  12. P Control – graphical comparison Assume Kc = 25 and p0 = 325 and A = 1.0

  13. Integral Control Analog form: The initial value cannot be established, so we must establish the area numerically: change in output = [1 /TI]*ε-t curve area change p(t) – p(t-1) = [1 /TI]*[ε(t) + ε(t-1)]*Δt/2

  14. I Control – comparison of step change Assume TI = 0.04, p0 = 325 and Δt = 1 Introduce a step change ε(t) = A where A = 1.0

  15. I Control – comparison of a ramp change Assume TI = 0.04, p0 = 325 and Δt = 1 Introduce a ramp change ε(t) = A*t where A = 1.0

  16. I Control – graphical comparison Assume TI = 0.04, p0 = 325, and Δt = 1 and A = 1.0

  17. Derivative Control Analog form: The initial value cannot be established, so we must consider establishing the area numerically: change in output = TD*ε-t curve slope change p(t) – p(t-1) = TD*[(ε(t) – ε(t-1)) – (ε(t-1) – ε(t-2))]/Δt p(t) – p(t-1) = TD*[ε(t) – 2*ε(t-1) + ε(t-2)]/Δt

  18. D Control – comparison of step change Assume TD = 25, p0 = 325 and Δt = 1 Introduce a step change ε(t) = A where A = 1.0

  19. D Control – comparison of a ramp change Assume TD = 25, p0 = 325 and Δt = 1 Introduce a ramp change ε(t) = A*t where A = 1.0

  20. D Control – graphical comparison Assume TD = 25, p0 = 325, and Δt = 1 and A = 1

  21. D Control – graphical comparison Assume TD = 25, p0 = 325, and Δt = 1 and A = 1 • Note that response of adigital Derivative controller is slower than that of an analog Derivative controller by the value of Δt • As well, step change response is not an impulse, but instead a square wave occurs of amplitude equal to TD/Δt; the smaller is Δt, the closer to infinity • Similarly, response to a sine wave of frequency ω does not lead by 90° as it is supposed to, but rather by a value decreased by Δt·ωconverted to degrees.

  22. The Digital Equation for PID Control Instead of using Kc, TI, and TD parameters with the error signal, it can be more convenient to express the equation as a time-series with the current, previous, and past-previous errors: p(t) = p(t–1) + K1*ε(t) + K2*ε(t–1) + K3*ε(t–2) where K1 = + Kc + Δt/2TI+ TD /Δt K2 = –Kc + Δt/2TI– 2TD /Δt K3 = + TD /Δt

  23. PID Tuning – Continuous Oscillation This is a Closed-Loop study developed by Ziegler-Nichols in the late 1940s for stable processes: • Set the system to P control with a low gain • Increase the gain until continuous oscillations occur • Record this value as the critical controller gain Kc(c) • Record the period of oscillation, P(c) • Controller parameters are shown on the next slide

  24. PID Tuning – Continuous Oscillation These settings were designed to achieve an under-damped response to a step change for processes that can be modelled by the following Laplace Transform: - This is a First Order process with a pure time delay (dead time)

  25. PID Tuning – Continuous Oscillation Results of the Ziegler-Nichols Continuous Oscillation method for a First Order process with delay time. (R = Td/Tp) R = 0.1 R = 0.5 R = 2.0

  26. PID Tuning - Reaction Curve Method A process model can be obtained from an Open-Loop test: • Operate the process in open loop (i.e., no control) • Allow it to run at a typical operating point y(t) = yowith input held constant at u(t) = uo. (steady-state conditions) • At time to=0, apply a step change to the process input, from uo to u∞ (use a range of 5 to 20% of full scale) • Record output until it reaches anew steady state value • The curve will resemble an S-shape curve known as the Process Reaction Curve

  27. PID Tuning - Reaction Curve Method Typical open-loop process response to a step-change in the input variable: The model is considered a First Order process with a pure time delay. The key parameters are Kp , Tp , and Td and the transform equation is u(t) y(t)

  28. PID Tuning - Reaction Curve Method Compute the model parameters as follows: Kp = (y∞ – y0) / (u∞ – u0) Tp = t2 – t1 Td = t1 – t0 t3 y(t) = 0.632*(y∞ – y0) t3 u(t) y(t)

  29. A Better Diagram http://blog.opticontrols.com/wp-content/uploads/2011/06/measuring-td-and-tau.png

  30. Ziegler-Nichols Tuning Rules Design objective: achieve a damping in response to a step change of 4:1 for first and second peaks in the response curve (quarter decay ratios). Quarter Amplitude Damping. Each successive peak is 1/4 of the amplitude of the previous peak.

  31. Ziegler-Nichols Tuning Rules Design objective: achieve a damping in response to a step change of 4:1 for first and second peaks in the response curve (quarter decay ratios). where R = Td /Tp and Kp is the process gain

  32. Caution with Quarter-Amplitude Damping Tuning based on quarter-amplitude damping does provide fast response to a new steady-state regime. It is oscillatory and may interact poorly with other similarly-tuned loops. This type of tuning leaves the system in a position of possible instability if the process gain or delay ("dead") time doubles . To "fix" both problems, take half the value of the controller gain. So, if the rule recommends using a controller gain of 1.6, use only 0.8. This will prevent severe oscillation about the set point and provide an acceptable margin of stability. Response time, of course, will suffer.

  33. Cohen and Coon Tuning Rules Similar design objective but provides better tuning for R values (Td /Tp) above 0.2

  34. Cohen and Coon Tuning Rules Similar design objective but provides better tuning for R values (Td /Tp) above 0.2

  35. Comparison of Tuning Rules R R R R R R R =5.0

  36. Pure Delay vs. Process Time Lag

  37. The Digital Equation for PID Control p(t) = p(t–1) + K1*ε(t) + K2*ε(t–1) + K3*ε(t–2) where K1 = + Kc + Δt/2TI+ TD /Δt K2 = –Kc + Δt/2TI– 2TD /Δt K3 = + TD /Δt To achieve quarter decay ratios: K1 = (+A + Δt/BTd + CKpTd /Δt)/Kp K2 = (–A + Δt/BTd– 2CKpTd/Δt)/Kp K3 = + CTd/Δt where A, B , and C are derived from Ziegler-Nichols or Cohen-Coon rules as follows:

  38. The Digital Equation for PID Control For Ziegler-Nichols rules (R = Td/Tp): A = 1.2/R B = 4.0 C = 0.5 For Cohen-Coon rules (R = Td/Tp): A = (16 + 3R)/12R B = 2(32 + 6R)/(13 + 8R) C = 4 /(11 + 2R)

  39. "Optimum" PID values from Open-Loop Tuning Rules Cohen & Coon use a higher Proportional control effect compared to Zeigler-Nichols for all sensible values of R. Cohen & Coon use a slightly lower Integral control effect compared to Zeigler-Nichols for values of R <0.6 and a slightly higher Integral control effect for R > 0.6. Cohen & Coon use a lower Derivative control compared to Z-N for all sensible R values.

  40. The Influence of Sampling Time In many cases, the feedback loop generates a measurement sample every "x" minutes. With on-stream analysers, a sample multiplexer is used to present multiple streams one at a time to the X-ray scintillator. Each sample is read for a period of 20-30 seconds and the total count is recorded, passed through acalibration equation, and the stream assay output from the unit. The delay between consecutive samples of the same stream is typically 7–12 minutes and can be as high as 15 minutes. The effect of this time delay on control is considerable.

  41. The Influence of Sampling Time Effect of sampling time on the control system response of a first order process with a pure time lag (dead time). Time units are arbitrary, but the Δt value is expressed in the same units as the process time constant.

  42. Aliasing • Time delays from sampling intervals can introduce aliasing into the time series analysis

  43. Aliasing • Basically, high frequencies in a signals are lost and may appear as lower frequency signals:

  44. Anti-Aliasing • Generally anti-aliasing filters are reserved for audio and video signals to filter out noise • Not strictly a problem in mineral processing, but it must be recognized that frequency of measurement should be higher than the maximum frequency of the variable changes.

  45. Sampling Rate Sampling rate (or frequency) defines the number of samples per unit time (seconds or minutes) taken from a continuous signal to make a discrete signal. The sampling rate unit is Hertz (1/s, s−1) The reciprocal of the sampling frequency is sampling period (or interval), i.e., time between samples. Nyquist–Shannon sampling theory states that perfect reconstruction of a signal is possible when sampling frequency is greater than 2 times the maximum frequency of the signal, or equivalently, when the Nyquist frequency(0.5 x sampling rate) exceeds the highest frequency of the signal being sampled. From experience, a sampling interval of approximately 10% of the dominant time constant works well in practice.

More Related