Thursday, December 31, 2015

Closed Loop Idle REV 2.0

Closed Loop Idle REV 2.0

Rev 2.1 of this is post is available - check it out - new and improved !

Overview
CLI is intended to help keep steady idle when load on the engine change, AC, fans, lights etc',
and when high or low CLT and MAT represented to the engine.

CLI control the idle valve which is an air valve that bypass the throttle.
You can help controlling the idle with ignition degree change:
More ignition degree = higher rpm.
Less ignition degree = lower rpm.

On my car it was not needed, but good to know.

After some time you run open-loop (PWM-Warmup) and all is good, meaning the idle valve is operational, you can get a relatively good idle and AFR, it is time to try CLI.

Let's dive in, put your swimsuit on.

Closed Loop Idle 

CLI is dynamic air correction mechanism using PWM-idle air valve.

PWM-idle air valve allow air in the engine when the throttle is closed, when the gas paddle is lifted.

CLI will automatically control the PWM-idle air valve in order to take care of air supply to the engine.

Change "Algorithm" to "Closed-loop"




Main CLI menu:


If you look carefully at the sub menus in this form you can see three sub menus concerning PID and one sub menu concerning CLI valve...

The first sub menu - "Closed Loop Idle Valve setting" has a little misleading name, this settings define the behavior of the valve when releasing the throttle paddle not when CLI is on. 
When in open-loop. 
Eventually leading to idle.

So, in "Closed Loop Idle" settings, you define IAC(idle air control valve) behavior when in open-loop (PID disabled) and for closed-loop (PID enabled).

I know it is a little confusing, but this is how it is...
A part of CLI settings is open loop IAC behavior - on its way to closed-loop.

The other three PID menus define the delay, behavior and activation values for PID operation.
We start at the first sub menu:

Closed Loop Idle Valve setting:
Idle Valve Close Duty(%): Remember "Output Test mode - Idle Valve" ? put the value you've found, here.
(max closed %)
Idle Valve Open Duty(%): same as above (max opened %)
Dahspot Adder(%): The amount of valve % to add when throttle is lifted. (getting ready for idle rpm)
Dahspot Decay Factor(sec?): How long will it take the adder above to decline to 0 - leaving CLI to follow regular CLITR (Closed Loop Idle Target RPM)
Use Last Value Or Table: "Use initial value table" the other option "use last value" did not work good for me.
Use CLT Or MAT In Table Lookup: I use MAT
Close Delay(s): How long will it take the valve to close when throttle is pressed.
Leave Valve Closed Above(rpm): as it says.
For This Number Of Seconds(s): as it says.

Next sub-menu:

Closed-Loop Idle PID Delays And Behavior
PID Delay(s): tool tip
Crank To Run Taper(s): How long to keep following  "Idle Cranking Duty/Steps" curve after engine start
PID Ramp To Target Time(s):  tool tip
PID Control Interval(ms): tool tip
PID Disable RPMdot: tool tip

Closed-Loop Idle PID Activation Settings
Idle Activation TPS Threshold(%): highest TPS that allow PID activation.
RPMdot Thershold(rpm/sec): RPM change speed, how fast the rpm change, close to idle or in idle it will be slow (30rpm/sec is slow)
Max Decel Load(%): Lowest MAP that allow PID activation, should be a little below idle MAP.
PID Lockout On Switch Active: If clutch switch is present you can use it here as CLI activator.
PID RPM Window Size (1=Off): tool tip(?)

Closed Loop Idle PID Gains
tool tips

Settings and settings...., let's talk about the whole CLI concept and what happens when.

When I was tuned to run PWM-Warmup (open-loop idle) I had the IAC (Idle Air Control) set to a specific (low) value for idle.

Goods:
- Easy to set up
- Works (sometimes)

Bads:
- Not dynamic - when load at idle is represented to the system the idle rpm will drop and may even stall, same with low\high CLT and MATit would not "care", it would just do the same (same IAC %) leading to oscillation, too low or too high idle.
- When the throttle is lifted and the clutch is pressed, the rpm run down pretty fast, the static IAC % will not be enough to "hold" and "stop" the rpm from taking a deep dive below desired idle...


CLI - what happen when.
The first trigger that will make MS look into this menu and check what to do is: throttle lift.
When you lift your feet from the throttle, MS is checking to see what IAC % to use in order to give the rpm a "soft" landing just before (=Dashpot Adder) idle (PID idle).

Ok ?

MS will find the answer in "Closed-Loop Idle Initial Values" - meaning, what IAC % @ what MAT/RPM.
I will address this table in a sec.

MS checks the CLT and the looks at CLITR (Closed-Loop Target RPM) to know what IAC % to use.
Next,
So, now the IAC is standing by opened, rpm is decreasing, MS checks for  Closed-Loop Idle PID Activation Settings, TPS is good, RPMdot will be good when the rpm will get close to idle range and Max decel Load will be here when the rpm has "landed" and  the engine is close to normal idle MAP (around 30kpa).

NOW ! PID takes control of the rpm following Closed Loop Idle PID Gains as behavior guidelines.

