Discuss all things tuning in this section. News, products, problems and results.
Have ANY of you had weird issues tuning you Haltech AVCS/VVT??? I need your help, and I can help you as well...
I'm tuning a JDM Version 8 Subaru, and have had to basically reverse learn the PID algorithm just to get within 2.5 degrees error...
if you have divergent CAMs, meaning that you notice any of you CAMS getting trapped below or above target, not able to correct past target, or maybe acting erratically, then I can probably fix that for you, I fixed mine...
If sets of CAMS are consistently exceeding or failing target, but otherwise responding well to your PID settings, possibly split at 4000rpm or wherever your middle scaled RPM point is... maybe even causing oscillations upon meeting target... possibly it feels like the Steady State duty cycle wants to be opposite at idle than it does at the top of a WOT pull...?
I can help too, but I believe that this is due to an error in the way Haltech PID calculates the duty cycle calls through the PID algorithm. I have spent every waking hour for WEEKS on this... Attached is a Side-by-Side MegaLogView of two runs that I did, where I have tuned in the Duty Cycle to a range of 35%-55% Duty Calls @ 45% Steady State... Deadzone 0.3 vs Deadzone 0.0, with only minor other changes required to prevent Oscellations. These are my best pulls to show for context for my Theory below...
4000rpm seems to be a hardpoint for some reason...
Please look at the Deadzone 0.3 vs Deadzone 0.0 for a nice graph that shows my best run testing that setting... My two best controlled runs, and the ROMs and Logs are attached as well.
Something flips, and the CAMS go from Predictably Exceeding the Target Value, to Predictably Failing the Target Value...
Haltech Support, told me that they believed the CAM range to be 0-40 degrees, average to 20 degrees median, or 0-50 degrees median of 25 degrees median. The ability to set that scale I believe is important in the PID math for cam control... My CAMS, at -10-55 degrees, average to like 22.5 degrees. Either way, it's a 2.5 degree difference, and that may be a coincidence, but it is very close to my 2 degree measured differences before and after 4000rpm, on that last side-by-side i sent.
Basically, if you plot a line of what the ECU thinks is the exact middle physical position of the CAMS, and the Median Duty Cycles to get there... and then plot a line of what my OEM Cam median position is.... over the Same RPM Curve, the lines would be close, but not perfect. So they would intersect somewhere... and I believe in this case, for me, that is at 4000 rpm. Going into coming out of that area, the ECU(PID) is always fighting a 2.5 degree error
This is a theory and those numbers are round, but I did theory math before.
I never had issues with the OEM JDM 16 Bit 2004 ECU... It Homed to Zero, it never strayed target by more the 1 degree, and the CAMs had near perfectly synchronized... granted the data is slow and makes it look smoother, but It was most importantly was not overly sensitive as my Haltech, and I believe that is because of the error built into the PID. I proposed a patch to Haltech:
If anyone is having issues, HMU... If I'm right, you can help me get it fixed by responding to this thread, so we can get the discussion going... I have a lot of other data to share.
Hello Jeffery this is so good, i am sure there is many others finding the same issue but have just tuned through it
For me, this is my personal project vehicle... I doubt this AVCS can be Tuned as good as the OEM, because it has a built in error that is around +2.5 degrees at idle and 0 degrees at 4000rpm, and -2.5 degrees toward 8000rpm... no matter what settings put it, or how I linear or reverse linear the PID over rpm... the average error is always the same...
Fighting the error winds up the system, and I already have to deal with a polarity transfer at 4000rpm, so it has to be settled going in, and coming out of 4000rpm.
No other sensors or systems are exhibiting any reaction to 4000rpm, other than the CAM PID.
I have day to day issues coming out of idle, and I don't like the CAMS being off target at high rpm.
I have Version 8 JDM T20 Heads, so the same CAM control on the EJ207 and EJ205... they are supposedly the best heads, so the last ones that I expected CAM control issues with, especially since the Stock ecu does good with them on 16bit and 32bit ECMs
Did you try reducing the solenoid frequency to 150 hz and re-tuning the PID like Andre suggested in the other thread? He reported that made the PID tuning much more predictable.
Have you measured the frequency used by the OEM ECM?
Yes, I tried many many frequencies... they did lead to response changes and helped alleviate the scale of the oscillating at the 4000 rpm mark (error polarity shift point)... 350hz is the best tested frequency for me yet.
No matter what, the cams home to +2.5 degrees around idle, and -2.5 degrees at redline, crossing at 4000rpm
It's clear from my duty calls the the system is under control, between 35%-55% duty but it can't home away from the PID middle point, and it's correcting away from target as if it has a built in error...
I attached a picture side by side, the error is literally the duty calls with a high smoothness filter
In my side by side the change was disabling Deadzone to prevent the PID from ever shutting off at target. The duty cycles decreased, and it's clear the what the ECU thinks is its steady state is not consistent from 0-8000 rpm
Increasing PI only make the system more responsive, and D would actually hurt me here, D doesn't fix distance to target issues, only the sharpness of the PI corrections.
In 2006 or so, the CAM angle range was reduced, at least that is what the old forums say, and so I believe that matters to the PID... I don't have access further to test that obviouly.
The Haltech Platinum PID CAM control appears to assume that the steady state of 0 duty cycle is 0 degrees, which is not true for me, its 2 or so degrees advance. It assumes that 45% duty call will respond as targeted at any rpm, which is not true, 45% is -2 degrees at 7000, trending -2.5 at 8000rpm
So steady state starts around 35% at idle, and is around 55% at 7000+rpm
That is where I have it set, min duty = 35%, steady= 45%, max =55%
If I go any wider, I will get a very harsh corrections, and anyways, this is exactly what the software recommends, a +/- 10%
The PID Math, and data seem to indicate that the PID is calculating a flat line response, when I needs to account for a line with a slop, intersecting at zero
Also... no matter if I target 12.5 degrees advance, or -5 retard, the Cams are still the same magnitude off from target, and crossing at exactly 4000rpm
...just got off the phone with Haltech... I'm gonna go back and testing frequencies again, just to make sure I didn't miss anything, and now that I have good control of the PID, maybe it's still frequency related. I will report back.
Tested 150hz, and everything between 300-400, a lot of them were bad, and 375 looked promising, but not really any different than 350hz
I have a LOT of people basically telling me I don't understand PID, and that there is no way the Haltech is doing this poorly without something else being wrong with my CAR...
I just dusted off the JDM ECU and loaded a light boost tune from Winter and ripped it WOT... attached are the logs... Perfect Parody, more Aggressive Targeting... only 1 degree of error anywhere.
So what frequency is the JDM ECU using? Connect an oscilloscope (or a digital VOM that offers frequency measurement) to figure this out. What are the Min & Max duty cycles you see while maintaining tight control? Answers to those questions should help you measure the Haltech signal or set the parameters to stay in the correct range.
Interesting notes from my OEM ECU run... idle CAM target angle is 0 degrees, naturally... but the ECU is duty calling EXACTLY 9.41% duty cycle, the entire Idle... and the CAMS stay fixed at 0 degrees and don't move.
No matter what you put in for the settings on the Haltech, it commands 0% duty, on a 0 angle target... Put the fork in it... im done.
Can you describe the process you use to develop your PID parameters?
@david... I don't own an oscilliscope unfortunately, and my multimeter with Hz capability is centered on 10kHz, so it reads too high to register...
That is the last thing i need to find out... I need to drop $400 for it... but no matter what frequency it is talking at... if it issues 0 duty calls at 0 angle target, than it will never work... because the Stock ECU clearly shows that the cams need duty cycle to maintain 0 angle, and the Factory ECU was designed to do just that.
Haltech has all but admitted that they assumed 0 duty for 0 angle for the whole CAM control implement
the factory ECU most likely uses the most anglualry retarted, literally, the most retarted position as its 0 and then calculates its duty cycle through the PID algorithim from there... so for the factory, 0 angle actual, is 10 degrees advanced from it's 0 start measuring angle of -10 degrees
If the Haltech PID only responds to 0 and above calculations for corrections, then if at any instance the CAMS swing negative, it does not have the math to correct, because that distance from 0 is negative, and all PID math generally needs to be positive... that is just basic PID knowledge going back to 1920...
So important to the PID math of MaxxECU's same VVT controler is the PHYSICAL LIMIT ANGLES.... that they list #5 of their setup instructions to explain how and why it is important:
#5: The Min and Max controllable angle must also be set, this is also determined by using the above solenoid pulse test feature. This is needed for the MaxxECU to know in which range we actually can control the relevant CAM.
Note: Adjust the Min and Max angles to prevent the cam from hitting the mechanical stops.
if you disconnect the oil control solenoid, what cam angle is reported by the OEM ECU? What is reported by the Haltech ECU? If these aren't close, perhaps that is an cam angle offset that can be applied in the Haltech ECU.
@david... I should start off by saying, I'm not a tuner... I did fly through HP Academy's Practical ECU ReFlash courses in like 1 week and got a certificate... but that was really only research, so I could back check my Email tuner because I'm like that... I found out it was pretty easy stuff, just a lot of it to consider consecutively... and I have always been good at Math, and can see patterns well... Especially in the field of Introduced Error... because I did study papers on the function X Squared = Y Squared and you learn a lot just from that simple equation...
Anyways, as my car started making more power, it was clear to me that the Factory ECU logging is too slow, and I like upgrades, so I went with a Haltech Platinum Plug-In-Play, that list JDM 01'-05' as fully compatible with a Base Rom... so I bought it, thinking I would have the easiest transition with a great ReFlash tune in hand, email tuner to support me, base rom to go from, from the country that has had JDM Subaru 2.0 engines to sample from...
Fast forward to today, from Xmas when I bought the Haltech... My email tuner threw in the Towel, no Haltech Sponsored Tune shops have any clue wft im talking about, let alone what the issue is... and here I am.
I don't give up, and I'm not dumb, so I will keep on and on. Reading PHd papers, relearning Calculus, anything that will get me closer to fixing this.
That being said, before I understood what PID meant, I used bruteforce method, like trying to crack a cypher... Now I have evolved to research and study, and cries for help, lmao...
P = Magnitude of response to adjust to target change (too jumpy at first hit, turn down... to slow, turn up)
I = Increase Response over time (Slow to adjust over time, turn up... to jumpy, turn down)
D = Decrease "angle" of response, or rather a clamping factor to restrict the harshness of PI ) (Haltech says don't use it, i think a little needs to be there, doesn't matter because D does not deal with distance to target correction, only filters the harshness of the PI corrections)
---Knowing what I know now... find steady state, and then 0 the entire PID... induce controlled target change, analyze response, adjust Proportional Accordingly. Note the time of reaction or possible over reaction over time... adjust Integral Accordingly... Take note of your new PI system, and apply Derivative as needed...
@david "if you disconnect the oil control solenoid, what cam angle is reported by the OEM ECU? What is reported by the Haltech ECU? If these aren't close, perhaps that is an cam angle offset that can be applied in the Haltech ECU."
I will try disconnecting tonight, but these are the comparisons when connected on both ECUs, its easy:
Idle - 0 degree Target Angle - 0% Duty Cycle - CAM1 = 3-5 degrees Positive - CAM2 = 1-3 Degrees Positive of target
4000 RPM - Any Target - 45% Duty - CAM1 & CAM2 any Target I want
7000 RPM - 0 degree Target Angle - 55% Duty Cycle - 1-4 degrees negative of target
Idle - 0 degree Target Angle - 9.41% Duty Cycle - CAM1 & CAM2 perfect 0 angle
4000 RPM - Any Target - Whatever the duty calls for - CAM1 & CAM2 any Target I want
7000 RPM - 0 degree Target Angle - 48% Duty Cycle - CAM1 & CAM2 perfect 0 angle
Have you watched this very relevant webinar that was recently done:
I get the sense you are impatient, so try starting about 25:00 and listen / watch the process for tuning a cam control PID.
@david Yeah, patients is not my strong suit, but to be fair... ive been at this for 6 months now... the longest tune in History...
I did watch your video, and Andre pretty much is saying what I'm saying... and very interestingly 34:36, he says "Now with CAM Control, Boost Control, doesn't really matter, whatever we're targeting we also want to make sure that the values that we target, we can actually allow the system to overshoot on BOTH sides, this is relevant for cam control particularly.."
He then describes an example with a 0 degree physical limit. I do not have a 0 degree physical limit on my CAMS, I have a -10 degree physical limit on my cams, and the Haltech PID doesnt do ANYTHING at zero or below, no matter how high the PID input values are. I found out the same on my own, and that is when I relegated to targeting advances at idle and at 7000rpm, even though that's not my desire...
Also, he is demoing on a Motec, and they own a Version 11 Subaru STi with AVCS and a Haltech Elite 2500... I think I have a good idea why they didn't choose the Subaru/Haltech to demo??? Likely because it is a bad example to learn from and/or Andre is not completely happy with it enough to use as a demonstration...
if it were me, I would modify the phaser to limit the travel at 0 deg.
I would need to weld billet aluminum that has a machined channel with tiny oil passages... Cheaper, easier to just buy the wrong cam sprockets for my car with the more limited range, but then the Factory ECU prolly wont work right... I would kindly demand my money back before I made a permanent hardware change to fix a software issue.
Let's see what the test of disconnected solenoid reports as the fully the retarded cam position. My bet is the OEM ECU says 0 or close, and the Haltech says -10, and the problem is the Haltech's offset (what it reports vs. what it measures). It could be as simple as the wrong edge of a cam signal in your setup, or a Haltech firmware bug in this crank/cam pattern.
But let's see.