SELF-CALIBRATION OF THE RESOLVER SENSOR IN SERVO DRIVE APPLICATION SELF-CALIBRATION OF THE RESOLVER SENSOR IN SERVO DRIVE APPLICATION

scheme and the effect on the drive operation is verified through experimental testing.


Introduction
In motion control, the quality of measured position and speed is one of the most important factors to achieve high performance. Although sensorless motor control finds its use in various applications [1], there are still applications where feedback signal of high quality is crucial. Resolver represents a robust position sensor that is suitable for heavy-duty applications like aerospace. In measurement system, the position and speed is extracted from the analog resolver signals that are in ideal case sine and cosine waves. However, the real resolver signals contain errors which results in position and speed inaccuracies. The major contribution to the position error is caused by different amplitudes, dc offsets and phase error of the resolver signals. Furthermore, the noise badly affects the effective resolution and obstructs the identification of the errors. Controller of the electric drive is implemented using Digital Signal Processor (DSP) with high computational power. This computational power can be utilized to improve the position and speed measurement by software-based approach.
There are several works that describe self-calibration and noise reduction methods for the resolver sensor. The ideal resolver signals plotted versus each other form a circle. In the real case, the circle is distorted and can be approximated by an ellipse. In [2], the ellipse fitting technique is used to correct resolver signals in servo drive application to improve accuracy of the position and speed measurement. A recursive least squares approach is used to fit the measured data to an ellipse. The method gives good results, but it is not working during the resting periods when rotor is not moving. In [3], the ellipse fitting technique is modified in order to solve the problem, but the computational costs are too high for the online calibration. Another approach of self-calibration was presented by Heydemann in 1981 [4]. It is also based on the least squares esti-mation. In order to reduce computational demands, the modified version of the algorithm has been presented so it can be implemented in DSP [5]. A method to suppress systematic errors of the resolver based on Fourier analysis is used in the paper [6]. In the technique, the resolver signals form one complex signal, and the systematic errors are removed by compensating for the non-principal harmonics in the second power of this complex signal. The method is very simple and effective and can be used for online calibration.
As mentioned before, distorted resolver signals cause position error which results in speed and current oscillations. Imperfections in resolver signals are induced by resolver itself with its limited accuracy, by the conditioning circuitry which adjusts these signals prior to AD conversion and also by the ADC errors. Coupling errors like eccentricity contributes to total position error. Another problem represents the imperfect demodulation of the resolver signals which can cause additional position error that is speeddependent [7].
In this paper the self-calibration method is integrated into the variable-speed field-oriented control scheme of permanent magnet synchronous motor (PMSM) drive equipped with resolver in order to improve accuracy of the position and speed measurement. In following text, the block diagram of self-calibration algorithm is presented and individual parts are described in more details.

Servodrive application
Control structure of the PMSM servo drive is shown in Fig. 1 Special integrated circuit called resolver-to-digital converter is commonly used to convert the resolver signals into digital position and

SELF-CALIBRATION OF THE RESOLVER SENSOR IN SERVO DRIVE APPLICATION Jan Faber -Marek Stulrajter -Jan Vittek *
Resolver sensor is utilized as absolute position transducer in many industrial motion-control applications where robustness and ability to operate in harsh environment is required. In real system, the quality of position and speed measurement is badly affected by the resolver errors. In this paper, the software-based error-compensation technique is integrated into the control structure of the drive. Compensation scheme adapts online to errors in the resolver signals in order to improve accuracy of the measured position and speed. Performance of the compensation scheme and the effect on the drive operation is verified through experimental testing.
speed (10-16 bits wide). In this case, the resolver-to-digital conversion is software-based, and it is implemented in a Micro-Controller Unit (MCU). Instead of using expensive resolver-to-digital converter, only the low-cost conditioning circuitry is needed to preprocess resolver sine and cosine signals prior to AD conversion. The excitation signal for the resolver is also generated by the interface board. Angle-tracking observer (ATO) is used to extract the position and speed information from the digitized resolver signals.
The detail description of the ATO, together with the interface board schematics can be found in [8].
The resolver signals are first sampled by the ADC and then input to the correction block, where the dc offsets are canceled out, the amplitudes are attenuated and the phase error is compensated. The output of the correction block is applied to the ATO input to extract the position and speed from the corrected signals sin(θ), cos(θ). The error parameters A sin , A cos , B sin , B cos and α are calculated in the self-calibration block and fed-back to the correction block. This feedback loop is capable of online identification and compensation of the errors in resolver signals. Function of the individual blocks is described in more details in following text.

