System and method for controlling brushless permanent magnet motors

Abstract: A system and method of calculating optimum angle advance for brushless permanent magnet motors is claimed. The calculations are based on the motor drive parameters and on operational variables including the motor speed and the motor load. The angle advance is calculated dynamically as a function of motor speed and, where reluctance torque is involved, as a function of load current as well. For a given motor, the angle advance is calculated according to the speed and load together with the motor and drive parameters according to one or more angle advance equations.

Description: This invention relates to electric motors, and more particularly to control systems for brushless permanent magnet motors. BACKGROUND OF THE INVENTION A brushless permanent magnet motor typically includes windings on the stator, rotating permanent magnets, and a position sensor for indicating the rotor position. The winding energization is generally controlled by solid state switches that are responsive to the position indications to energize the windings in the proper commutated sequence. Motor control is achieved by controlling the magnitude of the winding excitation current. US-A-4,447,771 (the '771 patent) describes a system in which both the phase and magnitude of a motor's winding excitation currents are controlled. A quadrature phase relationship normally exists between the rotor field and the rotating stator magnetic field. The phase angle is varied from the quadrature relationship according to "torque angle factors" which are a function of the motor speed. By dynamically varying the phase angle, an improved motor performances over a wide speed range. In a manner similar to the '771 patent, US-A-4,490,661 (the '661 patent) employs "torque angle factors" to vary the phase relationship between the rotor field and the rotating stator magnetic field as a function of both the motor speed and motor load. EP-A-0 638 988 discloses a self-tuning-tracking controller for permanent-magnet synchronous motors and US-A-4 651 068 discloses a drive circuit for a brushless motor utilizing phase shift and current shaping to provide for efficient operation of a brushless motor in a servo-control system. The typical calibration procedure for arriving at the torque angle factors used in determining the angle advance in the '771 and '661 patents as well as EP-A-0 638 988 and US-A-4 651 068 would use a test motor and drive, a three phase Variac, a dynamometer, and a blower for cooling the motor. The three phase Variac was used to provide the three phase power necessary to excite the stator. The dynamometer was used to measure the motor's torque. To determine the angle advance for a given speed, the motor was set to the speed and allowed to stabilize at a predetermined test temperature, the blower being used to regulate the motor temperature. Once stable speed and temperature were achieved, the angle advance was manually adjusted while observing the dynamometer reading to determine the angle that gives the maximum torque. The calibration procedure was repeated for the desired number of motor speeds and/or loads to create a table of torque angle factors. The calibration procedure would be repeated for each motor type, and in some cases, for each motor. The prior calibration method was costly and time consuming and provided torque angle values for only a finite number of motor speeds. SUMMARY OF THE INVENTION The present invention provides a system and method for determining the best angle advance for any set of motor speed and/or load conditions, without engaging in a lengthy calibration procedure. The calculations are based on certain motor and drive parameters. The motor parameters include a number of poles P, the back emf Kv, and the stator inductance values Ld and Lq. The drive parameters include the bandpass of the PWM (pulse width modulation) amplifier ω bo , the control loop time delay Δt and the available link supply voltage Vm. These motor and drive parameters can be used according to the invention to determine the optimum phase advance for the dynamic variables of rotor speed ω and stator current Is. The angle advance values calculated from the motor and drive parameters can be recorded in a look-up table as functions of the dynamic factors of rotor speed and/or motor load. In one implementation of the preferred embodiment of the invention, discrete logic or a microprocessor is used to compute the angle advance and control the winding excitation currents accordingly. In the microprocessor implementation, a program stored for use in the microprocessor, is used to calculate the angle advance. The calculations are based on a rotor position feedback signal supplied by one or more sensors, a rotor velocity feedback signal which can be derived from the position feedback signal, and a measure of stator current which is proportional to torque. The microprocessor computes the optimum angle advance for any combination of speed, rotor position and torque. These and other objects are achieved by the method and system for controlling brushless permanent magnet motors as claimed in Claims 1 to 14. BRIEF DESCRIPTION OF THE DRAWINGS Fig. 1 is a functional block diagram of a motor control system in accordance with the invention. Fig. 2 is a functional block diagram of a control logic unit suitable for use in the motor control system of Fig. 1. Fig. 3 is a schematic diagram of a PWM current amplifier suitable for use in the motor control system of Fig. 1. Fig. 4 is an illustration of the relationship between the sinusoidally varying excitation signals and the corresponding pulse width modulated (PWM) outputs of the current Amplifier of Fig. 3. Fig. 5 is a cross section of a brushless permanent magnet motor wherein the magnets are embedded in the rotor. Fig. 6A shows the q-axis dynamic equivalent circuit for an IPM motor. Fig. 6B shows the d-axis dynamic equivalent circuit for an IPM motor. Fig. 7A is a graph depicting the load advance angle vs. stator current as computed according to the invention. Fig. 7B is a graph depicting the speed advance angle vs. motor speed as computed according to the invention. Fig. 8 is a functional block diagram of an alternative control logic unit suitable for use in the motor control system of Fig. 1. Fig. 9 is a functional block diagram of a circuit that may be used to measure q-axis and d-axis motor inductances at various stator currents. Fig. 10A is a flow chart showing the steps taken in calculating the angle advance in accordance with a preferred embodiment of the invention. Fig. 10B is a flow chart showing the steps taken in applying an angle advance. DETAILED DESCRIPTION OF THE DRAWINGS A functional block diagram of a permanent magnet motor control system in accordance with the invention is shown in Fig. 1. The system is used to control a three phase motor 20 . The basic elements for velocity control are: a velocity compensator 22, a control logic unit 24 , a PWM current amplifier 26 , a resolver 28, and a feedback processor 30 . The elements form a control loop which, upon receiving a command, compares the commanded values with the actual feedback values and adjusts the motor excitation accordingly. When operating as a velocity servo system, the speed command 31 is supplied to a summing junction 32 where it is compared with the actual rotor speed feedback derived from resolver 28 coupled to the shaft of motor 20 and feedback processor 30 . The summing junction produces an error signal corresponding to the difference between the velocity command and the velocity feedback. The error signal, after passing through velocity compensator 22 , provides the torque command to the control logic unit 24 . The control logic and the PWM current amplifier supply an excitation current to the motor related in amplitude to the magnitude of the torque command. In the velocity servo operation, the excitation current to the motor is adjusted to minimize the error signal at the summing junction so that the motor speed corresponds to the command. Feedback processor 30 coupled to the resolver provides a rotor position indication and rotor speed indication to control logic unit 24. The rotor speed indication is used to generate motor excitation currents having a frequency synchronous with the speed of rotation. The rotor position indication is used as a reference for setting the phase of the excitation current corresponding to the angle advance determined by an advance logic unit 34 within the control logic unit. In the position servo mode, a position command 36 is supplied to a profile generator 38 and a position compensator 40 to provide a velocity control signal to summing junction 32 . The profile generator 38 controls the motor acceleration and deceleration when moving to a new position so that the desired position is reached rapidly without overshoot. Position and velocity servo are the most common feedback control modes. Other modes are possible, however, and can be connected via the torque command 42 . A more detailed block diagram of the control logic unit is provided in Fig. 2. An angle calculation unit 46 receives the rotor position and rotor speed indications from the feedback processor 30 . An advance logic unit 34 calculates the angle advance for the phase of the excitation current relative to the rotor position. The angle advance calculations are described in detail hereinafter. Angle calculation unit 46 produces a phase vector indication for the motor excitation which is the rotor position phase plus the angle advance. The phase vector is supplied to a sine look-up table 48 which provides a digital sine value corresponding to the phase vector position. The phase vector is also supplied to a sine look-up table 52 via a phase offset unit 50 which shifts the phase vector by 120 electrical degrees. The output of sine table 48 passes through a multiplying digital-to-analog (D/A) converter 56 to produce the phase A sine wave. The output of sine table 52 passes through a multiplying digital-to-analog (D/A) converter 54 to produce phase C sine wave. Since the phase sine waves are each displaced by 120 electrical degrees, the phase B since wave is derived as the sum of phases A and C. The torque command passes through a digital-to-analog (D/A) converter 58 to supply the multiplier to multiplying DACs 54 and 56 . Thus, the control logic produces a three phase signal having a phase according to the angle advance relative to the rotor position and an amplitude corresponding to the needed torque. Fig. 3 is a block diagram of the current amplifier 26 for phase A. Similar amplifiers are used for phases B and C. The sinusoidal phase A voltage signal from D/A converter 56 (Fig. 2) is supplied to the input of current amplifier 26 to produce the current for exciting the phase A winding of motor 20 (Fig. 1). The current for exciting the motor winding is in the form of current pulses each having a pulse width corresponding to the amplitude of the input signal. The phase A input signal is supplied to summing junction 60 where it is compared to the current feedback from the amplifier output. The feedback can be obtained using a suitable current sensor 71 which returns a voltage feedback signal proportional to the stator current. Summing junction 60 produces an error signal proportional to the difference between the input signal and the feedback. The error signal is amplified to produce a motor current determined by the magnitude of the input signal. The error signal from summing junction 60 passes through a current compensation circuit 62 to a pulse width modulator (PWM) 64 . The input signal to the PWM is compared to a triangular wave from a generator 74 such that the output pulse becomes wider as the signal magnitude becomes greater. Current to phase A of the motor winding is supplied by a pair of IGBT power transistors 72 and 73. The upper transistor 72 is connected to the positive bus and the lower transistor 73 is connected to ground. The common connection between the transistors is connected to phase A of the motor winding. When upper transistor 72 is conductive, the winding is connected to the positive bus. When the lower transistor 73 is conductive, the winding is connected to ground. The output of the PWM 64 directly drives the upper transistor 72 via a dead time generator 68 and an isolation circuit 70 . The output of the PWM 64 also passes through an inverter 66 and then drives lower transistor 73 via dead time generator 68 and isolation circuit 70. The isolation circuit is preferably a photo-optic coupling which isolates the power stages from the sensitive electronic control circuits. Dead time generator 68 provides a minimum time interval between the turn-off of one power transistor and the turn-on of the other is no short circuit from the positive bus to ground through the transistors. The pulse width modulator 64 includes a comparator which compares the sinusoidal input to the triangular wave form generator 74 . If the sinusoid value exceeds that of the triangular wave, the output of the comparator is positive and transistor 72 is turned on. If the sinusoid value is less than that of the triangular wave, the output of the comparator is zero and transistor 73 is turned on. The effect of this comparator operation is to produce square pulses of varying widths. Fig. 4 illustrates the relationship between the three phase pulse width modulated signals (Graphs B, C and D) and the sinusoidal input signals (Graph A). A conceptual representation of a motor controllable by the system is shown in Fig. 5. The conceptual representation is used in deriving the equations for calculating the angular advance in advance logic 34 (Fig. 1). The motor includes a stator 80 having three windings 82, 84 and 86 , and a rotor 88 having an imbedded permanent magnet 90. As can be seen from the figure, windings 82, 84 and 86 are symmetrically oriented around the stator, each displaced 120° from one another. Each stator winding is modeled as a one turn concentrated winding. For example, the one turn representing winding 82 starts at position a, and returns at position a', which is located at a point 180° from position a. The conceptual motor of Fig. 5 is an Interior Permanent Magnet (IPM) type motor. That is, the motor has permanent magnets located in the core of the rotor rather than at the rotor surface. The salient rotor structure of the IPM motor results in a winding inductance which varies as a function of the rotor angle. The IPM motor stands in contrast to Surface Permanent Magnet (SPM) motors which have their permanent magnets located on the surface of the rotor. Fig. 5 may be used as a conceptual representation of an SPM motor if the shape of the rotor is redrawn as a circle (as illustrated by dotted lines 90 and 94 ). Both IPM and SPM type motors can be operated more efficiently by employing angle advance. As will be described later in more detail, the optimum angle advance for an SPM motor is a function of the motor speed, while for an IPM motor it is a function of both motor speed and load. The motor of Fig. 5 is preferably operated by exciting the windings with three phase sinusoidal power, one electrical phase for each winding. Since the peaks of the sinusoidal excitation occur at intervals of 120° relative to each other, and thus correspond to the spatial orientation of the windings, a "rotating" magnetic field is created by the winding excitation. The flux of the rotating magnetic field interacts with the flux of the rotor's permanent magnet, causing the rotor to turn in synchronism with the rotating field. The solid state control of current flow through the windings according to rotor position is commonly known as electrical commutation, a process which allows brushless permanent magnet motors to operate without the troublesome commutation brushes found in many prior electric motors. The dynamic angle advance control performed by the advance logic unit 34 (Figs. 1 and 2) is based on equations as set forth below. A. MODELING AND PARAMETER CHARACTERIZATION OF BRUSHLESS PERMANENT MAGNET MOTORS A derivation of a two-phase equivalent circuit model (or "d-q model") for a brushless permanent magnet motor is presented, followed by a derivation of a produced torque equation for the same type of motor. The following assumptions are made: (1) The stator windings produce sinusoidal mmf distribution. Space harmonics in the air gaps are neglected. (2) Air gap reluctance has a constant component as well as a sinusoidally varying component. (3) Balanced three phase supply and three phase circuits are considered. Eddy currents and hysteresis losses are neglected. With regard to assumption (3), if necessary, eddy currents and hysteresis losses can be included as an additional element in the equivalent circuit. Nomenclature for the description is as follows: P number of poles of the motor Ia, Ib, Ic phase a, b, c instantaneous stator current Va, Vb, Vc phase a, b, c instantaneous stator voltage Id, Iq d and q axis components of stator current Vd, Vq d and q axis components of stator phase voltage Is magnitude of stator current vector NOTE: Is = sqrt(Id 2 + Iq 2 ) Vs magnitude of stator voltage vector NOTE: Vs = sqrt(Vd 2 + Vq 2 ) Rs stator resistance p d/dt Ld, Lq d and q axis stator self inductance Ψmag peak flux linkage due to permanent magnet  (electrical) angle between a-axis and q-axis ω ω=p, angular velocity of rotation (in electrical rad/sec.) Ls Constant component of Air gap reluctance NOTE: Ls = Lso + Lsl, where Lso is the inductance that produces torque and Lsl is the stator leakage inductance Lx magnitude of sinusoidally varying component of air gap reluctance 1) Derivation of Brushless Permanent Magnet Motor Model Fig. 5 illustrates a conceptual cross-sectional view of three-phase, two-pole IPM motor along with chosen reference frames. The stator reference axis for "a-phase" (axis 83 ) is chosen as the direction of maximum mmf when a positive a-phase current is supplied. Reference axis for the other stator axes (axes 85 and 87 ) are chosen accordingly. Following the d-q model convention, the direction of permanent magnet flux is chosen as the d-axis (axis 91 ), while the q-axis (axis 92 ) is 90° ahead of the d-axis. The angle of the q-axis with respect to the a-axis is defined as . As the machine turns, the d- and q- reference frame is rotating at a speed of ω= d/dt, while the stator a, b and c axes are fixed in space. The electrical dynamic equations for the motor can be written as: Va = Rs Ia + pΨa Vb = Rs Ib + pΨb Vc = Rs Ic + pΨc The flux linkage equations (accounting for symmetry of mutual inductances such as Lab=Lba) may be written as: Ψa = Laa Ia + Lab Ib + Lac Ic + Ψmaga Ψb = Lab Ia + Lbb Ib + Lbc Ic + Ψmagb Ψc = Lac Ia + Lbc Ib + Lcc Ic + Ψmagc The inductances named in equations A.4, A.5 and A.6 are functions of the angle . The inductances may be expressed as: Laa = Lso + Lsl + Lx cos (2) Lbb = Lso + Lsl + Lx cos (2+120) Lcc = Lso + Lsl + Lx cos (2-120) Lab = -(½)Lso + Lx cos (2-120) Lbc = -(½)Lso + Lx cos (2) Lab = -(½)Lso + Lx cos (2+120) As can be seen from equations A.7, A.8 and A.9, a stator winding's self-inductance is maximum when the rotor q-axis is aligned with the stator's phase, while mutual inductances between stator windings are maximum when the rotor q-axis is midway between two stator phases. The effects of saliency are also apparent from the equations, as indicated by the 2 term. In equations A.10, A.11 and A.12, the -(1/2) coefficient is due to the fact that stator phases are displaced by 120°, and cos(120°) = -(1/2). The flux linkages due to the motor's permanent magnet can be expressed as: Ψmaga = Ψmag cos  ψmagb = Ψmag cos (-120) Ψmagc = Ψmag cos (+120) Input power Pi can be represented as: Pi = Va Ia + Vb Ib + Vc Ic Output power Po and the output torque T cannot be expressed in a simple form in the three phase model. An expression which ties the two parameters together is: T = (P/2)Po/ω By letting S represent the quantity (current, voltage and flux linkage) to be transformed from the abc frame to the d-q frame, the following matrix transformation is derived: In a balanced three phase system, the So component, or "zero sequence component", is always zero. Since the transformation is linear, its inverse transformation exists and is given by: By applying the transformation of equation A.18 to the voltages, flux linkages and currents of equations A.1 - A.6, a simple model for the d-q electrical dynamic equations and flux-linkage equations is derived: Vq = Rs Iq + pΨq + ωΨq Vd = Rs Id + pΨd - ωΨd Ψq = Lq Iq Ψd = Ld Id + Ψmag Lq and Ld are called d and q axis inductances, respectively, and they are defined as: Lq = (3/2)(Lso+Lx) + Lsl Ld = (3/2)(Lso-Lx) + Lsl By eliminating flux-linkage terms from equations A.20 - A.23, the following equations are derived: Vq = (Rs+Lqp)Iq +ωLd Id+ωΨmag Vd = (Rs+Ldp)Id -ωLq Iq Equations A.26 and A.27 from the basis for the d-q model for brushless permanent magnet motors. The d-q equivalent circuit that represents the model is shown in Figs. 6A and 6B. 2) Derivation of Produced Torque Equation By applying the transformation of equation A.18 to equation A.16, and neglecting the zero sequence quantities, an instantaneous power equation for the model is obtained: Pi = (3/2) {Vq Iq+Vd Id} The output power is then obtained by replacing Vq and Vd by the associated speed voltage: Po = (3/2) {-ωΨq Id + ωΨd Iq} The produced torque T, which is power divided by mechanical speed, is represented as: T = (3/2)(P/2)(Ψmag Iq + (Ld - Lq) Iq Id). Since the transformation of equation A.18 is not unitary (a square mix is unitary if its inverse is the same as its transpose), the power and torque of the two-phase equivalent system is different from those of the original three-phase system. Accordingly, to calculate power and torque from the two-phase equivalent circuit, the (3/2) factor has to be included in equations A.28, A.29 and A.30. The magnitude of the flux linkage of the two-phase equivalent circuit is 2/3 of that of the three-phase circuit. B. THE DYNAMIC ANGLE ADVANCE For a given torque command (Tc), rotor position (  r), and rotor speed (ω), the sa that produces maximum torque is computed by the following equation:  sa =  r ± (90 +  i ) +  s In the above equation, the reference rotor angle (r=0) is defined as the angle that the rotor will settle at when the rotor is free to rotate and winding 82 is energized at positive maximum. i represents the load angle advance, which is a function of the stator load current (Is), which, in turn, is a function of Tc. s represents the speed angle advance, which is a function of ω. For each type of advance, an equation which describes the advance in terms of motor parameters is derived below. The derivations are based in the d-1 axis motor model described above. 1) Load Angle Advance In keeping with the d-q model, the direction of permanent magnet flux is chosen as the d-axis, while the q-axis is 90° (electrical) ahead of the d-axis. Accordingly, the dynamic equations can be written as: Vq = (Rs + Lq p) Iq +ω Ld Id + ω Ψ mag Vd = ( Rs + Ld p ) Id - ω Lq Iq The produced torque (T) can be represented as: T = (3/2) ( P /2) (Ψ mag Iq + (Ld - Lq) Iq Id ) When the load angle advance is discussed, assume that s=0, that is the current amplifier is ideal. Thus, i is equal to  of Fig. 1, the angle between the q-axis and a-axis. Accordingly, Id and Iq can be expressed as: Iq = Is cos Θ i , Id = Is sin Θ i The above equations may be substituted into equation B.4 to yield the following expression for produced torque: T = (3/2) (P/2) ( Ψmag Is cos Θ i +(1/2)( Lq - Ld ) Is 2 sin 2Θ i ) As can be seen from equation B.6, the produced torque (T) is dependent not only on the stator current, but also on the current angle i. Thus, the produced torque may be controlled by varying the stator current, by varying the current angle, or by varying both. A particularly useful motor control strategy is to adjust the motor so that maximum torque is produced for a given stator current. For surface permanent magnet motors (SPM) whose inductance is constant regardless of rotor angle, the above three equations can be simplified by letting Lq = Ld = Ls, where Ls is the stator inductance. In such a case, the second term in equation B.6, which represents reluctance torque, vanishes and equation B.6 may be expressed as T = (3/2) ( P /2) Ψ mag Is cos Θ i For SPM motors with orthogonal control, the optimal load angle advance i is simply zero. For IPM motors, Lq = Ld = Ls does not hold. Therefore, the second term of equation B.6 does not drop out, and it can be seen from the equation that orthogonal control does not produce maximum torque per current in IPM motors. The i which produces maximum T for a given Is may then be determined by differentiating the right side of equation B.6 and setting the derivative equal to zero. This results in the following expression for i:  i = sin -1 ( -Ψ mag 4 ( Lq - Ld ) Is + ( Ψ mag 4 ( Lq - Ld ) Is 2 + 1 2 Between the two possible solutions of equation B.9, the solution yielding 0 ≤ i ≤ 45° is taken. As shown in equation B.8, the optimal load angle advance may be computed from a knowledge of motor parameters Ld, Lq and Ψmag which can be, in turn, calculated from Kv and P), and a knowledge of the magnitude of the stator current, Is. Such a computation may be made from the parameters while the motor is in operation. As an alternative, a look-up table of i vs. Is may be computed during the motor initialization process so that the load angle advance for a given stator current can be obtained by reading the look-up table. 2) Speed Angle Advance For a given load angle advance i, in order to make the motor produce desired maximum torque, the following assumptions must hold: 1. The signal processing performed by the sensor, feedback processor and logic circuit of Fig. 1 is instantaneous. 2. The sinusoidally varying signals are amplified by the current amplifier of Fig. 1 without any phase delay. If the above conditions are met, or the combined delays are negligible, the produced torque would be as expected. However, in most practical drive systems, there are significant time delays in signal processing and phase delays in the current amplifier. Therefore, to find the optimal phase angle, not only the load angle advance, but also the above mentioned delays must be considered. The time delay associated with the sensor, feedback processor and logic circuit processing may be expressed as a phase delay. If the sum of these fixed time delays is represented by Δt, the phase delay due to the processing components (s1) can be calculated as:  s1 = (180/π)Δ t ω The phase delay in the current amplifier (or "current controlled amplifier") can be modeled if the bandwidth ω b of the current loop is known. The bandwidth of most current controlled PWM amplifiers is dependent on the supply voltage and motor back emf voltage. The bandwidth ω b at speed ω can be calculated by: Letting ω bo be the current loop bandwidth of the drive at zero speed, nominal voltage supply; letting Vm be the available voltage (rms) for the inverter control at zero speed; and assuming that the stator resistance and power converter drops are already factored into the Vm calculation. The foregoing nomenclature yields the following equation for ω b : ω b = ω bo ( Vm - Kv ω (2/ P ))/ Vm With respect to the above equation, it should be noted that Kv is the back emf voltage constant in V/rad/sec, and that K is a small constant which accounts for magnetic saturation. K is preferably set by experiment and within the range of 0.1 to 0.2. It should also be noted with respect to equation B.10 that the effect of stator voltage drop has been neglected. Another assumption made in computing the amplifier phase delay is that the most practical amplifier can be modeled as a first order amplifier of the form: G ( s ) = Ka s /ω b + 1 In the above equation, Ka is the amplifier DC gain, which has no bearing on the phase delay calculation. Now, the phase lag due to the amplifier is given by:  s2 = arctan (ω/ω b ) When the system is in generation mode, the sign of ω in equation B.10 is negative, and ω b is higher than ω bo , resulting in a very small  s2 . Therefore, the speed angle advance required for generation mode is smaller than that required for motoring mode. In accordance with equations B.9 and B.12 the desired speed angle advance may be written as  s =  s1 +  s2 = (180/π)Δ t ω + arctan(ω/ω b ) Thus, the speed angle advance may be calculated from the knowledge of Kv, ω bo , Vm, Δt and ω. Parameters Kv and ω bo are associated with the motor, while parameters Vm and Δt may be derived from the drive characteristics. As in the case of load angle advance, an array of optimal s vs. speed can be calculated upon motor initialization. 3) The Angle Advance Curves for Speed and Load The load angle advance curve described by equation B.8 is shown in Fig. 7A. The speed angle advance curves are shown in Fig. 7B. In accordance with the description of equation B.13, Fig. 7B shows two speed angle advance curves, one for motoring mode, and one for generating mode. The optimum angle advance for a given mode of operation, rotor speed, and stator current may be determined from inspection of Figs. 7A and 7B. The mode and speed may be used in conjunction with Fig. 7B to yield a value for the speed angle advance, while the current may be used in conjunction with Fig. 7A to yield a value for the load angle advance. The two values are then added to determine the optimum advance. The curve for angle advance as a function of stator current shown in Fig. 7A is typical for an embedded permanent magnet (IPM) motor. The comparable curve for a surface permanent magnet (SPM) motor is typically a flat zero curve, meaning that no angle advance correction as a function of stator current is required. In the embodiment described above and depicted in Figures 1, 2 and 3, the angle advance may be computed dynamically by performing the calculations of equations B.8 and B.13. However, if the control logic unit does not have the capacity to compute the angle advance dynamically, a look-up table may be employed. In such a configuration, the look-up table contains a precalculated list of angle advances formulated from equations B.8 and B.13. Separate look-up tables could be used for load advance, speed advance in generating mode, and speed advance in motoring mode. During motor operation, the advance logic unit would use the tables to "look-up" the angle advance corresponding to the present torque command value, rotor speed, and operating mode. The look-up tables obviate the complex calculations of equations B.8 and B.13 on an ongoing basis. The look-up table approach has the disadvantage of requiring considerable set up time. Interpolation may be used tin conjunction with one or more look-up tables. Interpolation increases the efficiency of a look-up table configuration by providing approximations of exact angle advance for operating conditions other than those specified in the table. The complexity of the interpolation algorithm employed may be varied to trade off accuracy of calculation and calculation speed. In another embodiment, neither "on the fly" computation of equations B.8 and B.13 nor "look-up" tables are employed. Instead, equations B.8 and B.13 may be approximated through curve fitting based on a limited set of precalculated values. Curve fitting may yield equations that are simpler to calculate than equations B.8 and B.13, thus allowing them to be calculated "on the fly". As with interpolation, the complexity of the curve fitting equations may be varied to trade off between accuracy of calculation and calculation speed. In another embodiment of the invention, an integrated circuit processor, such as a microprocessor or digital signal processor is incorporated into control logic unit 24 . To implement such a system: the torque command is converted to a digital signal prior to being passed to the processor. The functions of the angle calculation circuit 46 , advance logic unit 34 , phase offset 50 , and sine tables 48 and 52 as shown in Fig. 2 are coded into the processor's software. The D/A converters 54 and 56 are located at a point between the microprocessor and the PWM current amplifier. The profile generator, position compensator, velocity compensator, feedback processor may also be functions performed in the microprocessor. In some cases, it is useful to compensate for stator current drop-off due to approaching saturation at high torque operation. The current drop-off refers to the reduction in motor current that occurs with incremental increases in motor speed. A technique that may be used to compensate for stator drop-off is described below. The compensation technique is described in relation to the embodiment illustrates in Figs. 1 to 3. Stator current drop-off is related to the Current amplifier portion of the motor drive. As was discussed above, the amplifier can be modeled as a first order amplifier having the transfer function (B.11): G ( s ) = Ka s /ω b + 1 where ω is the electrical frequency corresponding to the speed of the rotor, ωb is the bandwidth of the current loop at speed ω, and Ka is the amplifier DC gain. It follows that the magnitude, M, of the amplifier transfer function is: M = Ka (ω/ω b ) 2 + 1 Thus, the magnitude of the amplifier output decreases as motor speed increases. The speed angle advance of equation B.13 does not account for the magnitude drop-off associated with the current amplifier, but rather accounts only for the phase delay associated with the amplifier. One way to compensate for the stator current drop-off is to modify the control logic unit of Fig. 2. Fig. 8 shows how the control logic unit of Fig. 2 can be modified to add a magnitude boost unit 33 . The magnitude boost unit compensates for the stator current drop-off by multiplying the torque command by the inverse of the amplifier transfer function magnitude (1/M). This has the effect of increasing the output of DAC 58 by 1/M and, in turn, increasing the output of DACs 56 and 54 by I/M. Accordingly, the currents phase A, phase B and phase C that are passed to the current amplifier are increased by a factor of 1/M, and the net result is that the stator current entering summing junction 60 (Fig. 3) is increased by a factor of I/M. This increase compensates for the stator current drop-off. As previously mentioned, equations B.8 and B.13 may be used to dynamically compute the angle advance. To solve these equations, the parameters indicated in Fig. 1 are required. The required motor parameters are Ld and Lq (stator inductances), P (the number of poles) and Kv (the back emf constant). The required drive parameters are ω bo (the PWM bandpass), Δt (the loop time delay) and Vm (the available link voltage). The required dynamic parameters are ω (the rotor speed) and Is (the stator current). In an adaptive controller implementation, the required motor parameters and drive parameters are established during initialization of the system and then used in calculating the angle advance according to the dynamic parameters of rotor speed and stator current while in operation. The dynamic parameter ω(rotor speed) may be measured using resolver 28 , and the dynamic parameter Is (stator current) may be measured by a suitable current sensor located to measure current supplied to the motor. Regarding Δt, in most applications, the loop time delay Δt is negligible and, therefore, drops from the equations. Where required, the loop time delay can be measured by passing a test pulse through the system and measuring the delay during the initialization. Regarding Vm, this parameter may be determined from the DC link voltage, Vdc. The relationship between Vm and Vdc is dependent on the method of modulation. For sinusoidal-triangle modulation, Vm = 0.78 Vdc. Regarding Kv, this parameter is generally available from the manufacturer's data sheet and may be entered manually during initialization, for example, through data key entry. Alternatively, Kv could be determined by driving the motor at a fixed speed, such as 20% of the nominal speed, and measuring the voltage generated under these conditions. When measuring the voltages, no angle advance should be used. Other methods for determining Kv from instantaneous voltages are also well known. Regarding ω bo, this parameter can be determined by locking the motor shaft and exciting the controller with a sinusoidal torque command. The sinusoidal input command is swept from approximately 1 Hz to 1 KHz while the output of the controller is measured. The bandpass parameter wbo is the frequency at which the magnitude of the measured output is 3dB down from the peak value. At this point, the parameters required by the equation that remain to be determined are Ψmag (peak flux linkage due to permanent magnet), and Ld and Lq (stator inductances). For each of these parameters, two methods of calculation are presented. In each case, the first method involves fewer steps than the second, but the second method provides a more precise determination of the parameter. For a simplified determination of Ψmag , the value of Kv may be inserted into the following equation to yield a value for Ψ mag : Ψ mag = (2/3) (2/ P ) Kv For simplified determinations of the stator inductances Ld and Lq the following procedure may be employed. First, the stator resistance, Rs, is measured. This is done by applying a small amount of DC voltage, Vi, into the motor and measuring the resulting current, Ii. Rs is equal to Vi/Ii. Next, a three-phase step current is injected into the q-axis at zero speed and the rise time, Trq, is measured. Once Rs and Trq are known, Lq may be calculated from the equation; Lq = TrqRs Similarly, a three-phase step current may be injected into the d-axis at zero speed and the rise time, Trd, measured. Ld is given by: Ld = TrdRs For more precise determinations of Ψ mag , Ld and Lq, the following equations may be used: Lq = Lqo(a+1)/(a+k) Ld = Ldo(b+1)/(b+k) Ψmag = Ψmago(c+1)/(c+k) Where Lqo is the q-axis self inductance at rated stator current Ldo is the d-axis self inductance at rated stator current Ψ mago is the peak flux linkage at rated stator current a, b and c are constants determined by the saturation characteristics of the motor k = Is/Iso Iso is the rated stator current Is is the actual stator current To determine the value of constants a, b and c, Ld and Lq are each measured at two or more stator current values. Preferably, Ld and Lq are measured at the rated stator current and at three times the rated stator current (k=3). If at the rated current, a value of Lqo is obtained for Lq, and at three times the rated current a value of Lql is obtained for Lq, then a is given by: a = (kLq1 - Lqo) / (Lqo - Lq1) Similarly, b will be given by: b = (kLd1 - Ldo) / (Ldo - Ld1) The value c=b, since c and b relate to the same d-axis flux path. Ψmago is given from Kv, as in the simplified calculation. Fig. 9 depicts a circuit that may be used to measure the q-axis and d-axis inductances at various stator currents. In the circuit, each phase winding (A, B and C) of a three-phase motor 95 is coupled to a DC power supply 96. A three-phase contactor 97 is coupled between the motor 95 and power supply 96 for the purpose of short-circuiting the three-phase lines. A shunt resistor 98 is connected in the phase A line of the motor for the purpose of facilitating oscilloscope measurement. The circuit may be used to implement the following method of measuring Lq and Ld. The q-axis inductance, Lq, is measured first. To measure the q-axis inductance, the positive terminal of the DC power supply is connected to the phase B winding of the motor, and the negative terminal of the DC power supply is connected to the phase C winding of the motor. The A winding of the motor is allowed to float, and the motor shaft is allowed to rotate freely. After the foregoing preparation have been made, the DC power supply is turned on and the output voltage is increased until the output current reachtes about 1/4 of the rated stator current. The motor shaft should be allowed to settle into a stable position, and once stabilized, the shaft should be locked. Next, the phase A winding is connected to the positive terminal of the DC power supply, and both the B and C windings are connected to the negative terminal of the DC power supply. The DC supply voltage is increased until the DC supply output current reaches a desired level. Preferably, the supply voltage is increased to a level at which the A winding current is 1.41 times the rated stator current (rms).When the DC output current reaches the desired level, the three-phase contactor is activated and the decay time of the output current is measured. The decay time is defined as the amount of time it takes the output current to change from the desired level to 37% of the desired level.Finally, Lq is calculated by multiplying the decay time by the phase resistance of the motor. Of course, the closure of the contactor must be free of chatter to obtain an accurate value for the decay time. To measure the d-axis inductance, Ld, the contactor is deactivated and the shaft is unlocked. Next, the phase A current is set to 1/4 of the rated stator current, and the motor shaft is allowed to settle into a stable position and then locked. At this point, the Ld measurement proceeds in the same manner as the Lq measurement. That is, the A winding is connected to the positive terminal of the DC power supply, and both the B and C windings are connected to the negative terminal of the DC power supply. The DC supply voltage is increased until the DC supply output current reaches a desired level. Preferably, the supply voltage is increased to a level at which the A winding current is 1.41 times the rated stator curent (rms). When the DC output current reaches the desired level, the three-phase contactor is activated and the decay time of the output current is measured. Finally, Ld is calculated by multiplying the decay time by the phase resistance of the motor. Thus, the required motor parameters and drive parameters are measured and set up during initialization and then used to calculate the advance angle according to the dynamic parameters of rotor speed and stator current while the motor is in operation. An exemplary angle advance calculation procedure and an exemplary angle advance application procedure are shown in the flowcharts of Figs. 10A and 10B, respectively. The examples are meant to be used with the embodiment shown in Figs. 1, 2 and 3. Fig. 10A is a flowchart that shows the steps taken to calculate the angle advance. Fig. 10B shows the steps taken in applying the angle advance calculated according to Fig. 10A using the look-up table approach. In this particular procedure, the calculation of the angle advance is performed once every "servo interrupt" period, or 500 µsec, while the angle advance is applied once every "commutation interrupt" period, or 125 µsec. Referring to Fig. 10A, the first step in calculating the angle advance is to read the rotor speed (step 102 ). Next, the speed advance is calculated, assuming that the motor is in motoring mode (step 104 ), e.g., through a look-up table of speed vs. speed advance for motoring mode such as shown in Fig. 7B. The third step is to read the absolute value of the current feedback that is sensed by current sensor 71 of Fig. 3 (step 106 ). The fourth step is to calculate the load advance (step 108 ), e.g., through a look-up table of current vs. load advance, such as shown in Fig. 7A. Next, the value of the torque command is compared to zero (step 110 ). If the torque command is less than zero, the sign in the torque command is inverted (step 112 ). If the torque command is greater than or equal to zero, step 112 is bypassed. The net effect of steps 110 and 112 is to determine the absolute value of the torque command. After taking the absolute value of the torque command, a determination of the motor's operating mode is made (step 114 ). If the motor is in the generating mode, then the speed advance must be calculated (step 116 ) since the initial speed advance calculation assumed that the motor was in the motoring mode. If the motor is indeed in the motoring mode, then step 116 is bypassed. In the next step, the torque command is, again, compared to zero (step 118 ). If the torque command is greater than zero, then the angle advance is computed by adding the load advance, speed advance, and 180° (step 120 ). If the torque command is less than or equal to zero, then the angle advance is computed by adding the speed advance and load advance (step 122 ). At this point, calculation of the angle advance is complete (step 124 ). Fig. 10B shows the steps taken in applying the angle advance. First, the present rotor angle is read (step 132 ). Second, the electrical angle is set equal to rotor angle times the pole pair (step 134 ). Third, the stator angle is set equal to rotor angle plus the angle advance plus 90°. Finally, the stator angle is written to the sine tables 48 and 52 (Fig. 2) for conversion to an amplitude value (step 138 ). At this point, the application of the angle advance is complete (step 140 ). In an adaptive operation, the motor parameters and drive parameters are established in an initialing step. Equation B.13 is calculated in step 104 and equation B.8 is calculated in step 108 . Otherwise, the flow diagrams in Figs. 10A and 10B are the same. Several embodiments for the invention have been described in detail. However, it should be obvious that there are many further variations evident to persons skilled in the art. For example, the motor may be a moving permanent magnet linear motor rather than a rotary motor. Also, many components described in hardware could be in software operating in a microprocessor. The invention is more clearly defined in the appended claims.

