Method of determining an angular offset of a position sensor

11303237 · 2022-04-12

Assignee

Inventors

Cpc classification

International classification

Abstract

A method of determining an offset between an angular position indicated by a rotary position sensor assembly secured directly or indirectly to the rotor of a multi-phase permanent magnet AC motor and an actual electrical position of the motor rotor, includes the steps of: applying a voltage vector to the motor, which is aligned with a known angular position of the motor; waiting for the motor rotor to move to a location in which the vector when considered in the dq frame of reference is centered on the d-axis; measuring the angular position of the rotor indicated by the position sensor, and determining the offset from the difference between the measured angular position and the known actual position of the vector.

Claims

1. A method of determining an offset between an angular position indicated by a rotary position sensor assembly secured directly or indirectly to a motor rotor of a multi-phase permanent magnet AC motor and an actual electrical position of the motor rotor, the motor comprising a plurality of phases, the method comprising the steps of: applying a vector to the motor, which is aligned with a known angular position of the motor, and that alternates between a first value in which the vector is slightly advanced of the known position and a second position in which the vector is slightly behind the known position so as to cause the motor rotor to dither back and forth across the known position; waiting for the motor rotor to move to a location in which the vector when considered in a dq frame of reference is centered on a d-axis; measuring the angular position of the rotor indicated by the position sensor; determining the offset from the difference between the measured angular position and the known actual position of the vector; and controlling an actuator comprising the motor based on the determined offset.

2. The method of claim 1, further comprising the step of selecting a vector which is aligned with a first one of the motor phases corresponding to zero degrees electrical of the motor.

3. The method of claim 2 further comprising the step of applying a vector that is fixed in position relative to the motor stator during the measurement time and aligned with the one phase, so that current only flows in through one phase and flows equally out of the other phases of the motor.

4. The method of claim 3 when used with a three phase motor with phases A, B and C, the method further comprising the steps of: applying values of A+B and A+C vector respectively for fixed alternate time intervals to cause the rotor to dither about an angular position centred on Phase A; determining the angular centre position about which the rotor dithers and determining the offset between that position and the actual position.

5. The method of claim 4 wherein the centre position is derived by determining the average position of the rotor from the varying output of the angular position sensor.

6. The method of claim 5 further comprising the steps of: at a later time applying a vector aligned with a second, different, known angular position on the motor stator; waiting for the motor rotor to move to a location in which the vector when considered in the dq frame of reference is centered on the d-axis; measuring the angular position of the rotor indicated by the position sensor; and determining the offset from the difference between the measured angular position and the known actual centre position of the second vector.

7. The method of claim 6 further comprising the step of: applying vectors that have known positions that change in a sequence that moves in a single direction around the stator over time such that the change of vector position causes the rotor to follow the vectors around the stator and step through a range of electrical positions that are increasingly offset both electrically and mechanically from the start position set by the first vector.

8. The method of claim 7 further comprising the step of: repeatedly moving the vector and taking position measurements until the rotor has moved by one full mechanical revolution, and taking an average of the estimates to produce an overall estimate of the offset.

9. The method of claim 8 further comprising the step of: for each estimate obtained from each fixed or dithered vector position, performing a check that an estimated value does not deviate from any other estimated value by an amount greater than a set threshold, and in the event that it does raising an error flag.

10. The method of claim 9 further comprising the step of: generating a rotating αβ frame vector, before any estimate are made, that will cause the rotor to rotate through one continuous mechanical revolution and during the rotation measuring the angular position of the rotor, whereby, in the event that the angular position does not indicate that the rotor has moved through one full mechanical revolution, the method determines that the motor rotor has hit an endstop, and, only in that event, subsequently generating a rotating αβ frame vector that will cause the rotor to rotate through an angle greater than or equal to one continuous mechanical revolution in the opposite direction and permitting the rotor to move to follow the vector.

11. A method according to claim 10, wherein the vectors are pulse width modulated voltages.

12. A linear actuator comprising: a motor having a rotor; a mechanical arrangement which converts rotation of the rotor into a linear translation of an output part, the range of movement of the rotor being limited by the allowable range of movement of the linear part; a rotary position sensor assembly fixed to the rotor; and a signal processing unit arranged in use to determine an offset between an angular position indicated by the rotary position sensor assembly and an actual electrical position of the motor rotor by carrying out the steps of the method of any preceding claim.

