gemellocattivo.com

Which means "Evil Twin". Lets see your projects where you change boring into fun or create the fun from scratch.
It is currently Thu Mar 28, 2024 11:12 am

All times are UTC - 5 hours [ DST ]




Post new topic Reply to topic  [ 17 posts ]  Go to page Previous  1, 2
Author Message
PostPosted: Wed Mar 23, 2016 2:43 pm 
Offline

Joined: Sun Oct 11, 2015 2:07 pm
Posts: 134
mk e wrote:
Are you sure they do that with NB sensors? It sounds possible but I've not hear of anyone doing it on anything but WB sensors.

On my setup I have a WB sensor in the bank collector and plan to use that reading to "calibrate" the cylinder NB cylinder readings....haven't written that code yet though. For now I'll just check the cyl-cyl variation at 1.0 lambda and call it a day but I know the system can do more than that with a little work.


Yes, definitely NB sensors, all of them (upstream and downstream) were temperature controlled.

For NB calibration, a simple 4-point curve was used to calculate a more linear but not lambda value, which was used directly in a PID control without considering it a 'lambda'. For cylinder balancing, that's probably good enough. If the cylinder is at stoich it should be switching between lean and rich and the values don't really matter much.

I would probably do cylinder balancing using only the NB sensors, so each of them runs a separate control loop to 0.45 volts. Then, make a cylinder correction surface for each cylinder, lower resolution speed vs load (maybe 5x5?) and run the algorithm at each cell. The cell values would be the O2 control value for that cylinder minus the average of all of the O2 corrections (so the average of all of the cylinder tables should be 0). The average of all of the cylinder corrections should be equivalent to the correction that would come from a single wideband, and should be attributed to VE and not a cylinder.

_________________
"Sometimes, the elegant implementation is a function. Not a method. Not a class. Not a framework. Just a function." ~ John Carmack

"Any sufficiently advanced technology is indistinguishable from magic" ~Arthur C. Clarke


Top
 Profile Send private message  
 
PostPosted: Wed Mar 23, 2016 3:02 pm 
Online

Joined: Thu Jan 01, 2015 6:47 pm
Posts: 4251
apalrd wrote:

Yes, definitely NB sensors, all of them (upstream and downstream) were temperature controlled.

For NB calibration, a simple 4-point curve was used to calculate a more linear but not lambda value, which was used directly in a PID control without considering it a 'lambda'. For cylinder balancing, that's probably good enough. If the cylinder is at stoich it should be switching between lean and rich and the values don't really matter much.

I would probably do cylinder balancing using only the NB sensors, so each of them runs a separate control loop to 0.45 volts. Then, make a cylinder correction surface for each cylinder, lower resolution speed vs load (maybe 5x5?) and run the algorithm at each cell. The cell values would be the O2 control value for that cylinder minus the average of all of the O2 corrections (so the average of all of the cylinder tables should be 0). The average of all of the cylinder corrections should be equivalent to the correction that would come from a single wideband, and should be attributed to VE and not a cylinder.


hmmm.....I'm pretty sure non of the aftermarket ECUs do anything but power the heater when the ignition is on. I could maybe look at the current flow though to know the temp....in theory.

A NB output is continuous full rich to full lean, it just has poor resolution and temperature sensitively at other than stoic and but fantastic resolution near stoich any switching that happens on OEM setups is the ECU altering mixture, generally for cat efficiency.

My plan is is to use the NB info for cylinder VE correction tables that I set up as 1/2 the resolution of the main table....but maybe less would do. I'll do the main VE based on the WB sensor then at stoic go in and trim the cylinders using the NB data. This will be done manually for now.

My longer term plan is to use the cylinder data to compensate for TBs drifting out of sync. Enginelab has the ability to save a long term trim values and I thing I can continuously "calibrate the NB sensors using the WB data then auto update the cylinder trims and use that info to create long term trims....I can probably spend the rest of my life "improving the control logic :D


Top
 Profile Send private message  
 
PostPosted: Wed Mar 23, 2016 3:12 pm 
Offline

Joined: Sun Oct 11, 2015 2:07 pm
Posts: 134
mk e wrote:
hmmm.....I'm pretty sure non of the aftermarket ECUs do anything but power the heater when the ignition is on. I could maybe look at the current flow though to know the temp....in theory.

A NB output is continuous full rich to full lean, it just has poor resolution and temperature sensitively at other than stoic and but fantastic resolution near stoich any switching that happens on OEM setups is the ECU altering mixture, generally for cat efficiency.

My plan is is to use the NB info for cylinder VE correction tables that I set up as 1/2 the resolution of the main table....but maybe less would do. I'll do the main VE based on the WB sensor then at stoic go in and trim the cylinders using the NB data. This will be done manually for now.

