Search found 955 matches

by catphish
Wed Mar 01, 2023 10:19 pm
Forum: Inverters / Motor Controllers
Topic: In one housing inverter and motor capacity of 160 kilowatts
Replies: 1
Views: 604

Re: In one housing inverter and motor capacity of 160 kilowatts

Drive units like this are great. For DIY'ers, salvage Tesla drive units usually provide more power for a much lower cost, but if I were embarking on a commercial design, I would definitely try to source a drive unit like this. You may also want co check out https://webshop.swindonpowertrain.com/inde...
by catphish
Tue Feb 28, 2023 6:11 pm
Forum: General
Topic: New MOT rules
Replies: 9
Views: 1036

Re: New MOT rules

This seems like nothing but a vague suggestion by somebody looking for opinion. I'm broadly in favor of such addition tests. However, realistically, in my opinion the only way to "test" an EV battery is going to be similar to a PAT test. Mostly a visual inspection, looking for worn / fraye...
by catphish
Sun Feb 26, 2023 12:22 am
Forum: Battery Managment (BMS)
Topic: Gerber files 4 Tesla BMS
Replies: 2
Views: 5474

Re: Gerber files 4 Tesla BMS

Most of these boards come from companies who are not very good at sharing their designs, and as such the gerbers are not available. I had a quick look and found this, but it doesn't match up with the other boards, so I'm not sure if it's useful: https://github.com/relectric-car-team/pcb-tesla-cell-tap
by catphish
Tue Feb 21, 2023 8:08 pm
Forum: Inverters / Motor Controllers
Topic: Current control of induction motors
Replies: 192
Views: 32003

Re: Current control of induction motors

[OLD VERSION REMOVED]
by catphish
Tue Feb 21, 2023 7:00 pm
Forum: Tesla
Topic: SDU parameter tuning - major failure - can't select drive gear
Replies: 36
Views: 3902

Re: SDU parameter tuning - major failure - can't select drive gear

Regarding the TVS approach. could you give some more information on how you dimensioned the diodes and resistors? Don't overthink it. Just make sure the contactors never open unless the vehicle is idle. tripode=1 should be all you need. There are some extreme edge cases like blowing a low voltage f...
by catphish
Tue Feb 21, 2023 9:15 am
Forum: Inverters
Topic: Car inverter as a 3 phase inverter ?
Replies: 26
Views: 13185

Re: Car inverter as a 3 phase inverter ?

I was under the impression the output of a Prius Gen2 and Gen3 inverter was a SPWM and am now reading might not be as clean as I was thinking. I may be thinking that way due to reading via controlling using the openinverter. Either way, filtering would be required... though less based on the SPWM a...
by catphish
Tue Feb 21, 2023 8:57 am
Forum: Tesla
Topic: Tesla front SDU oil - Mobil SHC 629 alternatives [SOLVED]
Replies: 7
Views: 2851

Re: Tesla front SDU oil - Mobil SHC 629 alternatives [SOLVED]

ViktorT wrote: Thu Jul 21, 2022 8:15 am Hi Catphish
Did you get it right with the oil?
As far as I know, yes. The drive unit has been running fine with it :)
by catphish
Mon Feb 20, 2023 8:47 pm
Forum: Inverters / Motor Controllers
Topic: Current control of induction motors
Replies: 192
Views: 32003

Re: Current control of induction motors

So, after lots of tuning (and only minor code changes) I would like to release what will hopefully be the final version for now. This version enables regen! It's still not as polished as I'd like, but it seems to work. Attachments: stm32-sine.bin - Version 5.26.X tesla-sdu-performance-slipmin.json -...
by catphish
Sun Feb 19, 2023 11:30 pm
Forum: General
Topic: Best sine parameter to vary for traction control?
Replies: 27
Views: 3104

Re: Best sine parameter to vary for traction control?

The only parameter to update to directly reduce torque is throtmax. This is used as part of the throttle calculation at 100Hz. There are two problems here though: 1) Throtmax won't have any impact until it's less than the actual throttle value (potnom). This probably isn't a huge issue, traction is ...
by catphish
Sun Feb 19, 2023 4:25 pm
Forum: Inverters / Motor Controllers
Topic: Current control of induction motors
Replies: 192
Views: 32003

Re: Current control of induction motors

Big success. I now have stable regen. I didn't achieve this by any particularly clever code, just by limiting various slew rates. regen-success.png Specifically: 1) I introduced separate gains for positive current correction vs negative current correction. This allows me to tune the negative gain t...
by catphish
Sat Feb 18, 2023 7:16 pm
Forum: Inverters / Motor Controllers
Topic: Field oriented control of induction motors
Replies: 71
Views: 12837

Re: Field oriented control of induction motors

What's the benefit be of using FOC for induction motors versus just the plain Sine algorithm? I'll be running an induction motor (nothing fancy like a tesla, a forklift motor). Wondering if/how this might affect me. In theory, a correctly implemented FOC algorithm has three main benefits: 1) More e...
by catphish
Sat Feb 18, 2023 6:00 pm
Forum: Inverters / Motor Controllers
Topic: Current control of induction motors
Replies: 192
Views: 32003

Re: Current control of induction motors

A while back, I experimented with some code to graph the in-phase (real) and out-of-phase (reactive) current. Looking again at that data I am convinced it is useful for a couple of reasons. Firstly, looking at the following 0-60 graph it can clearly be seen that as speed increases, the ratio between...
by catphish
Sat Feb 18, 2023 4:16 pm
Forum: Inverters / Motor Controllers
Topic: Field oriented control of induction motors
Replies: 71
Views: 12837

Re: Field oriented control of induction motors

