Lab 6: Control System Revision: June 10, 2010 215 E Main Suite D Pullman, WA 99163 (509) 334 6306 Voice and Fax Overview In feedback control, the variable being controlled is measured by a sensor; this measurement is compared to a desired value, and the difference is as a basis to change the parameter being controlled. A common example of closedloop control is a thermostatcontrolled home heating system. The house temperature is measured by a sensor; this temperature is compared to the desired temperature as set by the thermostat. The furnace is turned on if the measured temperature is below the desired temperature and turned off if the measured temperature is above the desired temperature. In this lab assignment, we will implement a temperature control system that is analogous to the home heating system example provided above. Before beginning this lab, you should be able to: After completing this lab, you should be able to: State rules governing ideal opamps (Chapter 1.8.0) Analyze electrical circuits which include ideal opamps (Chapter 1.8.1) Design a thermistorbased temperature measurement system (Lab assignment 2) Use a MOSFET as a voltage controlled current source (Lab assignment 0) Implement a comparator using an operational amplifier Implement a MOSFETbased power amplifier Design and implement a closed loop, on/off temperature control system This lab exercise requires: Digilent Analog Parts Kit Digilent EE board USB drive Symbol Key: Demonstrate circuit operation to teaching assistant; teaching assistant should initial lab notebook and grade sheet, indicating that circuit operation is acceptable. Analysis; include principle results of analysis in laboratory report. Numerical simulation (using PSPICE or MATLAB as indicated); include results of MATLAB numerical analysis and/or simulation in laboratory report. Record data in your lab notebook. Doc: XXXYYY page 1 of 6
Lab 6: Control System General Discussion: In this assignment, we will construct a simple closedloop temperature control system. The thermal system to be controlled is shown in Figure 1. The system consists of a power resistor, whose temperature is to be changed, and a thermistor to monitor the resistor s temperature. Use of these components is discussed separately below. Regulation of the resistor s temperature will be implemented by applying a voltage to the power resistor; increasing the voltage across the resistor increases the power dissipated by the resistor. The resistor power is dissipated as heat, so increasing the voltage difference across the resistor increases the temperature of the resistor. In feedback control, the quantity being controlled is measured and used to apply an input to the system. In our case, we will measure the temperature of the resistor with a thermistor in order to determine what voltage should be applied to the resistor. The thermistor used in this assignment is the same device used in lab assignment 2. The student is encouraged to take advantage of the results obtained during that lab assignment when performing this lab assignment. Thermistor Power Applied Voltage, V R Figure 1. System to be controlled. The goal of this assignment is to design two subsystems which will allow the temperature of the resistor to be controlled. The first subsystem is a temperature measurement system; this system is to provide a voltage which is approximately proportional to the temperature of the aluminum block. The second subsystem will use this measured temperature, along with a voltage indicating the desired temperature, to apply a voltage to the resistor which provides the desired resistor temperature. The overall approach we will use to implement the overall temperature control system is shown in block diagram form in Figure 2. Voltage Indicating Desired Voltage Indicating Actual Controller On/Off Decision Heat loss to surroundings Measurement System Figure 2. Overall temperature control system block diagram. www.digilentinc.com page 2 of 6
Lab 6: Control System The individual elements in the system shown in Figure 2 are described below, along with the basic approach we will use to implement these system elements. Figure 3 provides a circuit schematic showing our implementation of the elements in the system. Controller: The controller accepts as input voltages indicating the desired and measured heat resistor temperatures. If the desired resistor temperature is above the actual temperature the controller will turn on the voltage applied to the resistor, thus increasing the resistor temperature. If the desired resistor temperature is below the actual temperature the controller will turn off the voltage applied to the resistor, thus allowing the resistor to cool. Note that our implementation does not allow the resistor temperature to go below room temperature. We will implement this compensator with a comparator circuit. The comparator consists of an operational amplifier with no feedback if the noninverting input of the opamp is higher than the inverting input, the output will go to the positive supply voltage, while if the noninverting input is lower than the inverting input, the output will go to the negative supply voltage. Our operational amplifiers will not provide enough power to affect the resistor temperature, so we use an IRF 510 MOSFET as a switch to amplify the power output of the controller. Power : The power resistor accepts a voltage/current input which is dissipated as heat in the resistor. If a voltage is applied to the resistor, the resistor will heat up. If no voltage is applied to the resistor, the resistor will cool to room temperature. measurement system: Our temperature measurement system will be thermistorbased. The thermistor is bonded to the resistor; we can use the thermistor resistance in a voltage divider circuit which provides an output voltage which increases as the resistor temperature increases. (Note: we have created a similar design in lab assignment 2.) The output of the temperature measurement system is to be a voltage indicating the actual temperature of the resistor; since we have no direct measurement of the resistor temperature, this measurement will be uncalibrated our voltages will not be convertible to a specific temperature, we will only be able to determine trends in the resistor temperature. Voltage indicating desired temperature: This voltage provides the desired heat sink temperature; it is also called the reference voltage. Our temperatures will be represented as voltages; the scale of the reference voltage must be the same as the scale of the voltage output of the temperature measurement system. This voltage is set externally to the system; we will implement it with a variable voltage supply. www.digilentinc.com page 3 of 6
Lab 6: Control System Vref(t) Controller Comparator 10 V Vact(t) VG(t) Power Amplifier 5 V vr(t) Thermal Subsystem (resistor plus thermistor) Power 5 V Thermistor RTh(t) R Vact(t) Measurement System Figure 3. System schematic. www.digilentinc.com page 4 of 6
Lab 6: Control System Prelab: (a) The overall circuit to be implemented in this lab assignment is provided in Figure 3. Review this circuit schematic carefully before lab. Be able to summarize your expectations as to the response of the voltages V G (t) and V P (t) in the cases in which: i. The voltage indicating the actual heat sink temperature (V act ) is higher than the voltage indicating the desired temperature (V ref ). ii. The voltage indicating the actual heat sink temperature (V act ) is lower than the voltage indicating the desired temperature (V ref ). (b) The power amplifier will be implemented using an IRF 510 MOSFET. Use the Internet to find a specification sheet for this MOSFET. Record, in your lab notebook, the pin descriptions for the MOSFET, the MOSFET threshold voltage, and the maximum allowable voltages and currents for the MOSFET. (c) The thermistor should be attached to the power resistor before lab. Hot glue or tape work well for this process. Lab Procedures: 1. Implement your plant/temperature measurement system and check its response. To do this, apply a small voltage (approximately 0.5V to 1V) to the power resistor and verify that the temperature of the power resistor responds as desired (e.g. the output voltage goes up). Does the resistor reach a steadystate (constant) temperature? If so, about how long does it take for the resistor to reach its final value? Monitor the temperature of your resistor while conducting this test. Do not allow the resistor to become excessively hot, even if you have to terminate the test before a constant temperature is achieved! Record your observations in your lab notebook. 2. Implement the system shown in Figure 3. Use a DMM to measure the gate voltage of the MOSFET (V G (t) in Figure 3) and the voltage applied to the resistor (V R (t) in Figure 3) for the two cases listed in the prelab. Record the MOSFET gate voltage and the resistor voltage for these case in your lab notebook. Verify, using your DMM, that the expected trends in the voltage indicating the actual heat sink temperature (V act (t) in Figure 3) occur for the two cases listed in the prelab (e.g. V act (t) should increase if V ref (t) > V act (t) and V act (t) should decrease if V ref (t) < V act (t)). Demonstrate operation of your circuit to a teaching assistant and have them initial your lab notebook and the lab checklist. 3. Since temperatures and voltages are now varying with time, we will use the oscilloscope to look at the behavior of the system voltages as functions of time. The EE board oscilloscope can measure four channels of data four different voltages vs. time. Use your oscilloscope to measure (simultaneously) the following signals: V ref (t) V ac t(t) V G (t) V R (t) www.digilentinc.com page 5 of 6
Lab 6: Control System The oscilloscopes available to us provide the ability to record the displayed data to a file. (In the oscilloscope window, select Export and then select a location and filename in which to save the data displayed in the oscilloscope window. Save the data as a.csv file. The lecture material associated with this lab assignment provides an example of this process.) Command either an increase or decrease in temperature and display the response of the signals above signals on the oscilloscope. Acquire at least 100 seconds worth of data. Save the four channels of data you are measuring to files. You will need to plot and print this data for your worksheet submission. Demonstrate your timedependent voltage measurements to a teaching assistant and have them initial your lab notebook and the lab checklist. Postlab Exercise: Plot the oscilloscope data you acquired in part 3 of the lab procedures. You can use any software you wish to do this. www.digilentinc.com page 6 of 6