Phase estimation method and apparatus therefor
09689717 ยท 2017-06-27
Assignee
Inventors
Cpc classification
International classification
Abstract
Phase estimation apparatus processes sensor signals from sensors to estimate a phase of a periodically varying state of an object, such as position of a moving object. A phase estimation processor applies a first correlation calculation to simultaneously collected samples of the sensor signals to generate first quadrature values, where the first correlation calculation employs variable calculation values, and applies a phase calculation to the first quadrature values to generate the phase estimation. A pre-quadrature calibration circuit applies respective second correlation calculations to respective sequences of samples of the sensor signals individually to generate second quadrature values for each of the sensor signals, and applies phase and/or magnitude calculations to the sets of second quadrature values to generate the variable calculation values for the first correlation calculation, thereby compensate for the error component and improve accuracy of the estimated phase.
Claims
1. Apparatus for estimating phase by processing sensor signals from a set of sensors, the sensor signals collectively conveying a sensed phase for a periodically varying state of an object, the sensed phase including an error component due to non-ideal arrangement or performance of the sensors, comprising: a phase estimation processor operative to (1) apply a first correlation calculation to simultaneously collected samples of the sensor signals to generate first quadrature values for the sensor signals as a set, the first correlation calculation employing variable calculation values, and (2) apply a phase calculation to the first quadrature values to generate an estimated phase indicative of the periodically varying state of the object; and a pre-quadrature calibration circuit operative to (1) apply second correlation calculations to respective sequences of samples of the sensor signals individually to generate respective sets of second quadrature values for each of the sensor signals, (2) apply phase and/or magnitude calculations to the sets of second quadrature values to generate the variable calculation values for the first correlation calculation and thereby compensate for the error component and improve accuracy of the estimated phase, wherein the pre-quadrature calibration circuit is further operative to record successive sets of samples into digital memory along with respective estimated phases of the periodically varying state of the object when the respective sets were generated, and to select from among the recorded samples to form the sequences of samples used in the second correlation calculations to generate the sets of second quadrature values to which the phase and/or magnitude calculations are applied, recorded samples being selected at different phase points over one period of the sensor signal as indicated by respective stored estimated phases.
2. The apparatus of claim 1, wherein the phase and/or magnitude calculations include calculating gain and offset coefficients for the sensor signals, the gain and offset coefficients forming part or all of the variable calculation values, and wherein applying the phase and/or magnitude calculations includes applying gain and offset corrections to the samples of the sensor signals according to the gain and offset coefficients, thereby generating calibrated sensor signal samples used in the first correlation calculation.
3. The apparatus of claim 1, wherein the phase and/or magnitude calculations include (1) calculating relative phases of the sensor signals, and (2) using the calculated relative phases to generate first weights, said weights defining first reference sinusoids and forming part or all of the variable calculation values used in the first correlation calculation.
4. The apparatus of claim 1, wherein the phase calculation is part of a phase vector conversion generating the estimated phase as well as an estimated magnitude, and wherein the phase estimation processor includes a post-quadrature calibration circuit operative to (1) apply an ideal template to the estimated magnitude and phase to generate corresponding calibration coefficients, and (2) apply corrections to the first quadrature values according to the calibration coefficients for use in the phase vector conversion thereby further compensating for the error component and further improving accuracy of the estimated phase.
5. The apparatus of claim 1, wherein the object is a rotating magnet and the sensors are magnetic sensors arranged thereabout, and wherein the periodically varying state is an angular position of the rotating magnet about an axis of rotation.
6. The apparatus of claim 5, wherein the rotating magnet is a rotor in a motor.
7. A position encoder for generating a position signal indicative of a position of an object using the phase estimation apparatus of claim 1, comprising: a set of sensors operative to convert a position-indicating pattern of energy generated at least partly by the object into corresponding sensor signals; and the apparatus of claim 1 operating upon the sensor signals to generate the estimated phase as the position signal.
8. A method for phase estimation, comprising: receiving sensor signals from a set of sensors, the sensor signals collectively conveying a sensed phase for a periodically varying state of an object, the sensed phase including an error component due to non-ideal arrangement or performance of the sensors; applying a first correlation calculation to simultaneously collected samples of the sensor signals to generate first quadrature values for the sensor signals as a set, the first correlation calculation employing variable calculation values; applying a phase calculation to the first quadrature values to generate an estimated phase indicative of the periodically varying state of the object; applying second correlation calculations to respective sequences of samples of the sensor signals individually to generate respective sets of second quadrature values for each of the sensor signals; applying phase and/or magnitude calculations to the sets of second quadrature values to generate the variable calculation values for the first correlation calculation and thereby compensate for the error component and improve accuracy of the estimated phase, and recording successive sets of samples into digital memory along with respective estimated phases of the periodically varying state of the object when the respective sets were generated, and selecting from among the recorded samples to form the sequences of samples used in the second correlation calculations to generate the sets of second quadrature values to which the phase and/or magnitude calculations are applied, recorded samples being selected at different phase points over one period of the sensor signal as indicated by respective stored estimated phases.
9. The method of claim 8, wherein the phase and/or magnitude calculations include calculating gain and offset coefficients for the sensor signals, the gain and offset coefficients forming part or all of the variable calculation values, and wherein applying the phase and/or magnitude calculations includes applying gain and offset corrections to the samples of the sensor signals according to the gain and offset coefficients, thereby generating calibrated sensor signal samples used in the first correlation calculation.
10. The method of claim 8, wherein the phase and/or magnitude calculations include (1) calculating relative phases of the sensor signals, and (2) using the calculated relative phases to generate first weights, said weights defining first reference sinusoids and forming part or all of the variable calculation values used in the first correlation calculation.
11. The method of claim 8, wherein the object is a rotating magnet and the sensors are magnetic sensors arranged thereabout, and wherein the periodically varying state is an angular position of the rotating magnet about an axis of rotation.
12. The method of claim 11, wherein the rotating magnet is a rotor in a motor.
13. A method of estimating position of an object using the method of claim 8, comprising: operating a set of sensors to convert a position-indicating pattern of energy generated at least partly by the object into corresponding sensor signals; and performing the method of claim 8 using the sensor signals from the sensors to generate the estimated phase as the estimated position of the object.
Description
BRIEF DESCRIPTION OF THE SEVERAL VIEWS OF THE DRAWING
(1) The foregoing and other objects, features and advantages of the invention will become apparent from the following description in conjunction with the accompanying drawings, in which reference characters refer to the same parts throughout the different views. The drawings are not necessarily to scale; emphasis has instead been placed upon illustrating the principles of the invention. Of the drawings:
(2)
(3)
(4)
(5)
(6)
DETAILED DESCRIPTION OF THE INVENTION
(7)
T()=A+B cos()(1)
where is the angular position around the perimeter of the disk relative to a pre-determined but arbitrary starting point, A is an offset and B is the amplitude of the cosine. In one embodiment, the angular period of the sinusoidal optical transmission function is 360 degrees or one full rotation; it may have different values in alternative embodiments.
(8) The rotary absolute encoder system 10 comprises M identical sensors 120, wherein M is an integer greater than or equal to 2 and typically greater than or equal to 3. In some embodiments M equals 4 or more. In the illustrated embodiment the sensors 120 may be semiconductor photo-detectors that are individually paired with a solid state light source (not illustrated) such as a light-emitting diode, the photo-detector and the light source being disposed on opposite faces of disk 110. As is well-known by those skilled in optical encoders, each paired light source and photo-detector will be disposed to illuminate an angular region of track 114 and to sense the light passing therethrough. The illuminated and sensed region of track 114 is, by design, commensurate with the size of the maximum transmissive region of area-modulated track 114. The electrical outputs from the sensors 120 are generally linearly related to the average light intensity reaching their photo-sensitive areas and thereby are related to the section of area-modulated track 114 that is positioned between the source and the photo-detector. Typically sensors 120 are distributed uniformly around the circumference of disk 110, although this uniform distribution may not be used in specific designs.
(9) It should be noted that the encoder system 10 discussed above is but one example of a once-per-revolution sinusoidal signal generator to which the apparatus and method of phase estimation described herein may be applied. In other embodiments, for example, the apparatus and method of phase estimation described herein may be applied to a magnetic encoder, wherein the physical state of a rotatable magnet is estimated from signals generated by magnetic field sensors such as Hall effect sensors. The rotating magnet may be the rotor of a motor, for example.
(10)
(11) The description below may alternatively refer to elements of the processing system 200 as steps or functions, as the diagram also generally represents a flow of processing and functions performed in the flow. As mentioned below, the processing system 200 may be implemented using programmed processing circuitry (e.g., a microprocessor) and specialized software or firmware, in which case the components of processing system 200 may correspond to modules or other organizational elements.
(12) The output signals from signal sources 120 form a measured signal set S210 comprising M individual signals S210-M, wherein the M signals relate to the M signal sources respectively.
(13) Signal set S210 takes the form of M, phase-shifted samples of the same sinusoidal signal. That is,
(14)
where the subscript, m, indicates the signal S is from the m.sup.th signal source 120 and .sub.m is the nominally constant phase shift associated with the m.sup.th signal source. For example, if phase is referenced to the signal source coming from an arbitrarily selected first sensor 120-1, then the signal source associated with another sensor 120 disposed on the disk diametrically opposed to said first sensor will have a phase shift, .sub.m, equal to radians.
(15) By design, sensors 120 are disposed such that measured signal set S210 is not fully redundant; that is, at least one member of the set comprises at least some data that are mathematically orthogonal to the data in the other members of the set. For example, taken collectively, the set contains data that is related to both sin() and cos(). This condition is met when any pair of signals in the set is neither in-phase nor 180 degrees out-of-phase. Complete non-redundancy occurs when there is at least one signal pair that is 90 degrees out-of-phase with each other.
(16) Signal set S210 is received by processing system 200 at the input to signal conditioner 210. Since each signal in set S210 originates from a unique analog sensor 120, signal conditioner 210, as is conventional in the art, typically contains parallel channels of amplifiers and filters to remove noise and match the signals in amplitude. Signal conditioner 210 further comprises one or more analog-to-digital converters. It is important that all of the signals in set S210 be sampled and digitized substantially simultaneously since any sample time difference will appear later as a variable phase-shift error in the measurement.
(17) In some systems, the underlying sensor system is unipolarthat is, the raw electrical signals do not take on both positive and negative values. For example, the optical encoder described in
(18) The output signal set S220 from signal conditioner 210 is the input for phase estimator 220. In typical embodiments the phase estimator is correlation-based. In general, for a continuous sinusoidal signal of magnitude R and instantaneous phase , a correlation phase estimator multiplies an input sinusoidal signal with both a reference sine and a reference cosine and integrates the two resulting product functions over one or more periods of the reference sinusoids. The two intermediate integration results are respectively proportional to the two quadrature components of the phase of the input sinusoid (relative to the phase of the reference sinusoids). That is, for an input signal of the form of equation (2), the intermediate results are equal to Rsin() and Rcos() respectively, where the bias (or offset) value, A, is automatically filtered out by the correlation process.
(19) Once these quadrature results are available it is easy to evaluate the magnitude and phase of the input signal using the well-known equations:
MAG=R=RSQRT[sin().sup.2+cos().sup.2]
=Arctan[sin()/cos()](3)
(20) In the exemplary phase estimation method the input signal is not continuous but, instead, comprises M discrete samples of a sinusoid wherein the sample points are distributed over 2. In this configuration the continuous-case integration process becomes a discrete summation process. Furthermore, in the typical embodiment of a discrete correlation phase estimator the M sample points are uniformly distributed. When this condition applies, the phase estimation process is described by the equation:
(21)
where the quadrature signal estimates y.sub.t and x.sub.t are the numerator and denominator summations of equation (4) and the subscript t has been added to indicate the result is but one of a series of sequential measurements, the measurements having been made at the t.sup.th instant.
(22) Referring now to
(23) PCP 221 comprises two sub processors; a sine estimator 222 and a cosine estimator 224. The two sub processors evaluate the numerator summation (y.sub.t) and the denominator summation (x.sub.t) of equation (4) respectively whilst phase vector converter 230 performs the arctangent evaluation required to extract the phase, .sub.t, from the ratio of equation (5). Phase vector converter 230 also estimates the magnitude R from the root-square-sum of the sine and cosine estimates, as shown in equations (3). As will be understood by those skilled in the signal processing art, a phase vector calculator typically does not literally estimate the arctangent of the ratio of the two quadrature values, as shown in equation (5), as that process is limited to a range of output values between /2 to +/2. Instead, the processor typically will use a full 2 range arctangent evaluation algorithm such as the well-known ATAN2 function.
(24) Each of these processors or sub processors may be implemented a variety of forms including non-programmed (hard-wired) hardware or more general-purpose processing hardware programmed with software or firmware in specifically configured arrangements of known computing apparatuses such as computers, microprocessors, programmable gate arrays or other digital electronic circuitry. Furthermore, the various processing steps have been divided into specific modules, processors, subsystem, or sub processors within processing system 200 for clarity only. In various embodiments the partitioning, arrangement and functional interactions may be different from what is described herein.
(25) The sine and cosine reference values used in equation (4) are constant weighting values applied to every set of signal samples, S.sub.t,m. As such, many (digital) correlation phase processors fix these weights in firmware or as software constants. Furthermore, it may be noted that the general process of taking multiple weighted sums from a single data set may be expressed mathematically as a matrix multiplication, as in:
(26)
where the signal vector {right arrow over (S.sub.t,m)} is the set of signal values S220 and the weights in the matrix are the sampled sine and cosine values shown in equation (4).
(27) It should be noted that the weighting values used in equation (4) are specific to processing M uniformly spaced samples of a sinusoid. In the more general case the weights are the normalized set of sines and cosines evaluated at the perhaps non-uniformly spaced sample points, for example, the .sub.m of equation (2).
(28) The two quadrature component outputs from PCP 221, x.sub.t and y.sub.t, are transferred to phase vector converter 230 where the conversions from x and y to a magnitude R and a phase .sub.t (
(29) As mentioned, processing system 200 may include one or both of calibration subsystems 240. As described below, processing system 200 may include a post-quadrature calibration subsystem 240A or a pre-quadrature calibration subsystem 240B, or processing system 200 may include both calibration subsystems.
(30) As shown in
(31) In the configuration illustrated in
X.sub.t=(x.sub.t+O.sub.x,t+P.sub.ty.sub.t)G.sub.x,t
Y.sub.t=(y.sub.t+O.sub.y,t)G.sub.y,t(7)
(note the difference between the variable x.sub.t and the multiplication sign x), where x.sub.t and y.sub.t are pre-calibration quadrature signals and X.sub.t and Y.sub.t are post-calibration quadrature signals. In this configuration the various calibration coefficients are incrementally adjusted to drive the magnitude [MAG in Equation (3)] of the phase vector to equal R.sub.NOM for all values of the phase .
(32)
(33) TABLE-US-00001 TABLE 1 Magnitude Sector >Unit Circle Radius <Unit Circle Radius From To Space Gain Offset Phase Gain Offset Phase 348.75 11.25 0 Gx = Gx 1 Ox = Ox 1 Gx = Gx + 1 Ox = Ox + 1 11.25 33.75 1 33.75 56.25 2 P = P 1 P = P + 1 56.25 78.75 3 78.75 101.25 4 Gy = Gy 1 Oy = Oy 1 Gy = Gy + 1 Oy = Oy + 1 101.25 125.75 5 123.75 146.25 6 P = P + 1 P = P 1 146.25 168.75 7 168.75 191.25 8 Gx = Gx 1 Ox = Ox + 1 Gx = Gx + 1 Ox = Ox 1 191.25 213.75 9 213.75 236.25 10 P = P 1 P = P + 1 236.25 258.75 11 258.75 281.25 12 Gy = Gy 1 Oy = Oy + 1 Gy = Gy + 1 Oy = Oy 1 281.25 303.75 13 303.75 326.25 14 P = P + 1 P = P 1 326.25 348.75 15
(34) The logical tests can be applied with a variety of rules. For example, the coefficient generator 235 may apply the tests each time a sample phase is recorded. Alternatively, in a preferred implementation, the tests are only applied if the current phase angle of the phasor is in a different quadrant than the phase value at which the last adjustment was made to the calibration coefficients. This preferred mode prevents the same correction from being applied over and over again when the underlying source is not moving relative to the detectors. Another alternative is to calibrate the system once, to accommodate manufacturing and/or initial set up effects, and then to lock those calibration values in for all future measurements (or at least until a recalibration command is applied). Remillard, in U.S. Pat. No. 6,897,435 (incorporated herein by reference), described this process in detail.
(35) Referring again to
(36) For clarity, but with no loss of generality intended, the pre-quadrature calibration subsystem 240B is described herein in the context of one exemplary embodiment using a minimal number (three) of sensors 120. The principles and method described here are in no way limited to this exemplary embodiment. The exemplary embodiment is an encoder similar to the one depicted in
(37) In this exemplary embodiment, the calibration coefficients S221 serve as weights used by the PCP 221, in which the digitized output of signal conditioner 210 (signal set S220) is processed by the sine estimator 222 and cosine estimator 224, which together implement the matrix multiplication
(38)
where the initial weights in the weight matrix will be recognized as the sine and cosine of 0, 120, and 240 degrees. The output of PCP 221 is transferred to phase vector converter 230, which converts the two quadrature values into magnitude S235M and phase S235P using the well-known formulae.
(39)
(40) The sampled signals are sent to two parallel processing channels. One channel comprises the previously described phase estimation process performed in correlation phase estimator 220. These steps are illustrated on the right hand side of the diagram as a matrix multiplication step 221 (corresponding to the PCP 221) and a phase vector conversion step 230 (corresponding to the phase vector calculator 230). This channel also includes a pre-quadrature calibration step 515 of removing signal gain and offset errors prior to performing matrix multiplication step 221. Also illustrated as part of this channel are the optional post-quadrature calibration steps (coefficient generation 235 and coefficient application 225). Some embodiments will preferably include both pre- and post-quadrature calibration processes. At each step of the process, the derived values maintain the identification number, ID, of the original data.
(41) The second, parallel channel illustrated in
(42) Optionally, signal buffering step 540 may be gated by a movement threshold test 538. If the underlying signal generator is not moving (or is moving slowly relative to the sample rate), then the signal samples at step 510 are substantially unchanging. Movement threshold test 538 freezes the contents of buffer 540 (i.e., it temporarily refrains from recording new samples) whenever the change in estimated signal generator position (as calculated in differencer 537) is less than a pre-determined (but optionally adaptable) threshold value, T. It may be noted that there is a delay between the movement of the signal generator and the calculated position change, which will result in some redundant signal values being loaded into the buffer when the signal generator stops and a loss of some usable signal samples when the signal generator starts moving. However, such effects simply reflect the fact that the signal calibration process operates most effectively when the signal generator is moving.
(43) In a general sense, the data in the signal buffer 540 can be thought of as a table with M+2 columns: M columns in which each column stores the output from one signal source over a preceding time period, one column storing the estimated signal generator position .sub.ID from phase vector converter 230, and one column for the ID tagging numbers, where the data in any given row of this table represents simultaneously collected/generated information.
(44) Data from selected rows of this table are copied from buffer 540 by a sample selection step 545. The criteria used in selection step 545 are typically pre-determined. Generally it is desirable to have at least three samples per complete cycle of the signal generator and preferable in many embodiments to have four samples per cycle. It is also preferable to have the samples spread substantially uniformly over the cycle. In one preferred embodiment the samples are selected to be substantially 90 degrees apart, as measured by the angular position values, .sub.ID. For example, the four selected samples may be separated by nominal estimated angular position values of 0, 90, 180, and 270 degrees.
(45) Generally, because of the inherent randomness in sampling times, the selected angular position values are slightly displaced from their ideal values. For example, the 4 angular position values might be: , +90+, +180+, and +270+ where is the arbitrary position of the first sample and , , and are the small differences from the nominal 90 degree shifts that are inherent in using operationally collected data.
(46) The selected angular position values are transmitted to a correlation weight calculation step 547 whilst the sampled signal data are transmitted to a matrix multiplication step 550, said matrix multiplication step comprising an M-channel, secondary correlation phase (SCP) processor which may be substantially identical to that described as PCP 221. In addition, matrix multiplication step 550 may include an additional row of weights in the matrix wherein these additional weights generate an estimate of the offset of each signal.
(47) As has been noted above, the weights in a discrete correlation phase estimator are proportional to the reference sine and cosine evaluated at the same phase steps as the signals being sampled. Thus, for the approximate 90 degree samples in the exemplary embodiment the correlation weight calculation step 547 generates weights to fill a matrix such as:
(48)
where the top row generates the y quadrature values, the middle row generates the x quadrature values, and the bottom row approximates the average offset of the signal. For PCP 221 these are the (x, y) values shown in
(49) Matrix multiplication step 550 is, in one embodiment, a multi-channel processor comprising sine, cosine, and offset estimators for each of the M signal sources. The matrix multiplication step 550 is followed by a relative phase calculation step 555 that converts the M sets of quadrature values into M phases and then references the M phases to the arbitrarily selected first sensor's phase.
(50) In the exemplary system illustrated in
(51)
(52) Optionally, these output values may be averaged over multiple evaluations to smooth the data. The output values from this step are transmitted to relative phase calculation step 555 and to a gain and offset conditioning step 552. In addition, but not illustrated, offset estimate at the output of conditioning step 552, which is the averaged offset for each channel, may be fed back (that is, subtracted from the input signals) to the input of matrix multiplication step 550 to further improve the accuracy of the phase, magnitude and offset estimates. It will be understood by those familiar with feedback loops that averaging the offset over a significant number of samples is effectively an integration step that makes the herein described configuration a stable, type 1 servo-loop.
(53) Continuing with
S=G*(sO)
where S is the corrected signal, s is the input signal, and G and O are the gain and offset coefficients respectively for that particular input signal.
(54) Referring again to
(55) Phase subtraction step 555 calculates the phase increments, .sub.i, between the M measured signals. Since any detector can be declared the reference detector, phase subtraction step 555 subtracts the instantaneous phase of the designated reference detector from each of the other phases, producing M1 phase increments. As with the offsets and gains, the phase increments can be smoothed by averaging.
(56) The M1 phase increments from phase subtraction step 555 are sent to a weight generation step 560 in which the M1 measured phase increments are compared to the nominal phase increments. The differences between the measured increments, .sub.i, and the nominal (design) increments, .sub.i, are the sampling errors, .sub.i, where .sub.i=.sub.i.sub.i. Based on the sampling errors, calibrated matrix weights are calculated using the formula:
Ws.sub.j=sin(.sub.j+.sub.j) and Wc.sub.j=cos (.sub.j+.sub.j)(12)
These weights are then sent to PCP 221, the operation of which has been described previously, wherein they are substituted into the matrix multiplication:
(57)
Where the hat notation ({circumflex over (z)}) is used to indicate that the result is an estimate of the quadrature components and not an exact solution. Equation (13) applies in a three-detector system such as the example described herein; analogous equations are used in systems having other numbers of detectors as will be apparent to those skilled in the art.
(58) To summarize this second calibration approach: in an M detector encoder in which the detectors can be sampled many times in one cycle of the to-be-evaluated sinusoid, each detector is calibrated for gain, offset, and phase errors by individually processing the series of samples collected from that particular detector. These individual detector data streams are processed in secondary correlation phase processors. Preferably the gain and offset calibrations are applied directly to the data stream feeding the primary correlation phase processor. Further, the phase errors between the data sets are used to calculate a calibrated set of weights for use in the primary correlation processor. This calibration approach operates autonomously and can be allowed to operate continuously to compensate for time-varying errors such as thermal drift effects in the detectors. Alternatively, in embodiments where sensor parameters are expected to be relatively stable, the pre-quadrature calibration method and apparatus may be used to calibrate the system once at a time of manufacturing or other initial deployment, to accommodate manufacturing and/or initial set up effects, and then to lock those calibration values in memory for all future measurements or until a recalibration command is given. In yet another alternative embodiment, the pre-quadrature calibration method and apparatus may be used to develop a look-up-table (LUT) of calibration values, where the specific calibration values depend on one or more measurable parameter, for example, operating temperature, and where the values from the LUT are applied to the phase estimation processor as the measurable parameter changes.
(59) This second calibration approach is particular suitable for encoders in which the detectors are physically distinct (that is, where they have no inherent physical relationship to each other). One example of such an encoder is illustrated in
(60) While various embodiments of the innovation have been particularly shown and described, it will be understood by those skilled in the art that various changes in form and details may be made therein without departing from the spirit and scope of the innovation as defined by the appended claims. For example, the invention is in no way limited to the described embodiments for the signal generator or detectors (signal sources). Nor is there any limitation on the number or disposition of the detectors around the signal generator. Different configurations and dispositions of the processing steps of the described method are considered by the inventors to be equivalent to the exemplary configurations and dispositions described herein.