Torque control of pancakemotor

Thread Starter

MrBear

Joined Dec 3, 2012
19
Hello
I have spent countless hours on my project and i am now out of ideas and energy. I am trying to achieve true torque control (aka current control) which is done (as i understand it) by sampling the amount of current that runs in the system and using that as the Input-parameter of the PID algorithm.

The system consists of the following:
pancakemotor: http://www.pml.com.cn/ver2en/motors/GPM16LR.html
Motorboard: http://www.robotshop.com/eu/en/devantech-md03-50v-20a-h-bridge-driver.html
Ampsensor: http://www.panucatt.com/product_p/cs-50a.htm
Arduino Uno
Pot for setpoint adjustment.

I have a setup similar to this:
http://www.youtube.com/watch?feature=player_embedded&v=_srzYeJi5yo



There is one funny (read terrible) but interesting response of the system. If i apply a steady low output (without PID, just a steady PWM) from the arduino to the motor board the spring will tighten but after a few seconds the motor begins to make a little audible noise. Thats not the problem, but once in a while it is as if the motor looses power for an instant - the duration of the "hole" is very short, only enough to make the motor rotate opposite the pulling direction for a few (15-20) degrees, then the motor re-energizes. My first guess was that it was the motor board is going into over-current protection (a feature it has to not burn out) due to the varying and very low resistance at certain rotor-positions, and the very low inductance (<100uH) of this kind of motor. I have looked at the PWM on a oscilloscope and it does not seem to change accordingly when the motor looses power.
So i have a motor that seems to get a constant PWM voltage but occasionally looses power for (less than) a split second. ????!!!!!!????? Anyone?
I am running PWM @ 32kHz


PLEASE..........ANYONE i am out of things (and forums) to try.

Thank you.
 

SgtWookie

Joined Jul 17, 2007
22,230
Does the (average) current flow through the motor remain constant while there is a sudden loss of torque? If so, that would eliminate just about everything else except the motor itself.

I am not familiar with that particular type of motor
 

Thread Starter

MrBear

Joined Dec 3, 2012
19
The average current drops when there is a loss of torque. I tried an other motor board, rated to 160A continuous (so way overkill for the motor) and it seemed like the effect was less when using a lower PWM frequency. It does not make sense to me. I have also tried to connect a large cap (1000uF) across the motor leads. That did not help either.
 

SgtWookie

Joined Jul 17, 2007
22,230
A large cap across the motor would simply increase the load on your motor driver's MOSFETs, as current flow during turn-on would be excessive.

Do you have long, loopy wiring as shown in the video? If so, that would be a source of problems, as each would have a fair amount of inductance. You should try to keep wiring lengths as short as possible. If you have "ringing" on the wiring due to the inductance, that could be causing your driver's MOSFETs to be switching on and off randomly.
 

Thread Starter

MrBear

Joined Dec 3, 2012
19
Eureka!
The pancake-motors have a very small inductance as i mentioned in my post, so adding a choke (coil in series) helped a lot. Of cause it also gave me some more headache. I actually got a pretty decent PD loop working great........ until i cranked the PWM to the motor board all the way up and saw that most of my power was gone. The voltage drop over each coil (one on either side of the motor) is almost 8V, leaving me with about 8V to supply the motor. I am not sure i understand why.
It would make sense if the voltage drop was largest at 50% duty cycle but this is happening at a steady slope all the way from 0 to max_PWM.

Would love a push in the correct direction.
 

GetDeviceInfo

Joined Jun 7, 2009
2,196
Eureka!
The pancake-motors have a very small inductance as i mentioned in my post, so adding a choke (coil in series) helped a lot. Of cause it also gave me some more headache. I actually got a pretty decent PD loop working great........ until i cranked the PWM to the motor board all the way up and saw that most of my power was gone. The voltage drop over each coil (one on either side of the motor) is almost 8V, leaving me with about 8V to supply the motor. I am not sure i understand why.
It would make sense if the voltage drop was largest at 50% duty cycle but this is happening at a steady slope all the way from 0 to max_PWM.

Would love a push in the correct direction.
Might have something to do with \( X_L=2{\pi}fL\)
 

Thread Starter

MrBear

Joined Dec 3, 2012
19
Okay........ i guess...... the impeadence goes up with the frequency. and higher PWM is equal to higher frequency (what). Sorry for my stupidity here but the frequency is set to a specific value e.g 32k. as i turn up the PWM the frequency will remain at 32k right?

Do you know how to calculate a fitting size of the inductor?
i have a <100uH inductance from the load (motor, http://www.pml.com.cn/ver2en/motors/GPM16LR.html)

1) First off the inductor needs to be able to handle the Amps.
2)Wanting to maintain a small electrical constant i would choose a small inductor, but not too small. If its too small the motor will become jerky with a constant PWM.
3)Help please, how will i know what the minimum value of inductance i can go for?

Thanks again
 

shortbus

Joined Sep 30, 2009
10,045
Just a complete guess here, but, why are you using such a high PWM carrier frequency? It, PWM frequency, is usually in the ~18k to ~20k frequency range, just high enough to be out of the audible spectrum. Maybe try lowering the PWM frequency?
 

Thread Starter

MrBear

Joined Dec 3, 2012
19
Just a complete guess here, but, why are you using such a high PWM carrier frequency? It, PWM frequency, is usually in the ~18k to ~20k frequency range, just high enough to be out of the audible spectrum. Maybe try lowering the PWM frequency?
Thanks for the reply. Well i am using 32K because that is a standard prescalefactor of the Microcontroller i am using. One step down would be about 3900Hz and that is very loud.
 

shortbus

Joined Sep 30, 2009
10,045
At 32kHz PWM, the unknown quality of the "motorboard" (H-bridge) is suspect. If the switching drivers on the H-bridge are not capable of switching that fast, it could be dropping out when trying to go above a certain level.

I'm not a digital/micro type guy, but I always assumed that you could use one to set any frequency output you needed. Why not just set an output that works?
 
Top