[See update at the bottom]
We build brushless DC motors of about 1 kW power at 48 volts. In order to drive the motor, we need to know the rotor position and, to do that, we fit a disc-shaped magnet on the top of the shaft, and read the rotor position using the Infineon TLE5012B angular sensor (datasheet: https://www.infineon.com/dgdl/Infineon-TLE5012B_Exxxx-DS-v02_01-EN.pdf?fileId=db3a304334fac4c601350f31c43c433f).
The overall setup is as described in this image, taken from the sensor user manual:
The magnet is a disc 10 mm wide and 4 mm thick:
Looking at the image above, it is not that the north is on one face, and the south on the other face: both north and south lie on the same face, with the north "up" (for example) and the south diametrally opposed.
When the motor+control board are assembled, we run a self-learning procedure which determines precisely the orientation of the magnet in respect to the rotor. It is very important that the board knows the precise offset (in degrees) of the north of the magnet, because once per turn the sensor generates an index pulse, and that pulse tells the board the rotor angle. The requested precision of this offset is about 5 degrees: if the offset is wrong by more than that, the motor sinks a lot of current and turns badly especially at higher speeds.
This system normally works well but, in about 10% of the cases, after some time (days or weeks) the motor starts to turn badly. Re-running the self learning procedure solves the issue. It seems that the magnet is not the same as before, a permanent change happens, correctable only by changing the stored offset (through the self learning procedure which, essentially, searches for the zero position which is now different than before).
Initially we thought that the magnet could mechanically move, so we started to fix it with some drops of glue. But this is not the issue, it seems.
So here is my question: is it possible that the north and south of a magnet like that change their position, especially thinking that the magnetic disc is mounted on the rotor of a brushless DC motor, where there are strong magnets? A move of one or two degrees does no harm; if that happens, we are facing a movement of 5 or more degrees.
---UPDATE---: What I mean with "change position of the poles" is that, after some unknown event (maybe temperature, or anything), the offset ("calibration") stored in the control board is no more valid. A new self-learning procedure corrects the problem. This means probably, that the poles have changed their position. The offset stored by the board is no more valid for that magnet. If both poles become weaker, together, probably there is no problem (the sensor auto regulates its sensitivity). But if the loss of magnetism is uneven among the two poles (who knows?), the "geometry" of the magnet changes and, to the sensor, it appears as the two poles have moved. May it be?
---UPDATE 2---: I have to clarify why I think there is a permanent change in the magnetic disc.
There is a "zero position" of the rotor. This "zero" is when the rotos is oriented in a precise position: at zero degrees (out of 360). Now suppose the sensor disc magnet is positioned perfectly onto the rotor such that, when the rotor is in its mechanical zero, the disc is perfectly aligned with the sensor, so the sensor emits a INDEX pulse. If I don't fit the disc in the correct position, the sensor will emit an index pulse anyway, but out of phase with the mechanical zero position of the rotor. For example, the index will come, every turn, at 5 degrees instead of 0 degrees.
By running the self-learning procedure, the control board is able to detect this misalignment or offset (5 degrees). This offset is then stored in non-volatile memory. From that moment, I can turn off the system, power it back again, and everything works because the absolute position of the rotor is corrected by the stored offset, so the electronic board knows the real position of the rotor and can energyze the coils correctly.
Now suppose I move the disc 10 degrees clockwise and power up the system: the control board will always get the wrong position of the rotor (always 10 degrees), so it will energyze the wrong coils (or not the "wrong coils", the correct ones, but too early or too late).
At this point, I run again the self-learning procedure, and the control board notices that the offset is not 5 degrees as before: now it is 15 degrees. The new offset is stored in memory, and everything works well again.
This is what is happening to us: we calibrate the system and send it to customers. Sometimes (10%), the customers calls us telling the motor fails. A new calibration solves. Only a couple of motors have been returned for inspection, at the moment, and we are investigating. Now, we understand that the offset has changed, but we have not been able to replicate the problem. We are sure that the position of the disc does not change, because we mark the position and also fix it with glue. It really seems that the poles of the magnetic disc change their position: and not only slightly, because an error in the offset is tolerable up to a few degrees (say, 3 or 4).
Here comes the question: is it possible that a magnetic disc moves its N and S poles in a permanent way, due to the continuous presence of external magnetic fields, perhaps in conjunction with high temperature events? It happens only in a few cases, and there are different situations. Sometimes the motor can heat, perhaps only once during installation, or maybe only once, or repeatedly, the motor is over stressed with big currents and hence anormally strong magnetic fields. But the result, it seems, is the same: the offset must be recalculated.