Barakat, N., Jack, H., “A hands-on approach in teaching Dynamic Systems Modeling and Control”, ASME Annual Meeting, 2006.
Most engineering products nowadays are multi-part integrated systems that are produced by teams of engineers. These systems are characterized by their complexity and diversity of components that range between being fully mechanical to being fully electrical components. A vital aspect in successfully building and running of these systems is the proper modeling and control of their dynamics. As mechanical engineering students graduate and face this reality, a hands-on preparation to deal with similar systems during college experience becomes very rewarding. The important elements of applying knowledge in dynamic systems modeling and control are practiced during the laboratory session in college.
At the Grand Valley State University (GVSU) School of Engineering (SOE) the integration of electrical, mechanical and software systems is instructed and practiced in a required course (EGR 345) entitled “Dynamic systems Modeling and Control.” This course includes a theoretical part where principles of system dynamics, system components, and system control are emphasized. The course capitalizes on students’ previous knowledge of the simple isolated systems and modifies their strategies and approach to look and treat engineering systems as complete integrated entities. In addition, the course includes a significant lab component and a major project through which the student gains vital hands-on experience.
In this paper, the philosophy and major components of the course is discussed. The focus is on presenting a sequence of lab experiments that serve the application of principles of dynamic systems modeling and control, as well as the final project. These experiments are characterized by its comprehensiveness and cost effectiveness. Moreover, an innovative method of making the lab equipment available to the students, and mostly owned by them, will also be summarized. As this approach minimizes the financial burden of the lab equipment, it also gives the students an element of ownership and comfort dealing with equipment they own and use. As a matter of fact, it ultimately leads to the utilization of these pieces of equipment in an innovative way to produce an engineering electromechanical system that will perform the tasks required by their final project description.
Today, engineering products are characterized by their multiple integrated components. These components range across the spectrum between being fully mechanical and fully electrical. Yet, these products go through the same engineering cycle of design and build, which requires modeling and prototyping. Accurate modeling and control of these products’ dynamics defines their functionality aspects and consequently their survival in the market. Theoretical knowledge of the physics governing the dynamics of systems and its control are normally covered in the classroom during college years. In particular, for mechanical engineering students, this coverage treats different components and their relevant dynamics individually, and in some cases as integrated systems, through textbook examples that are mostly simplified. The majority of college curricula follow the traditional method of separating control systems treatment from mechanical and electrical systems treatment. Moreover, the mathematical bases for modeling and analyzing these systems are overlooked which results in the students losing the opportunity to put their acquired mathematical tools into practical applications . In addition, control systems education is incorporating increasingly complex control systems to text books problems that end up being oversimplified and solved on paper, without any actual realization and testing of the system. In fact, a fundamental drawback to the traditional control education textbooks and approaches is that they mostly are built on the assumption that the students have gained a sufficient background in modeling dynamic systems. Therefore, they mostly start from the “Laplace” representation of models, through imaginary or simplified equations, which results in the students having a disconnection between actual systems and textbook equations. Another problem with traditional controls education is the lack of hands-on applications using real and modern control tools, like off-the-shelf microprocessors and motion controllers. Some attempts have been tried to offer hands on experience with these off-the-shelf tools . However, most of the course time was dedicated to teaching how to handle microprocessors for control purposes because of the lack of preparatory courses for mechanical engineers in this area.
A comprehensive coverage of integrated dynamic systems and their control, balanced between both theoretical and practical sides would suggest a more effective method to follow. This unique approach will force the students to put their separated pieces of knowledge from multiple courses into integrated systems that are real and have a hands-on experience that will become very rewarding as they graduate and start their careers.
At GVSU-SOE this approach is being implemented in a course that is part of the curriculum of mechanical, and product design and manufacturing (PDM) engineering. The course is entitled “Dynamic Systems Modeling and Control - EGR 345” and includes a theoretical part where the principles of system dynamics, system components, and control are emphasized while capitalizing on, and reviewing, the isolated pieces of knowledge that the students gained in multiple previous courses. The course is balanced with a significant lab component and a major term project . These components are directly related to the class topics and are set to quickly ramp up the students’ experience with integrated systems in a progressive fashion. The course focus is on teaching the students strategies and approaches to design and build engineering systems as integrated entities using modern tools and techniques.
The lab experience that the students gain is facilitated by an innovative method that makes the lab equipment available to the students at their convenience. The goal is to alleviate the problems associated with lab equipment availability and cost as well as to maximize the students learning opportunities throughout and after the course. The method was developed through multiple course offerings . In the latest offering (Fall 2005), the students were able to purchase and own an individual controller board as part of their course package for US$30. The board is 4x1 inches in size and contains an Atmel Mega32 microcontroller, a USB connector and interface circuit, LEDs, a connector, reset switch, and a fuse. The board is flexible enough to be used with any PC with a USB port. Multiple free software packages are available for the students to write programs in C and download to the board. During the lab, supplementary boards containing voltage regulating circuits, motor drivers, and protection circuitry, are made available to be connected to the students’ boards through a simple socket.
The following sections of this paper include a description of the course content with a reflection on the underlying ideas. In particular, the lab content and highlights of the lab experience are presented. In addition, the current equipment is described in details as well as the resulting applications, including the final project. Finally, conclusions and remarks are summarized.
Dynamic systems modeling and control (EGR 345) is a junior-year engineering course that builds upon previous knowledge which is distributed among multiple courses. These courses include: Calculus, differential equations, dynamics, analog and digital electric circuits, C programming, and CAD/CAM. As was mentioned, the course is aimed at enabling the students to apply the collective knowledge from the previous courses to design and model integrated electrical and mechanical systems, including their controllers, using modern tools and methods. Individual and integrated systems are modeled in the time domain with differential equations and analyzed using multiple techniques such as the explicit solution of ODEs, numerical integration, standard forms, and phasor analysis. Laplace transforms are also applied and the final equations are introduced for modeling and control applications. Other methods for control systems design and analysis are used such as block diagrams and Bode plots. Topics covered during the lectures include: translational and rotational systems, differential equations, numerical analysis, electrical systems, feedback control, phasor analysis, Bode plots, Laplace transforms, continuous sensors/actuators, and motion control. The timing of the lecture material is synchronized with the lab experiments, as much as possible, to emphasize the students learning experience using actual systems. During the course a strong emphasis is placed on linking physical systems to mathematical models in both the individual and integrated form. These systems are designed, modeled, and analyzed, using modern tools and eventually a control system is integrated with them to arrive at the final product. The use of off-the-shelf microcontrollers is emphasized as a realistic choice for achieving the control tasks.
The theoretical material is supported by a weekly laboratory session. The laboratories are structured to require students to do prelab design, simulation, and programming. During the laboratory, students are expected to construct systems, take readings to verify theoretical predictions, and then characterize the systems.
By the midpoint of the semester, students become capable of building basic negative feedback control systems. Upon concluding the laboratory sequence, students would have had a mature control design experience. The lab experiments are published before the lab. Students are expected to write and debug programs before the lab using the thumb boards they own, as part of the prelab. The students start the lab by submitting their lab books to the lab instructor for prelab verification. After assembling the necessary equipment to conduct the experiment, the evaluated lab books are returned and the students modify their plan of action accordingly. Experimental analysis and post experiment analysis are also added to the lab book. Each experiment deals with a different complex system, using a computer and an interface/control board, to achieve a new goal. Experiments that are not concluded during the lab period are completed by the students at their own convenience without challenges in equipment availability. A complete technical lab report is requested from a sub-group of all students each lab period on a rotating basis to emphasize technical writing and communication. By the second-half of the semester the major project starts to surface and most of the students resort naturally to using their own boards as the project centerpiece. At that point they are so familiar with the microcontroller that no hesitation is expressed towards utilizing it on their own in their projects.
The lab experiments force the students to ramp up their hands-on knowledge of the basic control tools and equipment during the first few experiments. The first lab experiment is directed to gaining familiarity with the hardware. Students program the Atmega32 Thumb Board using a basic programming tutorial of the ATMega 32 for various I/O and interrupt tasks, individually. Meanwhile, students are strongly encouraged to employ their own laptops in the process to gain autonomy and confidence with the equipment. The second lab experiment is directed towards the software. Numerical methods are reviewed and used through Scilab and C programs for numerical solutions. In addition, a tutorial on creating Web Pages is conducted.
By the third lab, a proportional feedback control system using a PWM controlled transistor and tachometer for velocity feedback is built and tested. The following experiment exposes the students to deadband compensation for bidirectional motion. Stiction values are measured and used in compensation subroutines. Position control with an encoder and a potentiometer is added in the following experiment to allow bidirectional motion with position feedback. The experience is then enhanced by adding subroutines to generate setpoints for motions that would allow the motion to start and stop smoothly.
By the midpoint of the semester, the lab experience is fortified by modeling and integration of systems. Parameters for an ideal DC motor are first measured, then calculated, separately. The motor model is used to compare theoretical and actual responses of a feedback control system. Moreover, other controllers and motors are used, like Industrial Variable Frequency (VFD) drives with AC motors. In addition, a tutorial on using Allen Bradley 161 Variable Frequency Drives is conducted.
The last set of lab experiments includes exposure to actual industrial tools and equipment and to possibilities for improvising. LabVIEW , and DAQ cards are used as examples for industrial software and hardware, for data input and output. In a different experiment the students build a torsional pendulum and then measure the response to an input offset using LabVIEW. Another experiment involves system simulation with Simulink, where the block diagram simulation tool in Matlab is used for system modeling.
To support the course a custom textbook  and a laboratory guide have been developed and are freely available on the Internet . The course makes extensive use of computational software such as Scilab , a free clone of Matlab, and C/C++ programming. The laboratories are supported by custom designed hardware based upon a standard embedded controller, the Atmel ATMega32.
This course was previously planned based on using industrial applications like Data Acquisition Cards (DAQ) and Software. The high cost of these systems, especially with the students’ frequent breakage of them, and the immobility of these systems outside the labs, significantly limits the students’ ability to maximize their learning experience and familiarity with the equipment. It also jeopardizes the application of these systems to creative projects by the students. In addition, commercial software normally is a black box that hides many implementation details that is very convenient for professionals, but makes it very difficult to teach the fundamentals. Based upon these observations attempts were made to provide a replacement. These attempts started with different components and through continuous improvements the Atmel ATMega32 was selected as the microcontroller. The Atmel ATMega32 has 32K of flash memory, 2K of RAM, 8 analog inputs, 4 PWM outputs, and up to four 8-bit ports for general I/O. It is easily interfaced to a serial port, however to add USB connectivity an FTDI USB to Serial bridge  was used. Under Windows and Linux this IC appears as a serial port.
The boards needed for the equipment were designed as a two board set. The smaller board contained the microcontroller, a USB bridge/hardware, LEDs, a reset switch, and a connector. By itself the board can be plugged into, and draw power from a USB port for programming and simple testing. These smaller boards contained $20 worth of parts including the boards. However, the students were charged $30 to cover assembly costs. Students were required to buy these boards. The board uses a 0.1” spaced connector. Although this consumes space, it allows students to ‘poke’ wires into holes and use the boards for simple tests without a full breakout board. A picture of the processor board is shown in Figure 1. The other side of the board is shown in figure 2.
A second larger board (owned by the department) was available for labs and projects. This board contained motor drivers, screw terminals, voltage regulators, and prototyping space. The two board arrangement allowed students to easily buy and carry the smaller board but take advantage of more mature features in the lab. The second (breakout) board was designed to include power components.
The bootloader software was programmed using AVRStudio and an AVR programmer through a JTAG port with an In Circuit Programming unit. To avoid adding another pin connector, the JTAG port was integrated so that it was on the pin connector. After initially programming the bootloader, a temporary pin connector is removed, eliminating the need for another connector. After the bootloader is installed, students can program the board using a USB port and Megaload . The typical programming cycle for students is outlined below:
In the fall of 2005 a total of 55 juniors purchased thumb boards. To support these students in labs and projects the department built and supplied 16 breakout boards. This move dramatically reduced the maintenance problems with only 5 students reporting damaged ICs. Students who did damage the boards were charged a nominal amount to replace the damaged parts. The students used various cases to carry the boards and some customized their cases. There was a definite ‘cool factor’ related to the thumb boards.
A major semester project that reinforces the topics learned in the lectures and laboratory is required as part of the course. The project uses a project management approach to guide students’ teams to solve a complicated design problem. In the fall of 2004 the project was a two wheeled self balancing robot that could follow a line. In the fall of 2005 the project was an automated system for aiming and shooting balls at four targets in a head to head competition. The targets were randomly activated and the students were expected to automatically aim towards the target and shoot a ball using a pneumatic supply and valve. Points were awarded to the team that hit the target first. The competition was controlled using a PLC for timing and scoring. During these design projects the students designed all aspects of the device following given objectives and constraints including cost, weight, and performance. They then built and tested their devices. A few of the devices built are shown in Figures 3, 4, and 5. In total there were 55 students divided into 11 teams of 5. The objective was to produce a device that could aim and then shoot a ball at a target. The targets were randomly activated and then the students’ boards were signaled with one of four 5V inputs. The devices mostly used a servomechanism to turn towards the targets and then shoot a ball with compressed air.
The compressed air was controlled with a PLC that handled all of the competition management tasks. The competition is described in greater detail on the course web page and students’ reports are also available . The design objectives and constraints of the project were selected so that teams can use the microcontroller boards and apply the knowledge obtained during the course. For the 2005 design the students selected a variety of sensors for measuring the barrel position including encoders and potentiometers. The designs were encouraged to be low cost ($57 to $156) and low weight (510g to 1.56 kg). The teams used the ATMega32 boards to build their machines. The projects included the design and building of the systems including mechanical, electrical, software, strategy, and system modeling. Figure 6 shows a simplified control block diagram for the device in figure 5.
In a different course, EGR 301 - Analytical Product Design, students used this hardware to fulfill the course requirements where they were expected to design and build a consumer product. In the fall of 2004 the product was a pill dispenser and in the fall of 2005 the project was a self contained coffee maker .
The lack of a comprehensive and integrated coverage of dynamic systems and control in the traditional education courses and curricula was seen as an opportunity for improvement, to which the response at GVSU-SOE was EGR 345 (Dynamic systems modeling and control).
The course was designed to integrate mutli-disciplinary systems and knowledge bases in a fashion similar to the real world applications and with a balanced approach between theory and hands-on. The lab component of the course was also designed and improved to maximize students’ learning and ownership of equipment and to allow enough flexibility and access to equipment throughout and after the course has finished. An innovative student owned board was introduced at a low cost for the students to use as a learning tool and as an application tool that worked very well. The students utilized the board for the course project and extrapolated their knowledge and comfort with it to the extent of using it in other courses and applications. Most of the peripherals used with the lab equipment were chosen from among freeware packages available on the internet or made available to the students.
In future course offerings, the cost per board will be reduced. These boards, or another generation, will be used in coming years. The boards will have enough flexibility to incorporate different microcontrollers as modern types occupy the market. The size of the boards meant that many students carried them in their backpacks. A project in another course began making injection molded prototype cases for the boards that will be expanded further in the coming year.
With the new focus on microcontrollers the students were able to implement a greater number of more advanced control systems during the course, using modern tools. On a weekly basis in the lab, students implement complex control systems using C programs. The low cost of the boards enables student ownership of hardware used in the design of common consumer products.
Future plans for the course include streamlining of the lab experiments so better familiarity with the equipment can be gained earlier in the semester to allow for more open ended projects and application. Relatively less instructions and guided experiments and more open ended problems are planned for the last third of the lab in the course to allow students improvising and creativity and encourage comfort in applying dynamic systems modeling and control.