Claims: A controller for a brushless motor (20) including a permanent magnet rotor and a stator winding, comprising a) means (30) for generating a position feedback signal indicative of the rotor position relative to the stator; b) means (30) for generating a velocity feedback signal indicative of the rotor velocity; c) means (71) for providing a stator current feedback signal indicative of the current supplied to the stator winding; d) means for indicating measured values of motor parameters (10); e) means for indicating measured values of controller parameters (11), characterized in that it further comprises f) means for computing a maximum torque angle advance (34, 46) according to said measured motor and controller parameters and as a function of said rotor position feedback signal, said velocity feedback signal and said stator current feedback signal; and g) means for generating a sinusoidal excitation (24, 34) for the stator winding having a frequency according to said velocity feedback and a phase according to said maximum torque angle advance. The controller of claim 1 wherein said motor parameters include the number of poles, the back emf constant, and the stator inductance for the motor. The controller of claims 1 or 2 wherein said controller parameters include the controller bandpass, the available link voltage, and the loop time delay. The controller of claim 1 wherein said permanent magnets are embedded in said rotor and wherein said maximum torque angle advance varies as a function of rotor velocity and stator current. The controller of claim 1 wherein said permanent magnets are surface mounted in said rotor and wherein said maximum torque angle advance varies as a function of rotor velocity. A method for controlling a brushless motor (20) including a permanent magnet rotor and a stator winding, comprising the steps of a) generating a position feedback signal (12) indicative of the rotor position relative to the stator; b) generating a velocity feedback signal (13) indicative of the rotor velocity; c) providing a stator current feedback signal (71) indicative of the current supplied to the stator winding; d) indicating measured values of motor parameters (10); e) indicating measured values of controller parameters; (11); characterized in that it comprises the further steps of f) computing a maximum torque angle advance (46, 34) according to said measured motor and controller parameters and as a function of said rotor position feedback signal and said velocity feedback signal; and g) generating a sinusoidal excitation (24, 48, 50, 52) for the stator winding having a frequency according to said velocity feedback and a phase according to said maximum torque angle advance. The method of claim 6 wherein said motor parameters include the number of poles, the back emf constant, and the stator inductance for the motor. The method of claims 6 or 7 wherein said controller parameters include the controller bandpass, the available link voltage, and the loop time delay. The method of claim 6 wherein said permanent magnets are embedded in said rotor and wherein said maximum torque angle advance varies as a function of rotor velocity and stator current. The method of claim 6 wherein said permanent magnets are surface mounted in said rotor and wherein said maximum torque angle advance varies as a function of rotor velocity. The method for controlling a brushless motor of claim 6 wherein said maximum torque angle advance is computed according to said measured motor and controller parameters as a function of said velocity feedback signal and of said stator current feedback signal. A method of compiling a look-up table providing maximum torque angle advance values for controlling the phase of the sinusoidal excitation for a brushless motor with rotating permanent magnets and a stator winding, comprising the steps of a) measuring motor parameters including the number of poles, the back emf constant, and the stator inductance for the motor; b) measuring controller parameters including the controller bandpass, the available link voltage, and the loop time delay; characterized in that phase advance values are calculated according to said measured parameters as a function of rotor velocity; and the phase of the sinusoidal excitation is set according to said phase advance values corresponding to the rotor velocity. The method of claim 12 for compiling a look-up table wherein the phase of the sinusoidal excitation is set according to said phase advance values corresponding to the rotor velocity and stator current. A controller for a brushless motor (20) including a moving permanent magnet arrangement and a winding arrangement movable with respect to each other, comprising a) means for generating a position feedback signal indicative of the position of the permanent magnet arrangement relative to the winding arrangement; b) means (30) for generating a velocity feedback signal indicative of the velocity of the permanent magnet arrangement relative to the winding arrangement; c) means (71) for providing a winding arrangement current feedback signal indicative of the current supplied to the winding; d) means for indicating measured values of motor parameters (10); e) means for indicating measured values of controller parameters (11), characterized in that it further comprises f) means for computing maximum torque angle advance (74, 46) according to said measured motor and controller parameters and as a function of said permanent magnet arrangement position feedback signal, said velocity feedback signal and said winding current feedback signal; and g) means for generating a sinusoidal excitation (24), (34) for said winding having a frequency according to said velocity feedback and a phase according to said maximum torque angle advance.

Inventors: CHAVA VENKATESH BABU, OHM DAL YONG, CHAVA, VENKATESH BABU, OHM, DAL YONG
Applicants: KOLLMORGEN CORP, KOLLMORGEN CORPORATION
Application year: 1996
Main classification: H02P6
IPC codes: H02P6