MEGAsquirt A place to collectively sort out this megasquirt gizmo

MS3 VVT testers

Thread Tools
 
Search this Thread
 
Old 01-06-2011, 10:23 AM
  #1  
Junior Member
Thread Starter
 
muythaibxr's Avatar
 
Join Date: May 2007
Location: Columbia, MD
Posts: 248
Total Cats: 0
Default MS3 VVT testers

Those who wanted continuously variable VVT support on MS3, we've got the first bit of code in for it in the 1.1 pre-alpha, but we need to know what wheel configs to try on the bench. Could you guys who previously volunteered to try it provide msq's for us to use to begin trying it?

Thanks,

Ken
muythaibxr is offline  
Old 01-06-2011, 11:19 AM
  #2  
Boost Czar
iTrader: (62)
 
Braineack's Avatar
 
Join Date: May 2005
Location: Chantilly, VA
Posts: 79,493
Total Cats: 4,080
Default

I just have a question. How does the injection timing get handled when the cam moves...Does it deviate from the timing table in direct relation to the degrees that the cam moves?
Braineack is offline  
Old 01-06-2011, 11:26 AM
  #3  
mkturbo.com
iTrader: (24)
 
shuiend's Avatar
 
Join Date: May 2006
Location: Charleston SC
Posts: 15,176
Total Cats: 1,680
Default

Ken,

I believe the few of us who are running MS3 are using the 99/00 Miata trigger wheel setup in the Spark mode drop down menu.

This is an image of our 4 tooth wheel.


Any clue on ETA for this. This could just be the motivation I need to get my car running. I will also try to send you my MSQ later tonight.

Lars
shuiend is offline  
Old 01-06-2011, 12:02 PM
  #4  
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

Mememe

MSQ attached. Check out PWM A for my current open loop VVT crappy map.

