cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with AN2154 source code (SVPWM)

karmacoma_21
Associate II
Posted on July 07, 2008 at 10:41

Problem with AN2154 source code (SVPWM)

5 REPLIES 5
karmacoma_21
Associate II
Posted on May 17, 2011 at 10:15

Hello,

I downloaded the AN2154 source code (related to Space Vector PWM) kindly provided by a moderator in another thread but couldn't manage to make it work on my ST7MC Softec Starter Kit.

When I program the chip and run it, the motor oscillates around its initial position.

I updated some parameters related to the stator/rotor (number of poles pairs, etc.) but it didn't change anything.

Sinus and 6-step PWM work fine for me but not this one...

Thanks for your help!

karmacoma_21
Associate II
Posted on May 17, 2011 at 10:15

OK, After some tuning I managed to make the BLDC motor work with SVPWM... well ... not completely : it makes a lot of noise and it is not as fast as I wished (20% slower than 6-step, for the same current input)

First, I have to go full throttle for the motor to start, because when I set a lower magnitude nothing happens. Then, when the motor is running and I spy the motor current and MC0,...,MC5 outputs of the µC, it looks like half the PWM's are missing.

Is it possible that some registers be badly configured, so that PWM's generation is masked?

Yet, I have only changed PWM computation (MTC_U_CL_IT function) in the Sinus PWM source code, so I don't understand what has to be changed...

Thanks for your help

karmacoma_21
Associate II
Posted on May 17, 2011 at 10:15

PS : I forgot to mention that I used the Sinus PWM source code, only swapping the MTC_U_CL_IT routine with the Space Vector's (since SVPWM source code was designed for asynchronous motors)

karmacoma_21
Associate II
Posted on May 17, 2011 at 10:15

I finally managed to make the SVPWM work on the motor that comes by default with the Starter Kit. The problem came from the fact that the Phase is [0,65536] range in the Sinus PWM code and [0,49152] in the SVPWM, so you have to multiply the Sinus phase by 3/4 in the interruption routine to make it compatible with the Space Vector computation.

Now, my new problem is that it just doesn't work with the real motor that I want to test. I have very few specifications for this motor. It uses a lot of current but it won't go very fast. 6-Step PWM works fine. Sinus PWM doesnt work, like SVPWM. When I look at the current waveform, it looks like during one PWM period, current does strange things like ''going in the wrong direction'' during a fraction of the period. Could it be due to the fact that the motor windings would be in triangle, and not in star? I cannot otherwise find an explanation for that strange current waveform.

For your information, the motor I am testing is smaller than the default ametek one. It can go faster (up to 60krpm) and the low inductance doesnt filter PWM properly (the PWM is clearly visible on the phase currents). Can it be a reason for my problem?

karmacoma_21
Associate II
Posted on May 17, 2011 at 10:15

Feel lonely here...

Since I had so little support from ST forum, I am gonna check other manufacturers that are more helpful :-Y :-Y :-Y