k ?

1. Throttle lifted
2. IAC % for RPM soft "landing"
3. RPM "landed"
3. PID conditions are met
4. PID controls idle
5. Throttle pressed
6. PID disabled
7. IAC closed

Good ? k !


Closed-Loop Idle Initial Values:
This is the default map values, it is good to start with, I think it will give a little high initial idle but it is great to start with.
After you see/feel that CLI is working, you can tune this little map.




How to tune it ?

Start with 40% in all cells, and keep in mind that low MAT will need less % and high MAT will need more %.

Tune it !

MegaLog Viewer - MLV
If you want to check CLI status in MLV - if MS is in CLI or not, you can choose "status2", when it is 0 CLI is off, when it is 128 CLI is on.


When status2=128 it means that PID is enabled ! 
The whole IAC % landing the rpm is happening before that (every time you lift your feet from the throttle), so you can see in the log that the IAC% is up and status2=0 this is because PID is not active yet, but the IAC % is ready for the rpm...

k ?

Tuner studio
You can add a CLI indicator to TS - just remember it is just the PID activation indicator !




More REV2 to come....

Thursday, September 24, 2015

Mileage, AFR and EGT

Hey,

After some time reading around I have come up with some good info about mileage, AFR and EGT !

Problems:
1. High EGT @ cruise.
2. **Bad** mileage.

Solutions:
1. 40deg~ @ cruise + 15.5:1 AFR (you can go as lean as possible if EGT is good, there is no knock  and no misfire)
2. Lean the map out ! (and read about TPS based AFR table)

The first thing you must understand in the simple truth that if you use less fuel you will have better mileage, simple ah ? turbo likes fuel... we don't like bad mileage, must find good balance...

First thing to do is to tune cruise right, as I stated above, around 40deg~ with lean AFR, you can test how lean you can go just keep in mind, not to high EGT (less then 800C/1500F), no knock and no misfire.

Now cruise is economic as possible.
Tune your idle @ 14.7.

WOT will be 11.5-12.
And the problematic area is the transit area, above 100kpa and below max boost (190kpa in my case).

I use a small turbo (TD04-13C, 40/53mm compressor), every little tip on the gas pedal will get me in to boost (above 100kpa), it can happen starting from a stop light or passing lanes or cars on the highway - when there is no intention to get into boost.

On a "normal" rich AFR map you will see AFR drop from stoich when approaching 100kpa and when passing it it will drop even more - it does not matter how long you "visited" those areas.

We can try and set the AFR table for lean AFR @ 100kpa and above - all before max boost, but it will result a very lean mixture @ 100kpa, if we ever run N/A again it can be a problem. (some times I disconnect my WG in order to run N/A)

Well, a friend of mine told me he runs a TPS based AFR table... very interesting...
AFR will change according to your TPS, high TPS = low AFR, low TPS = high AFR.

It leads to 14.7 in boost sometimes O_O - but for a brief moment while I check my EGT and knock.
He runs this map a few years with great results, I'm starting now - hoping to get good mileage too.

AFR based on TPS as load:


How to enable TPS as load for AFR:









Monday, April 27, 2015

DIY - Use your smartphone as detonation detection tool !

Hey !

Today I will show you how to use your smartphone as a detonation detection tool !

What you need:
- Smartphone with 3.5mm jack utilizing stereo out + microphone.
Like this: (this is a male connector, your smartphone is obviously female, just make sure your original headset jack is the same as in the picture below)

- External Stereo/Microphone adapter
Like this:

- Simple PC Microphone
Like this:

Can be found in any cheap PC microphone and many other devices,

- Alligator style clip
Like this:

- 3m (or any size that fits you) cable for the microphone 

Solder the mic to the cable and place it in the clip
Like this: 


Solder the other end of the cable to a jack
Like this:

Isolated headphone with good noise cancellation 
Like this:



Now your hardware is ready !

You connect the adapter to your smartphone, mic to adapter and headphones to adapter.

Just download an app that keep the mic open (any recording app will do) and you have a DIY  detonation detection tool !

Connect the clip to the engine block, in a typical knock sensor location (for best results)

You can control the volume with the smartphone volume (daaa) :)

P.S You can use a real knock sensor if you want (two wires)
Like this:



:)






Tuesday, March 10, 2015

VE, spark and EGT, I think I got it...

Hey,

I started notice that my EGT while cruising is alarmingly high.

I could get up to 950C/1750F+, at first I thought the EGT is off (it does have a bad ground and the needle jumps around sometimes)

One drive when I was cruising @ 100kph/60mph~ I saw the EGT is very high, for every little gas pedal moment the EGT would raise even more...

It was dark, I pulled over and opened the hood, the exhaust manifold and the turbo turbine were glowing red like I never saw it !

Investigation begins...

Many reading days later, conclusions:

- Higher BTDC degree = Less EGT = Less power
- AFR lower or higher then 14.7 = Less EGT

My ignition map when EGT was too high:



The marked area is my cruise cells.




I added spark to the cruise area like so:



The EGT dropped by as much as 300C/570F~ !!
Of course the power in the area dropped too.

