100+kW Motor Controller - Page 1
Forum section: electronics / projects

author: marcos_
author_rank: Contributor
timestamp: April 29, 2019, 10:09:14 pm
content: Hi,I just wanted to show you guys what we have been working on for quite a while over the endless-sphere forums, recently released in hackadayhttps://hackaday.io/project/164932-axiom-100kw-motor-controllerI hope you find it interesting, and I'm keen to hear feedback from the forum! There is always room to improve. If you like what you see, consider following the project and actual like in that page, it would help quite a bit to keep us working on it.Cheers

author: jeremy
author_rank: Super Contributor
timestamp: April 29, 2019, 11:00:27 pm
content: Very nice!If I may ask, is the FPGA completely necessary? It seems like the MCU is doing the PWM (and possibly the calculations ?). All I can really think of other than that is the encoders, but there are many ARM mcus that can directly interface to incremental encoders nowadays.

author: marcos_
author_rank: Contributor
timestamp: April 29, 2019, 11:48:28 pm
content: Quote from: jeremy on April 29, 2019, 11:00:27 pmThanks!Incremental encoders is already supported, but for high performance you want to know the rotor position from the start, otherwise you can't apply full torque at 0rpm, in a launch situation for example. That can be done with resolvers or high speed absolute encoders, a common comm protocol for those is BiSS which I'm not confident can be managed by the already loaded cpu.The other potential usage is fitting 7 delta sigma demodulators to digitize the 4 voltages and 3 currents directly at the busbars, without any analog signal path. This way everything stays digital, filtering can be tweaked from firmware, no drift, no offsets, etc. We are already using sensors that come with delta sigma variants. In this scenario all motor signals are being input directly to the FPGA and output PWM is an fpga output,so you could run the control loop at ludicrous frequencies inside the fpga and using the arm mcu as an application processor.Also the fpga is actually not much more expensive, early versions had a bunch of discrete logic gates doing the basic protection job and the costs sum up, I think overall its a $3 difference that gives you the opportunity to do interesting things.

author: m3vuv
author_rank: Super Contributor
timestamp: April 29, 2019, 11:57:24 pm
content: is it for an ebike?,it would be mental if so!!

author: marcos_
author_rank: Contributor
timestamp: April 30, 2019, 12:14:04 am
content: Its more for an EV car, but we had several requests for sportbikes. Apparently there is no such thing as too much power =D

author: Psi
author_rank: Super Contributor
timestamp: April 30, 2019, 12:35:22 am
content: Regenerative braking?

author: langwadt
author_rank: Super Contributor
timestamp: April 30, 2019, 12:43:56 am
content: Quote from: marcos_ on April 29, 2019, 11:48:28 pmand afaiu in safety related systems FPGAs are sorta seen as "hardware" and considered more reliable than software, which make sense consideringthe many many permutations of what happens in a cpu once you throw in a bunch of interrupts

author: jeremy
author_rank: Super Contributor
timestamp: April 30, 2019, 02:33:20 am
content: Makes sense. I keep forgetting that these ice FPGAs are not $70 eachDo you need to install the absolute encoder with the zero index aligned to a specific rotor angle (with a keyed shaft or something like that)? Or do you just orient it however and then spin it a few times and use a calibration routine to detect the orientation?

author: NiHaoMike
author_rank: Super Contributor
timestamp: April 30, 2019, 02:46:44 am
content: It's actually very common to use FPGAs in motor drives of that size. Allows implementation of all sorts of custom PWM/PDM algorithms (e.g. variants of Delta Sigma) that common microcontrollers cannot do and that's important when dealing with IGBTs that work most efficiently up to a few kHz. There are microcontrollers with a bit of FPGA/CPLD logic built in but what I have seen in the PICs isn't nearly flexible enough to do that sort of modulation trick. (Not sure about Cypress PSoC, although I'm under the impression it's a lot more sophisticated than what Microchip uses.)

author: marcos_
author_rank: Contributor
timestamp: April 30, 2019, 03:27:09 am
content: Quote from: Psi on April 30, 2019, 12:35:22 amSure, in field oriented control math its just changing the sign of Iq current. That commands negative torque ("regen")Quote from: jeremy on April 30, 2019, 02:33:20 amThere is a command to acquire the encoder offset. It will make the motor spin very slowly to find the offset and thats it. It works the same way for encoders, resolvers, sin/cos encoders and hall.I think OEMs measure the offset and manually store it, but it could be to speed up production.Quote from: langwadt on April 30, 2019, 12:43:56 amYup, nobody should trust software taken from github. It runs an open source RTOS so you can't really make sure its 100% solid. At least not without an awful lot of software validation so I'm sure this is the right way to go.

