DIYPNP install: inital tuning - Page 18 - Miata Turbo Forum - Boost cars, acquire cats.

Welcome to Miataturbo.net   Members
 


MEGAsquirt A place to collectively sort out this megasquirt gizmo

Reply
 
 
 
LinkBack Thread Tools
Old 09-02-2011, 11:26 PM   #341
Junior Member
Thread Starter
 
Join Date: Jun 2007
Posts: 411
Total Cats: 0
Default

No idle tuning today, took the car out or a drive

This was taken while warming up. Looks like a bit too much P. Hardly noticeable in the car.

P100 I140 D6500


When the car was nice and hot, I did have 2 strange stalls when the AC engaged. Looking at the logs, the idle valve action was weird, like it started to react then stopped midway. Any ideas?
Attached Thumbnails
DIYPNP install: inital tuning-93p100i140d6500.png   DIYPNP install: inital tuning-93weirddroop.png  
Greg G is offline   Reply With Quote
Old 09-03-2011, 09:37 PM   #342
Junior Member
Thread Starter
 
Join Date: Jun 2007
Posts: 411
Total Cats: 0
Default

I think I figured out the weird rpm spike when turning ac off. When the AC turns off, the ECU goes out of closed loop idle for a bit then returns! Now to figure out why it goes out of closed loop....

Is it RPMdot?

Attached Thumbnails
DIYPNP install: inital tuning-93lockoutrpmrise.png  
Greg G is offline   Reply With Quote
Old 09-04-2011, 06:55 AM   #343
Supporting Vendor
iTrader: (10)
 
Reverant's Avatar
 
Join Date: Jun 2006
Location: Athens, Greece
Posts: 5,441
Total Cats: 198
Default

Map?
Reverant is offline   Reply With Quote
Old 09-04-2011, 09:20 AM   #344
Junior Member
Thread Starter
 
Join Date: Jun 2007
Posts: 411
Total Cats: 0
Default

Ooops forgot to attach the log and msq. Here they are...

Let me know if there are any major issues. Thanks Jim
Attached Files
File Type: msl 2011-09-02_11.25.48p100i140d6500.msl (184.1 KB, 74 views)
File Type: msq 2011-09-02_14.54.13spark.msq (84.8 KB, 59 views)

Last edited by Greg G; 09-04-2011 at 09:36 AM.
Greg G is offline   Reply With Quote
Old 09-04-2011, 11:34 AM   #345
Supporting Vendor
iTrader: (10)
 
Reverant's Avatar
 
Join Date: Jun 2006
Location: Athens, Greece
Posts: 5,441
Total Cats: 198
Default

Quote:
Originally Posted by Greg G View Post
I think I figured out the weird rpm spike when turning ac off. When the AC turns off, the ECU goes out of closed loop idle for a bit then returns! Now to figure out why it goes out of closed loop....

Is it RPMdot?
When you are idling, the PWM duty is say, 30%. With the A/C, it is 45%. When you disengage the A/C, you are left for a split second, without A/C and with a PWM duty at 45%. RPMs will naturally rise, a bit fast too, disabling the CL idle for a split second. Normal, move along.
Reverant is offline   Reply With Quote
Old 09-06-2011, 02:41 AM   #346
Junior Member
Thread Starter
 
Join Date: Jun 2007
Posts: 411
Total Cats: 0
Default

Used my last free output (wled) to implement an rpm/tps cutoff- signals a relay intercepting the 1q wire to the ECU. What settings are you guys using to cutoff the AC compressor? I have it at 70% tps or 5000rpm. That sound about right?
Greg G is offline   Reply With Quote
Old 09-06-2011, 03:10 AM   #347
Supporting Vendor
iTrader: (10)
 
Reverant's Avatar
 
Join Date: Jun 2006
Location: Athens, Greece
Posts: 5,441
Total Cats: 198
Default

I use 90% throttle, 5% hysterisis, 5200rpm, 200rpm hysterisis, 2 seconds hysterisis after each and 7 seconds afterstart to on.
Reverant is offline   Reply With Quote
Old 09-06-2011, 04:27 AM   #348
Junior Member
Thread Starter
 
Join Date: Jun 2007
Posts: 411
Total Cats: 0
Default

Thanks! Hmmm. I can do the rpm and tps hysteresis values. I can live without the 7 sec afterstart. Is the 2 seconds hysteresis significant?
Greg G is offline   Reply With Quote
Old 09-06-2011, 04:36 AM   #349
Supporting Vendor
iTrader: (10)
 
