cancel
Showing results for 
Search instead for 
Did you mean: 

Not enough torque when using MC PMSM FOC Lib 4.2

erenes
Associate II
Posted on May 12, 2016 at 13:53

Hello,

I am trying to control In-wheel motor for electric scooter. 

Here is what I have done so far....

1. In-Wheel motor : 300W ,   Hall sensor  (Surface Mounted PMSM)

2. 3 Shunt phase current sensing

3. MC workbench PMSM FOC Lib v4.2

4. STM32F407VE,  8Mhz external

5. With these, I setup things in workbench. And programmed into the MCU.

6. Didn't do Motor Profile. 

7. In-wheel motor run finally without load.

But the problem is..   without load, it can run.

But with load, like when put this wheel on the ground, it just stop.

so when I try to stall it by my hand, current goes up a little bit and 

I can feel a bit more torque. But it just stop right away. 

The current that I measured using Multimeter is about 0.15 A.

When I try to stall it..  it is about 0.22A 

What did I miss here?  

For Rs, Ls,  I used default.  for speed control, I use hall sensor.

Speed control period is 50ms. 

I am stuck in this situation.  Please give me some idea.

Thank you.
8 REPLIES 8
Gigi
Senior
Posted on May 12, 2016 at 14:05

Ciao

I suppose that you didn't receive any fault indication so even if the motor is stopped the FW is always generating current.

The FW provide at maximum the current that you select in the motor nominal current. Review this parameter and also the parameter related to then current sensing according to the HW that you are using.

I read in this moment that you are using the default values of Rs and Ls but how you can be sure that these are the correct value of your motor?

Ciao

Gigi

erenes
Associate II
Posted on May 12, 2016 at 15:18

Hello  Gigi,

Thank you for your reply. 

First, yes your point is right.  Rs, Ls is not correct, I think.

1. I use hall sensor, then still FW use Rs, Ls for estimating some values?

   and because of this, my problem can happen?

2. I tried to do Motor Profile.  When I started, motor didn't run, but some big sound..

  when I pushed motor a bit, motor tried to turn, but it stopped again.

  and some big sound. the sounds getting louder. but motor didnt run.

  worried it might blow up. so I just turned off. :( 

  This is normal in Motor Profile ? 

  This elelctrical like sound may not give motor damage? 

  

3. When motor run, I try to stall it. then it stopped and the error is ''speed feedback...''

4. So now what I have to do is... 

   first measure Rs, Ls ?   --> then I can calculate id, iq PI gain 

   and then?                      ( I tried to change speed PI gain )

 

Gigi, waiting for your help again. 

Thank you~

Gigi
Senior
Posted on May 12, 2016 at 15:55

Ciao Lino

Unfortunately you have to go step by step. First you have to be sure that the current is correctly regulated and to do this you have to set properly the Rs and Ls in the motor parameter.

Don't be afraid measure in is very easy, don't forget that the FW requires to have phase to neutral value so if you measure it phase to phase you have to divide by 2.

Then is necessary to set properly the nominal voltage both in the motor and in the power stage (you can find easily where to select it) then the current regulator shall works.

You didn't mention which is the power stage that you are using.

Then another option to verify that the current regulator are working good you can cheat a little bit the FW setting a sensorless control and set a very long startup ramp with a fixed value of current, and so you can see if in this condition the FW can regulate the currents.

Ciao

Gigi

erenes
Associate II
Posted on May 12, 2016 at 16:14

Hello Gigi,

This is my setting in Workbench. (attached file)

I've measured Rs using Multimeter. Between Phase A and Phase B.

But it is.. very small value. like 0. and it will have error.

so not sure can trust this multimeter.

so I tried to use Motor Profiler.

What do you mean, regulating current? regulating Id, Iq current?

I checked DAC A4, A5. oscillocope showed Id is like a line with lot of noise.

seems like regulated. not like wave.

Now I am like missing your answer. 🙂

Thanks.

________________

Attachments :

setting.ppt : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006HzCO&d=%2Fa%2F0X0000000bJY%2Fbqt63rI519wpezzWXYeW1VsnrdlNZG9WQu3zc49rUy4&asPdf=false
Gigi
Senior
Posted on May 12, 2016 at 16:23

Ciao Lino

Taking a look at the regulation of Iq or Id is a good think but is not the think that we are interested in it now. No, I'm referring to the motor phase current using a current probe.

If in the startup you program a long ramp with fixed current, let's say 1A, you will have a motor phase current that shall be a sinusoid current (with slow acceleration) and with amplitude that reach 1A.

If not, something is wrong in the setting.

It is true, or you are not indicated again which is the power stage that you are using?

Moreover the presence of the noise in the measured Iq, is not a good news. Noise in the measured current can hide wrong setting or bad power stage layout.

Ciao

Gigi

erenes
Associate II
Posted on May 12, 2016 at 18:05

Hello Gigi,

I attached my power stage schematic image. Please check this out for me.

You said. Motor phase current should be sinusoidal and amplitude is about 1A.

unfortunately don't have current probe. :(

You said.. ''long ramp with fixed current'' How can I set this in the MC workbench or FOC lib 4.2 ?

I am using Hall sensor. In this case also need ramp up?

Wrong setting. What kinda setting might be wrong?

________________

Attachments :

Powerstage.zip : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006HzIp&d=%2Fa%2F0X0000000bJW%2FF3.ZcStNKoTYqkSy5IQ3SkS50m28uk.dWm72hummk60&asPdf=false
Gigi
Senior
Posted on May 16, 2016 at 13:00

Ciao, I reviewed last Friday your schematics and seems ok.

If I'm not wrong the setting for the FW shall be

5.238 for the overall gain in current sensing setting.

It is the same that you set in the WB file?

With this setting you shall be achieve 3A of peak current in the motor phases (of course the current that you drain from the DC bus is much lower).

Ciao

Gigi

Laurent Ca...
Lead II

The question has been moved from the "Motor Control Hardware" section to the "STM32 Motor Control" section (the question is about the STM32 MC SDK). 

Best regards