Journal of Electrical and Computer Engineering

Journal of Electrical and Computer Engineering / 2021 / Article

Research Article | Open Access

Volume 2021 |Article ID 5579692 |

Jiliang Yi, Xuechun Zhou, Huabing Tan, Zhongqi Li, "Resolver Decoding Method Using Hilbert Transform and ATO", Journal of Electrical and Computer Engineering, vol. 2021, Article ID 5579692, 7 pages, 2021.

Resolver Decoding Method Using Hilbert Transform and ATO

Academic Editor: Nicola Pasquino
Received21 Feb 2021
Accepted26 Apr 2021
Published04 May 2021


Resolvers are widely used in electric vehicles, trains, and other harsh fields because of their robustness. However, the resolver outputs two orthogonal analog signals, which make the resolver decoding either high hardware cost or poor decoding accuracy. A noise robust resolver decoding method using Hilbert transform and angle-tracking observer (ATO) is proposed in this paper. Firstly, Hilbert transform is employed to obtain the modular envelopes of resolver signals. Next, the modular envelopes are filtered, and their quadrants are recognized by the polarity relation of the resolver signals and the modular envelope extreme point. Then, the ideal demodulating signals are gained through the linearization of the envelope zero point. Finally, the improved ATO is used to obtain the rotor angle by iteratively calculating the demodulating signal. The effectiveness of the proposed method is verified by experiments under various rotor speed conditions and compared with other methods in noise immunity. The results show that the proposed method can control the decoding error within 0.5° when the SNR is 30 dB, which provides a high-precision and low-cost decoding scheme for practical applications.

1. Introduction

Resolver, a type of position sensor, has the advantages of durability and adaptability to harsh environments and is widely used in rail transit, new energy vehicles, aerospace, and other industrial fields [1]. However, the resolver signals, rather than the direct digital signal containing rotor angle, involve orthogonal cosine and sine analog signal. Therefore, the resolver signals need to be decoded to obtain the rotor angle.

Existing methods of resolver decoding can be divided into two categories: hardware-based and software-based [2]. The hardware-based decoding method mainly uses a specific decoding chip—resolver-to-digital conversion (RDC). However, the RDC chip is expensive and makes the circuit more complicated [3].

The software-based method usually takes two steps to decode resolver signals, and obtaining the demodulation signal is the first step. As a time-frequency analysis tool, S-transform is used to extract the resolver signal envelope in [3], but calculation burden of S-transform is heavy, and it is mainly applied in power quality analysis [46]. Other time-frequency methods such as wavelet transform are mainly used in system optimization in related industries [7]. Currently, the common methods of resolver signal envelope extraction are peak detection or multiplying excitation technique. The output signals are sampled only at the moment when the excitation reaches its peak in the peak detection technique [8], so it is relatively simple to realize and has a good real-time performance. However, the method will cause the loss of the resolution of the envelope, and it is susceptible to noise. The multiplying excitation technique multiplies resolver signals by the excitation to obtain their envelopes, and a filter is needed to filter out the excitation components to obtain demodulation signals [9], so the operation process is relatively complicated [10, 11].

The second step of the software-based method is to calculate the rotor angle according to the demodulation signal. The commonly used angle calculation methods include arc-tangent method and ATO [12]. In the former method, the arc-tangent operation is directly applied to the demodulated signal, so the decoding results are greatly affected by noise. The ATO uses the closed-loop control method to calculate the angle, but there are large decoding errors in calculating the initial angle. In [9], ATO based on acceleration compensation was used to reduce the steady-state decoding errors under the acceleration condition. However, the implementation of this method is relatively complex.

The software-based decoding method has become a better choice for many applications due to its low cost and flexibility. However, the accuracy and noise robustness of the existing software-based methods need to be further improved [13]. The Hilbert transform is convenient for extracting the signal envelope which is mentioned in [14], but there is no in-depth discussion about how to apply in resolver decoding. In recent years, Hilbert transform has been mainly applied in seismic analysis and power grid quality disturbance detection [1518].

