Keywords

1 Introduction

Owing to the requirements of high-power density, high-power efficiency, large output torque, and relatively simple control, permanent magnet synchronous machines (PMSMs) have been widely used [1, 2], where accurate rotor position detection is essential for stable and reliable operation [3]. However, in some special occasions, it is difficult to mount rotary rotor sensors, e.g., encoder, directly to the shafts of PMSMs. In addition, for ultra-precision position control, a sensor-less algorithm is unsuitable [4]. Compared with encoder and resolver, which are expensive and have complex coupling structure, linear Hall-based magnetic encoder can be embedded in stator and free of oil, moisture, dust, obstacle, vibration, and shock.

A linear Hall magnetic encoder-based rotor position detection scheme is to extend the rotor shaft and install a magnetized magnetic ring with sinusoidal field distribution [5, 6], which inevitably take up extra volume. Another type of linear Hall magnetic encoder [7,8,9] detects the magnetic leakage field of rotor-PMs at the end of the shaft, utilizing two linear Halls orthogonal embedded in stator slot or on a PCB located in the end-face of housing directly. However, the leakage field of rotor-PMs is relatively low, leading to a weak output of linear Halls and reduction of the position detection accuracy. Meanwhile, the temperature variation cannot be compensated when only two orthogonally embedded linear Halls are employed, unless two additional linear Halls are symmetrically installed to obtain the opposite signals versus the initial signals from two former linear Halls. Additional installation causes extra cost and the inaccurate installation results in unnecessary phase-shift error. In [10], three 120°-symmetric-distribution linear Halls are embedded in slots, but an extended Kalman Filter is used to eliminate the impact from temperature variation, which weakens the dynamic response due to a large amount of calculation. In general, none of the above methods consider the effect of armature current.

Hence, to resolve the contradictions above, a novel magnetic encoder with a linear Hall embedded in stator yoke is proposed in this paper, taking the influence of armature reaction into account.

2 The Principle of Angle Solving System

2.1 Selection of Magnetic Field Detection Points

Ideally, the magnetic field detected by the linear Hall should be in the form of an analytical expression versus rotor position, which can enhance the accuracy of angle decoding. Firstly, two-dimensional finite element analysis (2D-FEA) is carried out by Ansoft Maxwell to find suitable mounting locations for the linear Hall.

From the perspective of magnetic field amplitude, the amplitude of the B PM should be as large as possible, while the amplitude of the B armature should be as small as possible. From the perspective of solving accuracy, both the B PM versus rotor position and B armature versus armature currents should be linear.

A 9-slot/8-pole PMSM is exampled as shown in Fig. 1. Considering the stator is symmetrical in the circumference, nine special points are selected as magnetic field detection points within a tooth slot range.

Fig. 1
figure 1

Distributions of particular points in a 9-slot/8-pole PMSM

Secondly, produced separately by PMs and armature currents, both the tangential and radial components of the flux-densities of the nine detection points are analysed. Among them, the tangential component of the B PM versus rotor position is shown in Fig. 2. The simulation results are shown in Table 1. In summary, point 2 is selected as the magnetic detection point due to its high linearity for both B PM and B armature. For convenience, ‘point D’ represents ‘point 2’ in the following.

Fig. 2
figure 2

The tangential component of the B PM versus rotor position

Table 1 Comparison of flux-densities at points P1–P9

Moreover, considering the geometrical periodic of the 9-slot/8-pole PMSM, there are other eight ‘point Ds’ on the stator, i.e., totally nine ‘point Ds’ with the detailed locations listed in Table 2. Moreover, the nine ‘point Ds’ are divided into three groups, e.g., D 1, D 4, and D 7 for Group 1. The three B armature versus time waveforms in same group are distributed symmetrically by 120° in electrical degrees, and the waveforms at D 1, D 2, and D 3 are sequentially different by 15° in phase. Hence, D 1, D 4, and D 7 are chosen as a group of signal detection points in the following process.

Table 2 The locations of points D 1D 9

2.2 Mathematical Model of Armature-Reaction Field