Reverant's Avatar
 
Join Date: Jun 2006
Location: Athens, Greece
Posts: 5,441
Total Cats: 198
Default

Depends, I like it as I thought that if you are playing with the throttle and crossing that 85-90% often, you may be switching the compressor on and off rapidly even with the 5% hysterisis, so I thought I should put it in there. The 7sec afterstart helps as well, as the engine is a little bit readier to accept the load at 7 secs.
Reverant is offline   Reply With Quote
Old 09-07-2011, 06:28 AM   #350
Junior Member
Thread Starter
 
Join Date: Jun 2007
Posts: 411
Total Cats: 0
Default

I shifted my thinking and disabled table switching for AC. The reasons:

1. Jason always said I didn't need it because the 2 situations (AC on and off) occur at completely different map rows.
2. Ken (muaithaibxr) always said spark table tuning would handle oscillations
3. Reverant's findings on idle advance with the stock ecu stim experiment
4. The final push: I was on vacation in Singapore and happened to pick up one of the Greg Banish books and got a better understanding of the whole process.

The key concept for me- spark advance increases the torque, and idle is just torque balancing at zero flywheel load. The extra torque from spark advance will react faster vs idle droop than the idle valve, since spark advance takes effect at the next combustion cycle, nearly instant response. So by table switching into a higher flat advance ahead of the compressor engagement, I used up my torque reserve before I actually needed it.

Went back to a sloped idle advance table with what are subjectively smoother transitions. So when it's deviating from setpoint, the slope of the advance table will make it want to go back. In either direction. Note the stability near setpoint. I don't overshoot it anymore. PID tuning is getting really difficult because the differences are really very subtle now, I can only see the differences in the logs.

P85 i 85 d5500 minRPM700 maxRPM1600


This is how it looks:


Reverant- I changed minimum idle valve duty from 30.9 to 19.9 as per your advice from the other threads. It helped with reacting to the RPM rise from the AC compressor turning off! I don't fall out of closed loop anymore.


I was curious though, why I could not kill the initial dip to less than 100-200 rpm. I magnified the graph, and found some weirdness to the PWM duty:



The duty was jagged, reducing the effect. Particularly at the start of the dip where the D effect is strongest, it actually backed off even as RPMdot was increasing. My first thoughts are (1) is this too much D? And (2) or is it the effect of too small a min/max RPM value, making the code drive the valve with too coarse a resolution?
Attached Thumbnails
DIYPNP install: inital tuning-97p85i85d5500.png   DIYPNP install: inital tuning-97p85i85d5500acoff.png   DIYPNP install: inital tuning-97p85i85d5500mag.png  
Attached Files
File Type: msq 2011-09-07_10.56.38sparktuned.msq (84.8 KB, 64 views)
File Type: msl 2011-09-07_09.04.28sprk.msl (187.5 KB, 64 views)

Last edited by Greg G; 09-07-2011 at 07:25 AM.
Greg G is offline   Reply With Quote
Old 09-07-2011, 01:51 PM   #351
Elite Member
 
Join Date: Jul 2005
Posts: 6,454
Total Cats: 80
Default

The software appears to filter RPMDot while the 'D' is not. The D is amplifying jitter in the RPM signal, while RPMDot filters out noise. Note how quickly Duty jumps when RPM begins to dip, while RPMDot appears to react more slowly. If you filtered D as heavily as RPMDot is, so you wouldn't see those jaggies, but D wouldn't react as quickly either.

There's nothing really "wrong" with the way D is acting. The software *could* get more sophisticated and add a "bandwidth limit" or low-pass, to D, in order to reduce the jitter in its output. In *some* cases this can improve performance because it allows even larger amounts of D without causing oscillation. In control system parlance, that's to add a "pole" to the "zero" of 'D'.

If you want to reduce the dip, I think the goal should be to enlarge the solenoid air bleed so that the duty cycle remains the same when you add the load (after the transient dies out). Otherwise you're relying on 'I' to ratchet its way up and increase steady state Duty to stay at the RPM target. Other than that, you can increase P more to reduce the depth of the dip and risk oscillation.

Quote:
Originally Posted by Greg
The duty was jagged, reducing the effect.
The effect is slight in terms of "timeliness" because you can see how long it takes for RPM to drop down after D has reacted and caused duty to jump up.
JasonC SBB is offline   Reply With Quote
Old 09-08-2011, 06:11 AM   #352
Junior Member
Thread Starter
 
