ME 322: Instrumentation Lecture 38 April 24, 2015 Professor Miles Greiner Integral Control Announcements/Reminders • College of Engineering Innovation Day: Friday, May 1, 2015 • http://www.unr.edu/engineering/news-and-events/specialevents/innovation-day • • • • • • HW 12 Due now HW 13 Due Monday- L12PP (proportional/integral control) HW 14 Due Wednesday- X3, Last HW assignment Review Labs 10, 11, and 12: Wednesday and Friday Open Lab Practice: next Saturday and Sunday Lab Practicum Finals, start a week from Monday – Schedule on WebCampus – Guidelines: http://wolfweb.unr.edu/homepage/greiner/teaching/MECH322Instrumentation/Tests/Index.htm • Next week: Lab 12 Feedback Control Two Extra-Credit Opportunities • National Instruments (NI) On-line LabVIEW Training • Wednesday, April 29, 2015, 1:30 to 3:30 pm – Will that timing work? If not, when would? • See instructions on WebCampus – Sign-up and actively participate to receive credit – Use your own computer or one on campus – Need headset or speakers (and microphone?) • 1% of grade • Lab 12.1 (Do at home, Due last lecture) • See Lab 12 instructions (study effect of DT, DTi, TSP, heater and TC locations) • Check out Lab-in-a-Box for DeLaMare Library • Only 0.5% of grade Lab 12 Setup • Measure the beaker water temperature using a thermocouple/conditioner/myDAQ/VI • Use myDAQ analog output (AO) connected to a digital relay to turn heater on/off, and control the water temperature – Use Fraction of Time On (FTO) to control heater power Last HW: Proportional Control • Use FTO when T is within DT below TSP – Define π π = πππ −π π·π • Three temperature zones: – For T < πππ − π·π , – For πππ − π·π < π < πππ , – For π > πππ , f> 1 FTO = 1 1 > f >0 f <0 πΉππ = π FTO = 0 • Corrective Heat input: – Q = QMAX*FTO = πππ΄π – e = π − πππ ; πΊ = πππ −π π·π πππ΄π ; π·π = −πΊ ∗ π QMAX= V2/R • For DT = 0, Proportional becomes full power On/Off Proportional Control VI • You did this in HW Integrate Error 90 When T-TSP > 0 Decrease FTOi T 80 Temperature, T [C] 70 TSP 60 When T-TSP < 0 Increase FTOi 50 40 30 20 0 • • • 30 π‘ πππ‘ 0 = π‘ 0 π − πππ ππ‘ = π π=1 40 πΉπππ = − π‘ 0 π−πππ ππ‘ π·ππ =− π π=1 50 Time, t [minu π − πππ π Δπ‘ Corrective Action from integration – • 20 Proportional Control had steady state error when temperature was steady Integrate error – • 10 π−πππ π Δπ‘ π·ππ FTOi will – Increase with time when π < πππ (π − πππ < 0) – Decrease with time when π > πππ (π − πππ > 0) – Stay constant when π = πππ (π − πππ = 0) How to choose DTi? – Q will be too responsive if DTi is small (or not responsive enough if DTi is too large) – Wait for temperature to be steady before turning on integral control (Decreasing DTi) How to implement in LabVIEW π−πππ − π·ππ • Need to calculate and sum • Within While Loop = πππ −π π·ππ at each time step – Use Shift Register to pass data from one step to the next • Modify Proportional Controller to include integration – πΉππ = πΉπππ + πΉπππ = πππ −π π·π − π π=1 π−πππ π Δπ‘ π·ππ Figure 2 VI Block Diagram • Modify proportional VI – http://wolfweb.unr.edu/homepage/greiner/teaching/MECH322Instrum entation/Labs/Lab%2012%20Thermal%20Control/Lab%20Index.htm Write To Measurement File File Format: Microsoft Excel (.xlsx) File Path:C:\Users\Miles Greiner\Documents\LabVIEW Data\test.xlsx Mode: Save to one file Ask user to choose file: False If a file already exists: Use next available filename X value(time) columns: One column only Figure 1 VI Front Panel • Plots help the user monitor the time-dependent measured and set-point temperatures T and TSP, temperature error T–TSP, and control parameters Modify Proportional Control • Shift register, input DTi – Add FTOi to FTOp • Display FTOi (bar and numerical indicators) • Add 10log(DTi) and log(DTi) to plots • Add Write to Measurement File VI – Use next available file name – Microsoft Excel – One time column Process Sample Data • http://wolfweb.unr.edu/homepage/greiner/teaching/MECH322Instrumentation/Labs/ Lab%2012%20Thermal%20Control/Lab%20Index.htm • Add time scale in minutes – Calculate difference, general format, times 24*60 • Figure 3 – Plot T, TSP, DT and 10log(DTi) versus time • Figure 4 – Plot T-TSP, -DT, 10log(DTi) and 0 versus time • Table 1 – Determine time periods when behavior reaches “steady state,” and find ππ΄ = π and ππ ππ = ππ during those times (use an integer number of cycles) • Figure 5 – Plot ππ ππ versus DT and DTi • Figure 6 – Plot ππ΄ − πππ versus DT and DTi Figure 3 Measured, Set-Point, Lower-Control Temperatures and DTi versus Time • Data was acquired for 40 minutes with a set-point temperature of 85°C. • The time-dependent water temperature is shown with different values of the control parameters DT and DTi. • Proportional control is off when DT = 0 • Integral control is effectively off when DTi = 107 (10log(DTI) = 70) Figure 4 Temperature Error, DT and DTi versus Time • The temperature oscillates for DT = 0, 5, and 15°C, but was nearly steady for DT = 20°C. • DTi was set to 100 from roughly t = 25 to 30 minutes, but the systems oscillated, and so it was increased to 1000. • The controlled-system behavior depends on the relative locations of the heater, thermocouple, and side of the beaker, and the amount of water in the beaker. These parameters were not controlled during the experiment. Table 1 Controller Performance Parameters DT Dti [°C] 0 1.E+07 Time Range [min] 4.43 to 7.50 88.22 TRMS [°C] 3.42 TA-TSP [°C] 3.22 TA [°C] 5 1.E+07 9.45 to 14.48 85.85 2.79 0.85 15 1.E+07 17.62 to 22.34 83.01 0.62 -1.99 20 1.E+07 23.61 to 25.41 82.48 0.10 -2.52 85.06 0.23 0.06 20 1000 35.51 to 39.44 • This table summarizes the time periods when the system exhibits steady state behaviors for each DT and DTi. • During each steady state period – TA is the average temperature – TA – TSP is an indication of the average controller error. – The Root-Mean-Squared temperature TRMS is an indication of controller unsteadiness Figure 5 Controller Unsteadiness versus Proportionality Increment and Set-Point Temperature • TRMS is and indication of thermocouple temperature unsteadiness • Unsteadiness decreased as DT increased, and was not strongly affected by DTi. Figure 6 Average Temperature Error versus Set-Point Temperature and Proportionality Increment • The average temperature error – Is positive for DT = 0, but decreases and becomes negative as DT increases. – Is significantly improved by Integral control. Proportional-Control Energy-Balance TENV QIN = FTO(QMAX) QOUT = hA(T-TENV) T • Assume water temperature is uniform and equal to TC temperature – π − π = ππΌπ − πππ’π‘ = • ππππ₯ πππ −π π·π ππ ππ‘ ππ = πππ ππ‘ − βπ΄ π − ππΈππ£ = πππ ππ ππ‘ • Let πππ be the temperature under steady state conditions – ππππ₯ – πππ = πππ −πππ π·π = βπ΄ πππ − ππΈππ£ ππππ₯ πππ +βπ΄ππΈππ π·π ππππ₯ π·π+βπ΄ • πππ = πππ − πππ = − πππ −ππΈππ π πππ₯ 1+βπ΄ π·π – Magnitude increases as πππ − ππΈππ and βπ΄ π·π ππππ₯ increase ππππ ππ‘ =0