Hey guys.
I am using VESC4 to current control a relatively big motor with 23 pair poles and the kv of about 9 rpm/volt. I am using Hall sensors and FOC mode. I need the operation at very low speed even in static and also at max speed. I am using 36 volt battery. I used two different configuration as below. I have some problems in both. I would be grateful if you give me some hints.
- Completely with sensor (In all possible speed range): I set the sensorless erpm high enough that the motor never reaches that therefore it is controlling always with sensors. In this case motor makes a lot of noise at high speed. And the noise is higher when the speed is higher. An also it generates vibration in all parts of system.
- Hybrid mode: If I set the sensorless erpm in something reachable, the motor has no noise but at moment it passes the sensorless erpm, it makes a jerk which is totally undesirable in the system.
How can I solve the problem?? Do you think the VESC6 would not have this problem?
Have you tried full sensorless to be sure the noise don't come from vibrations at high speed?!
I have tried several motors and some very light outrunners are vibrating.
Bearings can also produce noise.
Have a Nice Day.
Thierry
The noise is definitely coming from vibrations in high speed which are generated by vesc when using sensors. And I want to know why. Without using sensor, I said that there is no noise and vibration.
(edit)
The noise is coming from interpolation limit in my opinion. As long as I remember from practice it should be around 13k EERPM.
Interpolation limit is written in code and can't be changed from VESC Tool. It can be found in mcpwm_foc.c file.
If you want to increase EERPM of hall sensors just change the line :
to:
And your max supported hall speed should be around 26k EERPM. Just bare in mind that hall detection should be done really precisely (use higher current when detecting hall).
@e-biker: If you want to use hall sensors at a higher RPM, there is a setting for that in VESC Tool. (It changes the m_conf->foc_sl_erpm setting used further up in the function you quoted, to set using_hall true or false.)
If I understand this code correctly, the
line compares the actual, read hall position to the interpolated one. If they are less than 1/12 of an electrical revolution apart, the interpolated estimate is adjusted according to the current speed. Otherwise, the estimate is considered faulty and backed off(?) a bit - I think.
There are three hall sensors, and they go through two values each per electrical revolution, for 6 hall states/rev. The estimated value should never pass outside the "zone" of the current hall state - if it does, then we know the estimate is wrong. The "zone" stretches "half a zone" in width on each side of the hall position, i.e. ±1/12 of a turn.
So changing this to 1/6 of a turn like you are suggesting should allow the estimate to fall far outside of the correct zone. Not sure why you'd want to do that?
@arvidb: You are absolutely right, but I had no choice.
I have made my own high power VESC based on HW 4.12 and found that in FOC it can't run properly on high currents (400A). So I changed interpolation limit that I can run it only on hall even that it is not accurate as senseless observer.
And it runs pretty smoothly, with my hubzila i can hit 16k EEPRM @ 87V with no problem (with no load you can hear some desync, but riding in real life I haven't noticed anything - maybe some efficiency loss). Increasing switching frequency to 30kHz due to better timing helped a bit.
Thanks for explanation.
Martin.
@yosoufe: Did you try different sensorless erpm settings in hybrid mode? Especially very low ones? With such a low Kv your motor should generate lots of voltage at low rpm which I guess should make the observer able to track OK even at low (e)rpms. Maybe you can find a setting where the hall sensors and observer "agrees" about the position of the rotor, for minimal jerk at the switch-over?
I will try and see what I will get. Do you know how much bemf is required at minimum to do position estimation??
I remember I had another problem as well when I was using sensorless. During the braking I had jerk. But that was for long time ago with another motor and has been never tested again.
I tested few times more. I have still the jerk. I couldn't find a speed limit that doesn't create the jerk.
And the motor doesn't reach more than 10000 erpm so I guess I don't need the code modification as e-biker suggested. Am I understanding correct?