Teaching Mechanical Students to Build and Analyze Motor Controllers

ff> « back to results for ""
Below is a cache of http://www.ni.com/pdf/academic/us/journals/teaching_mechanical.pdf. It's a snapshot of the page taken as our search engine crawled the Web.
The web site itself may have changed. You can check the current page or check for previous versions at the Internet Archive. Yahoo! is not affiliated with the authors of this page or responsible for its content.
Teaching Mechanical Students to Build and Analyze Motor Controllers Proceedings of the 2003 American Society for Engineering Education Annual Conference & Exposition
Copyright © 2003, American Society for Engineering Education
Teaching Mechanical Students to Build and Analyze Motor Controllers
Hugh Jack, Associate Professor
Padnos School of Engineering
Grand Valley State University
Grand Rapids, MI
email: jackh@gvsu.edu
1. Introduction
All junior Mechanical and Manufacturing engineering students take EGR 345, Dynamic Systems
Modelling and Control, at Grand Valley State University. This course looks at modeling systems
with mechanical, electrical and other components. This is supported by laboratory work that
includes motor modeling and feedback control. There is also a major design project in the course
to reinforce theoretical and experimental design. The topics covered in the course are listed below.
1. Translation
2. Differential equation review
3. First/second order systems
4. Numerical methods
5. Rotation
6. The differential operator and input-output equations
7. Circuits (resistors/capacitors/inductors and op-amps)
8. Feedback control
9. Phasors
10. Transfer functions and Fourier analysis
11. Bode plots
12. Root locus plots
13. Analog IO, sensors and actuators
14. Motion control (single and multiple axes)
Prerequisites for the course include basic circuits, statics, differential equations and digital sys-
tems (C programming on 6811 microprocessors). The course is followed by another controls
course, EGR 450 - Manufacturing Control Systems, which focuses on discrete state control sys-
tems using PLCs. EGR 450 is required for the Manufacturing students, while it is a popular elec-
tive for the Mechanical students. EGR 450 is followed by EGR 474 - Integrated Manufacturing
Systems, which focuses on high level control using databases and networks to integrate devices
such as robots and CNC machines. EGR 474 is a popular elective for Manufacturing students, and
an elective for the Electrical students.
Session 2666
Main Menu
Main Menu Proceedings of the 2003 American Society for Engineering Education Annual Conference & Exposition
Copyright © 2003, American Society for Engineering Education
Throughout the course students use computers for numerical analysis, data collection and control.
The software used includes Mathcad, Labview [3], Scilab (a free Matlab clone) and C/C++ com-
pilers. Use of these tools is reinforced throughout the semester with laboratory work that uses
industrial sensors and actuators to verify theoretical calculations. The laboratory sequence is
listed below.
1. Review/tutorial (Web pages, Scilab, etc.)
2. Labview introduction
3. Sensors and introduction to writing labs
4. Mass-spring and mass-spring-damper systems
5. Rotational systems (torsional pendulum)
6. Using PWM to generate voltages tutorial
7. Motor modeling and speed control with PWM and transistors
8. Proportional feedback control
9. Tutorial with Ultra 5000 servo drives
10. Op-amp filter Bode plot
11. Multi-axis motion control system with Ultra 100 serve drives
12. Variable frequency drive tutorial with Series 161 drives
13. PLC (Programmable Logic Controller) tutorial
The first motor laboratory examines motor speed control using an inexpensive transistor and
pulse width modulation (PWM). The second laboratory experiment focuses on modeling DC
brushed motors and deriving basic parameter values. The final experiment uses a proportional
feedback controller to control the motor speed. When the laboratory sequence is complete stu-
dents are able to build and analyze basic feedback controllers.
2. The Controller
The controller the students analyze and build is based upon a transistor which switches power to
the motor. To allow the effective voltage to be varied, a pulse width modulation method is used, as
shown in Figure 1. The power is switched fast enough so that the dynamic effects of the motor fil-
ter out the effects of the rapid switching. Typically this can be a frequency as low as 100Hz,
although a higher frequency is better, and above 20KHz puts it above the audible range. This
method does require some sophistication to generate the PWM signal, but the result is a much
simpler and more efficient power amplifier.
Main Menu
Main Menu Proceedings of the 2003 American Society for Engineering Education Annual Conference & Exposition
Copyright © 2003, American Society for Engineering Education
Figure 1 - PWM (Pulse Width Modulation)
The motor control system is connected as shown in Figure 2. The counter output from the com-
puter drives a TIP-120 (Darlington coupled NPN) transistor that switches the voltage from a high
current (>1amp) voltage supply. When the counter output is on (+5V) the transistor turns on and
allows current to flow. In this configuration the voltage across the transistor is about Vce = 2V
(the Vce value is available in the transistor datasheets). This means the maximum voltage deliv-
ered to the motor is Vs = Vp - Vce. Multiplying this by the duty cycle gives the effective (RMS)
voltage delivered to the motor. The shaft of the motor is coupled to the tachometer. The tachome-
ter can be any permanent magnet DC motor. When the shaft of the motor is turned, it acts as a
generator and delivers a voltage that is proportional to angular velocity. The voltage from the
tachometer is read as an analog input (Vt) to the computer.
V
max
0
t
V
eff
50
100
---------V
max
=
50% duty cycle
V
max
0
t
V
eff
20
100
---------V
max
=
20% duty cycle
V
max
0
t
V
eff
100
100
---------V
max
=
100% duty cycle
V
max
0
t
V
eff
0
100
---------V
max
=
0% duty cycle
Main Menu
Main Menu Proceedings of the 2003 American Society for Engineering Education Annual Conference & Exposition
Copyright © 2003, American Society for Engineering Education
Figure 2 - The schematic for the DC motor controller
Part of the setup procedure requires that the speed-voltage ratio for the tachometer be established
experimentally. This is done by supplying a voltage to the motor, and measuring the motor speed
( ) and tachometer voltage (Vt). We normally measure the angular velocity with a strobe light
tachometer. Multiple readings are taken by changing the motor voltage and then repeating the pre-
vious readings. Graphing the data should yield a straight line and show a linear relationship. The
data can be used to determine the coefficient Kt in the equation Vt = Kt( ).
The computer is interfaced to the process through a National Instruments PCI-1200 DAQ card
[3]. It is used to read the analog voltage input from the tachometer and generate the PWM motor
output with a counter. The PWM output is characterized with a frequency for the output pulses,
and a delay for the on/off transition as shown in equation 1. In this application the frequency
remains fixed, but the counter value is changed to vary the duty cycle. When using the counter the
upper and lower limits must not be exceeded. At best this will make the system non-linear, at
worst it may make the motor output unpredictable.
PCI-1200
counter
digital
analog in
analog
tachometer
motor
V+
V-
shaft coupler
TIP 120
DAQ card
in computer
V
C
V
S
V
t
V
P
OUTB1
ACH0
com
com Main Menu
Main Menu Proceedings of the 2003 American Society for Engineering Education Annual Conference & Exposition
Copyright © 2003, American Society for Engineering Education
A Labview program, similar to that shown in Figures 3 and 4 is written by the students to handle
inputs and outputs, and do calculations. The front panel is shown in Figure 3. It has a knob so that
a desired speed can be set, and a chart that displays the tachometer speed reading as a function of
time.
Figure 3 - Labview front panel for the control system
The wiring diagram in Figure 4 shows the basic system setup. Variables have been labeled so that
they correspond to the equations in this paper. Outside the while loop there is a calculation that
V
S
V
P
V
CE (
)
C
MAX
C
C C
MAX
1 ----------------------------
=
V
S
The effective voltage delivered to the motor
=
Where,
V
P
The power supply voltage
=
V
CE
The voltage across the transistor when on (2V typ.)
=
C
MAX
The maximum count in the counter
=
C
C
The variable counter value
=
(1)
Main Menu
Main Menu Proceedings of the 2003 American Society for Engineering Education Annual Conference & Exposition
Copyright © 2003, American Society for Engineering Education
only needs to be done once, and the PULSE CONFIG function to setup the counter on the PCI-
1200 DAQ