Automatically encoder direction correction

Motivation

In order for FOC to work correctly, feedback from the Hall Sensor and Encoder is required. However, the important thing to pay attention to is that the Hall Sensor and Encoder are in the same direction. However, since there is no such standard in practice, Encoder and Hall Sensor directions differ in some motors. The solution offered by EONAS for the resulting situation is to manually add an inversion flag and leave its control to the user. However, this may cause confusion for inexperienced users. Such a solution has been offered to both eliminate this confusion and reduce the number of parameters left to the user.

Explanation

The motor rotation command is applied to the motor and determines this direction by feedback should be standardized. Despite this standardization requirement, the encoder’s mounting direction to the motor and connection with NXHX-DH may differ. For this reason, this standardization needs to be ensured. Otherwise, the direction obtained with the feedback will differ according to the mounted motor.

Set speed direction

Hall sensor direction

Encoder direction

Set speed direction

Hall sensor direction

Encoder direction

CW

+

+

CCW

-

-

Table 1 - Standardized motor control and feedback directions

The standardization we accept and implement is shown in Table 1. Generally, the accepted standardization for the encoder’s rotation direction designed for the respective motor is unclear. Also, carelessness during cable assembly may cause an error during directional determination. In order to eliminate all these uncertainties, we must automatically determine the encoder direction separately from these variables. In order to do this, we have Hall Sensor information and applied 3-phase current to the motor.

Figure 1 - Encoder direction correction algorithm

Basically, Hall Sensor ve Encoder speeds are determined and compared separately with the applied algorithm (Figure 1). By comparing the signs of the measured speeds, it is determined whether they are in the same direction and if the signs are different, the direction of the encoder is inverted. The thing to note here is that the inversion process is performed indirectly, thanks to the netX90 MENC configuration register. Thus, correction takes place directly at the register level without any extra algorithm.

Â