In this paper, combining the advantages of Hilbert transform in envelope extraction and ATO in angle calculation, a new resolver decoding method is proposed for various conditions. Firstly, Hilbert transform is used to transform the resolver signals into an analytic signal and extract their modular envelope. Then, after filtering the modular envelope, the perfect demodulation signal is formed by using the polarity rule and zero-crossing linearization. Finally, the improved ATO is used to decode the demodulated signal to obtain the rotation angle. Through the simulations under various conditions, it is verified that the decoding error of the proposed method is less than 0.5° when the SNR is 30 dB. Compared with other methods such as the peak detection method and multiplying excitation technique, the proposed method has better antinoise performance.

2. Foundation

2.1. Foundation of the Resolver

The working principle of the resolver is shown in Figure 1. The input signal of the resolver is the excitation, and two orthogonal modulated output signals and are generated by two induction coils which are installed vertically [19].

and are related to the excitation and rotor angle , and the relationship between them can be expressed aswhere is the amplitude of the excitation, is the angular frequency of the excitation, and k is the voltage ratio of the resolver.

It can be seen from (1) that output signals and related to the rotor spatial relative position, which is measured by detecting , will be generated when is applied to the input end of the resolver. In order to obtain , the envelopes of and need to be extracted by mathematical tools. In this paper, Hilbert transform is used because of its fast processing ability for nonstationary signals.

2.2. Foundation of Hilbert

The Hilbert transform can be regarded as the output of a linear time-invariant system with input , and its impulse response is [20, 21], so can be expressed aswhere is an integral variable.

An analytic signal can be constructed aswhere j is an imaginary operator.

The modular envelope of the resolver signal can be directly obtained by Hilbert transform, and the envelope can be expressed as

The complete demodulation signal can be obtained by imposing quadrant interpretation to the modular envelope. And the complete demodulation signal will be employed to solve rotor angle based on an algorithm, and it is the ATO in this paper.

2.3. Foundation of the ATO

The principle of the ATO is to track the angle error through the trigonometric function of the angle difference by using the detected demodulation signal. As shown in Figure 2, and are the detected demodulation signals, and is the output of the ATO. It uses the last estimate plus to get the current angle estimate. When the estimated angle is infinitely close to the actual angle , the error is infinitely close to zero, as shown in the following:

Therefore, the value of can be obtained from the estimated .

3. The Proposed Technique

The resolver decoding method proposed in this paper is shown in Figure 3. The Hilbert transform is employed to obtain the analytic signals and which correspond to and , respectively. Then, the module envelopes and are obtained by taking modulus and filtering and . The demodulation signals and are achieved by adding polarity to and . Finally, the improved ATO is used to calculate the rotor angle .

As shown in Figure 3, the unit of polarity determination is employed to gain the polarity of and . The difference of polarity between and is found at the point of maximum of , where represents or and represents or , so P can be expressed aswhere sign[] is the signum function and is the index number of maximum of .

A multiplication rule is adopted to obtain the demodulation signals and , and the rule can be expressed aswhere represents or , is the sample number, and is the index number of minimum of .

As mentioned above, the rotor angle is obtained by performing ATO to the obtained demodulation signals and . ATO usually has a large error in solving initial angle [7]. In this paper, the improved ATO is used to solve the initial angles and . Based on the ATO, improved ATO carries out iterative operation to continuously reduce the error, and it can be expressed aswhere and are the angle of two adjacent iterations and is the gain, and it can be assigned a value between 1 and 1.026 [8]. Because the angle can be quickly approximated by the improved ATO through iteration, K1 = 1 is adopted in this paper to avoid the result oscillation caused by the excessive value.

The iterative termination condition of (8) and (9) is that the error is less than a certain set value. At this time, it can be considered that the obtained is equal to .

To sum up, the proposed resolver decoding method is implemented in the following steps:Step 1: formulas (2) and (3) are used to process the input signals and to obtain the corresponding analytic signal and of the two signalsStep 2: the amplitudes of and , i.e., the modular envelopes of and , are obtained by using formula (4)Step 3: a FIR filter is used to smooth the modular envelopes to get and Step 4: formula (6) is used to obtain the polarity value P, and formula (7) is used to determine the polarity of and to obtain demodulation signals and Step 5: formulas (8) and (9) are used to iteratively calculate the estimated angle until the error is less than a certain set value

