BTW the shift left is still less less than 45* which implies still not enough D relative to P. If you have enough D there should be no or almost no sign of sine waves.
See my simulation examples in my earlier post: DIYPNP install: inital tuning
Because your D is maxed out, try an experiment, keep D maxed, and reduce P by 30%, and by 50%. See if the sinusoids reduce.
In control system parlance, too much P means there's too much gain in the system that the D (the phase-lead compensator) cannot damp out.
In a suspension, that is akin to your bought the stiffest dampers (highest D) you could find and the spring rate (P) is still too high for the dampers. So it oscillates after a bump. You need to soften the springs.
I finally gave in and added another extra air solenoid triggered by the headlights. Worked like a charm and settled it down.
P25 i15 d5000, 3rd solenoid
* I attached the log, could someone please take a look and help me figure out the weird spike in RPM/PWM idle duty after I turn off the lights? It was a one off, didn't happen again but I can't explain why...
Then I tried finding the upper limit of P.
Note: I closed the idle screw by 1 turn, so the PID code would bring down the RPM rise from the idle solenoids.
P90 i15 d5000
P160 i15 d5000
The duty curve doesn't look good- too much P/too little D.
Looks like 90 is the upper limit for now, to get the desired response. Will try even more D to see if I can dampen it some more/kill the dip faster.
Am using the egr solenoid plus a Toyota idle up solenoid for the AC, and a bigger (physically) Toyota solenoid for the headlights. Can't find anything bigger/stronger here....
Should I back down on the d?
One thing that has me stumped is the rpm rise after the AC turns off and the solenoids go off. The rpm rises, but the idle duty also rises for a bit before going down, instead of trying to bring it down immediately. Weird.