When you click on links to various merchants on this site and make a purchase, this can result in this site earning a commission. Affiliate programs and affiliations include, but are not limited to, the eBay Partner Network.
I'm honestly a bit surprised that after all this well done DIY / fab work you've done on the car thus far that an exhaust is 'out of scope' for you to also put together.
I am super picky and have an issue with trusting shops in general when things get very customized like this... your experience reinforces that feeling haha
Get us a sound clip. Single 2.5" exhaust is laughable, I run a 2.25 on my stock bp4w. Glad you got them to fix it. Hope the work was ok after all, other than being too loud. If you picked the muffler that's probably not their fault.
Right? Like who sees a highly modified car with dual 2.5" headers and thinks that a single 2.5" is a good idea. To their credit they did fix it, but still. I did pick the muffler the first time, the second time I wasn't given the choice.
Originally Posted by Z_WAAAAAZ
Damn yeah that's pretty agitating re: the shop's arbitrary decision on diameter. Super wild that they'd see your car roll in with some extensive fabrication work and think they could slip one past you. But if it really was an honest mistake, I'm not sure what's better or worse lol.
Regardless, I'm in for a sound clip either way. Putting the volume aside, how's the tone? Aggressive V6 exhaust notes are polarizing for me. I've heard plenty of sick ones but unfortunately the straight piped V6 Mustang guys have left a lasting bad impression on me
It sounds better than I was expecting, here's a video:
I need to get a better video of how it sounds on the road but it's sort of a handful at WOT on old, 205 wide tires. Need someone else to hold the camera . When researching exhausts I saw a lot of what I'd describe as V6 Camaro Behavior, like this gem. Jump to 9:34:
I also found the sound I was looking for, Corsa makes an exhaust for the V6 Camaro. It sounds great but it's like $2k and it would have to be immediately chopped up to fit. They don't sell those mufflers, unfortunately, just some generic ones for V8's. I'd love to find a used one and retrofit it but my guess is those odds are pretty slim.
I'm honestly a bit surprised that after all this well done DIY / fab work you've done on the car thus far that an exhaust is 'out of scope' for you to also put together.
I am super picky and have an issue with trusting shops in general when things get very customized like this... your experience reinforces that feeling haha
It's not that I couldn't build it, I just didn't want to. I had a functional 300hp Miata in my garage and I wanted to drive it . That, and it would have been a pain without a lift. I've certainly learned my lesson about trusting others to build what I want, though.
I should have probably calmed down a little before I wrote that last post. The situation isn't as bad as I made it out to be, I didn't sleep well the night before and I think my expectations were a little too high for a car that I'd replaced the entire drivetrain in. I should have expected more issues. Anyways, it's been a busy week - first order of business was fixing the leaks, starting with the driver's valve cover gasket that was pouring out oil. When I installed it the first time I had a hard time keeping it in place, it's supposed to wedge into the valve cover but it kept falling out during install. After some googling I retained the new gasket with Vaseline and the install went much smoother.
The second leak was the heater core AN fitting between the engine and bulkhead connector... or at least I thought it was. I tightened that fitting but kept seeing nontrivial amounts of coolant in that area. I also noticed a coolant smell when I would go WOT for a few seconds at a time, like on the highway. Then it hit me, I already knew what was happening
Originally Posted by Padlock
This is just me raising a flag based on experience, but at glance based on the photos, the overflow looks like it's probably sized a little on the small side for the cooling system volume you may have with that engine and large capacity radiator.
I'd filled both the header tank as well as the overflow to the brim. I'm pretty sure when the average temperature of all of the coolant (like during longer pulls) went up a few degrees it was enough to push coolant from the header tank to the overflow... which was already completely full, and then just puked out into the engine bay. If only I'd been warned 🙄.
Next up was the shifter. The trans would barely go into reverse (all the way to the left and up) but shifted into the other gears fine. I just assumed something in the trans was bent since it was a junkyard unit, but then I remembered it shifted fine out of the car. Upon further inspection the MGW shifter was limiting the left-right movement of the shifter, not the trans. When I unbolted the MGW from the chassis the trans went into reverse fine, confirming my suspicion. The right way to fix this is to put a few degrees of twist into the shift linkage, but since I wanted to drive the car I just put a few washers under the right side of the shifter base for now. Shifts great into all gears now.
I initially thought the AC system was leaking because it's doing basically no cooling, but upon further inspection the compressor is turning on, meaning there's at least some refrigerant in the system. I only put half a can of refrigerant in the system because... well, I was in a rush, so I'm not super surprised it's not doing much. I poked around with a UV flashlight and there aren't any obvious leaks. More to come on this one. And I still need to write up how I made the lines.
With the mechanical issues mostly resolved I turned to the ECU. Turns out I misunderstood what one of the CAN messages was saying - the ECU doesn't transmit if the CEL (MIL in GM terms) is actually on - I thought it did and that the MIL was off. I wrote a python script to read (via OBD2 requests) if the MIL was on - yup, and the ECU had 3 codes. Reading the codes out turns out to be much harder than requesting individual measurements, though, so I gave up on that. I'd ordered the HP Tuners dongle the previous week so I'd just use that when it arrived. The engine wasn't running quote right and it sounded like I had a vacuum leak under the passenger side of the intake manifold. A mechanic buddy was nice enough to help me out Wednesday before work with his smoke machine - nope, zero vacuum leaks. So at least I could rule that out.
The HPT dongle arrived Wednesday evening and I had 3 codes: P0315 (crank relearn not performed), P067B (internal knock sensor circuit performance), and P16A1 (throttle body something or other). I was expecting the first code since the Keisler ECU cam with a sticker saying that would happen. The second was a bit of a mystery, and the third made sense because I'd forgotten to plug in the throttle body after I changed the valve cover. Cleared the codes, ran the crank relearn and... what do you know, the car ran a lot better. I'd violated the first rule of troubleshooting which is "fix the thing you know is broken first", IE the code I knew I was going to have. I'm still getting the knock sensor code so I ordered a new one, I'll put that in this weekend.
I'm sure sure what everyone cares about is what it's like to drive, though. It's... fast. Like faster than I was expecting. I'm on factory wheels (with old summer tires) but it'll spin the tires if I roll into the throttle in second. First is just a burnout gear. Third hooks up but I need to plan ahead, I end up "over there" a lot faster than I'm used to. Which isn't saying much since my daily is a stock 98 Integra, but it's new to me. Brake pedal is rock solid and the steering feels like stock, both of which are what I was shooting for. The exhaust isn't terribly loud if all I was doing was track driving, but cruising on the highway it's pretty annoying, so that'll need to get fixed. The throttle response is ...not great. I'm hoping once I fix the knock sensor code it'll get better, service manual says the ECU pulls spark when that code is active so hopefully that's it. Right now if I floor it there's like a quarter second delay before anything happens, which is very different from the cable throttle cars I'm used to.
At the end of the day though this thing is awesome. It's so good. I can't wait to bring it somewhere where I can really drive it. I'd like to do an autocross or two before I bring it to the track, although I'm not sure if I'll need a roll bar for autox. Either way if you've made it this far... enjoy some photos from this week. It's been a good week.
(I fixed the cable routing in this photo) already)
There's still a bunch of little things to fix on the car but the most pressing issues were fixing the knock sensor code, modifying the shift linkage, and quieting down the exhaust. I was able to tackle the first two over the weekend and I've got an idea for the third.
Like I mentioned in my previous post I still had a MIL due to a P06B7 code, knock sensor 2 internal circuit performance. I initially took the code at face value and assumed there was something wrong with the ECU but wanted to rule out the sensor and wiring before going down that road. A new (GM) sensor was ordered and installed. The code kept coming back even after I cleared it so I proceeded to disconnect the battery and head to the factory service manual (on charm.li). Turns out the built in test only runs while the engine is running, but while I had it apart I also beeped out the wiring (which was fine). Put everything back together, started it up, and voila, no more code! Turns out the bad sensor was actually the one I'd already replaced so it must have been DOA. Easy and cheap fix though and after a few hours of driving the code hasn't reappeared.
The FSM said that when P06B7 was active the ECU would pull spark to protect the engine so I was curious if it would improve throttle response. Short answer… yes. The throttle response still isn't quite cable-throttle-like but it's improved from when the code was set and vastly better than a week ago. I'll probably mess with the tune at some point to see if I can improve further but for now it's good enough. It's only really noticeable when blipping the throttle to rev match and if you slam the throttle to the floor.
Second annoyance was the shifter - I'd shimmed under the right side to get the trans to go in reverse (all the way to the left and up). This was effective but also annoying since it let sound and hot air into the cabin. You may recall the shift rod was also too long so the shifter was canted forwards. I killed two birds with one stone by cutting and welding up V8R shift linkage I'd bought
I ended up taking about 10mm out of the length and added 2.5° of twist to the left - I'd added about 1° with the washers, then added a little just in case things moved during welding. This was all fairly straightforward using my fixture table, definitely glad I built it. Something like this would have been a pain without it.
The twist is barely visible in the finished part but it makes all the difference in being able to get into reverse. I was a little worried about replacing a solid part with one I'd chamfered and welded so I filled the chamfer and then added some more metal on top. This is basically equivalent to a 1", 0.100" wall square tube made of soft aluminum which at face value seems sufficient. Also, thick aluminum is SO much easier to weld than the thin stuff I started with.
The shifter now sits roughly vertical and there's no issue getting it into reverse. Plus with the washers gone it's a little quieter (and cooler).
The last issue needing attention ASAP is the exhaust. With the top down it's actually perfect, but with the top up there's a really loud resonance (drone) at 2.2kRPM which is super annoying. After doing some reading I think the resonator the shop installed is just too small - the muffler (Flowmaster 50) is reflecting the sound back but the resonator is too small to absorb much. First step will be to install a vibrant ultra quiet resonator since people seem to have good luck with those, which should also help with the rasp I get between 3 -5kRPM. If that doesn't kill the drone I'll add a Helmholtz resonator centered around 2.2kRPM. Between those two fixes I think it'll get the volume where I want it.
Nice dude, glad to hear the knock code was just a bad sensor. I've monitored PIDs on a couple of our cars at the dealership that had knock sensor wiring chewed by rodents and the ECU pulls A LOT of timing as soon as that signal's gone.
Stoked to hear the exhaust once you get the resonator situation sorted too. I ran a Helmholtz chamber GoodWin midpipe in my NC up until I turbo'd it, and it was way less drone-y at freeway speeds than my buddies' NCs with traditional aftermarket exhausts. Well worth the four pounds it added lol.
I've been driving the car around to shake out any bugs and so far nothing alarming - I've got what sounds like a 1/rev click coming from the driveshaft area and the engine's running better, but not quite what I'd call 100%. I pulled the Keisler tune and started poking around in HP tuners and… well, it's obvious why the throttle response sucks. Before we get to that I'd like to explain (mostly to my future self) how the ECU works. Full disclaimer - everything I've learned has been either from YouTube videos or AI… mostly AI with some sanity checking. Google's AI has been trained on a bunch of material that's behind a paywall for me so it's been giving surprisingly good advice. Everything it's said has passed the sniff test, but with that being said feel free to correct me if I get something wrong or if you have experience with this sort of stuff.
Unlike older ECUs the Gen V GM stuff does not just use a few lookup tables for fuel and spark. Fundamentally, the ECU is designed to respond to what the driver wants the vehicle to do, not just the engine. This article does a good job of explaining it in more detail but the short version is when you press the accelerator you're requesting a torque value from the engine, not a throttle body opening percentage. The ECU can decide to open the throttle, advance the timing, change cam phasing, or add more fuel to meeting this torque request.
It's probably obvious that getting this complex system to do what you want isn't entirely intuitive, or at least it wasn't to me. The first step in tuning is to make sure the ECU knows how much air is entering the engine since that drives most of the other calculations. For the LFX it does this using both a MAF and MAP sensors.
The MAF directly measures the airspeed in the intake, and using a calibration curve, provides an accurate estimation of the air mass flow rate. This is great - it's a direct measurement of the parameter the ECU cares about. The drawback is that it's not great at transients and often lags behind what's actually happening.
This is where the MAP sensor comes in. Since it's reading pressure it can respond to fast changes in the intake manifold, but the downside is that it relies on a model (typically a volumetric efficiency, VE lookup table) to estimate the airmass entering the cylinder.
GM blends these two approaches using a model called "dynamic airflow". Below the disable RPM it blends MAP and MAF using some algorithm (my guess is some sort of Kalman filter). At some point VE model evaluation time becomes significant compared to engine speed, so above the disable RPM the ECU primarily relies on the MAF. For the engine to run right, then, both the MAP (VE tables) and MAF sensor need to be calibrated correctly.
Tuning the MAF is relatively straightforward - it outputs a frequency proportional to velocity and the ECU has a lookup table to turn that into a mass flow rate (and therefore cylinder airmass). Tuning the VE tables (GM calls them virtual VE tables) are …painful since they're not defined by a lookup table but rather a curve fit function with tunable coefficients. This function takes RPM and MAP (speed density) and estimates cylinder airmass. I think HP Tuners has a way tool to make tuning the VE equations easier but I haven't worked with that yet.
I downloaded the Keisler tune from the ECU but I needed something to compare it to. HP Tuners has a tune repository so I grabbed a tune from a stock 2012 Camaro (automatic, since that's all they had). There were a bunch of differences but these stood out to me:
Dynamic airflow was always disabled (disabled at 500 RPM), forcing the ECU to always use the MAF
MAF is reading more airflow than engine is actually getting
VVE tables are unchanged
Virtual torque tables have been modified from stock, increasing by roughly 30% at high load
Power enrich is enabled at much lower RPM and load
Driver demand tables have been increased at the high end
Dynamic airflow being disabled certainly explains why the transient response sucked - the engine was going lean on tip-in, then the MAF would catch up and AFRs would normalize. The second issue was the MAF was over-reporting airflow, causing all of the long term fuel trims (LTFTs) to be ~-14%:
The air over-estimation is probably just an artifact of my intake tube size being smaller (3"). This sounds like a good thing - start by over-fueling, then let the ECU pull back - but there's an important detail this overlooks. The long term fuel trims (LTFTs) ALSO apply during WOT, meaning it's also pulling fuel when you want it the most! The crux of this is how ECU calculates fueling - The fuel calculated by over-measuring 14% more air should, but is not guaranteed to equate to 14% more fuel, but the LTFT WILL cut 14% fuel. The bottom line is the ECU should know how much air is entering the engine and faking it out probably isn't a great idea.
The right way to dial the MAF in is to use a wideband… which I don't have. A quick workaround is to scale the whole MAF curve (frequency -> airmass) until the LTFTs are dialed in, which is what I did. I linked a couple good resources on how to do so at the end, it's not particularly difficult, just takes a few iterations. An important note: LTFTs aren't learned at WOT (only learned in closed loop), those are just the trims being applied at WOT. I ended up with the following LTFTs (tune v7):
Interestingly, the LTFTs for bank 1 (passenger) and 2 (driver) are not the same - bank 1 is leaner by a few percent. Not sure if this is real or just an artifact of O2 sensor accuracy, but either way I'm calling anything ±5% good enough.
With the MAF dialed in I verified the virtual volumetric efficiency (VVE) table was correct by failing out the MAF and looking at LTFTs, all of which looked good
With both airflow measurements looking good I enabled dynamic airflow and… it drives a lot better. There's still a little delay in the pedal but previously I could hear the throttle open, then the engine would start making power. That delay is now gone and I can actually rev-match on downshifts.
I then started looking at knock, which can be measured in two ways: directly by looking at the knock retard (KR) which how much timing the ECU pulls immediately (and decays quickly), or the knock learn factor (KLF), a learned parameter the ECU uses to permanently pull timing. Spark advance is calculated as [high octane table]*(1-KLF) + [low octane table]*KLF. To my surprise I was seeing some KLF and KR at all loads (v7_log4):
KLF (averaged over the whole log, 0 to 1):
KR (averaged over the whole log, degrees of timing):
I think KLF is more relevant here since it integrates as I drive, whereas KR decays quickly and is just the average over the whole log. I think there are two things going on here:
The knock sensors are set fairly sensitive from the factory and are picking up mechanical noise between 2400 and 4800 RPM. There's no way I'm getting knock at idle manifold pressures (20kPa, 3psia)
There is some correlation between KLF and load, so that either means that:
There is actual knock
The added engine load makes the mechanical noise louder, causing more false KLF
This ECU allows me to log KLF per cylinder which is pretty telling, This is cylinder 1 (front passenger) and cylinder 6 (rear passenger, v7_log4)
This trend seems fishy to me, it's only in one cylinder and it's pretty strongly related to RPM, not just load. In an effort to try and distinguish if this is real or not I pulled 10° from the whole high octane map and logged some data. It tells a similar story (v8_log2). There's a lot less KR in this log so I'm displaying the max values to illustrate the trend:
With 10° of timing pulled the car definitely had a lot less power and I could smell the exhaust getting hotter, but it should entirely eliminate any possibility of knock. What this tells me, then, is that I'm picking up some sort of mechanical noise primarily on the passenger side bank (1,3,5) and that it gets louder with more engine torque. It's a little strange the frequency shifted down but this is pretty unlikely to be real knock. I should note that this dataset does not have any KLF, IE the duration was insufficient to start integrating.
I think I've convinced myself that the knock retard / KLF I'm reading is just noise and not real knock. I'm going to fix the cat heat shield rattle I've got and see if that clears it up, if not I'll just desensitize the cylinder 1 knock sensor from 3-4k and move on. The overall knock sensor limits are a little more sensitive than I need them to be but it's better than the alternative.
The next thing I'd like to look at how spark gets calculated - When I measure actual advance there's a weird hole in timing between 2k and 3.6 kRPM which is noticeable when driving. This hole doesn't exist in the high octane spark table so I'm guessing it's a consequence of the virtual torque tables being inflated (spoiler: I'm 99% sure it is). Now that I know I've got reasonable AFRs and the engine isn't knocking I can mess around with that as I have time. I also have a laundry list of other things I'd like to address (Lower rev limit to stock, disable clutch switch, put a wideband on it, enable flex fuel sensor, etc.) but one thing at a time.
Great read dude, it's nuts to me how many dimensions to fueling and spark there are on these newer ECU's. My car's fuel and spark calculations aren't nearly as intricate as yours, and I'm definitely not as talented in the tuning department. However, having done a lot of the same things with MAF tuning and high/low det tables, lots of details here were super interesting to me. Do you have any logs of WOT pulls where your ECU is pulling 14% of fuel, and if so, was AFR way off target? I found a few months ago that my ECU does something similar. At WOT, the ECU will sit in open loop, but over time it'll apply LTFT's (never STFT's) at WOT if AFR is far enough off target. The LTFT's are only minor, though. Maybe 2-3% tops, enough to change AFR by 0.1-0.3 if it's over half a point off.
As for MAF tuning, does the LFX setup not use widebands for the upstream O2's? I'd have guessed the OEM vehicles 100% came equipped with widebands given how elaborate the ECU calculations are.
Nice documentation on the commanded torque based tuning that most OE's are moving towards. It's a whole new world compared to basic speed:density stuff that most of us grew up on!
I got through reading most of your post, then hit this line and this is all I could think of:
Great read dude, it's nuts to me how many dimensions to fueling and spark there are on these newer ECU's. My car's fuel and spark calculations aren't nearly as intricate as yours, and I'm definitely not as talented in the tuning department. However, having done a lot of the same things with MAF tuning and high/low det tables, lots of details here were super interesting to me. Do you have any logs of WOT pulls where your ECU is pulling 14% of fuel, and if so, was AFR way off target? I found a few months ago that my ECU does something similar. At WOT, the ECU will sit in open loop, but over time it'll apply LTFT's (never STFT's) at WOT if AFR is far enough off target. The LTFT's are only minor, though. Maybe 2-3% tops, enough to change AFR by 0.1-0.3 if it's over half a point off.
As for MAF tuning, does the LFX setup not use widebands for the upstream O2's? I'd have guessed the OEM vehicles 100% came equipped with widebands given how elaborate the ECU calculations are.
LOL, I'd forgotten about that scene. I was hoping you'd chime in since I know you've been doing some tuning, this is my first time really diving into it. Unfortunately the upstream O2s are narrowband so I'm sort of blind at WOT. I'm relying on the fact the whole system is basically stock and just scaling the MAF up and down until the LTFTs are about right. I definitely need to get a wideband on there, though. I really like the Spartin with CAN output but they're out of stock for now. Any tips?
Originally Posted by Padlock
Nice documentation on the commanded torque based tuning that most OE's are moving towards. It's a whole new world compared to basic speed:density stuff that most of us grew up on!
Man, you're telling me. There are really only 4 outputs (spark timing, fuel pulse width, throttle opening, and cam angle) but the way the ECU arrives at the right answer is... complicated.
Yeah, complicated is right haha. Very cool that they've been able to develop a system smart enough to decide which output/combination of outputs is best suited to meet specific torque demand, though.
I don't know how much of my experience will be helpful, and again I'm definitely no pro, but I might be able to provide a bit of insight.
So FWIW, I've done almost all of my fueling tweaks with tables aside from the MAF scaling, except when it was totally necessary, I.E. when changing intake or engine size. Reason for this is that most of the output tables use MAF values (in the form of G/rev) on one axis, and changing MAF values will change my entire spark table outputs, VVT etc. A few examples here:
So I've basically scaled MAF only a handful of times: when swapping from the 2.0 to the 2.5L (multiplied the tables by 0.8 to fool the ECU into thinking it's still controlling a 2.0L, and keep all of the load readings about the same), then when sizing up to a 3" intake, then after installing the turbo because the resulting bends in the charge tubing caused MAF readings to drop 10-12% across the board. Every time, I've mainly looked to see if MAF readings at idle were the same after rescaling (generally 4.5-4.8 g/sec). After that, I used the load scaling table to dial in almost all of my fueling. The NC ECU basically only uses the MAP sensor as a PW modifier to compensate for dynamic pressure at the rail, so I scaled that up and have used it a couple times at the track to add or subtract fuel at a certain boost level to make quick changes across the board between sessions. I should probably level out that table and do some more load scaling adjustments, but the car's hitting its AFR targets and I've been busy with other things lol.
As for the wideband, yeah, the Spartan seems like the move for sure. Don't think I have any other tips there. I can't imagine trying to dial in WOT fueling values without that info in the datalogs, although I agree it's nice that your ECU probably has the bases covered since your setup is "stock". I gotta imagine that your intake has to have some effect on MAF readings vs the stock setup, though..?
I'm running an Innovate LC-1 as a standalone gauge only in my car. It works great but probably wouldn't be super effective to tune with because no datalogging, etc. I could wire it into my ECU and use it to replace the factory primary O2 sensor (which reads about a point lean when in boost), but I'm too busy with a bunch of other things on the car at all times lol.
crxguy52 Great info on tuning.I love it. Keep it coming. I am glad that someone is digging deeper into those ECU's on the DIY side. I did my own tuning on the turbo 1.8 Miata with the MS and have been trying to learn the GM Gen 5 ECU but it's quite different. I would love to understand more so I can tune my own car. (There are local tuners by me but I have trust issues LOL). Hit me up if you want details on how I hooked up the Flex Fuel sensor. I also have a turbo LFX E85 tune from Grif here that I can share (he has been sharing his tune with people) but not sure if that was for DI or after he switched to Port injection.
Yeah, complicated is right haha. Very cool that they've been able to develop a system smart enough to decide which output/combination of outputs is best suited to meet specific torque demand, though.
I don't know how much of my experience will be helpful, and again I'm definitely no pro, but I might be able to provide a bit of insight.
So FWIW, I've done almost all of my fueling tweaks with tables aside from the MAF scaling, except when it was totally necessary, I.E. when changing intake or engine size. Reason for this is that most of the output tables use MAF values (in the form of G/rev) on one axis, and changing MAF values will change my entire spark table outputs, VVT etc. A few examples here:
So I've basically scaled MAF only a handful of times: when swapping from the 2.0 to the 2.5L (multiplied the tables by 0.8 to fool the ECU into thinking it's still controlling a 2.0L, and keep all of the load readings about the same), then when sizing up to a 3" intake, then after installing the turbo because the resulting bends in the charge tubing caused MAF readings to drop 10-12% across the board. Every time, I've mainly looked to see if MAF readings at idle were the same after rescaling (generally 4.5-4.8 g/sec). After that, I used the load scaling table to dial in almost all of my fueling. The NC ECU basically only uses the MAP sensor as a PW modifier to compensate for dynamic pressure at the rail, so I scaled that up and have used it a couple times at the track to add or subtract fuel at a certain boost level to make quick changes across the board between sessions. I should probably level out that table and do some more load scaling adjustments, but the car's hitting its AFR targets and I've been busy with other things lol.
As for the wideband, yeah, the Spartan seems like the move for sure. Don't think I have any other tips there. I can't imagine trying to dial in WOT fueling values without that info in the datalogs, although I agree it's nice that your ECU probably has the bases covered since your setup is "stock". I gotta imagine that your intake has to have some effect on MAF readings vs the stock setup, though..?
I'm running an Innovate LC-1 as a standalone gauge only in my car. It works great but probably wouldn't be super effective to tune with because no datalogging, etc. I could wire it into my ECU and use it to replace the factory primary O2 sensor (which reads about a point lean when in boost), but I'm too busy with a bunch of other things on the car at all times lol.
Interesting, make sense on the MAF scaling, I don't think I should have to change it much. I definitely need to get a wideband on the car to tune WOT, I'm basically guessing right now and keeping an eye on the knock sensor. I'm pretty confident it's right at low RPM, I've just made the assumption that it follows the same trend up to high RPM. I added a little bit of buffer (reads high by about 5%) just in case but that's really a bandaid. Thanks for writing that up, definitely helpful to understand the process.
What I like about the Spartan is that it's got CAN output so I can just put it on the bus and log on both my dash and HP Tuners, no extra wiring involved.
Originally Posted by Slow_1.6
crxguy52 Great info on tuning.I love it. Keep it coming. I am glad that someone is digging deeper into those ECU's on the DIY side. I did my own tuning on the turbo 1.8 Miata with the MS and have been trying to learn the GM Gen 5 ECU but it's quite different. I would love to understand more so I can tune my own car. (There are local tuners by me but I have trust issues LOL). Hit me up if you want details on how I hooked up the Flex Fuel sensor. I also have a turbo LFX E85 tune from Grif here that I can share (he has been sharing his tune with people) but not sure if that was for DI or after he switched to Port injection.
Definitely agree on not trusting tuners, I feel like unless I understand what's going on there's no way for me to catch some BS they throw at me. And at that point I might as well do it myself. Do you have a car with a Gen 5 ECU you're trying to tune?
I think I've got the flex fuel sensor hooked up right but yeah send it my way. And I'd be interested to see what griff did with his tune.
Originally Posted by rb92673
Thanks for the info on the GM ECU. I have a gen 4 e67 for my Ecotec, it is way more complicated that the microsquirt I used to run on my last car.
After chatting with my AI friend for a while I think I have a decent understanding of how the ECU works. I've left off some of the things we don’t care about (the idle system comes to mind) for the sake of simplicity:
There are two primary signal paths: the top, from accelerator pedal to throttle opening and the bottom, from air measurements (MAP, MAF) to cam angle, spark angle, and injector pulse width. The top path is primarily trying to get the engine to do what the driver wants and the bottom path is running the engine under the current conditions. First, let's discuss the top path in a little more detail.
The accelerator pedal is converted to a driver torque request through the driver demand table. Vehicle speed is also an input to the DD table which allows for a shallow torque slope at low speeds (to avoid bucking) and a more linear response at higher speeds. Engine braking (negative torque) is also defined in the DD table in the low (<4%) rows.
Driver demand table, each cell is torque in Nm
This driver torque request is then fed into a bunch of different slow torque limits - slow because it affects the throttle opening. I won't go into detail about these, if you're interested in learning more see the link in my last post. For our purposes all of these should we moved well outside of what we expect them to be - with the exception of the peak torque limit, which should be ~20% higher than the max torque the engine can produce. We can also move peak torque out of the way, it's just a nice safety limit to have in the event something goes sideways.
The limited torque request is then fed into the inverse engine model, which is defined by the virtual torque tables (VTT). This model takes all of the inputs the engine does - RPM, airflow, cam angle, etc. and estimates how much torque the engine is making. A feedback loop then tries to drive the estimated torque to the torque request by opening and closing the throttle body. Estimated torque is also fed back to the limiters so that estimated torque doesn't exceed any of the limits.
The virtual torque tables, as their name implies, aren't actually real - the inverse engine model is actually defined by a set of curve fit coefficients and the tables you can see in HP Tuners is just that model evaluated at whatever conditions you specify. This is also why when you change them you need to click "update coefficients". While this may sound unnecessarily complicated it actually simplifies things from an OEM calibration standpoint. Because there are so many inputs (dimensions) to this model you'd need a ton of lookup tables to fully characterize the engine (HP Tuners defaults to 120 tables for gas alone). That takes a lot of memory and compute time in the ECU, so it makes much more sense to curve fit a function and just store 20 or so coefficients.
Note the intake and exhaust cam phase dropdowns - there are 4 and 5 of each, respectively. 6 tables * 4 intake angles * 5 exhaust angles = 120 tables
The bottom path starts by measuring or estimating how much air is actually entering the engine. The MAF is relatively straightforward - the MAF outputs a frequency which is then converted into a mass flow rate through a lookup table. Estimating airmass with the MAP is a little more complicated and uses a technique very similar to the virtual torque tables. MAP -> mass flow is not a lookup table but rather a curve fit function, which makes sense due to the dimensions added by variable cam phasing. It's also a pain to tune since you have to deal with zones, getting the surface to be smooth, etc. I didn’t change the VVE tables because my engine is stock but I think this would probably take a long time to tune if you were to change cams, add boost, etc.
Again, note the intake and exhaust cam phasing. This is much more than one map.
Both MAP and MAF airflow estimate are fed into the dynamic airflow model which, as previously discussed, blends the two estimates together. The MAP (and VVE tables) are good at transients and the MAF is good at steady state accuracy -sounds an awful lot like a Kalman filter to me. At some point the VVE algorithm can't keep up with engine speed so dynamic airflow switches over to MAF only.
Once we have cylinder airmass things get a lot simpler - cam and spark phases are both lookup tables using RPM and cylinder airmass. Fueling is even simpler, once you know how much air is in the cylinder all you have to specify the equivalence ratio (AFR / stoich) and ethanol content and the ECU takes care of the rest. It even has a power enrich mode where at high engine loads it'll lower the AFR to make more power.
There are, of course, more details that complicate things. The fuel system uses the O2 sensors to dial in the AFR under cruise conditions (narrowband O2s only tell you if you're above or below 14.7). The spark system "learns" away knock using knock retard using a per-cylinder calibration table. There are spark adders for intake air temp, engine coolant temp, power enrich mode, etc. Compared to how airflow and torque get estimated, though, these are pretty simple. Just a few more PIDs to keep an eye on when tuning.
The last detail in the spark system is are the fast torque limiters. The ECU has two ways of reducing torque: reducing airflow or retarding spark timing. If the ECU needs to cut torque really quickly it'll retard or cut spark (think rev limiter), and if it can happen slower it'll dial back the throttle. It's probably a combination of the two but this illustrates the basic concept.
So how does this relate to how my car was driving? First off, dynamic airflow was set to be disabled at 500 RPM, forcing the ECU to only use the MAF sensor. I talked about this in my last post so I won't cover it again.
The second issue was that someone had copied the virtual torque tables from what appears to be an entirely different engine into the tune. I'm not sure what they were trying to achieve but the effect was the ECU thought the engine was making more torque than it was. This was an issue for two reasons:
The inflated torque estimate was causing the VVT's estimated torque to exceed a transmission torque limit, causing it to pull timing between 2-3000 RPM
Because the torque estimate didn't match reality it caused drivability problems - the throttle wasn't super linear and transient response was thrown off
I copied over the stock virtual torque tables and it solved both of those problems, I'm very satisfied with how it drives now. Transient response is actually pretty good, it's not far off of a cable throttle. The only thing I may add is a clutch switch - right now the ECU thinks it's in gear all the time, causing it to not cut fuel between gears. It also filters the throttle input too much when rev matching, again because it thinks it's in gear. This is a pretty minor detail, though, and I'll probably move on to other projects for the time being.
Hopefully this has been helpful (or at least interesting). I've enjoyed learning how it all works and it certainly helps understand what all the tunable parameters do.
Definitely agree on not trusting tuners, I feel like unless I understand what's going on there's no way for me to catch some BS they throw at me. And at that point I might as well do it myself. Do you have a car with a Gen 5 ECU you're trying to tune?
I think I've got the flex fuel sensor hooked up right but yeah send it my way. And I'd be interested to see what griff did with his tune.
crxguy52 Sorry, I meant to type Gen 4 ECU. I am in the same boat as you with Keisler Keisler-sourced ECU and tune. I will send the Griff's tune your way after work tonight.
Thanks for sharing all this information. I haven't looked at a torque based ECU in detail yet and appreciate your write up. Cats given out!
The modern ECUs certainly have a lot going on with the torque models, especially when you have intake and exhaust phasers on a DOHC V engine that can advance and retard (Coyotes and Ecoboosts for instance). Change the cams and headers and you got to dedicate a good bit of time and attention to make it good. I find it very impressive how advanced and accurate these ECUs are now, and even back in the early 2000s with the dynamic airflow in the GM ECUs, it's pretty cool.
Good to hear you got the engine running better with those changes! Often times the little details add up to large improvements (although a VTT may not be considered a little detail).
Dude, that breakdown was super impressive, AI-guided or not. My head hurts, but I definitely appreciate you laying all that info out for us to consume haha.
I'd hate to try and make sense of this (I'm still having trouble), without having messed with a SD system first. So many inputs! I work on these type of cars dang near every day and had no idea how dang much ECUs are doing.
This is a little out of order - I started on the AC lines back in July and didn’t finish them until early September. Just keep that in mind.
I ordered the fittings from rock auto and hose from cold hose (full BOM in my spreadsheet). I attempted to braze a few fittings on assuming it would work the first time - I know how to solder and weld so brazing should be easy, right? As is usually the case things didn't go as expected and all of the joints leaked immediately. I think the leaks were because I didn't use any flux and the joint kept moving as it was cooling, but whatever the case I had a TIG hammer and this was a nail-shaped problem.
Welding the fittings on was pretty straightforward, the hardest part was all the start/stops due to the small diameter. I made up all the individual segments, leak checked the best I could, then got them crimped at a local hydraulic hose shop.
There aren't any commercially available 90° splices for reduced barrier hose so I made my own out of a #12 (5/8") barbed elbow and some weld-on fittings, visible in the top of the image. I installed the lines, leaving the old condenser / dryer so I could leak check using compressed air - refrigerant is nasty stuff and I'd rather not weld parts that have been exposed to it. Leak checking revealed probably 6 pinhole leaks that I hadn't seen before so out came the lines, repair, reinstall, and pressurize. I repeated this process probably 5 times before I fixed all but one leak.
See that gusset on the compressor manifold? It leaked no matter what I did. I spent probably 3 hours trying to fix the leak before I finally gave up and cut the manifold up to hopefully fix the leak. This was not my favorite move since I really liked how the manifold looked but such is life I suppose. It would have been fine if that fixed the leak… but it didn't. No matter what I did I couldn't fix this stupid leak, and now it was even harder to weld on the manifold because I didn't want to cook the hose that was crimped on. After another 3+ hours of trying to fix the new leak, I gave it up and cut the manifold up AGAIN. Third time was the charm, though. This time it didn't leak, at least with 120psi of compressed air. I lost count of how much time I spent leak checking and repairing these stupid lines, it was way more time than it took to make them in the first place. Tens of hours probably. Why I, as an amateur welder, thought it was a good idea to weld a small diameter, thin wall aluminum pressure vessel is beyond me. We do not do these things because they are easy, we do them because we thought they would be.
Here's a few pictures of the lines installed. I secured them to the lower radiator support by drilling a hole, wrapping the line in some spare AC line to prevent it from chafing, and running a zip tie around it.
And for my future reference, this is the only way the manifold goes into place. It does not fit any other way
I pulled a vacuum on the system, backfilled with refrigerant to atmospheric pressure, then replaced the condenser. When the car was running I put half a can of refrigerant in the system mostly to see if it would hold pressure. I did notice something strange when I added refrigerant, though - I was seeing 130psi on the high side and a vacuum on the low side.
To be honest I was so excited to have the car driving I forgot about this. I'd occasionally try the AC to see if it worked and it would - sometimes. Other times it wouldn’t do anything. I was more concerned about making sure the engine wasn't knocking so I didn't pay it much attention, I just figured I'd troubleshoot it when I had time. That time, it turns out, was a few days ago.
I'd heard the compressor make some strange sounds when it kicked on but I figured a pebble or some road debris just got in the clutch, I've had something similar happen with my other cars and it wasn't an issue. I hooked up my gauges with the compressor off and, to my surprise, the system was holding pressure! This is a huge win after spending so much time fixing leaks. I then turned the compressor on and… nothing. The clutch was engaging and spinning the compressor but zero pressure differential from high to low side. Uh oh.
As an aside, chatting with an AI isn't always helpful. It'll tell you garbage sometimes. But as a tool to do some rubber duck debugging it's fantastic. I eventually concluded that some debris, either from my fabricated lines or desiccant that broke off from the new condenser, clogged the expansion valve and caused the high pressure differential I observed when I was charging the system. Here's roughly what normal R-134a pressures should look like:
My pressures were a little on the low side since I didn't fully charge the system, but even at 130psi I should have been seeing some positive pressure on the low side. This indicates that there's a significant flow obstruction between the low and high sides, and since I didn't modify the high side lines very much it's most likely a clogged expansion valve. This explains why the AC would work sometimes - whatever was clogging it would shift or clear and allow refrigerant to pass, then more garbage would clog it up again and the AC would stop cooling.
Unfortunately, this wasn’t only a cooling issue - a clogged valve also doesn't allow oil to pass. The compressor would pump all the refrigerant and oil into the high side then continue to run dry, frying the internals. Burned-smelling refrigerant oil confirmed this. I also turned the compressor over by hand and it felt gritty.
I initially thought the system would protect itself from something like this - it has a trinary switch which should shut down the compressor if the high side pressure gets too low or high. In this case it did not do its job because the design assumes that the low and high side pressures scale together - if the low side pressure is low, so is the high side. Because the expansion valve was clogged the high side pressure was normal-ish but the low side was under partial vacuum. An additional low side pressure switch would solve this although I don’t think they're very common - I kept the Miata system as close to stock as I could.
To be honest I'm pretty disappointed, I've spent SO much time getting this AC system fabricated and leak-free. I now have to replace the entire system for a second time - compressor, condenser, expansion valve, and evaporator - and now flush all the lines with AC solvent (which gives you a great buzz if you're not careful). It's a least a full day's worth of work, probably more since I'll have to pull the dash. But that’s how these things go sometimes, I guess. At least it's winter and I don’t need the AC for a while.
Have you figured out what Wideband you are going with? I want to add WB to my LFX and have been looking at the Spartan 3 OEM board and was planning to wire it in to my RaceCapture Pro over CAN and use the narrowband for the GM ecu feed. I did not look into the details of what it would take to wire it in to GM for tunning yet.
Have you figured out what Wideband you are going with? I want to add WB to my LFX and have been looking at the Spartan 3 OEM board and was planning to wire it in to my RaceCapture Pro over CAN and use the narrowband for the GM ecu feed. I did not look into the details of what it would take to wire it in to GM for tunning yet.
I'd really like to go with the Spartan 3 V2. The Spartan 3 OEM seems like it's the same thing, I'm just lazy and don't feel like making a harness / enclosure if I don't have to. The tentative plan is to install the controller in the engine bay and use the analog output to drive the factory O2 sensor input. CAN output then gets tapped into the ECU bus (GMLAN) so that HP tuners can read it in. VCM Scanner supports it by default so as long as it's on the bus it should just work.
I would like to do the same but the V2 has been on backorder for some time now. Thank you for the info on the GMLAN and HP being already configured for that. I think I will pull the trigger on the OEM and just wire it myself soon. Will report back here.