Bit of backstory here - I have a conversion that the previous owner originally converted many years ago and I have restored to working order. (More on that once I figure this issue out ) The motor and inverter in it were originally purchased as a pair from China, the motor is huge, but PM and capable enough - 250Nm, 4000rpm. The inverter worked fine - but had no configurability, so I couldn't increase the minimal amount of regen it did (or change it only happened below 2000rpm), raise the RPM limit, CAN inputs and outputs, etc. They also came with a very minimal datasheet.
So now I have undertaken replacing it with an openinverter-ized Leaf inverter after great success with the Tesla Gen2 charger board - my max pack voltage is ~350v so the Leaf inverter was a natural fit. I'm much more experienced with electrical and motor controls stuff than mechanical fabrication - so I figured it would be better worth my time to leave the old motor mounted up and deal with figuring out an unknown motor rather than try to replace it with a Leaf motor. I still bought myself a whole Leaf front stack since the first Leaf inverter I bought from Ebay had been so aggressively crowbarred off the motor to the point its PCB was cracked and one IGBT module ripped apart, and in case I did want to undertake swapping the Leaf motor and putting the original control board for VCU/CAN type control later on down the road.
So far I have been successful setting up the Leaf inverter to first spin the Leaf motor, then to spin the ancient motor, I was able to calibrate syncofs, tune the current controller gains, hook it up to the existing throttle pot, and I've been able to move the car back and forth on my driveway, including putting it on ramps to touch up wiring and coolant tubes underneath.
However, at my current battery voltage of 308v or so, I was only reaching 3600rpm (180hz - it's a 3 pole pair motor) where with the original inverter my previous limit had been 4000rpm (200hz). So as a first attempt at setting up flux weakening, I took an initial guess at the fluxlinkage value, set fwcurmax to -100, and revved up. To my surprise, I only reached 160hz. I could see on the graph that Id magnitude was increasing, so I knew that the flux weakening had engaged when I needed it. After some experiments changing fwcurmax and fluxlinkage with no results, I eventually just injected manual positive Id and to my surprise this worked - was able to reach past 180hz depending on how much Id I set.
Here is a plot:
The first 2 runs are with fwcurmax at 0. The third run fwcurmax is at -100 and you can see the max frequency is lower. The fourth run manual Id is at 100 and I reached just a little past 200hz.
So seemingly the flux weakening Id output has a sign flip somewhere? I figure I must be configured improperly, since it's working properly for other folks. I tried running the motor in reverse (flipped dirmode) and still had the same behavior. (limited to 160hz at fwcurmax of -100)
This happened both on FOC 5.24 and 5.27 (currently what I am running). I've attached my parameter json - it seems like it's missing a few parameters though, notably my respolepairs and pinswap values, which are also not visible in the web interface but they do stay saved to flash.
Flux is strengthening instead of weakening? [SOLVED]
- nickyivyca
- Posts: 15
- Joined: Thu Jul 06, 2023 4:45 pm
- Location: California
- Has thanked: 2 times
- Been thanked: 8 times
Flux is strengthening instead of weakening?
- Attachments
-
- 2023-07-06.json
- (1.4 KiB) Downloaded 44 times
-
- Posts: 1801
- Joined: Sun Apr 03, 2022 1:57 pm
- Has thanked: 102 times
- Been thanked: 347 times
Re: Flux is strengthening instead of weakening? [SOLVED]
Guessing that you are running on the wrong syncofs null. Try adding/subtracting 32768 to syncofs (whichever keeps the value below 65536) and trying again. The motor will run backwards (which can be fixed by swapping a couple of phases and retuning syncofs) but you should then have field weakening rather than field strengthening!
- johu
- Site Admin
- Posts: 5789
- Joined: Thu Nov 08, 2018 10:52 pm
- Location: Kassel/Germany
- Has thanked: 157 times
- Been thanked: 1023 times
- Contact:
Re: Flux is strengthening instead of weakening?
When you buy a leaf board from me some parameters are hidden as I assume you run a leaf motor. Type
To unhide a parameter. Those flags are also saved when you hit save
Code: Select all
flag polepairs !hidden
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
- nickyivyca
- Posts: 15
- Joined: Thu Jul 06, 2023 4:45 pm
- Location: California
- Has thanked: 2 times
- Been thanked: 8 times
Re: Flux is strengthening instead of weakening?
I knew it must've been a simple fix. Now it's working great! Flipping the direction switch in the interface worked so I didn't need to swap my wires that were already all ziptied up...Pete9008 wrote: ↑Fri Jul 07, 2023 7:54 am Guessing that you are running on the wrong syncofs null. Try adding/subtracting 32768 to syncofs (whichever keeps the value below 65536) and trying again. The motor will run backwards (which can be fixed by swapping a couple of phases and retuning syncofs) but you should then have field weakening rather than field strengthening!
Neat, this worked as well.johu wrote: ↑Fri Jul 07, 2023 8:47 am When you buy a leaf board from me some parameters are hidden as I assume you run a leaf motor. TypeTo unhide a parameter. Those flags are also saved when you hit saveCode: Select all
flag polepairs !hidden
Somewhat unrelated to my initial post, is it possible to disable the Idc estimation such that I can send IDC over CAN from the BMS for the sake of the derating functionality? I can see the Idc estimation has some error on it. Even when CAN RX is set for it, the test value I send for it it only is used before the inverter is started.