How about coupling the two motors together. One on MG1 the other on MG2 and run the pair as a dyno ;) This is seeming like it might be the best idea. Probably easiest to do with two identical sizes motors, will make mounting and coupling a lot simpler. I am putting this FOC on hold for now as it ki...
by catphish
Sat Feb 18, 2023 1:24 am
Forum: Inverters / Motor Controllers
Topic: how to find out the correct FWEAK without knowing the parameters of the ACIM motor?
Replies: 29
Views: 2817

Re: how to find out the correct FWEAK without knowing the parameters of the ACIM motor?

I lowered the fweakstrt to 0 a lower value of fweak will give you more current fweak and fweakstrt control the speed at which 100% voltage is applied. Set one of them to zero and you will get 100% voltage at zero speed. That's certainly a quick way to destroy your controller, sorry :( It's not clea...
by catphish
Wed Feb 15, 2023 7:59 pm
Forum: Inverters / Motor Controllers
Topic: Current control of induction motors
Replies: 192
Views: 32003

Re: Current control of induction motors

I did some more regen testing today, this time using higher current targets and lower slip as proposed. This does lead to a substantial improvement in stability! Regen seems to work and remains stable. road-regen-almost.png However, one problem remains. When reducing regen (ie moving from regen to z...
by catphish
Wed Feb 15, 2023 12:35 am
Forum: Inverters / Motor Controllers
Topic: how to find out the correct FWEAK without knowing the parameters of the ACIM motor?
Replies: 29
Views: 2817

Re: how to find out the correct FWEAK without knowing the parameters of the ACIM motor?

In therory, fweak is the frequency at which the motor is rated to run at your full battery voltage. Here are some tings to consider: 1) Rated parameters of motors are more like suggestions than exact values, so don't worry about getting it exact. 2) That a lower value of fweak will give you more cur...
by catphish
Tue Feb 14, 2023 7:44 pm
Forum: Inverters / Motor Controllers
Topic: Field oriented control of induction motors
Replies: 71
Views: 12837

Re: Field oriented control of induction motors

I've been donated another 1kW motor with a chain sprocket on it. This one might be more practical to attach a load to :)
by catphish
Tue Feb 14, 2023 7:11 pm
Forum: Inverters / Motor Controllers
Topic: Current control of induction motors
Replies: 192
Views: 32003

Re: Current control of induction motors

I found myself thinking about regen again today, and I think I have an idea how to prevent the unpleasant current spikes. It's my suspicion that all along I've been trying to set the current too low. Looking at this chart, we can see that as we switch into regen and set slip negative, we get a risin...
by catphish
Mon Feb 13, 2023 11:15 pm
Forum: Inverters / Motor Controllers
Topic: Field oriented control of induction motors
Replies: 71
Views: 12837

Re: Field oriented control of induction motors

Slightly envious of your test setup too ;) I really like this setup. Thanks to johu for providing the STM32 board! The Prius inverter and industrial motor were quite cheap (about £80 each). The battery and contactors were leftover from my car build. I'd still like to find a way to test with a load....
by catphish
Mon Feb 13, 2023 8:00 pm
Forum: Inverters / Motor Controllers
Topic: Field oriented control of induction motors
Replies: 71
Views: 12837

Re: Field oriented control of induction motors

Are you referring to equation (11) here? If so that is just for the steady state, where dPsir/dt = 0. Under non-steady state conditions I think you need the other term too. Nope, referring to Phir in equation 9 - the one that's self-referential. I'm suggesting that if you replace Phir with... itsel...
by catphish
Mon Feb 13, 2023 4:08 pm
Forum: Inverters / Motor Controllers
Topic: Field oriented control of induction motors
Replies: 71
Views: 12837

Re: Field oriented control of induction motors

Had a look at this but still can't work out how Lm could cancel :? Here are my calcs in case they are of any use? Thank you for going through this. On the very first line of your calculations, you have "-Psir/Tr". My argument was based on the assumption that Lm and Id are both factors of ...
by catphish
Mon Feb 13, 2023 3:45 pm
Forum: Inverters / Motor Controllers
Topic: Field oriented control of induction motors
Replies: 71
Views: 12837

Re: Field oriented control of induction motors

Here's another short demo of the motor running on the bench after some tweaking of settings.
by catphish
Mon Feb 13, 2023 12:27 pm
Forum: Inverters / Motor Controllers
Topic: Field oriented control of induction motors
Replies: 71
Views: 12837

Re: Field oriented control of induction motors

So, rather late last night I wrote a simpler FOC implementation. The full code is here: https://github.com/catphish/stm32-sine/blob/foc-sine-basic/src/pwmgeneration-sine.cpp First we fetch some settings. slipconst is a time constant. It's a combination of motor parameters and the PWM frequency. It d...
by catphish
Sun Feb 12, 2023 10:47 pm
Forum: Inverters / Motor Controllers
Topic: Field oriented control of induction motors
Replies: 71
Views: 12837

Re: Field oriented control of induction motors

Anyway... proposed code. Not yet tested! https://github.com/catphish/stm32-sine/commit/c6ac4a6cb652415e0402ae42a34603a58137cceb#diff-b8914fe3a0942d8ed9dfd6f4996301481a1a4a1ec65b8467a5733807ac931d26 Going back over the code, I feel like this might work in steady state, but there's one aspect that co...
by catphish
Sun Feb 12, 2023 10:30 pm
Forum: Inverters / Motor Controllers
Topic: Field oriented control of induction motors
Replies: 71
Views: 12837

Re: Field oriented control of induction motors

Need to write it out to be sure but if the rotorFlux calculation is written on a single line rather than two them Lm isn't common to both terms and so won't cancel when calculating slip. Or am I misunderstanding the question? I'm not sure how best to explain, but I'm thinking that Lm multiplies the...