zombiess
10 MW
Are the control loop parameters setting PID loops or are they different? If so can the 3rd term be set to 0?
Any chance of getting a block diagram?
Any chance of getting a block diagram?
Lebowski said:The MAC is a motor with a clutch right, so it only spins one way ? From your description I have the feeling the (internals) of the MAC are spinning,
but in the reverse direction. This means the clutch is not engaged and the outer shell where the spokes attach stays at standstill.
Yep, it should go from drive_0 (looking to see motor is standing still and no throttle) to drive_1 (recovery, where it will get in sync with
a spinning or standing still motor) to drive_2 (which is the very low rpm drive mode, typically here it starts the motor when in sensorless
-- ps yes during hall calibration its in sensorless). When you give some throttle, the whining buzz gets higher meaning the internals of the
motor accelerate. When the speed gets high enough (this is a setting somewhere) it will go to drive_3... and back to drive_2 again if
the motor speed drops again.
So, based on your short description it all sounds good, just swap out 2 of the 3 motor wires to change the default direction...
izeman said:ok. so behaviour is ok. good to know. 0 flashes, 1 flashes, and then drive_2 stays lit. i turn the throttle, whining sound becomes higher and drive_3 lits shortly. then i goes back to 2. but i'm a bit afraid to give more throttle. doing so with the cheap infineon controllers (and wrong phase/hall combination) leads to immediate FET destruction. and i don't want to risk that. there are sooo many parameters that i don't understand and that could/may be wrong that i want to better be safe than sorry.
i will post the hex file when back home. thanks for the offer to check it!
edit: btw: the throttle response is as expected. it is off and goes to full throttle signal when applied. maybe the buzzing sound is because of the hall calibration started and it's not really trying to turn the motor? i will try with throttle disconnected to be sure.
i can't see any rpm (yet). i only hear the buzzing (faint) noise that gets louder and higher pitched as i turn the throttle. i just don't have the balls to go WOT as i fear to destroy something. so i can't guarantee for 100%, but i think that i just release the throttle as soon as drive_3 (w/o any noticeable motor turn) led lits.Lebowski said:When you keep the rpm up it should stay in drive_3, does it do that ? Or do you just shortly blip the throttle, so does
the motor only have a short duration erpm increase ?
0x03C9 0x0048 0x0618 0x000C 0x0004 0x0002 0x7FBC 0x0126
0x0000 0x004A 0x8000 0x0170 0x00B8 0x02BB 0x03F8 0x03F2
0x03F3 0xB37B 0xAAAE 0xA1DD 0x0258 0x0214 0x002D 0x029A
0x000C 0xFFEC 0x0309 0x0199 0x0614 0x0851 0xFFFF 0xFFFF
0xFFFF 0x0100 0x0269 0xFFFF 0xFFFF 0x05C2 0x0024 0x03D6
0x007A 0x08CC 0x0258 0x0064 0xFFFF 0xFFFF 0xFFFF 0xFFFF
0x0000 0x4CCD 0x000C 0x0000 0x00F0 0xFFFF 0xB333 0xFFF4
0x0000 0xFF10 0x0000 0x07AE 0x0018 0x0000 0x01E0 0xFFFF
0xF852 0xFFE8 0x0000 0xFE20 0x0003 0x0000 0x0078 0x0000
0x0000 0xFFFD 0x0000 0xFF88 0x0000 0x0000 0x003C 0x0003
0x0000 0x0000 0x0000 0xFFC4 0xFFFD 0x0000 0x0000 0x0000
0x00F0 0x000C 0x0000 0x0000 0x0000 0xFF10 0xFFF4 0x0000
0x0000 0x0000 0x2262 0x1400 0x09D5 0x05DC 0x02E1 0x0030
0x00D0 0x0287 0x0122 0x0007 0x00D8 0x0042 0x0010 0x0E10
0x0000 0x03E8 0x00C8 0x57FA 0x03B6 0x6000 0x0093 0x0123
0xFF01 0xAC3F 0x013F 0xD63F 0x563D 0x813F 0x2A3F 0xFF00
0xFFFF 0xC519 0x764B 0x5482 0x41B3 0x35C3 0x2D7A 0x276B
0x22C9 0x1F1E 0x1C28 0x19B5 0x17A6 0x15E6 0x1463 0x1312
0x11EB 0x10E4 0x0FFB 0x0F28 0x0E6B 0x0DC0 0x0D23 0x0C94
0x0C10 0x0B97 0x0B27 0x0ABF 0x0A5F 0x0A05 0x09B1 0x0962
*
a) PWM frequency: 25kHz
b) deadtime: 1499ns
c) dutycycle testsignal: 5461%
d) toggle high side polarity, now active HIGH
e) toggle low side polarity, now active HIGH
f) test PWM signals
g) autocomplete
h) loop sample frequency: 45.04 kHz
z) return to main menu
------>
a) current sensor transimpedance: 20.00 mV/A
b) maximum motor phase current: 14.9 A
c) maximum battery current, motor use: 9.9 A
d) maximum battery current, regen: 1.2 A
e) autocomplete
f) HF current, base level (HF only): 0.7 A
g) HF current, proportional factor (HF only): 1.0000
h) maximum phase current in drive 2 (HF only): 7.0 A
i) phase current for forcing motor position: 2.9 A
j) maximum shutdown error current, fixed: 3.7 A
k) maximum shutdown error current, proportional: 1.8 A
l) applied braking current (phase) on direction change: 0.0 A
m) offset filtering (phase) current limit: 0.0 A
z) return to main menu
------>
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: YES
h) test throttle
z) return to main menu
------>
a) erpm limit, forward: 39.95 k-erpm
b) erpm limit, reverse: 2.96 k-erpm
c) accept direction change below: 82 erpm
d) transition erpm drive 2 -> 3: 494 erpm
e) transition erpm drive 3 -> 2: 164 erpm
z) return to main menu
------>
a) restore calibration, autocomplete
b) perform offset measurement
sensor a: -20.0 mV
sensor b: -35.0 mV
sensor c: -32.5 mV
c) perform gain measurement
channel a: 95.08 %
channel b: 99.98 %
channel c: 105.43 %
d) online gain calibration update rate: 0.302 %
z) return to main menu
------>
a) autocomplete
b) throttle current filter -3dB freq: 100 Hz
c) error current 50% step response time: 5.016 msec
d) induction position filter 45 degree delay speed: 2.00 k-erpm
e) drive 2 speed filter 50% step response time: 208.1 msec
z) return to main menu
------>
a) autocomplete
b) FOC measurement current: 7.4 A
c) FOC measurement erpm: 61.85 k-erpm
d) perform impedance measurement
measured inductance: 157.3 uH
z) return to main menu
------>
a) autocomplete
phase control loop, recovery
b) 1st order: 0
c) 2nd order: 120.0000
d) 3rd order: 3.0000
amplitude control loop, recovery
e) 1st order: 240
f) 2nd order: 12.0000
g) 3rd order: 0.0000
h) pulse when current drops below: 0.3 A
i) pulse width: 17 usec
j) pulse % for exit: 95
k) pulse % filter 50% step response time: 30.3 msec
l) speed filter 50% step response time: 7.0 msec
m) try restart for: 499 msec
n) check for spinning motor, drive_0: enabled
o) check for throttle closed, drive_0: enabled
exit from startup to recovery at current
p) current to check: total current
q) fixed part: 1.4 A
r) proportional to throttle current, factor: 150 %
s) current filter 50% step response time: 5.0 msec
z) return to main menu
------>
you mean: start inLebowski said:Some things I noticed... first off do not use the HF mode, try sensorless first.
0) mode: Toneless, with recovery
0x03C9 0x0048 0x0618 0x000C 0x0004 0x0002 0x7FBC 0x0126
0x0000 0x004A 0x8000 0x03D6 0x03D6 0x02BB 0x03F5 0x03EF
0x03F0 0xAAAA 0xAAAA 0xAAAA 0x02EE 0x0267 0x001E 0x0301
0x000A 0xF7CE 0x0309 0x0199 0x0614 0x0851 0xFFFF 0xFFFF
0xFFFF 0x0100 0x0269 0xFFFF 0xFFFF 0x05C2 0x03D6 0x03D6
0x007A 0x08CC 0x0258 0x0064 0xFFFF 0xFFFF 0xFFFF 0xFFFF
0x0000 0x4CCD 0x000C 0x0000 0x00F0 0xFFFF 0xB333 0xFFF4
0x0000 0xFF10 0x0000 0x07AE 0x0018 0x0000 0x01E0 0xFFFF
0xF852 0xFFE8 0x0000 0xFE20 0x0003 0x0000 0x0078 0x0000
0x0000 0xFFFD 0x0000 0xFF88 0x0000 0x0000 0x003C 0x0003
0x0000 0x0000 0x0000 0xFFC4 0xFFFD 0x0000 0x0000 0x0000
0x00F0 0x000C 0x0000 0x0000 0x0000 0xFF10 0xFFF4 0x0000
0x0000 0x0000 0x2262 0x1400 0x09D5 0x05DC 0x02E1 0x0038
0x00F0 0x02EB 0x014F 0x0008 0x00D8 0x0042 0x0010 0x0E10
0x0000 0x03E8 0x00C8 0x4C31 0x03B6 0x6000 0x0126 0x0150
0xFF01 0xAC3F 0x013F 0xD63F 0x563D 0x813F 0x2A3F 0xFF00
0xFFFF 0xC519 0x764B 0x5482 0x41B3 0x35C3 0x2D7A 0x276B
0x22C9 0x1F1E 0x1C28 0x19B5 0x17A6 0x15E6 0x1463 0x1312
0x11EB 0x10E4 0x0FFB 0x0F28 0x0E6B 0x0DC0 0x0D23 0x0C94
0x0C10 0x0B97 0x0B27 0x0ABF 0x0A5F 0x0A05 0x09B1 0x0962
*
a) erpm limit, forward: 34.60 k-erpm
b) erpm limit, reverse: 2.57 k-erpm
c) accept direction change below: 71 erpm
d) transition erpm drive 2 -> 3: 428 erpm
e) transition erpm drive 3 -> 2: 142 erpm
izeman said:i got it working now. great! is it correct that hall calibration needs several throttle activation until it finds a working combination? looks to me like that?!
i save the combination now. now i will start tuning, and maybe understand the other setup options.
i guess it runs quite slowly. but maybe i'm fooled.
and sometimes it just stops, goes to drive_0 or 1 and then 2 again. so it seems there is some error condition.
i will make final install (new wires and stuff) now that i know it's working at all, and then do continue with testing.
thanks lebowski for the excellent support!!! (and the great design as well of course!)
izeman said:i guess those values are not suitable for a high rpm mac motor?
let's say the motor is 5:1 500rpm and 16pole, so this is 2500 * 16 = 40k(e)rpm. correct?Code:a) erpm limit, forward: 34.60 k-erpm b) erpm limit, reverse: 2.57 k-erpm c) accept direction change below: 71 erpm d) transition erpm drive 2 -> 3: 428 erpm e) transition erpm drive 3 -> 2: 142 erpm
are the transitions good values for a geared hub? shouldn't the be higher as well?
so it's pole pairs multiplied by rpm? ok. then 35k is more than enough. i will set the transition erpm as you proposed. "c" is not relevant in my case.Lebowski said:izeman said:i guess those values are not suitable for a high rpm mac motor?
let's say the motor is 5:1 500rpm and 16pole, so this is 2500 * 16 = 40k(e)rpm. correct?Code:a) erpm limit, forward: 34.60 k-erpm b) erpm limit, reverse: 2.57 k-erpm c) accept direction change below: 71 erpm d) transition erpm drive 2 -> 3: 428 erpm e) transition erpm drive 3 -> 2: 142 erpm
are the transitions good values for a geared hub? shouldn't the be higher as well?
if you have 16 magnet poles then it is 2500*8 = 20 kerpm....
I typically have c at 150, d around 700 and e around 300 ... But if you notice it jumping around between drive 2 and 3 too much you can increase the numbers. They should be relatively low though.
sorry to repeat that again. what do i do if it does NOT turn? keep applying throttle and wait? and for how long? because this is what happens sometimes. nothing. it won't turn. and after trying some more times (releasing throttle, moving the stator a bit, applying throttle (some seconds), releasing,..) it starts turning. then i click SETUP and all leds flash and it's saved. when i reconnect the battery it starts turning immediately.For hall calibration you just give constant throttle to spin up the motor and keep it in drive_3. While in drive_3, after a few seconds press the setup button to store the results, that's it.
could very well beAbout running slowly, I saw your reverse speed is set much lower than the forward speed, so are you sure you are in forward ?
it doesn't really STOP. it's more like a short hick-up. a short interruption. it isn't even long enough to stop the rotor. not nearly. those drive leds are very close together and light up only very shortly. so i will maybe take a video to better observe what happens.It should never just stop and go to drive_0 or drive_1. Are you sure the power doesn't get interrupted ? If an error condition occurs it will first go to drive_1 to try
to recover, if this fails after 0.5 seconds it will go to drive_0. If it goes directly from drive_2 or _3 to drive_0, this can only happen with a reset or a momentary power outage.
izeman said:makes sense, and i guess with your help i can get this running nicely.
one more question: from those xie change controllers there is this unwritten rule to set max phase current to 2.5-3x max battery current to make the motor run nicely. is this a rule for this kind of controllers only, or a general rule? or: does this rule of thumb apply to your controller type as well?
eg. i have 50v 45a battery limit set. and i would now set phase current to 100a. is this a good idea? or do i just have to play around with the current settings and test when overheating occurs?
izeman said:success. it worksin sensorless mode. so there must be something wrong with the hall sensors (setup).
this is the working (sensorless) config right now:
Code:0x03C9 0x0048 0x0618 0x000C 0x0004 0x0002 0x7FBC 0x0126 0x0000 0x004A 0x8000 0x03D6 0x03D6 0x02BB 0x03F5 0x03EF 0x03F0 0xAAAA 0xAAAA 0xAAAA 0x02EE 0x0267 0x001E 0x0301 0x000A 0xF7CE 0x0309 0x0199 0x0614 0x0851 0xFFFF 0xFFFF 0xFFFF 0x0100 0x0269 0xFFFF 0xFFFF 0x05C2 0x03D6 0x03D6 0x007A 0x08CC 0x0258 0x0064 0xFFFF 0xFFFF 0xFFFF 0xFFFF 0x0000 0x4CCD 0x000C 0x0000 0x00F0 0xFFFF 0xB333 0xFFF4 0x0000 0xFF10 0x0000 0x07AE 0x0018 0x0000 0x01E0 0xFFFF 0xF852 0xFFE8 0x0000 0xFE20 0x0003 0x0000 0x0078 0x0000 0x0000 0xFFFD 0x0000 0xFF88 0x0000 0x0000 0x003C 0x0003 0x0000 0x0000 0x0000 0xFFC4 0xFFFD 0x0000 0x0000 0x0000 0x00F0 0x000C 0x0000 0x0000 0x0000 0xFF10 0xFFF4 0x0000 0x0000 0x0000 0x2262 0x1400 0x09D5 0x05DC 0x02E1 0x0038 0x00F0 0x02EB 0x014F 0x0008 0x00D8 0x0042 0x0010 0x0E10 0x0000 0x03E8 0x00C8 0x4C31 0x03B6 0x6000 0x0126 0x0150 0xFF01 0xAC3F 0x013F 0xD63F 0x563D 0x813F 0x2A3F 0xFF00 0xFFFF 0xC519 0x764B 0x5482 0x41B3 0x35C3 0x2D7A 0x276B 0x22C9 0x1F1E 0x1C28 0x19B5 0x17A6 0x15E6 0x1463 0x1312 0x11EB 0x10E4 0x0FFB 0x0F28 0x0E6B 0x0DC0 0x0D23 0x0C94 0x0C10 0x0B97 0x0B27 0x0ABF 0x0A5F 0x0A05 0x09B1 0x0962 *
h) pulse when current drops below: 9.9 A