Lecture Slides

Download Report

Transcript Lecture Slides

ME 322: Instrumentation
Lecture 37
April 20, 2016
Professor Miles Greiner
Proportional control program and characteristics, Shift
register and integral control program concept
Internship Opportunities
• Nevada National Security Site (Las Vegas)
– Nuclear materials packaging internship
– Description: http://www2.nstec.com/job%20opportunities/110723.pdf
Announcements/Reminders
• HW 12 Due Friday
• X3 (Write a Proportional Control VI)
• HW 13 Due Monday
• L12PP (on/off, proportional and integral control)
• HW 14 Due Wednesday
• X4
• Review for final
• Next Wednesday and Friday
• Course Evaluation
• Last Monday of classes: www.unr.edu/evaluate
• This week: Lab 11 Unsteady Karmon Vortex Speed
• Demo sessions, 45-minute periods with your partner
• Two working wind tunnels, groups of four to collect data
Lab Practicum Final
• 3-hour Lab Practicum Final Schedule
– Doodle Poll to schedule
– Will publish schedule soon
• Repeat one of the last three labs (10, 11 or 12)
– Guidelines, http://wolfweb.unr.edu/homepage/greiner/teaching/MECH322Instrumentation/Tests/Index.htm
– Solo, start to finish
• Generate LabVIEW, Excel and PowerPoint during final
• Only given instructions, book, and 1 page of notes
– No sample lab, partner, or connection to internet
• Make sure to prepare yourself during the labs
– The lectures are very important
• Lab Practice Periods
– Saturday and Sunday, April 30, May 1, 2016
• Lab-in-a Box (has anyone used them yet?)
– All equipment for Labs 10 and 12 in basement of DeLaMare Library
– Suggest using these for L12PP
– Practice for Final
Lab 12 Setup
• Measure the beaker water temperature using a
thermocouple/conditioner/myDAQ/VI
• Use myDAQ analog output (AO) to turn heater
on/off to control the water temperature
– Use Fraction of Time On (FTO) to control heater power
Proportional Control
Current
Temperature
•
Fraction of time on (FTO) when T is within a small increment DT of TSP
– Define 𝑓 𝑇 =
•
•
•
𝑇𝑆𝑃 −𝑇
𝐷𝑇
Three temperature zones:
– For T < 𝑇𝑆𝑃 − 𝐷𝑇 ,
– For 𝑇𝑆𝑃 − 𝐷𝑇 < 𝑇 < 𝑇𝑆𝑃 ,
– For 𝑇 > 𝑇𝑆𝑃 ,
f> 1
FTO = 1
1 > f >0
f <0
𝐹𝑇𝑂 = 𝑓
FTO = 0
For DT = 0, Proportional control is the same as full power On/Off control
Corrective Heat input:
– Q = QMAX*FTO = 𝑄𝑀𝐴𝑋
𝑇𝑆𝑃 −𝑇
𝐷𝑇
= −𝐺 ∗ 𝑒
– Error: e = 𝑇 − 𝑇𝑆𝑃 ; Gain: 𝐺 =
𝑄𝑀𝐴𝑋
;
𝐷𝑇
Maximum Power: QMAX= V2/R
Proportional Control
• Starting point VI ; Wait (ms)
• Turn this in on Friday
Front Panel
Set-Point, Lower-Control, and Measured Temperatures vs Time
90
80
T
Temperature, T [C]
70
TSP
60
TSP - DT
50
40
30
20
0
10
20
30
40
50
60
70
80
90
Time, t [minutes]
• Two set point temperatures (65°C and 85°C),
• Increasing DT = 0, 5, 10°C decreases unsteadiness but reduces the average steady
state temperature TA below TSP
• 𝑇𝑅𝑀𝑆 =
1
𝑁
𝑁
𝑖=1(𝑇𝑖
− 𝑇)2 (same as standard deviation) measures unsteadiness
• eSS = TAVG-TSP measures steady-state error
Unsteadiness and Error versus DT
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]
• Unsteadiness TRMS decreases as DT increases
– And as TSP decreases
– Want this to be zero
• The average steady-state error e = TSS-TSP
– Is positive for DT = 0, but decreases as DT increases
– Magnitude increases as DT increases
– Want this to be zero
• The behavior you observe will depend on whether the TC is
touching or close to the heater, the amount of water in the beaker,
the room temperature, and other factors.
Proportional Control is Flawed
• Proportional control is able to eliminate
unsteadiness.
• But, we found that if DT is large enough to make the
temperature steady, then the steady-state
temperature is below the desired set-point value
• What should Q (and FTO) be?
Energy Balance
TENV
QIN = FTO(QMAX)
T
QOUT = hA(T-TENV)
• So far we haven’t done much quantitative analysis
• Proportional Control
– Q = QMAX*FTO = 𝑄𝑀𝐴𝑋
– At T = 𝑇𝑆𝑃 , Q = 0,
𝑇𝑆𝑃 −𝑇
𝐷𝑇
• The steady state temperature will always be below TSP (so that QIN balances
QOUT)
• Under steady-state conditions, QIN = QOUT, we want T = TSP
– FTO*QMAX = hA(TSP-TENV)
– So want: 𝐹𝑇𝑂 =
ℎ𝐴 𝑇𝑆𝑃 −𝑇𝐸𝑁𝑉
𝑄𝑀𝐴𝑋
• But we don’t (want to) know h or 𝑇𝐸𝑁𝑉 and they may be changing
• What is another scheme to find FTP?
– 𝐹𝑇𝑂 =
𝑇𝑆𝑃 −𝑇
+
𝐷𝑇
?
Integrate Error
90
80
T
Temperature, T [C]
70
• Integrate error
–
𝑡
𝑒𝑑𝑡
0
60
TSP - DT
50
If T-TSP < 0, then
Increase FTO
40
30
𝑡
0
=
𝑇 − 𝑇𝑆𝑃 𝑑𝑡 =
𝑁
𝑖=1
𝑇 − 𝑇𝑆𝑃 𝑖 Δ𝑡
TSP
20
0
10
20
30
• Corrective Action from integration (integral fraction of time on)
–
𝐹𝑇𝑂𝑖 = −
• FTOi will
𝑡
0
𝑇−𝑇𝑆𝑃 𝑑𝑡
𝐷𝑇𝑖
=−
𝑁
𝑖=1
40
50
60
Time, t [minutes]
𝑇−𝑇𝑆𝑃 𝑖 Δ𝑡
𝐷𝑇𝑖
– 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). In ME 410 Control, you will learn how to choose DTi.
– In Lab 12, wait for temperature to be steady before turning on integral control
(Decreasing DTi)
70
How to implement this in LabVIEW
• Need to calculate
𝑇−𝑇𝑆𝑃
−
𝐷𝑇𝑖
=
𝑇𝑆𝑃 −𝑇
𝐷𝑇𝑖
at each time step
– Then sum with all previous steps
• Within While Loop
– Use Shift Register to pass data from one step to the next
• Modify Proportional Controller to include integration
– 𝐹𝑇𝑂 = 𝐹𝑇𝑂𝑃 + 𝐹𝑇𝑂𝑖 =
𝑇𝑆𝑃 −𝑇
𝐷𝑇
−
𝑁
𝑖=1
𝑇−𝑇𝑆𝑃 𝑖 Δ𝑡
𝐷𝑇𝑖