According to the above algorithm steps, the calculation of this algorithm is mainly in three aspects, that is, (1) using Hilbert transform to form the analytic signal, (2) using FIR to filter the demodulation signal, and (3) using the ATO to decode the angle. If the processed data are N points, then the implementation of (1) needs N-point FFT and N-point IFFT, which is its main calculation [22]. In (2), N × R times of multiplication and accumulation are needed to calculate FIR, where R is the order of FIR. In (3), the multiplication and accumulation of 2 × N times sine and cosine need to be calculated. Obviously, if sine and cosine are calculated by looking up the table, the amount of calculation can be reduced. Because the resolver decoder needs to process the two signals mentioned above, the amount of computation needs to be doubled. MATLAB is used to run the algorithm on the computer with i5 CPU 2.3 GHz, and the execution time is about 0.3 ms when the data length is 256 points and FIR order is 102. Generally, the sampling rate of the resolver decoding system is lower than 250 kHz, and it takes more than 1 ms to sample 256 points of data. Therefore, the algorithm in this paper can meet the real-time operation.

4. Experiments

In order to verify the feasibility of the proposed method for resolver decoding, experiments were carried out through MATLAB simulation. The initial angle is set as 30°, the excitation frequency f = 10 kHz, the sampling frequency fs = 160 kHz, the excitation amplitude 10 V, the voltage ratio K = 0.2, and the resolver is set as the constant forward speed. The original signals and are shown in Figure 4.

4.1. Under Noise Conditions

Take the medium speed working condition (2000 r/min) as an example, and noise is superimposed on the original signal, and the SNR is set to 30 dB. The simulation results are shown in Figure 5. Figure 5(a) shows the demodulation signal, but it is not filtered. Figure 5(b) shows of the original signal and estimated angle obtained by the ATO. Figure 5(c) shows the error . It can be seen that the demodulated signal is seriously interfered by noise due to no filtering, which results in great error in , and the maximum of error is close to 25°. Therefore, a filter is used to reduce errors, as shown in Figure 3, and the simulation results using the filter are shown in Figure 6.

As shown in Figure 6, the rotor angle error is obviously reduced, and the maximum error occurs at the zero-crossing point of the demodulation signal, which is about 2°. This is because the filter not only filters out the noise but also smoothes the extremum of the modulus envelope, which makes the zero crossing of the demodulation signal discontinuous. In order to reduce the error, the zero-crossing section of the demodulated signal is linearized before transferring to the improved ATO to resolve . The principle of zero-crossing linearization is to take the polar conversion point as the center, take the demodulation signal point with the distance of nl from the polar conversion point as two endpoints, and then update the data between the two ends through the linear equation. In this way, the zero-crossing signal distortion caused by the weakening of the extreme point can be eliminated. Generally, nl can be 5∼20. The simulation results after linearization are shown in Figure 7.

As shown in Figure 7(a), the steepness of the zero-crossing point of the demodulation signal is eliminated, and as can be seen from Figure 7(b), the angle error is reduced to less than 0.5°. Therefore, using Hilbert transform, filter, and zero-crossing linearization, the accurate demodulation signal under the condition of noise can be obtained, and the precise angle can be solved by the improved ATO.

4.2. Under Different Rotation Speed Conditions

In order to verify the effectiveness of the proposed method under various working conditions, four working conditions, namely, the ultralow rotation speed (100 rpm), low rotation speed (1000 rpm), medium rotation speed (2000 rpm), and high rotation speed (8000 rpm), are set up for the adaptability experiment, and the noise level is 30 dB. A large number of experiments have been performed under various working conditions, and a section of signals (2500 samples) and their decoded results are randomly selected for statistical analysis. Figure 8 shows the demodulation signal, decoding angle, and error under the conditions of ultralow speed, low speed, and high speed, respectively. The angle error statistics under various working conditions are shown in Table 1.

Working condition (rpm)Error (degree)
MaximumMeanStandard deviation


It can be seen from Table 1 that the maximum angle errors under various working conditions are less than 0.5°. According to the decoding results, the rotor angle under different working conditions can be accurately obtained by the proposed method, which is also proved by the experimental results that it has the adaptability to working conditions. It should be noted that the mean value of angle error in the ultralow speed condition is positive, while that in other conditions is negative, as shown in Table 1. This is because the proposed algorithm contains a filtering unit (Figure 3), which can filter out noise and weaken fast-changing signals. However, the signal changes very slowly under the ultralow speed condition and is hardly weakened by the filter, so the estimated value will be greater than the real value under the effect of noise.

