Dr_T said:
Playing around with the VESC settings a bit, trying to understand what is what. Got rid of the little stutter, that was noticeable when crawling up the little slope in the test video I posted earlier, by increasing start-up boost from .01 to .03. Also changed the timing advance to map from 0-12 deg ("phase advance at BR ERPM" set to 0.6) between 0-30k RPM (60k ERPM), which is about the full RPM range the motor should be able to reach. For reference, here's the settings I now use with the APS 4092-1380 kv inrunner:
I think you understand the timing advance very well
Dr_T said:
Also got two more questions:
- Is there a reason the default max duty cycle is .95? Would it harm to put it at 1, so it is really full throttle?
The reason is that the current sampling only can be done when the FETs are off since the shunts are on the low side and there only are two of them. With some tricks this could be increased a bit (97-98% maybe).
Dr_T said:
[*]Is the soft RPM limit (current mode) working in the App Config / PPM tab? Should this be called ERPM, like all the other RPM related settings? What would be a good setting to keep the VESC in its happy ERPM range?
Correct, they should be called ERPM, I will change that. You can keep them as they are unless you have a reason for using a soft speed limit. The reason I added them is in case I, for example, let someone else try my RC car/longboard/ebike and want to limit the maximum speed for safety.
All weekend and yesterday after work I have spent a lot of time on making the current sampling better, which is difficult. At some duty cycles the samples are affected by noise and aliasing that causes offsets, so getting the correct current is difficult. What I have right now that works best is a VESC where I changed two capacitors to filter the current more heavily. This reduces the offsets and noise, which most likely cause the faults you are seeing, but it slows down the slew rate so that the current samples on the positive phase become too low when the duty cycle increases. To deal with that I use the current from the negative side where possible (4 out of 6 commutations since there are two shunts only) and use slew rate compensation based on the sample time for the remaining two commutations. I also used some tricks on the sample time to reduce the problem with the default shunts. In a few days I should have a firmware that works better for your motor using the VESC as it is and possibly another firmware that works even better if you replace two capacitors. This has taken more time than I expected, but the improvements should benefit all applications for the VESC.
For the future, there are some hardware changes that I could make on the VESC to get good current samples and be able to run at 100% duty cycle:
* Use three low side shunts. Then I need another amplifier for the third shunt since the DRV only has two.
- Advantages: better current samples, 100% duty, still FOC compatible
- Disadvantages: Added cost, more space required
* Use two high-side shunts. This needs two extra amplifiers that have very good CMRR, which could be expensive (maybe 5 to 10€ extra on the whole VESC)
- Advantages: better current samples, 100% duty, still FOC compatible
- Disadvantages: Added cost, more space required
* Use two hall sensor based current measurement ICs on the high side.
- Advantages: Very good current samples, 100% duty, still FOC compatible
- Disadvantages: These things are quite expensive (10 to 15€ extra) and HUGE. Much more PCB space will be required.
* Use only one shunt on the minus input.
- Advantages: 100% duty, possibly better current samples, less space required, less cost because only one shunt is used
- Disadvantages: Removes the possibility to use sensorless FOC (sine wave control) in the future.
In general, I think the current hardware is a good compromise between features, space and cost. The difference with the above changes won't be huge and most users will not even notice that the current measurement is better. Having the last 5% extra duty cycle can sometimes be nice though. However, I think I can increase the duty cycle a few % with the current hardware if everything goes well.