The waveform of B armature versus time of point D is essentially sinusoidal with a small amount of harmonics and the same frequency as the armature current. According to the nature of the trigonometric function, the B armature can be linearly combined by two phase armature currents.

The three-phase armature currents are as follows:

$$ \left\{\begin{array}{l}{I}_{\mathrm{a}}={I}_{\mathrm{m}}\cos \theta\ \\ {}{I}_{\mathrm{b}}={I}_{\mathrm{m}}\cos \left(\theta -{120}^{{}^{\circ}}\right)={I}_{\mathrm{m}}\left(\frac{\sqrt{3}}{2}\sin \theta -\frac{1}{2}\cos \theta \right)\\[7pt] {}{I}_{\mathrm{c}}={I}_{\mathrm{m}}\cos \left(\theta +{120}^{{}^{\circ}}\right)={I}_{\mathrm{m}}\left(-\frac{\sqrt{3}}{2}\sin \theta -\frac{1}{2}\cos \theta \right)\end{array}\right. $$
(1)

where I a, I b, and I c are three-phase armature currents; I m is the amplitude of armature currents; θ = ωt; ω is the electrical angular velocity (rad/s).

Set the tangential B armature of point D as:

$$ {\displaystyle \begin{array}{rcl}{B}_{\mathrm{T}}&=&{B}_{\mathrm{m}}\sin \left(\theta +\varphi \right)\\ {}&=&{B}_{\mathrm{m}}\left(\sin \theta \cos \varphi +\cos \theta \sin \varphi \right)\\ {}&=&{B}_{\mathrm{m}}\left(\frac{I_{\mathrm{b}}-{I}_{\mathrm{c}}}{\sqrt{3}{I}_{\mathrm{m}}}\cos \varphi -\frac{I_{\mathrm{b}}+{I}_{\mathrm{c}}}{I_{\mathrm{m}}}\sin \varphi \right)\\ {}&=&{EI}_{\mathrm{b}}+{FI}_{\mathrm{c}}+G\end{array}} $$
(2)

where, \( E=-\frac{2{B}_{\mathrm{m}}}{\sqrt{3}{I}_{\mathrm{m}}}\sin \left(\varphi -{30}^{{}^{\circ}}\right) \), \( F=-\frac{2{B}_{\mathrm{m}}}{\sqrt{3}{I}_{\mathrm{m}}}\sin \left(\varphi +{30}^{{}^{\circ}}\right) \), and G represents the error term.

The B armature with armature currents of point D 1 can be fit by using the curve fitting toolbox in Matlab and the following result is obtained:

$$ {B}_{\mathrm{T}}=0.004981{I}_{\mathrm{b}}-0.004981{I}_{\mathrm{c}}-2.7\times {10}^{-5} $$
(3)

The comparison between the analytical result and FEA-predicted value of B armature is shown as Fig. 3, showing that the B armature can be expressed linearly by the armature currents within 1.2% error.

Fig. 3
figure 3

Analytical result and actual FEA-predicted value of B armature

2.3 Angle Solving Algorithm

Assuming that a series of sinusoidal signals have been obtained by separating the B armature from B Synthetic, a reasonable signal processing algorithm should be selected to generate the rotor position from these signals. The commonly used signal processing algorithms are based on (1) Arc tangent, (2) Look-up table, (3) Linear analytical, and (4) Adaptive notch filter (ANF) and phase-locked loop (PLL).

Algorithm 1 is simple to execute, but it requires a long operation time and cannot meet the requirements of dynamic response [3, 6, 7]. Algorithm 2 greatly simplifies the calculation; however, the sine function has a low resolution accuracy in the portion with a small slope, which seriously reduces the resolution accuracy [11]. Meanwhile, a large amount of index data for high accuracy will reduce dynamic response and lead to over-fitting. Algorithm 3 makes use of the linear segment at the zero crossing of a sine wave to estimate the rotor position [12]. Algorithm 4 requires additional filters, which decreases the dynamic response [9].

This paper proposes a novel differential-type piecewise-linear analytical method. After subjected to approximate differential process, the processed signal is divided into several quadrants. In each quadrant, one of the signal with the highest linearity is used to solve the rotor position and the linear analytical expressions are obtained by least squares.

For the three symmetrical signals distributed by 120°, the same DC offset ∆U is generated due to the environment, U m is the amplitude of the waveform and U OQ is the static output voltage from linear Hall, then:

$$ \left\{\begin{array}{l}{U}_{\mathrm{a}}={U}_{\mathrm{m}}\sin \left(\theta \right)+{U}_{\mathrm{OQ}}+\Delta U\\ {}{U}_{\mathrm{b}}={U}_{\mathrm{m}}\sin \left(\theta -{120}^{{}^{\circ}}\right)+{U}_{\mathrm{OQ}}+\Delta U\\ {}{U}_{\mathrm{c}}={U}_{\mathrm{m}}\sin \left(\theta +{120}^{{}^{\circ}}\right)+{U}_{\mathrm{OQ}}+\Delta U\end{array}\right.\vspace*{-10pt} $$
(4)
$$ \left\{\begin{array}{c}{U}_{\mathrm{a}\mathrm{b}}={U}_{\mathrm{a}}-{U}_{\mathrm{b}}=\sqrt{3}{U}_{\mathrm{m}}\sin \left(\theta +{30}^{{}^{\circ}}\right)\\ {}{U}_{\mathrm{b}\mathrm{c}}={U}_{\mathrm{b}}-{U}_{\mathrm{c}}=\sqrt{3}{U}_{\mathrm{m}}\sin \left(\theta -{90}^{{}^{\circ}}\right)\\ {}{U}_{\mathrm{c}\mathrm{a}}={U}_{\mathrm{c}}-{U}_{\mathrm{a}}=\sqrt{3}{U}_{\mathrm{m}}\sin \left(\theta +{150}^{{}^{\circ}}\right)\end{array}\right. $$
(5)

where U a, U b, and U c are signals from three linear Halls located at points D 1, D 4, and D 7, as shown in Fig. 4; U ab, U bc, and U ca are signals after the approximate differential process, as shown in Fig. 5.

Fig. 4
figure 4

The initial signals

Fig. 5
figure 5

The quadrant diagram of processed signals

As for Eq. (5), a six-quadrant symmetric partition is performed according to Fig. 5. In each quadrant region, the signal with highest linearity (marked with red line) will be utilized by linear analytical solving, which treats the waveform as a line segment, accelerating the dynamic response.

This novel method eliminates the DC offset without adapting addition differential linear Hall and increases the signal amplitude to \( \sqrt{3} \) times, improving the solving accuracy correspondingly. It coordinates the contradiction between dynamic response, accuracy, and cost.

2.4 Angle Solving System Diagram

The rotor position can be obtained, according to the flow chart (Fig. 6), where two sets of raw data are needed in angle solving system

  1. 1.

    Three-phase armature currents are obtained by high-precision current sensor detection.

  2. 2.

    The voltage signals of Hall group are derived from three linear Halls embedded in the stator.

Then,

Fig. 6
figure 6

Angle solving system diagram

3 Simulation and Analysis

In this simulation, the mechanical speed of the PMSM is 1500 rpm, which means the electrical angular velocity ω e = 200π rad/s; the amplitude of armature currents I m = 50 A; for three-phase symmetrical armature current, θ = 0 or ± 2π/3; t simulation means simulation time; step means simulation time step.

3.1 Fitting Coefficients Acquisition

Before solving the rotor position, fitting coefficients of B armature versus armature currents is required, i.e., the current-magnetic field conversion shown in Fig. 6.

The 2D-FEA is carried out by Ansoft Maxwell under the condition: (1) t simulation = 0.01 s; (2) step = 0.00001 s; (3) I = (1 − et/0.04)I m sin (ω et + θ); (4) The remanence of PM is 0 T.

The waveforms of B armature at D 1, D 4, and D 7 are shown in Fig. 7. The B armature at nine points are separately fit to armature currents, obtaining a coefficient matrix as shown in Table 3. E and F represent the fitting coefficients mentioned in Eq. (2).

Fig. 7
figure 7

B armature at D 1, D 4, and D 7

Table 3 Fitting coefficients of B armature versus armature currents

3.2 Angle Solving Process

The 2D-FEA is carried out by Ansoft Maxwell under the condition: (1) t simulation = 0.04 s; (2) step = 0.00005 s; (3) I = (1 − et/0.04)I m sin (ω et + θ).

Then, two sets of raw data can be obtained: (1) synthetic flux-density and (2) three phase armature currents.

After confirming the value of B armature by the expression of armature currents, which is mentioned earlier, B PM is obtained by separating the B armature from the B Synthetic.

Via differential piecewise linear analytical method, the comparison between angle decoding result and the actual rotor position is shown in Figs. 8 and 9.

Fig. 8
figure 8

The comparison between decoding result and actual value of rotor position

Fig. 9
figure 9

The rotor angle error between decoding result and actual value

The waveform in Fig. 9 can be regarded as the combination of basic waveform with same amplitude and spike waveform with increasing amplitude. There are eight pairs of basic waveforms in Fig. 9, which are independent of the armature currents. The spike waveform is related to the incremental current value, which is caused by the error of fitting coefficient in Table 3. The simulation error between decoding result and actual value of rotor angle is 0.12 degrees, reaching a resolution level of 3000 lines.

4 Experiment

4.1 Experiment Platform

In order to verify the feasibility of this novel angle detection system, the PMSM, the permanent magnet DC motor and the rotary encoder are coaxially connected and mounted on a bench, as shown in Fig. 10, and the assembled view of linear Halls is shown in Fig. 11.

Fig. 10
figure 10

Experiment platform

Fig. 11
figure 11

Assembled view of linear Halls at the stator yoke

(1) 24 V regulated power supply module, (2) OMRON rotary encoder with the accuracy of 2000 lines, (3) Permanent magnet DC motor (Drives PMSM to imitate no-load operation or serves as the load of PMSM), (4) Three-phase 6-slots/4-poles PMSM (Three linear Halls are embedded in the stator yoke which are marked with dashed ellipse), (5) Permanent magnet DC motor driver, (6) Digital signal processor and PMSM driver.

4.2 Experiment Results

Power the permanent magnet DC motor and drag the PMSM to intimate the no-load operation of PMSM, observing the voltage signals from three linear Halls (Fig. 12), angular output from rotary encoder, and novel angle solving system (Fig. 13).

Fig. 12
figure 12

Linear Hall group’s output under no-load operation

Fig. 13
figure 13

The comparison of angular outputs between rotary encoder and novel angle solving system at different speeds

Since the install holes of the linear Halls are manually punched, there exists mechanical asymmetry of three mounting holes, resulting in asymmetry of the three-phase waveform, shown in Fig. 12. The width deviation of mounting holes causes waves’ difference in amplitude, and the radial deviation of the mounting holes causes waves’ difference in phase. Considering that the peak-to-peak value of signal is up to 1.415 V, the decoding accuracy can be improved by precise installation and replacing small-scale linear Halls.

This novel encoder prototype has a maximum electrical angle error of 0.3%, which is mainly derived from the asymmetry of the mounting holes. Although the error at switch point is inevitable, it can be eliminated as much as possible by setting the calibration angle between encoder and this novel encoder properly. Furthermore, the dynamic response is almost the same as using a rotary encoder.

5 Conclusions

The linear Hall-based embedded angle sensor proposed in this paper is verified by simulation and experiment, showing that the simulation decoding resolution reaches 3000 lines and the novel encoder prototype has a maximum electric angle error of 0.3% under no-load operation. It reduces the cost of the angle sensor and saves the sensor installation space while maintaining a certain level of resolution. This preliminary experiment does not take the effect of armature reaction currents into account. So the novel linear Hall-based angle sensor should be validated by further experiments under various operating conditions.