Patent ID: 8219603

Claim:
A waveform correction apparatus for periodically sampling a waveform signal indicating an angle or a position of a moving body making a rotational movement or a reciprocating movement, and for correcting a digital signal obtained by digitizing the waveform signal, comprising: a maximum and minimum value detector detecting a maximum value and minimum value of the digital signal using a digital signal at a certain time point and digital signals obtained by sampling before the certain point; a first arithmetic portion calculating an offset value of an intermediate value between the maximum value and the minimum value of the digital values with respect to a preset reference value serving as an intermediate value of the waveform signal; a second arithmetic portion calculating an actual amplitude of the digital signal by subtracting or adding the offset value from or to the maximum value or the minimum value of the digital signal; a third arithmetic portion generating a first correction signal by subtracting or adding the offset value from or to the digital signal at the certain time point; a fourth arithmetic portion adding or subtracting a value obtained by shifting a figure of the actual amplitude from or to the actual amplitude so that the actual amplitude converges into a preset reference amplitude; and a fifth arithmetic portion adding or subtracting a value obtained by shifting the first correction signal by an amount identical to a shift amount of the actual amplitude from or to the first correction signal so that the first correction signal converges into a second correction signal, the fifth arithmetic portion simultaneously executing addition or subtraction with execution of addition or subtraction by the fourth arithmetic portion; wherein the fourth arithmetic portion repeatedly calculates an equation 1 or an equation 2 until A i converges into the preset reference amplitude or until next sampling is executed: A i =A i-1 +A max×2 −i (Equation 1) A i =A i-1 −A max×2 −i (Equation 2) where i=1, 2, . . . n, A 0 =Amax, and the Amax is the actual amplitude; wherein the fifth arithmetic portion repeatedly calculates an equation 3 or an equation 4 until the A i converges into the preset reference amplitude or until the next sampling is executed: y i =y i-1 +ya× 2 −i (Equation 3) y i =y i-1 −ya× 2 −i (Equation 4) where i=1, 2, . . . n, y 0 =ya, and the ya is the digital signal at the certain time point; and wherein y i is output as the corrected digital signal.