I'm ultra happy with my little win :)

Now I need to find the right balance between EGT and powa.

***UPDATE***

Beside the ignition map update I did something else that I didn't thought is responsible for the big change in EGT - I was wrong...

As I wrote:
- AFR lower or higher then 14.7 = Less EGT, max EGT @ 14.7

I changed my afr map - that is incorporated into ve table, so every change I make in the afr table should bring the afr to the value present.

High EGT AFR Table:




Keep in mind that my wideband could be off a little... still checking.

Low EGT AFR Table:




As  I wrote:
(real) 14.7 will get the highest EGT, lower or higher AFR should get lower EGT, so...

15.4 got me very high EGT, 14.7 gave very cool EGT, I think my wideband is a little off.
Could be my 15.4 is closer to real 14.7 and my 14.7 is lower then real 14.7.

I need to find a way to check that.

Anyway the AFR change made the big difference in EGT.

Change it and you will see the difference in no time.

:)

*****In the new post about mileage EGT and AFR I sort things out - please check it out.*****




Sunday, February 8, 2015

Sequential Injection, installation and setup #2

TunerStudio seq inj setup:


Settings to change:
Squirts Per Engine Cycle: 1
Injector Staging: Simultaneous

Sequential Injection: Sequential/Semi-sequential
Timing Trigger: End-of pulse
Fixed Timing or Table: Fixed Timing
Fixed injection Timing 1(deg): -350
Cranking Injection Timing 1(deg): 360
Injector Drivers: Additional drivers

k?
k!

When I was running batch, I used to hear that the injection timing is not right, but I couldn't do anything about it, now I can !

"Fixed injection Timing 1(deg)" will let you choose the deg you want the injector to shoot, you want it to shoot when the intake valve is closed.

You can play around with numbers, -350=370 if it makes it easier for you.
A full explanation can be found here:
http://www.jbperf.com/sequential/index.html

And here:
http://www.extraefi.co.uk/Seq_MS2.html

Make sure you use the numbers I gave or from DIYAUTOTUNE (which are the same).

Another thing, "Fixed Timing or Table", fixed timing of ~-350 will work, but a table with changing injection deg will work better (less fuel will be used)

This is the table I came up with:


This table works ok, if you want it perfect you need to tune it on a dyno.

Another advanced option, is "VE trim tables", when you enable this you can trim each injector in order to reach the same AFR/EGT on all cylinders...

I think you need 4 widebands/EGT for that.

After I finished installing and tuning seq inj, I've found out:

1. I need less fuel in general on fuel map - lower VE.
2. I don't need AE for now... (!) on the little tune trip I made I disabled AE and noticed car runs great ! (I will keep an eye on this)
3. Smoother idle - more accurate.
4. Better throttle response all around.

Thank you for reading !
Drop a comment !
Be safe !

Next:
Barometric correction for 14$

Sequential Injection, installation and setup #1

Hey,

I just finished installing and setting up my seq inj kit.

Let me show you what is it about.

I'm talking about DIYPNP, other MS ECUs already feature seq inj or they can be upgraded in a similar way - check specific instruction for you specific ECU.

The kit:
Kit


Installation instruction:
Instructions

You need to solder the kit male header to the location pointed in the pic:

After Installation:


I run my MS without seq inj for sometime (if  I knew about it the first place I would have installed it from day one...)

Anyway, the default inj installation is batch (running two injectors at the same time), so two injectors were connected to one driver, as follow:



 You can see that INJ1 shoot 4U and 4W and INJ2 shoot 4V and 4X.

The seq inj kit will give us 2 extra INJ drivers (4 total) INJ3,INJ4.
Now !
Which INJ to which  pin ? (4U,4W,4V,4X)
I had to contact support for that - I think it should be a part of the instruction...

The instruction does say :
Main board INJ1: Cylinder 1
Main board INJ2: Cylinder 3
Expansion board INJ3: Cylinder 4
Expansion board INJ4: Cylinder 2

But it does not say nowhere (I looked...) which pin represent which cylinder...

And the answer is (for 96-97 Miata):

Output "INJ1" - 4U - Cylinder 1 Injector
Output "INJ2" - 4W - Cylinder 3 Injector
Output "INJ3" - 4X - Cylinder 4 Injector
Output "INJ4" - 4V - Cylinder 2 Injector

96-97 Diagram - Page 9

My DIYPNP:



The black wire on the left is just passing through the hole on the PCB, on its way to 4V.









Tuesday, January 13, 2015

Sequential Injection Kit

Hey !

Sequential injection means firing each injector separately.
MS default is batch fire, meaning two injector fire at the same time.

Miata (94 and above) run sequential from factory, each injector wire goes all the way to the ECU separately.

So, if your Miata is 94 and above you should start off with sequential injection from the start.
In order to enable sequential injection, you need to add a little module to your MS (DIYPNP only) that will add two additional drivers for the injectors.

The module:

Sequential injection gives you: better efficiency, injection timing, idle smoother, idle smoother with larger injectors, better enrichment, better throttle response.


Do it ! it's good for you !