I believe the primary variable is RPM with some consideration for minimum MAP values (there's instability if I advance below 70kPa for example) so a 3D map (MAP/RPM) would be good.

I'm not sure but I think mazda's OEM implementation used other variables like TPS as an input.

And it would be nice if the value could be meaningful -- that is offset to provide advance and retard numbers in either crank or cam degrees from "zero", whatever that might be. for example when I unplug the cam, I know it's at -12.5 degrees (full retard--where it rests mechanically) and I could see the datalog show the cam advance as "-12.5". Then if I advance the cam to, say, 0 degrees, the logs would show a true 0 that matches the cam phase.

Some have also mentioned varying PID with RPM but I'm not an expert on why.
Attached Files
File Type: msq
2011-01-05_23.34.04.msq (130.3 KB, 151 views)
y8s is offline  
Old 01-06-2011, 12:39 PM
  #5  
Ben
Supporting Vendor
iTrader: (33)
 
Ben's Avatar
 
Join Date: Jul 2006
Location: atlanta-ish
Posts: 12,659
Total Cats: 134
Default

Originally Posted by y8s
Some have also mentioned varying PID with RPM but I'm not an expert on why.
The only reason I can think of would be if you wanted to move the same VVT table between 2 similar-ish cars, but assumed that the PID vs RPM table was tuned correctly between cars.
It would offset differences caused by different oil pumps and oil viscosities. But assumes that the PID vs RPM table is correct on both cars.

Seems less good to me than tuning the PID as needed and on a per car basis.

Ken, there is only 1 official wheel config found on Miata VVT motors, same pattern as 99-00 Miata. The only other pattern that would make sense would be for cars with the TSE (aftermarket) crank wheel which has 12 evenly spaced teeth. Cam wheel would be the same.

I have a 60-2 on my crank, but see no need for you to write a decoder for that.
__________________
Chief of Floor Sweeping, DIYAutoTune.com & AMP EFI
Crew Chief, Car Owner & Least Valuable Driver, HongNorrthRacing

91 Turbo | 10AE Turbo | 01 Track Rat | #323 Mazda Champcar

Originally Posted by concealer404
Buy an MSPNP Pro, you'll feel better.
Ben is offline  
Old 01-06-2011, 01:52 PM
  #6  
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

You know, I never touched PID on the hydra and dont remember having overshoot or undershoot issues. the system doesn't have to respond that fast comparatively since it's only trying to match rpmdot generally.
y8s is offline  
Old 01-06-2011, 02:31 PM
  #7  
Ben
Supporting Vendor
iTrader: (33)
 
Ben's Avatar
 
Join Date: Jul 2006
Location: atlanta-ish
Posts: 12,659
Total Cats: 134
Default

I'd imagine that the 'base' PID values (once figured out) would be good for nearly every application. That leads me to the same conclusion that PID vs RPM is not worthwhile.

I thought hydra didn't have 'D' term.
__________________
Chief of Floor Sweeping, DIYAutoTune.com & AMP EFI
Crew Chief, Car Owner & Least Valuable Driver, HongNorrthRacing

91 Turbo | 10AE Turbo | 01 Track Rat | #323 Mazda Champcar

Originally Posted by concealer404
Buy an MSPNP Pro, you'll feel better.
Ben is offline  
Old 01-06-2011, 03:02 PM
  #8  
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

Jeremy mentioned on miata.net that hydra's D term is fixed.

but D is still only for marginal improvements in system response anyway. If you can get a decent ramp time to target without it, great.
y8s is offline  
Old 01-06-2011, 04:16 PM
  #9  
Junior Member
Thread Starter
 
muythaibxr's Avatar
 
Join Date: May 2007
Location: Columbia, MD
Posts: 248
Total Cats: 0
Default

Originally Posted by Braineack
I just have a question. How does the injection timing get handled when the cam moves...Does it deviate from the timing table in direct relation to the degrees that the cam moves?
That part is not yet written, but that was the plan.

The only part that's done is detecting the position. We need testers to try that before we move on.

Ken
muythaibxr is offline  
Old 01-06-2011, 04:24 PM
  #10  
Boost Czar
iTrader: (62)
 
Braineack's Avatar
 
Join Date: May 2005
Location: Chantilly, VA
Posts: 79,493
Total Cats: 4,080
Default

Thanks. Like I said, just curious.
Braineack is offline  
Old 01-06-2011, 04:44 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 muythaibxr
That part is not yet written, but that was the plan.

The only part that's done is detecting the position. We need testers to try that before we move on.

Ken
hell, i'll try that now. I'm already moving the cam...
y8s is offline  
Old 01-06-2011, 05:04 PM
  #12  
Elite Member
iTrader: (1)
 
richyvrlimited's Avatar
 
Join Date: Jun 2006
Location: Warrington/Birmingham
Posts: 2,642
Total Cats: 42
Default

Originally Posted by Ben
The only other pattern that would make sense would be for cars with the TSE (aftermarket) crank wheel which has 12 evenly spaced teeth. Cam wheel would be the same.
Hell yeah, glad you mentioned that Ben. the TSE crank trigger is on my to-do list.
richyvrlimited is offline  
Old 01-07-2011, 09:12 PM
  #13  
Junior Member
Thread Starter
 
muythaibxr's Avatar
 
Join Date: May 2007
Location: Columbia, MD
Posts: 248
Total Cats: 0
Default

Originally Posted by y8s
hell, i'll try that now. I'm already moving the cam...
We'll email you something soon.

Ken
muythaibxr is offline  
Old 01-07-2011, 09:20 PM
  #14  
Junior Member
Thread Starter
 
muythaibxr's Avatar
 
Join Date: May 2007
Location: Columbia, MD
Posts: 248
Total Cats: 0
Default

As far as plans, this is what James and I have discussed so far:

For 1.1:

- Support for 1 variable cam only
- 8x8 timing table (open to discussion)
- 2 settings for min and max absolute angle. Table will use this to make its values relative to the closed position
- P, I, and D terms.
- Injection timing will be changed in step with the current cam position. The injector timing table should be filled in as if the cam is fully in its most retarded position.
- Actual angle measured will be in absolute engine degrees (0-720 deg) what we actually display can be adjusted using the min/max numbers you enter.
- Anything coolant based? (disable on cold engine for example, or go to a specific position and hold it until xxx temperature)

I expect that for the PID numbers, most engines of the same time will work the same. We will have to support 2 different types of actuation as it appears that there are a couple out there.

James has started on most of the above with the exception of the PID part. I'll be doing that part. I'll be making all the current PID routines more generic and combining the main PID code into one function (saves a lot of space).

y8s: Once I get the PID part done, I'll want to meet up with you and test it on your car, specifically looking to see how accurately and quickly I can get the valve position to follow the target during quick blips and sudden throttle changes.

For 2.0, we'll add support for 3 more cams for a total of 4 cams.

Ken
muythaibxr is offline  
Old 01-07-2011, 10:16 PM
  #15  
Elite Member
iTrader: (6)
 
Nagase's Avatar
 
Join Date: May 2009
Posts: 1,805
Total Cats: 2
Default

Now this is interesting. How beta is beta? This could move me to an MS3...
Nagase is offline  
Old 01-07-2011, 11:40 PM
  #16  
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 mazda uses minimal overlap during warmup for stability and economy. So yeah a temperature ramp-up would be nice.

Also the injection timing thing will be nice because right now my injection timing map looks like this:



and it may or may not match my VVT map exactly.
y8s is offline  
Old 01-08-2011, 10:49 AM
  #17  
Junior Member
Thread Starter
 
muythaibxr's Avatar
 
Join Date: May 2007
Location: Columbia, MD
Posts: 248
Total Cats: 0
Default

Originally Posted by Nagase
Now this is interesting. How beta is beta? This could move me to an MS3...
The engine should run alright, but at any time, there may be incomplete features, or old features may stop working or work differently to previously.

For example, before I do the PID part of VVT, I am going to combine all of the current PID routines into a single generic PID routine. I will do my best to keep all current PID routines working the same, but that functionality will need to be retested by me, and reverified by anyone willing to try it in their cars.

James and I use the MS3 in all our cars though, so we usually catch any major problems before users take the code. I have an NA 1986 mazda rx7, and a 1985 toyota corolla gts with a 20v 4age swap running 1zz-fe COP coils; James has an old ford cortina with a rover v8, so we get pretty good test coverage.

1.1 will be *alpha* when we start releases though.

Ken
muythaibxr is offline  
Old 01-08-2011, 10:55 AM
  #18  
Junior Member
Thread Starter
 
muythaibxr's Avatar
 
Join Date: May 2007
Location: Columbia, MD
Posts: 248
Total Cats: 0
Default

Originally Posted by y8s
I believe mazda uses minimal overlap during warmup for stability and economy. So yeah a temperature ramp-up would be nice.
I will have to think about how to implement something CLT-based without consuming too much data flash.

Ken
muythaibxr is offline  
Old 01-08-2011, 11:42 AM
  #19  
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

could be as simple as "keep at full retard til 60C" or as complex as %advance ramp to target temp.
y8s is offline  
Old 01-08-2011, 12:07 PM
  #20  
Elite Member
 
JasonC SBB's Avatar
 
Join Date: Jul 2005
Posts: 6,420
Total Cats: 84
Default

Originally Posted by y8s
Some have also mentioned varying PID with RPM but I'm not an expert on why.
At lower RPM the "sampling rate" of cam position is slower. (The ECU updates its cam phase information only every time a certain point of the cam signal appears). In control theory parlance, there is phase lag in the sensing. Making a loop stable at low RPM means making its response slow. At higher RPM, you can make the loop faster-responding. A set of PID values that is stable at the lowest RPM you expect to put in some advance (e.g. say, 1300 RPM), will not be up to full potential at high RPM.

How slow? Well it seems to me that in my PI only AEM my settling time is ~300 ms, and the setup shows some occasional ringing at low RPM.

300 ms settling time is OK if the advance curve only changes with RPM and not MAP; and RPM doesn't change that fast, and thus the target cam angle doesn't change that fast. If it changed with MAP, you may have retard say, in cruise, and advance when you floor it, the 300 ms lag may dull your throttle response.

A possible solution, other than to have RPM based P I and D's is to factor the RPM into the P, I and D calculations (the time based ones), i.e. multiply their output by the RPM, so that at low RPM they are scaled down.

re: Mazda's advance map changing with coolant temperature - this is OK if you had a mass airflow meter as your load input. The problem with this and a MAP load input, is that with varying cam phase you now have differing VE / airflow for a given combo of MAP and RPM, so your fuel and advance calculations will be wrong when the cam phase changes.


My advance table shows start of advance at IIRC 1500 RPM and advance diminishes above 5500 RPM.
This advance diminishes as you go from 100 kPa to 50 kPa. At 50 kPa I have no advance.
JasonC SBB is offline  


Quick Reply: MS3 VVT testers



All times are GMT -4. The time now is 07:49 AM.