Description

BRIEF DESCRIPTION OF THE DRAWINGS

(1) There will now be described by way of example only, one embodiment of the present disclosure with reference to and as illustrated in the accompanying drawings of which:

(2) FIG. 1 is a schematic of a typical rotary angular position sensor that may be used in a method of the present disclosure;

(3) FIG. 2 is a plan view of a permanent magnet AC synchronous motor in which the rotor is in equilibrium aligned with a vector aligned with Phase A;

(4) FIG. 3 is a corresponding plan view of the motor of FIG. 2 in which the motor rotor is not in equilibrium;

(5) FIG. 4 is a circuit diagram showing the currents flowing in a bridge that will provide the vector used in the motor in FIG. 2 to keep the motor rotor aligned with Phase A;

(6) FIG. 5 represents the three phase AC waveforms applied to the motor of FIG. 2;

(7) FIG. 6 is a transform into a two coordinate frame fixed with reference to the stator;

(8) FIG. 7 is a further transform into a two coordinate frame fixed with reference to the motor rotor;

(9) FIG. 8 illustrates how a dither of the vector used in the method of the first example can be applied by adding small currents to the B and C phases;

(10) FIG. 9 illustrates how a dither of the vector used in the method of the first example can be applied by adding small currents to the B and C phases;

(11) FIG. 10 shows the steps of a second exemplary method which applies a dither of one cycle per estimate;

(12) FIG. 11 shows a modification to the second exemplary method which applies a dither of four cycles per estimate;

(13) FIG. 12 shows the steps that may be performed prior to carrying out the first or second exemplary method when the motor rotor hits an end stop in a positive direction (i.e. in the direction around which the rotor is moved during the sequence of measurements);

(14) FIG. 13 shows the steps that may be performed prior to carrying out the first or second exemplary method when the motor rotor hits an end stop in a negative direction (i.e. in the opposite direction to which the rotor is moved during the sequence of measurements); and

(15) FIG. 14 illustrates how a phase imbalance between phases B and C will produce slightly different vector positions compared with the ideal case that may lead to a measurement error; and

(16) FIG. 15 illustrates how a phase imbalance between phases B and C will produce slightly different vector positions compared with the ideal case that may lead to a measurement error.

DETAILED DESCRIPTION

(17) A typical rotary position sensor assembly is shown schematically in FIG. 1 of the drawings. The sensor assembly 10 is suitable for measuring the angular position of any object that rotates around a fixed axis, for example the rotor of a motor or rotor of a rotary or linear actuator. This kind of position sensor is sometimes referred to as a rotary encoder. The sensor assembly 10 converts movement of the rotor into a changing output signal or signals, the pattern of change or the instantaneous values of the output signal or signals providing a measure of the angular position. Depending on the configuration of the position sensor, this output may provide an unambiguous position measurement over only part of a rotation of the rotor, or a whole rotation, or over a number of rotations.

(18) The sensor assembly 10 comprises one or more sensors 12, in this example two optical photodetectors. A target in the form of a disk 14 having an annular track of alternating transparent and opaque regions, and a light source 16. The light source and sensor are on opposite sides of the disk. The sensors 12 each produce an output signal that has one value when the disk is aligned with a transparent region between the light source and the sensor, and a second value when there is an opaque region between the light source and the sensor. The output signal may be processed to produce an angular position signal.

(19) By fixing the disk 14 to a rotor of a motor, for example, continuous rotation of the rotor in one direction will cause each of the transparent regions to move across the sensor, causing the sensor output to vary between the first and second values over time with a period dependent on the speed of rotation of the rotor. By counting the changes in value, the position of the rotor can be tracked. Using two sensors as shown each of which is offset by one half of the width of the transparent regions, the direction of rotation can also be determined from the pattern of changes of the signals.

(20) The relative angular position of the sensor target disk and the rotor are important. Typically the position measurement output from the sensor will be used to control the position of the rotor, and it is not always possible to ensure that the relative angular positions are consistent during assembly. A measurement of 0 degrees output from the rotary angular position sensor may not correspond precisely with an actual 0 degrees of the rotor where the rotor is part of an electric motor. Since the rotor 0 degrees must be known precisely for motor control in many cases, it is essential to be able to determine the offset during manufacture or in subsequent calibration.

