Megasquirt Help me understand reviewing logs
Thread Starter
Joined: Jan 2007
Posts: 1,945
Likes: 107
From: Wilmington, DE
Help me understand reviewing logs
I'm not exactly sure what I should be looking for. I know a few rough targets that I should see AFR wise and kind of what timing should be under boost etc. What sort of anomalies? I noticed the small rich spike as I hit 100% throttle.
Another thing I have been fighting is temperature swings. When tuning at night it seems to pull fuel and then during the day it wants to add it back. As of right now the MAT correction table is zeroed out. I just dont know the best way to play with it.
I have attached my tune and the a second gear log. I dont feel comfortable yet loading up the engine that long as it has ~ 550 miles on it.
Any help would be appreciated. The VE analyze live has been a great asset in getting the car running smoothly. I'd like to continue using it to tune under boost. Not sure if its worth taking it somewhere to get it tuned. Anywhere I go will be foreign to the MS.
edit: I attached a picture of the 2nd gear pull for those who dont want to be troubled to open up the log viewer.
Another thing I have been fighting is temperature swings. When tuning at night it seems to pull fuel and then during the day it wants to add it back. As of right now the MAT correction table is zeroed out. I just dont know the best way to play with it.

I have attached my tune and the a second gear log. I dont feel comfortable yet loading up the engine that long as it has ~ 550 miles on it.
Any help would be appreciated. The VE analyze live has been a great asset in getting the car running smoothly. I'd like to continue using it to tune under boost. Not sure if its worth taking it somewhere to get it tuned. Anywhere I go will be foreign to the MS.
edit: I attached a picture of the 2nd gear pull for those who dont want to be troubled to open up the log viewer.
Joined: Feb 2001
Posts: 29,798
Likes: 128
From: London, Ontario, Canada
Your coolant temperature is looking very odd. Bouncing all over. Might want to check the sensor and ground.
Your timing looks fine under boost. Much like my map.
The small rich spike may be caused by the accel pump. Or, how much tuning has taken place on this map? I notice a lot of non-linearity, so it hasn't really seen much tuning around the 1600 RPM range (as an example). Certainly a very high VE table around atmospheric will cause rich spikes as you stab the throttle.
This is what you would expect to see.
If you are autotuning, once the VE table is where it should be for one set of conditions, stop. Then tune the correction tables (like MAT).
Once you have a nice VE table, and a nice AFR table (yours looks basically OK as a starting point but should havce fewer large steps and you can lean out the "cruise" area much more) then turn closed loop on from say 700 RPM to 5000 RPM at under 70 KPA. The ECU will now use your wideband to slightly correct the VE table in "observer based" operation. This is how modern vehicles operate. Of course you only want to do this with the PID algorithm, so get that set up and working well first.
NO! WORLDS OF NO! DO NOT USE AUTOTUNE UNDER BOOST ON A ROTARY! If autotune makes too much of a correction (which I have found it WILL do around the injector stage point) you will be building a new engine. Tune boost manually. It's the easiest part of tuning.
Not sure if its worth taking it somewhere to get it tuned. Anywhere I go will be foreign to the MS.
edit: I attached a picture of the 2nd gear pull for those who dont want to be troubled to open up the log viewer.[/QUOTE]
The small rich spike may be caused by the accel pump. Or, how much tuning has taken place on this map? I notice a lot of non-linearity, so it hasn't really seen much tuning around the 1600 RPM range (as an example). Certainly a very high VE table around atmospheric will cause rich spikes as you stab the throttle.
Another thing I have been fighting is temperature swings. When tuning at night it seems to pull fuel and then during the day it wants to add it back. As of right now the MAT correction table is zeroed out. I just dont know the best way to play with it.
If you are autotuning, once the VE table is where it should be for one set of conditions, stop. Then tune the correction tables (like MAT).Once you have a nice VE table, and a nice AFR table (yours looks basically OK as a starting point but should havce fewer large steps and you can lean out the "cruise" area much more) then turn closed loop on from say 700 RPM to 5000 RPM at under 70 KPA. The ECU will now use your wideband to slightly correct the VE table in "observer based" operation. This is how modern vehicles operate. Of course you only want to do this with the PID algorithm, so get that set up and working well first.
Any help would be appreciated. The VE analyze live has been a great asset in getting the car running smoothly. I'd like to continue using it to tune under boost.
Not sure if its worth taking it somewhere to get it tuned. Anywhere I go will be foreign to the MS.
edit: I attached a picture of the 2nd gear pull for those who dont want to be troubled to open up the log viewer.[/QUOTE]
Thread Starter
Joined: Jan 2007
Posts: 1,945
Likes: 107
From: Wilmington, DE
Your coolant temperature is looking very odd. Bouncing all over. Might want to check the sensor and ground.
Your timing looks fine under boost. Much like my map.
The small rich spike may be caused by the accel pump. Or, how much tuning has taken place on this map? I notice a lot of non-linearity, so it hasn't really seen much tuning around the 1600 RPM range (as an example). Certainly a very high VE table around atmospheric will cause rich spikes as you stab the throttle.
This is what you would expect to see.
If you are autotuning, once the VE table is where it should be for one set of conditions, stop. Then tune the correction tables (like MAT).
Once you have a nice VE table, and a nice AFR table (yours looks basically OK as a starting point but should havce fewer large steps and you can lean out the "cruise" area much more) then turn closed loop on from say 700 RPM to 5000 RPM at under 70 KPA. The ECU will now use your wideband to slightly correct the VE table in "observer based" operation. This is how modern vehicles operate. Of course you only want to do this with the PID algorithm, so get that set up and working well first.
NO! WORLDS OF NO! DO NOT USE AUTOTUNE UNDER BOOST ON A ROTARY! If autotune makes too much of a correction (which I have found it WILL do around the injector stage point) you will be building a new engine. Tune boost manually. It's the easiest part of tuning.
Not sure if its worth taking it somewhere to get it tuned. Anywhere I go will be foreign to the MS.
edit: I attached a picture of the 2nd gear pull for those who dont want to be troubled to open up the log viewer.
Your timing looks fine under boost. Much like my map.
The small rich spike may be caused by the accel pump. Or, how much tuning has taken place on this map? I notice a lot of non-linearity, so it hasn't really seen much tuning around the 1600 RPM range (as an example). Certainly a very high VE table around atmospheric will cause rich spikes as you stab the throttle.
This is what you would expect to see.
If you are autotuning, once the VE table is where it should be for one set of conditions, stop. Then tune the correction tables (like MAT).Once you have a nice VE table, and a nice AFR table (yours looks basically OK as a starting point but should havce fewer large steps and you can lean out the "cruise" area much more) then turn closed loop on from say 700 RPM to 5000 RPM at under 70 KPA. The ECU will now use your wideband to slightly correct the VE table in "observer based" operation. This is how modern vehicles operate. Of course you only want to do this with the PID algorithm, so get that set up and working well first.
NO! WORLDS OF NO! DO NOT USE AUTOTUNE UNDER BOOST ON A ROTARY! If autotune makes too much of a correction (which I have found it WILL do around the injector stage point) you will be building a new engine. Tune boost manually. It's the easiest part of tuning.
Not sure if its worth taking it somewhere to get it tuned. Anywhere I go will be foreign to the MS.
edit: I attached a picture of the 2nd gear pull for those who dont want to be troubled to open up the log viewer.
The timing map is straight off your webpage, I hit full boost around 7k rpm and it studdered the other night. AFR was well into the 11s (maybe 10s i forget) so i adjusted the far top right to 10* instead of 12.
I do plan on putting an S5 full range TPS in. I'm rather tired of the crappy S4 TPS. just need time to rewire it..
I have about 580 miles on the engine, and almost all of that time has been with the laptop plugged in using the autotune feature. I've done mostly cruising. not a ton of low rpm high load. or high rpm light load. just going through the gears shifting sometimes at 4-5k rpms. vaccuum between 5-15 in"mg. I have used the autotune in boost a bit, but not much. it's difficult to tune it alone so I relied on it to be my hands. I will get a helper from now on!
I havent set up closed loop because with the S4 TPS highway rides are "40%-60%" throttle. actual half throttle is full throttle according to the TPS. I do plan on leaning out the map and playing with negative split cruising to try and squeeze a few more MPG out of the car. 25 MPG would be nice..
Thanks for the help Aaron! And I promise not to use autotune in boost anymore

