Page 1 of 1
VVT Debug fail
Posted: Tue Aug 14, 2018 4:19 am
by stefanst
I was trying to log exactly how well VVT is working on the '91 Miata with the VVT engine. But it looks like the debug setting 8 doesn't do anything anymore. I may be doing something wrong of course, but nothing shows up in my log. Other debugs seem to work just fine if that helps with finding the problem. Tune is attached.
Re: VVT Debug fail
Posted: Tue Aug 14, 2018 11:26 am
by AndreyB
Looks like that's intended behaviour
Code: Select all
/**
* VVT valve control often uses AUX pid #1
*/
DBG_AUX_PID_1 = 7,
/**
* VVT position debugging - not VVT valve control. See AUX pid #1 debug for valve position.
*/
DBG_VVT = 8,
See also
https://rusefi.com/wiki/index.php?title=Manual:Debug_fields which has some info on which output is what. You want to look at aux pid #1
Re: VVT Debug fail
Posted: Tue Aug 14, 2018 4:39 pm
by AndreyB
PS: just realized that field value label was misleading. Changing from "VVT PID" to "VVT Input"
https://github.com/rusefi/rusefi/commit/da8195fc2a74dd1f1d18ac8e6b137acf6ed5d20e
Re: VVT Debug fail
Posted: Tue Aug 14, 2018 6:02 pm
by stefanst
Not sure that's all the problem there is.
With debug set to 8, none of my debug fields in the log recorded anything. All fields (f1-f7, i1-i3) have 0s all day long. According to the Wiki, at least i1 should contain a VVT event counter, whatever this may be.
I'm also half-certain I tried debug setting 7 and didn't get anything. Not 100% though, so I'll report back later today/tonight.
Re: VVT Debug fail
Posted: Tue Aug 14, 2018 6:20 pm
by AndreyB
Re: VVT Debug fail
Posted: Wed Aug 15, 2018 12:44 am
by stefanst
And yes. I can confirm that "AUX PID 1" does indeed debug the VVT control. Now I just need better PID parameters than what I'm using.
vvt oscillation.png
We have crazy oscillations.
P-I-D
2.000 - 0.005 - 0.000
Any prior art we can look at? Unfortunately I lost my old '03 tune.
Re: VVT Debug fail
Posted: Wed Aug 15, 2018 12:49 am
by AndreyB
https://github.com/rusefi/rusefi/blob/master/firmware/config/engines/mazda_miata_vvt.cpp shows mine as
Code: Select all
engineConfiguration->auxPid[0].pFactor = 2;
engineConfiguration->auxPid[0].iFactor = 0.005;
engineConfiguration->auxPid[0].dFactor = 0;
engineConfiguration->auxPid[0].offset = 33;
engineConfiguration->auxPid[0].minValue = 24;
engineConfiguration->auxPid[0].maxValue = 44;
Re: VVT Debug fail
Posted: Wed Aug 15, 2018 12:50 am
by AndreyB
if you have crazy oscilations how is your VVT position calibration? with VVT plug disconnected what does your VVT position gauge says?
I was suprised to see a huge variabtion in VVT zero position between green and red cars.
Re: VVT Debug fail
Posted: Wed Aug 15, 2018 1:44 am
by stefanst
VVT without actuator is just around zero. Also, offset shouldn't really make a difference with a forward-nothing-backup control.
Looks like yesterday I had more stable VVT position. The only change that could possibly have an impact that I can think of is the analog sensor smoothing factor. I sharpened it up- less smoothing. Does that get applied to VVT position?
Re: VVT Debug fail
Posted: Wed Aug 15, 2018 1:47 am
by AndreyB
Nope, VVT position is not affected by analog anything.
Re: VVT Debug fail
Posted: Wed Aug 22, 2018 1:21 am
by stefanst
More "D" improved the oscillations a lot, especially on a warm engine. The "P" term is still going a bit crazy, essentially dithering around the target, but since our control is fairly slow to react, this seems to work quite well, especially at higher rpms.
One thing I noticed, running the board on the JIMSTIM, the "I"-term is still trying to run away. Meaning if we command a value that can't be reached, it just keeps running into infinity- positive or negative. We need to control this somehow. This is the same problem we are also still seeing with idle control. Maybe just add 2 more fields: "I-term min, max"? We can't use the same min/max as for the absolute output, since we need to be at least able to get to "0" and beyond.