4.3. Comparison of the Antinoise Ability

In order to compare the antinoise performance of the proposed method with other methods, a comparative experiment was conducted with the peak detection method [8] and the multiplicative excitation method [9]. All the methods use the same filter and add noise to make the SNR of resolver signals 40 dB and 30 dB under the medium-speed condition. The results are shown in Table 2. As can be seen from Table 2, with the increase of the noise level, the maximum angle error of these three methods also increases. However, the method in this paper is the least affected by noise, while the peak detection method is the most affected by noise.

SNR (dB)Maximum error (degree)
Hilbert + ATOMultiplied excitation signalPeak detection


5. Conclusion

The difficulty of resolver decoding is to achieve the best balance between cost and availability. If the software-based decoding technology can meet the actual requirements, the decoding system will have cost advantage. In this paper, a new method for calculating rotation angle is proposed by using Hilbert transform and improved ATO, which can adapt to various working conditions of the resolver and meet the requirements of precision and real time. The analytic signal formed by Hilbert transform can extract the signal envelope effectively; the zero-crossing linearization can eliminate the error caused by the filter on the minimum point of the module envelope. The decoding error of the proposed method is less than 0.5° when the SNR is 30 dB, and the algorithm time is less than 0.3 ms when the data length is 256 points, which can meet the accuracy and real-time requirements of practical applications. Compared with other methods, it also has advantages in noise immunity. Therefore, as a low-cost software decoding method, this method has a good application prospect. It is true that in order to make the proposed method run in the actual system, the software and hardware design based on the DSP chip need to be further studied.

Data Availability

No data were used to support this study.

Conflicts of Interest

The authors declare that they have no conflicts of interest.


