DIYPNP install: inital tuning
#101
![Default](https://www.miataturbo.net/images/icons/icon1.gif)
Hi Greg#
Sorry to highjack your thread but i have a few questions for you.
I've just built the main board on my diypnp and im now looking at the adapter board.
I can't seem to find the pinouts for the '96 euro ecu anywhere.
How did you figure yours out?
And did you install the pullups that are shown here on your ecu? http://www.diyautotune.com/diypnp/ap...3-16b6-mt.html
Thanks
Sorry to highjack your thread but i have a few questions for you.
I've just built the main board on my diypnp and im now looking at the adapter board.
I can't seem to find the pinouts for the '96 euro ecu anywhere.
How did you figure yours out?
And did you install the pullups that are shown here on your ecu? http://www.diyautotune.com/diypnp/ap...3-16b6-mt.html
Thanks
#105
![Default](https://www.miataturbo.net/images/icons/icon1.gif)
Can anyone school me on idle valve frequency? I'm running a multiplier of 5, so it's at 156 and 2% steps- coarser. Can I run it at finer steps but lower frequency, or will that slow down the reaction of the valve?
#108
![Default](https://www.miataturbo.net/images/icons/icon1.gif)
My curiosity piqued, I cleaned the idle valve (allegedly cleaned before MS install). Quite a bit of carbon removed from the air passages. The water lines were also clogged with rust. Cleaned that off. Idle valve seems to be a little more responsive. Maybe the part of the idle valve that reacts to water temperature changes is working better?
I did try inverted mode-- umm no.
idle spiked way up, like idle test mode
I also reversed the check valve for idle air, just to make absolutely sure the check valve was oriented correctly-- nope that froze the valve at 40 duty!
Engine was too hot to get to the reversed check valve, so I just unplugged the hose at the dummy throttle body. Which leass to this question-why can't I just put an air filter right at the idle valve? Would there be a difference if it was "unthrottled air"? Or run that hose to a source of ambient temp air (every little bit helps)??
Idle is probably as good as it gets for now. I enabled EGO control from 900 rpm up, and this seems to have stabilized the AFRs even more without upsetting the balancing act of the PID.
Looking at the battery/alternator voltages-- 10.7v on AC engagement just can't be correct. It also corresponds to the idle droop on AC engagement. I think I'll be changing to a new alternator, at the very least for peace of mind.
I did try inverted mode-- umm no.
![Laugh](https://www.miataturbo.net/images/smilies/laugh.gif)
![Noob](https://www.miataturbo.net/images/smilies/noob.gif)
I also reversed the check valve for idle air, just to make absolutely sure the check valve was oriented correctly-- nope that froze the valve at 40 duty!
![Laugh](https://www.miataturbo.net/images/smilies/laugh.gif)
Idle is probably as good as it gets for now. I enabled EGO control from 900 rpm up, and this seems to have stabilized the AFRs even more without upsetting the balancing act of the PID.
Looking at the battery/alternator voltages-- 10.7v on AC engagement just can't be correct. It also corresponds to the idle droop on AC engagement. I think I'll be changing to a new alternator, at the very least for peace of mind.
![Name: 430voltagedrop.png
Views: 199
Size: 82.2 KB](https://www.miataturbo.net/attachments/megasquirt-18/189318d1501220610-diypnp-install-inital-tuning-430voltagedrop.png)
Last edited by Greg G; 04-30-2011 at 08:24 AM.
#109
Boost Czar
![](/mt2011/images_td/ranks/supporter1.gif)
![](/mt2011/images_td/ranks/admin.png)
iTrader: (62)
Join Date: May 2005
Location: Chantilly, VA
Posts: 79,688
Total Cats: 4,113
![Default](https://www.miataturbo.net/images/icons/icon1.gif)
you dont need a new alt.
you dont need to change the polarity
you dont need to change check valves
you dont need to hire a voodoo magic lady
you dont need to change the headlight fluid.
everyone has voltage drop with activation. if you check your battery with a DMM it will probably show higher voltage than what TS shows.
and of course the rpms go open when you unplug the valve...that way if it fails the car can idle in a sort of limp mode.
you are going crazy trying to prevent the idle from drooping a little when you turn on the a/c. sure its not perfect but there's really nothing more you can do, you could try opening the purge valve at the same time as some people report back saying that helps. but all the MS can do is react to the change. the rpms drop due to the increased load and then the MS says oh ****, gotta increase idle speed. it looks like you have it well tuned to stabilize and idle smooth at that point. so i dunno why you are pulling hairs here. how many times do you turn the a/c on and off in a drive at idle?
you dont need to change the polarity
you dont need to change check valves
you dont need to hire a voodoo magic lady
you dont need to change the headlight fluid.
everyone has voltage drop with activation. if you check your battery with a DMM it will probably show higher voltage than what TS shows.
and of course the rpms go open when you unplug the valve...that way if it fails the car can idle in a sort of limp mode.
you are going crazy trying to prevent the idle from drooping a little when you turn on the a/c. sure its not perfect but there's really nothing more you can do, you could try opening the purge valve at the same time as some people report back saying that helps. but all the MS can do is react to the change. the rpms drop due to the increased load and then the MS says oh ****, gotta increase idle speed. it looks like you have it well tuned to stabilize and idle smooth at that point. so i dunno why you are pulling hairs here. how many times do you turn the a/c on and off in a drive at idle?
#110
![Default](https://www.miataturbo.net/images/icons/icon1.gif)
Well damn I forgot the headlight fluid! :P
Well practically everyone in this forum has a higher voltage than me! And considering there are correction factors that come into play to extend dwell time and adjust injector pulses based on voltage...I figure it's worth a shot
But thanks for noticing the nice idle ![wink](https://www.miataturbo.net/images/smilies/wink.gif)
And Manila traffic? Mmm, I could spend long stretches at idle in the tropical heat... :P
Well practically everyone in this forum has a higher voltage than me! And considering there are correction factors that come into play to extend dwell time and adjust injector pulses based on voltage...I figure it's worth a shot
![](https://www.miataturbo.net/images/smilies/smile.gif)
![wink](https://www.miataturbo.net/images/smilies/wink.gif)
And Manila traffic? Mmm, I could spend long stretches at idle in the tropical heat... :P
#112
![Default](https://www.miataturbo.net/images/icons/icon1.gif)
![Idea](https://www.miataturbo.net/images/smilies/sign0184.gif)
Yup PID is 4/40/2. Seems to be very sensitive to P, will add a little and post results. Thanks!
Last edited by Greg G; 04-30-2011 at 07:19 PM.
#113
![Default](https://www.miataturbo.net/images/icons/icon1.gif)
Added P, as suggested. After much fiddling about (made about 20 variations), the 2 stable closed loop PID settings or my car are:
1. 45/42/2
2. 85/40/25
Seen in the graph is the first, 45/42/2. The ghost graph is 85/40/25.
Both stabilize the idle in about the same time, but the 2nd combination ramps up the PWM duty a bit faster, and you can see the idle droop recovery starts faster. The idle duty values are a little different, but the relative values are similar. Combination one is juuust a bit more sedate when it reaches steady state.
![Name: 53pidtuned.png
Views: 201
Size: 152.3 KB](https://www.miataturbo.net/attachments/megasquirt-18/189235d1501220370-diypnp-install-inital-tuning-53pidtuned.png)
So today's lesson-- don't be afraid of D! Jason gave me a great analogy--suspension tuning! The P is like the spring rate, and the D is like the shock damping. That helped the concept gel together even more in my head. All this time I was trying to keep D to the absolute minimum. Hope this helps others with their tuning adventures!
1. 45/42/2
2. 85/40/25
Seen in the graph is the first, 45/42/2. The ghost graph is 85/40/25.
Both stabilize the idle in about the same time, but the 2nd combination ramps up the PWM duty a bit faster, and you can see the idle droop recovery starts faster. The idle duty values are a little different, but the relative values are similar. Combination one is juuust a bit more sedate when it reaches steady state.
![Name: 53pidtuned.png
Views: 201
Size: 152.3 KB](https://www.miataturbo.net/attachments/megasquirt-18/189235d1501220370-diypnp-install-inital-tuning-53pidtuned.png)
So today's lesson-- don't be afraid of D! Jason gave me a great analogy--suspension tuning! The P is like the spring rate, and the D is like the shock damping. That helped the concept gel together even more in my head. All this time I was trying to keep D to the absolute minimum. Hope this helps others with their tuning adventures!
#114
![Default](https://www.miataturbo.net/images/icons/icon1.gif)
To extend the analogy, the 'I' is like a self leveling rear suspension in a minivan. When you add load to the rear, it will slowly pump up the suspension.
Hmm, the D seems to be implemented funny. The downward slope of RPM in and of itself should cause the duty cycle to increase and peak before the RPM reaches the lowest point. This helps arrest the dip, making the dip shallower. Here it peaks *after* the RPM has reaches its lowest point.
And why the heck does the duty cycle go down when the RPm is still below target??
Greg can you try adding more D?
Did the coders put in a too aggressive "high pass filter" on the input or output of the D ? This would reduce its effectiveness.
What's the time between updates that the idle PID loop takes?
What's the time it takes from the point where the RPM begins to drop, to the time it reaches the min point?
If the former is > ~ 1/4th of the latter, then the sampling rate is too slow; the loop reacts too slowly.
Additionally the "phase lag" that the slow sampling produces, will cause 'P' to be prematurely oscillatory - i.e. you can't run an aggressive 'P'; and the said lag renders the 'D' less effective too.
Greg, first try halving the loop time to see if it affects the response then increase D then P.
Hmm, the D seems to be implemented funny. The downward slope of RPM in and of itself should cause the duty cycle to increase and peak before the RPM reaches the lowest point. This helps arrest the dip, making the dip shallower. Here it peaks *after* the RPM has reaches its lowest point.
And why the heck does the duty cycle go down when the RPm is still below target??
Greg can you try adding more D?
Did the coders put in a too aggressive "high pass filter" on the input or output of the D ? This would reduce its effectiveness.
What's the time between updates that the idle PID loop takes?
What's the time it takes from the point where the RPM begins to drop, to the time it reaches the min point?
If the former is > ~ 1/4th of the latter, then the sampling rate is too slow; the loop reacts too slowly.
Additionally the "phase lag" that the slow sampling produces, will cause 'P' to be prematurely oscillatory - i.e. you can't run an aggressive 'P'; and the said lag renders the 'D' less effective too.
Greg, first try halving the loop time to see if it affects the response then increase D then P.
Last edited by JasonC SBB; 05-03-2011 at 04:35 PM.
#115
Boost Czar
![](/mt2011/images_td/ranks/supporter1.gif)
![](/mt2011/images_td/ranks/admin.png)
iTrader: (62)
Join Date: May 2005
Location: Chantilly, VA
Posts: 79,688
Total Cats: 4,113
![Default](https://www.miataturbo.net/images/icons/icon1.gif)
you should turn on the A/C and add I until you reach your target. that's all you need.
then tune P to react to changes and keep **** steady when it gets upset form AFR changes or whatnot, and D to smooth it out all....that's what I do at least.
then tune P to react to changes and keep **** steady when it gets upset form AFR changes or whatnot, and D to smooth it out all....that's what I do at least.
#116
![Default](https://www.miataturbo.net/images/icons/icon1.gif)
![wink](https://www.miataturbo.net/images/smilies/wink.gif)
P and D work hand in hand. D prevents P from oscillating; it allows aggressive P. Lots of P is what makes the duty cycle open up as the RPM dips.
In the same way stiff springs (high P), require matching stiffer shocks (high D).
Additionally, 'D' is "anticipatory" in that it doesn't wait for the RPM to dip before applying lots of duty cycle. The downward *slope* in RPM caused D to produce lots of duty cycle. This is important in reducing the depth of the dip. You need duty cycle to open up *before* the RPM reaches its bottom.
A control loop relying on 'I' will be slow.
Cheers,
Jason
Control systems engineer
#117
Boost Czar
![](/mt2011/images_td/ranks/supporter1.gif)
![](/mt2011/images_td/ranks/admin.png)
iTrader: (62)
Join Date: May 2005
Location: Chantilly, VA
Posts: 79,688
Total Cats: 4,113
![Default](https://www.miataturbo.net/images/icons/icon1.gif)
thats what works for me. i have razor smooth idle logsssss.
right now I have 3/15/45. any more P and it oscillates like a bitch...but i think that's because theres no adjustable deadzone.
also probably because my min and max rpm points are fairly tight at 700-1300. It was suggested to me to expand the range to reduce sensitivity.
right now I have 3/15/45. any more P and it oscillates like a bitch...but i think that's because theres no adjustable deadzone.
also probably because my min and max rpm points are fairly tight at 700-1300. It was suggested to me to expand the range to reduce sensitivity.
Last edited by Braineack; 05-03-2011 at 05:10 PM.
#118
![Default](https://www.miataturbo.net/images/icons/icon1.gif)
thats what works for me. i have razor smooth idle logsssss.
right now I have 3/15/45. any more P and it oscillates like a bitch...but i think that's because theres no adjustable deadzone.
also probably because my min and max rpm points are fairly tight at 700-1300. It was suggested to me to expand the range to reduce sensitivity.
right now I have 3/15/45. any more P and it oscillates like a bitch...but i think that's because theres no adjustable deadzone.
also probably because my min and max rpm points are fairly tight at 700-1300. It was suggested to me to expand the range to reduce sensitivity.
![](https://www.miataturbo.net/images/smilies/smile.gif)
The 3.1.1 'mariob v5' firmware added an adjustable dead zone around target (PID RPM hysteresis). I have it at 30rpm, perhaps that's why I was able to run more P. I should also mention that when i found 85/42/25 to work, I tried fine tuning it. Very small changes in any of the 3 variables (for example 85/45/25 or 85/42/20)upset the balance, causing big oscillations.
The PID control interval is currently set to 100ms. I'll try reducing it.
With regard to D, I do have some data on it, maybe you can spot something I don't see. In the following graphs, the ghost graph is always 85/40/25. Only D is changed.
85/40/20
![Name: 53d20vs25-1.png
Views: 136
Size: 31.4 KB](https://www.miataturbo.net/attachments/megasquirt-18/189223d1501220341-diypnp-install-inital-tuning-53d20vs25-1.png)
85/40/30
![Name: 53d30vs25-1.png
Views: 133
Size: 29.9 KB](https://www.miataturbo.net/attachments/megasquirt-18/189224d1501220341-diypnp-install-inital-tuning-53d30vs25-1.png)
85/40/40
![Name: 53d40vs25-1.png
Views: 135
Size: 38.0 KB](https://www.miataturbo.net/attachments/megasquirt-18/189225d1501220341-diypnp-install-inital-tuning-53d40vs25-1.png)
Last edited by Greg G; 05-03-2011 at 07:19 PM.
#119
![Default](https://www.miataturbo.net/images/icons/icon1.gif)
Such small changes causing oscillation means the control loop is not robust.
Any external factors, such as higher ambient temps, will probably cause your "good" setting, to oscillate.
A control loop should be stable and reasonably fast with 30% changes to P, I, or D. (3 dB changes in control system parlance).
Also, the fact that the duty cycle and RPM sinusoids are nearly perfectly out of phase, as opposed to the duty cycle "leading" the RPM waves, tells me the D isn't helping prevent the oscillation. The simple out of phase relationship suggests it's all P and no D.
Something funny's going on. It may simply be sampling rate too slow. Or it may be that you need to reduce I to be able to use an aggressive P and D.
Lastly, the large "throttled volume" in a hotside s/c setup requires a lot of 'D' to make stable. This is because the volume appears as a "phase lag" (delayed reaction) in the system, and 'D' is "anticipatory" and thus counteracts said lag.
However, if the 'D' calculation is screwed up....
Any external factors, such as higher ambient temps, will probably cause your "good" setting, to oscillate.
A control loop should be stable and reasonably fast with 30% changes to P, I, or D. (3 dB changes in control system parlance).
Also, the fact that the duty cycle and RPM sinusoids are nearly perfectly out of phase, as opposed to the duty cycle "leading" the RPM waves, tells me the D isn't helping prevent the oscillation. The simple out of phase relationship suggests it's all P and no D.
Something funny's going on. It may simply be sampling rate too slow. Or it may be that you need to reduce I to be able to use an aggressive P and D.
Lastly, the large "throttled volume" in a hotside s/c setup requires a lot of 'D' to make stable. This is because the volume appears as a "phase lag" (delayed reaction) in the system, and 'D' is "anticipatory" and thus counteracts said lag.
However, if the 'D' calculation is screwed up....
Last edited by JasonC SBB; 05-03-2011 at 07:45 PM.
#120
Elite Member
![](/mt2011/images_td/ranks/supporter1.gif)
iTrader: (10)
Join Date: Jun 2006
Location: Athens, Greece
Posts: 5,987
Total Cats: 359
![Default](https://www.miataturbo.net/images/icons/icon1.gif)
The throttled volume is the problem here. Every car I've tuned so far on the new firmware works very well - except for SCed cars without the dual throttle body mod. I'm able to keep a steady 800/1000rpm idle on my car, without/with the A/C on, +/- 20rpm, which is what the OEM behaves likes.