NO! WORLDS OF NO! DO NOT USE AUTOTUNE UNDER BOOST ON A ROTARY! If autotune makes too much of a correction (which I have found it WILL do around the injector stage point) you will be building a new engine. Tune boost manually. It's the easiest part of tuning.
That said, I still agree with Aaron that you shouldn't use autotune on boost. Honestly I'm of the opinion that you shouldn't even use closed loop outside of cruise, let alone autotune. It's not as big a deal on an NA engine, but in boost, going too lean can cause issues, and autotune (or closed loop sometimes if not tuned well) can cause cyclical lean spots, causing you to have to over-richen the mixture to avoid going to lean.
As far as "looking for problems," Aaron covered everything I'd have called out in your log. Generally once you've gone through the logs after the first couple of times driving the car, it's not necessary to constantly go through your logs looking for problems. They are mainly useful for finding problems that caused noticable changes in the way the engine runs... Things like that include stutters, bogging, lower than expected power, etc...
Ken
Thread Starter
Joined: Jan 2007
Posts: 1,945
Likes: 107
From: Wilmington, DE
Alright great. It's been a habit to just boot the laptop up when I get in the car. I need to purchase the bluetooth adapter so I can hook up a tablet for easier viewing. Call me paranoid but I like being able to make sure everything is normal. I cannot afford to blow up another engine.
Joined: Feb 2001
Posts: 29,798
Likes: 128
From: London, Ontario, Canada
That said, I still agree with Aaron that you shouldn't use autotune on boost. Honestly I'm of the opinion that you shouldn't even use closed loop outside of cruise, let alone autotune. It's not as big a deal on an NA engine, but in boost, going too lean can cause issues, and autotune (or closed loop sometimes if not tuned well) can cause cyclical lean spots, causing you to have to over-richen the mixture to avoid going to lean.
As far as "looking for problems," Aaron covered everything I'd have called out in your log. Generally once you've gone through the logs after the first couple of times driving the car, it's not necessary to constantly go through your logs looking for problems. They are mainly useful for finding problems that caused noticable changes in the way the engine runs... Things like that include stutters, bogging, lower than expected power, etc...
Ken
Ken
For those of us with SD cards installed, anything that lights the check engine light or violates the AFR safety table should automatically start a datalog on the car. That's pretty handy to troubleshoot an intermittent problem. If the option is available to retroactively log the last few seconds as well (not sure how you're storing logging info in memory) then that would be awesome.
I agree! After finally setting up table based staging on the '87 TII I've been helping with, I wouldn't go any other way. It was a joy to set up with very little tweaking of the table needed. Which was especially nice for this car because the driver is always driving just above and below the old stage point, creating wonky AFRs as the old staging method couldn't cope very well. Table based, no problem.
You don't run closed loop across the entire light/medium load part of the table? On the TII, once the VE table was tuned I enabled PID closed loop from about 700 RPM @ 35KPA to 5000 RPM @ 85KPA (which is similar to what I plan to do with my Cosmo) and it's been wonderful. PID trims/adds fuel as necessary depending on weather conditions, heat soak, etc. Boost obviously is open loop.
My main problem is that widebands that are calibrated in free air are often inaccurate below stoich, they vary WIDELY in accuracy depending on temperature, pressure, etc... and most modern wideband controllers don't actually tell you when one of the parameters that can affect accuracy is off, so the ECU can't know when to ignore the signal and when not to.
The only way around this is to use the CAN or serial signal that some widebands support and run that into the MS, at least then when there is an error code, the MS can ignore the signal.
We also added a long term trim function to the MS3 so that you can do something more like what the factories do to affect the tune on the fly based on O2 feedback.
B&G were coming out with their own wideband controller (PWC) but I don't know where that is or what's going on with it. It's been years since we had an update.
This may be in the documents already, but I don't recall seeing it. If it isn't, I have a feature suggestion.
For those of us with SD cards installed, anything that lights the check engine light or violates the AFR safety table should automatically start a datalog on the car. That's pretty handy to troubleshoot an intermittent problem. If the option is available to retroactively log the last few seconds as well (not sure how you're storing logging info in memory) then that would be awesome.
For those of us with SD cards installed, anything that lights the check engine light or violates the AFR safety table should automatically start a datalog on the car. That's pretty handy to troubleshoot an intermittent problem. If the option is available to retroactively log the last few seconds as well (not sure how you're storing logging info in memory) then that would be awesome.
Ken
Trending Topics
Thread Starter
Joined: Jan 2007
Posts: 1,945
Likes: 107
From: Wilmington, DE
So I took a log over the weekend and noticed this activity when it gets to "full boost" which is just the wastegate spring. no MBC (not plugged in yet).
This was a 60 mph pull. downshifted to 3rd gear and kept going in 4th gear.
the MAP varies from 130-170. Would I benefit from using a filter on the map sensor hose?
This was a 60 mph pull. downshifted to 3rd gear and kept going in 4th gear.
the MAP varies from 130-170. Would I benefit from using a filter on the map sensor hose?
Joined: Feb 2001
Posts: 29,798
Likes: 128
From: London, Ontario, Canada
Awesome. Glad to see you tried it!
My main problem is that widebands that are calibrated in free air are often inaccurate below stoich, they vary WIDELY in accuracy depending on temperature, pressure, etc... and most modern wideband controllers don't actually tell you when one of the parameters that can affect accuracy is off, so the ECU can't know when to ignore the signal and when not to.
My main problem is that widebands that are calibrated in free air are often inaccurate below stoich, they vary WIDELY in accuracy depending on temperature, pressure, etc... and most modern wideband controllers don't actually tell you when one of the parameters that can affect accuracy is off, so the ECU can't know when to ignore the signal and when not to.
I guess that's why OEMs typically run more than one O2 sensor.

