The contents of the following Japanese patent application(s) are incorporated herein by reference:
NO. 2021-107088 filed in JP on Jun. 28, 2021
NO. 2022-068806 filed in JP on Apr. 19, 2022
The present invention relates to a calibration apparatus, a calibration method, and a non-transitory computer readable medium having recorded thereon a calibration program.
Patent Document 1 describes “A position detection apparatus comprising: a waveform correction unit that corrects waveforms of a first signal detected from a first track provided on a mobile body and having a scale of a predetermined cycle and a second signal detected from a second track provided on the mobile body and having a scale of a cycle less than the predetermined cycle; and a position calculation unit that calculates a position of the mobile body on a basis of the first signal and second signal which are corrected” (claim 1). Patent Document 1 describes “The interpolation angle correction unit 700 corrects the interpolation angle before correction calculated by the interpolation angle calculation unit 250 and the interpolation angle calculation unit 260 on the basis of the error information of the interpolation angle obtained from the correction table 510. At this time, the interpolation angle correction unit 700 obtains the slit number corresponding to the absolute angle θref sent from the angle calculation unit 310, and corrects the interpolation angle corresponding to the slit number using the difference recorded in the correction table 510. The corrected interpolation angle is sent to the angle calculation unit 620. The angle calculation unit (second position calculation unit) 620 calculates the absolute angle on the basis of the corrected interpolation angle. More specifically, the angle calculation unit 620 calculates the absolute angle on the basis of the corrected interpolation angle and the slit number corresponding to the absolute angle θref sent from the angle calculation unit 310.” (paragraph 0041).
In the position detection apparatus described in Patent Document 1, the slit number corresponding to the absolute angle θref is obtained, and the interpolation angle corresponding to the slit number is corrected using a difference recorded in the correction table 510. Therefore, when the error of the absolute angle θref is large, the slit number may be wrong, and the wrong difference value may be read from the correction table.
In a first aspect of the present invention, a calibration apparatus is provided. A calibration apparatus includes: an acquisition unit configured to acquire a detection position of a mobile body for each actual position of the mobile body; a calculation unit configured to calculate, for a detection position of each actual position of the mobile body, an error between a slit position signal for detecting a slit position and an ideal slit number corresponding to the actual position of the mobile body; a determination unit configured to determine whether two or more actual positions having at least partially different slit numbers in units of first slits of a predefined number correspond to a same detection position; and a generation unit configured to generate, in response to the two or more actual positions corresponding to a same detection position, a correction value for correcting an error by a magnitude between errors at the two or more actual positions with respect to the slit position signal at the detection position.
In response to a fact that only one actual position corresponds to a certain detection position, the generation unit may be configured to generate a correction value for correcting an error at the one actual position with respect to the slit position signal at the detection position.
In any of the above calibration apparatuses, the generation unit may be configured to generate a correction value for each section of a detection position acquired by the acquisition unit.
In any of the above calibration apparatuses, the generation unit may be configured to calculate a parameter of a correction function representing a correction value corresponding to a detection position for each section of the detection position acquired by the acquisition unit.
In any of the above calibration apparatuses, the generation unit may be configured to calculate a parameter of the correction function by performing Fourier series expansion of a set of correction values corresponding to a detection position for each section of the detection position acquired by the acquisition unit.
In any one of the above calibration apparatuses, the generation unit may be configured to generate, in response to the two or more actual positions corresponding to a same detection position, a correction value for correcting an error by a magnitude obtained by averaging errors at the two or more actual positions with respect to the slit position signal.
In any of the above calibration apparatuses, the generation unit may be configured to determine a correspondence relationship between an actual position and a detection position with a margin at a boundary of the first slit. In any of the above calibration apparatuses, the generation unit may generate the correction value by using at least one actual position corresponding to a detection position including a correspondence between the detection position and the actual position obtained by performing at least one of addition or subtraction of a predefined margin on the boundary of the first slit with respect to the slit position signal.
Any of the above calibration apparatuses may further include an output unit configured to output a correction value to an encoder that calculates a slit number in units of the first slits by rounding off a value obtained by adding the correction value to the slit position signal.
In any of the above calibration apparatuses, the encoder may be configured to calculate a slit number obtained by rounding off a value obtained by adding a correction value to the slit position signal so that the value becomes an integer.
In any of the above calibration apparatuses, the output unit may be configured to write a correction value in a correction table included in the encoder.
The calibration apparatus may further include an inspection unit configured to inspect whether a mistake occurs in a slit number calculated using a slit position signal corrected by a correction value generated by the generation unit.
In any of the above calibration apparatuses, the mobile body may be a rotating body. The rotating body may include: a first track including the first slit in each first cycle obtained by dividing one round of the rotating body by a predefined first number; and a second track including a second slit in each second cycle obtained by dividing one round of the rotating body by a second number smaller than the first number. An encoder to be calibrated may be configured to calculate a detection position of the mobile body on a basis of a first detection value detected from the first track and a second detection value detected from the second track.
The rotating body may further include a third track including a third slit for each third cycle obtained by dividing one round of the rotating body by a third number different from the first number and the second number. The encoder may be configured to calculate a detection position of the mobile body further on a basis of a third detection value detected from the third track.
In a second aspect of the present invention, a calibration method is provided. A calibration method includes: acquiring, by a calibration apparatus, a detection position of a mobile body for each actual position of the mobile body; calculating, by the calibration apparatus, an error between a slit position signal for detecting a slit position and an ideal slit number corresponding to an actual position of the mobile body for a detection position of each actual position of the mobile body; determining, by the calibration apparatus, whether two or more actual positions having at least partially different slit numbers in units of first slits of a predefined number correspond to a same detection position; and generating, in response to the two or more actual positions corresponding to a same detection position, a correction value for correcting an error by a magnitude between errors at the two or more actual positions with respect to the slit position signal at the detection position.
In a third aspect of the present invention, non-transitory computer readable medium having recorded thereon a calibration program executed by a computer is provided. The calibration program causes a computer to function as: an acquisition unit configured to acquire a detection position of a mobile body for each actual position of the mobile body; a calculation unit configured to calculate, for a detection position of each actual position of the mobile body, an error between a slit position signal for detecting a slit position and an ideal slit number corresponding to the actual position of the mobile body; a determination unit configured to determine whether two or more actual positions having at least partially different slit numbers in units of first slits of a predefined number correspond to a same detection position; and a generation unit configured to generate, in response to a two or more actual positions corresponding to a same detection position, a correction value for correcting an error by a magnitude between errors at the two or more actual positions with respect to the slit position signal at the detection position.
The summary clause does not necessarily describe all necessary features of the embodiments of the present invention. The present invention may also be a sub-combination of the features described above.
Hereinafter, the present invention will be described through embodiments of the invention, but the following embodiments do not limit the invention according to the claims. In addition, not all combinations of features described in the embodiments are essential to the solution of the invention.
The mobile body 100 includes a plurality of tracks 105a and 105b (also referred to as “track 105”). Each track 105 includes a plurality of slits provided at predefined intervals along the moving direction of the mobile body 100. In the present embodiment, each track 105 includes a plurality of slits provided at equal intervals in the circumferential direction about the rotation axis in the mobile body 100 which is a rotating body. Each slit is a structure body that can be detected by the encoder 110 using magnetism, light, electricity, or the like. For example, each slit is an opening or protrusion provided at equal intervals in the circumferential direction of the mobile body 100, an individual tooth of a gear formed on the outer periphery of the mobile body 100, a magnetized body magnetized at equal intervals in the circumferential direction of the mobile body 100, or the like.
Each of the plurality of tracks 105 may be provided at positions each having different distances (that is, radii) from the rotation axis about the rotation axis on the surface of the mobile body 100. In the present embodiment, the track 105a is provided in the circumferential direction in the vicinity of the outer periphery of the mobile body 100, and the track 105b is provided in the circumferential direction adjacently to the track 105a on the inner peripheral side of the track 105a.
Here, the plurality of tracks 105 has slits at different cycles from each other. In the present embodiment, the track 105a is an example of a first track, and includes a first slit for each first cycle obtained by dividing one round of the mobile body 100 by a predefined first number NM. The track 105b is an example of a second track, and includes a second slit for each second cycle obtained by dividing one round of the mobile body 100 by a second number NN smaller than the first number. Here, in a case where the number of tracks 105 included in the mobile body 100 is two, the number of slits per round (first number NM) in the track 105a and the number of slits per round (second number NN) in the track 105b may be coprime. The first number NM and the second number NN may be determined such that the difference is 1. For example, the set of the first number NM and the second number NN may be (8, 7), (40, 39), (128, 127), or the like.
The encoder 110 calculates a detection position of the mobile body 100 on the basis of a plurality of detection values detected from the plurality of tracks 105 of the mobile body 100. The encoder 110 includes a plurality of detection units 120a and 120b (also referred to as a “detection unit 120”), a slit position signal calculation unit 130, a slit number calculation unit 140, a correction table 150, a slit number correction unit 160, and a position calculation unit 170.
Each of the plurality of detection units 120 is provided corresponding to each of the plurality of tracks 105, and outputs a detection value detected from the corresponding track 105. In the present embodiment, the detection unit 120a functions as a first detection unit, and detects and outputs a first detection value from the track 105a which is an example of the first track. The detection unit 120b functions as a second detection unit, and detects and outputs a second detection value from the track 105b which is an example of the second track. Here, the detection unit 120a and the detection unit 120b respectively output (electric) interpolation angles θM and θN in which an angle between adjacent slits in the corresponding track 105 is one cycle(=360 degrees).
The slit position signal calculation unit 130 is connected to the plurality of detection units 120. The slit position signal calculation unit 130 outputs a slit position signal SS using the plurality of detection values from the plurality of detection units 120. The slit position signal indicates the slit number of the first slit detected by the detection units 120a and 120b as a value indicating the position of the mobile body 100 detected by the encoder 110.
The slit number calculation unit 140 is connected to the slit position signal calculation unit 130. Using the slit position signal SS output from the slit position signal calculation unit 130, the slit number calculation unit 140 calculates a slit number SM (that is, the slit number of the slit in which the mobile body 100 is located) in units of first slits of a predefined number. Here, the detection position of the mobile body 100 before the slit number is corrected by the slit number correction unit 160 is represented by a set of the slit number SM and the interpolation angle θM. In the present embodiment, a mechanical angle θd as an example of the detection position is expressed by the following Expression (1).
The correction table 150 is connected to the detection unit 120a and the slit number calculation unit 140. The correction table 150 stores a set of correction values corresponding to the first detection signal (interpolation angle θM) detected from the first track for each slit number. The correction table 150 outputs a correction value Scal associated with the interpolation angle θM designated by the first detection signal among the set of correction values associated with the slit number SM received from the slit number calculation unit 140.
The slit number correction unit 160 is connected to the slit position signal calculation unit 130 and the correction table 150. The slit number correction unit 160 corrects the slit position signal SS received from the slit position signal calculation unit 130 using the correction value Scal received from the correction table 150. Then, the slit number correction unit 160 calculates a slit number S′M after correction on the basis of the slit position signal after correction. Here, the slit number correction unit 160 calculates the slit number in units of first slits by rounding off the value obtained by adding the correction value to the slit position signal SS from the slit position signal calculation unit 130. When the decimal point of the slit position signal SS is at a position which causes the integer part of the slit position signal SS to correspond to the slit number, the slit number correction unit 160 calculates the slit number obtained by rounding off the value obtained by adding the correction value to the slit position signal SS so that the value becomes an integer.
The position calculation unit 170 is connected to the detection unit 120a and the slit number correction unit 160. The position calculation unit 170 calculates the position (position after correction) of the mobile body 100 using the slit number S′M received from the slit number correction unit 160 and the first detection signal received from the detection unit 120a. In the present embodiment, the position calculation unit 170 outputs a mechanical angle A, as a value indicating the position of the mobile body 100, with one rotation of the mobile body 100 as one cycle.
Each detection unit 120 may correct the waveforms of the sin voltage and the cos voltage output from the two sensors. Specifically, each detection unit 120 may correct at least one of offsets, gains, phases, or distortions of the sin voltage and the cos voltage.
Next, each detection unit 120 calculates an arc tangent (arctan−1) using the sin voltage and the cos voltage to calculate an interpolation angle. Each detection unit 120 may correct the interpolation angle using distortion or the like of the amplitudes of the sin voltage and the cos voltage.
In the example of the present drawing, the track 105a has eight slits per round of the mobile body 100, and the track 105b has seven slits per round of the mobile body 100. When the mobile body 100 is rotated one round (from 0 degrees to 360 degrees), the interpolation angle θM output by the detection unit 120a repeats from 0 degrees to 360 degrees for eight cycles, and the interpolation angle θN output by the detection unit 120b repeats from 0 degrees to 360 degrees for seven cycles. Therefore, as illustrated in
The slit position signal calculation unit 130 calculates the slit position signal SS indicating the slit number corresponding to the detection position using the interpolation angles θM and θN. Here, the slit position signal SS should ideally match the slit number SM output by the slit number calculation unit 140. Therefore, when the slit number SM in Expression (1) is replaced with the slit position signal SS and the mechanical angle θd in Expression (1) is substituted with the difference θM -θN between the interpolation angles to be deformed, the slit position signal SS is expressed by the following Expression (2). Note that Expression (2) shows a case where NN=NM−1.
As shown in Expression (2), the slit position signal calculation unit 130 cancels the change in the slit position signal SS due to the change in the interpolation angle θM within one cycle of the slit of the track 105a by multiplying the difference θM-θN between the interpolation angles by NM and subtracting the interpolation angle θM. The slit position signal calculation unit 130 divides this by the angle (360 degrees) for one cycle and can calculate the slit position signal SS that ideally takes an integer value from 0 to NM−1 corresponding to the slit number of the track 105a when the mobile body 100 makes one round.
In another embodiment, the slit position signal calculation unit 130 may correct the slit position signal SS using a pre-correction function that calculates a correction value for correcting the slit position signal SS, and then output the slit position signal SS. Such a pre-correction function may be based on, for example, the interpolation angles θM and θN output from the detection unit 120a and the detection unit 120b, and may be based on amplitudes RM and RN of the detection values of the detection unit 120a and the detection unit 120b. The pre-correction function may be obtained by adjusting the magnitude and phase of the sine wave (sin) of the difference θM-θN between the interpolation angles output from the detection unit 120a and the detection unit 120b according to the target correction amount, for example.
The slit number calculation unit 140 may calculate the slit number SM according to the detection position (mechanical angle) of the mobile body 100 by rounding off the slit position signal as shown in the following Expression (3). In this case, the slit position signal SS has a margin in a range of −0.5 or more and less than +0.5 with respect to the error. Therefore, even when the slit position signal has an error in the range of −0.5 or more and less than +0.5, the slit number calculation unit 140 can calculate the correct slit number SM.
S
M=round(SS) (3)
The slit position signal error in the present drawing is a value (error) obtained by subtracting the ideal value Sideal of the slit position signal SS at the ideal mechanical angle from the slit position signal SS actually output by the slit position signal calculation unit 130 when the position of the mobile body 100 is the ideal mechanical angle. As an example, such a slit position signal error can be measured by measuring an ideal mechanical angle including an ideal slit number Sideal by an ideal encoder (for example, an encoder used as a calibration reference of the encoder 110) while rotating the mobile body 100 in order to calibrate the position detection apparatus 10, and acquiring the slit position signal SS output from the slit position signal calculation unit 130. In the example of the present drawing, the slit position signal error exceeds the range of ±0.5 depending on the ideal mechanical angle.
Similarly, an error 500b indicates that the slit number indicated by the slit position signal SS is within the range corresponding to the slit number 19 smaller by 1 than the slit number 20 corresponding to the ideal mechanical angle, an error 500c indicates that the slit number indicated by the slit position signal SS is the same as the slit number 20 corresponding to the ideal mechanical angle, an error 500d indicates that the slit number indicated by the slit position signal SS is within the range corresponding to the slit number 21 larger by 1 than the slit number 20 corresponding to the ideal mechanical angle, and an error 500e indicates that the slit number indicated by the slit position signal SS is within the range corresponding to the slit number 22 larger by 2 than the slit number 20 corresponding to the ideal mechanical angle. In this way, when the slit position signal error exceeds the range of ±0.5, the slit number indicated by the slit position signal SS is different from the ideal slit number.
The horizontal axis in the present drawing is a value corresponding to the mechanical angle before correction (that is, the detection position) obtained by adding the interpolation angle θM from the detection unit 120 to the slit number SM before correction from the slit number calculation unit 140. Here, the interpolation angle θM from the detection unit 120 is normalized to a range of 0 to 9 degrees by multiplying by 1/NM.
The slit number correction unit 160 adds the correction value Scal to the slit position signal SS from the slit position signal calculation unit 130 and rounds off the value to calculate the slit number S′M after correction (that is, the ideal value Sideal of the slit position signal). Therefore, while the slit position signal error is the slit position signal SS—the ideal value Sideal, the correction value Scal is the ideal value Sideal—the slit position signal SS. Therefore, the correction value Scal is a value obtained by reversing the positive and negative of the slit position signal error.
The error 500a in
In this way, when the slit position signal SS is measured for each actual position (ideal mechanical angle) of the mobile body 100 to calculate the slit position signal error for each actual position, the slit position signal error is determined at one point for each actual position (
Therefore, for the position detection apparatus 10 in which the slit position signal error is large and the measured slit number is different from the ideal slit number, two or more correction values (values obtained by reversing the positive and negative of the slit position signal error) appear for the same detection position. In such a case, which correction value the correction table 150 in the encoder 110 should be calibrated to output by the calibration apparatus of the position detection apparatus 10 becomes a problem.
The calibration apparatus 700 is connected to the encoder 110 to calibrate the encoder 110, for example, after manufacturing the position detection apparatus 10 and before shipping, or during inspection or diagnosis of the position detection apparatus 10. In this calibration, when two or more correction values appear for the same detection position of the mobile body 100, the calibration apparatus 700 sets an appropriate correction value in the encoder 110. The calibration apparatus 700 includes an acquisition unit 710, a calculation unit 714, a determination unit 716, a generation unit 720, an inspection unit 730, and an output unit 740.
The acquisition unit 710 acquires the detection position of the mobile body 100 for each actual position of the mobile body 100. Here, the acquisition unit 710 acquires Sideal, which is an ideal value of the slit position signal SS and indicates the slit number of the actual position, and θMideal, which indicates the interpolation angle of the actual position, as the actual position of the mobile body 100 from a reference encoder which is attached to the mobile body 100 for calibration work and used as a calibration reference. The acquisition unit 710 acquires, from the encoder 110, the slit position signal SS that is output by the slit position signal calculation unit 130 and is obtained by detecting the slit position of the detection position, and the interpolation angle θM that has obtained by detecting the detection position by the detection unit 120a, as the detection position of the mobile body 100.
Instead of acquiring the slit position signal SS from the encoder 110, the acquisition unit 710 may acquire the interpolation angles 9M and 9N output from the detection units 120a and 120b in the encoder 110 as the detection position of the mobile body 100. The acquisition unit 710 may acquire a sin value indicating the sin voltage and a cos value indicating the cos voltage respectively detected by the detection units 120a and 120b as the detection position of the mobile body 100. In this case, the acquisition unit 710 may calculate the slit position signal SS similarly to the detection units 120a and 120b and the slit position signal calculation unit 130.
The calculation unit 714 is connected to the acquisition unit 710. Using the slit position signal SS, the calculation unit 714 calculates an error between the ideal slit number Sideal according to the actual position and the slit position signal SS for the detection position of each actual position of the mobile body 100. The determination unit 716 is connected to the calculation unit 714. The determination unit 716 determines whether two or more actual positions having at least partially different slit numbers in units of first slits correspond to the same detection position. The generation unit 720 is connected to the determination unit 716. The generation unit 720 generates the correction value Scal of the slit position signal SS for each detection position of the mobile body 100 using the calculated error. Here, in response to the fact that two or more actual positions having at least partially different slit numbers in units of first slits correspond to the same detection position, the generation unit 720 generates the correction value Scal for correcting an error by the magnitude between the errors at the two or more actual positions with respect to the slit position signal SS at the detection position.
The inspection unit 730 is connected to the generation unit 720. The inspection unit 730 inspects whether a mistake occurs in the slit number calculated using the slit position signal corrected with the correction value Scal generated by the generation unit 720. The inspection unit 730 may determine that no mistake occurs in the slit number when the difference between the slit position signal corrected with the correction value Scal generated by the generation unit 720 and the slit number Sideal corresponding to the actual position falls within a predefined reference range. This reference range may be, for example, a range of ±50% of the width of one slit number, or a range smaller than this range. The inspection unit 730 issues an alert in response to determining that a mistake occurs in the slit number. Note that the calibration apparatus 700 may not include the inspection unit 730 and may not have the inspection function of the correction value Scal.
The output unit 740 outputs the correction value Scal for each inspection position which is generated by the generation unit 720. The output unit 740 may output the correction value Scal for each inspection position to the encoder 110. For example, the output unit 740 may write the correction value Scal for each inspection position in the correction table 150 included in the encoder 110. For example, the output unit 740 may store the correction value Scal for each inspection position in a storage device such as a memory or a hard disk drive.
The generation unit 720 repeats the processing from S810 to S860 for each detection position of the mobile body 100. In S820, the determination unit 716 determines whether two or more actual positions having at least partially different slit numbers in units of first slits correspond to the same detection position. In S820, the calculation unit 714 may calculate an error between the ideal slit number Sideal according to the actual position using the slit position signal SS and the slit position signal SS for the target detection position. In response to the fact that only one actual position corresponds to the target detection position (“N” in S830), the generation unit 720 generates the correction value Scal for correcting the error at the one actual position with respect to the slit position signal SS at the target detection position in S840. As a result, the generation unit 720 can generate the correction value Scal (for example, a correction value obtained by reversing the positive and negative of the slit position signal error) that cancels one slit position signal error for the detection position where the slit position signal error is within the range of ±0.5 and the slit position signal errors of other slit numbers do not overlap in the ideal mechanical angle. Note that, in generating the correction value Scal, the generation unit 720 may generate the correction value Scal that completely cancels the error at one actual position, or may generate the correction value Scal that reduces the error at one actual position. For example, when the correction value for each detection position of the slit position signal SS is approximated by the correction function as described later, the correction amount for each detection position approximates, but does not necessarily coincide with, the error amount at one actual position for the detection position.
In response to the fact that two or more actual positions having at least partially different slit numbers correspond to the target detection position (“Y” in S830), the generation unit 720 generates the correction value Scal for correcting an error by the magnitude between the errors at the two or more actual positions with respect to the slit position signal SS at the detection position. As a result, in a case where there are two or more errors (for example, slit position signal errors) with respect to the same detection position, the generation unit 720 can unify these errors and generate an appropriate correction value Scal.
When the correction value Scal for each detection position is generated in S870, the inspection unit 730 inspects whether a mistake occurs in the slit number calculated using the slit position signal corrected by the correction value Scal generated by the generation unit 720. Here, for each detection position, in a case where the slit position signal SS at the detection position is corrected with the correction value Scal corresponding to the detection position, the inspection unit 730 inspects whether the difference from the ideal slit number Sideal falls within the reference range at any of one or two or more actual positions corresponding to the detection position. The inspection unit 730 outputs an alert in response to the difference between the slit number of at least one actual position and the slit number indicated by the slit position signal after correction being outside the reference range at any detection position.
In S880, the output unit 740 outputs the correction value Scal for each inspection position generated by the generation unit 720. Here, when the alert is output in S870, the output unit 740 may interrupt the calibration process without outputting the correction value Scal.
Focusing on a section in which the measurement value (detection position) of the mechanical angle is 155.25 degrees to 157.50 degrees, in this section, two actual positions having different slit numbers correspond to each detection position. Therefore, at each detection position in this section, there is an error (slit position signal error) corresponding to each of the two actual positions. In this case, the generation unit 720 generates the correction value Scal for correcting an error in magnitude between the errors corresponding to the two actual positions. Here, the “magnitude between two errors” indicates a magnitude between two errors excluding both ends thereof, and means a magnitude between these two errors without adopting only one of the two errors.
For example, in response to the fact that the two or more actual positions correspond to the same detection position, the generation unit 720 generates the correction value Scal for correcting an error by a magnitude obtained by averaging the errors at the two or more actual positions with respect to the slit position signal SS. The generation unit 720 may adjust the correction value Scal for correcting an error by the magnitude between the errors at the two or more actual positions such that the error between the corrected slit position signal and the slit number at each of the two or more actual positions falls within the reference range.
Even when the measurement value (detection position) of the mechanical angle is in a range other than 153 degrees to 162 degrees, there is a portion where two actual positions having different slit numbers correspond to one detection position. In
As indicated by the solid line in the present drawing, the calibration apparatus 700 generates the correction value Scal for correcting an error by the magnitude between the errors at each of the two or more actual positions at each detection position, and thus the correction value Scal capable of correcting the slit position signal error illustrated in
Note that the generation unit 720 described above generates the correction value Scal for each detection position. Alternatively, the generation unit 720 may generate the correction value for each section of the detection position acquired by the acquisition unit 710. For example, the generation unit 720 may generate the correction value Scal for each section obtained by dividing one cycle of the first slit (for example, for each 15° of the interpolation angle). In this case, the generation unit 720 may calculate the correction value Scal in the section by averaging the correction values for the respective detection positions calculated in the section.
The generation unit 720 may calculate a parameter of the correction function representing the correction value Scal for each section of the detection position acquired by the acquisition unit 710. For example, for each slit cycle of the first slit, the generation unit 720 may approximate the correction value Scal in the range of the interpolation angles of 0° to 360° in the slit cycle by a predefined correction function such as Fourier series expansion. In the case of using Fourier series expansion, the generation unit 720 may calculate correction factors (parameters) Ak and δk of the correction function that approximates the correction value Scal at the interpolation angle θM with the correction value=ΣkAk×sin(keθM+δk).
For example, the generation unit 720 may calculate the correction factor by calculating the correction value Scal corresponding to an interpolation angle of each predefined angle as a representative point and performing Fourier series expansion on a set of representative points. The output unit 740 writes the correction factor calculated by the generation unit 720 in the correction table 150. When receiving the slit number SM from the slit number calculation unit 140 in actual use, the slit number correction unit 160 may read the correction factor stored in the correction table 150 in association with the slit number SM and calculate the correction value Scal by the correction function using the correction factor.
Conversely, depending on the detection position, the slit position signal error may be allocated to another slit number, and as a result, the corresponding actual position may not exist. In the example of
Here, since the detection position where the corresponding actual position does not exist is a position that has not been observed even when the actual position of the mobile body 100 is changed in the entire movable range in the calibration process, the detection position does not occur even in actual use as long as an error or the like different from that at the time of the calibration process does not occur. However, the position detection apparatus 10 may detect such a detection position due to a temporary error, fluctuation, or the like.
When the margin ε is subtracted from the slit position signal SS, in a case where the slit position signal error is positive, the slit position signal error does not move to another slit number until the slit position signal error becomes larger than the boundary (+0.5 or the like) of the slit number by +ε. On the other hand, in a case where the slit position signal error is negative, the slit position signal error moves to another slit number with a point where the slit position signal error is larger than the boundary (−0.5 or the like) of the slit number by ε as a boundary.
When the margin ε is added from the slit position signal SS, in a case where the slit position signal error is positive, the slit position signal error moves to another slit number with a point where the slit position signal error is smaller than the boundary (+0.5 or the like) of the slit number by ε as a boundary. On the other hand, in a case where the slit position signal error is negative, the slit position signal error does not move to another slit number until the slit position signal error becomes further smaller than the boundary (−0.5 or the like) of the slit number by ε.
In this way, by adding or subtracting the margin ε to or from the slit position signal SS to specify the slit number, as illustrated in
Even when the detection position detected at the time of actual use of the calibration apparatus 700 fluctuates from the detection position detected at the time of calibration, and as a result, the slit position signal may fluctuate, the calibration apparatus 700 can prepare the correction value generated using the slit position signal error simulating such fluctuation in advance by adding or subtracting the margin ε to or from the slit position signal. As a result, the position detection apparatus 10 can use a robust correction value even in a case where the output of the sensor in each detection unit 120 fluctuates due to, for example, a change in environmental temperature during actual use.
The encoder 1310 calculates a detection position of the mobile body 1301 on the basis of the three detection values detected from the three tracks of the mobile body 1301. The encoder 1310 includes a plurality of detection units 1320a to 1320c (also referred to as a “detection unit 1320”), a plurality of slit position signal calculation units 1330a and 1330b (also referred to as a “slit position signal calculation unit 1330”), a slit number calculation unit 1340, a correction table 1350, a slit number correction unit 1360, and a position calculation unit 1370.
Each of the detection units 1320a to 1320c is provided corresponding to each of the first to third tracks, and outputs a detection value detected from the corresponding track. In the present modification, the detection unit 1320a functions as a first detection unit, and detects and outputs a first detection value from the first track. The detection unit 1320b functions as a second detection unit, and detects and outputs a second detection value from the second track. The detection unit 1320c functions as a third detection unit, and detects and outputs a third detection value from the third track. Here, the detection units 1320a to 1320c respectively output (electric) interpolation angles θM, θN, and θS having one cycle(=360 degrees) between adjacent slits in the corresponding track as detection values. Each of the detection units 1320 is similar to the detection unit 120 in other points.
Each of the slit position signal calculation units 1330a and 1330b is connected to the plurality of detection units 1320. The slit position signal calculation unit 1330a outputs a first slit position signal SMSB using the plurality of detection values from the plurality of detection units 1320. In the present modification, the first slit position signal SMSB relates to an upper bit among the slit numbers of the first track. The slit position signal calculation unit 1330b outputs a second slit position signal SLSB using the plurality of detection values from the plurality of detection units 1320. In the present modification, the second slit position signal SLSB relates to the lower bit among the slit numbers of the first track.
For any combination of the first number NM, the second number NN, and the third number NS that can finally calculate the slit number SM of the first track, the first slit position signal SMSB and the second slit position signal SMSB can be generalized by the following Expressions (4) and (5).
Here, pM, pN, pS, qM, qN, and qS are integer values determined so that the slit number SM of the first track can be finally calculated. For example, when the first number NM=16, the second number NN=15, and the third number NS=12, (pM, pN, pS)=(3, −4, 1) and (qM, qN, qS)=(3, 0, −4) may be set. In this manner, each slit position signal calculation unit 1330 can calculate each slit position signal by weighting the plurality of detection values from the plurality of detection units 1320 with a predefined integer and calculating the sum.
The slit number calculation unit 1340 is connected to the plurality of slit position signal calculation units 1330. Using the slit position signals SMSB and SLSB output from the plurality of slit position signal calculation units 1330, the slit number calculation unit 1340 calculates the slit number SM (that is, the slit number of the slit in which the mobile body 1301 is located) in units of first slits of a predefined number. In the present modification, the slit number calculation unit 1340 calculates the slit number SM by the following Expression (6).
S
M=mod(k*round(SMSB)+round(SLSB),NM) (6)
Here, k is a positive integer value indicating the weight of the MSB. The slit number calculation unit 1340 can calculate the slit number in units of first slits by adding a value obtained by rounding off the second slit position signal SLSB in units of slit numbers to a value obtained by rounding off the first slit position signal SMSB in units of slit numbers of the significant digits and multiplying the value by the weight k of the MSB. The slit number calculation unit 1340 can calculate the slit number SM by normalizing the slit number to values from 0 to NM−1.
Note that k can be uniquely determined according to the values of p and q so that the slit number SM can be calculated. For example, in a case where (pM, pN, pS)=(3, −4, 1) and (qM, qN, qS)=(0, 4, −5), k=5 may be set. A set of k, p, and q may be determined so as to satisfy relationships of (pM, pN, pS)=(3, −4, 1) and (qM, qN, qS)=(3, 0, −4)−(k−4)×(pM, pN, pS). Here, as the absolute value of q (the magnitude of the q vector) is smaller, a robust result is obtained with respect to a specific error of the slit, so that k=4 may be adopted from this viewpoint.
The detection position of the mobile body 1301 before the correction of the slit number is represented by a set of the slit number SM and the interpolation angle θM. In the present modification, the mechanical angle θd as an example of the detection position is expressed by the above-described Expression (1) similarly to the encoder 110.
The correction table 1350 is connected to the detection unit 1320a and the slit number calculation unit 1340. The correction table 1350 stores, for each slit number, a set of a correction value SMcal of the first slit position signal SMSB and a correction value SLcal of the second slit position signal SLSB according to the first detection signal (interpolation angle θM) detected from the first track. The correction table 1350 outputs the correction values SMcal and SLcal corresponding to the first detection signal among the sets of correction values associated with the slit number SM received from the slit number calculation unit 1340.
The slit number correction unit 1360 is connected to the plurality of slit position signal calculation units 1330 and the correction table 1350. The slit number correction unit 1360 corrects the plurality of slit position signals SMSB and SLSB received from the slit position signal calculation unit 1330 using the correction values SMcal and SLcal received from the correction table 150. Then, the slit number correction unit 160 calculates the slit number S′M after correction on the basis of the plurality of corrected slit position signals. In the present modification, the slit number correction unit 1360 calculates the slit number S′M after correction by the following Expression (7).
S′
M=mod(k*round(SMSB+SMcal)+round(SLSB+SLcal),NM) (7)
Note that Expression (7) is obtained by replacing the slit position signals SMSB and SLSB in Expression (6) with the slit position signals SMSB+SMcal and SLSB+SLcal after correction, respectively.
The position calculation unit 1370 is connected to the detection unit 1320a and the slit number correction unit 1360. The position calculation unit 1370 calculates the position (position after correction) of the mobile body 1301 in the same manner as the position calculation unit 170 in
Next, calibration of the position detection apparatus 1300 illustrated in
Here, the acquisition unit 710 acquires, as the value indicating the actual position of the mobile body 1301, SMSBideal indicating the ideal value of the first slit position signal SMSB and the value corresponding to the significant digits of the slit number of the actual position, SLSBideal indicating the ideal value of the second slit position signal SLSB and the value corresponding to the less significant digits of the slit number of the actual position, and θMideal indicating the interpolation angle of the actual position from the encoder used as a calibration reference. The acquisition unit 710 acquires the first slit position signal SMSB, the second slit position signal SLSB, and the interpolation angle θM from the encoder 1310 as detection positions of the mobile body 1301. The generation unit 720 converts the data format of data in which the detection position is associated with each actual position of the mobile body 1301, and obtains data in which one or two or more actual positions are associated with each detection position of the mobile body 1301.
Similarly to
With respect to the first slit position signal SMSB, the determination unit 716 determines whether two or more actual positions in which the slit numbers of the significant digits serving as the unit of the first slit position signal SMSB are at least partially different correspond to the same detection position, similarly to S820 of
When the correction value for each detection position is generated, the inspection unit 730 inspects whether a mistake occurs in the upper slit number calculated using the slit position signal corrected by the correction value SMcal generated by the generation unit 720 with respect to the first slit position signal SMSB, similarly to S870 of
The output unit 740 outputs the correction value for each inspection position and each of the first and second slit position signals generated by the generation unit 720, similarly to S880 in
The calibration apparatus 700 according to the present modification can generate the correction value for appropriately correcting the track number in the encoder 1310 that detects the position of mobile body 1301 using the mobile body 1301 having three tracks. Similarly, the calibration apparatus 700 can output a correction value for correcting each of one or a plurality of slit position signals calculated by a weighted sum of a plurality of detection values detected from a plurality of tracks also for an encoder that detects a position of a mobile body having four or more tracks.
Various embodiments of the present invention may also be described with reference to flowcharts and block diagrams, where the blocks may represent (1) a stage of processing in which an operation is performed or (2) a section of a device that is responsible for performing the operation. Certain stages and sections may be implemented by dedicated circuitry, programmable circuitry provided with computer readable instructions stored on a computer readable medium, and/or a processor provided with computer readable instructions stored on a computer readable medium. The dedicated circuitry may include digital and/or analog hardware circuits, and may include integrated circuits (ICs) and/or discrete circuits. The programmable circuitry may include reconfigurable hardware circuits including memory elements such as logic AND, logic OR, logic XOR, logic NAND, logic NOR, and other logic operations, flip-flops, registers, field programmable gate arrays (FPGA), programmable logic arrays (PLA), and the like.
The computer readable medium may include any tangible device capable of storing instructions for execution by a suitable device, so that the computer readable medium having the instructions stored therein will have a product including instructions that can be executed to create means for performing the operations designated in flowcharts or block diagrams. Examples of the computer readable medium may include an electronic storage medium, a magnetic storage medium, an optical storage medium, an electromagnetic storage medium, a semiconductor storage medium, and the like. More specific examples of the computer readable medium may include a floppy (registered trademark) disk, a diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an electrically erasable programmable read-only memory (EEPROM), a static random access memory (SRAM), a compact disc read-only memory (CD-ROM), a digital versatile disk (DVD), a Blu-ray (registered trademark) disk, a memory stick, an integrated circuit card, and the like.
The computer readable instructions may include source code or object code written in any combination of one or more programming languages, including assembler instructions, instruction-set-architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, state-setting data, or an object oriented programming language such as JAVA (registered trademark), C++, Smalltalk (registered trademark), or the like, and conventional procedural programming languages such as the “C” programming language or similar programming languages.
The computer readable instructions may be provided for a processor or programmable circuitry of a general purpose computer, special purpose computer, or other programmable data processing devices such as a computer locally or via a wide area network (WAN) such as a local area network (LAN), the Internet, or the like, and execute the computer readable instructions to create means for executing the operations designated in flowcharts or block diagrams. Examples of the processor include a computer processor, a processing unit, a microprocessor, a digital signal processor, a controller, a microcontroller, and the like.
The computer 2200 according to the present embodiment includes the CPU 2212, a RAM 2214, a graphic controller 2216, and a display device 2218, which are interconnected by a host controller 2210. The computer 2200 also includes input/output units such as a communication interface 2222, a hard disk drive 2224, a DVD-ROM drive 2226, and an IC card drive, which are connected to the host controller 2210 via an input/output controller 2220. The computer also includes legacy input/output units such as a ROM 2230 and a keyboard 2242, which are connected to the input/output controller 2220 via an input/output chip 2240.
The CPU 2212 operates according to programs stored in the ROM 2230 and the RAM 2214, thereby controlling each unit. The graphic controller 2216 acquires image data generated by the CPU 2212 in a frame buffer or the like provided in the RAM 2214 or in itself, such that the image data is displayed on the display device 2218.
The communication interface 2222 communicates with other electronic devices via a network. The hard disk drive 2224 stores programs and data used by the CPU 2212 in the computer 2200. The DVD-ROM drive 2226 reads a program or data from the DVD-ROM 2201 and provides the program or data to the hard disk drive 2224 via the RAM 2214. The IC card drive reads programs and data from the IC card, and/or writes programs and data to the IC card.
The ROM 2230 stores therein boot programs and the like executed by the computer 2200 at the time of activation, and/or programs that depend on the hardware of the computer 2200. The input/output chip 2240 may also connect various input/output units to the input/output controller 2220 via parallel ports, serial ports, keyboard ports, mouse ports, or the like.
The program is provided by a computer readable medium such as the DVD-ROM 2201 or the IC card. The program is read from a computer readable medium, installed in the hard disk drive 2224, the RAM 2214, or the ROM 2230 which are also examples of the computer readable medium, and executed by the CPU 2212. The information processing described in these programs is read by the computer 2200 and provides cooperation between the programs and various types of hardware resources. The apparatus or method may be configured by implementing operations or processing of information according to use of the computer 2200.
For example, in a case where communication is performed between the computer 2200 and an external device, the CPU 2212 may execute a communication program loaded in the RAM 2214 and instruct the communication interface 2222 to perform communication processing on the basis of a process described in the communication program. Under the control of the CPU 2212, the communication interface 2222 reads transmission data stored in a transmission buffer processing area provided in a recording medium such as the RAM 2214, the hard disk drive 2224, the DVD-ROM 2201, or the IC card, transmits the read transmission data to the network, or writes reception data received from the network in a reception buffer processing area or the like provided on the recording medium.
In addition, the CPU 2212 may cause the RAM 2214 to read all or a necessary part of a file or database stored in an external recording medium such as the hard disk drive 2224, the DVD-ROM drive 2226 (DVD-ROM 2201), the IC card, or the like, and may execute various types of processing on data on the RAM 2214. Next, the CPU 2212 writes back the processed data to the external recording medium.
Various types of information such as various types of programs, data, tables, and databases may be stored in a recording medium and subjected to information processing. The CPU 2212 may execute various types of processing on the data read from the RAM 2214, including various types of operations, information processing, conditional determination, conditional branching, unconditional branching, information retrieval/replacement, and the like, which are described throughout the present disclosure and designated by a command sequence of a program, and writes back the results to the RAM 2214. Further, the CPU 2212 may retrieve information in a file, a database, or the like in the recording medium. For example, in a case where a plurality of entries each having the attribute value of a first attribute associated with the attribute value of a second attribute is stored in the recording medium, the CPU 2212 may retrieve the plurality of entries for an entry matching the condition in which the attribute value of the first attribute is designated, read the attribute value of the second attribute stored in the entry, and thereby acquire the attribute value of the second attribute associated with the first attribute satisfying the predefined condition.
The programs or software modules described above may be stored in a computer readable medium on or near the computer 2200. In addition, a recording medium such as a hard disk or a RAM provided in a server system connected to a dedicated communication network or the Internet can be used as a computer readable medium, thereby providing a program to the computer 2200 via the network.
While the embodiments of the present invention have been described, the technical scope of the invention is not limited to the above described embodiments. It is apparent to persons skilled in the art that various alterations and improvements can be added to the above-described embodiments. It is also apparent from the scope of the claims that the embodiments added with such alterations or improvements can be included in the technical scope of the invention.
The operations, procedures, steps, and stages of each process performed by an apparatus, system, program, and method shown in the claims, embodiments, or diagrams can be performed in any order as long as the order is not indicated by “prior to,” “before,” or the like and as long as the output from a previous process is not used in a later process. Even if the process flow is described using phrases such as “first” or “next” in the claims, embodiments, or diagrams, it does not necessarily mean that the process must be performed in this order.
Number | Date | Country | Kind |
---|---|---|---|
2021-107088 | Jun 2021 | JP | national |
2022-068806 | Apr 2022 | JP | national |