Drivetrain MYNES Technical write up... BMW/Siemens Catalyst Monitor Sytem
#1
MYNES Technical write up... BMW/Siemens Catalyst Monitor Sytem
I’ve been going through the BMW/Siemens code for some time now, and I am still going through it for over almost 4 years. Having that the BMW/Siemens version for the MINI which has over 2100 routines and subroutines it takes some time to go through it and completely understand what is going on looking at everything in assembly language (mnemonics). Now if we all knew someone at Siemens that can hand over the source code which is written in C programming language, then it wouldn’t take so long to go through and understand.
Why did I want to go through the BMW/Siemens code in the first place? We I didn’t want to fall into the trap of buying some third-party software that didn’t really understand what is going on, but find maps by eye or using an emulator to trace whilst the engine is running to figure out what map is what. This way is still good only if you are going through the code to find maps, and using the emulator to confirm things. It’s not that great for tuning a vehicle, especially the way BMW/Siemens routines for checksum calculations.
Lately I have been working on OBD II diagnosis codes, where they are stored, how does it trigger to store, if the function goes to a fail safe function, and does it trigger a MIL light or not. By this, it has me all over the place within the code. To understand this, you first have to understand the microcontroller and instruction set. So that took me about 8 months to read and understand the microcontroller peripherials and instruction set. So going through the code late hours of the night, I found all the data logging values that are stored in RAM, and then I found the OSC functions (Oxygen Storage Capacity) for Catalyst Monitoring. Here goes:
General description
BMW/Siemens has chosen to fulfill and exceed OBD’s requirement, and it’s based on Oxygen Storage Capacity (OSC):
During a controlled stimuli (special A/F pulses in engine steady state conditions), such as idle and cruising (additive) the downstream O2 sensor signal is analyzed to evaluate the OSC of the catalyst. The OSC is correlated experimentally with the global HC efficiency and HC emission during the cycle. It represents the quantity of oxygen that is really used for the oxidation-reduction by the catalytic converter which is (stored in lean excursion and consumed in the rich excursion).
The Catalyst monitoring is a sequential diagnosis from 34 routines within the code on steady state conditions and this monitoring is intrusive. There are three phases are composing the diagnosis:
• Engine stabilization
• Controlled stimuli-stabilization
• Controlled stimuli-diagnosis
If a problem has occurred with the downstream sensor during the catalyst diagnosis, then that is when the diagnosis for a bad sensor can be determined.
Picture below is a demonstration how the Catalyst Monitoring is done:
I am going to use the same variable names that Siemens use in their source code
VLS_DOWN: Downstream O2 sensor signal
FIL_DOWN_LAM_CAT: filtered signal for DOWN_DYN_CAT (=detection criteria) integration
FIL_DOWN_DYN_CAT: high filtered DW signal for mean richness
During the “Controlled stimuli - diagnosis phase” the downstream sensor activity is measured and corresponds to the OSC of the catalyst. If this activity is high (low OSC) the diagnosis criteria DOWN_DYN_CAT is high.
Another picture to describe this function:
By going through the code and if one of the monitoring conditions is not met or if the mass airflow deviates too much from the value stored at the start of this test phase, the test is interrupted sets a bit in RAM, and clears some other bits in RAM and the system returns to the < out of diagnosis > state.
Downstream sensor diagnosis phase:
If throughout the Controlled Stimuli phase, repeated several times setting bitfields in RAM at a certain address, and the function returns to checks again. The downstream sensor has not moved, the A/F closed loop mode is delayed in order to test the sensor.
If the downstream sensor sends a signal indicating a rich (lean) mixture, the injection time is forced to lean (rich) until sensor switches over or until the end of delay. That is one of the causes for the P2096 code when this delay expires or returns a failed sensor.
If an electrical failure (short circuit and open circuit of signal and heater) are treated as <comprehensive components>.
If the catalyst diagnosis has been done without any problems, the downstream sensor is treated as <good> and a sensor diagnosis is not required.
If the monitoring conditions for the diagnosis are fulfilled, the systems informs the OBD II sequencer code and waits for it’s authorization to start catalyst diagnosis. The OBD II sequencer manages the priorities in case of multiple diagnosis requests such as (catalyst diagnosis and O2 sensor diagnosis) and others. I found that in the code where all that happens and understand the threshold that are in place. Trust me, BMW/Siemens doesn’t leave any room for harder any error like other car manufacturers and still meet OBD II requirements.
And what causes these problems are not bad cats, just the high flow ones let some unfiltered gas hit that downstream O2 sensor. So replacing cats, and replacing headers are unnecessary and doing a software fix to lift these threshold checks would be the fix.
Here is a code sniplet from my disassembly (but it's been altered not show the address of this function).
Why did I want to go through the BMW/Siemens code in the first place? We I didn’t want to fall into the trap of buying some third-party software that didn’t really understand what is going on, but find maps by eye or using an emulator to trace whilst the engine is running to figure out what map is what. This way is still good only if you are going through the code to find maps, and using the emulator to confirm things. It’s not that great for tuning a vehicle, especially the way BMW/Siemens routines for checksum calculations.
Lately I have been working on OBD II diagnosis codes, where they are stored, how does it trigger to store, if the function goes to a fail safe function, and does it trigger a MIL light or not. By this, it has me all over the place within the code. To understand this, you first have to understand the microcontroller and instruction set. So that took me about 8 months to read and understand the microcontroller peripherials and instruction set. So going through the code late hours of the night, I found all the data logging values that are stored in RAM, and then I found the OSC functions (Oxygen Storage Capacity) for Catalyst Monitoring. Here goes:
General description
BMW/Siemens has chosen to fulfill and exceed OBD’s requirement, and it’s based on Oxygen Storage Capacity (OSC):
During a controlled stimuli (special A/F pulses in engine steady state conditions), such as idle and cruising (additive) the downstream O2 sensor signal is analyzed to evaluate the OSC of the catalyst. The OSC is correlated experimentally with the global HC efficiency and HC emission during the cycle. It represents the quantity of oxygen that is really used for the oxidation-reduction by the catalytic converter which is (stored in lean excursion and consumed in the rich excursion).
The Catalyst monitoring is a sequential diagnosis from 34 routines within the code on steady state conditions and this monitoring is intrusive. There are three phases are composing the diagnosis:
• Engine stabilization
• Controlled stimuli-stabilization
• Controlled stimuli-diagnosis
If a problem has occurred with the downstream sensor during the catalyst diagnosis, then that is when the diagnosis for a bad sensor can be determined.
Picture below is a demonstration how the Catalyst Monitoring is done:
I am going to use the same variable names that Siemens use in their source code
VLS_DOWN: Downstream O2 sensor signal
FIL_DOWN_LAM_CAT: filtered signal for DOWN_DYN_CAT (=detection criteria) integration
FIL_DOWN_DYN_CAT: high filtered DW signal for mean richness
During the “Controlled stimuli - diagnosis phase” the downstream sensor activity is measured and corresponds to the OSC of the catalyst. If this activity is high (low OSC) the diagnosis criteria DOWN_DYN_CAT is high.
Another picture to describe this function:
By going through the code and if one of the monitoring conditions is not met or if the mass airflow deviates too much from the value stored at the start of this test phase, the test is interrupted sets a bit in RAM, and clears some other bits in RAM and the system returns to the < out of diagnosis > state.
Downstream sensor diagnosis phase:
If throughout the Controlled Stimuli phase, repeated several times setting bitfields in RAM at a certain address, and the function returns to checks again. The downstream sensor has not moved, the A/F closed loop mode is delayed in order to test the sensor.
If the downstream sensor sends a signal indicating a rich (lean) mixture, the injection time is forced to lean (rich) until sensor switches over or until the end of delay. That is one of the causes for the P2096 code when this delay expires or returns a failed sensor.
If an electrical failure (short circuit and open circuit of signal and heater) are treated as <comprehensive components>.
If the catalyst diagnosis has been done without any problems, the downstream sensor is treated as <good> and a sensor diagnosis is not required.
If the monitoring conditions for the diagnosis are fulfilled, the systems informs the OBD II sequencer code and waits for it’s authorization to start catalyst diagnosis. The OBD II sequencer manages the priorities in case of multiple diagnosis requests such as (catalyst diagnosis and O2 sensor diagnosis) and others. I found that in the code where all that happens and understand the threshold that are in place. Trust me, BMW/Siemens doesn’t leave any room for harder any error like other car manufacturers and still meet OBD II requirements.
And what causes these problems are not bad cats, just the high flow ones let some unfiltered gas hit that downstream O2 sensor. So replacing cats, and replacing headers are unnecessary and doing a software fix to lift these threshold checks would be the fix.
Here is a code sniplet from my disassembly (but it's been altered not show the address of this function).
#7
Hardware is the same, software is different, same as I said about the GP software in previous years example.
Trending Topics
#10
Anyways, more importantly...How will this difference in software affect the remote tune that'll you be doing for my car? (in the near future)....
#11
#13
Coming along really good (R56) I love how much RAM it comes with. Actually finding all the OBD II codes within this ECU too, and how to adjust the maps in RAM whilst the engine running instead of shutting off the car and flashing it. It's a really cool ECU after you get pass the security. The lambda coding is really cool, almost like MoTeC's self-tuning feature. Good stuff! I will leave as that for now.
#14
"If the downstream sensor gives a rich code, the engine is leaned out until the sensor goes over to lean. If it doesn't go over to lean by the end of the delay before closed loop mode the sensor is diagnosed as bad."
Is that what you are saying? It's just that I have had my car to the dealer three times for this code (soon to be a fourth) and they have yet to actually fix the problem. From what it sounds like it basically indicates a bad downstream O2 sensor.
In any event this is cool info. Our Cats and the related emission systems are basically like mobile science labs.
#15
When do you start testing? Will you start with a car with aftermarket exhaust components that throws codes?
Good detective work.
#17
This interests me as this is a code I have been fighting with for the last year and a half. So what you are saying is that p2096 is caused by a bad 02 sensor? Your wording has me a bit confused. Let me see if the explanation I give back is what you were trying to convey:
"If the downstream sensor gives a rich code, the engine is leaned out until the sensor goes over to lean. If it doesn't go over to lean by the end of the delay before closed loop mode the sensor is diagnosed as bad."
Is that what you are saying? It's just that I have had my car to the dealer three times for this code (soon to be a fourth) and they have yet to actually fix the problem. From what it sounds like it basically indicates a bad downstream O2 sensor.
In any event this is cool info. Our Cats and the related emission systems are basically like mobile science labs.
"If the downstream sensor gives a rich code, the engine is leaned out until the sensor goes over to lean. If it doesn't go over to lean by the end of the delay before closed loop mode the sensor is diagnosed as bad."
Is that what you are saying? It's just that I have had my car to the dealer three times for this code (soon to be a fourth) and they have yet to actually fix the problem. From what it sounds like it basically indicates a bad downstream O2 sensor.
In any event this is cool info. Our Cats and the related emission systems are basically like mobile science labs.
LB
#21
#22
Jason,
Thanks for the details.
So in your opinion, is it possible that the ECU will adjust to constant P0420, P0036 and P0039 codes over time?
I've heard "adaptation tables" on the forum recently, but haven't been following it that closely to know if this was you who mentioned it, or someone else...
What I do know is that my car appears to be running much richer now, in the last 4k miles or so, based on the condition of the stock tailpipes and black soot that now covers my rear hatch extensively.
I also get these three codes on a regular basis now.
Up till now, I considered them nuisances only, but with the evidence of it running rich, I'm not too sure now.
Any chance that clearing the codes will also reset the adaptation tables?
If not, what tools would be required to do so???
Thanks (and hopefully not too far off topic).
Thanks for the details.
So in your opinion, is it possible that the ECU will adjust to constant P0420, P0036 and P0039 codes over time?
I've heard "adaptation tables" on the forum recently, but haven't been following it that closely to know if this was you who mentioned it, or someone else...
What I do know is that my car appears to be running much richer now, in the last 4k miles or so, based on the condition of the stock tailpipes and black soot that now covers my rear hatch extensively.
I also get these three codes on a regular basis now.
Up till now, I considered them nuisances only, but with the evidence of it running rich, I'm not too sure now.
Any chance that clearing the codes will also reset the adaptation tables?
If not, what tools would be required to do so???
Thanks (and hopefully not too far off topic).
#23
Joe, the pre-cat and post-cat O2's actually play a major role in the ecu's adaptation values... anybody who tells you otherwise don't truly understand the Mini Ecu and don't know what they are talking about.
Do the following:
- clear your codes with a scan tool
- clear the adaptation values by resetting your ecu
(https://www.northamericanmotoring.co...ni-viagra.html)
Check with MDBstat, he's having the same issues as you with the car running rich due to ecu's over compensation due to the CEL lights.
Hope this helps.
mike
Do the following:
- clear your codes with a scan tool
- clear the adaptation values by resetting your ecu
(https://www.northamericanmotoring.co...ni-viagra.html)
Check with MDBstat, he's having the same issues as you with the car running rich due to ecu's over compensation due to the CEL lights.
Hope this helps.
mike
Jason,
Thanks for the details.
So in your opinion, is it possible that the ECU will adjust to constant P0420, P0036 and P0039 codes over time?
I've heard "adaptation tables" on the forum recently, but haven't been following it that closely to know if this was you who mentioned it, or someone else...
What I do know is that my car appears to be running much richer now, in the last 4k miles or so, based on the condition of the stock tailpipes and black soot that now covers my rear hatch extensively.
I also get these three codes on a regular basis now.
Up till now, I considered them nuisances only, but with the evidence of it running rich, I'm not too sure now.
Any chance that clearing the codes will also reset the adaptation tables?
If not, what tools would be required to do so???
Thanks (and hopefully not too far off topic).
Thanks for the details.
So in your opinion, is it possible that the ECU will adjust to constant P0420, P0036 and P0039 codes over time?
I've heard "adaptation tables" on the forum recently, but haven't been following it that closely to know if this was you who mentioned it, or someone else...
What I do know is that my car appears to be running much richer now, in the last 4k miles or so, based on the condition of the stock tailpipes and black soot that now covers my rear hatch extensively.
I also get these three codes on a regular basis now.
Up till now, I considered them nuisances only, but with the evidence of it running rich, I'm not too sure now.
Any chance that clearing the codes will also reset the adaptation tables?
If not, what tools would be required to do so???
Thanks (and hopefully not too far off topic).
#24
Joe, the pre-cat and post-cat O2's actually play a major role in the ecu's adaptation values... anybody who tells you otherwise don't truly understand the Mini Ecu and don't know what they are talking about.
Do the following:
- clear your codes with a scan tool
- clear the adaptation values by resetting your ecu
(https://www.northamericanmotoring.co...ni-viagra.html)
Check with MDBstat, he's having the same issues as you with the car running rich due to ecu's over compensation due to the CEL lights.
Hope this helps.
mike
Do the following:
- clear your codes with a scan tool
- clear the adaptation values by resetting your ecu
(https://www.northamericanmotoring.co...ni-viagra.html)
Check with MDBstat, he's having the same issues as you with the car running rich due to ecu's over compensation due to the CEL lights.
Hope this helps.
mike
#25
Do the following:
- clear your codes with a scan tool
- clear the adaptation values by resetting your ecu
(https://www.northamericanmotoring.co...ni-viagra.html)
Hope this helps.
mike
- clear your codes with a scan tool
- clear the adaptation values by resetting your ecu
(https://www.northamericanmotoring.co...ni-viagra.html)
Hope this helps.
mike
I hadn't heard of anything being required besides resetting the idiot light.
Very cool!
Thanks!