I am using Open Loop velocity mode right now for my application (turntable) because I just need a set speed and there is very little load, just rotational inertia from the platter. Open Loop is working well for me right now and I will explore closed loop later (bogged down by the tuning since it is only a 4 pole motor. I also have a 22 pole gimbal motor that I am playing with as well).
I have supplied the BLDC motor with pole pairs, phase resistance, KV, and phase resistance.
// BLDC motor instance BLDCMotor(polepairs, (R), (KV), (HH))
BLDCMotor motor = BLDCMotor(2, 3.0f, 200, 0.00635f);
I note from the documentation that " We suggest you to provide the motor class with the phase_resistance
value and set the motor.current_limit
instead the voltage limit" from Velocity Open-Loop | Arduino-FOC). I believe I am thus running in Current Limiting with back-EMF Compensation mode.
It works very well. However, the motor still gets a bit hot over time, which eventually causes my rubber belt to slip more. If I put the Voltage Limit in the code along with the Current Limit, does SimpleFOC use the Voltage Limit but still properly limit Current? If I limit my voltage down from 12V supply down to 4V, I understand that I give up torque, but is it still running in Current mode?
Or am I thinking about this wrong. Reducing voltage limit will just increase current, and cause more heating? Do I instead fudge the Resistance, KV, Inductance ratings to better control the current and reduce heating?
Also, does Inline Current Sensing do anything in Open Loop Mode, or is that only valuable in FOC mode?
Thanks!
The electrical angle in open-loop is set to an estimate of where exactly the rotor is. In open-loop, you can’t know where it is because you have no sensor, and the misalignment of the electrical axis with respect to the mechanical orientation causes these sorts of inefficiencies (higher power draw, runs hotter, etc). The best thing to do to solve your problem here would be to try using a sensor, although tuning with 4 pole pairs does sound hard.
I think the way the voltage_limit
works is that it will restrain the PWM duty cycle from reaching a certain voltage. You can think about it as a ratio of the supply voltage to the voltage limit. The impact of that is lower current → less heating, and also less torque.
The current sense only works in closed loop, there is a bit of discussion about that going on in the discord currently.
Thanks. i have Hall Sensors in the motor, but I suspect that that is not fine enough info to make closed loop work well on this motor. It only has a single shaft, so adding a sensor is tough.
I have another double shaft motor now that I will try with an encoder to get working in closed loop. And I will try to get my 22 pole gimbal working as well.
Yes, the voltage-based current limiting is applied properly in open loop mode. You can leave the voltage limit set to power supply voltage or whatever, and just reduce current limit until it doesn’t get too hot. You can use a higher current limit momentarily for startup and then set it to the steady running value. Gradually ramping up the speed reduces the necessary starting current. You could use the hall sensors to detect stall and repeat the startup procedure, to make it tolerant to momentary obstructions. If it’s still too weak to run, then change to a bigger motor.
Open loop is probably best for this application since you need smoothest possible motion and steady speed. But you will need a motor with naturally low cogging behavior to get really smooth motion with open loop.
Also, as I mentioned in o_lampe’s thread New user with tons of questions (BLDC filament extruder) - #3 by dekutree64, SimpleFOC has trouble with perpetually increasing angles due to floating point precision. Read the following few posts for more detail.
1 Like
I had unique requirements for low noise, and so what I did was a wacky thing which was a ton of work to make and ultimatly a waste of time because it was too expensive, but I used a magnetic sensor, I had a piece of code that used open loop but ramped the voltage with the rpm and I could set a small extra boost voltage beyond that. Actually it got complicated and the voltage was a polynomial of the rpm etc. Then I used a pid loop to monitor the motor timing (angle between electrical and rotor basically, or rather magnetic and rotor which are pretty close but not quite the same due to inductance etc.) and then adjusted the voltage. Thus, if the motor timing became too large due to increased load, the voltage was increased, however the rpm remained exactly as programmed and was extremely predictable. But this increased energy effiiency/reduced overheating and also provided a hedge against stall. However it is not stall proof, which FOC in the usualy mode that SimpleFOC implements it, is. if the motor gets overloaded enough to miss a step, like a stepper motor, the system cannot recover except by shutting down and trying to start up from zero rpm again. With the standard mode that doesn’t happen.
1 Like
How about using closed loop until target speed is reached, and then switch to open loop with your timing PID? That would eliminate most of the complicated stuff while still solving the primary problem of smooth steady state motion. And would be stall-proof since it would switch back to closed loop when disturbed.
It’s very similar to what I wanted to do with my SmoothingSensor to give precise zero-speed positioning with hall sensors. Drive the electrical angle open loop style, but use the sensors to correct if the rotor fails to follow. The main problem I had when I tried it is a little jolt when switching back to closed loop mode, which resulted in vibration when slowing the rotor with my hand (rapid switching between open and closed loop). But I’m pretty sure it can be smoothed out with a little more effort, and it wouldn’t be a problem for these steady-state systems anyway.
1 Like
That would probably work good yeah. Except noise during acceleration is still a serious issue for me so it would still take some doing. When I revisit the problem with the lepton 3.0 I may do that, however the labor and parts associated with the sensor are considerable actually, it cost about $70 more after everything, per fan. It’s a lot. I think sensorless is the only practical way. For the near term I will be using what I dub tuned open loop, I have a fairly complicated function to ramp the voltage up with the rpm so that there is a constant buffer against stall. In a fan it works reasonably well, probably wouldn’t work very well anywhere else.
1 Like