The Quanser DC Motor Control Trainerengineering.nyu.edu/.../ME3484/Readings/Local/QETReview.pdf ·...

4
A nyone who teaches engineer- ing is well aware of the eco- nomic demands of a laboratory course versus a lecture course. A lec- ture course can grow in size (at least to a reasonable extent) with minimal effect on the students and little mar- ginal expense to the educational insti- tution. A lab course, on the other hand, requires facilities in terms of benchtop equipment and lab space. One solution for accommodating a large lab class is to have students work in teams. In fact, in recent years there has been a widespread effort to promote “team projects” in engineer- ing curricula based on the belief that team experiences build skills that are important for a professional career. Lab Space and Teamwork My personal experience, both from my own education and observing stu- dents, is that teams do indeed build students’ skills in working in a group environment, but at a cost. The cost is that, within a given team, students naturally gravitate to those tasks that they do best. Students skilled at set- ting up and running experiments will perform, and improve, at that task, while students skilled at writing reports will likewise gravitate to that task. Hence, the down side of teams is that students often fail to develop those skills that are in greatest need of improvement. The DC Motor Control Trainer (DCMCT), as part of the Quanser Engi- neering Trainer series (QET, pro- nounced “kwet”), represents a radically innovative approach to solving both a shortage of lab space and lack of variety in individual stu- dent lab experiences. Quanser’s solution, described in [1], is as simple as it is innovative: Shrink the experiment so that it fits in a lightweight attaché case, provide a laptop interface, and let each student take the DCMCT home for a day of individually paced experimentation. This solution kills two birds with one stone: no lab space is needed, and every student gets the chance to work through every experiment. Of course, the DCMCT can be used by a team of students; in fact, the prelab assign- ments and DCMCT experiments pro- vide enough material to keep a team of two or three students busy. DCMCT Hardware The DCMCT hardware consists of the board shown in Figure 1. The most evi- dent feature of the QET trainer is the wheel attached to a dc motor with encoder. Serving a dual role, the wheel delivers an inertial load for experiments and provides a haptic interface. That is, the user can turn the wheel to provide inputs to the experiments while “feel- ing” torques provided by a virtual experiment. More on this feature later. The dc motor is driven by a linear power amplifier. Linear amplifiers are less common nowadays compared with pulse-width modulated (PWM) amplifiers, which are more energy effi- cient. Presumably, the choice of a lin- ear amplifier was made to overcome the deadband nonlinearity, limited bandwidth, and high-frequency noise associated with PWM amps. For a first lab course in control, this design deci- sion was a wise choice. As discussed below, the DCMCT provides ample opportunity to experience the effects of nonlinearities from other sources. In addition to the dc motor (a high- quality Maxon motor) with 12-b encoder, the DCMCT hardware includes an analog tach signal synthesized from the encoder, a servo potentiometer to provide an analog measurement of wheel angle, a breadboard for imple- menting analog controllers, and analog- to-digital converters (ADCs) for sampling the analog signals for digital control. The DCMCT includes a PIC microcontroller (called the QIC, pro- nounced “quick”) for running embed- ded controllers. Controllers can also be run directly from a laptop or PC. The interface to a PC or laptop is through a serial port connection, which requires an interface for newer laptops (about US$120). Quanser is reportedly developing a USB connection. As is typical of many Quanser prod- ucts, the hardware is especially “trans- parent.” In other words, there is no attempt to package the circuit boards into hermetic containers adorned with switches and LEDs. Such packaging, although increasing the cost, would have the advantage of making the hardware more robust to coffee spills and dropped objects. On the other The Quanser DC Motor Control Trainer Individual or team learning for hands-on control education by Dennis S. Bernstein 90 PRODUCT REVIEW June 2005 IEEE Control Systems Magazine Figure 1. The DC Motor Control Train- er (DCMCT) provides a sequence of motor control experiments for teaching the basics of classical control. The portable hardware allows students the opportunity to work through the experi- ments individually at their own pace.

