Just posted the toggle file for version 2.A0 . The changes:
- in the PWM menu, when you want to use the online L & R measurement, best to play with the pwm frequency until the autocompleted loop sample frequency is (just) below 25 kHz.
- even when you want to use the online R & L, you must run a FOC measurement (for the starting values for the online R and L). New is also that you can manually enter L and R values.
- the hall sensor menu has some new options:
Code: Select all
g) hall offset, forward: 0.00 deg
h) hall offset, reverse: 0.00 deg
0) reset hall statistics
#) display hall statistics
with g and h you can set the hall offset for forward and reverse... but what values to use ? The new transition method used actually knows the phase difference (between hall and sensorless) at the
moment of transition. It can runs statistics on these observed phase differences. Wit option 0) the statistical data gathering is reset. This needs to be (manually) done the first time the hall menu is used, and after every change of the hall offset (g and h). After the chip has seen a number of transitions option # can be used to display the statistics:
Code: Select all
average: 4.07 deg
std-dev: 2.32 deg
average: -5.80 deg
std-dev: 2.62 deg
what it shows here is that it saw 19 transitions while in forward mode. The average error was 4.07 degrees, with a standard deviation of 2.32 degrees (ain't floating point nice
). To bring the average down to 0 it's value must be added to the corresponding offset value. After this the statistics needs to be reset as it will now start seeing a new set of different errors (as the offset was changed).
The standard deviation is a measure for how reliable the offset is. Large standard deviations can occur at high transition erpm under various levels of accelleration, in combination with (analog) delay in the hall sensors or at the input of the controller IC. If the values are large, try to lower the transition erpm and/or reduce the RC combination at the hall input pins.
new in this version is a first attempt at measuring the motor R and L while the motor is in normal use. The setup menu options are:
Code: Select all
a) use online Kv, L and R measurement: yes
make sure f_sample is below 25kHz !
c) #data points for online impedance measurement: 16384
d) reset data collection
e) current data collection, R: 9.9 A
f) current data collection, L: 2.4 A
g) speed data collection: 5.98 k-erpm
h) inject extra current : yes
Options a) turns this new feature on or off, option b autocompletes the menu.
The measurement works by taking lots of measurement points and running statistics (it uses a minimum least square curve fitting method). Measurement points take a long time to process , at full speed it can take around 500 to 1000 point a second. A measurement point is only taken when:
- torque current is larger than option e)
- the 90-degree shifted torque current is larger than option f)
- motor speed is larger than option g)
- it must be in drive 3, but not in fieldweakening
- the data point cannot be too similar to already taken data points (meaning: at constand speed, torque etc it will maybe take 50 points and then wait for speed, torque etc to change)
Since the 90-degree shifted torque current is typically lower than option f) (except when changing throttle position, but even then it is not likely to exceed f), an extra bit of current to help with the measurement can be injected. This is turned on or off with option h). The RMS value for the injected current is as specified under f. The injection of the current should not be noticable. Power use should be negligible.
The amount of data points used for the R&L calculation is specified under c). Lower values make the R&L track faster but introduces more noise and make the values less reliable. The very first time it will take about 2000 point to initialise. After that the L&R as reported in the FOC menu and chip status menu will start changing, reflecting the measured values. Best is to run the motor under varying conditions for a few minutes until the R and L start changing, then press setup for the online save. This saves all the collected data point statistics, meaning next time you power up from cold it will not need to go through the 2000 initialisation points but it will start from the situation when the online save was done.
The status menu now includes the L and R values for debug purposes.
In the save menu, the 'online parameter save; option is no longer turned off automatically. This makes it easier to do hall statistics (which can only be viewed after they have been online-saved by pressing setup in motor mode)