Dear,
We have attempted to implement the sensorless FOC (Field-Oriented Control) functionality for a Permanent Magnet Synchronous Motor (PMSM) in software. However, the implementation doesn't seem to behave as expected, with no stable feedback and the observer output (omega) increasing uncontrollably.
The sensorless FOC is configured to run in parallel with the Hall observer/sensor (used as feedback). The system normally operates with a sensor, but we are attempting to enable sensorless FOC. The microcontroller used is the MKV58F1M0VLL24. The following observations were made during testing:
Observer behavior is erratic: When the observer is enabled, the omega value (rotational speed) increases very quickly and uncontrollably, indicating that there is no stable feedback from the motor’s status.
Structs become "inf" or "NaN": After enabling the observer at e.g. 300 RPM, the following structs show "inf" (infinity) followed by "NaN" (Not a Number) via the watch/analyzer in Keil:
- AMCLIB_BEMF_OBSRV_DQ_T_A32:
This issue occurs not after initialization, but after the back-emf observer is enabled at e.g. 300 RPM (the Hall sensor is used for the low RPM range at start-up for the moment).
Sensor and Current Measurements:
The current and voltage measurements appear correct and match the expected values. This is confirmed by the fact that the system runs fine with the sensor in place (when the sensor-based feedback is used).
The (initialized) PI values have been calculated based on NXP documentation AMCLIB, and the motor parameters like Rs (stator resistance) and Ls (inductance) have been measured to verify that they are correct. Morover, both the PMSMBemfObsrvDQ and TrackObsrv are used in the FLT format (ARM Cortex M7F Rev. 2 11/2016)
Conclusion and Forum Inquiry:
While we are following NXP’s documentation, it seems that there is an issue with the feedback loop or the observer implementation. The uncontrolled increase in omega and the appearance of "inf" or "NaN" in the structs may point to a configuration issue with the observer or a flaw in the control algorithms.
Has anyone experienced similar issues with sensorless FOC implementations for PMSMs, or have any suggestions for potential causes and solutions? We are particularly interested in possible misconfigurations in the observer or control algorithm.