(21) To understand how the method of the present disclosure determines the offset, it is helpful first to summarise the concept of vector control of a three phase (or higher number of phase) AC multi-phase permanent magnet motor. FIGS. 2 and 3 show schematically a typical motor 20 which can be controlled using a vector control strategy. The motor comprises a rotor 22 carrying a set of rotor magnets 24 whose poles alternate around the circumference of the rotor. The motor also includes a stator 26 which has a set of stator teeth 28 around which coils of electrically conductive wire are turned. These coils are connected together to form three phases A, B and C although conventionally the voltages in each phase will be denoted by the suffixes u, v and w. Each of the phases is 120 degrees electrical apart. There will typically be N electrical cycles per mechanical revolution for an N pole pair rotor.

(22) A sinusoidal voltage waveform is applied to each phase, with each sinusoid offset from the others by 120 degrees. This is shown in FIG. 5. These waveforms can be synthesized from a DC voltage source such as a battery, making this type of motor especially suitable for use in an automotive application. As shown in FIG. 6, the three voltage waveforms and be reduced to a 2 coordinate reference system fixed to the stator frame using the following transform:

(23) [ i α ( t ) i β ( t ) ] = 2 3 [ 1 0 0 0 3 / 2 - 3 / 2 ] [ i U ( t ) i V ( t ) i W ( t ) ]

(24) Stator reference frame (αβ) can also be transformed as shown in FIG. 7 so that the phase quantities are 2 orthogonal vectors, synchronised to the rotor, in a so called dq frame of reference. The q (quadrature) axis vector is aligned with the rotor back-emf. The d (direct) axis vector is aligned with the rotor magnetic flux. Applying current to the q axis generates motor torque. With the rotor aligned with the d axis vector there is no torque generated:

(25) [ i d ( t ) i q ( t ) ] = e - j θ ( t ) [ i α ( t ) i β ( t ) ] = [ cos ( θ ) sin ( θ ) - sin ( θ ) cos ( θ ) ] [ i α ( t ) i β ( t ) ]

(26) During normal operation of the motor, it is desirable to align the vector with the q axis to generate a torque to turn the motor without wasting energy.

(27) In FIG. 2, the rotor is positioned where current flowing into phase A and out of the two other phases will generate a vector in the dq frame which is aligned with the d axis, so the rotor is in equilibrium and will not be subjected to any torque that will cause it to rotate. On the other hand, the rotor in FIG. 3 is positioned so that the vector is on the q-axis when current flows into phase A and out of the other two phases, which will cause the rotor to rotate towards the position of FIG. 2.

(28) The phases A, B, and C may be connected in a bridge as shown in FIG. 4. Driving the switches of the bridge using conventional PWM techniques enables a sinusoidal or DC current to flow in each phase.

(29) The applicant has appreciated that by generating a vector that is at a fixed position in the Stator reference frame (αβ) and allowing the rotor to move freely until it is aligned with the vector in the dq frame, so that the dq vector is lying on the d axis, can be used to move the rotor to a known angular position from which an estimate of the offset of a position sensor can be determined.

(30) First Exemplary Method: In a first implementation of a method of learning the offset of a position sensor, the position offset is estimated by fixing the motor position to 0 degrees electrical. Typically this corresponds to the location of the A phase and to achieve the required d-axis vector the current will flow into the A phase and out of both of the B and C phases equally. FIG. 4 shows such a voltage pattern (note that u, v, and w correspond to phases A, B, and C). This produces a vector that does not produce any torque component that will tend to cause the motor rotor to rotate, provided the rotor is at the zero position. If the motor rotor is not initially at the zero position, this vector will produce a torque component causing the motor to rotate until it aligns at the 0 degrees position where the vector lies on the d axis only. The position reading from the position sensor can then be used as the position offset value.

(31) This process may be performed as many times as there are different electrical rotations within each mechanical rotation of the motor so that the offset is calculated at each electrical cycle over one whole mechanical revolution and the average used as the position offset. This is done to take account any first order effects from the position sensor and any characteristics of the motor itself. Within each electrical rotation, the different phases current can be energized in sequence to both rotate the motor and stop at additional known electrical positions. Within the upper graph of FIG. 11, three separate discrete positions can be seen, each 120 electrical degrees apart within one mechanical revolution of a 5 pole pair motor.

