Issue with Rotor Angle Waveform in FOC using Luenberger State Observer on STM32
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2025-03-20 3:14 AM
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
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)]) ;
}
Labels:
- Labels:
-
FOC
-
STM32 Motor Control
0 REPLIES 0
