MEGAsquirt A place to collectively sort out this megasquirt gizmo

DIYPNP install: inital tuning

Thread Tools
 
Search this Thread
 
Old 09-02-2011, 10:26 PM
  #341  
Junior Member
Thread Starter
 
Greg G's Avatar
 
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  
Old 09-03-2011, 08:37 PM
  #342  
Junior Member
Thread Starter
 
Greg G's Avatar
 
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  
Old 09-04-2011, 05:55 AM
  #343  
Elite Member
iTrader: (10)
 
Reverant's Avatar
 
Join Date: Jun 2006
Location: Athens, Greece
Posts: 5,977
Total Cats: 355
Default

Map?
Reverant is offline  
Old 09-04-2011, 08:20 AM
  #344  
Junior Member
Thread Starter
 
Greg G's Avatar
 
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: msq
2011-09-02_14.54.13spark.msq (84.8 KB, 89 views)

Last edited by Greg G; 09-04-2011 at 08:36 AM.
Greg G is offline  
Old 09-04-2011, 10:34 AM
  #345  
Elite Member
iTrader: (10)
 
Reverant's Avatar
 
Join Date: Jun 2006
Location: Athens, Greece
Posts: 5,977
Total Cats: 355
Default

Originally Posted by Greg G
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  
Old 09-06-2011, 01:41 AM
  #346  
Junior Member
Thread Starter
 
Greg G's Avatar
 
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  
Old 09-06-2011, 02:10 AM
  #347  
Elite Member
iTrader: (10)
 
Reverant's Avatar
 
Join Date: Jun 2006
Location: Athens, Greece
Posts: 5,977
Total Cats: 355
Default

I use 90% throttle, 5% hysterisis, 5200rpm, 200rpm hysterisis, 2 seconds hysterisis after each and 7 seconds afterstart to on.
Reverant is offline  
Old 09-06-2011, 03:27 AM
  #348  
Junior Member
Thread Starter
 
Greg G's Avatar
 
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  
Old 09-06-2011, 03:36 AM
  #349  
Elite Member
iTrader: (10)
 
Reverant's Avatar
 
Join Date: Jun 2006
Location: Athens, Greece
Posts: 5,977
Total Cats: 355
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  
Old 09-07-2011, 05:28 AM
  #350  
Junior Member
Thread Starter
 
Greg G's Avatar
 
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
File Type: msl
2011-09-07_09.04.28sprk.msl (187.5 KB, 103 views)

Last edited by Greg G; 09-07-2011 at 06:25 AM.
Greg G is offline  
Old 09-07-2011, 12:51 PM
  #351  
Elite Member
 
JasonC SBB's Avatar
 
Join Date: Jul 2005
Posts: 6,420
Total Cats: 84
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.

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  
Old 09-08-2011, 05:11 AM
  #352  
Junior Member
Thread Starter
 
Greg G's Avatar
 
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, 151 views)
Greg G is offline  
Old 09-08-2011, 08:31 AM
  #353  
Boost Czar
iTrader: (62)
 
Braineack's Avatar
 
Join Date: May 2005
Location: Chantilly, VA
Posts: 79,493
Total Cats: 4,080
Default

Originally Posted by Greg G
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  
Old 09-08-2011, 10:01 AM
  #354  
Junior Member
Thread Starter
 
Greg G's Avatar
 
Join Date: Jun 2007
Posts: 411
Total Cats: 0
Default

OK- is there any room for improvement in my msq?
Greg G is offline  
Old 09-10-2011, 06:31 AM
  #355  
Junior Member
Thread Starter
 
Greg G's Avatar
 
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, 107 views)
File Type: msl
2011-09-10_16.52.30acmaprev.msl (417.8 KB, 128 views)
Greg G is offline  
Old 09-10-2011, 10:58 PM
  #356  
Junior Member
Thread Starter
 
Greg G's Avatar
 
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  
Old 09-11-2011, 09:34 AM
  #357  
Boost Czar
iTrader: (62)
 
Braineack's Avatar
 
Join Date: May 2005
Location: Chantilly, VA
Posts: 79,493
Total Cats: 4,080
Default

that last log makes it look like the idle valve isn't working.
Braineack is offline  
Old 09-12-2011, 05:07 AM
  #358  
Junior Member
Thread Starter
 
Greg G's Avatar
 
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 05:22 AM.
Greg G is offline  
Old 09-12-2011, 08:09 AM
  #359  
Boost Czar
iTrader: (62)
 
Braineack's Avatar
 
Join Date: May 2005
Location: Chantilly, VA
Posts: 79,493
Total Cats: 4,080
Default

there yet? I was done 12 pages ago...
Braineack is offline  
Old 09-12-2011, 08:34 AM
  #360  
Elite Member
iTrader: (1)
 
richyvrlimited's Avatar
 
Join Date: Jun 2006
Location: Warrington/Birmingham
Posts: 2,642
Total Cats: 42
Default

You have a throttle in the stock position though.

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


Quick Reply: DIYPNP install: inital tuning



All times are GMT -4. The time now is 09:20 PM.