Reference frames for simulation of electric motors and drives C.W. Brice brice@engr.sc.edu E. Santi X. Kang santi@engr.sc.edu kangxi@engr.sc.edu Department of Electrical Engineering Swearingen Engineering Center University of South Carolina Columbia, SC 29208, USA ABSTRACT Simulations of AC electric machines are usually performed in a coordinate system, or reference frame, with two axes (often denoted by d and q, or represented as a complex space vector). A third axis, the zero-sequence axis, is a homopolar axis that is necessary for handling certain unbalanced conditions. Historically, the transformation was essential to getting reasonable results, since computations were expensive and the transformation results in great simplification of the electrical and mechanical differential equations. Today, however, computation has become so incredibly cheap that the computing power of imbedded controllers in many appliances exceeds that of the early mainframe computers. Consequently, this paper revisits the issue of transformation of coordinate frames for performing simulations. Keywords: Motors, drives, simulations, reference frames. 1. INTRODUCTION Analyses of electric machines have been made in rotating reference frames since the early days with outstanding example in the work of Park [1] on synchronous machines, which states in the first paragraph that: "This paper presents a generalization and extension of the work of Blondel, Dreyfus, and Doherty and Nickel." Apparently, the early work of Blondel [2], which established the two-reaction theory of the salient-pole machine, provided the initial motivation for consideration of the transformation to a rotating reference frame. Park transformed to a frame fixed in the rotor, which is reasonable for a synchronous machine, since the field winding (or the magnets in the case of a permanent-magnet machine) are fixed in that frame, and since some degree of saliency often exists. Induction (or asynchronous) machines usually have a symmetrical rotor structure, consisting of cages or polyphase windings. Thus, the choice of reference frame is not so obvious. Stanley [3], for example used a stationary reference frame, while many authors (see Krause [4], for example) have used frames that rotate either at synchronous speed or that are fixed in the rotor. Recently Pekarek [5] studied the use of a hybrid approach that uses stationary frame for the stator electrical quantities and a rotating frame for the rotor electrical quantities. Electronic power converters may be modeled either by detailed representation of the switching of the power electronic devices (switching model) or by a state-space averaged modeled (average model). In the case of the latter, it is possible to L. U. Gökdere gokdere@engr.sc.edu convert the model into a dq frame [6], but the most natural representation is in the polyphase circuit variables. We consider two systems, one composed of an induction motor fed from a stiff ac voltage source and the second of an inverter (fed from a stiff dc voltage source) plus an induction motor driving a synchronous generator, which supplies an impedance load. In the first case, a series of several different reference frames are studied in detail, while in the second case, we consider the motor-generator set starting and operating under closed-loop speed control. Appropriate reference frames are used for each apparatus in the second case, with transformations applied as needed. 2. DEVICE MODELS 2.1 Induction motor model The Np-pole three-phase symmetrical induction motor is easily represented in a general dq reference frame as depicted in Figure 1. Notice that the frame may rotate at an arbitrary speed ω [rad/sec] with respect to the stator phase a axis, or as a special case ω may be equal to zero (stationary reference frame). A common choice of a rotating frame is the synchronously rotating frame ω = ωs = 4πf/Np. However, in general, the frame need not rotate at a constant speed, and is arbitrary. The angle of the transformation is θ [rad] which is the time integral of ω [rad/sec], or ω= dθ dt (1) Figure 1 shows the general reference frame and the conventions used for the transformation, while equation (2) gives the corresponding mathematics. é sin(θ) é v as ù êê cos(θ) ê v ú = êcos(θ − 2π ) sin(θ − 2π ) ê bs ú ê 3 3 êë v cs úû ê 2π 2π cos(θ + ) sin(θ + ) êë 3 3 π 2 2 2 é ê cos(θ) 3 cos(θ − 3 ) é v qs ù ê 3 ê v ú = ê 2 sin(θ) 2 sin(θ − 2π ) ê ds ú ê 3 3 3 êë v 0 úû ê 1 1 êë 3 3 ù 1ú é v ù ú qs 1ú êê v ds úú úê ú ë v0 û (2) 1ú úû 2 2π ù cos(θ + )ú 3 3 é v as ù 2 2π ú ê ú sin(θ + ) ú ê v bs ú 3 3 ú 1 ú êë v cs úû úû 3 Note that the frame speed ω may be constant (e.g., 0 or ωs) or variable. If the frame speed is zero, the angle θ may also be taken to be 0 for simplicity. The same transformation is used for all circuit quantities: voltage, current, and flux linkage. The variable labeled with the zero subscript is the zerosequence variable, which is clearly not needed (except to prevent the inverse transformation from being undefined) unless there is an unbalanced condition that results in ground current (i.e., unless i a + i b + i c ≠ 0 ). We consider motors in a three-conductor connection in this paper, so the zero-sequence variables are identically zero. b axis q axis θ Figure 2. The induction motor model in a purely arbitrary reference frame. The reference frame speed is ω and the rotor speed is ωr. 2.2 Synchronous machine model For the sake of comparison, we consider the synchronous machine with a conventional model representing a single cage damper (amortisseur) winding on each axis, and a single field winding on the d axis. The rotor parameters are referred to the stator. Later, a synchronous generator will be another component of the system under study to provide a shaft load on the motor. In contrast to the induction motor, which was symmetrical, even a cylindrical-rotor synchronous machine has a certain asymmetry, due to only having one field. Consequently, we model this machine in a d-q frame that rotates with the rotor and is aligned with the field along the d axis. Since ω = ωs = ωr, the rotor circuits have no speed voltages. Details are shown in Figure 3. ω = dθ/dt a axis isq Rs ωsλsd vsq Lls λsq Llrq Lmq Rrq irq λrq d axis c axis Llf Figure 1. General reference frame with the q-axis at an arbitrary angle with respect to stator phase a. Note that converters may produce zero-sequence voltages that tend to flow in stray capacitances and perhaps through bearings. Since we use only low-frequency models here, that has been omitted from consideration. Figure 2 gives the induction motor model in the arbitrary reference frame. The speed of the reference frame is ω and the rotor speed is ωr, both in electrical rad/sec (i.e., actual speed multiplied by the number of pole pairs). The rotor consists of a single cage winding, and all rotor circuit parameters are referred to the stator. isq Rs ωλsd vsq Lm λsq isd Rs Llr (ω−ωr)λrd Rr Lls ωλsq λrq Llr (ω−ωr)λrq Rr Lls irq isd vsd λsd Lm λrd ωsλsq Lls λsd Llrd Lmd λfd Rrd ifd ird Vf λrd Figure 3. Synchronous machine model. Note the field circuit is referred to the armature (stator). 2.3 Converter model The induction motor input is fed from an electronic drive that implements a PWM inverter fed from a stiff DC voltage. The inverter produces a constant volts-per-hertz output, so that as the frequency varies from nominal, the voltage is changed proportionally. To model this device, shown in Figure 4, an average model is used. That is, an instantaneous duty factor is used to determine the average voltage applied to each phase. a ird Vd vsd Rs Rf b c IM Figure 4. PWM inverter used to supply the induction motor. 2.4 System description The system under consideration is an induction motor driving a synchronous generator. The motor is connected to the PWM inverter using a speed regulation loop (proportional control). Figure 5 shows the block diagram of the controller. The shaft speed is measured and compared to the desired speed (the reference input) and used to control the duty factor of the inverter in proportion to the error between the measured and desired speeds. ωref Duty K Communication Interval = 1 msec V,f PWM Figure 7 shows plots of the motor developed torque plotted versus time for the duration of the simulation. In every case, plots similar to this one showed the same results for torque, speed and terminal electrical quantities in the simulations for each reference frame. MG ω Figure 5. Block diagram of proportional speed control loop. PWM = inverter, MG = induction motor-synchronous generator set, K = controller gain. 3.00 Execution time Err Pentium processor using the Windows NT 4.0 operating system. Results will vary with other operating systems and should be taken as relative information only. 2.50 2.00 1.50 1.00 0.50 0.00 Run Simulation of the converter is most naturally accomplished in the abc coordinate frame. Stationary Execution time 3.1 Induction motor simulation A number of simulation runs were performed using the simulation language ACSL to represent the induction motor starting across a stiff voltage source with no load on the shaft. After the motor was started, a step change in shaft load torque, from 0 to 2000 N m, was applied. The whole simulation time was 20 seconds. The execution times were tabulated for each of three test cases, each consisting of four runs of the simulation in reference frames that were stationary, rotating with the rotor, and synchronously rotating. The execution times are plotted in Figure 6. Rotor Synchronous Communication Interval = 10 msec 3. SYSTEM SIMULATION RESULTS This simulation was a 3-phase, 60-Hz, 460-V, 4-pole, 1764 rev/min, 300 kW (mechanical) single-cage induction motor. The shaft load was a flywheel with inertia of 90 kg m2 and friction coefficient of 0.088 N m sec. Rs = 3.527 mΩ, Rr = 4.232 mΩ, Lss = Lls+Lm = 3.994 mH, Lrr = Lss, Lm = 3.929 mH. 1a 1b 1c 1d 2a 2b 2c 2d 3a 3b 3c 3d Avg 0.70 0.60 0.50 0.40 0.30 0.20 0.10 0.00 1a 1b 1c 1d 2a 2b 2c 2d 3a 3b 3c 3d Avg Run Stationary Rotor Synchronous Figure 6. Execution times for induction motor simulation in three different reference frames for two different communication intervals. The communication interval is the time step between output points, but the numerical integration algorithm was a fifth-order variable step size Runge-Kutta. The whole experiment was repeated for two different communication intervals. At the top of Figure 6 is an interval of 1 msec while at the bottom is 10 msec. Note that 10 msec is too long for display of waveforms at 60 Hz, but is suitable for torque and speed plots. The results show that the effect of the reference frame is almost totally insignificant at the shorter interval, but that the rotating reference frames show approximately 2:1 speed advantage at the longer interval. Thus, if the simulation is intended to show details of 60 Hz waveforms of currents and voltages, one might as well use the stationary frame. Otherwise, if the time intervals can be chosen long enough, the rotating frames show the greatest promise. It is interesting to note the statistical variation in the execution times, which we hypothesize is simply due to running the simulations on an operating system that has other tasks running in the background. The simulations were run on a 400 MHz Figure 7. Electrical torque Te [N m] and mechanical torque Tm [N m] plotted versus time t [sec]. 3.2 System simulation The system shown in Figure 8, which is the same as the one shown by the block diagram in Figure 5, was simulated with the same simulation program. The generator was loaded with a resistive load after the motor starting sequence. Generator ratings: 3-phase, 460 V, 60 Hz, 4 poles, 1800 rev/min, 300 kW (electrical). Parameters: Rs = 5.643 mΩ, Rf = 0.444 mΩ, Rrd = 0.019 Ω, Rrq = 0.012 Ω, Lsd = 2.713 mH, Lrd = 3.373 mH, Lfd = 3.222 mH, Lrd = 3.373 mH, Lmd = 2.563 mH, Lsq = 2.657 mH, Lrq = 2.947 mH, Lmq = 2.507 mH During the starting sequence, the motor frequency is ramped up from 10 Hz to 60 Hz as shown in Figure 9. The actual shaft speed is shown in Figure 10, which follows the desired speed trajectory. There is a change in the slope at about t = 8 sec, where the input frequency begins to track the reference input very closely. After this, the system is in a pseudo-steady-state condition as the frequency ramps up. A slightly different starting sequence is often used, wherein the voltage is held constant at a small value while the frequency is ramped up, and then both voltage and frequency are ramped together. We intend to run more simulations to better tune the start-up sequence with a view to reducing the transients. The speed control uses a proportional controller with a gain of 20. This figure was derived by trial and error by running several simulations. Figure 10. Shaft rotational speed [rad/sec]. Notice that this tracks the reference frequency input closely. Figure 11. Electrical torque of induction motor [N-m]. Notice the startup transients and transient due to the generator being suddenly loaded at t = 10 sec. The following scenario was studied on the generator: (1) The motor was started as described above, while the generator is excited to allow its voltage to build up. Initially, the generator is feeding an open circuit. (2) After motor reaches operating speed, the generator is suddenly loaded to its rating. Figures 11 and 12 show the electrical torque of the motor and the generator. PWM Inverter Voltage Source Synchronous Generator Figure 12. Electrical torque [N m] of the generator. Generator is loaded suddenly at t = 20 sec. Induction Motor Resistance Load Figure 8. Schematic diagram of system studied. These plots were obtained using the stationary reference frame for the induction motor, but the same results were obtained for the other two frames. Simulations of runs where all three frames were used successively have variations that lie within the width of the line used in the plot. 4. CONCLUSIONS Reference frames for induction machines can be chosen arbitrarily. The effects of the choice on the speed of the simulation are not very large if it is desired to plot electrical quantities such as current and voltage at the machine terminals. In our system simulations, we used a stationary reference frame for the cases plotted, but the same results were obtained for the other reference frames. Figure 9. Reference frequency [Hz] input to the PWM inverter. The constant volts/Hz control causes the voltage rms value to track this input. One of the most interesting conclusions to be drawn from the present work, is that the recording of data and its display seems to dominate the processor time devoted to the calculations. On a prototype of the VTB software, running several simulations of different systems, similar conclusions were drawn. For systems that use more advanced visualization tools, such as 3-d renderings, the results are more startling: almost all the computational time goes into the graphics. 5. PLANS FOR FUTURE WORK This project is a part of the Virtual Test Bed (VTB), sponsored by the US Office of Naval Research (Grant N00014-96-10926), which is also developing a new simulation environment. Our immediate plans are to implement simulations of this system in the VTB software, primarily to provide a test case that shows realistic performance, in order to provide a basis for making comparisons between different simulation programs and the one under development. Unfortunately, these efforts are sufficiently mature to present results yet, but we anticipate some in the near future. The system studied is just a part of an overall system with other loads, transformers, converters, etc., representing a small or medium scale power system. Eventually, we plan to report on the results of simulating the larger system. As part of this study, a more systematic means of designing the controllers will be used. The VTB software will allow advanced visualizations, including 3-d renderings, which will allow some novel ways to display results besides line plots and oscilloscope-type displays. REFERENCES 1. R. H. Park, "Two-Reaction Theory of Synchronous Machines," AIEE Transactions, Vol. 48, pp. 716-730, July 1929. 2. A. Blondel, Synchronous Motors and McGraw-Hill, 1913. 3. H.C. Stanley, "An Analysis of the Induction Machine," AIEE Transactions, Vol. 57, pp 751-759, 1938. 4. P.C. Krause, Analysis of Electric Machinery, McGrawHill, 1986. 5. S.D. Pekarek, O. Wasynczuk, H.J. Hegner, "An efficient and accurate model for simulation/analysis of machine/converter systems," IEEE Transactions on Energy Conversion, Vol. 13, pp. 42-48, March 1998. 6. D.W. Novotny and T.A. Lipo, Vector Control and Dynamics of AC Drives, Oxford University Press, New York, 1998. Converters,