摘要 |
PROBLEM TO BE SOLVED: To provide an encoder capable of starting operation from a value close to an actual midpoint of an output signal of a sensor and preventing an error from increasing every time when power is turned on.SOLUTION: An encoder for detecting an angular position of a rotor on the basis of an output signal of a sensor that changes in conjunction with rotation of the rotor includes: an offset estimation unit 923 for obtaining an offset value of a midpoint value of the output signal sin and cos of the sensor; a storage unit 924 for storing the offset value; a writing condition determination unit 925 for sequentially writing the offset value obtained at prescribed timing after the elapse of a prescribed time from starting time in a storage unit 924; and an angular position detection unit 922 for detecting an angular position using the offset value obtained by the offset estimation unit or the offset value written and stored in the storage. An angular position detection unit 926 detects an angular position using the latest offset value written in the storage unit at the next starting time. |