This work was supported by the Scientific Research Fund of Hunan Education Department of China (18A272).


  1. T. Shi, Y. Hao, G. Jiang, Z. Wang, and C. Xia, “A method of resolver-to-digital conversion based on square wave excitation,” IEEE Transactions on Industrial Electronics, vol. 65, no. 9, pp. 7211–7219, 2018. View at: Publisher Site | Google Scholar
  2. L. B. Brahim, M. Benammar, and M. A. Alhamadi, “A resolver angle estimator based on its excitation signal,” IEEE Transactions on Industrial Electronics, vol. 56, no. 2, pp. 574–580, 2009. View at: Publisher Site | Google Scholar
  3. J. Yi, M. Zhou, Z. Li, and J. Li, “A novel technique for fundamental and harmonic parameter estimation using nonergodic $S$ -transform,” IEEE Transactions on Instrumentation and Measurement, vol. 68, no. 10, pp. 3503–3513, 2019. View at: Publisher Site | Google Scholar
  4. Y. Xi, Z. Li, X. Tang, and X. Zeng, “Classification of power quality disturbances based on KF‐ML‐aided S‐transform and multilayers feedforward neural networks,” IET Generation, Transmission & Distribution, vol. 14, no. 19, pp. 4010–4020, 2020. View at: Publisher Site | Google Scholar
  5. K. R. Debopoma and C. Surajit, “Fault analysis in solar–wind microgrid using multi‐resolution analysis and Stockwell transform‐based statistical analysis,” IET Science, Measurement & Technology, vol. 14, no. 6, pp. 639–650, 2020. View at: Publisher Site | Google Scholar
  6. N. M. Khoa and L. V. Dai, “Detection and classification of power quality disturbances in power system using modified-combination between the stockwell transform and decision tree methods,” Energies, vol. 13, no. 14, pp. 1–30, 2020. View at: Publisher Site | Google Scholar
  7. W. Deng, J. Xu, Y. Song, and H. Zhao, “Differential evolution algorithm with wavelet basis function and optimal mutation strategy for complex optimization problem,” Applied Soft Computing Journal, vol. 100, no. 3, Article ID 106724, 2021. View at: Publisher Site | Google Scholar
  8. D. A. Khaburi, “Software-based resolver-to-digital converter for DSP-based drives using an improved angle-tracking observer,” IEEE Transactions on Instrumentation and Measurement, vol. 61, no. 4, pp. 922–929, 2012. View at: Publisher Site | Google Scholar
  9. F. Wang, T. Shi, Y. Yan, Z. Wang, and C. Xia, “Resolver-to-digital conversion based on acceleration-compensated angle tracking observer,” IEEE Transactions on Instrumentation and Measurement, vol. 68, no. 10, pp. 3494–3502, 2019. View at: Publisher Site | Google Scholar
  10. C. Attaianese and G. Tomasso, “Position measurement in industrial drives by means of low-cost resolver-to-digital converter,” IEEE Transactions on Instrumentation and Measurement, vol. 56, no. 6, pp. 2155–2159, 2007. View at: Publisher Site | Google Scholar
  11. J. Wang, M. Zhu, and L. Ding, “Noise-robust software based R/D conversion methods using over-sample technique,” Computers & Electrical Engineering, vol. 38, no. 6, pp. 1636–1646, 2012. View at: Publisher Site | Google Scholar
  12. R. Zhao, X. Tao, D. Liu, and S. Tian, “Research on the decoding algorithm of rotary transformer based on Angle observer,” Power Electronics Technology, vol. 46, no. 4, pp. 1–3, 2012. View at: Google Scholar
  13. H. Saneie, R. Alipour-Sarabi, Z. Nasiri-Gheidari, and F. Tootoonchian, “Challenges of finite element analysis of resolvers,” IEEE Transactions on Energy Conversion, vol. 34, no. 2, pp. 973–983, 2019. View at: Publisher Site | Google Scholar
  14. L. Wynne, H. Ballantyne, X. Li, A. Falco, and S. Schulz, “A Hilbert transform method for measuring linear and nonlinear phase shifts imparted by metasurfaces,” Photonics and Nanostructures - Fundamentals and Applications, vol. 42, pp. 1–13, 2020. View at: Publisher Site | Google Scholar
  15. Z. Li, “Application of Hilbert transform in GPR data processing,” Energy and Environmental Protection, vol. 42, no. 7, pp. 105–109, 2020. View at: Google Scholar
  16. S. Zhong, Y. Wang, Y. Zheng, and X. Chang, “Reverse time migration of ground‐penetrating radar with full wavefield decomposition based on the Hilbert transform,” Geophysical Prospecting, vol. 68, no. 4, pp. 1097–1112, 2020. View at: Publisher Site | Google Scholar
  17. B. Taheri, S. A. Hosseini, H. Askarian‐Abyaneh, and F. Razavi, “Power swing detection and blocking of the third zone of distance relays by the combined use of empirical‐mode decomposition and Hilbert transform,” IET Generation, Transmission & Distribution, vol. 14, no. 6, pp. 1062–1076, 2020. View at: Publisher Site | Google Scholar
  18. B. Lv, X. Chen, H. Xu, Y. Liu, X. Luo, and C. Zhou, “Application of windowed 2d Hilbert transform in 3d seismic volume edge detection,” Petroleum Geophysical Exploration, vol. 55, no. 3, pp. 661–668+473, 2020. View at: Google Scholar
  19. Y. Xu, W. Gao, and D. Xu, “Design of resolver system based on DSP,” Electrical Measurement Technology, vol. 38, no. 1, pp. 54–58, 2015. View at: Google Scholar
  20. K. Karami, P. Fatehi, and A. Yazdani, “On‐line system identification of structures using wavelet‐Hilbert transform and sparse component analysis,” Computer-Aided Civil and Infrastructure Engineering, vol. 35, no. 8, pp. 870–886, 2020. View at: Publisher Site | Google Scholar
  21. T. Bettahar, C. Rahmoune, D. Benazzouz, and B. Merainani, “New method for gear fault diagnosis using empirical wavelet transform, Hilbert transform, and cosine similarity metric,” Advances in Mechanical Engineering, vol. 12, no. 6, pp. 1–11, 2020. View at: Publisher Site | Google Scholar
  22. L. Marple, “Computing the discrete-time “analytic” signal via FFT,” IEEE Transactions on Signal Processing, vol. 47, no. 9, pp. 2600–2603, 1999. View at: Publisher Site | Google Scholar

Copyright © 2021 Jiliang Yi et al. This is an open access article distributed under the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.

Related articles

No related content is available yet for this article.
 PDF Download Citation Citation
 Download other formatsMore
 Order printed copiesOrder

Related articles

No related content is available yet for this article.

Article of the Year Award: Outstanding research contributions of 2021, as selected by our Chief Editors. Read the winning articles.