Lecture Slides

advertisement
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
Download