Issue with rotor angle

I have plotted the rotor angle


There is a gap happening periodically in the rotor angle. I am not sure how do i find out? I am still debugging. I will share more details, but i am not able to export to csv file, the file is in .jason format.

What sensor are you using? PWM and analog approaches imply small gaps of a sort at the top dead center although I would have to look closer to decide if this is what they would look like. The angle should be either increasing indefinitely or decreasing indefinitnitely, not looping or oscillating like that. The raw angle cycles from zero to 2pi or 2 pi to zero but the higher level code uses a continually accumulating figure for the angle. Why it would bounce back and forth between 90 and -90 I have no idea, also you are probably going to have to share details about your hardware and code if you are going to get much useful advice.

Please give me time I will write a detailed mail explaining and including the waveforms.

What unit is y axis? Is it 90 steps for the sensor? What angle is 90?

Could motor oscillating and need PID tuning?

What software to make the chart. Thankd

The rotor angle is defined as below by the ST code
The sensor is digital hall sensor.
image
image

The diagram i have in the 1st post is divided by 360, please neglect that, now i have updated log file





My main concern is with that gaps i see in between, i really do not how to debug them, does it have any impact on the system or not?
My understanding is that gaps are during every 60degree when hall transition happens. It is trying to adjust the angle.
I logged the data in cube monitor with x axis as time.
Please find the source code i am using in the link.FOC code

Are you using SimpleFOC at all? All I can see in that zip file is a bunch of unreadable autogenerated stm32 HAL code…

Sorry i am not using SimpleFOC, i am using the ST workbench generated code with some modifications as per my hardware.