ME 322: Instrumentation Lecture 39 April 25, 2016 Professor Miles Greiner

advertisement
ME 322: Instrumentation
Lecture 39
April 25, 2016
Professor Miles Greiner
Integral control vi, Proportional Control response
model
Announcements/Reminders
•
•
•
•
•
•
This week: Lab 12 Feedback Control
HW 13 Will accept Wednesday
HW 14 Due Friday, X3 (Last HW assignment)
Review Labs 10, 11, and 12: Wednesday and Friday
Open Lab Practice Session: Saturday and Sunday
Lab Practicum Finals (Start a week from today)
– Schedule on WebCampus
– Guidelines,
– http://wolfweb.unr.edu/homepage/greiner/teaching/MECH322Instrumentation/Tests/Index.htm
• Wind tunnel CTA
• We are working to adjust the CTA feedback system so they will work
correctly for the final
• You are graded on LabVIEW programming, data acquisition,
calculations, clear plots and tables, conclusions (not on equipment
failures)
Modify Proportional Control
• Proportional VI, Basic VI
• Use Control-U to make block diagram clearer
• Shift register, input DTi
– Add 𝐹𝑇𝑂𝑖 =
𝑇𝑆𝑃 −𝑇
𝑛
𝐷𝑇𝑖 𝑛
to 𝐹𝑇𝑂𝑝 =
𝑇𝑆𝑃 −𝑇
𝐷𝑇
• Display 𝐹𝑇𝑂𝑖 (bar and numerical indicators)
• Add 10log(𝐷𝑇𝑖) and log(𝐷𝑇𝑖) to plots
• Add Write to Measurement File VI
– Use next available file name
– No Headers
– One time column
– Microsoft Excel
Lab 12 Integral Control Block Diagram
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
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
• Be sure to use an integer number of cycles
• Figure 5
– Plot 𝑇𝑅𝑀𝑆 versus DT and DTi
• Figure 6
– Plot steady state error e = 𝑇𝐴 − 𝑇𝑆𝑃 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.
• Measure response to each setting for 10 minutes or less
• 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
• May dependent on TC location and water level
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 (Lab 12.1 investigates these rich behaviors).
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, for TSP = 85°C
• 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 Thermal Analysis
Heater
QIN = FTO(QMAX)
TEnv
TTC
QOUT = hA(TW -TEnv)
TW
• Is TW = TTC? Is TW uniform?
• Energy Balance for Water
–
𝑄 − 𝑊 = 𝑄𝐼𝑛 − 𝑄𝑂𝑢𝑡 =
𝑑𝑈
𝑑𝑡
= 𝜌𝑐𝑉
𝑑𝑇𝑊
𝑊 𝑑𝑡
• 𝑄𝑂𝑢𝑡 = ℎ𝐴(𝑇𝑊 − 𝑇𝐸𝑁𝑉 )
• For proportional control: 𝑄𝐼𝑛 = 𝑄𝑀𝑎𝑥 𝐹𝑇𝑂 = 𝑄𝑀𝑎𝑥
–
𝑇𝑆𝑃 −𝑇𝑇𝐶
𝑄𝑀𝑎𝑥
𝐷𝑇
− ℎ𝐴 𝑇𝑊 − 𝑇𝐸𝑛𝑣 = 𝜌𝑐𝑉
𝑇𝑆𝑃 −𝑇𝑇𝐶
𝐷𝑇
𝑑𝑇𝑊
𝑊 𝑑𝑡
For Large DT
• We observed that TTC is steady when DT is sufficiently large
– Under that condition, assume TTC = TW = 𝑇𝑆𝑆
–
–
𝑇𝑆𝑃 −𝑇𝑆𝑆
𝑑𝑇𝑆𝑆
𝑄𝑀𝑎𝑥
− ℎ𝐴 𝑇𝑆𝑆 − 𝑇𝐸𝑛𝑣 = 𝜌𝑐𝑉 𝑊
𝐷𝑇
𝑑𝑡
𝑄𝑀𝑎𝑥
𝑄𝑀𝑎𝑥
𝑇𝑆𝑃
+ 𝑇𝐸𝑛𝑣 ℎ𝐴 = 𝑇𝑆𝑆
+ ℎ𝐴
𝐷𝑇
𝐷𝑇
– 𝑇𝑆𝑆 =
𝑇𝑆𝑃
𝑄𝑀𝑎𝑥
+𝑇𝐸𝑛𝑣
𝐷𝑇
𝑄𝑀𝑎𝑥
+ℎ𝐴
𝐷𝑇
ℎ𝐴
– Steady State Error
• 𝑒𝑆𝑆 = 𝑇𝑆𝑆 − 𝑇𝑆𝑃 =
• 𝑒𝑆𝑆 = −
𝑇𝑆𝑃
𝑄𝑀𝑎𝑥
𝐷𝑇
+𝑇𝐸𝑛𝑣 ℎ𝐴 −𝑇𝑆𝑃
𝑄𝑀𝑎𝑥
+ℎ𝐴
𝐷𝑇
𝑄𝑀𝑎𝑥
+ℎ𝐴
𝐷𝑇
𝑇𝑆𝑃 −𝑇𝐸𝑁𝑉
𝑄𝑀𝑎𝑥
𝐷𝑇 ℎ𝐴
+1
– How does this prediction compare to measurements?
Measured Proportional-Control Steady-State Error
1.4
1.2
𝑒𝑆𝑆
TRMS [C]
1.0
𝑇𝑅𝑀𝑆
0.8
TSP = 85°C
0.6
0.4
TSP = 65°C
0.2
0.0
0
1
2
3
4
5
6
7
8
9
10
DT [C]
• The temperature is steady (TRMS becomes small) once DT is sufficiently
large
• Prediction: 𝑒𝑆𝑆 = 𝑇𝑆𝑆 − 𝑇𝑆𝑃 = −
𝑇𝑆𝑃 −𝑇𝐸𝑁𝑉
𝑄𝑀𝑎𝑥
𝐷𝑇 ℎ𝐴
+1
• Measurements show the error magnitude increases as 𝑇𝑆𝑃 − 𝑇𝐸𝑁𝑉 increases
– When 𝑇𝑆𝑃 = 𝑇𝐸𝑁𝑉 no need for control
• Steady state error decreases as
𝑄𝑀𝑎𝑥
𝐷𝑇 ℎ𝐴
increases (DT decreases)
– But when DT is too small the temperature oscillates (TRMS)
• Why does this happen? (𝑇𝑊 ≠ 𝑇𝑇𝐶 )
Predict time-dependent TTC(t) for TC
QIN = hA(TW -TTC)
TTC
TW
• TC Energy Balance (assuming 𝑇𝑊 ≠ 𝑇𝑇𝐶 )
– 𝑄 − 𝑊 = 𝜌𝑐𝑉
• 𝑄 = ℎ𝐴
𝑇𝐶
𝑑𝑇𝑇𝐶
𝑇𝐶 𝑑𝑡
𝑇𝑊 − 𝑇𝑇𝐶 = 𝜌𝑐𝑉
• 𝑯𝑻𝑪 𝑻𝑾 − 𝑻𝑻𝑪 =
𝒅𝑻𝑻𝑪
𝑴𝑻𝑪
𝒅𝒕
𝑑𝑇𝑇𝐶
𝑇𝐶 𝑑𝑡
(Eqn. A)
– 𝐻𝑇𝐶 = ℎ𝐴 𝑇𝐶
– 𝑀𝑇𝐶 = 𝜌𝑐𝑉 𝑇𝐶
• Constants
• Dynamic relationship between 𝑇𝑇𝐶 (t) and 𝑇𝑊 (𝑡)
Water Energy-Balance
Heater
QIN = FTO(QMAX)
TTC
TW
𝑑𝑇𝑊
𝑊 𝑑𝑡
• 𝑄𝐼𝑛 − 𝑄𝑂𝑢𝑡 = 𝜌𝑐𝑉
• For proportional control:
– 𝑄𝐼𝑛 = 𝑄𝑀𝑎𝑥
𝑇𝑆𝑃 −𝑇𝑇𝐶
𝐷𝑇
=
𝐴
QOUT = hA(TW -TENV)
𝑑𝑇𝑊
𝑀𝑊
𝑑𝑡
= 𝐺 𝑇𝑆𝑃 − 𝑇𝑇𝐶
• Where the controller gain is 𝐺 =
• 𝑄𝑂𝑢𝑡 = ℎ𝐴
TENV
𝑄𝑀𝑎𝑥
𝐷𝑇
𝑇𝑊 − 𝑇𝐸𝑁𝑉 + ℎ𝐴
𝑇𝐶
(𝑇𝑊 − 𝑇𝑇𝐶 )
• 𝐺 𝑇𝑆𝑃 − 𝑇𝑇𝐶 − 𝐻𝐴 𝑇𝑊 − 𝑇𝐸𝑁𝑉 − 𝐻𝑇𝐶 (𝑇𝑊 − 𝑇𝑇𝐶 ) =
– 𝐻𝐴 = ℎ𝐴 𝐴 , 𝑀𝑊 = 𝜌𝑐𝑉
– In addition to 𝐺 =
𝑄𝑀𝑎𝑥
,
𝐷𝑇
𝑊
, 𝑇𝐸𝑁𝑉 and 𝑇𝑆𝑃 are constants
𝐻𝑇𝐶 = ℎ𝐴
𝑇𝐶 ,
𝑀𝑇𝐶 = 𝜌𝑐𝑉
𝑇𝐶
𝑑𝑇𝑊
𝑀𝑊
𝑑𝑡
Collect Terms
• 𝐺 𝑇𝑆𝑃 − 𝑇𝑇𝐶 − 𝐻𝐴 𝑇𝑊 − 𝑇𝐸𝑁𝑉 − 𝐻𝑇𝐶 (𝑇𝑊 − 𝑇𝑇𝐶 ) = 𝑀𝑊
•
𝒅𝑻𝑾
𝑴𝑾
𝒅𝒕
𝑑𝑇𝑊
𝑑𝑡
+ 𝑯𝑻𝑪 + 𝑯𝑨 𝑻𝑾 = 𝑻𝑻𝑪 𝑯𝑻𝑪 − 𝑮 + 𝑮𝑻𝑺𝑷 + 𝑯𝑨 𝑻𝐸𝑁𝑉
– (Eqn. B)
– Dynamic relationship between 𝑇𝑊 (𝑡) and 𝑇𝑇𝐶 (𝑡)
• Couple with Eqn. A: 𝑯𝑻𝑪 𝑻𝑾 − 𝑻𝑻𝑪 =
𝒅𝑻𝑻𝑪
𝑴𝑻𝑪
𝒅𝒕
• What do we have?
– Two, 1st-order, coupled, constant-coefficient linerdifferential equations for 𝑇𝑊 (t) and 𝑇𝑇𝐶 (t)
System Solution
• Solve Eqn. A for 𝑇𝑊
– 𝑇𝑊 =
–
𝑑𝑇𝑊
𝑑𝑡
𝑀𝑇𝐶 𝑑𝑇𝑇𝐶
𝐻𝑇𝐶 𝑑𝑡
=
+ 𝑇𝑇𝐶
𝑀𝑇𝐶 𝑑 2 𝑇𝑇𝐶
𝐻𝑇𝐶 𝑑𝑡 2
+
𝑑𝑇𝑇𝐶
𝑑𝑡
• Plug into Eqn. B and collect terms
–
𝑑𝑇𝑊
𝑀𝑊
𝑑𝑡
–
𝑀𝑇𝐶 𝑑 2 𝑇𝑇𝐶
𝑀𝑊
𝐻𝑇𝐶 𝑑𝑡 2
+ 𝐻𝑇𝐶 + 𝐻𝐴 𝑇𝑊 = 𝑇𝑇𝐶 𝐻𝑇𝐶 − 𝐺 +
𝐺𝑇𝑆𝑃 + 𝐻𝐴 𝑇𝐸𝑁𝑉
+
𝑑𝑇𝑇𝐶
𝑑𝑡
+ 𝐻𝑇𝐶 + 𝐻𝐴
𝑇𝑇𝐶 𝐻𝑇𝐶 − 𝐺 + 𝐺𝑇𝑆𝑃 + 𝐻𝐴 𝑇𝐸𝑁𝑉
𝑀𝑇𝐶 𝑑𝑇𝑇𝐶
𝐻𝑇𝐶 𝑑𝑡
+ 𝑇𝑇𝐶 =
Collect Terms
•
𝑑 2 𝑇𝑇𝐶
𝐴 2
𝑑𝑡
+
𝑑𝑇𝑇𝐶
𝐵
𝑑𝑡
+ 𝐺 + 𝐻𝐴 𝑇𝑇𝐶 = 𝐺𝑇𝑆𝑃 + 𝐻𝐴 𝑇𝐸𝑁𝑉
– More Constant
• 𝐴=
𝑀𝑊 𝑀𝑇𝐶
𝐻𝑇𝐶
• B = 𝑀𝑊 + 𝑀𝑇𝐶 + 𝐻𝐴
𝑀𝑇𝐶
𝐻𝑇𝐶
– 2nd order, linear, Constant-coefficient differential-equation, nonhomogeneous (RHS= Constant)
• Solution 𝑇𝑇𝐶 = 𝑇𝑃 + 𝑇𝐻
• Particular Solution for RHS = Constant, 𝑇𝑃 = 𝑇𝑆𝑆 =
𝑐𝑜𝑛𝑠𝑡𝑎𝑛𝑡
– 𝐺 + 𝐻𝐴 𝑇𝑆𝑆 = 𝐺𝑇𝑆𝑃 + 𝐻𝐴 𝑇𝐸𝑁𝑉
– 𝑇𝑆𝑆 =
𝐺𝑇𝑆𝑃 +𝐻𝐴 𝑇𝐴
𝐺+𝐻𝐴
=
𝑄𝑀𝑎𝑥
𝑇𝑆𝑃 + ℎ𝐴 𝐴 𝑇𝐸𝑁𝑉
𝐷𝑇
𝑄𝑀𝑎𝑥
+ ℎ𝐴 𝐴
𝐷𝑇
– Same as for simple 1st order system
Homogeneous Solution
•
𝑑 2 𝑇𝐻
𝐴 2
𝑑𝑡
+
𝑑𝑇𝐻
𝐵
𝑑𝑡
+ 𝐺 + 𝐻𝐴 𝑇𝐻 = 0
– Assumed solution 𝑇𝐻 𝑡 = 𝐶𝑒 𝑏𝑡 , 𝑏 = ?
– Characteristic Equation 𝐴𝑏 2 + 𝐵𝑏 + 𝐶 𝑒 𝑏𝑡 = 0
–𝑏=
−𝐵± 𝐵2 −4𝐴 𝐺+𝐻𝐴
2𝐴
• If DT is small enough, then
–G=
𝑄𝑀𝑎𝑥
𝐷𝑇
will be large enough so that
– 𝐵2 − 4𝐴 𝐺 + 𝐻𝐴 < 0,
– b will be imaginary and
– 𝑇𝐻 will be oscillatory 𝑇𝐻 𝑡 = 𝐷𝑒 −𝑎𝑡 sin(𝜔𝑡 + 𝜙)
• We observed oscillations for small DT
What is the largest minimum value of DT
that will have a steady behavior?
2
𝑄𝑀𝑎𝑥
𝐷𝑇
2
• 𝐵 − 4𝐴 𝐺 + 𝐻𝐴 = 𝐵 − 4𝐴
•
𝐵2
4𝐴
− 𝐻𝐴 <
+ 𝐻𝐴 < 0
𝑄𝑀𝑎𝑥
𝐷𝑇
• 𝐷𝑇 < 𝐷𝑇𝑀𝑖𝑛 =
𝑄𝑀𝑎𝑥
𝑄𝑀𝑎𝑥
𝐵2 4𝐴−𝐻𝐴
𝑀𝑇𝐶 2
𝑀𝑊 +𝑀𝑇𝐶 +𝐻𝐴 𝐻
𝑇𝐶 −𝐻
𝐴
4𝑀𝑊 𝑀𝑇𝐶
𝐻𝑇𝐶
=
=
𝑄𝑀𝑎𝑥 𝐻𝑇𝐶
𝐻
𝑀𝑊 +𝑀𝑇𝐶 1+𝐻 𝐴
𝑇𝐶
4𝑀𝑊 𝑀𝑇𝐶
– 𝐻𝐴 = ℎ𝐴 𝐴 , 𝑀𝑊 = 𝜌𝑐𝑉 𝑊
– 𝐻𝑇𝐶 = ℎ𝐴 𝑇𝐶 , 𝑀𝑇𝐶 = 𝜌𝑐𝑉
𝑇𝐶
2
𝐻
− 𝐴
𝐻𝑇𝐶
Problem X3
• Problem X3: A 200-Watt heater and a 1.5-mm-diameter
thermocouple are placed in a water-filled beaker of
diameter 3 cm and height 5 cm. If the heat transfer
coefficient between the beaker and air is 5 W/m2K, and
between the water and thermocouple is 1000 W/m2K,
estimate the lowest proportional control temperature
increment DTMin, for which the control system will be
steady (not oscillatory). Assume the thermocouple
properties to be that of iron, and evaluate water
properties at 30°C.
• Heater: Q = 200 W
• Beaker: D = 3 cm, H = 5 cm, hAir = 5 W/m2K
• TC: D = 1.5 mm, hTC = 1000 W/m2K, iron .
Lab 12 Integral Control 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
Download