Yes, induction machines do draw power in order to establish a magnetic field where as PM machines get it for "free" by virtue of the magnets. Also the torque production at zero speed is almost identical in induction machines vs. PM machines, so this isn't an issue.
For EV applications one of the cool things about induction machines is that they can actually achieve higher efficiency at high speeds than a PM machine. This is because at high speeds the spinning magnets in a PM machine induce losses (so called eddy-current and hysteresis losses) which are difficult to suppress. In an induction machine you are controlling the field directly so it can be weakened at higher speeds with a control loop to directly optimize the losses vs. torque production. This means that there is a trade-off speed at which an induction machine becomes more efficient than a comparable PM machine.
To mitigate this issue in PMs some vehicle manufacturers have tried to do cool tricks like partially demagnetizing the magnets at high speeds to reduce losses, but this is very difficult to do without damaging the magnets permanently.
Motor size is approximately proportional to torque, not power, so you can imagine a small, low torque induction machine that is fast and will have better efficiencies than a corresponding PM machine. In stop and go traffic or low speed travel the PM machine typically has better efficiencies.
Personally I hope in the long run we end up with induction machines in our electric cars. 1) No safety issues with spinning magnets at high speed during an inverter failure, 2) no reliance on rare-earth materials, 3) the control of induction machines is very cool in its complexity and gives an additional degree of freedom on field flux that is only partially controllable in PM machines, and 4) induction machines have longer lifetimes as there is practically nothing to wear out aside from the bearings.
You are incorrect. Induction machines are often used as generators. My employer uses them almost exclusively in the generator configuration. The Lorentz force is symmetric; in the generator mode of operation the magnetizing flux vector leads the torque-producing current vector instead of lags, but the physics still works the same.
The induction torque speed curve is also very performant even when compared to PM machines so I don’t understand your criticism. Source: motor control engineer.
Fair point about the quality of the current measurement. I probably take that for granted because I usually don't have to hit low cost targets! But that being said, a flux observer is inherently doing some kind of integration which tends to add a filtering effect. So noisy current sensors may still give you OK results, especially if comparing FOC with noisy sensors vs DB-DTFC with noisy sensors.
Ha, I am the same way with feedforward terms. No rest until the integrators don't budge under the largest command steps!
I will have to keep your site bookmarked. It is rare to see a high quality motor controller in this space. Most others I have seen are pretty underwhelming, so kudos on the cool project!
The high freq signal has to be lower than the switching frequency - otherwise you end up with harmonic interference from the PWM like you mentioned. For high performance servo control in the 5-200kW range with switching frequencies up to 20kHz I typically see high frequency injection in the 1-4kHz range. This is high enough to produce negligible torque ripple and minimal estimation error, but low enough to be synthesizable without an ultra high PWM frequency. Of course for smaller systems switching at 100s of kHz or even MHz a higher high frequency signal could be injected.
I suspect that this type of sensorless strategy will become more popular with the rise of GaN and SiC devices, but it is currently implemented with good results today using only standard Si IGBTs and MOSFETs.
It is not easy per-se, and yes it is used in many dissertations, but most of the limitations up to now have been more related to the performance required to implement a demodulator that runs at high enough frequencies in a low cost microcontroller or FPGA. This is becoming less of a problem with more powerful chips. I don't know if I'd call it a mainstream technique, but it is widely used in high performance IPM motor drives for servo applications.
I think this technique isn't commonly used in lower performance applications because it is an additional cost both in performance (need a more powerful processor) and complexity.
The big problem with high freq injection is that it requires some kind of saliency on the rotor, which means this only works for interior permanent magnet machines and not induction or surface PM machines unless they are specially constructed. I guess I don't know enough about hobby brushless DC machines to know if they are IPM or SPM, but my guess was IPM because they can be cheaper to build for high speed designs and I know hobby BLDCs can spin at 10s of thousands of rpm. Perhaps someone with more hobbyist know-how can chime in.
For this application (robotics) I think the other typical problems with high freq injection are negligible. For example you need a well-defined switching frequency that stays out of the way of your high frequency carrier. Many inverters pull back on switching frequency at high loads in order to lower switching losses, but if you lower the switching frequency too much you won't have enough voltage bandwidth to synthesize the high frequency carrier required for the self-sensing algorithm. I don't think this would be a big deal for robotics applications.
The power electronics are built using MOSFET half-bridges, which naturally support the ability to flow current in either direction. This allows current to flow from battery to motor or from motor to battery (regeneration).
In regeneration the motor is actively slowing down the speed (creating negative torque) by pushing energy into the battery. This is achieved in software by regulating a "negative" current, which causes the inverter to produce a voltage that is lower on average than the back EMF generated by the motor. Because the motor is effectively at a higher voltage than the inverter in this condition, current will flow from high voltage to low voltage and therefore flows back through the MOSFETs (and MOSFET body diodes) into the battery.
This is a bit of an over-simplification as brushless DC motors are actually excited by an AC waveform so the current is constantly reversing each half cycle, but the principle remains the same.
Very impressive! I love to see this kind of thing on HN. I scanned through your code a bit on mobile, and here are a few quick suggestions:
1) It looks like you are using field oriented control. This is used 99% of the time in industry, but if you really want high torque bandwidth you should check out alternate control techniques. My favorite is an up-and-coming algo developed at UW-Madison called Deadbeat Direct Torque and Flux Control (DB-DTFC when searching for papers). It uses an inverse motor model paired with rotor/stator flux estimators to produce a deadbeat (one timestep later) torque and flux response. I have heard apocryphal stories of people who implement DB-DTFC accidentally snapping motor shafts when they forget to limit the torque slew rate. It is a very high performance algorithm, and beats FOC and DTC hands down at the cost of a bit more complexity.
2) If you are sticking with FOC for now, you can make a few quick improvements that will help a lot. First add qd-axis decoupling on you current loop commands (may have missed them, but I didn't see them in your code). You will want reference frame speed ("omega") decoupling multiplied by current and the transient inductance of the machine, which undoes a lot of the cross coupling that causes issues at high speeds or fast changes in torque. Flux decoupling will help with integrator wind-up, and stator resistance decoupling also helps lessen integrator wind-up at low speeds.
3) Have you considered implementing a sensorless algorithm? It can be done with both FOC or DB-DTFC, although there are some constraints on changing your switching frequency on the fly. If you have a fixed switching frequency a common technique is to superimpose a high frequency carrier on top of your voltage commands and then demodulate the high frequency response in the currents. Since a BLDC has salient poles on the rotor, this technique lets you estimate speed even down to zero! Then you wouldn't need encoder/resolver feedback which would be especially nice for robotics projects.
4) If you really want to get all of the current out of those FETs check out discontinuous PWM strategies. This are especially helpful at low speeds when your applied voltage is low, and can lower your switching losses enough to give you an extra ~40% current rating.
Great work overall. The hardware looks really clean and well designed, and it is easy to tell you put a lot of thought and effort into the site and this project.
[spoilers] The first time I read Permutation City I really enjoyed the reveal that Paul was originally a simulation (many times over) that only existed in the "real" world because the entire universe spontaneously came into being in order to maintain a simpler reality than the alternative in which his simulation suddenly stopped existing. Almost as if complexity itself has some kind of inertia. If that was obvious to you the first time around, kudos!
I also really enjoyed the commentary on solipsism in the context of transhumanism via the 'Peer' character.
Although part 2 doesn't explicitly explain why the universe of PC has the "complexity momentum" property, it does suggest the universe with the lowest Kolmogorov complexity is preferred (via some undescribed physical law). That is why the "ant's" universe wins; it's relative complexity is simpler than the world which Paul had created. I agree that it could have been fleshed out more fully.
Expansiveness in that Three Body Triology takes place over a large period of time (billions of years), and the fact that it takes place over such a large space (Earth, Trisolaris, outer planets, etc). The ideas were similarly expansive, especially the dark forest philosophy and its implications. That being said, there were several places where I found myself bored and waiting for something to happen. Even so it was an enjoyable read overall.
Permutation City is one of my favorites. When you say "slow and boring", I say "subtle build" to the final realization of what Paul has done and how his realization has proved the "dust" theory.
Really like Schild's Ladder too, and Distress is pretty good but not my favorite.
I agree with you on Orthogonal for the most part. Although I was very disappointed in the ending - it seemed too abrupt and predictable given the rest of the story.
Robert Zubrin has discussed the "moon first" strategy, and has made the interesting observation that many of the pro arguments come from entrenched space industries looking to make a buck on existing hardware. The argument being "we already build parts to go to the moon, so let's just do that."
Personally I would love to see both outcomes. But given a limited budget, going to Mars has the advantage of providing a (admittedly risky and uncertain) possibility of extending the survival of the human race, where as going back to the moon seems to provide more indirect benefits.
Different strokes I guess. I really enjoyed the Three Body Problem trilogy due its expansiveness both in time and in space, and its focus on ideas rather than (solely on) characters.
Then again one of my favorites hard SF authors is Greg Egan, and I've heard many times that people find his work dull (which blows my mind - Egan writes some of the most thought provoking, interesting SF by FAR).
There has been some good discussion on Reddit about how the thrust results shown in the paper are still most likely measurement errors due to thermal effects. It is a shame that they haven't released their actual data for independent analysis.
With respect, the idea that most parents could fix the system if they just tried is incredibly naive. I think most parents do the best that they can. If they feel that homeschooling is better for their children then they absolutely should pursue that option.
The big problem in my mind is that Python is the wrong tool for the job. It is 2016, there are more hard-RTOS prototyping platforms than ever before. My favorite is National Instrument's RIO platform, which lets you use C or LabVIEW (imho the best language for prototyping control algorithms by far). Mathworks also has a platform based on Matlab/Simulink, and the list goes on.
Why use Python when there are existing tools that are made for this type of application?
I have a guess: the limit in these designs isn't typically the motor, but instead the power semiconductors in the inverter (the motor has a much longer thermal time constant than the power devices). Therefore the limit is the junction temperature of the power devices. Most high performance drives have some kind of junction temperature estimation algorithm (it is difficult or impossible to put a sensor right at the junction without changing the electrical properties of the semiconductor). When the estimated temperature gets too high, they will start pulling back the current to protect the power devices from overheating. The more accurate the model, the closer they can push the devices to the limit without failure.
I'd bet they have been slowly improving their junction temp. estimation model and are now able to push the power semiconductors a little bit closer to their temperature limit, allowing them to produce more current (or the same current for a longer duration) before pulling back.
As pointed out in other comments Tesla actually uses AC induction machines (asynchronous AC) instead of brushless machines (synchronous AC). To a first approximation an AC induction machine can produce constant torque up to a fixed speed. Above this speed the torque falls off as approximately 1/speed.
You are right about the startup torque. AC induction machines can produce full breakdown torque at zero speed, but this does require high current (but luckily not high power because the applied voltage is still low due to low motor speed).
Another limit is the junction temperature of the power semiconductors in the inverter(s). I think Tesla uses liquid cooled inverters, but this typically means there isn't much mass to act as a heatsink (relying on the liquid coolant instead), so overload times are typically very short. I'd would guess this is actually the limit in their design. In other words they can put very high currents into the motor for a long period of time before it thermally overheats, but way before that time they have to reduce the current in order to protect the power semiconductors in the inverter.
Except it isn't just the spread of misinformation. Even more important (IMHO) is the insulating effect of showing people only like-minded opinions, effectively trapping everyone in a bubble. I can't think of any way Facebook can solve this problem without drastically decreasing their reliance on ad revenue. What are they going to do, force people to view opinions they disagree with?
"...until you can come to a consensus that's acceptable to everyone."
In my (admittedly anecdotal) experience, democracy rarely seeems to come to any consensus that is acceptable to everyone, but rather serves as little more than a moral battering ram that the 51% can use to impose their will on the 49%. Perhaps one day people will realize that democracy, given its cultish appeals (e.g. "but don't you know other systems are worse!?") is simply barbaric.
Maybe technology will render nation-states obsolete within my lifetime. I can only hope.
For EV applications one of the cool things about induction machines is that they can actually achieve higher efficiency at high speeds than a PM machine. This is because at high speeds the spinning magnets in a PM machine induce losses (so called eddy-current and hysteresis losses) which are difficult to suppress. In an induction machine you are controlling the field directly so it can be weakened at higher speeds with a control loop to directly optimize the losses vs. torque production. This means that there is a trade-off speed at which an induction machine becomes more efficient than a comparable PM machine.
To mitigate this issue in PMs some vehicle manufacturers have tried to do cool tricks like partially demagnetizing the magnets at high speeds to reduce losses, but this is very difficult to do without damaging the magnets permanently.
Motor size is approximately proportional to torque, not power, so you can imagine a small, low torque induction machine that is fast and will have better efficiencies than a corresponding PM machine. In stop and go traffic or low speed travel the PM machine typically has better efficiencies.
Personally I hope in the long run we end up with induction machines in our electric cars. 1) No safety issues with spinning magnets at high speed during an inverter failure, 2) no reliance on rare-earth materials, 3) the control of induction machines is very cool in its complexity and gives an additional degree of freedom on field flux that is only partially controllable in PM machines, and 4) induction machines have longer lifetimes as there is practically nothing to wear out aside from the bearings.