3 ms·
I love stuff like this as it brings a smile to my face. Reminds me of the time I was writing ESP/ESC software for car ECUs back in the days before Simulink mod
by ChuckNorris89 6y ago
I love stuff like this as it brings a smile to my face.
Reminds me of the time I was writing ESP/ESC software for car ECUs back in the days before Simulink models and automatic code generation where we had the vehicle dynamics books with all the physics of the car, and had to convert the math functions from continuous to discrete, then implement them in fixed point C, along with trigonometric functions (the CPU had no HW SIN/COS), optimized enough to run 100 times/second on a 16bit chip while keeping CPU load under 85%.
Test drivers were in awe and thought it's voodoo. No, it's just basic math implemented in C, similar to what Carmack was doing for the Doom/Quake 3D engines ;)
- mberning 6y agoI have always been curious how some of these ECUs worked behind the scenes. I know many times when they were reverse engineered by tuners the major tables such as ignition advance, fueling, mass air flow, etc. would be identified and that would be enough to allow some tuning of the car. But there were always many tables with a mysterious purpose, such as tau adjustments, which were never fully understood. I also wondered how values were interpolated by the ECU considering most things are table based. The tables might have 500 rpm, 1000rpm, etc cells with timing values, but when you log the ECU you do not see big jumps in timing at those cutoff points.
- ChuckNorris89 6y ago> The tables might have 500 rpm, 1000rpm, etc cells with timing values, but when you log the ECU you do not see big jumps in timing at those cutoff points. Because in the old days you had little memory to work with, 32kb for PROGRAM(Flash) and 2kb for DATA(RAM), so you'd store a few points in your table and use a linear interpolation function for the rest. Now, because silicon is cheap, even the chip controlling your headlights has 1MB of PROGRAM memory or more and could run DOOM but instead of fancy algos it's used to store all AutoSar libraries it needs for networking and certification.
- _vn5r 6y agoI’m planning to build a transmission control module for my car. Can I please reach out with a couple of questions?