ME 322: Instrumentation Lecture 35 April 17, 2015 Professor Miles Greiner On/off feedback control, Lab 12 setup, Analog Output, Strobe light vi, On/off water temperature control vi Announcements/Reminders • HW 11 is due now • HW 12 due next Friday • Next week: Lab 11 Unsteady Karmon Vortex Speed • 1-hour periods with your partner • Schedule on WebCampus (please be on time and come prepared) • Lab Practicum Final – Guidelines, http://wolfweb.unr.edu/homepage/greiner/teaching/MECH322Instrumentation/Tests/Index.htm – Schedule on WebCampus • Please let me know if this schedule conflicts with other finals • If you want to change your time, please trade with someone else, both send emails to Marissa and me, and get confirmation. – Practice Periods • Saturday and Sunday, May 2-3, 2014 Aeronautical Engineering at UNR 1. The Mechanical Engineering Department currently offers a course in Aerodynamics. Would you be interested in taking courses in Airframe Design, Propulsion Systems, or Aeronautical Component Manufacture if they were offered? 2. Would you be more interested in attending graduate school at UNR if it offered advanced training in Aeronautical Engineering? 3. If there were Aeronautical Engineering jobs in Reno, would this increase your interest in taking undergraduate courses or attending graduate school in that field? Fry Pan Controller Increase TSP Decrease TSP • Bi-metallic strip deforms as its temperature changes • Opens switch (turns heater off) when it gets to hot, and closes it (turn heater on) when too cool • Dial physically moves strip and sets desired or “set-point” temperature TSP (at which heater turns off) • Feedback Control • Measures temperature and adjusts corrective action • Full on/off control • “Bang/Bang” control • Would not work for a cruise control On/Off Control TSP T T Heater off Error e=T-TSP Heater on • The sensor and heater are not at the same location – By the time the sensor reaches the set-point temperature TSP and turns off the heater, the heater is above TSP – The sensor temperature continues to rise as energy from the heater diffuses to it. – Eventually the sensor temperature decreases below TSP and the controller turns on the heater – There is a delay before the sensor detects a temperature rise • Even though the sensor is very accurate and turns the heat on/off at TSP the delayed response of sensor to the heater causes on/off control to exhibit oscillations. – Oscillations might be smaller if we did not use full on/off control – We would like the error e = T-TSP to be zero. Desired Characteristics • Reach desired temperature quickly • Minimize error e = T – TSP • Robust to changes in the environment – Such as wind and external temperature • Be able to follow time-dependent set point TSP(t) • • • • Controller Examples Thermostat Hot-film anemometer Oven Motor speed controller – Garage door opener, fan • Car cruise control (not full on/off) • Unmanned Autonomous Systems (UAS) – Direction, speed, altitude, level • Missile or rocket guidance – Correct for wind conditions • Self-driving cars – Sense distance between cars and maintain it • In each case, sense the variable to be controlled, compare to desired value, and take corrective action Lab 12 Temperature Feedback Control • Measure temperature in a beaker of water, T – Thermocouple, signal conditioner, myDAQ, VI • You’ve done this already • Is the water temperature uniform? What is T? • Control power to heater to bring water to TSP – Before: the heater was on 100% of the time so the water boiled – Now: Actively turn the heater on/off according to different control logic structures • i.e. On/Off, Proportional, Integral… • Use myDAQ analog output to control a digital relay that turns heater on/off • If TSP = TEnvironment is there a need for control? • What if TSP is > 100°C? Lab 12 Setup • myDAQ has two analog output (AO) channels – V = ±2 and ±10 volt ranges, N = 16 (216 = 65,536), – Low current (2 mA, can’t power heater) – http://www.ni.com/pdf/manuals/373060e.pdf (page 36) • Solid State Relay = voltage-controlled switch – Switch is on (closes) when V > 3 volt; Off when V < 1 volt – http://wolfweb.unr.edu/homepage/greiner/teaching/MECH322Instrumentation/Labs/Lab %2012%20Thermal%20Control/Lab%20Index.htm Schematic Heater TC Signal Conditioner Analog Input ±10 and ±2 Volt,16 bit TC myDAQ Solid State Relay Tyco SSRT-2400-10 Power Switch Analog Output ±10 and ±2 Volt,16 bit Input + Ground Turn light on/off • NI Measurement and Automation explorer – Analog Output – Update • LabVIEW VI – Create Channel (Digital Output) – Write Data – While Loop VI to turn light on/off • Block Diagram and Front panel Full on/off Control • LabVIEW VI “logic” – Measure thermocouple temperature for 1 sec • Average, T, display – Compare to TSP (compare and select icons) – Turn 200 W heater on/off if T is below/above TSP – Waveform Chart • T and TSP versus time • e = T-TSP versus time – Repeat • Starting Point VI – Temperature versus time from earlier labs – http://wolfweb.unr.edu/homepage/greiner/teaching/MECH322Instrumentation /Labs/Lab%2012%20Thermal%20Control/Lab%20Index.htm Full On/Off Temperature Control Front Panel Next time • Review program construction/logic • Consider proportional control – Heater Power is proportional to error e = T-TSP Fractional Time On (FTO) If DT = 0 then full on/off If DT > 0 then proportional 3 Temp Domains 3) T < TSP – DT FTO = 1 2) (TSP – DT) < T < TSP T = TSP T = TSP – DT 3) T > TSP f=0 f=1 FTO = 0 Strobe Light VI