A. Resolver Sensor
A resolver is a rotary transformer that houses three windings, primary excitation winding and two secondary sine and cosine windings. Excitation winding is placed in the rotor and the secondary windings are in the stator. The sine and cosine stator windings are mechanically displaced from each other by 90 degrees. The excitation voltage is supplied to the primary excitation winding through a rotary transformer (resolver transmitter type). The schematic of the brushless resolver sensor is shown in Fig. 2.
The rotor is energized with the high frequency voltage signal (excitation frequency f exc ϭ 10 kHz). The resolver generates two signals that are multiplied (modulated) by the sine and cosine of the mechanical angle θ. The equation (1) denotes these two signals that are, in ideal case, equal in amplitude, perfectly orthogonal and have no dc offsets.
However, in the real system, resolver signals contain errors and noise. The real resolver sensor can be modeled using equations (2) where A sin , A cos represents the amplitudes, B sin , B cos are the offsets and α is the phase error.

B. Synchronous Demodulation
In software based resolver-to-digital conversion, the resolver signals have to be demodulated during the AD conversion. It is done by taking samples at the maximum of the sinusoids to extract envelope from the modulated signal. Demodulation removes high frequency components ω exc form equations (2), see Fig. 3. The figure also shows the effect of the phase shift t δ on the demodulation of the resolver signals. Samples of the signals, delayed by the phase shift, are not taken at the peak of sinusoids. In order to utilize full scale of the AD converter, the sampling instant has to be synchronized with the excitation signal of the resolver, otherwise the resolution will decrease.
To ensure perfectly synchronous demodulation is not easy because of the fact that excitation signal suffers from various delays in the conditioning circuitry and in the resolver itself. The long delay can highly distort calculated angle. Position error caused by the phase shift between the excitation signal and the sine and cosine signals that are input to ADC can be calculated as follows: (3) error exc d = Fig. 1 Control structure of the drive supplemented with the selfcalibration algorithm (blue)

Fig. 2 Resolver schematics
According to (3), the error caused by total phase shift δ is lower with higher excitation frequency ω exc and lower rotor speed ω. In high speed of the rotor or with the large δ, the position error can be significant [6].
In order to minimize the effect of the reference phase shift δ on demodulation, the sampling instant has to be attenuated to ensure synchronous demodulation of the resolver signals. The possible algorithm to lock both phases to the peaks of the sinusoids is in Fig. 4.
The procedure takes place before the normal operation of the drive, during commissioning stage. Maximization of the sampled resolver signals V sin and V cos can be achieved by modification of the sampling instant relative to the excitation signal of the resolver.
Since both resolver signals are sinusoidal function of time, it is straightforward to determine their maximum by taking sum of squares, which remains constant over the time. Shifting the sampling instant ϕ by some Δϕ will affect the maximum of the samples. After several iterations, the sampling instant ϕ that corresponds to the highest maximum is used during the normal operation of the drive.

C. Correction of the Resolver Signals
When the phase error α, amplitudes A sin , A cos and dc offsets B sin , B cos are determined, the correction can be done using equations (4).

(4)
Detail of the correction block is shown in Fig. 5.

D. Angle Tracking Observer
An observer that uses resolver sinusoidal signals to get smooth and accurate estimation of the rotor position and speed is known as Angle Tracking Observer (ATO) [8]. The block diagram is shown in Fig. 6.
The ATO is based on the same principle as Phase-Locked Loop. First, the observer error e is calculated by comparing corrected resolver signals sin(θ), cos(θ) with their corresponding estimations sin(θ^), cos(θ^): The error e is minimized by integrator and PS controller connected in series. ATO Transfer function is a second-order and has one zero. Natural frequency ω 0 [rad.s Ϫ1 ] and damping factor ξ [-] are related to coefficients K 1 and K 2 and can be calculated using equations (6). (6) IIR low-pass filter of the rotor speed is incorporated to achieve smoother waveform.

