Hello,
I am using PMSM direct drive. I have some problems previously with driving the motor. after adjusting the motor parameters and the PI values, there is improvements. but the motor is not running perfectly. the problem there is a lot of noise once the the PWM signal is applied. I am using lab4 torque mode. the graph below shows 0 to 5v torque value and till 40amps motor peaks. the really strange thing for me is the negative currents that feels as a hick up when riding the bike and the high noise when the motor PWM is applied.