author: Psi
author_rank: Super Contributor
timestamp: April 30, 2019, 08:41:00 am
content: Quote from: marcos_ on April 30, 2019, 03:27:09 amInteresting, i always thought re-gen required some sort of extra boost step-up system to allow pulling high current out of the motor at slow speed.

author: marcos_
author_rank: Contributor
timestamp: April 30, 2019, 12:48:40 pm
content: Quote from: Psi on April 30, 2019, 08:41:00 amYou use the motor windings as inductors, the circuit has already the topology to boost.^random image from the internet, it doesn't represent our motordriveAnyway at low speeds there is not much power available, power = torque*speed so any effort spent in low speed regen performance doesn't give you much gains

author: mac.6
author_rank: Regular Contributor
timestamp: April 30, 2019, 02:00:50 pm
content: What is the point/target of this project? just hobby/hacker? Startup with resell exit strategy? Real OEM product? I can't see from the hackaday page...

author: marcos_
author_rank: Contributor
timestamp: April 30, 2019, 02:26:59 pm
content: Quote from: mac.6 on April 30, 2019, 02:00:50 pmWe get most revenue from startups needing a quality drivetrain. Helping the enthusiastic crowd and making the popular and open source VESC firmware better is a nice side effect.

author: Siwastaja
author_rank: Super Contributor
timestamp: April 30, 2019, 03:08:03 pm
content: Quote from: Psi on April 30, 2019, 08:41:00 amFor permanent magnet motors (brushed or BLDC), just output lower PWM duty cycle in two-switch (half bridge) design. Won't work with the simplest freewheeling diode design. With a half bridge, the motor inductance simply acts as a boost converter. Draw it, you'll see it's a bidirectional synchronous buck converter (which is synchronous boost in the opposite direction). If you want to really freewheel, you turnbothswitches off.For induction motors, it's fundamentally the same, but the control is, of course, a bit more complex. You need to output lower fundamental frequency than what the motor RPM dictates; this changes the sign of slip, causing it to become a generator.For a series-wound brushed motor, regen is a different beast, but these motor types are getting increasingly rare in modern designs.

author: marcos_
author_rank: Contributor
timestamp: April 30, 2019, 03:26:04 pm
content: Quote from: Siwastaja on April 30, 2019, 03:08:03 pmThat's true, but when you are already computing a field oriented control, everything comes down to Iq/Id currents, those are DC variables, not aware of frequency information or PWM pulses, just like your foot is unaware of the fuel injection pulse width.Wanna accelerate? Positive Iq. Wanna brake and store energy in the battery? Negative Iq. The control loop will unfold the frequency and angle details based upon data that the actual user (a foot) does not really care (instantaneous voltages, current, and flux angle) . Its same principle with PM or ACIM machines. Its a bit less intuitive when there is reluctance torque involved, but that's another story.

author: schmitt trigger
author_rank: Super Contributor
timestamp: April 30, 2019, 04:54:07 pm
content: Impressive!Let's talk a bit about thermal management. The IGBT module appears to be attached to a water cooled plate. Is my assumption correct?If so, is this plate a catalog item, or did you actually had to machine it.Likewise the bussbars. Are they catalog items?

author: Dave
author_rank: Super Contributor
timestamp: April 30, 2019, 06:48:18 pm
content: As someone that works in this industry, I find it absolutely baffling that you managed to develop all of this yourself.Amazing, keep up the great work!

author: marcos_
author_rank: Contributor
timestamp: April 30, 2019, 07:08:47 pm
content: Quote from: schmitt trigger on April 30, 2019, 04:54:07 pmThe coldplate is a wolverine cp3001, as thermals are critical part of the system performance. You can loose many kW just because a poorly chosen thermal path. If you use the IGBT modules NTC temperature sensor (yes the control is designed to measuse those 3 temps) its not dangerous, but if you run open loop temperature-wise you can overheat an IGBT.https://www.microcooling.com/our-products/cold-plate-products/3000-series-cold-plates/cp-3001/Phase bars are custom made, we have a small cnc here, its a simple piece we do in aluminum. Soon enough we'll waterjet it from copper and avoid fighting the aluminum oxidation.Quote from: Dave on April 30, 2019, 06:48:18 pmHa, thanks! This also stands on years worth of effort from Benjamin developing the firmware and GUI, highhopes experience in the field, arlin experience in the dragstrip and maxi's firmware skills. But yeah, super small team.

author: Psi
author_rank: Super Contributor
timestamp: May 01, 2019, 12:40:56 pm
content: Quote from: marcos_ on April 30, 2019, 12:48:40 pmCool!I guess my line of thinking was...If you dead short the 3 motor windings you will get the best braking action and a massive current flow through the short.However the voltage will be super low. So trying to get both good braking and high voltage for charging would require a boost circuit.

