Other Parts Discussed in Thread: MOTORWARE
HI,
I've spent all day trying to run down this problem without any success. And I've spent quite a while looking though this forum and couldn't find any similar problems.
If I use the GUI (with Lab10a) and uncheck User.h and check RsRecalc the program goes through the Rs and Ls calculations just fine and when it finishes I can run the motor up to 12800 RPM. The motor runs smoothly with no issues. Now if I uncheck RsRecalc and check User.h, re-enable the system and click Run the motor will only go to 3500 revs before it starts to oscillate badly.
Is there some secret sauce in the GUI if the User.h file isn't used?
Here is the screen grab of the no User.h run:
Here's the GUI with the USER.H checked:
I sure hope it's something obvious that I've left out or miscalculated.
Here is my USER.H variables:
#define USER_IQ_FULL_SCALE_FREQ_Hz (1200.0)
#define USER_IQ_FULL_SCALE_VOLTAGE_V (15.0)
#define USER_SYSTEM_FREQ_MHz (60.0)
#define USER_PWM_FREQ_kHz (45.0)
#define USER_NUM_PWM_TICKS_PER_ISR_TICK (3)
#define USER_NUM_ISR_TICKS_PER_CTRL_TICK (1)
#define USER_NUM_CTRL_TICKS_PER_CURRENT_TICK (1)
#define USER_MOTOR_NUM_POLE_PAIRS (7)
#define USER_MOTOR_Rr (NULL)
#define USER_MOTOR_Rs (0.0992)
#define USER_MOTOR_Ls_d (0.000007325)
#define USER_MOTOR_Ls_q (0.000007325)
#define USER_MOTOR_RATED_FLUX (0.0065481369)
#define USER_MOTOR_MAGNETIZING_CURRENT (NULL)
#define USER_MOTOR_RES_EST_CURRENT (6.0)
#define USER_MOTOR_IND_EST_CURRENT (-3.0)
#define USER_MOTOR_MAX_CURRENT (20.0)
#define USER_MOTOR_FLUX_EST_FREQ_Hz (180.0)
I hope this makes sense.
Thanks,
Richard