Using voltage_d for frictionless motion

Hello!

I want to use a gimbal motor with FOC in two modes.
One of them is an active mode, where I use the library as it is to make movements.
The second one is a passive mode, where the motor is turned by other factors in its environment.
For this the motor should act as frictionless as possible. Like its not even there.
If for example the voltage is set to 0, the motor still generates currents because all coils are grounded.
So a good solution is to use the enable_pin to disable the motor when needed. Then all coils are floating and no current can flow, therefore we don’t experience much resistance when turning the motor.

However there is still the reluctance in the ferromagnetic stator core. You can basically feel the poles because the rotor jumps from one to another. I had an idea to prevent even that.

What if we actively magnetize the core to oppose the permanent magnets?
Or in other words, what if we create an electromagnetic field, that is rotated by 180 degrees compared to the permanent magnets? No torque should be generated, because for this we need 90 degrees like it is describes in https://docs.simplefoc.com/foc_theory
The only effect should be that the rotor spins freely, because in whichever position it is, it behaves just like when you push two opposing magnets against each other. It’s kind of unstable and wants to move sideways. But the rotor can’t escape the following magnetic field, so it moves as if there was no effect from the ferromagnetic parts.

After learning about the Park and Clarke transformation I figured out that I basically need to set voltage_d = -target and voltage_q = 0. So I used ControlType::voltage to do exactly that in the function BLDCMotor::move. And I set FOCModulationType to SinePWM, because that seems to be the only ModulationType that features voltage_d. I haven’t really looked into the other types yet.

Unfortunately the results were not as good as expected. The motor does get unstable like I wanted, but it clearly prefers some motor orientations more than others. And it still generates quite some torque to get there. So it’s basically much worse than just using the disable_pin.

What do you think about this approach? Can somebody explain why it did not work? Or did I just misunderstand something in FOC theory?

Any feedback is appreciated!

Alex

I guess you describe the difference between torque ripple and cogging. You try to eliminate the torque ripple but you are still faced with the remaining cogging. Where ever magnetic fields interact with iron it creates a force against the direction of the movement.

The FOC approach eliminates torque ripple by a sine commutation with fine resolution at the ideal phase shift. This is the core of the clarke and park transformations.

To overcome the cogging you have to design a coreless motor or apply a torque that is the same magnitude but opposite direction to the cogging forces. It is individual to every motor, but possible.

An good example for such an application is the “free wheel mode” of the E-bike motors when batteries become weak. Fells like free spinning, but is driven. This also eliminates the problem that gearheads are hard to be driven reverse.

Hope that helps you a bit

Hey @aldabro,

You have a very interesting question.

Ok so you have identified an interesting issue. Making the field vector in 180 degree direction or in -voltage_q direction for me doesn’t make sense, actually. You will generate 0 torque if dont apply any current in q direction regardless of d direciton voltage. Voltage in d direction is meant to energise the rotor winding and it since the rotor of the bldc motor has permanent magnets it is basically converted into the heat. For AC motor it is a very important component, but BLDC’s just keep it in 0 to reduce heat.

Now it is important to notice that in this conversation we use voltages as base of our foc control, but indeed what we would be talking about are currents. Simplefoc does not implement inherently the current control loop at the moment. But what you would need to do to reduce the resistance of your motor is to control the current in q and d direction and make them both 0. I’ve recently posted a quick video of the simplefoc shield v2.0 which now has current sensing included and closed the velocity loop around it.

In the first few moments of the video you can see that the current limit is 0 (it is the set-point actually) and you can see the behavior of the motor. It is close to being free rotating but still smooth.

For the free wheel mode, I would expect them to use the current sensing to basically produce 0 current or 0 torque on the output as well. Or to estimate the rider intention (torque sensing the driver input) and then to amplify it letting the rider feel he is in control.

Thank you both for your responses and the good examples!

I think I had the wrong approach. As I now understand the cogging torque is a varying torque with respect to orientation and to counteract that we still need some electromagnetic torque (voltage_q) and it needs to vary as well. Because every motor is different, the easiest way for that is to measure the currents and counteract with the applied voltages to make the currents 0.

But now I wonder. If the currents are 0 and therefore no torque is applied, how can the varying cogging torque then be compensated?

Also, this scenario is basically equal to disabling the motor, right? Because the currents are definitely 0 when disabled.
I assume the voltages that we generate with our current control are the same as those that are generated when the windings are free floating? But that can’t be true, because the induced voltages only appear with a nonzero velocity. Then again I don’t actually know how they look like with current control… But there must be something, even in a static position, because otherwise the cogging will take over. Somehow this topic is still not completely clear to me. I definitely need to try the current control out when the library is ready!

Thank you again for your time and effort!

You understood the theory properly and the issue you are facing can be removed by controlling the armature winding of the motor. If you are looking out for motors then you can have a visit at reliance electric motor.
Thanks.