cancel
Showing results for 
Search instead for 
Did you mean: 

Issue with Rotor Angle Waveform in FOC using Luenberger State Observer on STM32

snehadakhare01
Associate III


Hello everyone,

I am working on a BLDC motor and have implemented Field-Oriented Control (FOC) on an STM32f103c86  microcontroller. For rotor angle estimation, I am using a Luenberger State Observer and calculating the rotor angle using a Lookup Table (LUT).

Issue:

  • I am not getting the expected rotor angle waveform.
  • The estimated angle does not match the expected smooth transition.
  • The waveform appears distorted or has unexpected behavior.

Details of My Implementation:

  • MCU: STM32F103 (or mention your exact MCU)
  • FOC Control Method: Using SVPWM
  • Angle Calculation: Using LUT
  • Observer Type: Luenberger State Observer

Troubleshooting Steps I Tried:

  • Verified that the LUT is correctly implemented and outputs expected values.
  • Checked the observer gains and adjusted them, but the waveform still seems off.
  • Ensured proper scaling and filtering of estimated values.

Has anyone faced a similar issue? Any suggestions on what could be causing the incorrect rotor angle waveform?

Thanks in advance!

Waveform must be same as MotorRun.phase is excepted 

snehadakhare01_0-1742465620474.png

 



int32_t alpha = 0;
int32_t Beta = 0;
int32_t z =0;
int32_t y  =0;
int32_t m = 0;
//Calculate Rotor Angle
void CalculateRotorAngle(int32_t ealpha, int32_t ebeta){
	alpha =powf(ealpha,2);
	Beta = powf(ebeta,2);
	z = alpha + Beta;
	y = sqrt(z);
	m = alpha/y;
	Measured.foc.rototAngle = (cos_lut[(unsigned char) (m)]) ;

}


 

0 REPLIES 0