The model of the HEC assumes that the error parameters are constant over time and mechanical revolution. Only a high learning rate allows fast tracking of the parameter course and direct use of this information to correct the line signals immediately at the following sampling step. If the model assumption of constant error parameters is substituted by an error parameter course as a function of the angular position, the integrated error can be stored in a table at the correct angular position, and the table entry be used as a precompensation for the next pass through the same angular position to accumulate residual parameter errors. This procedure is iterated over some revolutions until the absolute residual error drops below a predefined threshold.
4.1. Theoretical Structure
An overview of the scheme of the proposed IHEC is given in
Figure 7 showing the basic signal flow. The measured line signals
of the encoder are adjusted by the error correction depending on the estimated mechanical angle
. The correction table contains the parameter course over one mechanical revolution depending on the mechanical angle
. The table has been updated in previous revolutions or initialized to nominal values. Because the estimated value of the angular position
is used to address the function values of the error parameters, this involves an algebraic loop, which has to be resolved by either an iteration or a delay by one sampling period. For simplicity, the latter was chosen with the assumption—that the angle difference between sampling steps is negligible. During every full revolution, the error parameters
in the correction table will be updated by the observer output for use during the following revolution.
The corrected line signals are used to compute the estimated angle of the line signals . It is important to distinguish between the angle of the line signals inside one optical cycle and the mechanical angle of the rotation , which covers a full mechanical rotation. The mechanical angle can be calculated from with the conversion block essentially counting overflows and underflows of at the transition between optical cycles of the encoder.
The main difference between IHEC and HEC lies in the fact that IHEC uses a filter window over equidistant samples of the mechanical angle with the exact length of one optical cycle. It operates as a finite impulse response (FIR) filter. Its filter coefficients are constant in the case of the two offset parameters (
19) and (
20) or contain the sine and cosine functions corresponding to their angular positions (
21) and (
22) within the optical cycle.
To determine the output of the observer and thus the estimated parameter course for one revolution, four calculation steps are required. These steps are repeated every revolution iteratively until the error signal is smaller than a defined limit. In the first step, the error signals
between the corrected line signals
, and the ideal line signals
without offset and with the ideal amplitude of 1, are calculated based on the estimated angle
(
16):
In the second step, the error signals
are sampled at equidistant angular positions and fed into an FIR filter whose length (angular samples) covers one line cycle of the encoder with a number of samples
. Each error parameter in
has its own FIR filter. These filters have different coefficients
depending on the parameter to be estimated. In the third step, the FIR filter output is divided by the filter length
, and this quotient is spread over the last
table entries. In summary, operations two and three, to determine the modification of a parameter
at one sampling point as represented by (
17), are exemplarily shown for
at sampling point
n. By utilizing this operation, the high-frequency oscillations on the estimated parameters and a lagging identification, which are the disadvantages of the HEC method, are eliminated:
The new parameter course is determined in step four by adding the modification of a parameter
to the old value
of the last revolution
r, shown in (
18):
The filter coefficients for the FIR filters are chosen in the same way as in the HEC method at the respective angular positions. For the estimation of the offset error
and
, the filter coefficient is defined as the learning rate divided by the filter length
, Equations (
19) and (
20). This corresponds to a simple moving average calculation. The filter coefficients for the amplitude parameters
and
also incorporate the learning rate divided by the filter length
but additionally multiplied by a scaling factor and by the sine, respectively the cosine of the estimated angle at the considered point, Equations (
21) and (
22), to achieve the same behavior as in the HEC method:
The simulation of the IHEC method was run repetitively over three mechanical revolutions, which are completely shown in
Figure 8. For a closed solution, the values of the error signals
e outside the observation period have to be defined. In this case, they are set to zero. This results in a ramp-shaped slope at the left and right end of the estimated parameter courses for the IHEC method. The middle revolution from
to
does not show this effect.
As already described in
Section 3.1, for the HEC method, it is necessary to have well defined initial values and learning rates. For the IHEC, the parameter courses for the initial revolution
have to be defined. A good choice is an initial value of 0 for the offset error estimation and an initial value of 1 for the amplitude parameter estimation for a whole mechanical revolution. In addition, the number of iterations or a lower bound for the change of the parameter curves has to be chosen. With a skillful choice of the learning rates, the number of iterations can be kept low. The smaller the learning rates, the more iterations are necessary to estimate the real parameter curve. However, higher learning rates could cause an overshoot or even instability of the estimation.
4.2. Comparison
To compare the Harmonic Error Correction and the Iterative Harmonic Error Correction proposed in
Section 3 and
Section 4, both methods are simulated with the same erroneous line signals as inputs. The chosen line signals have the same course as before in
Section 3.3.
Figure 8 depicts the parameter courses for a simulation of three mechanical revolutions. The black line (
![Machines 05 00001 i001]()
) shows the erroneous parameter course, the blue line (
![Machines 05 00001 i002]()
) the estimated course obtained by the HEC and the dotted green line (
![Machines 05 00001 i004]()
) the same by IHEC, which is depicted after six iterations. As described in
Section 4.1, the courses of the IHEC increase ramp-shaped at the right and left end of the estimation, but in the center part of the graphic, the curves track the chosen parameter course. Moreover, it must be noted that this performance is achieved after just a few iterations.
A clear difference between the IHEC and HEC is that the IHEC does not show high-frequency oscillations on the parameter courses mainly on the offsets, where frequency of the line cycle couples into the parameter adaption due to high learning rates. It shows very dominantly on the offset signals. Secondly, the simulation of both methods shows that the HEC compared to IHEC has an angle-shifted parameter identification delayed in the direction of rotation. Except for the IHEC, a few iterations are necessary for the error parameters to converge, always under the assumption that the course of the error parameters does not change between revolutions. This condition can be dropped with the HEC method.
Figure 9 depicts the difference
between the true angle
ε and the estimated angle
in the simulation for both methods and without any error correction. The black line (
![Machines 05 00001 i001]()
) shows the angle difference, if the angle is determined without correcting the erroneous line signals. The blue (
![Machines 05 00001 i002]()
) and the green line (
![Machines 05 00001 i003]()
) show the difference if the HEC and the IHEC is applied. The improvement by the two correction methods is obvious. The IHEC provides the best compensation at the price, and several revolutions are needed to adapt to the error course.
As both methods are based on different error models, the application depends on what types of errors are to be compensated. If we are to deal only with unsymmetrical photo diodes for positive and negative signs or between the lines, the parameter offset and amplitude will not be dependent on the mechanical rotation of the disk, and, therefore, an error model with constant parameters is adequate. Thus, the best choice is HEC. If errors from the etching process of the disk also play a mayor role, a table compensation with IHEC dependent on the mechanical angle is necessary. Of course, the implementation and calculation burden is much more complex for the IHEC. This was also the reason why this method was only investigated in simulation up to now. In summary, both methods are useful to estimate the errors on the sinusoidal line signals.