Setting controller authority to something sane (like 10% or 5%) should negate this though. Worst case is that fuel trim is off by 5% at light load if the O2 sensor does something wonky.
We also added a long term trim function to the MS3 so that you can do something more like what the factories do to affect the tune on the fly based on O2 feedback.
I will talk to James about that. He deals with the SDCard datalogging.
So I took a log over the weekend and noticed this activity when it gets to "full boost" which is just the wastegate spring. no MBC (not plugged in yet).
This was a 60 mph pull. downshifted to 3rd gear and kept going in 4th gear.
the MAP varies from 130-170. Would I benefit from using a filter on the map sensor hose?
This was a 60 mph pull. downshifted to 3rd gear and kept going in 4th gear.
the MAP varies from 130-170. Would I benefit from using a filter on the map sensor hose?
OEMs do this to make sure the cat lights and stays lit. There is always one ahead of the cat and one behind. The one ahead is the real O2 reading, and in many cases even today it is a heated narrowband. The calibration resistor helps I am sure, but most factories are still not running closed loop even out of cruise.
I suppose. The factories use the corrections made on cruise to make changes to the lon term trim at higher load. That way they don't need to run closed loop everywhere in the table.
1.3 alphas have it.
Ken
Setting controller authority to something sane (like 10% or 5%) should negate this though. Worst case is that fuel trim is off by 5% at light load if the O2 sensor does something wonky.
Awesome. I just checked the project for the '87 TII and couldn't find these settings though. Not yet in the production firmware?
Ken
Joined: Feb 2001
Posts: 29,798
Likes: 128
From: London, Ontario, Canada
OEMs do this to make sure the cat lights and stays lit. There is always one ahead of the cat and one behind. The one ahead is the real O2 reading, and in many cases even today it is a heated narrowband. The calibration resistor helps I am sure, but most factories are still not running closed loop even out of cruise.
I suppose. The factories use the corrections made on cruise to make changes to the lon term trim at higher load. That way they don't need to run closed loop everywhere in the table.
I suppose. The factories use the corrections made on cruise to make changes to the lon term trim at higher load. That way they don't need to run closed loop everywhere in the table.
1.3 alphas have it.
Thread Starter
Joined: Jan 2007
Posts: 1,945
Likes: 107
From: Wilmington, DE
I am reading MAP from the single nipple where the LIM meets the UIM. It goes straight into the firewall to the ECU.
I think I figured out the issue. I remembered I have an exhaust leak. I replaced my downpipe gasket hoping it would be the easiest fix. I still have the exhaust leak. The block to manifold gasket is brand new as well which leaves the man/turbo gasket. I have a replacement but havent put it on yet due to not wanting to pull the turbo. I have a good feeling that leak is causing the turbo to spool up and down due to a non-consistent exhaust flow.
I think I figured out the issue. I remembered I have an exhaust leak. I replaced my downpipe gasket hoping it would be the easiest fix. I still have the exhaust leak. The block to manifold gasket is brand new as well which leaves the man/turbo gasket. I have a replacement but havent put it on yet due to not wanting to pull the turbo. I have a good feeling that leak is causing the turbo to spool up and down due to a non-consistent exhaust flow.
Joined: Feb 2001
Posts: 29,798
Likes: 128
From: London, Ontario, Canada
Maybe....
That nipple only leads to one runner. I'd suggest using one of the nipples near the throttle body as they lead to the plenum. You'll get a better signal.
That nipple only leads to one runner. I'd suggest using one of the nipples near the throttle body as they lead to the plenum. You'll get a better signal.
Right, forgot about the cats. Interestingly though my Insight is in closed loop 100% of the time after about 10 seconds from being started. An ODBII reader shows the flip from open to closed, presumably as soon as the wideband warms up (it's a lean-range wideband...forget the part number but it was developed by Denso for the Insight). Guess I shouldn't use an Insight as an example but I had just assumed most manufacturers were running 100% closed loop.
I'll wait for it in the production firmware.

all cars since obd2 run closed loop except at wot. new cars just reach closed loop within seconds instead of minutes. epa hates open loop operation. also between long term fuel trim and short term fuel trim it has up to 30% authority to adjust fueling over 90% of the map
I'm pretty sure that's not true as you wouldn't want to run closed loop all the time with a narrowband sensor, and many cars after ODB2 run narrowbands.
I've seen the AFR tables for many cars that are ODB2 as well, and they specify non-stoich values (on cars with narrowbands) in places that are not WOT. Many of these cars change the trim in the non-open-loop parts of the table using the corrections made in the areas where they run closed loop.
Ken
I've seen the AFR tables for many cars that are ODB2 as well, and they specify non-stoich values (on cars with narrowbands) in places that are not WOT. Many of these cars change the trim in the non-open-loop parts of the table using the corrections made in the areas where they run closed loop.
Ken
well my 12 years experience and factory training from gm and chrysler and me degree beg to differ. obd2 law requires closed loop operation. a narrowband o2 sensor switches at stoich. the computers average the switching and how much it needs to change pw to make the o2 switch then calculates a correction.
A couple comments on the open vs closed loop thing, and o2 sensors in general for a modern car. Let's say we're talking about an engine with a single bank. The rear o2 sensor is used for the catalyst monitor, yes, but it is also used to correct and offset the front o2 sensor in the stoich region. The reason why is that the front o2 will drift a little bit over time and you can fail NOx during EPA in-use testing.
Aaron Cake's Insight uses an early version of the modern Denso Limiting-current type wideband that you'll find in an Rx-8 for example. His was specifically designed for lean operation, because in the days of the original Insight you could do it and still meet NOx emissions standards without too much emissions equipment. The newest widebands are designed to light off in about 4-5 seconds on an FTP emissions test. Narrowbands in the front o2 position still work (switching around stoich) on modern production cars, but they require many controls tricks to make up for their lack of precision. It's hard to determine how far the engine is from stoich using a narrowband because of its rapid switching nature. A wideband is more linear, so it's easier to calculate pulsewidth corrections.
It's important to separate "open and closed loop" from "stoichiometric and enriched." Once the o2 sensors warm up, you can run in closed loop for your entire operating range and never enrich, literally running Lambda 1 or leaner at all times except for extreme conditions(very few production engines can do this). Under heavy load you can enrich down to a certain AFR, say 13.5:1, and then go into open loop once the target is richer than that. You can run closed loop all the time and still be enriched, targeting say 12:1 AFR. Various manufacturers implement different controls depending on the engine.
What you'll often find most often, regardless of the type of front O2 sensor, is closed loop operation with some delay timer before enrichment begins under heavy load. There may be many learning zones for fuel trims and enrichment delay timers based on speed and load, as opposed to just one set of fuel trims for all operation. The enrichment is typically to preserve the catalytic converter and/or turbo by lowering EGT. It depends on the parts, but usually 850-950C is the max range.
Aaron Cake's Insight uses an early version of the modern Denso Limiting-current type wideband that you'll find in an Rx-8 for example. His was specifically designed for lean operation, because in the days of the original Insight you could do it and still meet NOx emissions standards without too much emissions equipment. The newest widebands are designed to light off in about 4-5 seconds on an FTP emissions test. Narrowbands in the front o2 position still work (switching around stoich) on modern production cars, but they require many controls tricks to make up for their lack of precision. It's hard to determine how far the engine is from stoich using a narrowband because of its rapid switching nature. A wideband is more linear, so it's easier to calculate pulsewidth corrections.
It's important to separate "open and closed loop" from "stoichiometric and enriched." Once the o2 sensors warm up, you can run in closed loop for your entire operating range and never enrich, literally running Lambda 1 or leaner at all times except for extreme conditions(very few production engines can do this). Under heavy load you can enrich down to a certain AFR, say 13.5:1, and then go into open loop once the target is richer than that. You can run closed loop all the time and still be enriched, targeting say 12:1 AFR. Various manufacturers implement different controls depending on the engine.
What you'll often find most often, regardless of the type of front O2 sensor, is closed loop operation with some delay timer before enrichment begins under heavy load. There may be many learning zones for fuel trims and enrichment delay timers based on speed and load, as opposed to just one set of fuel trims for all operation. The enrichment is typically to preserve the catalytic converter and/or turbo by lowering EGT. It depends on the parts, but usually 850-950C is the max range.
well my 12 years experience and factory training from gm and chrysler and me degree beg to differ. obd2 law requires closed loop operation. a narrowband o2 sensor switches at stoich. the computers average the switching and how much it needs to change pw to make the o2 switch then calculates a correction.
According to much of that research (including specs on modern Bosch wideband sensors, largely the ones used by most enthusiasts on their cars with wideband controllers as well as VWs and other European cars) that say the accuracy of these sensors plummets when the temperature or pressure are outside a very narrow operational range.
This is why I recommended running closed loop only on cruise (up to maybe 80% load and up to a couple thousand rpm above cruise rpm), never on boost for turbo cars and never above 80% load on N/A engines. This is also why even though manufacturers *try* to run closed loop as much as possible, they can't in any situation that causes the sensor to report bad data. One thing we are working towards with ms is the ability to read controller status over CAN or serial so closed loop can be disabled when inaccurate and left enabled the rest of the time.
Ken
Joined: Feb 2001
Posts: 29,798
Likes: 128
From: London, Ontario, Canada
I started a hell of a discussion. 
To be clear about my original statement, I'm not advocating running closed loop anywhere near boost. However I have had good success running closed loop from idle up to say 5000 RPM to about 80 - 85% load.
True, if the wideband drifts this can become a problem. We will see long-term how this works because soon that car will be released to the wild and become a year around daily driver. So far so good though and this wideband is already a few years old. Obviously one can't judge without a lab-grade sensor to confirm its accuracy but does it really matter if it's off a tenth of a point?
Checking the IO settings, we can implement an EGO correction light so if the EGO correction is trying to go outside of what it should on the AFR table, we can light a "wideband check" light. The standard CEL settings would help as well.

To be clear about my original statement, I'm not advocating running closed loop anywhere near boost. However I have had good success running closed loop from idle up to say 5000 RPM to about 80 - 85% load.
True, if the wideband drifts this can become a problem. We will see long-term how this works because soon that car will be released to the wild and become a year around daily driver. So far so good though and this wideband is already a few years old. Obviously one can't judge without a lab-grade sensor to confirm its accuracy but does it really matter if it's off a tenth of a point?
Checking the IO settings, we can implement an EGO correction light so if the EGO correction is trying to go outside of what it should on the AFR table, we can light a "wideband check" light. The standard CEL settings would help as well.
Yeah, the inaccuracy I have read about can be 1 or more AFR off during these situations.
This is why the OEMs and researchers use expensive 5-gas analyzers instead of simple wideband sensors.
Ken
This is why the OEMs and researchers use expensive 5-gas analyzers instead of simple wideband sensors.
Ken