(32) Second Exemplary Method: In a refinement, rather than applying a fixed vector that lies on the d axis when the rotor is at 0 degrees, a small dither is applied to the vector that causes the vector to move backwards and forwards across the 0 degrees position. This movement is then measured by observing the output of the position sensor over time and taking the mean position value, which will correspond to the centre of the range of movement, to provide the offset measurement. The applicant has appreciated that the use of a dither will help to mitigate against friction due to constant motion/torque and correct bias seen in existing algorithm due to only approaching the D axis from one direction.

(33) The vector dither is generated by alternating between adding a small +B and +C vector to the +A vector, assuming that Phase A corresponds to the zero position. The vector length should be proportional to +A vector to ensure the dithered vector angle is always the same. FIGS. 8 and 9 show how the small offsets can be applied by controlling the current applied to each phase, and the resulting vector in the stator reference frame.

(34) Again, this can be repeated for every electrical cycle over a complete mechanical revolution of the motor. FIGS. 10 and 11 show the movement of the rotor around a complete mechanical revolution during a sequence of vectors which have one dither per measurement and four dithers per measurement respectively. In each case, the current primarily flows into the A phase and out of the other two phases.

(35) OFFSET LEARN FOR END STOP: The first and second exemplary methods require the motor to be stepped around a complete mechanical revolution to perform the required position measurements. This will not be possible if the rotor is positioned at or within one mechanical revolution of an end stop at the start of the test.

(36) To allow for this, the method may perform for a five pole pair motor the following steps shown in FIG. 12:

(37) 0: Initial motor position at start of offset learn sequence

(38) 1: Motor position set to 0 and +A phase voltage vector applied. If near the endstop the motor may move towards the endstop. Motor position then rotated in a negative direction over 1 revolution. Even if near endstop this will move the motor away to D axis position 0.

(39) 2-6: Repeat motor rotation for 5 more electrical revolutions—the motor moves away from endstop leaving room for offset learn procedure.

(40) 7: Move forward one revolution and learn 1st offset.

(41) 8-11: Repeat step 7 for next 4 revolutions and calculate offset.

(42) If the motor is positioned at or within one revolution of the opposite end stop, the following steps shown in FIG. 13 may be performed:

(43) Sequence: 0: Initial motor position at start of offset learn sequence

(44) 1: Motor position set to 0 and voltage vector applied. Rotate motor one revolution in negative direction. Motor moves to D axis 0 position.

(45) 2: Repeat step 1.

(46) 3: Repeat again. In this case we hit and jam against the endstop as cannot reach position 0. This is detected by seeing the position sensor not recording a full revolution rotated.

(47) 4: Move forward one revolution. Successfully moves to position 0. Learn first offset.

(48) 5-8 Repeat step 4 for the next 4 revolutions and calculate offset.

(49) Third Exemplary Method: The method of the first and second examples only take measurements at 0 degrees electrical and take averages. In the event that the motor phase resistances are imbalanced, this may not produce a completely accurate estimate. For example, if the resistance of phase B is higher than phase C if there is an imbalance of resistance between the motor phases which might cause a deviation in the motor position.

(50) A typical motor specification may allow for up to 5% difference in resistance between motor phases. This phase imbalance will not cause a difference in the true motor position offset/alignment but it will instead result in torque ripple. In the method of the first and second examples, the position sensor alignment is achieved by energising phase A to move the rotor to a point at which there is no net torque. This means current flow in through phase A and then evenly through phases B and C. A resistive imbalance between phases B and C will result in different current flow across these phases which would affect the final motor position. This can be seen in FIGS. 14 and 15.

(51) If the position offset is calculated for all three phases instead of just phase A, the resistance imbalance will be cancelled out.

(52) A specific implementation of the method in accordance with an aspect of the disclosure which compensates for such an imbalance is set out below. As with the first and second examples, this method is designed for a 3 phase AC motor having 10 poles, and hence 5 electrical revolutions per each full mechanical revolution of the motor rotor giving a total of 15 possible positions at which the rotor is aligned with one of the three phases. In the following, the three phases are denoted Phase A, Phase B and Phase C, each offset by 120 degrees electrical and with Phase A corresponding to the 0 degrees electrical position. The method can be readily modified for other motor topologies.