My longer term plan is to use the cylinder data to compensate for TBs drifting out of sync. Enginelab has the ability to save a long term trim values and I thing I can continuously "calibrate the NB sensors using the WB data then auto update the cylinder trims and use that info to create long term trims....I can probably spend the rest of my life "improving the control logic :D


You could switch from WB control to NB control when the target lambda is close to 1, and adapt the cylinder trims then, but when target lambda goes off 1, switch to WB control per bank.

I would set it up with PI controllers on each NB, and a PI controller on each WB. When operating on NB, the average of all of the I-terms on a bank is subtracted from all of them and added to the WB I term (but the WB-based PI control is turned off). When on WB control, the WB is used to calculate the WB I term and the NB I-terms are fixed.

Or, you could save coding time and do it once manually

_________________
"Sometimes, the elegant implementation is a function. Not a method. Not a class. Not a framework. Just a function." ~ John Carmack

"Any sufficiently advanced technology is indistinguishable from magic" ~Arthur C. Clarke


Top
 Profile Send private message  
 
PostPosted: Wed Mar 23, 2016 3:58 pm 
Online

Joined: Thu Jan 01, 2015 6:47 pm
Posts: 4251
apalrd wrote:
You could switch from WB control to NB control when the target lambda is close to 1, and adapt the cylinder trims then, but when target lambda goes off 1, switch to WB control per bank.

I would set it up with PI controllers on each NB, and a PI controller on each WB. When operating on NB, the average of all of the I-terms on a bank is subtracted from all of them and added to the WB I term (but the WB-based PI control is turned off). When on WB control, the WB is used to calculate the WB I term and the NB I-terms are fixed.

Or, you could save coding time and do it once manually


That seems overly complex. I'm thinking I'll work with the NB reading and the trim factor directly and just update the trim value with a slow running average of the error and it will be plenty good enough....or maybe it won't and I'll come to appreiate a more complex approach :)

This is a ways out though...first it needs to run.


Top
 Profile Send private message  
 
PostPosted: Wed Mar 23, 2016 4:21 pm 
Offline

Joined: Sun Oct 11, 2015 2:07 pm
Posts: 134
mk e wrote:
That seems overly complex. I'm thinking I'll work with the NB reading and the trim factor directly and just update the trim value with a slow running average of the error and it will be plenty good enough....or maybe it won't and I'll come to appreiate a more complex approach :)


If you sometimes enable a NB trim, it will eventually accumulate error and result in a correction factor. If you do this without any WB feedback, it's likely that all of the cylinders would be corrected up or down. Then, when you switch to WB feedback, it's possible that there is slightly too much trim, so the WB will trim it back out with a slight trim in the other direction. Then, when you switch back to NB again, they might want a little more positive, etc. and the two adaptives will start to walk away from each other in opposite directions. If both NB and WB are enabled together, this can happen very rapidly under the right conditions.

To prevent this, the NB trim must strictly trim the cylinder to it's bank average. The bank average of NB trims can be used to replace the WB trim, this will prevent the overall bank trim from getting baked into the cylinder trim tables and keeps the trims separate.

_________________
"Sometimes, the elegant implementation is a function. Not a method. Not a class. Not a framework. Just a function." ~ John Carmack

"Any sufficiently advanced technology is indistinguishable from magic" ~Arthur C. Clarke


Top
 Profile Send private message  
 
PostPosted: Wed Mar 23, 2016 8:43 pm 
Online

Joined: Thu Jan 01, 2015 6:47 pm
Posts: 4251
apalrd wrote:
If you sometimes enable a NB trim, it will eventually accumulate error and result in a correction factor. If you do this without any WB feedback, it's likely that all of the cylinders would be corrected up or down. Then, when you switch to WB feedback, it's possible that there is slightly too much trim, so the WB will trim it back out with a slight trim in the other direction. Then, when you switch back to NB again, they might want a little more positive, etc. and the two adaptives will start to walk away from each other in opposite directions. If both NB and WB are enabled together, this can happen very rapidly under the right conditions.

To prevent this, the NB trim must strictly trim the cylinder to it's bank average. The bank average of NB trims can be used to replace the WB trim, this will prevent the overall bank trim from getting baked into the cylinder trim tables and keeps the trims separate.


I wasn't thinking there was value in switching between WB and NB for the bank closed loop....just use the WB. Then the NB are left with just the cyl-cyl with shouldn't be subject to drift. I may want to limit the the lambda range where updates to the cyl correction are allowed but I'm thinking KISS is the way to go until I have a reason to make it complicated.

I'll probably break all this out to a separate thread in teh programming section so its not lost in the 100s of pages here.


Top
 Profile Send private message  
 
PostPosted: Thu Mar 24, 2016 11:39 am 
Online

Joined: Thu Jan 01, 2015 6:47 pm
Posts: 4251
This is split out of the V12 thread


Top
 Profile Send private message  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 17 posts ]  Go to page Previous  1, 2

All times are UTC - 5 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group