author: NiHaoMike
author_rank: Super Contributor
timestamp: May 01, 2019, 04:28:44 pm
content: A quick explanation of how the motor windings can be used as the inductor for a boost converter:http://techno-fandom.org/~hobbit/cars/boost-hack/

author: max_torque
author_rank: Super Contributor
timestamp: May 01, 2019, 07:48:48 pm
content: Any idea what the EMC performance of the inverter is? I assume you have software control of the igbt gate drive so can vary the dv/dt to optimise the loss / thermal performance against the EMC one?(and well done getting this far btw, making an inverter really isn't very difficult, but to make one that is robust, affordable, quiet, has good software and a nice interface, well that's a whole extra level of work! As someone who's take a hybrid vehicle inverter from concept to OE production i can tell you the last bits are much harder than the first bit...... ;-) )

author: uer166
author_rank: Super Contributor
timestamp: May 01, 2019, 08:15:42 pm
content: Quote from: Psi on May 01, 2019, 12:40:56 pmNot 100% true AFAIK, the curve for rpm-vs-shorted-phase-currents is non-linear since with increasing motor speed the current gets more and more out of phase of the voltage due to winding inductance. At some point it's so out of phase it's close to 0. It's also why a 3-phase short can be a default fail-safe in a motor that spins at higher rpm to the point where back EMF>>battery voltage (possible through field weakening).

author: marcos_
author_rank: Contributor
timestamp: May 01, 2019, 09:15:06 pm
content: Quote from: max_torque on May 01, 2019, 07:48:48 pmWhy would you assume we have a software-controlled dynamic gate driver?The only drive I know with that feature is tesla high performance rear drive unit, I imagine its gone now that they use SiC. They used it to manage overshoot vs switching losses, I don't see it driven by EMC.

author: marcos_
author_rank: Contributor
timestamp: May 02, 2019, 12:56:31 pm
content: I think this log is of interest for the eevblog audience:https://hackaday.io/project/164932-axiom-100kw-motor-controller/log/162657-block-diagram-explainedAnd don't forget the pretty pics and scope captures of the main descriptionhttps://hackaday.io/project/164932-axiom-100kw-motor-controller/detailsCheers

author: moffy
author_rank: Super Contributor
timestamp: May 03, 2019, 12:14:17 am
content: About regen, you need somewhere to dump the energy otherwise your DC bus will go excessively high. In diesel/electric locomotives they use massive fan cooled resistor banks, for yours, if battery fed you would need a safe means of getting the energy back into the battery.

author: marcos_
author_rank: Contributor
timestamp: May 03, 2019, 03:18:47 am
content: Quote from: moffy on May 03, 2019, 12:14:17 amRegen is only dangerous if you are operating the machine at a speed that produces a BEMF higher than the battery voltage. In a nissan leaf for example I think its ~120kmh.Below that rpm, you won't have an uncontrolled energy flow situation, since you can clearly define the maximum regen current limit and the act of regen requires a well coordinated firmware effort. Without PWM switching no current flows into the battery. (attached is the GUI to set this)If you are above said rpm, you better be prepared for some fireworks, because in a fault situation the motor will dump an uncontrolled amount of energy into the battery. If the powerstage and battery can handle that current, and the vehicle and passengers can handle the huge deceleration, no worries! At least the battery will clamp the voltages on the system to safe levels until speed decreases to BEMF=Vbatt.If not, you have to embrace the possibility of blowing the battery fuse or tripping the main contactor... now you exchange uncontrolled currents for uncontrolled voltages and the IGBTs will have to endure whatever BEMF voltage the motor generates. If your BEMF at 100kmh is 400V, then your BEMF at 200kmh could be 800V. You will *really* hope the designer chose at least a 900V IGBT. If he chose a 650V device you will have instant, regretful fire.The BEMF comes from the magnets, thats why Tesla can use 650V IGBTs, an undriven ACIM motor won't produce any BEMF, even if its spins at a bazillion rpm. And when they switched to permanent magnet motors, they now needed an extra voltage buffer: enter wide bandgap SiC mosfets. Beside havin less switching losses, they can easily achieve 900V rating, so the introduction of PM motors and SiC drives are tightly coupled.

author: marcos_
author_rank: Contributor
timestamp: May 05, 2019, 02:59:12 pm
content: This week we added Field Weakening and MTPA support to the vesc firmware and GUI in our github repo.Here is a writeup about that:https://hackaday.io/project/164932-axiom-100kw-motor-controller/log/162931-field-weakening-supportFW has been probably the most requested feature of the vesc platform for years, as it allows to operate the machine in the constant power region.It was just simply not possible to go beyond the constant torque region, as torque would drop to zero.Not every motor has a flat constant power region, but a good automotive motor will.

author: Yansi
author_rank: Super Contributor
timestamp: May 05, 2019, 03:43:09 pm
content: Quote from: langwadt on April 30, 2019, 12:43:56 amNow go and tell that to those stupid formula student germany (FSG) rules makers.

author: marcos_
author_rank: Contributor
timestamp: May 05, 2019, 04:21:13 pm
content: Quote from: Yansi on May 05, 2019, 03:43:09 pmMay I ask what's the problem?

author: Yansi
author_rank: Super Contributor
timestamp: May 05, 2019, 07:58:48 pm
content: Nothing personal, of course if you thought it was! Just ranting around, as I was involved in formula student for some years and last years changes in rules were downright under-thought. One of them is to forbid any PLDs as devices handling safety related things.

author: ejeffrey
author_rank: Super Contributor
timestamp: May 05, 2019, 09:05:09 pm
content: The problem with putting safety interlocks or other features on an fpga is that it is too easy for them to be accidentally removed during synthesis. It isn't really a problem in a production / product environment but can be a danger in a development environment like a student project

author: marcos_
author_rank: Contributor
timestamp: May 05, 2019, 10:50:31 pm
content: Quote from: ejeffrey on May 05, 2019, 09:05:09 pm+1. No one wants to be responsible of a student injury, especially if its avoidable with a simple rule.

author: Yansi
author_rank: Super Contributor
timestamp: May 06, 2019, 07:38:15 am
content: Synthesis will not remove anything, there is a post synthesis simulation of the design and real HW tests after anyway. So this comment is I think pointless.I would not like to go into details in this thread, but it is not only about "real safety", but also repression of custom built HW, which in direct manner is a violation of it being an engineering competition. What they want you is to just slap together bought off-the-shelf parts, which is what most of the teams do anyway, so why be bothered with others, sigh.To stay on topic, with the motor controllers: if I remember right what I have been told, you are required to FUSE every output of a custom built motor controller, unless there is a HW based over-current protection. So good luck designing a custom HW for I2t protection circuit, or good luck with finding space and cooling air to install for example 12 fuses for a quad motor controller. (Of course, off the shelf motor controller does not require the fuses).So where's the safety in this one? If a team can spin four motors using custom built HW and SW, they likely know ho to code a I2t integrator. The protection can also be set wrong both on the off-the-shelf one and on the custom built one. So fusing is just solving half the problem and forcing some to be disadvantaged.

author: slloyd
author_rank: Contributor
timestamp: May 07, 2019, 01:41:13 am
content: on subject of fault protection, Axiom controller has multiple levels of protection when it comes to current monitoring. for current there is slow moving average, I2t so to speak to watch for overload conditions and throttle back power. it takes feedback from heatsink temperature measurement as well. user configurable. this is in the works. what is already coded and ready for use is software has a threshold for phase current which will limit power or trip depending on the threshold and then hardware protection for fault current which does not rely on software, it just shuts down the gating. threshold for hardware protection is rather high because its meant to protect against short-circuits, not overloads, here i'm talking about phase current out to the motor.there's actually a 4th protection which is for short-circuit where two adjacent IGBTs turn ON at the same time for some reason and the DC link cap shorts to ground. this is fire inducing failure so we have a detect and shut-down in less than 10us and that's over the wide temperature range too. we've tested this a lot.. just shorting the output together during operation. starting up into a dead short. over and over. devices survive, no fire. also, we take into consideration when you have a shoot-through and the desat circuit kicks in to shut down the drive in <10us, there is .. after the immediate shut-down .. a very large voltage spike simply because of the very high current being suddenly extinguished and the parasitic inductance in the copper bussing that stored energy during the extreme amps. the voltage spike after is something designers might forget about; thankfully Axiom didn't.actually, there's a 5th level of protection too now that i'm thinking about it. Axiom monitors for circulating currents and adjusts the operation to compensate and take more action if needed.

author: slloyd
author_rank: Contributor
timestamp: May 07, 2019, 01:45:31 am
content: i should also mention that Axiom is for power levels beyond your typical quad copter. 100kW... that sort of system will have its own pyro fuse, but its external to Axiom control board.

author: marcos_
author_rank: Contributor
timestamp: May 16, 2019, 02:18:09 am
content: We are ready to release the Axiom datasheet!Next Monday all our subscribers will have access to the datasheet through our newsletter.To subscribe to the newsletter, sign up here!http://www.powerdesigns.ca/newsletter/It will be only available to the subscribers for quite a while until we let the file publicly available for download.Important announcements will happen there as well, so we hope to see you guys in the list.Cheers!

author: marcos_
author_rank: Contributor
timestamp: June 17, 2019, 11:39:56 pm
content: Axiom finished on top of the hackaday prize bootlstrap leaderboard!There are some interesting updates in the project page, and more to come!https://hackaday.io/project/164932/logs?sort=newestCheers