(53) The method steps are as follows:

(54) START: Step 1: Override position sensor and set motor position signal used for motor control to 0 degrees.

(55) Step 2: Apply open loop D axis voltage demand sufficient to cause the motor to rotate close to real position of 0 degrees.

(56) The following steps 3 and 4 are then performed in order to MOVE the MOTOR TO a SAFE POSITION AND DETECT ENDSTOPS:

(57) Step 3: Wait for period of time for motor position to settle.

(58) Step 4: Rotate the motor position signal used for motor control in a negative direction until the motor has rotated over one mechanical revolution. After each electrical revolution has been seen and the motor position wraps back to 0 check the signal from the position sensor. If this does not show the same value within a tolerance as at the start of the last electrical revolution and has not moved >180 electrical degrees over the last revolution assume an endstop has been hit and go to step 5.

(59) Once the end stop position has been learnt, the following step may be carried out to MOVE the MOTOR FORWARDS READY TO BEGIN OFFSET LEARN

(60) Step 5: Now rotate the position vector forward until 2 electrical revolutions have been completed.

(61) Now the motor is in a correct position the following steps 6 to 12 are performed to LEARN the motor position OFFSET:

(62) Step 6: Apply alternate PWM pattern. Increase D axis voltage demand from initial value used to move motor to safe position at start of the sequence. PWM pattern has fixed length +A vector with also a small +B or +C vector. Pattern will alternate between +A+B to +A+C vector at fixed time intervals. Applying the current in through one phase, in this case Phase A, and out of the other two will cause the rotor to move and stop in a position where no torque is available i.e. a d-axis position.

(63) Applying mainly one vector, with small contributions from the other two will cause the rotor to dither about a point which is the angular position corresponding to 0 degrees for Phase A. The method of dithering about a point is advantageous as it means the correct d-axis position can be located, rather than the point at which the alignment torque matched the friction torque. To avoid dead time issues no motor phase should switch at the same time as the other. Without this step, the dead time would add/subtract from the vectors applied. Offsets would result which may be acceptable in some cases but not if greater accuracy is required.

(64) Step 7: Wait until motor has completed one +A+B sequence and one +A+C sequence.

(65) Step 8: Start sampling and filtering the motor position. Continue until several more +A+B, +A+C switching sequences have completed. Repeat the process several times to obtain an average, and to get the rotor going through the d-axis position, rather than stopping on one side of it.

(66) Step 9: Save the filtered motor position value. Remove the offset depending on which physical motor phase the position was sampled. (Phase A=0, phase B=120 and phase C=240 degrees).

(67) Step 10: Change the PWM pattern so the switching pattern appropriate to next phase is applied. For example, to apply the +B vector, in FIG. 4, switches S2, S4 and S6 would be turned on. Applying the vector corresponding to the next phase results in the motor position moving 120 electrical degrees forward. So instead of large +A vector with smaller +B/C vectors, pattern will be large +B with smaller +A/C vectors, then large +C+A, +C+B. Through cycling through the phases, we get 3 chances (for a 3 phase system) to check the alignment in each electrical cycle, and 3×pole-pairs in a mechanical revolution e.g. for a 12-slot, 10 pole motor, 15 times per mechanical revolution.

(68) Step 11: Go back to step 7 and repeat until 3×number of motor pole pairs measurements have been taken. This indicates the motor has turned a full mechanical revolution.

(69) Step 12: Remove D axis voltage demand and restore normal pwm operation.

(70) Finally, an optional CHECK of the RESULTS may be performed by the following two steps:

(71) Step 13: For each saved position offset value check each value does not deviate from any other by>set threshold which would indicate a problem with the offset learn. The check can also be used to identify a problem with the motor, drive stage, or connected load and therefore used for diagnostic purposes.

(72) Step 14: Save position offset as average of the samples taken.

(73) The method of the disclosure may be used to carry out offset measurement for rotary position sensors in a range of applications where the rotary position sensor is secured to the rotor of a suitable motor or to a part which rotates with the rotor of the motor.

(74) The skilled person will understand that the examples given in this description are merely representative and can be varied within the scope of the disclosure.