HighHopes
10 kW
- Joined
- Mar 28, 2013
- Messages
- 930
the IRFB4110 has a "gate-to-drain "miller" charge" of 43nC.
that is units of columbs but equation i=C*dv/dt .. the "C" is in units of farads. so check into that.
the IRFB4110 has a "gate-to-drain "miller" charge" of 43nC.
I don't see any other value regarding gate-to-drain capacitance or charge. So you lost me.HighHopes said:the IRFB4110 has a "gate-to-drain "miller" charge" of 43nC.
that is units of columbs but equation i=C*dv/dt .. the "C" is in units of farads. so check into that.
Futterama said:I don't see any other value regarding gate-to-drain capacitance or charge. So you lost me.HighHopes said:the IRFB4110 has a "gate-to-drain "miller" charge" of 43nC.
that is units of columbs but equation i=C*dv/dt .. the "C" is in units of farads. so check into that.
########################################
# (c)opyright 2013, B.M. Putter #
# Adliswil, Switzerland #
# bmp72@hotmail.com #
# #
# version 1.21 #
# experimental, use at your own risk #
########################################
a] calibrate hall sensors
b] determine coil positions
c) PWM parameters
d) current settings
e) control loop parameters
f) throttle setup
g) running modes
h) CAN bus setup
i) Field Oriented Control
z) store parameters in EEPROM for motor use
------> a
a] number of e-rotations: 92
b] calibrate hall positions
c] table out hall signals
z] return to main menu
------> b
a] number of back-emf samples: 1400
b] calibrate coil positions
c] use only fundamental sine waves
d] reconstruct waveforms based on extracted parameters
e] table out data arrays
z] return to main menu
------> c
a) PWM frequency: 15kHz
b) deadtime: 533ns
c) dutycycle testsignal: 50%
d) toggle high side polarity, now active HIGH
e) toggle low side polarity, now active HIGH
f) test PWM signals
z) return to main menu
------> d
a) number of current sensors: 3
b) current sensor transimpedance: 10.00 mV/A
c) maximum motor phase current: 149.9 A
d) maximum battery current, motor use: 89.9 A
e) maximum battery current, regen: 0.0 A
f) maximum shutdown error current, fixed: 59.9 A
g) maximum shutdown error current, proportional: 59.9 A
h) IIR filter coefficient, throttle current: 3
i) IIR filter coefficient, error current: 5
j) use additional comb filter: NO
k) use offset calibration: NO
l) restore default calibration
z) return to main menu
------> e
a) loop sample frequency: 28.51 kHz
b) proportional phase loop coefficient: 820
c) 1st order phase loop integrator coefficient: 41.0000
d) 2nd order phase loop integrator coefficient: 1.0000
e) proportionale amplitude loop coefficient: 52
f) 1st order amplitude loop integrator coefficient: 2.5000
g) maximum amplitude: 111 %
z) return to main menu
------> f
a) calibrate throttle 1
b) calibrate throttle 2
c) polynomial coefficients throttle 1 (x, x^2, x^3): 0.0998, 0.3798, 0.5197
d) polynomial coefficients throttle 2 (x, x^2, x^3): -0.0002, -0.0002, -0.0002
e) use analog throttle 1: YES
f) use analog throttle 2: NO
receive throttle over CAN: NO
g) TX throttle over CAN: NO
h) test throttle
z) return to main menu
------> g
a) sensored or sensorless: SENSORED
b} sensorless startup: PUSH START
c} e-rpm limit sensorless self start: 1462 erpm
d} minimum current push start: 3.9 A
e} push start current, error allowed: 11 %
f] erpm sensored to sensorless transition: 5201
g] transition time sensored to sensorless: 299 milli-sec
h) return to motor start below 200 erpm
i) controlled slowdown for direction change: NO
j) phase current for controlled slowdown: 0.0 A
k) motor maximum, forward: 89.98 k-erpm
l) motor maximum, reverse: 3.99 k-erpm
m) motor standstill voltage threshold: 0.74 V
n) enable low side pulsing in drive 0: NO
o) low side pulsing rate: 52 Hz
p) low side pulsing width: 20 usec
z) return to main menu
------> h
a) CAN 'address': 1
b) CAN CFG1 as per Microchip 30F manual: 0
c) CAN CFG2 as per Microchip 30F manual: 0
RS232 output rate: 3564 Hz
z) return to main menu
------> i
a) use Field Oriented Control: NO
z) return to main menu
If I continue past that vs backing off I get a quick thunk from the motor and the controller faults to drive 0 and sometimes one of my gate drivers registers a fault,
HighHopes said:If I continue past that vs backing off I get a quick thunk from the motor and the controller faults to drive 0 and sometimes one of my gate drivers registers a fault,
extra $20 in fault protection just paid for itself, 10x over.
exciting taking the bike out for that first ride though eh?![]()
------>
########################################
# (c)opyright 2013, B.M. Putter #
# Adliswil, Switzerland #
# bmp72@hotmail.com #
# #
# version 1.21 #
# experimental, use at your own risk #
########################################
a] calibrate hall sensors
b] determine coil positions
c) PWM parameters
d) current settings
e) control loop parameters
f) throttle setup
g) running modes
h) CAN bus setup
i) Field Oriented Control
z) store parameters in EEPROM for motor use
------> a
a] number of e-rotations: 92
b] calibrate hall positions
c] table out hall signals
z] return to main menu
------> b
a] number of back-emf samples: 1400
b] calibrate coil positions
c] use only fundamental sine waves
d] reconstruct waveforms based on extracted parameters
e] table out data arrays
z] return to main menu
------> c
a) PWM frequency: 15kHz
b) deadtime: 533ns
c) dutycycle testsignal: 50%
d) toggle high side polarity, now active HIGH
e) toggle low side polarity, now active HIGH
f) test PWM signals
z) return to main menu
------> d
a) number of current sensors: 3
b) current sensor transimpedance: 10.00 mV/A
c) maximum motor phase current: 199.9 A
d) maximum battery current, motor use: 99.9 A
e) maximum battery current, regen: 0.0 A
f) maximum shutdown error current, fixed: 24.9 A
g) maximum shutdown error current, proportional: 24.9 A
h) IIR filter coefficient, throttle current: 3
i) IIR filter coefficient, error current: 5
j) use additional comb filter: NO
k) use offset calibration: NO
l) restore default calibration
z) return to main menu
------> e
a) loop sample frequency: 28.51 kHz
b) proportional phase loop coefficient: 350
c) 1st order phase loop integrator coefficient: 24.0000
d) 2nd order phase loop integrator coefficient: 0.0599
e) proportionale amplitude loop coefficient: 52
f) 1st order amplitude loop integrator coefficient: 2.5000
g) maximum amplitude: 111 %
z) return to main menu
------> e
a) loop sample frequency: 28.51 kHz
b) proportional phase loop coefficient: 350
c) 1st order phase loop integrator coefficient: 24.0000
d) 2nd order phase loop integrator coefficient: 0.0599
e) proportionale amplitude loop coefficient: 52
f) 1st order amplitude loop integrator coefficient: 2.5000
g) maximum amplitude: 111 %
z) return to main menu
------> f
a) calibrate throttle 1
b) calibrate throttle 2
c) polynomial coefficients throttle 1 (x, x^2, x^3): 0.0998, 0.3798, 0.5197
d) polynomial coefficients throttle 2 (x, x^2, x^3): -0.0002, -0.0002, -0.0002
e) use analog throttle 1: YES
f) use analog throttle 2: NO
receive throttle over CAN: NO
g) TX throttle over CAN: NO
h) test throttle
z) return to main menu
------> g
a) sensored or sensorless: SENSORED
b} sensorless startup: PUSH START
c} e-rpm limit sensorless self start: 2375 erpm
d} minimum current push start: 0.9 A
e} push start current, error allowed: 65 %
f] erpm sensored to sensorless transition: 1000
g] transition time sensored to sensorless: 249 milli-sec
h) return to motor start below 200 erpm
i) controlled slowdown for direction change: NO
j) phase current for controlled slowdown: 0.0 A
k) motor maximum, forward: 89.98 k-erpm
l) motor maximum, reverse: 3.99 k-erpm
m) motor standstill voltage threshold: 0.74 V
n) enable low side pulsing in drive 0: NO
o) low side pulsing rate: 52 Hz
p) low side pulsing width: 20 usec
z) return to main menu
------> h
a) CAN 'address': 1
b) CAN CFG1 as per Microchip 30F manual: 0
c) CAN CFG2 as per Microchip 30F manual: 0
RS232 output rate: 3564 Hz
z) return to main menu
------> i
a) use Field Oriented Control: NO
z) return to main menu
Arlo1 said:The current sensors them selves with lebowski's code saved me a few hundred times as well while I was sorting things out. Jeremy when you think you have it. See if you can transition at full throttle with no load on the wheel. Mine never would. But Im hoping with the new build and lebowski's updates it will.
zombiess said:Arlo1 said:The current sensors them selves with lebowski's code saved me a few hundred times as well while I was sorting things out. Jeremy when you think you have it. See if you can transition at full throttle with no load on the wheel. Mine never would. But Im hoping with the new build and lebowski's updates it will.
I can go to full throttle with no load, but I have to roll the throttle a little vs just pin it. If I just pin it, it will fault on the controller chip when it transitions to sensorless, probably because it's happening too fast.
My bike looks like it was built by a total hack, it's comical, wires everywhere, but it works!
liveforphysics said:This is very exciting!
You mentioned the silence. It is so amazing how silent and smooth a hubmotor can be when powered with the right waveform.
Lebowski said:There is no field weakening build into this controller. My 'philospohy' is that most important is max efficiency (as battery capacity is limited) and that if people
want to go even faster they'll just need to up the voltage. Because field weakening really kills efficiency, it's not funny anymore how bad it is. Going over 111%
will start clipping the sine waves. The motor speed will go up a bit but it will start to make noise.
Have you turned on the FOC ? This should improve efficiency and torque a (little) bit at high rpm and under high load....
I don't know what kind of throttle you have, but if you're using a grip twist, it may be fun to add a thumb throttle, connect this to the second throttle input
and configure it for variable strength regen (by setting negative coefficients in the throttle menu)
regarding the loop coefficient menu, you're close to the settings I use. I typically have 240, 12 and 0,07 for b, c and d respectively (and 60, 3 for e and f).
Coefficient d controls how much the internal variable for motor speed is updated. A high value will make that variable for motor speed will jump up and down a lot,
making everything that depends on motor speed more jumpy (like for instance when it transitions between drive modes)
Coefficient c controls how much the phase of the motor is updated. Together with d it determines how fast the controller can respond to (electrical) phase changes.
Coefficiency b is purely there to keep the controll loop stable.
Typically b-c-d have a ratio of 840-40-1 , but b can be higher or d can be lower. I typically keep the b-c ration at 21, but reduce d to get less jumping around between
drive modes.
Coefficient f determines how fast the amplitude of the sine waves to the motor can increase or decrease, with coefficient e there only for loop stability. A ratio of 21 is good.
that will change. perhaps one day we'll all go through the control theory and get a deeper understanding of it all.I don't understand what I'm tweaking in the loop