system dynamics, controls, mechatronics, and vibrations. At most schools, these
..... W. Palm, “System Dynamics”, 2nd ed., McGraw-Hill,. New York, 2010 ...
Proceedings of the ASME 2009 International Mechanical Engineering Congress & Exposition IMECE2009 November 13-19, Lake Buena Vista, Florida, USA
IMECE2009-12688
SYSTEM DYNAMICS EXPERIMENTATION AT HOME
Musa K. Jouaneh and William J. Palm, III Department of Mechanical Engineering University of Rhode Island Kingston, RI 02881, USA
ABSTRACT
INTRODUCTION
Most Mechanical Engineering curricula include courses in system dynamics, controls, mechatronics, and vibrations. At most schools, these courses do not have a laboratory component. Even at schools that have such a component, laboratory access is often limited, and thus there is a need to increase students‟ laboratory experience. This paper addresses the development and initial testing of instructional material in the form of take-home software and hardware kits that can be used to perform laboratory experiments and measurements at home to illustrate system dynamics concepts. Rather than having students perform an experiment in the university laboratory, the students are given a compact, low cost software and hardware kit with which they can perform an experiment at home using only their PC. The kits are designed so that the experiments can be conducted on a provided experimental setup such as a DC motor/tachometer system or can be used to perform dynamic measurements on engineering systems that are available at home such as motor powered devices and heating/cooling systems. The take-home kit consists of three components. The first component is a hardware interface board that is built around a PIC18F4550 microcontroller which interfaces with the student‟s PC and with the experiment hardware. The second component is a Windows based user interface program that is loaded on the student‟s PC and is used to run the experiment and collect data. The third component is the actual experimental setup or the sensor system to perform the measurement. Fifty five kits have been fabricated to perform five different experiments. Two of these experiments were tested in two courses in the mechanical engineering department at the University of Rhode Island. The paper discusses the design of the kit components, the details of the experiments, as well the initial experiences gained from using this new approach for laboratory experimentation.
Most Mechanical Engineering curricula include courses in system dynamics, controls, mechatronics, and vibrations. At most schools, these courses do not have a laboratory component. Even at schools that have such a component, laboratory access is often limited. While increased lab time is needed, many students work at outside jobs and live far from campus in many schools. This makes it harder for these students to have enough time to come to school to perform an experiment in the university laboratory. In addition, almost all students have home PC‟s (either desktops or laptops) that are suitable for take-home experiments. This makes it possible for students to perform an experiment or obtain measurements outside the lab at their own convenient time, as they would with a homework assignment. Furthermore, to make the teaching of dynamic systems concepts more engaging and interesting to students, we need to relate class theory to the dynamic performance of real engineering systems including ones that are available at home. Providing engaging laboratory experience is one of several challenges to effective undergraduate education in STEM disciplines as reported by The National Research Council (NRC) [1]. We are addressing this by developing take-home software and hardware kits that can be used to perform laboratory experiments and measurements at home to improve the understanding of system dynamics concepts in an undergraduate student population. Rather than having students perform an experiment in the university laboratory, the students are given a compact, low cost kit with which they can perform an experiment at home using their own PC. The kits are designed so that the experiments can be conducted on a provided experimental setup or can be used to perform dynamic measurements on engineering systems that are available at home such as motor powered devices and heating/cooling systems. 1
Copyright © 2009 by ASME
A survey of the literature showed that there is an increasing interest in performing measurements and experimentation in engineering programs outside of the traditional university laboratory. Scott [2] reported on take-home experiments in fluid mechanics to illustrate basic concepts such as hydrostatics and the Bernoulli equation. Berg and Boughton [3] reported on the use of commercially available attaché cases or electronic trainers that cost in the $200 to $350 range for conducting experiments at home in lower division electronic laboratory courses. Durfee, Li and Waletzko [4] were funded by NSF to develop take home experimental setups. They developed two setups, a fourth order, linear mass springdamper-system for frequency response and system identification, and an analog filtering system that uses music and synthetic sound as an input. Wang, Lacombe, and Rogers [5] discuss the use of the LEGO programmable brick as a portable data acquisition system to conduct personal engineering experiments at home that can be used to illustrate engineering concepts that are covered in sophomore or juniorlevel laboratory courses. Long, Florance, and Joordens [6] reported on the use of a home experimentation kit for digital and analog electronics in a first-year undergraduate electronics course. A challenge in performing experiments at home is developing low cost experimental setups that are rugged, easy to set up and use by the students, and also at the same time produce meaningful results and opportunities for testing of theory.
microcontroller, the hardware interface board includes the following:
32k bytes of additional RAM since the PIC18F4550 has only 2k of RAM A 20 MHz crystal with associated capacitors to be used as the external clock Status LEDs A 5-amp H-bridge amplifier chip for motor and heater control experiments A MAX232 chip for serial communication with the PC Connector for a 12-volt power supply A programming connector to download software into the board USB and serial connectors for communication with the PC User-Interface Program A 3-pin connector for connection of the temperature or vibration sensor A 4-pin connector for connection of the motortachometer setup or the heated-plate setup A 2-pin connector for connection of fan used in the heated-plate setup A 5-pin extra connector Several resistors and capacitors
TAKE-HOME LABORATORY KIT The take-home kit consists of three components. The first component is a hardware interface board that interfaces with the student‟s PC and with the experiment‟s hardware. The second component is the User-Interface Program that is loaded on the student‟s PC and is used to run the experiment and collect data. The third component is the actual experimental setup or the sensor system to perform the measurement. In this project, we are developing and testing five experiments that will be tested in various courses in the mechanical engineering curriculum at the University of Rhode Island. In this paper, we will discuss the initial testing that was performed in the Spring 2009 semester with two of these setups: a DC motor with tachometer, and a temperature measurement system. In the following sections, we will discuss the three components of the kits along with the results of the initial testing. HARDWARE INTERFACE BOARD The hardware interface board houses all the components that perform measurement, actuation, control, and communication. The hardware interface board was custom-designed and was built around a PIC18F4550 microcontroller from Microchip Technology, Inc. A photo of the developed board is shown in Figure 1. The board is mounted inside a plastic enclosure with opening at both ends. The openings are designed to allow cables and connectors to be easily attached to the board. We decided to design a custom board because there is no commercially-available board that has all the components that we need to perform all the experiments. In addition to the
Fig. 1 Hardware interface board
2
Copyright © 2009 by ASME
Fig. 2 A screen-shot of the User-Interface Program
To use the hardware-interface board, the student simply connects the output of the provided 12-volt power supply adapter to the board. The student needs also to connect the serial/USB interface cable from the PC to the board, and the cable for the specific experiment to be performed. With these connections, the experimental hardware is ready. Powering the board causes the loaded program inside the microcontroller to run. The program waits for user input from the User-Interface Program.
To use the User-Interface Program, the student first selects the Set-Up command to set the parameters for the particular experiment. These include the selection of the type of experiment such as temperature measurement or motor speed control, the test duration time, the sampling time to record the data, and, if applicable for the particular experiment, the feedback control parameters. Once the experimental parameters are selected, the user checks the Setup Done check box. This disables all the Set-Up menus and enables the Start command, which upon pressing it, the experiment starts. The experiment progress is indicated by a progress bar, but the user can abort an experiment by pressing the Abort Test command. When the experiment is completed, the Save Data command is enabled, which upon pressing it allows the user to store the collected data into a file. The collected data can then be imported into plotting software such as Excel.
USER-INTERFACE PROGRAM A screen shot of the developed Windows-based User-Interface Program is shown in Fig. 2. The User-Interface Program was designed to serve as the user-interface for all the experiments that are planned to be performed in this project. The UserInterface Program was developed in Visual Basic Express 2008, and it communicates with the embedded program on the PIC18F4550 microcontroller through either a serial or USB connection. The embedded program was developed in C using PICC compiler from CCS, Inc. The User-Interface Program transfers the experiment settings to the PIC microcontroller, provides monitoring and control of the experiment progress, retrieves the data collected after the experiment is completed, and performs saving of the collected data to a file. The UserInterface Program does not perform any measurement or feedback control activities. All measurement, timing, actuation, control and data storage activities are performed by the PIC microcontroller while an experiment is running.
EXPERIMENTAL SETUPS We have developed two experimental setups that were used in the spring 2009 semester. Below is information about these two setups. Additional experimental setups are currently being developed to be used in later semesters. DC Motor with Tachometer This experimental setup is useful in illustrating concepts such as time constant, system order, linearity, and the effect of different control actions on the behavior of the system. The experimental hardware consists of a small DC motor 3
Copyright © 2009 by ASME
(Transicoil 1121-110 DC Servo Motor Tachometer from Servo Systems, Inc.) with a built in tachometer (see Figure 3). The control input to the motor is supplied from the PWM output of the micro controller through the H-Bridge amplifier. The speed of the motor is measured from the tachometer using the 10-bit A/D converter on the micro controller. Using the User-Interface Program, the student can do the following:
Perform a calibration test to relate the steady state speed of the motor to the input voltage. This is done by selecting the Motor I/O experiment from the experiment list. This test will reveal any nonlinearities in the response such as those caused by friction. Perform an open-loop step response of the motortachometer system using different voltage inputs. Control the speed of the motor in closed loop fashion by setting the PID control gains and the sampling interval. The last two activities are performed when the student selects the Motor Speed Control experiment from the experiment list.
Fig. 4 Photo of the developed temperature sensor
The above two experimental setups were used in two courses in the spring 2009 semester. The DC Motor with Tachometer Setup was used to perform a Speed Control Experiment in the senior level Computer Control of Mechanical Systems course (MCE431), a technical elective course that had an enrollment of 9 students. The Temperature Sensor was used to measure the temperature of cooling liquid in the junior level System Dynamics Course (MCE366), a required course than had an enrollment of 47 students. We gave each student one complete kit that consists of the hardware interface board, power supply, interface cable, and the experimental system. Figure 5 shows the take-home bags that were given to the students.
Fig. 3 Motor-Tachometer Setup
Temperature Measurement Setup This setup uses a thermo-transistor temperature sensor (LM35C metal package from National Semiconductor) with three wires. The sensor can operate over a temperature range of -10 to 110 °C, and we have enclosed it in a protective sealed casing (see Figure 4) so that it can be used to measure the temperature in different environments such as air and in liquids. Using this setup, the student will be able to perform timed measurements on the response of many engineering systems that are available in the home such as heated/cooled fluids, and heating/cooling systems. Using this sensor and the User-Interface Program, the student can collect temperature vs. time data for intervals ranging from 0.5 second to 10 hours and at sampling rates ranging from 0.5 ms to 1 min.
Fig. 5 Take-home kits bags
4
Copyright © 2009 by ASME
The students were asked to download and install the UserInterface Program on their PC. The students were given about a week to do the take-home experiment, after which they were required to submit a report on the experiment. A summary of the actual experiments that the students were asked to do are discussed next. SUMMARY OF THE MOTOR SPEED CONTROL EXPERIMENT The motor can be modeled as a first order system with a time constant τ and a zero-frequency gain b. An RC filter was connected the motor output terminals to reduce noise. Its time constant is RC = 0.01 s. Thus the open-loop model form is
Vo ( s) b Vi ( s) (s 1)(0.01s 1) where Vi(s) and Vo(s) are the transforms of the input and output voltages. Fig. 6 Data and simulation results for closed-loop speed control
The students obtained open-loop speed data by selecting a 4 V input. Noting that if vi is a constant, the steady-state output voltage is bvi. Using this fact with vi = 4 V, the students used the open-loop step response plot to estimate b. They then estimated τ from the time it takes for the output to reach 63% of its steady-state value. Using the MATLAB tf and step functions with a step input magnitude of 4, they refined their estimates of τ and b by comparing the model response with the data.
SUMMARY OF LIQUID TEMPERATURE MEASUREMENT EXPERIMENT The students were given a 16 oz plastic cup. They measured the temperature of hot water as it cooled, in two tests: one with the cup containing 100 ml of water, and the second with the cup containing 395 ml. They wrote a MATLAB program to fit an exponential function of the form ΔT = bet/τ to the data, where ΔT = T – To, T is the water temperature, and To is the constant ambient temperature. They then used the model with each data set to compute the time constant τ and to predict how long it will take for the water temperature to decay to 5°C above the ambient temperature. They then compared the ratio of the two time constants with the theory developed below. This theory predicts that the ratio of the two time constants should be 1.4, with the 395 ml time constant being the largest.
The model was then used to compute the PI gains KP and KI necessary to achieve a) a desired steady-state output of 4, b) a dominant time constant no greater than 0.1 s, and c) a damping ratio greater than 0.707. The students did this by using the root locus method applied to the following root-locus equation.
1 K
s 1 / TI 0 s( s 1 / )( s 100)
THEORY: Modeling the water mass as a lumped parameter system, we obtain the model
where the root-locus gain is K = 100bKP/τ. Using the MATLAB utility rltool, they selected a suitable value for TI and then adjusted the gain K to meet the specifications, using the method illustrated in [7]. The proportional and integral gains were then found from KP = τK/100b and KI = KP/TI. Finally they ran the experiment with the computed gain values and compared the data with simulation results. Figure 6 shows a plot of the simulation and the experimental data for a particular motor. The command input was 4 V, and the PI gains were 0.61 and 20, respectively. For the open-loop plant model given in the figure, a 4 V input would result in a steadystate output of 4(0.3075) = 1.23 V. However, the figure shows that the closed-loop system produces a steady-state output of 4 V, so the steady-state error is zero. The closed-loop time constant is less than 0.1, and the damping ratio is greater than 0.707, as required.
Vc p
d (T To ) 1 (T T0 ) dt R
or
d (T ) T 0 dt
Where ΔT = T - To , and the time constant is τ = ρVcpR. If τ2 is the time constant for the 395 ml case and τ1 is the time constant for the 100 ml case, then the ratio τ2/τ1 is proportional to V2R2/V1R1. Let us assume that the thermal resistance R is inversely proportional to the water surface area A, so that R2/R1 = A1/A2. 5
Copyright © 2009 by ASME
Fig. 7 Temperature of water in a plastic cup obtained by the take-home kit
The area A is the sum of the horizontal water surface (over which convection occurs) and the area of contact between the water and the cup (over which conduction occurs). Thus this model lumps together the resistances due to convection and conduction. Measurements of the cup geometry show that A1/A2 = 0.358. Thus the theoretical ratio τ2/τ1 is given by
A plot of the temperatures of water measured by the takehome kit is shown in Figure 7, along with the fitted model. The graphs show the results for 100 ml of water (top graph) and 395 ml (bottom graph). Note that the linear model is less accurate at higher temperatures, where perhaps radiative loss is more significant.
2 V2 A1 395 (0.358) 1.4 1 V1 A2 100
KIT EFFECTIVENESS To evaluate the effectiveness of these kits in increasing student understanding of system dynamics concepts, the students in each course were given a survey at the beginning of the course and after they completed the experiment. In addition to the report that the students needed to write on the take-home experiment, the students were also tested on the topics related to the take-home experiment in one of the exams
Forty-eight people performed the experiment. Most found the ratio to be between 1.6 and 1.9. Considering the simplification obtained by lumped conduction and convection resistances, it is felt that the results were good. 6
Copyright © 2009 by ASME
Table 1. Pre to Post Means Survey Results Pre Mean
Post Mean
4.46
4.40
4.02
4.02
3.72
3.68
4.07
4.26
1. How comfortable are you in performing experiments? 2. How skilled are you in analyzing experimental data? 3. How convenient is a take-home experiment than doing an experiment in the school lab? 4. How comfortable are you in doing an unsupervised experiment at home?
On Campus 27.8% 22.0%
Commute 72.2% 78.0%
Pre Post
0-10 29.6% 34.0%
11-25 29.6% 30.0%
26-40 9.3% 10.0%
Yes 37.0% 44.0%
No 59.3% 54.0%
Pre Post
94.4%
5.6%
Post Mean
3.64
13.0%
87.0%
Post Mean
4.62
Pre Mean
Post Mean
5. Do you live on campus or commute?
6. If you commute, how many miles is it one way?
7. Are there barriers that make it difficult to come to campus for a three-hour lab session 8. (PRE) Do you have access to a Windows-based computer where you live during the semester? 8. (POST) Was the take-home experiment’s software difficult to set up? 9. (PRE) Have you ever done a take-home experiment before outside of mechanical engineering courses? 9. (POST) Was the take-home experiment’s hardware difficult to set up?
10. (PRE) How many take-home experiments have you done outside of mechanical engineering courses? 10. (POST) As a result of the take-home experiment, are you interested in taking more courses in the system dynamics area, such as mechatronics, control systems, or vibrations?
>40 5.6% 4.0%
Pre Post
0.44
3.62
given in each course. The evaluation and assessment of the effectiveness of this project is conducted with the help of an external evaluator, Dr. John Boulmetis, a Professor in the School of Education at URI.
post mean is slightly higher than pre mean. Question #4 results show that after performing the take home experiment, more students agreed that they are comfortable in doing a take-home experiment. Note that over 70% of the students who completed the survey live off-campus (Question #5), about 40% of them reported that there are barriers that make it difficult for them to come to campus for a three-hour lab session (Question #7), and about 95% of them have a Windows-based computer (Question #8 Pre). Only 13% of the students have done a take-home experiment before (Question #9 in Pre), and the average number of take-home experiments done before was less than 1 (Question #10 Pre).
Table 1 compares the mean answers of the Post and Pre surveys. A total of 55 students completed the Pre survey while 50 students completed the Post survey in the two courses. Note that the first seven questions in both the Pre and Post surveys are common. For questions 1-4 in both surveys, and 8 -10 in the Post survey, the students were given choices for the answers that range from very comfortable, very convenient, etc. (score = 5) to very uncomfortable, very inconvenient, etc. (score = 1). For the remaining questions with the exception of question 6 (Pre and Post) and question 10 in Pre survey, the students were asked to answer yes or no. As seen in Table 1, the post and pre means results are very comparable for the first four questions, with the exception of question #4 where the
The majority of the students reported that it was easy to set up the software and the hardware for the take-home experiment (Questions #8 and 9 in Post survey). Also, a majority of the students reported that as a result of the take-home experiment, they are more interested in taking more courses in the system 7
Copyright © 2009 by ASME
dynamics area, such as mechatronics, control systems, or vibrations (Question #10 Post). Furthermore, the exam test results on a question related to the experiment showed that the students scored better in that question after they had done the take-home experiment (the test question average score increased from 49% on the first test to 75% on the second). The above results are encouraging, and work is underway to administer the previously reported two experiments and other experiments in the coming semesters. ACKNOWLEDGMENTS This project was supported by a CCLI Grant from NSF, Award # DUE-0736603. Special thanks to Jim Byrnes for his help with the detail design of the hardware interface board. REFERENCES 1.
2.
3.
4.
5.
6.
7.
Evaluating and Improving Undergraduate Teaching in Science, Technology, Engineering, and Mathematics, M. Fox and N. Hackerman, Editors, National Research Council, The National Academies Press, Washington, DC, 2003. T. Scott, „Two “take home” experiments in fluid mechanics,” In Proceedings of the 2000 ASEE Annual Conference and Exposition, St. Louis, MO, 2000, pp. 6451-6458. W. Berg, and M. Boughton, “Enhanced suitcases for upper division electronics laboratories,” In Proceedings of the 2001 ASEE Annual Conference and Exposition: Peppers, Papers, Pueblos and Professors, Albuquerque, NM, 2001, pp. 4459-4464. W. Durfee, P. Li, and D. Waletzko, “Take-home lab kits for system dynamics and controls courses,” In Proceedings of the 2004 American Control Conference, Boston, MA, 2004, pp. 1319-1322. E. Wang, J. Lacombe, C. Rogers, “Using LEGO bricks to conduct engineering experiments,” In Proceedings of the 2004 ASEE Annual Conference and Exposition, Salt Lake City, UT, 2004, pp. 15085-15102. J. Long, J. Florance, and M. Joordens, “The use of home experimentation kits for distance students in first year undergraduate electronics,” In Proceedings of the 2004 ASEE Annual Conference and Exposition, Salt Lake City, UT, 2004, pp. 14763-14772. W. Palm, “System Dynamics”, 2nd ed., McGraw-Hill, New York, 2010, Example 11.2.6.
8
Copyright © 2009 by ASME