1 Overview and Control of DC and AC Motors Brian Bouma up of eight “T”-shaped parts) is the part of the motor that Abstract— an overview of the differences in form and function rotates during operation, while the stator (the dark blue block between DC and AC motors. An in-depth analysis of the general and light blue “fingers” around the rotor in Fig. 1) remains differential equations and transfer functions of DC and AC stationary during operation, relative to the motor’s casing and motors. Strategies for controlling DC and AC motors using gain mounting . The stator is made up of either a winding or a and PID control are discussed and analyzed in depth. Methods for determining the time constants of DC and AC motors are magnet, which creates magnetic flux in the magnetic field discussed and analyzed. formed between the stator and the rotor . For the simple analytical purposes herein, it makes no difference whether a Index Terms – AC motors, Control systems, DC motors, winding or a magnet is used in the stator, so the use of a Motor drives. magnet will be assumed. The rotor has a winding on its surface, termed the armature, in which electromotive forces I. NOMENCLATURE are induced by the magnetic field formed between the stator PID Proportional Integral Derivative and the rotor . The armature winding is supplied current through the collector (the yellow cylinder attached to the rotor II. INTRODUCTION in Fig. 1), on which the brushes (the two brown tabs touching the collector) apply pressure . The collector is mounted on Motors are an integral part of engineering in today’s society. the same shaft as the armature, and the fixed brushes are They are used in a wide variety of applications, from running connected to the armature terminals . Thus, the power to fans to driving belts to turning wheels. Yet, despite their the motor runs through the brushes, into the collector, and prevalence in the designs of undergraduate engineering through the armature winding to produce the electromotive students, most such students have very little idea of how forces between the stator and the rotor (the power cables are motors actually work, or of how to control them safely and the red lines attached to the brushes in Fig. 1). The brush- dependably. This paper describes both DC and AC motors, collector assembly provides current to the armature windings analyzes them from a control standpoint, and determines in such a way that the current flows in one direction when the adequate strategies for controlling them in a manner which is windings are under a magnetic North pole (from the stator both safe and reliable. Stepper and servo motors will not be magnet), and in the other direction when the windings are discussed here, as their form, function, and application are under a magnetic South pole . The rotor windings are made considerably different from that of DC and AC motors, and the up of coils, called sections, all sections being of an equal analysis of those four motor types would be too much number of turns (in Fig. 1, the eight colored sets of line information to cover in this setting. segments, two segments per set, on the “front” of the T-shaped III. MOTOR OVERVIEW parts of the rotor are the ends of the coils; the coils run through the length of the rotor and wrap around the opposite end of the To the uninformed observer, DC and AC motors appear to T-shaped parts of the rotor) . Each section has two sides, be basically identical. Even though they seem to operate in which are inserted into two slots spaced apart a distance equal essentially the same way, their physical structures, and thus to the distance between the two field poles . This way, their range of applications, vary significantly. when the conductors of one side of a section are under the The brush DC motor is arguably the simplest variable-speed North pole, the conductors of the other side of the same DC motor design, in addition to being the most common. For section are under the South pole . The sections of armature these reasons, the brush design is the one being described and winding are all connected together, in series, with the end of analyzed here. The brush DC motor (or all DC motors, for the last section being connected to the beginning of the first that matter) is made up of a stator and a rotor (refer to Fig. 1 section, so that the winding as a whole is continuous, having for all descriptions relating to the brush DC motor). As the no particular start or finish . For this to work, each slot names suggest, the rotor (the circular portion of Fig. 1 made must contain two sides of sections (half each of two different sections) . As the rotor rotates, when a section changes This work was done for Engineering 315 at Calvin College in Grand Rapids, Michigan, in the fall of 2004. All software used in this paper was from being under the North pole to being under the South pole supplied by Calvin College. This project was supported financially by Calvin (and hence the current in that section reverses direction), that College and Smiths Aerospace LLC. section commutates. Commutation of a section of the winding Brian Bouma works for Smiths Aerospace LLC and attends Calvin College in Grand Rapids, MI 49546 USA (e-mail: firstname.lastname@example.org). is the changing of the section from being under one pole to 2 being under the other pole . Two sections (two sections that are opposite each other on the rotor) commutate at a time, one switching from North to South pole, the other switching from South to North pole. Because the two poles “swap” sections simultaneously, half of the windings are under each pole at all times. The North and South poles are an effect of the flux in the armature created by the current flowing through the two sets of windings (each pole containing one set). When a section commutates, the brushes, applying pressure on the collector, short-circuit the two ends of that section together, to release the energy stored in the coils of the section before the direction of current flow in the section is reversed . Despite this ingenious design, sparks are still produced between the brushes and the collector . Fig. 2. AC Motor Stator and Rotor The inner face of the stator is made up of deep slots (or grooves, depending on the exact design, but that distinction makes no difference for this analysis), through which the windings run (the red arrow in Fig. 3 indicates one such slot) . Fig. 1. Brush DC Motor The primary advantage of a DC motor is that the magnitude of the torque produced by the output shaft never changes . This makes the DC motor perfect for applications that have large startup loads, particularly automotive applications (like the drive wheels in electric vehicles, for instance), where DC power is readily available under most circumstances. Today, the asynchronous (or induction) motor is the most commonly used electric motor in industry and in household Fig. 3. Winding Slot in AC Motor Stator devices . For this reason, the asynchronous motor is the AC motor design being described and analyzed here. The motor’s number of poles is determined by the layout of Electromagnetic induction is the creation of a current through the windings within the stator (the number of poles will always a conductor that that is within a magnetic field . The be a multiple of two, but, again, that has no impact here) . magnetic field is capable of generating a large current in the The rotor is also cylindrical, though this cylinder does have conductor without requiring any physical contact whatsoever a core. The rotor is made of steel disks (the long black . It is this principle that allows the induction motor to segments in Fig. 4) slotted around the exterior of the cylinder function without having any sliding electrical contacts (such as . A short-circuited winding is placed in the slots between the brushes in the brush DC motor) . The stator (the hollow the steel disks, preventing the need for a supply to be cylinder in Fig. 2) is essentially a hollow cylinder with no connected to the rotor . The currents in the rotor are ends, and may be constructed out of either cast iron or induced by the interaction between the magnetic fields of the aluminum . stator and the rotor, leading to the name for this type of motor . A copper or aluminum bar (in the case of Fig. 4, aluminum, judging by the color) is also placed in each slot between the steel disks . A circular conducting ring is placed on the end of the cylinder (refer to Fig. 4), to connect the ends of the bars together (because the conducting ring and bars resemble a circular cage, this rotor design is called “squirrel cage”) . 3 viscous damping, and θ(t) is the motor’s angular position . By assuming zero initial conditions and then Laplace transforming each of these equations, s-domain equations are reached. The developed torque is now T(s ) K2 If(s ) , (4) the field voltage is now Vf(s ) Lf s Rf If(s ), (5) and the mechanical torque is now T( s ) Is 2 Bs (s ), (6) where all of the constants have the same meaning as in the time-domain differential equations, If is used in place of if and Fig. 4. Squirrel Cage and Steel Disks in AC Rotor Θ is used in place of θ . By substituting and solving, the transfer function of the motor is found to be The interaction between the stator magnetic field and the rotor ( s ) Km magnetic field forces the rotor to spin, relative to the stator, resulting in a functioning AC motor . Vf( s ) s m s 1 e s 1 , (7) There are two varieties of asynchronous motors: three phase where and single phase. Three phase motors are used mainly in I m industry, while single phase motors are more common B (8) household appliances . is the mechanical time constant of the motor, The primary advantage of an induction motor is that it Lf contains no sliding electrical contacts, resulting in a simple e robust design that is easy to manufacture and maintain . A Rf (9) secondary advantage is that the available range of induction is the electrical time constant of the motor, and motors is from only a few watts to several megawatts, making K2 the use of induction motors in a wide variety of applications Km physically feasible . B Rf (10) IV. TRANSFER FUNCTIONS is another constant . This is the transfer function that will be used for the control analysis of the DC motor in the next The differential equations and transfer functions of DC and section. AC motors are crucial to the analysis of the control of these The differential equations and transfer functions for AC machines. The transfer functions are derived from the motors are considerably less complicated than those for DC differential equations using Laplace transforms, a method all motors, owing to the fact that AC motors only have a single too familiar to most engineers. time constant while DC motors have two. AC motors are The differential equations and transfer functions for DC described by two differential equations: The torque (T(t)) is motors are more complicated than those of AC motors, due to described by the fact that DC motors have time lags because of both the d armature inductance and the winding, while AC motors have T( t) K v( t) m ( t) only a single time constant. DC motors are described by three dt (11) , differential equations: The developed torque (T(t)) is where K is a constant, v(t) is the voltage provided to the described by motor, θ(t) is the angular position of the motor, and m is T(t) K2 if(t) described by , (1) "stall t orque (at rat ed volt age)" where if(t) is the current through the field and K2 is constant m "no-lo ad speed (at rated volt age)" , (12) . The field voltage (vf(t)) is described by d where stall torque (at rated voltage) and no-load speed (at vf( t) Rf if( t) Lf if( t) rated voltage) are characteristics of any specific AC motor . dt , (2) The torque is also described by where Rf is the field resistance and Lf is the field inductance 2 . Lastly, the mechanical torque (T(t)) is described by d d T( t ) ( t) B ( t ) I 2 dt 2 dt , (13) d d T( t ) ( t) B ( t ) I 2 dt which is identical to the third differential equation that dt , (3) describes DC motors, and has the same meaning . By where I is the motor’s moment of inertia, B is the motor’s equating the two AC motor equations, assuming zero initial 4 conditions, and then taking the Laplace transform of the PID controller only has two zeros, only two of the poles may resultant equation, the transfer function of an AC motor is be eliminated. This raises the obvious question: Which poles found to be should be eliminated and which one should be left alone? ( s ) Km That depends on which pole, as the only pole in the system, s s 1 , results in a system with the shortest rise time, the shortest V( s ) (14) settling time, and the least overshoot. This system was where modeled and simulated in MATLAB/Simulink (see Fig. 5), K using a unit step input as a standard input. Km m B (15) is a constant, and I m B (16) Fig. 5. Simulink Model of DC Motor Control System with is the time constant of the motor . This is the transfer PID Control function that will be used for the control analysis of the AC motor in the next section. The gain block in this system is used to dramatically speed up the response of the system, although it does not effect the V. CONTROL location of any of the poles or zeros, so it does not impact the Precise control of motors is vital to the use of motors in any “control” aspect of this analysis (even though it decreases the application. Without a system in place to prevent the motor peak and settlings times for the system). The electrical time from operating unchecked, a step increase to the inputs of a constant of the motor (τe) was assumed to be 1 ms, the motor would result in the motor accelerating until it literally mechanical time constant of the motor (τm) was assumed to be broke apart, costing untold amounts of money to repair and 100 ms, and the motor constant (Km) was assumed to be 0.050 replace damaged equipment, and undoubtedly ruining N*m/A, all of which are typical constants for a DC motor . someone’s day. The first two poles to be eliminated were the poles that result The first step to safe control is the use of negative feedback, from the electrical and mechanical time constants, leaving the third pole (at s = 0) alone. This was done by setting the a concept so common that it warrants no explanation here, differentiator coefficient to the product of the electrical and which has been employed in all of the simulations whose mechanical time constants, the proportional gain coefficient to results are shown here. the sum of the electrical and mechanical time constants, and A control method which is popular because of its the integrator coefficient to one. The result of this simulation robustness, its simplicity, and its reusability is PID control. A is so worthless that it will not be shown here. By eliminating PID controller contains a proportional gain, an integrator, and those two particular poles (hand calculations would confirm a differentiator (hence its name), all of which are summed this, but are not necessary here), the overshoot of the system together to produce the output of the controller. The transfer became 100% (the output was “2” while the input step was function of a PID controller has the form only “1”), the peak time became 0.44 seconds (not terrible, but 2 not great either), and the settling time became infinite. The KI KD s KP s KI PID KP KD s system never settled. The output of the system was sinusoidal s s ,(17) and continued for all of eternity (until the simulation time of where KP is the proportional gain coefficient, KI is the ten seconds was reached). This is no good. In the next simulation run, the two poles eliminated were the pole at s = 0 integrator coefficient, and KD is the differentiator coefficient. and the pole created by the electrical time constant. This was The proportional gain is used to amplify the input signal. The done by setting the differentiator coefficient to the value of the integrator is used to improve the accuracy of the control electrical time constant, the proportional gain coefficient to system, that is, to minimize the steady-state error (the one, and the integrator coefficient to zero. The output of this difference between the input value and the final output value) simulation is shown in Fig. 6. as much as possible. The differentiator is used to increase the damping in the system, which will decrease both the peak time and the settling time of the system. As can be recalled from above, the transfer function of the DC motor is third order in the denominator, so it has three poles (roots of the polynomial in the denominator). Likewise, the transfer function of the PID controller is second order in the numerator, so it has two zeros (roots of the polynomial in the numerator). Thus, the PID values may be set so that the zeros of the PID controller eliminate the poles of the DC motor. However, since the DC motor has three poles and the 5 while the system corresponding to Fig. 6 was simulated for 1 second (with the step input occurring at time t = 0 seconds), the system corresponding to Fig. 7 was simulated for only 0.25 seconds, because its time response was so fast that it could scarcely be seen on a 1-second time plot. From these findings, it appears as though the best way to use a PID controller in conjunction with a DC motor is to set the PID values so that the s = 0 pole and the pole created by the larger of the two time constants (typically the mechanical time constant) are eliminated. The transfer function of an AC motor is simple enough that, even though PID control may be implemented for an AC motor (as it will be later), acceptable time response values may Fig. 6. Time Response of System with Mechanical Time be attained by simply adjusting the gain in the system (see Fig. Constant Pole 8). For all of the AC motor control system simulations, a time constant (τ) of 0.1 seconds (100 ms) and a motor constant of Fig. 6 shows the time response of the system when the 0.050 N*m/A have been assumed. mechanical time constant and s = 0 poles were eliminated by the settings of the PID controller. The horizontal axis shows time, in seconds, and the vertical axis is the output of the system, normalized to the magnitude of the input step. Closer analysis of this simulation output shows a settling time (using 2% criterion) of approximately 0.76 seconds, a peak time of Fig. 8. Simulink Model of AC Motor Control System approximately 0.14 seconds, and an overshoot of approximately 49%. This simulation shows a better peak time By running this simulation many times, and adjusting the gain (0.14 seconds as opposed to 0.44 seconds), a better overshoot value each time, it can be found that, between the gain values (49% as opposed to 100%), and a much better settling time of approximately 128.957 and 143.076, the overshoot is less (0.76 seconds as opposed to not settling at all). However, the than (or equal to) 10% and the peak time is less than (or equal peak time could still improve (a little), the peak time could to) 0.5 seconds. At a gain of 128.957, the overshoot is 8.21% improve quite a bit, and the overshoot has the most room for while the peak time is exactly 0.5 seconds. At a gain of improvement. The simulation was run a third time, this time 143.076, the peak time is 0.461 seconds while the overshoot is eliminating the pole at s = 0 and the pole created by the exactly 10.0%. For gain values between the two just given, mechanical time constant. This was done by setting the the overshoot and peak time are between the two extremes differentiator coefficient to the value of the mechanical time given above for overshoot and peak time. It just so happens constant, the proportional gain coefficient to one, and the that the settling time, regardless of the gain value, is always integrator coefficient to zero. This simulation output is shown 0.8 seconds (two opposing values, both functions of the gain, in Fig. 7. cancel out in the calculation of the settling time). These values are, of course, also dependent on the value of the motor’s time constant, so the overshoot, peak time, and settling time will change if the time constant is changed. For comparison purposes, the model of Fig. 8 was simulated (see Fig. 9), using a gain of 135, as that value is roughly midway between the two gain values discussed earlier which denote the two endpoints of the range in which optimum output values are produced. Fig. 7. Time Response of System with Electrical Time Constant Pole The simulation output in Fig. 7 shows that the elimination of the s = 0 and mechanical time constant poles produces the best system performance yet. Since the output does not oscillate, the peak time cannot be characterized as having a unique value, so the peak time will be considered to be the same as the settling time. The settling time is approximately 0.073 seconds (73 ms), and there is no overshoot. Note also that Fig. 9. AC Motor System Time Response with Gain of 135 6 had to be used to attain a high enough resolution in the output This simulation output shows a peak time of approximately graph that the response could be seen without difficulty. 0.48 seconds, a settling time of approximately 0.73 seconds, From these findings, it appears as though the best way to and an overshoot of approximately 9.0%. control an AC motor is the use a PID controller and to set the Since the AC motor transfer function is only second order PID values so that the poles of the motor are eliminated. (as opposed to the third order DC motor transfer function), When such equipment is not available, the gain can be those values may be easily changed by adjusting the gain adjusted to optimize the response, although that approach value. However, better system response may be attained by produces much less favorable results than those ensuing from placing a PID controller in the control system with the motor the use of a PID controller. (see Fig. 10), and setting the PID values accordingly. VI. TIME CONSTANTS A method to control both DC and AC motors with PID control has been determined. This method is heavily reliant on the time constants of the motor, and assumes that anyone Fig. 10. Simulink Model of AC Motor Control System trying to implement PID control for a motor knows the values with PID Control of the motor’s time constants. Since the nameplate on most motors only provides the name of the manufacturer, the Because the denominator of the AC motor transfer function is motor’s serial number, the motor’s input voltage, the second order, both poles may be eliminated by setting the PID maximum rotational speed of the motor’s output shaft (in values strategically. This was done by setting the RPM), the power of the motor (in horsepower), and the weight differentiator coefficient to the value of the time constant, the of the motor, another questions arises: How can the time proportional gain coefficient to one, and the integrator constants be determined for a motor that one already has in coefficient to zero. The output of that simulation is shown in hand? This is a very good question. Fig. 11. While the data sheets for some motors do contain the values of the time constants, this is not true in every case, so those values must be obtained experimentally. In the case of a DC motor, this is easier said than done. First, a system resembling that of Fig. 5 must be constructed, where the output being measured is the rotational speed of the output shaft of the motor. Keep in mind that, in this case, the transfer function of the motor is really a black box; all that is known about is for certain is that it has three poles, one of them at s = 0, and the other two created by the two time constants. Unfortunately, there is no cut and dried, step by step process by which to determine the time constants of the DC motor. As such, the system must be run many times, Fig. 11. Time Response of System with Both Motor Poles adjusting the PID values each time. The integrator coefficient Eliminated should be set to zero, and the proportional gain coefficient should be set to one, and both values should left there for all of Closer inspection of Fig. 11 reveals a peak time of 0.14 the system runs. Only the value of the differentiator seconds, a settling time of 0.065 seconds, and an overshoot of coefficient should be changed between runs. The electrical 0.4%. The settling time is less than the peak time because the time constant will likely be around 1 ms, and the mechanical peak value is less than 2% greater than the final value. In time constant will be greater than the electrical. Recall from comparison to the simulation (of Figs. 8 and 9) which was earlier that the best system response will be attained when the optimized by adjusting nothing other than the gain, this differentiator coefficient is equal to the mechanical time simulation exhibited considerable improvement, decreasing constant. The mechanical time constant may range anywhere the peak time by approximately 0.34 seconds (from 0.48 to from only a few milliseconds to hundreds of milliseconds, so 0.14 seconds), decreasing the settling time by approximately that full range should be tested. Thus, when a system response 0.665 seconds (from 0.73 to 0.065 seconds), and decreasing closely resembling Fig. 7 (no oscillations, no overshoot, and a the overshoot by approximately 8.6% (from 9.0 to 0.4%). A very short settling time) is achieved, the value of the simpler way to compare the two responses by inspection is to differentiator coefficient for that run is the value of the note the time scale in Figs. 9 and 11. The simulation mechanical time constant. represented in Fig. 9 was run for 1.5 seconds, while the To determine the time constants of an AC motor, a system response of the system whose simulation is represented in Fig. resembling that of Fig. 8 must be constructed, where the 11 was so much faster that a time scale of only 0.5 seconds output being measured is the rotational speed of the output 7 shaft of the motor. Choose an arbitrary gain value (it should some reason, the value of the peak time is not available or be somewhat high, to get a relatively fast time response, so a cannot be gleaned from the time response graph, the damping run will take no more than a couple seconds, but not so high ratio and the settling time may be used in conjunction with that separate oscillations are indistinguishable), and then do (20) to find the value of the natural frequency, but since the not change the gain value again. Keep in mind, again, that the peak time may generally be observed with greater accuracy transfer function of the motor is really a black box, and the than the settling time, (20) should only be used as a last resort. only thing that is known about it for certain is that it has two Similarly, if there is some problem with the value of the peak poles, one at s = 0 and the other created by the time constant. time or percent overshoot, any two of (18), (19), and (20) may The system must be run a single time (after running it several be used to solve for the values of the damping ratio and natural times to determine a good gain value), and the peak time, frequency, but since the percent overshoot and peak time are settling time, and percent overshoot all need to be observed. the two that may be measured the most easily and with the Fig. 12 shows the output of the model of Fig. 8, using a gain of most accuracy, (18) and (19) should be used whenever 1000 instead of the gain of 135 shown in Fig. 8. possible. Finally, using the values of the damping ratio and natural frequency in conjunction with (21), the time constant may be solved for, in this case turning out to be approximately 0.10 seconds. Considering that the value used for the time constant in the simulation was 0.1 seconds, it appears as though this method works with some degree of accuracy. When attempting to determine the time constants of a DC motor, the best method available is adjust the values of the coefficients of a PID controller until the result of a run bears resemblance to that of Fig. 7, and then to use those coefficient settings from then on. When attempting to determine the time constant of an AC motor, the system should be run, and the peak time, settling time, and overshoot observed and used to calculate the value of the time constant. Fig. 12. AC Motor System Response with Gain of 1000 Fig. 12 shows a peak time of approximately 0.14 seconds, a VII. ACKNOWLEDGMENTS settling time of approximately 0.76 seconds, and an overshoot of approximately 49%. Next, several calculations must be The author gratefully acknowledges the contribution of made, using the following equations: Paulo Ribeiro, for his help in writing this paper. Without his support, this process would have been much more difficult. PO 100 exp The author also acknowledges the contributions of John 1 2 , Washburn, Frank Saggio, Paul Bakker, Matt Husson, and Nate (18) Studer for their help in the research process. where PO is the percent overshoot of the response and ζ is the damping ratio of the system, VIII. REFERENCES Tp  Robert H. Bishop, Richard C. Dorf, Modern Control Systems, 9th ed. 2 Upper Saddle River, NJ: Prentice-Hall, 2001, p. 52-56, 227-231. n 1  D.K. Anand, Introduction to Control Systems. New York: Pergamon , (19) Press Inc., 1974, p. 34-37. where Tp is the peak time of the response and ωn is the natural  The ST Microcontroller Support Site Motor Control Tutorial, frequency of system, http://mcu.st.com/contentid-7.html. 4 Ts n , (20) where Ts is the settling time of the response, and IX. BIOGRAPHY 1 2 n , (21) Brian Bouma was born in Grand Rapids, Michigan in the United States of America, on September 30, where τ is the time constant of the motor. Using the percent 1982. He graduated from Grand Rapids Christian overshoot (in this case, 49%) in conjunction with (18), solve High School in 2001, and is currently pursuing his undergraduate degree at Calvin College. He is for the damping ratio, which in this case turns out to be majoring in engineering, with a concentration in approximately 0.22. Next, use the value of the damping ratio electrical and computer engineering, and currently and the peak time (in this case, 0.14 seconds) in conjunction holds a minor in mathematics. His work experience includes Smiths Aerospace with (19), and solve for the natural frequency, which in this LLC where he works in Digital Design. case turns out to be approximately 23.0 radians/second. If, for He has been a student member of IEEE since 2001.