Join Date: Jun 2007
Posts: 411
Total Cats: 0
Default

Well, looks like this is pretty much it for PID tuning. I have a stable idle with a consistent 200 RPM drop on initial AC engagement (and a mirror 200RPM rise on disengagement), with zero oscillation. Headlight and other loads are hardly felt.

All I can do I look for a stronger solenoid.

P100 I85 D 5500 min rpm 700 max rpm 1600


It seems robust enough that the action is consistent throughout the normal range of CLT and MAT.

Will now turn to another issue--> droop when coming down from revs, BEFORE closed loop idle starts. Here's a pic showing a near-stall after revving from idle. AC and headlights are on. When closed loop starts, it's OK. But BEFORE it starts...meh. Droop and oscillation >.<

vertical lines in row 3 show entry/exit to closed loop. tall lines across all rows- headlights on/off


1. Am I not entering closed loop idle early enough?
2. What determines the PWM idle duty in open loop?
3. Hardware-wise, at what RPM should my throttle dashpot engage?

Thanks guys!
Attached Thumbnails
DIYPNP install: inital tuning-98p100i85d5500max1600.png   DIYPNP install: inital tuning-98revdroop.png  
Attached Files
File Type: msl 2011-09-08_08.50.17rev.msl (373.9 KB, 92 views)
File Type: msq 2011-09-08_12.51.35idlefuelmanuallytuned.msq (84.9 KB, 46 views)
Greg G is offline   Reply With Quote
Old 09-08-2011, 09:31 AM   #353
Boost Czar
iTrader: (61)
 
Braineack's Avatar
 
Join Date: May 2005
Location: Chantilly, VA
Posts: 72,899
Total Cats: 1,792
Default

Quote:
Originally Posted by Greg G View Post
1. Am I not entering closed loop idle early enough?
2. What determines the PWM idle duty in open loop?
3. Hardware-wise, at what RPM should my throttle dashpot engage?
Thanks guys!
1. There's a CL delay.

2. Last know idle PWM% - or if that hasn't been established yet, your warmup table.

3. Any RPM in which you lift and the software determines through all the parameters (like MAPdot) that you're coming to idle. The idle valve should always open right away + dashpot.
Braineack is offline   Reply With Quote
Old 09-08-2011, 11:01 AM   #354
Junior Member
Thread Starter
 
Join Date: Jun 2007
Posts: 411
Total Cats: 0
Default

OK- is there any room for improvement in my msq?
Greg G is offline   Reply With Quote
Old 09-10-2011, 07:31 AM   #355
Junior Member
Thread Starter
 
Join Date: Jun 2007
Posts: 411
Total Cats: 0
Default

The answer is yes!

I played with minimum/maximum rpm to exaggerate the idle duty. Went from min 700 max1600 to min 850 max 1250.

P100 I100 D5500


~50 rpm drop on AC engagement!

But I still had a droop coming down from revs, even occasionally stalling if AC load was on. I wanted it to enter PID sooner, so I edited the ini to allow zero delay for closed loop entry (previous minimum was 2 secs). Results: I entered closed loop at the bottom of the first dip (instead of like 2 seconds later). Will raise the RPM adder to enter closed loop a bit earlier, to see what happens. I wish there was a "force closed loop idle" setting, with settings for RPM and TPS.

But I still got occasional droop coming down from revs with AC, especially with lights. Then it occurred to me: well then why not turn off AC? So I reset my rev/tps AC cutoff- I kept the TPS cutoff, but changed the 2nd setting to cut off the AC trigger when MAP <28. So The AC cuts off during overrun conditions!



See the revs catch smoothly with no load, then the AC re engages a second after hitting steady state

Of course the day wouldn't be complete without a mystery. I have this occasional droop which looks like this:


It looks like P is missing! I see the D response and the I response, but P went on vacation! WTF...
Attached Thumbnails
DIYPNP install: inital tuning-910p100i100d5500m850m1250.png   DIYPNP install: inital tuning-910acmap28cutoffrev.png   DIYPNP install: inital tuning-910missingp.png  
Attached Files
File Type: msq 2011-09-10_18.08.07output.msq (84.9 KB, 50 views)
File Type: msl 2011-09-10_16.52.30acmaprev.msl (417.8 KB, 84 views)
Greg G is offline   Reply With Quote
Old 09-10-2011, 11:58 PM   #356
Junior Member
Thread Starter
 
