MEGAsquirt A place to collectively sort out this megasquirt gizmo

Controlling VVT

Thread Tools
 
Search this Thread
 
Old 08-19-2008, 03:05 PM
  #1  
Elite Member
Thread Starter
iTrader: (3)
 
AbeFM's Avatar
 
Join Date: Aug 2006
Location: San Diego, CA
Posts: 3,047
Total Cats: 12
Default Controlling VVT

Yep, its like you said - they knew they were 'different' and are afraid of them.

I don't know where the pulses are, if the cam pulse comes way out of whack for the MS to pick up.

But since I still might put a VVT head on my car, I'll need to figure it out. Only I'm out of PWM outputs, and don't know if I want to even TRY to get this all up and going. I know I can steal PWM outputs from the fuel injection, but that means a lot of extra coding, etc.

edit: I wonder if I could use the idle out for this? I know 300 hz is just barely inside the envelope...
AbeFM is offline  
Old 08-19-2008, 04:12 PM
  #2  
Boost Pope
iTrader: (8)
 
Joe Perez's Avatar
 
Join Date: Sep 2005
Location: Chicago. (The less-murder part.)
Posts: 33,019
Total Cats: 6,587
Default

Dunno about idle. I mean, you can't really set specific duty cycles at specific RPMs, can you? It either ramps to temperature or attemps to run closed-loop.

My idea was to use the EBC driver to control VVT. It's more limited in terms of the frequencies it can operate at, however you could use the open-loop EBC map to set specific duty cycles for different RPMs, and even make them TPS dependant if you really wanted to get fancy.

We'd need to first scope out a proper '01-'05 Miata in order to determine if it's feasible (valve frequency) and if so, learn what the various duty cycles are supposed to me.

When you get the new head in your hands, visually inspect the cam gear and see if the teeth match. Should be easy enough.
Joe Perez is offline  
Old 08-19-2008, 04:46 PM
  #3  
Elite Member
Thread Starter
iTrader: (3)
 
AbeFM's Avatar
 
Join Date: Aug 2006
Location: San Diego, CA
Posts: 3,047
Total Cats: 12
Default

If what teeth match?

The idle and the EBC are both (on MS-II at least) the same, they just bit mask a variable to a pin (1 or 0) to get a PWM output on a GPIO pin.

I do like the idea of using the open loop boost control. I can get an open loop idle out based on temperature (IMO the very best idle control there is. :-).... Reverant mentioned the valve works at 300 hz. I'm sure even 150 would work.

There's one catch to all this - everything I've seen on this says it's dependent on oil pressure as well. That's why a closed-loop, single axis table of phase-angle vs rpm would work the best.

Or, I talk Rev. into giving me his code and showing me how to make the board, but I HATE having seperate computers for every little thing.

Joe, can you use you modgod powers to split off the past couple posts into some new thread somewhere, and then you or I should poke reverant (the greek guy) and get him to comment.
AbeFM is offline  
Old 08-19-2008, 05:03 PM
  #4  
Boost Pope
iTrader: (8)
 
Joe Perez's Avatar
 
Join Date: Sep 2005
Location: Chicago. (The less-murder part.)
Posts: 33,019
Total Cats: 6,587
Default

Good idea- new thread.

I'm speaking of the cam sensor teeth. Are they the same number and orientation of pulses as the '99-'00?

I brought up EBC since, by default, it comes nice a nice open-loop target map on both MS1 and MS2 that allow you to plug duty cycle numbers in directly. That way no hacking of the software would be required for implementation.

As to oil pressure, I can see how it would be an issue. I wish I had a complete wiring diagram for an '01+ car, but from the ECU-only diagrams I have, I can't see anywhere that there's an oil pressure sensor hitting the ECU- only the OCV solenoid. There are several lines that go to the instrument cluster which I can't trace as I don't have that portion of the schematic. I know the NBs still had a bogus gauge, but did they get a proper sender?