E. Self-Calibration Block
Purpose of the self-calibration block shown in Fig. 1 is to provide the correction block with new estimate of the error parameters of resolver signals: A sin , A cos , B sin , B cos and α. The self-calibration is based on the method that is presented in [5]. In this technique, the resolver signals form one complex signal s (θ(t)) ϭ ϭ V cos (t) ϩ jV sin (t). The signal can be expanded into the Fourier series: If k ϭ {Ϫ1, 0, 1}, the coefficient c 0 represents the offset errors (Bcos+jBsin), represents the amplitude difference (A sin Ϫ A cos ), and lm{c Ϫ1 } represents the phase error α. The second power of the complex signal s is analyzed in order to find the coefficients c 0 and c Ϫ1 . Waveform of the squared magnitude (s ) 2 for the distorted resolver signals is shown in Fig. 7 where the red waveform represents the case with ideal resolver signals.
As it is shown in Fig. 7, the distorted resolver signals will introduce harmonics into the squared magnitude (s ) 2 . The cross correlation of the squared magnitude and the Euler formula is used to find the individual coefficients of the Fourier series, which contain the error parameters of the resolver signals: forward-oriented scheme, given by (7). The block diagram is shown in Fig. 8. The feedback loop includes the correction block and the ATO block as it is shown in Fig. 1. Squared magnitude is calculated from the corrected signals sin(θ), cos(θ).
The (s ) 2 is compared with the reference value and fed to the amplitude controller. Actual rotor angle θ^is calculated in the ATO block.
Terms sin(2θ^) and cos(2θ^) are used according to (8) to get the amplitude difference (A sin Ϫ A cos ) and the phase error α. The cross correlation for the offset errors B sin and B cos is performed simply with the corrected signals. Five I-regulators have time constant T I that determines the dynamic behavior of the loop. The time constant has to be set sufficiently large because the error parameters have to be calculated over several periods.

Experimental results
Described self-calibration method has been integrated into the controller of a servo drive. The drive includes 3.4kW, 3000 rpm synchronous motor with permanent magnets (PMSM), the sinusoidal encoder, the power converter and the resolver under test. All calculations are performed using 32-bit floating-point microcontroller MPC5643L from Freescale. No additional hardware components are required. Sinusoidal encoder is used as a position reference. The accuracy of the encoder stated in the datasheet is Application configuration Table 1 Excitation frequency of the resolver 10 kHz Ϯ20 arc seconds. Resolver under test is coupled to the shaft to provide position feedback for the FOC control algorithm. The accuracy of the resolver according to the datasheet is Ϯ10 arc minutes. Some parameters of application configuration are summarized in Table I.
The results obtained at constant motor speed of 1000 rpm are illustrated in Fig. 9 and Fig. 10. Initially, the self-calibration is turned off and motor runs at constant speed. Oscillations in the speed and position signals are caused partly by the errors in the resolver signals and partly by the eccentricity between the resolver and the reference encoder. The moment when self-calibration is turned on, the observed error parameters start to approach their steady state values. Then these parameters are used for the correction of the resolver signals (Fig. 12), which leads to the reduction of the position error and speed oscillations. Offset error determined by the scheme is about 0.3% for both resolver signals. The difference between amplitudes is about 1.1% and the phase error is 0.06deg. Effect of the self-calibration on the position error and the speed is obvious. Fig. 11 shows comparison of the amplitude spectrum of the position error and speed before, and after the correction Total reduction of the position error is limited by the eccentricity between the resolver and reference encoder, which causes error that is still present in the position, even after applied correction.
Position error is periodic in nature. Close observation shows that there is an offset which is changing with respect to speed. The cause of this dc component being present in the position error is the phase shift δ described in section B. Although to ensure perfectly synchronous demodulation is not an easy task, it is not impossible. Another way to reduce the effect of imperfect demodulation is to increase excitation frequency of the resolver.
Variation of the shaft speed does not affect the dynamic behavior of the self-calibration loop. However, the time constant of the I-controllers (T I ) has to be sufficiently large because the error parameters have to be calculated over several periods of the resolver line signals.

Conclusion
Self-calibration technique for the resolver sensor has been discussed. In the real system, the imperfections in resolver signals cause position error that introduces oscillations into the speed and current. To reduce these effects, the control structure of the drive is supplemented with self-calibration loop for online identification and compensation of the systematic errors in the resolver signals. Experimental results demonstrated online tuning ability of the method. Reduction of position error results in better running characteristics of the drive. Eccentricity between the resolver and the reference encoder limits additional reduction of position error and the speed oscillations. Furthermore, the imperfect demodulation of the resolver signals caused by phase shift results in additional position error that is proportional to speed and constant over the time.
In general, the described method represents effective and simple way to improve position measurement of the resolver sensor without the need of additional hardware equipment.