Estimation device, estimation method, and program
The estimation device improves accuracy in estimating the position and orientation of folding device parts by switching between magnetic and gyro sensors based on a difference threshold, addressing hysteresis and integration errors in existing technologies.
Patent Information
- Application Number
- JP2024005749
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-05-29
- Filing Date
- 2024-01-18
- Publication Date
- 2024-12-11
AI Technical Summary
Existing methods for estimating the position or orientation of a second part relative to a first part using motion and magnetic sensors are inaccurate due to hysteresis and integration errors, particularly in folding devices like smartphones.
An estimation device that combines magnetic and gyro sensors to estimate the position and orientation by switching between sensor measurements based on a difference threshold, using magnetic sensors in hysteresis-free ranges and gyro sensors for longer periods to minimize errors.
The method enhances accuracy in estimating the position and orientation of folding device parts by reducing hysteresis and integration errors, maintaining precision over time.
Smart Images

Figure 2024171303000001_ABST
Abstract
Description
[Technical field]
[0001] The present invention relates to an estimation device, an estimation method, and a program. [Background technology]
[0002] Patent Document 1 describes a method of determining a bending angle based on at least one of a first angle or a second angle based on a first index related to a first angle and a state of the first angle based on a motion sensor and a second index related to a state of the second angle based on a magnetic sensor. Patent Document 2 describes a method of determining an angle using a motion sensor and a magnetic sensor, in which if the angle is in a predetermined dead zone, the angle is determined using the motion sensor. [Prior art document] [Patent documents] [Patent Document 1] U.S. Patent No. 11,300,995 [Patent Document 2] International Publication No. 2021 / 101171 Summary of the Invention [Problem to be solved by the invention]
[0003] It is desirable to further improve the accuracy of estimating the position or orientation of the second part relative to the first part. [Means for solving the problem]
[0004] An estimation device according to an aspect of the present invention may be an estimation device that estimates at least one of a position and an orientation of the second part relative to the first part in an apparatus including a first part, a second part, a movable mechanism that changes at least one of a position and an orientation of the second part relative to the first part, a magnetic sensor provided on one of the first part and the second part, a magnet unit provided on the other of the first part and the second part and providing a magnetic field measured by the magnetic sensor, and a gyro sensor. The estimation device may include a derivation unit that derives a difference between a first value based on a first measurement value corresponding to the position or orientation of the second part relative to the first part measured by the magnetic sensor and a second value based on a second measurement value corresponding to the position or orientation of the second part relative to the first part measured by the gyro sensor. The estimation device may include an estimation unit that estimates the position and orientation of the second part relative to the first part based on at least one of the first value and the second value and the difference.
[0005] In the estimation device, the estimation unit may select at least one of the first value and the second value based on the difference, and estimate the position and orientation of the second part relative to the first part based on the selected at least one of the first value and the second value.
[0006] In any of the estimation devices, the estimation unit may estimate the position and orientation of the second part relative to the first part based on the first value when the difference is smaller than a threshold value, and the estimation unit may estimate the position and orientation of the second part relative to the first part based on the second value when the difference is equal to or greater than the threshold value.
[0007] In any of the estimation devices, when the difference is greater than or equal to the threshold, the estimation unit may estimate the position and orientation of the second part relative to the first part based on a previous estimation result and the second value.
[0008] In any of the estimation devices, the estimation unit may estimate the position and orientation of the second part relative to the first part based on the first value of a first weighting based on the difference and the second value of a second weighting based on the difference.
[0009] In any of the estimation devices, the first weighting may decrease and the second weighting may increase in response to an increase in the difference.
[0010] In any of the estimation devices, when the difference is smaller than a threshold value, the estimation unit may estimate the position and orientation of the second part relative to the first part based on the first value and relationship information indicating the relationship between the first value based on a first measurement value measured by the magnetic sensor and the position or orientation of the second part relative to the first part.
[0011] In any of the estimating devices, the first value may be based on a conversion of the first measurement into an angle or an angular velocity.
[0012] In any of the estimation devices, the second value may be based on the second measurement converted to an angle, a magnetic field, or a magnetic field converted to an angle, or an integration of the second measurement.
[0013] In any of the estimation devices, the first value or the second value may be based on a value that is based on a result of estimation by the estimation unit.
[0014] In any of the estimation devices, the estimation unit may continue estimating the position and orientation of the second part relative to the first part based on the second value if the difference is greater than or equal to the threshold during a predetermined period of time from a point in time when the difference changes from a state where it is smaller than the threshold to a state where it is greater than or equal to the threshold and estimation of the position and orientation of the second part relative to the first part based on the second value begins, and may switch to estimating the position and orientation of the second part relative to the first part based on the first value if the difference is still greater than or equal to the threshold after the predetermined period of time has elapsed from that point in time.
[0015] In any of the estimation devices, the derivation unit may derive the difference between the first value and the second value after matching units of the first value and the second value.
[0016] In any of the estimation devices, the unit may be an angle, a magnetic flux density, an amount of change in angle, an amount of change in magnetic flux density, or an angular velocity.
[0017] An estimation method according to an aspect of the present invention may be an estimation method for estimating at least one of a position and an orientation of the second part relative to the first part in an apparatus including a first part, a second part, a movable mechanism for changing at least one of a position and an orientation of the second part relative to the first part, a magnetic sensor provided on one of the first part and the second part, a magnet unit provided on the other of the first part and the second part and providing a magnetic field measured by the magnetic sensor, and a gyro sensor. The estimation method may include a step of deriving a difference between a first value based on a first measurement value corresponding to the position or orientation of the second part relative to the first part measured by the magnetic sensor and a second value based on a second measurement value corresponding to the position or orientation of the second part relative to the first part measured by the gyro sensor. The estimation method may include a step of estimating the position and orientation of the second part relative to the first part based on at least one of the first value and the second value and the difference.
[0018] A program according to an aspect of the present invention may be a program for making a computer function as an estimation device that estimates at least one of a position and an orientation of the second part relative to the first part in an apparatus including a first part, a second part, a movable mechanism that changes at least one of a position and an orientation of the second part relative to the first part, a magnetic sensor provided on one of the first part and the second part, a magnet unit provided on the other of the first part and the second part and providing a magnetic field measured by the magnetic sensor, and a gyro sensor. The program may cause the computer to execute a step of deriving a difference between a first value based on a first measurement value corresponding to the position or orientation of the second part relative to the first part measured by the magnetic sensor and a second value based on a second measurement value corresponding to the position or orientation of the second part relative to the first part measured by the gyro sensor. The program may cause the computer to execute a step of estimating the position and orientation of the second part relative to the first part based on at least one of the first value and the second value and the difference.
[0019] The above summary of the invention does not list all of the features of the present invention. Also, subcombinations of these features may also be inventions. [Brief description of the drawings]
[0020] [Figure 1] FIG. 1 is a diagram showing an example of an external perspective view of a folding terminal. [Diagram 2] FIG. 2 is a diagram showing an example of an external perspective view of a folding terminal in a state in which a first portion and a second portion are folded. [Diagram 3] FIG. 2 is a diagram showing an example of an external perspective view of a folding terminal in a state in which a first portion and a second portion are not folded. [Figure 4] FIG. 2 is a diagram illustrating a schematic circuit configuration of a folding terminal. [Diagram 5] FIG. 2 is a diagram illustrating an example of a functional block of the estimation device. [Figure 6]FIG. 4 is a diagram showing an example of a look-up table showing the relationship between the strength of a magnetic field and the angle formed between a first portion and a second portion. [Figure 7] 11 is a diagram for explaining an integral error of an angle based on a measurement value of a gyro sensor. FIG. [Figure 8] 11 is a diagram for explaining angle estimation using an acceleration sensor. FIG. [Figure 9] 11 is a diagram for explaining angle estimation using an acceleration sensor. FIG. [Figure 10] 11A and 11B are diagrams illustrating changes over time in a sensor used for estimation by an estimation unit. [Figure 11A] 11 is a diagram showing an example of a change over time in an expected angle value and an estimated angle when an angle is estimated using only a magnetic sensor; FIG. [Figure 11B] 11B is a diagram showing an example of a change over time in the angle error between the expected value and the angle of the estimation result in FIG. 11A. FIG. [Figure 12A] 10A and 10B are diagrams illustrating an example of a temporal change in an expected value of an angle and an angle estimated by an estimation unit in the present embodiment. [Figure 12B] 12B is a diagram showing an example of a change over time in the angle error between the expected value and the angle of the estimation result in FIG. 12A. FIG. [Figure 13] 13 is a flowchart illustrating an example of a procedure in which an estimation unit estimates an angle. [Figure 14] 13 is a flowchart showing another example of the procedure in which the derivation unit derives a difference. [Figure 15] 13 is a flowchart showing another example of the procedure in which the derivation unit derives a difference. [Figure 16] 13 is a flowchart showing another example of a procedure in which the estimation unit estimates an angle. [Figure 17] 13 is a flowchart showing another example of a procedure in which the estimation unit estimates an angle. [Figure 18A] FIG. 13 is a diagram showing a retracted state of the device in which the estimator estimates the position of the second part relative to the first part. [Figure 18B] FIG. 13 is a diagram showing an extended state of the device in which the estimation unit estimates the position of the second part relative to the first part. [Figure 19] FIG. 2 illustrates an example of a hardware configuration. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0021] The present invention will be described below through embodiments of the invention, but the following embodiments do not limit the scope of the invention according to the claims. Furthermore, not all of the combinations of features described in the embodiments are necessarily essential to the solution of the invention.
[0022] 1 shows an example of an external perspective view of a foldable terminal 10. The foldable terminal 10 may be a mobile terminal such as a smartphone, a mobile phone, a tablet, a notebook computer, or a small personal computer. The foldable terminal 10 includes a foldable display 14. The display 14 may be an organic electroluminescence (EL) display.
[0023] The folding terminal 10 includes a first portion 11, a second portion 12, and a hinge mechanism 16. The hinge mechanism 16 couples the first portion 11 to the second portion 12 so as to be foldable. The hinge mechanism 16 couples the first portion 11 to the second portion 12 so as to be rotatable about a rotation axis 18 along the X-axis. The first portion 11 and the second portion 12 are part of a housing of the folding terminal 10. The first portion 11 and the second portion 12 may be integrally configured. As the first portion 11 changes from a folded state to an unfolded state with respect to the second portion 12, the angle θ between the first portion 11 and the second portion 12 changes from 0 degrees to 180 degrees.
[0024] 2 shows an example of an external perspective view of the folding terminal 10 in a state in which the first portion 11 and the second portion 12 are folded. That is, when the angle formed between the first portion 11 and the second portion 12 is 0 degrees, the first portion 11 is in a closed state relative to the second portion 12.
[0025] 3 shows an example of an external perspective view of the folding terminal 10 in a state in which the first portion 11 and the second portion 12 are not folded. That is, the angle between the first portion 11 and the second portion 12 is 180 degrees, and the first portion 11 is in an open state relative to the second portion 12.
[0026] FIG. 4 is a schematic diagram showing a circuit configuration of the folding terminal 10. The folding terminal 10 includes a magnet unit 20, a magnetic sensor 30, a gyro sensor 40, and an estimation device 100. The magnetic sensor 30, the estimation device 100, and the gyro sensor 40 are provided in the first portion 11. The magnet unit 20 is provided in the hinge mechanism 16. The hinge mechanism 16 may constitute a part of at least one of the first portion 11 and the second portion 12. The magnet unit 20 may be provided in the second portion 12. At least one of the magnetic sensor 30, the gyro sensor 40, and the estimation device 100 may be provided in the second portion 12. The magnetic sensor 30 may be provided in the hinge mechanism 16, and the magnet unit 20 may be provided in the first portion 11 or the second portion 12. The magnetic sensor 30 may be provided in one of the first portion 11 and the second portion 12, and the gyro sensor 40 may be provided in the other of the first portion 11 and the second portion 12. The arrangement of the magnet unit 20, the magnetic sensor 30, the gyro sensor 40, and the estimation device 100 is not limited to the above. The magnet unit 20, the magnetic sensor 30, the gyro sensor 40, and the estimation device 100 may be arranged in any positions as long as the estimation device 100 can estimate the angle formed between the first portion 11 and the second portion 12.
[0027] The magnetic sensor 30 detects the strength of the magnetic field (magnetic flux density) in three axial directions (X-axis, Y-axis, and Z-axis). The magnetic sensor 30 outputs a voltage or current according to the strength of the magnetic field. The magnetic sensor 30 may be a Hall element. In the process of folding the first portion 11 onto the second portion 12, the positional relationship between the magnetic sensor 30 and the magnet unit 20 changes, and the strength of the magnetic field of the magnet unit 20 detected by the magnetic sensor 30 changes. That is, the strength of the magnetic field detected by the magnetic sensor 30 changes depending on the angle formed by the first portion 11 and the second portion 12. The gyro sensor 40 detects the angular velocity of the folding terminal 10 around the axes along the X-axis, Y-axis, and Z-axis. The folding terminal 10 may be provided with an inertial measurement unit (IMU) that functions as the gyro sensor 40. The IMU detects the angular velocity of the folding terminal 10 about axes along the X-axis, Y-axis, and Z-axis, as well as the acceleration of the folding terminal 10 in the X-axis, Y-axis, and Z-axis directions of the folding terminal 10.
[0028] The estimation device 100 estimates the positional relationship between the first portion 11 and the second portion 12 based on at least one of the strength of the magnetic field (magnetic flux density) detected by the magnetic sensor 30 and the angular velocity detected by the gyro sensor 40. The estimation device 100 estimates the angle formed between the first portion 11 and the second portion 12 based on at least one of the strength of the magnetic field (magnetic flux density) detected by the magnetic sensor 30 and the angular velocity detected by the gyro sensor 40.
[0029] The folding terminal 10 may execute a predetermined operation based on the angle estimated by the estimation device 100. The folding terminal 10 may display different images on the display portion of the first part 11 and the display portion of the second part 12 based on the angle estimated by the estimation device 100. For example, when the angle estimated by the estimation device 100 is within a predetermined angle range such as 90 degrees to 120 degrees, the folding terminal 10 may display an operation function such as a keyboard on the display portion of the second part 12, and display a display function that displays an image, such as a document or a video, according to the content operated by the operation function on the display portion of the first part 11.
[0030] 5 shows an example of functional blocks of the estimation device 100. The estimation device 100 includes a control unit 110, a storage unit 120, and a communication I / F 130. The control unit 110 may be configured with a microprocessor such as a CPU or MPU, a microcontroller such as an MCU, or the like. The control unit 110 may be configured with a SoC (system on chip). The storage unit 120 may be a computer-readable recording medium, and may include at least one of an SRAM, a DRAM, an EPROM, an EEPROM (registered trademark), and a flash memory such as a USB memory. The communication I / F 130 is an interface that communicates with the magnetic sensor 30 and the gyro sensor 40.
[0031] The control unit 110 includes a derivation unit 112 and an estimation unit 114. Here, it is considered that the estimation unit 114 estimates the angle between the first portion 11 and the second portion 12 based on relationship information indicating the relationship between the angle θ between the first portion 11 and the second portion 12 and the strength of the magnetic field, and the output result of the magnetic sensor 30.
[0032] The relationship information may be, for example, as shown in FIG. 6, a reference table (discrete) F1 indicating the relationship between the strength of the magnetic field and the angle θ between the first portion 11 and the second portion 12, or a reference table (continuous) F2 expressed by a predetermined polynomial. The relationship information may be, for example, information indicating a function indicating the angle θ according to the strength of the magnetic field. The relationship information may be information indicating an n-th degree polynomial (n is a positive integer) with the strength of the magnetic field and the angle θ as variables. The relationship information may be information indicating a cubic polynomial with the strength of the magnetic field and the angle θ as variables. The cubic polynomial is expressed as Y=aX 3 +bX 2 +cX+d, where X indicates the angle θ and Y indicates the strength of the magnetic field. a, b, c, and d are constants. The relationship information may be stored in advance in the storage unit 120. The relationship information may be generated according to experimental results before shipping of the folding terminal 10.
[0033] However, as shown by the solid line L1, the relationship between the magnetic field strength and the angle θ between the first part 11 and the second part 12 may not be the same when the measurement value actually measured by the magnetic sensor 30 changes from a state in which the first part 11 and the second part 12 are folded to a state in which the first part 11 and the second part 12 are not folded, and when the measurement value actually measured by the magnetic sensor 30 changes from a state in which the first part 11 and the second part 12 are not folded to a state in which the first part 11 and the second part 12 are folded. That is, the relationship between the magnetic field strength and the angle θ between the first part 11 and the second part 12 may have hysteresis. The hysteresis may be caused by the influence of magnetic hysteresis. In addition, when the folding terminal 10 is opened or closed, the positional relationship between the magnet part 20 and the magnetic sensor 30 may change slightly depending on the degree of force applied to the hinge. This effect may also appear as hysteresis in the strength of the magnetic field measured by the magnetic sensor 30. Therefore, the estimation unit 114 may not be able to accurately estimate the angle θ between the first portion 11 and the second portion 12 based only on the reference table (discrete) F1 or the reference table (continuous) F2 as shown in FIG.
[0034] The estimation unit 114 may estimate the angle θ between the first portion 11 and the second portion 12 based on a measurement value measured by the gyro sensor 40. The measurement value measured by the gyro sensor 40 is an angular velocity. When using the measurement value measured by the gyro sensor 40, the estimation unit 114 may integrate the angular velocity to derive a relative amount of change in angle, and add the amount of change in angle to the previous estimated angle to estimate the angle between the first portion 11 and the second portion 12. However, integrating the angular velocity causes errors to accumulate. Therefore, as shown in FIG. 7, the error θ increases in proportion to the time since the estimation unit 114 started the estimation. offset In other words, the accuracy of the angle estimation using the measurement value measured by the gyro sensor 40 may decrease depending on the time from when the estimation unit 114 starts the estimation. In the example shown in FIG. 7, the error θ offset However, the error θ offsetmay also increase in the positive direction.
[0035] Furthermore, when the folding terminal 10 has two acceleration sensors 50a, 50b, the estimation unit 114 may estimate the angle between the first portion 11 and the second portion 12 by deriving an absolute angle based on the angle between the acceleration vectors measured by each of the two acceleration sensors. In this method, as shown in FIG. 8, when the acceleration vectors measured by the two acceleration sensors have different components in the direction of gravity, the estimation unit 114 can estimate the angle between the first portion 11 and the second portion 12. However, as shown in FIG. 9, depending on the posture of the first portion 11 and the second portion 12, there are cases where the acceleration vectors measured by the two acceleration sensors 50a, 50b do not have different components in the direction of gravity. In this case, the estimation unit 114 cannot estimate the angle between the first portion 11 and the second portion 12.
[0036] As described above, there are cases where the magnetic sensor 30, the gyro sensor 40, and the acceleration sensors 50a and 50b cannot estimate the angle between the first portion 11 and the second portion 12 with high accuracy.
[0037] Therefore, in this embodiment, the estimation unit 114 estimates the measured value m(μT) measured by the magnetic sensor 30 and the measured value ω measured by the gyro sensor 40. g The attitude of the second portion 12 relative to the first portion 11, that is, the angle between the first portion 11 and the second portion 12, is estimated more accurately based on at least one of the rotational speed (rad / s) and the rotational speed (rad / s).
[0038] Here, the relationship between the measurement value m of the magnetic sensor 30 and the angle θ between the first portion 11 and the second portion 12 may have hysteresis as described above. However, the angle having hysteresis is often limited to a certain angle range. In an angle range without hysteresis, the estimation unit 114 is likely to be able to accurately estimate the angle θ between the first portion 11 and the second portion 12 based on the measurement value m of the magnetic sensor 30.
[0039] In addition, the measurement value ω of the gyro sensor 40 g When using the previous angle θ t-1 The measured value ω g The change in angle Δθ based on g In other words, the angle θ between the first portion 11 and the second portion 12 is estimated by adding the measurement value ω g When the angle is estimated using this method, the integration error is small. Therefore, if a long time does not elapse, the estimation unit 114 is likely to be able to accurately estimate the angle θ between the first portion 11 and the second portion 12.
[0040] Therefore, in an angle range without hysteresis, the estimation unit 114 preferentially uses the measurement value m of the magnetic sensor 30 to estimate the angle θ between the first portion 11 and the second portion 12. On the other hand, in an angle range with hysteresis, the estimation unit 114 preferentially uses the measurement value ω of the gyro sensor 40 g is preferentially used to estimate the angle θ between the first portion 11 and the second portion 12.
[0041] In order to determine whether the open / closed state of the folding terminal 10 is within an angle range having hysteresis, the derivation unit 112 calculates a measurement value m corresponding to the attitude of the second portion 12 relative to the first portion 11 measured by the magnetic sensor 30 and a measurement value ω corresponding to the attitude of the second portion 12 relative to the first portion 11 measured by the gyro sensor 40. g Derive the difference diff between .
[0042] The derivation unit 112 calculates the measurement value m and the measurement value ω g After matching the units, the measurement value m and the measurement value ω g Derive the difference diff between the measured value m and the measured value ω g The value after unit matching is the first value based on the measured value m and the measured value ω gis an example of a second value based on the above. The units are angle (degrees), magnetic flux density (strength of magnetic field) (μT), amount of change in angle (degrees), amount of change in magnetic flux density (μT / s), angular velocity (rag / s), or angular velocity (degree / s). Here, the angle (degrees) is the angle between the first portion 11 and the second portion 12, that is, the absolute angle. The amount of change in angle (degrees) is the angle indicating the difference between the previous angle between the first portion 11 and the second portion 12 and the current angle between the first portion 11 and the second portion 12, that is, the relative angle.
[0043] The estimation unit 114 estimates the measurement value m and the measurement value ω g Based on at least one of the above and the difference diff, the estimation unit 114 estimates the attitude of the second portion 12 with respect to the first portion 11, that is, the angle θ between the second portion 12 and the first portion 11. The estimation unit 114 estimates the measurement value m and the measurement value ω g At least one of the selected measured value m and measured value ω is selected. g The posture of the second portion 12 relative to the first portion 11 is estimated based on at least one of the above.
[0044] The measurement value ω used by the estimation unit 114 for estimation g However, the measured value ω measured by the gyro sensor 40 soon after g If so, the estimation unit 114 estimates the measured value ω gBased on this, the orientation of the second portion 12 relative to the first portion 11 can be accurately estimated. In an angle range without hysteresis, the estimation unit 114 can accurately estimate the orientation of the second portion 12 relative to the first portion 11 based on the measurement value m of the magnetic sensor 30. Therefore, the magnitude of the difference diff becomes small. On the other hand, in an angle range with hysteresis, the estimation unit 114 cannot accurately estimate the orientation based on the measurement value m of the magnetic sensor 30. Therefore, the magnitude of the difference diff becomes large. From the above, the difference diff corresponds to the magnitude of the magnetic field hysteresis. Therefore, the larger the difference diff, the more likely it is that the open / closed state of the folding terminal 10 is in an angle range with hysteresis. Therefore, when the difference diff is smaller than the threshold th, the estimation unit 114 may estimate the orientation of the second portion relative to the first portion 11 based on the measurement value m of the magnetic sensor 30. When the difference diff is smaller than the threshold th, the estimation unit 114 may estimate the attitude of the second part 12 relative to the first part 11 based on the measurement value m at the estimation time and relationship information (reference table) indicating the relationship between the measurement value m measured by the magnetic sensor 30 as shown in FIG. 6 and the attitude (angle) of the second part 12 relative to the first part 11.
[0045] When the difference diff is equal to or greater than the threshold th, the estimation unit 114 estimates the measurement value ω g When the difference diff is equal to or greater than a threshold th, the estimation unit 114 may estimate the orientation of the second portion 12 relative to the first portion 11 based on the previous estimation result and the measurement value ω g The orientation of the second portion 12 relative to the first portion 11 may be estimated based on the above.
[0046] The estimation unit 114 estimates a first weighted measurement value m based on the difference diff and a second weighted measurement value ω based on the difference diff. gThe orientation of the second portion 12 relative to the first portion 11 may be estimated based on the above. As the difference diff increases, the first weighting decreases and the second weighting increases. The estimation unit 114 may derive the weighting according to a predetermined function f(diff) that uses the difference diff as a parameter. The estimation unit 114 may be realized by a Kalman filter. In this case, the Kalman gain corresponds to the weighting.
[0047] 10 shows how the sensors used by the estimation unit 114 for estimation change over time when the second part 12 is rotated relative to the first part 11 when the folding terminal 10 is changed from a closed state to an open state. The dashed line L11 shows the change over time of the angle estimated based on the measurement value m of the magnetic sensor 30. The dashed line L12 shows the change over time of the measurement value ω of the gyro sensor 40. g A dashed line L10 indicates the change over time of the angle of the second portion 12 relative to the actual first portion 11. A solid line L13 indicates the change over time of the angle corresponding to the estimation result when the estimation unit 114 switches the sensor used for estimation in accordance with the difference diff.
[0048] When the folded terminal 10 in the closed state starts to open and reaches time t1, the difference diff is smaller than the threshold th. That is, the effect of hysteresis is small. Therefore, the estimation unit 114 refers to the reference table and estimates the angle θ m By identifying the angle θ, the angle of the second portion 12 with respect to the first portion 11 is estimated. After the time t1 has elapsed, the difference diff becomes equal to or greater than the threshold th. Therefore, the estimation unit 114 determines the previous angle θ, which is the previous estimation result. t-1 The current angle change amount Δθ measured by the gyro sensor 40 t Add this to get the angle θ g The angle of the second portion 12 relative to the first portion 11 is estimated by deriving the angle θ mBy identifying the difference diff, the angle of the second portion 12 with respect to the first portion 11 is estimated. In this way, when the estimation unit 114 switches the sensor used for estimation in accordance with the difference diff, the angle of the second portion 12 with respect to the first portion 11 can be estimated more accurately than when only the magnetic sensor 30 is used or when only the gyro sensor 40 is used.
[0049] 11A and 11B show an example of a simulation result in the case where the estimation unit 114 estimates the angle of the second portion 12 relative to the first portion 11 using only the magnetic sensor 30. Fig. 11A shows the change over time between the expected value of the angle to be estimated by the estimation unit 114 and the angle estimated by the estimation unit 114. Fig. 11B shows the change over time of the angle error between the expected value and the estimated angle.
[0050] 12A and 12B show an example of a simulation result in the case where the estimation unit 114 estimates the angle of the second portion 12 relative to the first portion 11 by switching the sensor used for estimation according to the difference diff. Fig. 12A shows the change over time between the expected value of the angle to be estimated by the estimation unit 114 and the angle estimated by the estimation unit 114. Fig. 12B shows the change over time of the angle error between the expected value and the estimated angle.
[0051] As can be seen by comparing FIG. 11B and FIG. 12B, the estimation unit 114 can suppress the angle error by switching the sensor used for estimation depending on the difference diff.
[0052] Here, the estimation unit 114 estimates the measurement value ω of the gyro sensor 40 for a long period of time in an angle range having hysteresis. g If the angle of the second portion 12 relative to the first portion 11 is estimated based only on the integral value, errors in the integral value will accumulate, the angle error will increase, and the accuracy of the estimation by the estimator 114 may deteriorate again.
[0053] Therefore, the estimation unit 114 detects the measured value ω of the gyro sensor 40 when the difference diff goes from being smaller than the threshold th to being equal to or larger than the threshold th. gIf the difference diff is equal to or greater than a threshold th, the measurement value ω g The estimation unit 114 continues to estimate the attitude of the second portion 12 relative to the first portion 11 based on the measurement value m of the magnetic sensor 30 if the difference diff is still equal to or greater than the threshold th after a predetermined period has elapsed since the estimation start point. This causes the measurement value ω of the gyro sensor 40 to be estimated based on the measurement value m of the magnetic sensor 30 for a long period of time in an angle range having hysteresis. g This makes it possible to prevent an increase in the angle error that occurs when the angle of the second portion 12 relative to the first portion 11 is estimated based only on the angle .gamma..times ...
[0054] 13 is a flowchart showing an example of a procedure for estimating an angle by the estimation unit 114. The derivation unit 112 derives an angle θ from the measurement value m (μT) of the magnetic sensor 30 based on the strength of the magnetic field according to a reference table. m The angle θ is converted to (degrees) (S100). m is an example of a first value based on the measured value m. Also, the angle θ m is an example of a first value based on a value obtained by converting the measurement value m into an angle. g By integrating (rad / s), the change in angle Δθ g The derivation unit 112 derives the previous angle θ (degrees) estimated by the estimation unit 114 (S101). t-1 (degrees), the measurement value ω measured by the gyro sensor 40 g The change in angle Δθ obtained by integrating (rad / s) g (degrees) to obtain the measurement value ω g Angle θ based on (rad / s) g The angle θ (degrees) is calculated (S102). g is the measured value ω g This is an example of the second value based on the angle θ g is the measured value ω g is an example of the second value based on the integrated value of the angle θ gis an example of a second value based on a value based on a result of estimation by estimation unit 114.
[0055] Next, the lead-out section 112 is rotated at an angle θ m and angle θ g The difference diff between the two is derived (S104). The estimation unit 114 determines whether the difference diff is equal to or greater than a threshold th (S106).
[0056] The estimation unit 114 estimates θ t =ID×θ m +(1-ID)×θ g According to the above, the angle θ of the second portion 12 with respect to the first portion 11 is t Estimate ID×θ m is an example of a first weighted measurement value m based on the difference dif. (1-ID)×θ g is the second weighting measure based on the difference ω g When the difference diff is equal to or greater than the threshold th, the estimation unit 114 determines that the angle of the second portion 12 relative to the first portion 11 is within the hysteresis region, and sets ID=0 (S108). g Based on the angle θ g The angle θ of the second part 12 relative to the first part 11 t (degrees) (S110).
[0057] If the difference diff is smaller than the threshold th, the estimation unit 114 determines that the angle of the second portion 12 relative to the first portion 11 is outside the hysteresis region, and sets ID=1 (S112). m The angle θ of the second part 12 relative to the first part 11 t (S114).
[0058] As described above, according to the above procedure, if the angle is within the hysteresis region, the estimation unit 114 estimates the measurement value ω g Based on the angle θ g The angle θ of the second portion 12 with respect to the first portion 11t On the other hand, if the angle is outside the hysteresis region, the estimation unit 114 estimates the angle θ based on the measurement value m of the magnetic sensor 30. m The angle θ of the second portion 12 with respect to the first portion 11 t In this way, the estimation unit 114 reduces the influence of the hysteresis of the magnetic field by the gyro sensor and reduces the influence of the integral error of the gyro by the magnetic sensor, thereby avoiding the influence of the hysteresis and the integral error and accurately estimating the angle θ of the second portion 12 with respect to the first portion 11. t can be estimated.
[0059] Fig. 14 is a flowchart showing another example of the procedure for deriving the difference diff by the derivation unit 112. This procedure differs from the procedure in Fig. 13 in which the unit of the difference diff is (degrees) in that the unit of the difference diff is magnetic field strength (μT).
[0060] The derivation unit 112 calculates the measurement value ω g By integrating (rad / s), the change in angle Δθ g The derivation unit 112 derives the measurement value ω (degrees) of the gyro sensor 40 (S101a). g The change in angle Δθ obtained by integrating (rad / s) g (degrees), the previous angle θ estimated by the estimation unit 114 t-1 (degrees) to obtain the measurement value ω g Angle θ based on (rad / s) g (degrees) (S102a). Furthermore, the derivation unit 112 refers to a reference table to derive the angle θ g (degrees) to the magnetic field strength m g (μT) (S103a). Magnetic field strength m g is the measured value ω g is an example of a second value based on the magnetic field strength m g is the measured value ω g This is an example of the second value based on the integrated value of the magnetic field strength m g is an example of the second value based on the value based on the estimation result of the estimation unit 114. In addition, the magnetic field strength m g is the measured value ωg Next, the derivation unit 112 calculates the magnetic field strength m (μT) corresponding to the measurement value m (μT) measured by the magnetic sensor 30 and the measurement value ω g Magnetic field strength m based on (rad / s) g The difference between the measured value m and the measured magnetic field strength m is calculated as the difference diff (S104a). The magnetic field strength m is an example of a first value based on the measured value m. The following procedure may be the same as the steps from step S106 onwards shown in FIG.
[0061] Fig. 15 is a flowchart showing another example of the procedure for the derivation unit 112 to derive the difference diff. The procedure differs from the procedures in Fig. 13 where the unit of the difference diff is (degrees) and Fig. 14 where the unit of the difference diff is magnetic field strength (μT) in that the unit of the difference diff is angular velocity (rad / s). Note that the unit of the angular velocity may be angle / s instead of rad / s.
[0062] The derivation unit 112 converts the measured value m (μT) of the magnetic sensor 30 into an angle θ m (degrees) (S100b). Furthermore, the derivation unit 112 converts the angle θ m (degrees) from the previous angle θ estimated by the estimation unit 114 t-1 (degrees) to get Δθ m (degrees) (S101b). The derivation unit 112 derives (Δθ m / Δt)×(π / 180) to obtain the angular velocity ω based on the measurement value m of the magnetic sensor 30. m (rad / s) is derived (S102b). m is an example of a first value based on the measurement value m. m is an example of a first value based on the measured value m. Also, the angular velocity ω m is an example of a first value based on a value based on an estimation result of the estimation unit 114. m is an example of a first value based on a value obtained by converting the measured value m into an angular velocity. m is an example of a first value based on a value obtained by converting the measurement value m into an angle. Next, the derivation unit 112 calculates the angular velocity ω m(rad / s) and the measured value (angular velocity) ω of the magnetic sensor 30 g The difference between the angular velocity ω (rad / s) is calculated as the difference diff (S104b). m is the measured value ω g This is an example of the second value based on the above. The following steps may be the same as those from step S106 onwards shown in FIG.
[0063] FIG. 16 is a flowchart showing another example of a procedure by which the estimation unit 114 estimates an angle.
[0064] The derivation unit 112 calculates the measurement value ω g By integrating (rad / s), the change in angle Δθ g The derivation unit 112 derives the measurement value ω (degrees) of the gyro sensor 40 (S200). g The change in angle Δθ obtained by integrating (rad / s) g (degrees), the previous angle θ estimated by the estimation unit 114 t-1 (degrees) to obtain the measurement value ω g Predicted angle θ based on pred (degrees) (S201). Furthermore, the derivation unit 112 derives a predicted angle θ pred (degrees) according to the reference table for prediction of magnetic field strength m pred (μT) (S202). Magnetic field strength m pred is the measured value ω g is an example of a second value based on the magnetic field strength m pred is the measured value ω g This is an example of the second value based on the integrated value of the magnetic field strength m pred is an example of the second value based on the value based on the estimation result by the estimation unit 114. In addition, the magnetic field strength m pred is the measured value ω g is an example of the second value based on a value obtained by converting the measured value m (μT) of the magnetic sensor 30 and the measured value ω g Predicted magnetic field strength m based on (rad / s) pred(μT) is derived as the difference diff (S204). The measurement value m is an example of a first value based on the measurement value m.
[0065] The derivation unit 112 calculates a predicted angle θ based on the difference diff(μT). pred The weighting ID (degrees / μT) for deriving a correction amount for correcting the difference θ is derived according to a predetermined function f(diff)=ID (S206). ID is a real number. The derivation unit 112 multiplies the difference diff(μT) by ID (degrees / μT) to obtain the correction amount θ corr The estimation unit 114 derives the predicted angle θ pred (degrees) correction amount θ corr (degrees) to correct the angle θ of the second portion 12 relative to the first portion 11. t (degrees) (S210). The predetermined function f(diff) is a function that reduces ID(μT) in response to an increase in the difference diff.
[0066] Through the above procedure, the estimation unit 114 obtains the measurement value ω g Predicted angle θ based on pred The correction amount θ based on the magnitude of the difference diff corr Correct the angle θ t In this way, the effect of hysteresis of the magnetic field is reduced by the gyro sensor 40, and the effect of integral error of the gyro 40 is reduced by the magnetic sensor 30, so that the estimation unit 114 can accurately estimate the angle θ of the second portion 12 with respect to the first portion 11 while suppressing the effect of hysteresis or integral error. t can be estimated.
[0067] FIG. 17 is a flowchart showing another example of a procedure in which the estimation unit 114 estimates an angle.
[0068] The derivation unit 112 converts the measured value m (μT) of the magnetic sensor 30 into an angle θ m (degrees) (S300). In addition, the derivation unit 112 converts the measurement value ω gBy integrating (rad / s), the change in angle Δθ g (degrees) is calculated (S301). g is the measured value ω g is an example of the second value based on the amount of change in angle Δθ g is the measured value ω g is an example of the second value based on the integrated value of the angle θ m (degrees) from the previous angle θ estimated by the estimation unit 114 t-1 (degrees) is subtracted to obtain the angle change amount Δθ based on the measurement value m (degrees) of the magnetic sensor 30. m (degrees) is calculated (S302). m is an example of a first value based on the measured value m. Also, the change amount Δθ m is an example of a first value based on a value based on an estimation result by the estimation unit 114. m is an example of a first value based on a value obtained by converting the measured value m into an angular velocity. m is an example of a first value based on a value obtained by converting the measurement value m into an angle. The derivation unit 112 calculates the amount of change in angle Δθ based on the measurement value m (μT) of the magnetic sensor 30. m (degrees) and the measurement value ω of the gyro sensor 40 g The change in angle Δθ obtained by integrating (rad / s) g The difference between the two (degrees) is calculated as the difference diff.
[0069] The derivation unit 112 derives a weighting factor for deriving the amount of change in angle Δθ (degrees) according to a predetermined function f(diff)=ID (S306). The estimation unit 114 calculates Δθ=ID×Δθ m +(1-ID)×Δθ g According to the above, the angle change amount Δθ (degrees) is derived (S308). The predetermined function f(diff) is a function that reduces ID in response to an increase in the difference diff. ID is a real number.
[0070] The estimation unit 114 estimates the angle θ m (degrees) from the previous angle θ estimated by the estimation unit 114 t-1The angle θ of the second portion 12 relative to the first portion 11 is calculated by adding the amount of change in angle Δθ (degrees) to the angle θ (degrees). t (degrees) is estimated (S310).
[0071] Through the above procedure, the estimation unit 114 estimates the amount of change in angle Δθ based on the measurement value m of the magnetic sensor 30 with weighting based on the difference diff. m and the measured value ω of the gyro sensor 40 g The change in angle Δθ based on g and are weighted to obtain the angle θ t In this way, the estimation unit 114 reduces the influence of hysteresis of the magnetic field by the gyro sensor 40 and reduces the influence of integral error of the gyro 40 by the magnetic sensor 30, thereby suppressing the influence of hysteresis or the influence of integral error and accurately estimating the angle θ of the second portion 12 with respect to the first portion 11. t can be estimated.
[0072] In this embodiment, an example will be described in which the estimation unit 114 estimates the attitude (angle) of the second portion 12 with respect to the first portion 11. However, the estimation unit 114 may estimate the position of the second portion 12 with respect to the first portion 11.
[0073] 18A and 18B show an example of a device 10A in which the estimation unit 114 estimates the position of the second part 12 relative to the first part 11. The device 10A is a rollable smartphone whose display screen expands and contracts. The second part 12 moves along the X-axis direction relative to the first part 11. The first part and the second part 12 may form a display unit. The second part 12 may move along the X-axis direction relative to the first part 11 from a first state (contracted state) shown in FIG. 18A to a second state (expanded state) shown in FIG. 18B. This causes the width of the display screen 50 in the X-direction to expand and contract. The display screen 50 may be, for example, a thin display such as an organic EL display that can be rolled up around a rotation axis along the Y-axis.
[0074] In such a device 10A, the gyro sensor 40 may be provided on a rotation axis and rotate around an axis along the Y-axis direction together with the rotation axis in response to the second portion 12 moving in the X-axis direction relative to the first portion 11.
[0075] 19 shows an example of a computer 1200 in which aspects of the present invention may be embodied in whole or in part. A program installed on the computer 1200 may cause the computer 1200 to perform operations associated with an apparatus according to an embodiment of the present invention or one or more "parts" of the apparatus. Alternatively, the program may cause the computer 1200 to execute the operations or one or more "parts". The program may cause the computer 1200 to execute a process or steps of the process according to an embodiment of the present invention. Such a program may be executed by the CPU 1212 to cause the computer 1200 to execute specific operations associated with some or all of the blocks of the flowcharts and block diagrams described herein.
[0076] The computer 1200 according to this embodiment includes a CPU 1212 and a RAM 1214, which are connected to each other by a host controller 1210. The computer 1200 also includes a communication interface 1222 and an input / output unit, which are connected to the host controller 1210 via an input / output controller 1220. The computer 1200 also includes a ROM 1230. The CPU 1212 operates according to programs stored in the ROM 1230 and the RAM 1214, thereby controlling each unit.
[0077] The communication interface 1222 communicates with other electronic devices via a network. The hard disk drive may store programs and data used by the CPU 1212 in the computer 1200. The ROM 1230 stores a boot program executed by the computer 1200 when activated and / or a program that depends on the hardware of the computer 1200. The programs are provided via a computer-readable storage medium such as a CD-ROM, a USB memory, or an IC card, or a network. The programs are installed in the RAM 1214, which is also an example of a computer-readable storage medium, or the ROM 1230, and executed by the CPU 1212. Information processing described in these programs is read by the computer 1200, and causes the program to cooperate with the various types of hardware resources. An apparatus or method may be configured by implementing an operation or processing of information according to the use of the computer 1200.
[0078] For example, when communication is performed between the computer 1200 and an external device, the CPU 1212 may execute a communication program loaded in the RAM 1214 and instruct the communication interface 1222 to perform communication processing based on the processing described in the communication program. Under the control of the CPU 1212, the communication interface 1222 reads transmission data stored in a transmission buffer area provided in the RAM 1214 or a storage medium such as a USB memory, transmits the read transmission data to a network, or writes reception data received from the network to a reception buffer area or the like provided on the storage medium.
[0079] Furthermore, the CPU 1212 may cause all or a necessary portion of a file or database stored in an external storage medium such as a USB memory to be read into the RAM 1214, and perform various types of processing on the data on the RAM 1214. The CPU 1212 may then write back the processed data to the external storage medium.
[0080] Various types of information, such as various types of programs, data, tables, and databases, may be stored in the storage medium and undergo information processing. The CPU 1212 may perform various types of processing on the data read from the RAM 1214, including various types of operations, information processing, conditional judgment, conditional branching, unconditional branching, information search / replacement, etc., as described throughout this disclosure and specified by the instruction sequence of the program, and writes back the results to the RAM 1214. The CPU 1212 may also search for information in a file, database, etc. in the storage medium. For example, when a plurality of entries each having an attribute value of a first attribute associated with an attribute value of a second attribute are stored in the storage medium, the CPU 1212 may search for an entry that matches a condition, in which the attribute value of the first attribute is specified, from among the plurality of entries, read the attribute value of the second attribute stored in the entry, and thereby obtain the attribute value of the second attribute associated with the first attribute that satisfies a predetermined condition.
[0081] The above-described programs or software modules may be stored in a computer-readable storage medium on or near the computer 1200. Also, a storage 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 storage medium, thereby providing the programs to the computer 1200 via the network.
[0082] A computer-readable medium may include any tangible device capable of storing instructions that are executed by a suitable device. As a result, a computer-readable medium having instructions stored thereon comprises an article of manufacture that includes instructions that can be executed to create means for performing the operations specified in the flowchart or block diagram. Examples of computer-readable media may include electronic storage media, magnetic storage media, optical storage media, electromagnetic storage media, semiconductor storage media, and the like. More specific examples of computer-readable media may include floppy disks, diskettes, hard disks, random access memories (RAMs), read-only memories (ROMs), erasable programmable read-only memories (EPROMs or flash memories), electrically erasable programmable read-only memories (EEPROMs), static random access memories (SRAMs), compact disk read-only memories (CD-ROMs), digital versatile disks (DVDs), Blu-ray (RTM) disks, memory sticks, integrated circuit cards, and the like.
[0083] The computer readable instructions may include either source code or object code written in any combination of one or more programming languages. The source code or object code includes conventional procedural programming languages. The conventional procedural programming languages may be assembler instructions, instruction set architecture (ISA) instructions, machine instructions, machine dependent instructions, microcode, firmware instructions, state setting data, or object oriented programming languages such as Smalltalk®, JAVA®, C++, etc., and the “C” programming language or similar programming languages. The computer readable instructions may be provided to a processor or programmable circuitry of a general purpose computer, special purpose computer, or other programmable data processing apparatus locally or over a wide area network (WAN) such as a local area network (LAN), the Internet, etc. The processor or programmable circuitry may execute the computer readable instructions to create means for performing the operations specified in the flowcharts or block diagrams. Examples of processors include computer processors, processing units, microprocessors, digital signal processors, controllers, microcontrollers, etc.
[0084] Although the present invention has been described above using the embodiments, the technical scope of the present invention is not limited to the scope described in the above embodiments. It is clear to those skilled in the art that various modifications and improvements can be made to the above embodiments. It is clear from the description of the claims that such modifications and improvements can also be included in the technical scope of the present invention.
[0085] It should be noted that the order of execution of each process, such as operations, procedures, steps, and stages, in the devices, systems, programs, and methods shown in the claims, specifications, and drawings is not specifically stated as "before," "prior to," etc., and may be realized in any order unless the output of a previous process is used in a later process. Even if the operational flow in the claims, specifications, and drawings is explained using "first," "next," etc. for convenience, it does not mean that it is essential to perform the process in this order. [Explanation of symbols]
[0086] 10 Terminal 10A device 11 Part 1 12 Part 2 14 Display 16 Hinge mechanism 18 Rotational Axis 20 Magnet section 30 Magnetic Sensor 40 Gyro sensor 50 display screen 50a Acceleration Sensor 100 Estimator 110 Control section 112 Derivation part 114 Estimation Department 120 Storage section 130 Communication I / F 1200 Computer 1210 Host Controller 1212 CPU 1214 RAM 1220 Input / Output Controller 1222 Communication Interface 1230 ROM
Claims
1. An estimation device that estimates at least one of a position and an orientation of the second part relative to the first part in an apparatus including: a first part; a second part; a movable mechanism that changes at least one of a position and an orientation of the second part relative to the first part; a magnetic sensor provided on one of the first part and the second part; a magnet part provided on the other of the first part and the second part that provides a magnetic field measured by the magnetic sensor; and a gyro sensor, a derivation unit that derives a difference between a first value based on a first measurement value corresponding to a position or orientation of the second part relative to the first part measured by the magnetic sensor and a second value based on a second measurement value corresponding to the position or orientation of the second part relative to the first part measured by the gyro sensor; an estimation unit that estimates a position and an orientation of the second portion relative to the first portion based on at least one of the first value and the second value and the difference; An estimation device comprising:
2. The estimation device according to claim 1 , wherein the estimation unit selects at least one of the first value and the second value based on the difference, and estimates the position and orientation of the second part relative to the first part based on the selected at least one of the first value and the second value.
3. The estimation unit is if the difference is less than a threshold, estimating a position and orientation of the second portion relative to the first portion based on the first value; The estimation device according to claim 1 , further comprising: an estimation unit configured to estimate a position and orientation of the second part relative to the first part based on the second value when the difference is equal to or greater than the threshold value.
4. The estimation unit is The estimation device according to claim 3 , further comprising: a step of estimating a position and orientation of the second part relative to the first part based on a previous estimation result and the second value, when the difference is equal to or greater than the threshold value.
5. The estimation unit is The estimation device according to claim 1 , further comprising: an estimation unit configured to estimate a position and orientation of the second portion relative to the first portion based on the first value of a first weighting based on the difference and the second value of a second weighting based on the difference.
6. 6. The estimation device according to claim 5, wherein the first weighting decreases and the second weighting increases in response to an increase in the difference.
7. The estimation device of claim 1, wherein when the difference is smaller than a threshold value, the estimation unit estimates the position and orientation of the second part relative to the first part based on the first value, a first value based on a first measurement value measured by the magnetic sensor, and relationship information indicating a relationship between the first value and the position or orientation of the second part relative to the first part.
8. 4. The estimation device according to claim 3, wherein the estimation unit continues estimating the position and orientation of the second part relative to the first part based on the second value when the difference is greater than or equal to the threshold during a predetermined period of time from a point in time when the difference goes from being smaller than the threshold to being greater than or equal to the threshold and estimation of the position and orientation of the second part relative to the first part based on the second value is started, and switches to estimating the position and orientation of the second part relative to the first part based on the first value when the difference is still greater than or equal to the threshold after the predetermined period of time has elapsed from the point in time.
9. The estimation device according to claim 1 , wherein the deriving unit derives the difference between the first value and the second value after matching units of the first value and the second value.
10. The estimation device according to claim 9 , wherein the unit is an angle, a magnetic flux density, an amount of change in angle, an amount of change in magnetic flux density, or an angular velocity.
11. The estimation device of claim 1 , wherein the first value is based on a value obtained by converting the first measurement value into an angle or an angular velocity.
12. 2. The estimation device of claim 1, wherein the second value is based on a value obtained by converting the second measurement value to an angle, a value obtained by converting the second measurement value to a magnetic field, a value obtained by converting the angle to a magnetic field, or a value obtained by integrating the second measurement value.
13. The estimation device according to claim 1 , wherein the first value or the second value is based on a value based on an estimation result by the estimation unit.
14. 1. An estimation method for estimating at least one of a position and an orientation of the second part relative to the first part in an apparatus including: a first part; a second part; a movable mechanism for changing at least one of a position and an orientation of the second part relative to the first part; a magnetic sensor provided in one of the first part and the second part; a magnet part provided in the other of the first part and the second part for providing a magnetic field measured by the magnetic sensor; and a gyro sensor, deriving a difference between a first value based on a first measurement value corresponding to a position or orientation of the second part relative to the first part measured by the magnetic sensor and a second value based on a second measurement value corresponding to a position or orientation of the second part relative to the first part measured by the gyro sensor; estimating a position and orientation of the second portion relative to the first portion based on at least one of the first value and the second value and the difference; The estimation method comprises:
15. A program for causing a computer to function as an estimation device that estimates at least one of a position and an orientation of the second part relative to a first part in an apparatus including: a first part; a second part; a movable mechanism that changes at least one of a position and an orientation of the second part relative to the first part; a magnetic sensor provided on one of the first part and the second part; a magnet part provided on the other of the first part and the second part and providing a magnetic field measured by the magnetic sensor; and a gyro sensor, deriving a difference between a first value based on a first measurement value corresponding to a position or orientation of the second part relative to the first part measured by the magnetic sensor and a second value based on a second measurement value corresponding to a position or orientation of the second part relative to the first part measured by the gyro sensor; estimating a position and orientation of the second portion relative to the first portion based on at least one of the first value and the second value and the difference; A program for causing the computer to execute the above.