(As an aside, looking at these diagrams made me realize that VICS did continue on the '01+ models, for some reason I thought it went away when VVT came in. Learn something every day...)
Joe Perez is offline  
Old 08-19-2008, 05:58 PM
  #5  
y8s
2 Props,3 Dildos,& 1 Cat
iTrader: (8)
 
y8s's Avatar
 
Join Date: Jun 2005
Location: Fake Virginia
Posts: 19,338
Total Cats: 573
Default

broken record: not VICS, VTCS. like individual throttle plates in the (only) path of the runners. they're unused except for cold start.

also: 2001 has a dummy oil pressure sender for the gauge and that's it.

also also: closed loop doesn't need to know pressure to know the cam phase has changed.

I think the cam teeth are similar to the 99, but the sensor is now at the back of the intake cam.

you can thank me for this later:
http://www.y8spec.com/miata_tech/man/
y8s is offline  
Old 08-19-2008, 06:58 PM
  #6  
Elite Member
Thread Starter
iTrader: (3)
 
AbeFM's Avatar
 
Join Date: Aug 2006
Location: San Diego, CA
Posts: 3,047
Total Cats: 12
Default

Wow, that was worth it for the coolant temp sensor itself. :-)

Anyway, interestingly, while it doesn't talk about phasing (that I saw) it does look like the second cam pulse is shorter than the first within the doublette. Doubt it's useful, but it's interesting.

There is ONE more question I have: So, if... the cams are set up for VVT, how much do they suck if you don't VVT them? Would fixed timing on those cams be bad? Somehow I imagine so.


Anyway, it looks like there are plenty of timer channels on the MS-II if you can cut enough traced on the daughter card to get them loose. I'm a little worried about getting in over my head.

I'm thinking... If I DID use the EBC out, I'd still have closed loop verses RPM, and:
1) Use a electronic pot based on oil temp/pressure to lower cam advance
2) Just deal with when my engine is cold I'd have more advance (or is it retard?)

To get up and running (and save like $500 on a head) I think I might just do #2 for starters. I can pick an advance that helps for when the motor is warmed up (set this with a scope or maybe fixed timing and a timing light), and when I change oil brands/viscosity/temperature/way-the-wind-blows I just live with it - figuring at least pressure as a function of RPM should be relatively constant at a given temperature.
AbeFM is offline  
Old 08-19-2008, 08:38 PM
  #7  
y8s
2 Props,3 Dildos,& 1 Cat
iTrader: (8)
 
y8s's Avatar
 
Join Date: Jun 2005
Location: Fake Virginia
Posts: 19,338
Total Cats: 573
Default

I've only got speculation on the cams. But I think they are pretty similar to the stock 99-00 cams. I remember emilio700 posting a LITTLE more detail than that somewhere around here. searchim I guess. Or send me a degree wheel and I'll measure my spare head.

actually, hold that thought.
http://savetheledges.org/test/AVS/im...egreeWheel.png
and
http://www.fastmustangs.com/images/Degree_Wheel.jpg

actually hold that thought too. neither works so well with the engine in two pieces. but if I had it together, I have the ATI damper which has the degree marks on it too.
y8s is offline  
Old 08-19-2008, 08:48 PM
  #8  
Senior Member
iTrader: (5)
 
The_Pipefather's Avatar
 
Join Date: Nov 2007
Location: Troy, MI
Posts: 854
Total Cats: 14
Default

how are you going to determine the OE calibration? datalogger with breakout box?
The_Pipefather is offline  
Old 08-19-2008, 09:15 PM
  #9  
Boost Pope
iTrader: (8)
 
Joe Perez's Avatar
 
Join Date: Sep 2005
Location: Chicago. (The less-murder part.)
Posts: 33,019
Total Cats: 6,587
Default

Originally Posted by y8s
broken record: not VICS, VTCS. like individual throttle plates in the (only) path of the runners. they're unused except for cold start.
There is confusion here. On my part.

I've seen it referred to in both terms in various places in various manuals. Is it safe for me to say that all NBs, except for the MSM, have this same system which consists of four little butterfly plates in the intake manifold?

