Hi Chris, Hi all,
We made a motor controller based on HVKIT. Motorware lab5a used to control the PMSM. It worked without any issue. gMotorVars.Speed_krpm was nearly accurate. Then we made some hardware changes (including Current sensors, Voltage sensors, IGBTs, wires, etc ). Then changed user.h file according to the new sensor ratings. As bellow,
#define USER_IQ_FULL_SCALE_VOLTAGE_V (500.0) // previous motor controller value 450.0
#define USER_ADC_FULL_SCALE_VOLTAGE_V (450.0) // previous motor controller value 409.6
#define USER_IQ_FULL_SCALE_CURRENT_A (75.0) // previous motor controller value 25.0
#define USER_ADC_FULL_SCALE_CURRENT_A (150.00) // previous motor controller value 50.0
Those are the only changes we have made. With new hardware, motor rotates smoothly without any issue. But gMotorVars.Speed_krpm is being giving completely incorrect values. I tried with another F28069M but result did not changed. What could be the problem ?
In both cases,
#define USER_SYSTEM_FREQ_MHz (90.0)
#define USER_PWM_FREQ_kHz (5.0)
#define USER_NUM_PWM_TICKS_PER_ISR_TICK (1)
#define USER_NUM_ISR_TICKS_PER_CTRL_TICK (1)
#define USER_NUM_CTRL_TICKS_PER_CURRENT_TICK (1)
#define USER_NUM_CTRL_TICKS_PER_EST_TICK (1)
Thank you.