Transcript of The Quanser DC Motor Control Trainerengineering.nyu.edu/.../ME3484/Readings/Local/QETReview.pdf ·...

  • Anyone who teaches engineer-ing is well aware of the eco-nomic demands of a laboratorycourse versus a lecture course. A lec-ture course can grow in size (at leastto a reasonable extent) with minimaleffect on the students and little mar-ginal expense to the educational insti-tution. A lab course, on the otherhand, requires facilities in terms ofbenchtop equipment and lab space.One solution for accommodating alarge lab class is to have studentswork in teams. In fact, in recent yearsthere has been a widespread effort topromote “team projects” in engineer-ing curricula based on the belief thatteam experiences build skills that areimportant for a professional career.

    Lab Space and TeamworkMy personal experience, both frommy own education and observing stu-dents, is that teams do indeed buildstudents’ skills in working in a groupenvironment, but at a cost. The costis that, within a given team, studentsnaturally gravitate to those tasks thatthey do best. Students skilled at set-ting up and running experiments willperform, and improve, at that task,while students skilled at writingreports will likewise gravitate to thattask. Hence, the down side of teams isthat students often fail to developthose skills that are in greatest needof improvement.

    The DC Motor Control Trainer(DCMCT), as part of the Quanser Engi-neering Trainer series (QET, pro-nounced “kwet”), represents aradically innovative approach to solving both a shortage of lab spaceand lack of variety in individual stu-dent lab experiences.

    Quanser’s solution, described in[1], is as simple as it is innovative:Shrink the experiment so that it fits ina lightweight attaché case, provide alaptop interface, and let each studenttake the DCMCT home for a day ofindividually paced experimentation.This solution kills two birds with onestone: no lab space is needed, andevery student gets the chance to workthrough every experiment. Of course,the DCMCT can be used by a team ofstudents; in fact, the prelab assign-ments and DCMCT experiments pro-vide enough material to keep a teamof two or three students busy.

    DCMCT HardwareThe DCMCT hardware consists of theboard shown in Figure 1. The most evi-dent feature of the QET trainer is thewheel attached to a dc motor withencoder. Serving a dual role, the wheeldelivers an inertial load for experimentsand provides a haptic interface. That is,the user can turn the wheel to provideinputs to the experiments while “feel-ing” torques provided by a virtualexperiment. More on this feature later.

    The dc motor is driven by a linearpower amplifier. Linear amplifiers areless common nowadays comparedwith pulse-width modulated (PWM)amplifiers, which are more energy effi-cient. Presumably, the choice of a lin-ear amplifier was made to overcomethe deadband nonlinearity, limitedbandwidth, and high-frequency noiseassociated with PWM amps. For a firstlab course in control, this design deci-sion was a wise choice. As discussedbelow, the DCMCT provides ampleopportunity to experience the effectsof nonlinearities from other sources.

    In addition to the dc motor (a high-quality Maxon motor) with 12-bencoder, the DCMCT hardware includesan analog tach signal synthesized fromthe encoder, a servo potentiometer toprovide an analog measurement ofwheel angle, a breadboard for imple-menting analog controllers, and analog-to-digital converters (ADCs) forsampling the analog signals for digitalcontrol. The DCMCT includes a PICmicrocontroller (called the QIC, pro-nounced “quick”) for running embed-ded controllers. Controllers can also berun directly from a laptop or PC.

    The interface to a PC or laptop isthrough a serial port connection, whichrequires an interface for newer laptops(about US$120). Quanser is reportedlydeveloping a USB connection.

    As is typical of many Quanser prod-ucts, the hardware is especially “trans-parent.” In other words, there is noattempt to package the circuit boardsinto hermetic containers adorned withswitches and LEDs. Such packaging,although increasing the cost, wouldhave the advantage of making thehardware more robust to coffee spillsand dropped objects. On the other

    The Quanser DC Motor Control TrainerIndividual or team learning for hands-on control education

    by Dennis S. Bernstein

    90

    PRODUCT REVIEW

    June 2005IEEE Control Systems Magazine

    Figure 1. The DC Motor Control Train-er (DCMCT) provides a sequence ofmotor control experiments for teachingthe basics of classical control. Theportable hardware allows students theopportunity to work through the experi-ments individually at their own pace.

  • 91June 2005 IEEE Control Systems Magazine

    hand, hiding the components fromstudents would weaken the experi-ence of working with real componentsand blur the distinction between hard-ware experiments and software simu-lation. For example, when the studentsanalyze the effects of encoder quanti-zation, they’ll be able to see the deviceresponsible for this effect. I’m a firmbeliever that engineering educationshould go beyond the computerscreen whenever possible.

    For transportation, the DCMCThardware comes with a clamshellattaché case. The clamshell designremoves any risk of picking up thecase and inadvertently spilling itscontents. (If you’ve ever picked up anattaché case without first locking it,you’ll understand what I mean!)

    DCMCT SoftwareThe DCMCT comes with a CD thatcontains the complete manual (stu-dent and instructor versions, the lat-ter with complete solutions) as wellas all software needed for PC and lap-top hosts. The QIC interactive inter-face (QICii) software package, shownin Figure 2, can be used to downloadcode to the QIC, which performs thereal-time control. The QICii (pro-nounced “quicky”) also provides real-time communication with the QIC forparameter tuning, data collection,and plotting during operation.

    All of the controllers needed forthe experiments are precompiled in aform that allows parameters to beentered and varied. Third-party soft-ware (available separately) can beused to compile alternative con-troller structures.

    The QET hardware can be usedwith a hardware-in-the-loop board(from various vendors) installed in aPC with real-time control softwaresuch as WinCon, Labview, or RTWT.The course and software suppliedwith the DCMCT do not require thesetools, which minimizes system re-quirements and allows students toconcentrate on control design ratherthan implementation.

    Lab ModulesThe DCMCT manual describes, in greatdetail, a total of five separate laborato-ry projects. For each project, the stu-dent must complete a prelabassignment before being allowed tocheck out the DCMCT. These prelabassignments require nontrivial timeand effort in terms of analysis and com-putation. The output of each prelabassignment is a collection of numericalvalues that are needed to perform theassociated experiment. Performing themore advanced prelab sessionsrequires the use of MATLAB or XMath.

    Lab 1: Motor ModelingThe first prelab assignment involvesmotor modeling, in terms of both thebasic physics and the derivation oflinear models. Although this materialis standard for students in mechanicalengineering (ME), students in otherdisciplines may lack the necessarybackground to carry out the requiredsteps. On the positive side, I believethat dc motor fundamentals should bepart of every engineering student’seducation. For non-ME students, theseprelab assignments can easily bereplaced by in-class tutorials. In fact,for all of the subsequent projects, lec-tures could readily be structured toparallel and support the DCMCTprelab assignments and experiments.

    The experiments correspondingto motor modeling involve both stat-ic and dynamic analysis. The staticexperimental analysis is used to con-firm the results of the prelab assign-ment analysis, such as the motorresistance and torque constant. Thisexperiment also focuses on therange of physical values that themotor can achieve, including maxi-mum current, torque, and velocity.These calculations anticipate laterdiscussions of saturation and anti-windup control. In addition, the sta-tic analysis also includes nonlineareffects such as Coulomb frictionand encoder quantization.

    The experimental procedures alsoinclude validating the dynamic mod-els derived in the prelab assignment.Here, the interactive features of thesoftware are especially convenientsince the student can manually adjustthe transfer function parameters toimprove the step-response fit.Although this model-fitting procedureis not sophisticated, students benefitdirectly from the ability to adjustparameters and see the effect onmodel response. Discrepanciesbetween best-fit parameter valuesand prelab analytical values can thenbe explained in terms of computation-al error, component tolerances, andother real-world effects.

    A student can also interact withthe hardware by touching the wheelgently while it is spinning, therebyintroducing a load disturbance. Anadditional procedure is to assess theeffect of unmodeled dynamics due tothe neglected rotor inductance.Analysis shows that this element isdominated by an effective delay dueto the 100-Hz sampling.

    In this first assignment, theDCMCT has thus demonstrated stat-ic and dynamic motor modeling, sta-tic and dynamic model identification,the effect of nonlinearities (satura-tion, Coulomb friction, and quantiza-tion), and unmodeled linear effectsdue to sampling and neglecteddynamics.

    Figure 2. QET interactive interface(QETii) software. The DCMCT softwareinterface is based on GUIs that allowstudents to enter parameter values andview data in real time. The softwarewas found to be robust with accuratedocumentation.

  • 92 June 2005IEEE Control Systems Magazine

    Lab 2: PI ControlHaving completed analytical andexperimental modeling of the motorin the first assignment, the studentsare now ready to undertake PI con-trol for speed control. After a briefreview of PI controller basics, theprelab assignment requires that thestudents tune PI controllers toachieve rise and settling time specifi-cations. This analysis is based on theresults of the modeling analysis andexperiments in Lab 1. An excellentfeature of the controller tuning is thatthe steps are carried out with a closeeye on the saturation analysis in Lab1. For example, in choosing a settlingtime for a change in speed setpoint,the student is asked to account forthe acceleration limits due to currentsaturation. The linear control designprocess is thus guided by the analy-sis of nonlinear effects, which reflecthardware capabilities.

    The prelab assignment also intro-duces integrator windup. A blockdiagram of a classic antiwinduptechnique is presented in advance ofthe experimental session. Additionalprelab tasks involve tracking trian-gular reference commands andrejection of load disturbances.

    For the experimental session, thestudent implements a P controller ini-tially and examines the response,including the steady-state offset to astep command. Next, the studentimplements a pure I controller. Afteraccounting for saturation effects, thestudent observes the rejection of loaddisturbances due to touching thewheel as it spins. The lab then contin-ues with combined PI design, includingZiegler-Nichols tuning, setpoint weight-ing, antiwindup control, triangle wavetracking, and disturbance rejection.

    Lab 3: RobustnessThis lab investigates the effect ofmeasurement noise and plant varia-tions on closed-loop performance.The analysis focuses on the role offour key transfer functions, colorfullycalled the “gang of four,” which for

    “two-degree-of-freedom controllers,”expand to the “gang of six.”

    The prelab assignment involvesthe analysis and computation of thesensitivity and complementary trans-fer functions, which are used toassess gain and phase margins. Theanalysis includes the effect of delaysdue to sampling. Students are askedto create Nyquist plots to display therobustness of the closed-loop sys-tem. In the experimental session, stu-dents follow a simple procedure forprobing the system for gain margin,gain margin frequency, and gaincrossover frequency.

    Lab 4: PID Control of Position ControlIn this lab, students experiment withPID controllers for the purpose ofposition control of the motor shaft.Performance limitations are accountedfor in terms of the back electromag-netic frequency (EMF) and its effecton motor current. A peak power cal-culation is used to determine theminimum time required to achieve agiven change in angle. This calcula-tion is used to guide the PID design insubsequent steps.

    Lab 5: Haptic InterfaceIn the final lab, students are given theopportunity to apply the skillsobtained in the previous labs to anovel and fun set of experimentsinvolving a haptic interface. Specifi-cally, the student can control a virtualsystem by rotating the wheel while,at the same time, feeling an artificialtorque applied to the wheel. The labmanual begins by providing a tutorialon impedance control, a topic notcovered in standard control texts.

    The experimental session firstfocuses on the Haptic Knob module,which consists of preprogrammedroutines that make the wheel behavelike a knob with detents (notches) ofvarious types. Students find this fea-ture surprising since they are wellaware by now that the wheel andmotor normally spin freely.

    The wheel is then used as a userinput device for controlling a simula-tion of a ball and beam, as shown inFigure 3. The student can control theball and beam with or without a PDcontroller in effect. Various optionsallow the user to feel the ball posi-tion, ball speed, beam bump (beamhitting the table), and other effects.During these experiments, the stu-dent can “feel” the effect of the PDcontrol during closed-loop operation.This lab concludes with an explana-tion of how the notched haptic knoboperates in terms of a finite statemachine model.

    LogisticsThe idea behind the DCMCT is thateach individual student can checkout the DCMCT for a day. The stu-dent can then work with the equip-ment wherever they wish, such as ina dormitory room or apartment.Quanser is fond of adding “in a café”to this list, but I would warn studentsabout working with the hardware inthe vicinity of open liquid containers.

    With this check-out system, a totalof six DCMCTs would be needed for aclass of 40 students. This number isbased on a seven-days-per-weekschedule of hardware utilization. Iwould guess that weekend dayswould be popular for checking out the

    Figure 3. Virtual ball and beam experi-ment. The haptic interface allows stu-dents to control the virtual ball andbeam and “feel” a variety of effects.This application of control technologygoes beyond the usual servo problemsthat traditionally comprise undergradu-ate control education.

  • 93June 2005 IEEE Control Systems Magazine

    equipment since students don’t typi-cally have weekend classes.

    To make this system work in prac-tice, certain logistical problemswould need to be addressed. First, itis necessary that the instructor or,more likely, a teaching assistant,check each student’s prelab resultsto verify that the preassignment wasdone properly (and, of course, by thestudent claiming to have done thework). I would address this problemby assigning a common prelab reportdue date for all student. Next, check-out and check-in procedures wouldbe needed to keep track of the equip-ment and verify its condition. Thereis always the possibility of loss ortheft when equipment is used out-side the departmental building. Poli-cies would have to be in place to dealwith these issues. Perhaps a lockingand tethering mechanism would be agood investment. I would guess thatstudents would want to check outthe equipment in pairs, that is, onestudent would use the equipmentand then pass it on to another stu-dent. This approach would work well(especially over weekends) as longas it did not undermine the goal ofstudents working individually.

    Evaluation andConclusionsThe QET Series in general,and the DCMCT in particular,represent an innovativeapproach to hands-on engi-neering education. Given asufficient number of DCM-CTs (number of studentsdivided by seven), each stu-

    dent will be able to have a day towork individually, at their own pace,with control hardware and software.In this manner, every student isassured the chance to have somehands-on experience with hardwareand software.

    The hardware is well constructed,and the software proved to be robustas my students and I worked throughthe labs. The manual was extremelyaccurate, with very few rough edges,a surprising achievement for a firstrelease. The only hardware designchange I would recommend is anincrease in the gap between the loweredge of the wheel and the mountingplate, where thick fingers sometimesget caught. A minor design modifica-tion could easily fix this problem.

    The projects that can be per-formed using the DCMCT do a fantas-tic job of illustrating practical controlconcepts. The DCMCT providesextensive experience with most ofthe classical control concepts,including the effect of plant varia-tions and delays. In addition, lineardesign is guided by nonlinear effects,

    such as saturation, friction, andquantization. I cannot recall seeingthis kind of emphasis in any under-graduate textbook.

    The prelab and experimental ses-sions are substantive and demanding.These tasks can be watered down ortaken at full strength, depending onthe audience. The last lab on the hap-tic interface is clearly the most fun,and the least demanding. I wouldview this lab as a well-earned“dessert” for students. Many studentswho reach this lab will be hooked oncontrol. I would probably let studentsplay with this feature up front as akind of motivation for the work need-ed to appreciate its operation. Stu-dents will most likely play with thisfeature while having the equipment intheir possession. Student will surelyshow the haptic experiments to theirfriends, thus providing free advertis-ing for control education.

    Having sufficient copies of theDCMCT to allow each student to workthrough the labs is an ideal situation,which, in my opinion, will pay enor-mous dividends in terms of studentskill building and confidence. Althoughthe logistics of letting students borrowan expensive piece of equipment must

    be worked out, the benefits will beconsiderable. I congratulate

    Quanser on a fine contributionto control education.

    References[1] J. Apkarian and K. J. Astrom,“A laptop servo for control edu-cation,” IEEE Contr. Syst. Mag.,vol. 24, no. 5, pp. 70–73, Oct.

    2004.

    Analog Workout[T]he Pepinsky computer… requires the crystallographer to take a trip around the

    laboratory turning little knobs before the machineis ready to go—and to repeat this trip whenever a vari-

    ation of the problem is tried. Since the problemis solved by successive variations of the signs of appro-

    priate coefficients in a multiple Fourier sum,the analysis of a structure involves a fair amountof exercise—a device for avoiding the sedentary

    habits of the academic profession which might be desirable.

    —Mina Rees, “The federal computing machine program,”Science, vol. 112, pp. 731–736, December 22, 1950

    (reprinted in Annals of the History of Computing, vol. 7, no. 2, April 1985).

    Index: CCC: 0-7803-5957-7/00/$10.00 © 2000 IEEEccc: 0-7803-5957-7/00/$10.00 © 2000 IEEEcce: 0-7803-5957-7/00/$10.00 © 2000 IEEEindex: INDEX: ind: