I am running the example code from Control Suite for the HV Kit for Sensorless PMSM control. I am at build level 6. I actually modified build level 5 so that I can run either sensorless or with the encoder by changing lsw from a 2 to a 3. I basically combined build level 5 and 6 using lsw as the switch. When I run with encoder feedback, the motor runs in velocity loop very nicely. I can load the motor and the speed stays constant, but current goes up. I can see the current demand by looking at the value of pid1_iq.Ref. This changes from 0.09 with no load to .99 with a heavy load. This is what is expected. However, when I run with sensorless, I cannot load the motor very much before it stalls, As I load the motor, pid1_iq.Ref goes up, but when it gets to about 0.2 or 0.3, the motor stalls. I am viewing qep1.elecTheta (the encoder position) and smo1.Theta (estimated position from sliding mode observer) on a scope. With no load, they are in synch. However, when I load the motor, they move out of synch. It appears that the smo1.Theta advances relative to the encoder when spinning CCW and retards when spinning CW. I have played with the sliding mode observer gains, but I really do not understand the sliding mode observer, so I really do not know what I am doing with that. It seems that adjustments of either gain up or down from where I have them now make it worse, not better.
Please advise what I might do to solve this problem.
Thank You,
Brad