Join Date: Jun 2007
Posts: 411
Total Cats: 0
Default

Long drive today- first impressions:

1. Having the relay click everytime you are in overrun is annoying! Plus it switches the AC on & off when I shift. Net effect is- AC ain't cooling as well as it should. It did help a lot with droop though. Just dunno if this is the final solution. Maybe not.

2. The weird "missing P" response is SUPER annoying! I just don't know when it will happen, so I am not confident the car will not stall-- and that's a stressful way to drive. Looks like a strange new software bug, possibly related to the tight RPM window. But when it's working, it really works well! 50 rpm drop.

3. The idle is weird when the engine is cold/warming up. Like too much air being let in. When at operating temp, it's great--except for the missing P bug.
Greg G is offline   Reply With Quote
Old 09-11-2011, 10:34 AM   #357
Boost Czar
iTrader: (61)
 
Braineack's Avatar
 
Join Date: May 2005
Location: Chantilly, VA
Posts: 72,899
Total Cats: 1,792
Default

that last log makes it look like the idle valve isn't working.
Braineack is offline   Reply With Quote
Old 09-12-2011, 06:07 AM   #358
Junior Member
Thread Starter
 
Join Date: Jun 2007
Posts: 411
Total Cats: 0
Default

OK after yesterday's frustration, I had to regroup. Decided to recheck all the parameters I'd been working with. Which of course centered on the idle valve.

Did the idle valve test again to determine the correct values for minimum and maximum effective duty, and the corresponding RPMs. Results:



I input those values in so I could start clean from a known correct baseline.

P 105 I100 D5500 RPM min 900 RPM max 2200


You can see the high D, but the idle duty isnt bein driven anywhere near its maximum effective limit.

Then with the same PID values, I lowered the max RPM. This exaggerates the effect of PID on idle duty. Note the changing shape of the idle duty curve as PID is exaggerated. I was looking for a good initial response, driving the duty up near max. Also watch the depth of the droop and the speed with which it is countered by the PID code.

RPM max 1800

Nice and smooth, but still 100 rpm dip.

RPM max 1400

Very nice initial response (50rpm dip caught instantly with the duty being driven up nicely), but has some low amplitude oscillations. Looks like this may be good with P and I turned down a bit. Actually those oscillations- I didn't even feel them on the car. I just saw them here. RPM was smooth.

RPM max 1200

Too much! It put idle duty to the roof, but look at the valve chatter at steady state! Idle could not even reach target because the valve duty was swinging so wide! Idle actually felt like it went up when I turned the AC on

So far no sign of that weird "no P" bug from the other day. Maybe running the idle valve up to 100% duty helped loosen it up...

Are we there yet?
Attached Thumbnails
DIYPNP install: inital tuning-912iscdutyrangetest.png   DIYPNP install: inital tuning-912rpmmax2200.png   DIYPNP install: inital tuning-912rpmmax1800.png   DIYPNP install: inital tuning-912rpmmax1400.png   DIYPNP install: inital tuning-912rpmmax1200.png  


Last edited by Greg G; 09-12-2011 at 06:22 AM.
Greg G is offline   Reply With Quote
Old 09-12-2011, 09:09 AM   #359
Boost Czar
iTrader: (61)
 
Braineack's Avatar
 
Join Date: May 2005
Location: Chantilly, VA
Posts: 72,899
Total Cats: 1,792
Default

there yet? I was done 12 pages ago...
Braineack is offline   Reply With Quote
Old 09-12-2011, 09:34 AM   #360
Elite Member
iTrader: (1)
 
Join Date: Jun 2006
Location: Warrington/Birmingham
Posts: 2,658
Total Cats: 39
Default

You have a throttle in the stock position though.

Keep at it Greg, this thread is brilliant.
richyvrlimited is offline   Reply With Quote
 
 
Reply

Related Topics
Thread Thread Starter Forum Replies Last Post
Expected intake temps on the track? tazswing Race Prep 20 10-03-2015 12:04 PM
Time to start learning and play with tuning The Gleas MEGAsquirt 3 10-01-2015 10:30 AM
Are my coils failing? viriiguy General Miata Chat 5 09-28-2015 08:39 PM
Missing/knock at idle, can someone point me in the right direction? Mikel MEGAsquirt 4 09-28-2015 05:46 PM


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off



All times are GMT -4. The time now is 06:17 AM.