Part 1 of this article described the design task required and various sources of electric motor rotor position error.
Concept overview
Let's assume a motor with three Hall sensors, but what follows can be applied to whatever number of Hall sensors.
Preliminarily, note that between two consecutive occurrences of the same edge, rising or falling, of the same sensor on a mechanical rotation, the rotor surely moved 360 degrees. According to this, the time t'0_index between two consecutive occurrences of the same edge, rising or falling, of the same sensor on a mechanical rotation with index = 1,..., 6n (with n the number of pole pairs of the motor) according to the current edge of the Hall sensors on a mechanical rotation can be used in the Eq. (1) instead of the time t0 (see below). Moreover, the angle Θ0 is not fixed according to the current edge of the Hall sensors, but it is the last Θ(t) calculated at the occurrence of the same edge on a mechanical rotation. So the Eq. (1):
can be written as:
According to the Eq. 2, during two consecutive edges of the Hall sensors, the current rotor angle will be correctly predicted because the time t'0_index corresponds exactly to 360 mechanical degrees (or n * 360 electrical degrees) and moreover, for each edge on the Hall sensors, the correct relevant rotor angle will be calculated and used for the prediction of the rotor angle Θ(t).
Figure 3 (below) shows a possible implementation of the proposed concept. Let's assume a motor with three Hall sensors. The subsystem 1 includes six hit crossing blocks to distinguish the rising and falling edges of the Hall sensors during an electrical rotation and an OR operation block. The output of the OR block is used as a signal of general synchronization by the subsystems 3 and 4.
Fig. 3
View a full-size image
The subsystem 2 generates the index value that is included between 1 to 6n, with n the number of pole pairs of the motor, and has as an input which is the output of the subsystem 1. The subsystem 2 gives the current value of index that will be used by the subsystems 3 and 4.
Before explaining the use of index, let's see how it is generated. The subsystem 2 includes the index determination, the counter polar pairs, and the counter module n. The block index determination gives the index_e value, which can be from 1 to 6, according to the current edge of the Hall sensors. The counter module n has as an input the synchronization signal, used to identify the current polar pair, and the output of the counter is ranged between 1 to n-1. This value is multiplied by 6 and added to the index_e value.
The subsystem 3 calculates Θ0_index (i.e. Θ(t) in the 6n synchronization times according to the Eq. (2) using the previous value of Θ0_index) and stores it in the Register HS offset with 6n memory cells. The subsystem 3 simply reads the value Θ(t) when an edge of the Hall sensors occurs and stores this value in the correct position using the index value (i.e. it updates the value of Θ0_index. For index = 0, the Θ0_index= 0 value is always 0° in order to take the relevant Hall sensor's edge as reference.
The subsystem 4 implements Eq. (2). In particular, the subsystem 4 uses the timer T0 in free-running mode in order to calculate t'0_index for each edge of the Hall sensors and stores this value using a register with 6n memory cells. The t'0_index is calculated considering that when an edge of the Hall sensors occurs, the current value of the timer T0 is subtracted to the previous value t'0_index according to the current value of index and the new value is stored in the correct position.
|