In the later ('01) documentation, the test for VICS drive at the ECU hinges upon operating temp- that it should be on when below 3,250RPM and below 140° or 149°, depending upon which section of the manual you look at. Same for '99?

Ok, even still, this is an easy one. Activate a relay driver when both conditions are met.

On to VVT...

also also: closed loop doesn't need to know pressure to know the cam phase has changed.

I think the cam teeth are similar to the 99, but the sensor is now at the back of the intake cam.
Yes! Makes perfect sense. With the sensor relocated to the back of the head (after the adjusting mechanism), the computer can read the phase difference between crank and cam and adjust the oil valve accordingly. Closed-loop operation to ensure accurate positioning regardless of oil pressure or temperature. Damn, that's gonna be hard to replicate precisely.


Originally Posted by The_Pipefather
how are you going to determine the OE calibration? datalogger with breakout box?
I was planning to just scope it before learning that it was closed-loop. We do have one piece of data to work with, however:





In that example, the signal has a period of ~3.5ms, yielding a frequency of 285Hz. That's 3.6x the max EBC frequency of MS2, and 7.3x the max of MS1.
Joe Perez is offline  
Old 08-19-2008, 10:07 PM
  #10  
Senior Member
iTrader: (5)
 
The_Pipefather's Avatar
 
Join Date: Nov 2007
Location: Troy, MI
Posts: 854
Total Cats: 14
Default

Well, the frequency is one thing, but figuring out even a baseline calibration (controlled parameter, which in this case, is the cam angle) w.r.t different operating points on the map is another challenge unless you have access to some good datalogging equipment.
The_Pipefather is offline  
Old 08-19-2008, 10:45 PM
  #11  
y8s
2 Props,3 Dildos,& 1 Cat
iTrader: (8)
 
y8s's Avatar
 
Join Date: Jun 2005
Location: Fake Virginia
Posts: 19,338
Total Cats: 573
Default

Originally Posted by Joe Perez
There is confusion here. On my part.

I've seen it referred to in both terms in various places in various manuals. Is it safe for me to say that all NBs, except for the MSM, have this same system which consists of four little butterfly plates in the intake manifold?

In the later ('01) documentation, the test for VICS drive at the ECU hinges upon operating temp- that it should be on when below 3,250RPM and below 140° or 149°, depending upon which section of the manual you look at. Same for '99?

Ok, even still, this is an easy one. Activate a relay driver when both conditions are met.

VICS (Variable Intake Control System):
Butterfly valves, yes. But these open to a second set of intake runners. They dont block the direct path of the air, they just offer a shortcut. It's like having a long intake and a short intake.


VTCS (Variable Tumble Control System):
This has a set of butterflies that almost completely block the intake runners. They close during cold start to increase flow velocity and help improve tumble and air-fuel mixing.


The difference is that VICS has an effect on performance and VTCS does not. VICS gives you two intakes tuned for different rpm ranges.

VTCS should be open ALWAYS once the car is warmed up.

Back to VVT!
y8s is offline  
Old 08-19-2008, 11:51 PM
  #12  
Boost Pope
iTrader: (8)
 
Joe Perez's Avatar
 
Join Date: Sep 2005
Location: Chicago. (The less-murder part.)
Posts: 33,019
Total Cats: 6,587
Default

Originally Posted by The_Pipefather
Well, the frequency is one thing, but figuring out even a baseline calibration (controlled parameter, which in this case, is the cam angle) w.r.t different operating points on the map is another challenge unless you have access to some good datalogging equipment.
Maybe.

Is intake cam timing relative to both load and RPM, or RPM alone? If it's just RPM, then you can figure it out by simply revving the engine from idle to redline, in neutral, while observing the CMP relative to the CKP on an oscilloscope. If load is a factor, then it's the same process but on rollers.

Baselining the data, to me, is the easy part. The hard part is building a software control within the constraints of the current MS2 design to calculate cam timing and then do closed-loop control of it. It's going to be a lot of work for a relatively small payoff.

Originally Posted by y8s
VICS (Variable Intake Control System):
Butterfly valves, yes. But these open to a second set of intake runners. They dont block the direct path of the air, they just offer a shortcut. It's like having a long intake and a short intake.
Ok- that's the system I'm familiar with. Two sets of runners, with a set of plates that open them at a certain RPM.

VTCS (Variable Tumble Control System):
This has a set of butterflies that almost completely block the intake runners. They close during cold start to increase flow velocity and help improve tumble and air-fuel mixing.
And that is the part I was missing. I thought VICS went away in '01, but I didn't realize it was replaced by VTCS. That's what threw me. Some of my grungier PDF wiring diagrams made "VTCS" look like "VICS" on first glance.


Back to VVT!
Indeed. And here's the thought that happens to be randomly passing through my head at this instant:

Honda is pretty much The Man when it comes to extracting power from tiny engines. And their VTEC system is, of course, a whole different animal. Not just timing, but lift and duration are changed. Thing is however that they feel it adequate to perform this transition in one quick bang, rather than varying it gradually.

I wonder- if it proves impossible to completely replicate the function of the VVT controller, is there a happy middle ground? What's the total range of adjustment on the cam? Seriously, anybody know? Is it sufficiently small that we could simply bi-state the thing? At low RPM, we leave it in one position (solenoid fully off, or fully on, whichever way it is) and then at a certain RPM, we throw the switch and let the cam go to the other end of the range.

Trying to seed some thinking here...
Joe Perez is offline  
Old 08-20-2008, 11:20 AM
  #13  
Senior Member
iTrader: (1)
 
NiklasFalk's Avatar
 
Join Date: Jun 2006
Location: Sweden
Posts: 1,390
Total Cats: 63
Default

Originally Posted by Joe Perez
Is it sufficiently small that we could simply bi-state the thing? At low RPM, we leave it in one position (solenoid fully off, or fully on, whichever way it is) and then at a certain RPM, we throw the switch and let the cam go to the other end of the range.

Trying to seed some thinking here...
Haven't this been proven already that you can get an advantage by simply go from one end of the scale to the other at a certain rpm (don't recall if low rpm should have max advance or retard)?

If the middle ground needs controlling (it's there so lets climb it ) you probably doesn't have to make it closed loop, open loop in stages between max retard and max advance could maybe be sufficient (unless you run into danger zones with the rest of the tune when the cam phase isn't what you guess).

You just woke up a lurker who have loose thoughts about MSII with E85 on a -03 (but parallel install give me no excuses to not do it, yeasterday...).
NiklasFalk is offline  
Old 08-20-2008, 01:10 PM
  #14  
Elite Member
Thread Starter
iTrader: (3)
 
AbeFM's Avatar
 
Join Date: Aug 2006
Location: San Diego, CA
Posts: 3,047
Total Cats: 12
Default

Originally Posted by Joe Perez


In that example, the signal has a period of ~3.5ms, yielding a frequency of 285Hz. That's 3.6x the max EBC frequency of MS2, and 7.3x the max of MS1.
Oh, that's an awesome find. I'd heard it was 300 hz, but that's better. I think the idle control on the MS-II was tweaked to have higher freq, but then again, it was at the sacrifice of resolution.
You can rework the MS-II daughter card to get this functionality back, recover the ridiculous swarms of outputs used for things like stepper motor idle...

But running the valve at half frequency wouldn't bother me. Running it at 1/3.. Perhaps with a small, inline resistor? Something about 1/2 the resistance of the coil?


Originally Posted by y8s
Hey! VICS! :-)

I wonder why they only do it when cold? I would guess the cam has a different profile, one that doesn't work well for low speed, and so they add that to get velocity/tumble up. I don't think it's a "bad thing" but I do agree that it probably doesn't buy you a lot.

To the manifold, the VICS would look just as it did before, the phasing won't matter, so I would still switch VICS at ~5250 or so, even with VVT.

Originally Posted by Joe Perez
Is intake cam timing relative to both load and RPM, or RPM alone? If it's just RPM, then you can figure it out by simply revving the engine from idle to redline, in neutral, while observing the CMP relative to the CKP on an oscilloscope. If load is a factor, then it's the same process but on rollers.
Yep. And I'm not even sure it matters that much what the difference is. Certainly not for getting up and running, though it could be refined later)

Baselining the data, to me, is the easy part. The hard part is building a software control within the constraints of the current MS2 design to calculate cam timing and then do closed-loop control of it. It's going to be a lot of work for a relatively small payoff.
I'm still with you that using boost control is a place to start. You can't be SO far off that way. The pay-off isn't so small, Matt claimed 40 ft-lbs difference, and I got nearly 50 looking at the same graph (between extremes). I'm not sure what would be involved in getting variables out.

The MS-II guys are adding "VANOS logging" meaning just recording what the very similar BMW VVT system is doing. But if they are fluent in "phase" then it should be easy to extend it by just dumping this "phase" variable as the input to a control loop.

Honda is pretty much The Man when it comes to extracting power from tiny engines. And their VTEC system is, of course, a whole different animal. Not just timing, but lift and duration are changed. Thing is however that they feel it adequate to perform this transition in one quick bang, rather than varying it gradually.
Done because it's way cheaper, not because they are happy with it. :-) Then they adding variable valve timing after copying it from other people.

I wonder- if it proves impossible to completely replicate the function of the VVT controller, is there a happy middle ground? What's the total range of adjustment on the cam? Seriously, anybody know? Is it sufficiently small that we could simply bi-state the thing? At low RPM, we leave it in one position (solenoid fully off, or fully on, whichever way it is) and then at a certain RPM, we throw the switch and let the cam go to the other end of the range.

Trying to seed some thinking here...
I believer it's something like 30* full adjust. That's a LOT! I don't know if there are cam-piston interference issues, I guess if the lift is the same then it doesn't matter. I think full retard to full advance would be too much, which is why I was thinking of switching between two resistors, the resistors would limit current to the valve, and hopefully let me adjust from a few degrees of retard to a few degrees of advance.

This all stops being theory really quick if I buy a VVT head, which I very well might here in the next day or two.
AbeFM is offline  
Old 08-20-2008, 01:56 PM
  #15  
y8s
2 Props,3 Dildos,& 1 Cat
iTrader: (8)
 
y8s's Avatar
 
Join Date: Jun 2005
Location: Fake Virginia
Posts: 19,338
Total Cats: 573
Default

I believe the total range is 25 cam degrees (50 crank). and one guy already is using an RPM switch to go from full advance to full retard. incidentally, varying the cam with respect to load/boost doesn't seem to have a significant effect. varying it with RPM had a HUGE effect. You *could* do a simple 2D map for it based on RPM alone. Plus at WOT you're only following a more-or-less single line of load points anyway. and at non-wot, who cares what max power is?

and joe, dont make me repost my VVT/no-VVT dyno graph.

so...

you have CKP and CMP as inputs.
you have a "zero" value for their offset.
you have a "target" map to set the advance or retard you want.
you have a calculated error in the feedback loop.

seems you could pretty easily translate that into boost control as long as you can trade out the MAP reading for the delta-cam angle value (cam_offset - cam_actual = cam_advance).
y8s is offline  
Old 08-20-2008, 02:08 PM
  #16  
Elite Member
Thread Starter
iTrader: (3)
 
AbeFM's Avatar
 
Join Date: Aug 2006
Location: San Diego, CA
Posts: 3,047
Total Cats: 12
Default

Backing up a half step, do you think an open loop table of duty cycle verses RPM would be enough to get up and running and have some semblance of usability?
-Abe.
AbeFM is offline  
Old 08-20-2008, 04:24 PM
  #17  
Boost Pope
iTrader: (8)
 
Joe Perez's Avatar
 
Join Date: Sep 2005
Location: Chicago. (The less-murder part.)
Posts: 33,019
Total Cats: 6,587
Default

No need to repost the charts, I've seen them.

Now here's a thought: What if we back down for a moment from closed-loop and conceptualize this system as a tri-state control?

Here's my thinking- we know that oil pressure and viscosity (as a function of temperature) are variables. Let us assume for the moment that viscosity as a factor of oil grade is a constant. Because of these variables, it is impossible, in an open-loop system, to say that "duty cycle X will produce cam timing Y."

However, I think we can assume that if the oil valve is fully closed, cam timing will be fully retarded, and if the valve is fully open then timing will be fully advanced, regardless of oil pressure and temperature. And in between these two extremes, we have some vaguely defined middle state, that we know is not going to be a constant.

So what if we compromise? We come up with some intermediate duty cycles that, under "optimal" conditions (warm engine) produce a smooth transition from retarded to advanced, and plug them into the table? It might look something like this:


Granted, I'm just throwing numbers on the screen here to provoke conversation. These may be way out of line, for all I know they could be backwards- I don't know whether energizing the solenoid causes the valve to open or close. But I'm thinking that until a Final Solution is reached, this might just be good enough to get Abe's new head up and running- what better man to experiment with it? He might even trim his valve cover, ricer-style, so that he can observe the intake cam gear with a timing light- lock your ignition timing to exactly TDC and watch the gear as you rev it up and experiment with different numbers.

Who cares whether 50% DC equals halfway advanced, 1/4 advanced, or 3/4 advanced? We'll play with it until it's where we like it when hot, and live with it being slightly sub-optimal when cold.

I don't know about everybody else, but I tend to drive pretty conservatively when my engine is cold. I pretty much never get into boost or the higher RPM range until oil temp is up to normal spec, which in my car is about 180°-200°. The thought of that little turbine shaft spinning at 150,000 RPM through cold oil keeps me pretty conservative. So when the engine is cold, I'm not terribly concerned about maximum performance.

My only concern is what effect this will have on VE- namely the fact that the cam timing in the midrange is going to vary with RPM may potentially throw the VE table off a bit during the transition from cold to warm. Can we rely sufficiently upon EGO to correct for this, understanding that it will likely be an issue only at moderate RPM and moderate load, a zone in the table where mixture is not as critical as at high load / high RPM? We're already bending over backwards to go super-lean in this area, so maybe we just compromise a tad?
Joe Perez is offline  
Old 08-20-2008, 04:56 PM
  #18  
y8s
2 Props,3 Dildos,& 1 Cat
iTrader: (8)
 
y8s's Avatar
 
Join Date: Jun 2005
Location: Fake Virginia
Posts: 19,338
Total Cats: 573
Default

Joe, you're on the right track but simplify simplify simplify and you'll have a "passable" setup for Abe to use for the time being.

1. retard the cam (0% duty) below, say, 1500 rpm
2. advance the cam (100%) between 1500 and 5000
3. retard the cam (0%) above 5000.

you'll lose a little bit at switchover but that can be dealt with when you've got the feedback loop settled.
y8s is offline  
Old 08-20-2008, 05:12 PM
  #19  
Boost Pope
iTrader: (8)
 
Joe Perez's Avatar
 
Join Date: Sep 2005
Location: Chicago. (The less-murder part.)
Posts: 33,019
Total Cats: 6,587
Default

Hmmm. Didn't realize it needed to come back out of advance at the higher RPMs... Ok, a nice simple starting point- we'll assume the MS does its best to perform a nice, smooth interpolation between columns:




It can be fine-tuned from there.
Joe Perez is offline  
Old 08-20-2008, 07:45 PM
  #20  
Elite Member
 
JasonC SBB's Avatar
 
Join Date: Jul 2005
Posts: 6,420
Total Cats: 84
Default

BMW VANOS (at least on the 92-00 cars) is DISCRETE. Full retard, or full advance. No in between. Unlike VVT.
JasonC SBB is offline  


Quick Reply: Controlling VVT



All times are GMT -4. The time now is 12:44 PM.