DISCLOSURE TITLE OF THE INVENTION: METHOD FOR CORRECTING ERRORS IN THE MEASUREMENT OF AN ANGULAR POSITION BY AN ANGULAR POSITION SENSOR [0001] The invention relates to a method for correcting errors in the measurement of an angular position by an angular position sensor. [0002] Here, the term "angular position sensor" refers both to a magnetic angular position sensor, known as a magnetic encoder, and to an optical angular position sensor, known as an optical encoder. These different names will be used hereafter to designate angular, magnetic, or optical position sensors. [0003] An angular position sensor is a device for determining the angular position of an object without coming into contact with it. There are two types of encoders for determining the angular position of an object: Optical encoders and magnetic encoders. In an optical encoder, a disk with opaque and transparent zones is rotated by the encoder's rotation shaft. An optical beam emitted by infrared diodes passes through the transparent zones of the rotating disk and strikes the photodetectors, creating an analog signal which is amplified and transformed into a digital signal, the latter being transmitted to a data processing means which provides the angular position. In the case of a magnetic encoder, a permanent magnet, at least bipolar, is attached to a rotating shaft and generates a magnetic field. This magnetic field varies as the magnet moves, i.e. as it rotates. The magnetic field is detected by a disk-shaped sensor that produces two sinusoidal curves that are 90° out of phase, corresponding to a sine and a cosine. By calculating the tangent arc, the measurement of an angle is obtained. id="p-4" id="p-4" id="p-4"
id="p-4"
[0004] Note that in both cases, a curve is obtained which gives the object's position as a function of the angle. Such a curve is theoretically linear between 0° and 360°. In reality, this curve is not a straight line but has a double ripple around the theoretical straight line. A first ripple of a given amplitude and frequency on which a second ripple of lower amplitude and frequency is superimposed. An irregular sinusoidal curve is thus obtained, with a serrated appearance. The first ripple corresponds to a so-called low-frequency error and the second to a so-called high-frequency error. Hereafter, the terms "low-frequency errors" and "high-frequency errors" will also be used. Low-frequency errors are errors due to a lack of centering of the optical disc or of the magnetic track. These are regular and repetitive errors for the same mounting conditions of the same encoder. They are relatively frequent because a small error can induce a large measurement deviation. For example, a 10 µm offset in the disc of an optical encoder, with a 35 mm reading diameter, corresponds to an error of about one minute of angle, peak to peak. This type of error varies if the mounting conditions of the encoder vary. It is therefore essentially a mechanical error. [0005] High-frequency errors are the result of other types of errors that may be encountered. By way of non-limiting examples, mention may be made of an error in etching the optical disc, an error in the magnetic track, an error in the etching pitch, an error in the positioning of the photo-detectors, a phase shift error in the sine and cosine signals for a magnetic encoder. Because of these two types of error, known solutions are used, particularly by the manufacturer, to check encoders, whether optical or magnetic, before they are marketed to the customer. The manufacturer has a standard curve for a given angle which makes it possible to correct certain errors, in particular those at low frequencies. Since the final digital signal corresponds to a sine and a cosine, it is possible to verify that there is a high-frequency error by checking whether or not a phase shift and/or a difference in shapes of the curves for two different and known angles are detected, between the sine and cosine curves. By realigning the curves between the two angles, the high-frequency errors are corrected or at least limited. While such a solution is applicable and relatively satisfactory when testing the angular position encoders at the manufacturer's location, it turns out that at the end user's location, the mounting constraints of the encoders are different. Therefore, the error correction can be ineffective or even increase errors since an additional error is generated on the low frequencies by inducing opposition of phases once the encoder is mounted at the user’s location. In some cases, the initial error is amplified to twice its original value. In other words, the error correction file is fixed and only valid at the manufacturer's location, but detached from reality once the encoder is installed at the user’s location and ready for use. Such a solution, although easy to implement at the manufacturer's location, is not satisfactory because it may prove to be totally ineffective once the encoder is in use. This is a so-called calibration solution that cannot be reproduced as such at the end user's location. [0006] To remedy this defect, another solution is known, in particular for optical encoders, which consists of correcting the eccentricity, and therefore the defects mainly originating from the low-frequency errors, not with values determined as previously but by calculation. During the measurement of two different angles, two photodetectors placed opposite each other, i.e. diametrically opposite to the disc, are used. The relative phase of the signals from the two photodetectors evolves sinusoidally over one revolution. For each angle, two curves are obtained in phase opposition, with the photodetectors measuring angles at 180° to each other. By averaging the curves, an average value of the angle, corrected for low-frequency errors, is obtained. Once this correction is done, the high-frequency error is still present. If the difference between the averaged angle and the standard value is used to correct the high-frequency error, this implies that the diametrically opposed photodetectors read exactly the same. However, the disc is still off-center, so the two photodetectors don't read the same. In fact, the high-frequency error is not only still present, but amplified. A sensor comprising an emitting coil designed to be powered by a high-frequency current source and at least two receiving coils is also known from US-A-2021 278 260. One of the receiving coils generates a sine-type signal and the other generates a cosine-type signal during the rotation of the coupler. A module compensates for the non-sinusoidal output signals. Another module processes the non-sinusoidal signals coming from the receiving coils, determines an error in these non-sinusoidal signals, mathematically compensates for the whole to eliminate the error, and generates an output signal representative of the rotational position of the coupler. US-A-2020 240 811 describes a filter that reduces the high-frequency content of the output signal and generates an offset correction signal. US-A-2021/323603 concerns a device for angle detection by an encoder comprising an angle corrector. A first sinusoidal signal is multiplied by a factor n to obtain a corrected value, and a second angular signal, also sinusoidal but with a different phase, is multiplied by n as well. The factor n is a real number other than 1. By correcting the second signal multiplied by n on the basis of the first corrected signal, a detected angle value is obtained. The values of n are predefined and not adapted to the deviation between the real and measured values. [0007] Most of the envisaged solutions prioritize correcting one type of error, low- or high-frequency, to the detriment of the other. There is a need for error correction in optical and magnetic encoders, in order to improve their performance and expand their use in a wide range of applications. [0008] The purpose of the invention is to provide a method for optimally correcting both types of error, without prioritizing the correction of one type of error, low- or high-frequency, over the other. [0009] To this end, the invention relates to a method for correcting so-called low- and high-frequency errors generated by an angular position sensor during the measurement of an angular position, characterized in that it comprises at least the following steps: - a) performing a measurement of a first known angular position, said measurement being provided by an angular position sensor of an object using a set of at least two photo-detectors whose quantity is a multiple of two, the photo-detectors of the same set of photo-detectors used being diametrically opposite on the sensor, two by two, - b) performing a measurement of at least one second known angular position, said measurement being provided by the same sensor as in step a) using the same set of photo-detectors located in the same place as in step a) and whose quantity is the same multiple of two as in step a), - c) associating each measurement carried out in steps a) and b) with a file containing the exact theoretical values of each known angular position that each photo-detector must measure, - d) obtaining, for each of the measurements of the first and second angular positions obtained at steps a) and b) first and second angular positions corrected by a correction of the measurements of each angular position, each correction being carried out by modifying the measured angle of a value adapted to respectively obtain the values of the first and second known angular positions defined in step c) and - d) averaging the first and second angular positions obtained after correction in step c). [0010] By virtue of the invention, without structural modifications to the same angular position sensor, with a set of at least two photo-detectors, two measurements of two distinct and known angular positions are carried out. Since the angular position sensor is the same, the measurement errors called high-frequency errors which are due to etching errors, the etching pitch, the positioning of the photo-detectors are the same, this type of error being linked to the actual structure of the angular position sensor and of the photo-detectors. Step b) thus enables this type of measurement error to be corrected to the extent possible. Step d) makes it possible to correct to the extent possible the measurement errors called low-frequency errors due to the off-center of the disc constituting the angular position sensor. Unlike known solutions, averaging values does not affect high-frequency errors, as here we use a given corrected value specific to each angular position. In this way, the high-frequency error is identical, or at least similar, for both angular position measurements. [0011] According to aspects that are advantageous but not required, such a method may comprise one or more of the following steps: [0012] If a plurality of known and different angular positions are measured in step b), the number of known and different angular positions must be even. The invention will be better understood and other advantages thereof will become more clearly apparent on reading the following description, given solely by way of non-limiting example and with reference to the accompanying drawings, wherein: [0013] [Fig. 1] is a theoretical curve, without error, of angular positions between 0° and 360° during one-and-a-half revolutions of an angular position sensor, [0014] [Fig. 2] is a curve similar to Figure 1 of actual angular positions measured between 0° and 360° during one revolution of an angular position sensor, [0015] [Fig. 3] is a curve illustrating the errors observed between 0° and 360° relative to the theoretical value, from the data in Figure 2, [0016] [Fig. 4] is a larger-scale view of the detail IV in Fig. 3, and [0017] [Fig. 5] is a simplified diagram of the error correction method according to one embodiment of the invention. [0018] Subsequently, the terms sensor and encoder will be used interchangeably to designate an angular position sensor that it is optical or magnetic. Figure 1 is a so-called theoretical curve, meaning that it represents the angular position of a rotating object as a function of an angle of rotation. Thus, during a complete revolution of the object on itself between 0 degrees and 360 degrees the angle increases as well as the angular position of the object. Once the revolution has been completed, the angular position of the object returns to zero and the curve starts as shown in Figure 1. In such a theoretical case, where there is no error between angular position and angle, this curve is linear. This is a straight line with a slope overall at 45°, that is to say that the angular position of the rotating object is directly dependent on the angle. Of course, in reality, it is not the same. In fact, the rotation of the angular position sensor, in particular of the disc or magnetic track that make up the sensor, is not necessarily perfect, as the disc or magnetic track may be off-center, depending on whether the position sensor is optical or magnetic. Note that the disc or magnetic track being 10 microns off-center for a 35-mm read diameter corresponds to approximately one minute of peak-to-peak angle, or 60 arc-seconds in the case of a magnetic angular position sensor. Eccentricity of the optical disc or magnetic track is a regular and repetitive mechanical error, provided that the same angular position sensor is mounted under the same conditions. [0019] Other types of error can be added to this error. These are errors that may be encountered during disc etching, variations in etching pitch, photo-detector positioning or the like. As shown in Figure 2, such errors induce a non-linearity, i.e. a rippling of the curve with respect to the theoretical line. This rippling is mostly regular since the main error is a repetitive error that is induced by a lack of centering of the optical disc or of the magnetic track. In Figure 2, such a curve ripple occurs at low frequencies. Other errors, generally of lesser amplitude, irregular and variable, also affect the measurement. [0020] Thus, when the errors in degrees relative to the angle in question are represented from a numerical point of view, as shown in Figure 3, we obtain a curve with a double ripple: the first ripple is the one mentioned above and concerns so-called low-frequency errors. This is the ripple that has the highest amplitude. So-called high-frequency errors with lower amplitudes generate a second ripple of the curve. While low-frequency errors remain the most significant type of error, high-frequency errors are also present and affect the measurement, particularly when high precision of the order of a second of an angle is required. As indicated in the preamble, there are known solutions to correct repetitive errors at low frequencies. To do this, a pre-established file is used to compare the angular position measurements taken with the magnetic or optical sensor against known data on the angular position of a standard object. The difference between the measured angular position and the theoretical position quantifies the deviation due to being off-center, i.e. the value of the error, which makes it possible to correct the measured signal so that the displayed signal supplied by the sensor takes into account the off-center error and is therefore representative of reality. Such a solution is satisfactory as regards the correction of low-frequency errors so long as the assembly conditions of the angular position sensor are permanently identical. However, this correction is carried out at the factory by the manufacturer and the optical or magnetic encoder once mounted at the customer’s location only rarely has mounting conditions identical to those encountered in the factory. As a result, not only is the error not corrected, but it is potentially amplified at the customer’s location, since the correction itself becomes an error in addition to the initial error. The erroneous value of the measurement of the angular position can be such that in some cases a doubling of the error between the factory and the customer was observed. Therefore, manufacturers have a tendency to carry out, for encoders integrating their own rolling bearings, low- frequency error corrections at least in the factory so that once the sensor is mounted at the customer’s location, low-frequency errors are limited. [0021] The errors of the other type, referred to as high-frequency errors, are due to defects other than being off-center, and although they have lesser amplitudes, they are variable and irregular, not only in amplitude but also in frequency. As a reminder, this type of error is due, for example, to etching defects in the etching pitch. The existing solutions are relatively ineffective in correcting this type of error. In fact, even with calculation-based solutions and the use of a plurality of photo-detectors, they do not detect exactly the same, since high-frequency errors have varying amplitudes and frequencies, so that they are not necessarily identical between the measurements taken by different photo-detectors, depending on their position. [0022] The solution proposed by the invention makes it possible to correct, or at least simply minimize, not only low-frequency measurement errors, but also high-frequency measurement errors. For this purpose, as shown in Figure 5, two photo-detectors P, P1 are used, positioned diametrically opposite one another above the circular magnetic disk or track, referenced by the letter C, which forms the angular position sensor. The photo-detectors P, P1 will each take a separate measurement of a given angular position, with an offset corresponding to an angle of 180°. The expression "angular position" here denotes the angular position of the axis of the sensor, therefore the theoretical axis of the circular track C. According to the invention, each measurement carried out by a photo-detector P or P1 corresponds an angular position that is predefined and of a known value. In this way, a file containing the exact theoretical values of the known and given angular position to be measured by the photo-detector P or P1 can be associated with each measurement made by each photo-detector. A corrected value θ'1 or θ'2 of each given and known angular position is associated with each measurement of an angular position θ1 or θ2 by the photo-detector P, P1 respectively. The correction is referenced E1, E2 for angular positions θ1, θ2 respectively and is performed by association, i.e. by modifying the measured angle by a suitable value to obtain the given and known value. In this way, on the one hand, the low-frequency error is corrected in a known way, given that this error is equal in absolute value and opposite for the two measurements carried out with an offset of 180° by the photo-detectors P, P1 and, on the other hand, the high-frequency errors are also corrected. Indeed, each photo-detector P, P1 having a given control file, for a defined and known angular position, due to the fact that the photo- detectors P, P1 are placed at 180° relative to each other, they are therefore positioned so as to generate the measurement of two detected angle values in phase opposition. With such an arrangement, the low-frequency errors detected by each photo-detector P, P1 are identical and cancel out because in phase opposition, only the high-frequency errors are different and taken into account and processed individually during the correction of each value θ1 or θ2 of the angular positions measured by the photo-detectors P, P1. It is sufficient, in another step, to average the corrected angular positions according to the relationship (θ'1 and θ'2)/2 to obtain a corrected value θ3 of the angular position, with regard to both low-frequency and high-frequency errors. This angular position θ3 obtained by calculation is corrected, by a given factor, relative to the given and known angular position since the so-called high-frequency errors were taken into account during each of the measurements carried out by each photo-detector P, P1. [0023] In order to take better account of high-frequency errors, and therefore to achieve more accurate correction of this type of error, it is possible to use a number of photo-detectors greater than two, provided that this number is always a multiple of two, and that the photo-detectors are always positioned diametrically in pairs on the sensor. In addition, each photo-detector P, P1 must be associated with a single given and known angular position in order to generate a correction file for each predefined angular position. In such a case, the last step averages all the corrected values of measured angular positions. [0024] Such a solution for correcting so-called low- and high-frequency errors is independent of the assembly conditions of the sensor and therefore can be applied without difficulty at the customer’s location when the customer has carried out the mounting of the sensor. [0025] This correction of the so-called low- and high-frequency errors is carried out by calculation in the factory, therefore in a manner concealed from the customer, who receives a sensor already comprising the correction of the angular position. By virtue of the invention, the final mounting conditions encountered at the customer’s location have little or no effect on the error corrections made in the factory. Even if low- and high-frequency errors are not completely corrected, they are reduced to values acceptable to the customer when using the sensor. What's more, this correction is performed solely by calculation, and is therefore embedded in the sensor's electronics. As a result, it is present and pre-set at the factory, with the customer not needing to do anything to take to correct his sensor, and being unable to intervene on this correction. 10