VVT ideas and testers

Testing and development of Megasquirt 3

Moderators: jsmcortina, muythaibxr

y8s
Master MS/Extra'er
Posts: 478
Joined: Wed Jan 07, 2009 3:21 pm

Re: VVT ideas and testers

Post by y8s »

I cut all the PID values in half and it definitely changed the response significantly. Too slow, but not nearly as "caffeinated". I'll work on it some more. Except that Ken is doing more PID changes to the VVT code so maybe I wont spend TOO much time.
gurov
Super MS/Extra'er
Posts: 1059
Joined: Sun Jun 01, 2008 11:54 pm

Re: VVT ideas and testers

Post by gurov »

dthomp87 wrote:So, for the S54 with with the double solenoids per cam, how would this be setup on ms3x? someone mentioned setting up an H bridge, how could this be switched? I'm wondering how this need to be implemented into the software. It uses one solenoid for advancing and one for retarding.

the bigger problem for s54 here is going to be the fact that the cam angle sensors aren't the same as the M54 engines. it's not a simple 50/50 tooth on the cam. one of the cams in s54 is a missing tooth wheel with a fairly slow tooth count, and another cam is just teeth. so decoder for THAT will have to be written first.

it's still 60-2 on the crank.
2020 BMW X3M - bm3 - stage1
1994 Supra - ms3pnp pro - j&s
gurov
Super MS/Extra'er
Posts: 1059
Joined: Sun Jun 01, 2008 11:54 pm

Re: VVT ideas and testers

Post by gurov »

on a different brighter note, i've not seen any cam angle dropouts in the current alpha like i did before.
2020 BMW X3M - bm3 - stage1
1994 Supra - ms3pnp pro - j&s
jsmcortina
Site Admin
Posts: 39585
Joined: Mon May 03, 2004 1:34 am
Location: Birmingham, UK
Contact:

Re: VVT ideas and testers

Post by jsmcortina »

y8s wrote:Heads-up Warning
I have been working with Ken a lot on VVT testing for the Miata and wanted to post up a small warning to other miata guys interested in trying out the code.

For whatever reason, the VVT solenoid seems to generate a significant amount of flyback energy--enough to overwhelm the active flyback circuit on the expander board.
If needed, a better fix than was posted would be to connect a jumper wire from S12 on the V3 mainboard to the banded (RHS) end of D1 on the MS3X board.

Ensure all valves etc. that are controlled by the MS3X get their 12V from the fuel pump relay or they may power the Megasquirt when you switch off.
The relevant page on the MS3X schematic is http://www.msextra.com/doc/general/ms3v ... html#ms3x3

James
I can repair or upgrade Megasquirts in UK. http://www.jamesmurrayengineering.co.uk

My Success story: http://www.msextra.com/forums/viewtopic ... 04&t=34277
MSEXTRA documentation at: http://www.msextra.com/doc/index.html
New users, please read the "Forum Help Page".
prof315
Super MS/Extra'er
Posts: 3760
Joined: Sun Jan 18, 2009 3:13 am
Location: Melbourne, FL

Re: VVT ideas and testers

Post by prof315 »

James,

I have started testing the VVT solenoid on the VW with Generic PWM as you suggested at the Megameet. I CAN in fact control the amount of advance :yeah!:
it just has a small (~15%) window in the duty cycle that does anything. I also _think_ that the valve is restricting oil flow to the tensioner as duty cycle increases. This seems to be supported by the fact that at high rpm/oil pressure the cam angle retards (beyond the idle angle) when the solenoid is off and advances as duty cycle increases once the window is reached regardless of engine oil pressure. Primitive, kinda sloppy as we saw but it looks to be usable and tunable. I'll keep everybody up to date as I work with this.

Jeff
Linfert Performance/321 Motorsports
SCCA 2019 SM National Champion Crew Chief
SCCA 2023 FP National Champion Tuner/electrical engineer
100s of MS systems built installed and tuned
Support the developers!
prof315
Super MS/Extra'er
Posts: 3760
Joined: Sun Jan 18, 2009 3:13 am
Location: Melbourne, FL

Re: VVT ideas and testers

Post by prof315 »

Well I think PID control with the VW 20V VVT solenoid is going to be tough. Too much mechanical jitter in the tensioner assembly to get any kind of stable control. Generic PWM control on the other hand will definately allow me to rough tune things. I.E. ramp up the advance down low and bleed it off as rpms climb to strech my power curve. I'm going to continue to try PID control but as I said things are not looking great there.

Jeff
Linfert Performance/321 Motorsports
SCCA 2019 SM National Champion Crew Chief
SCCA 2023 FP National Champion Tuner/electrical engineer
100s of MS systems built installed and tuned
Support the developers!
jsmcortina
Site Admin
Posts: 39585
Joined: Mon May 03, 2004 1:34 am
Location: Birmingham, UK
Contact:

Re: VVT ideas and testers

Post by jsmcortina »

prof315 wrote:Well I think PID control with the VW 20V VVT solenoid is going to be tough. Too much mechanical jitter in the tensioner assembly to get any kind of stable control.
Any mileage in adding a restrictor to slow down the valve response?

James
I can repair or upgrade Megasquirts in UK. http://www.jamesmurrayengineering.co.uk

My Success story: http://www.msextra.com/forums/viewtopic ... 04&t=34277
MSEXTRA documentation at: http://www.msextra.com/doc/index.html
New users, please read the "Forum Help Page".
prof315
Super MS/Extra'er
Posts: 3760
Joined: Sun Jan 18, 2009 3:13 am
Location: Melbourne, FL

Re: VVT ideas and testers

Post by prof315 »

jsmcortina wrote:
prof315 wrote:Well I think PID control with the VW 20V VVT solenoid is going to be tough. Too much mechanical jitter in the tensioner assembly to get any kind of stable control.
Any mileage in adding a restrictor to slow down the valve response?

James
Not yet I'm looking for a spare to play with before I go taking the one on my car apart. New they are nearly $300 (my cost, list is over $600!).

Jeff
Linfert Performance/321 Motorsports
SCCA 2019 SM National Champion Crew Chief
SCCA 2023 FP National Champion Tuner/electrical engineer
100s of MS systems built installed and tuned
Support the developers!
y8s
Master MS/Extra'er
Posts: 478
Joined: Wed Jan 07, 2009 3:21 pm

Re: VVT ideas and testers

Post by y8s »

prof315 wrote:Well I think PID control with the VW 20V VVT solenoid is going to be tough. Too much mechanical jitter in the tensioner assembly to get any kind of stable control. Generic PWM control on the other hand will definately allow me to rough tune things. I.E. ramp up the advance down low and bleed it off as rpms climb to strech my power curve. I'm going to continue to try PID control but as I said things are not looking great there.

Jeff
What release of the firmware are you using? I had my best VVT control with alpha 6. Currently using alpha 9 and there are some issues with how it works with Mazda Miata VVT.
prof315
Super MS/Extra'er
Posts: 3760
Joined: Sun Jan 18, 2009 3:13 am
Location: Melbourne, FL

Re: VVT ideas and testers

Post by prof315 »

y8s wrote:
prof315 wrote:Well I think PID control with the VW 20V VVT solenoid is going to be tough. Too much mechanical jitter in the tensioner assembly to get any kind of stable control. Generic PWM control on the other hand will definately allow me to rough tune things. I.E. ramp up the advance down low and bleed it off as rpms climb to strech my power curve. I'm going to continue to try PID control but as I said things are not looking great there.

Jeff
What release of the firmware are you using? I had my best VVT control with alpha 6. Currently using alpha 9 and there are some issues with how it works with Mazda Miata VVT.
Almost alpha 10 test code. It's basically alpha 9 with a couple of bug fixes James added to get issues fixed with my car's hardware. (It's was a polling level cam sensor fix and a on/off VVT was broken. He fixed the VVT issue at the megameet for me!!!! :yeah!: )
Linfert Performance/321 Motorsports
SCCA 2019 SM National Champion Crew Chief
SCCA 2023 FP National Champion Tuner/electrical engineer
100s of MS systems built installed and tuned
Support the developers!
y8s
Master MS/Extra'er
Posts: 478
Joined: Wed Jan 07, 2009 3:21 pm

Re: VVT ideas and testers

Post by y8s »

another almost10 test code (probably not the same one) from Ken.

msq and logs
http://y8spec.com/megasquirt/vvt_test/may6/

VVT response is much improved. It still seems to be unstable sometimes, seriously overshooting target and oscillating wildly and then it settles down.

First (smaller size) log is me tuning PID very quickly.

Second is drive to work with the PID values in the msq. 48/28/5 respectively.


Below is a screenshot of the graph of typical behavior. on the left you can see the wild and crazy spikes. on the center and right you can see the oscillation.

Note that it follows the target MUCH better than the alpha9 firmware and doesn't zigzag across the target angle like it did before.

Image
muythaibxr
Site Admin
Posts: 8228
Joined: Thu Oct 14, 2004 12:48 pm

Re: VVT ideas and testers

Post by muythaibxr »

Yeah, looks like it might be too sensitive still. I'll mess with it when I get home.

Ken
Megasquirt is not for use on pollution controlled vehicles. Any advice I give is for off road use only.
prof315
Super MS/Extra'er
Posts: 3760
Joined: Sun Jan 18, 2009 3:13 am
Location: Melbourne, FL

Re: VVT ideas and testers

Post by prof315 »

A quick and semi dumb question concerning PID control with VVT. How are P and I terms affecting things? I've been playing with mine a fair amount the past few days and have been struggling a bit with it. I did notice one thing though. If I maintain a steady rpm for 2 to 3 minutes things DO stabilize, at least as stable as you can get with chain tensioner type VVT as opposed to a cam phaser. Still hunting for a spare so I can play with a restrictor to slow things down but I do seem to be making at least a little progress.
Linfert Performance/321 Motorsports
SCCA 2019 SM National Champion Crew Chief
SCCA 2023 FP National Champion Tuner/electrical engineer
100s of MS systems built installed and tuned
Support the developers!
muythaibxr
Site Admin
Posts: 8228
Joined: Thu Oct 14, 2004 12:48 pm

Re: VVT ideas and testers

Post by muythaibxr »

If you're using the latest alpha, the PID code there isn't really working that well. It worked best in alpha 6, and I'm going to port that code to the latest alpha to "rebaseline" as a starting point for any improvements.

Ken
Megasquirt is not for use on pollution controlled vehicles. Any advice I give is for off road use only.
prof315
Super MS/Extra'er
Posts: 3760
Joined: Sun Jan 18, 2009 3:13 am
Location: Melbourne, FL

Re: VVT ideas and testers

Post by prof315 »

muythaibxr wrote:If you're using the latest alpha, the PID code there isn't really working that well. It worked best in alpha 6, and I'm going to port that code to the latest alpha to "rebaseline" as a starting point for any improvements.

Ken
Ok sounds good, I'll wait, and while I'm waiting I'll continue to look for another tensionser/vvt solenoid to mess with the hardware side.
Linfert Performance/321 Motorsports
SCCA 2019 SM National Champion Crew Chief
SCCA 2023 FP National Champion Tuner/electrical engineer
100s of MS systems built installed and tuned
Support the developers!
shuiend
Helpful MS/Extra'er
Posts: 71
Joined: Thu Jul 03, 2008 3:17 pm

Re: VVT ideas and testers

Post by shuiend »

I finally got around to installing alpha 6 on my miata this evening. I loaded in Y8s VVT settings that he was using and VVT works. I need to go in and tune the PID controls though. I should be dynoing the car at the end of the month and will definitely do pulls with and without VVT so see how it helps.
94 Miata running a MS3. Begi turbo kit with a SR20 t25
jsmcortina
Site Admin
Posts: 39585
Joined: Mon May 03, 2004 1:34 am
Location: Birmingham, UK
Contact:

Re: VVT ideas and testers

Post by jsmcortina »

So... who has tried out alpha 10 for VVT and how are you getting on with it ?

James
I can repair or upgrade Megasquirts in UK. http://www.jamesmurrayengineering.co.uk

My Success story: http://www.msextra.com/forums/viewtopic ... 04&t=34277
MSEXTRA documentation at: http://www.msextra.com/doc/index.html
New users, please read the "Forum Help Page".
prof315
Super MS/Extra'er
Posts: 3760
Joined: Sun Jan 18, 2009 3:13 am
Location: Melbourne, FL

Re: VVT ideas and testers

Post by prof315 »

jsmcortina wrote:So... who has tried out alpha 10 for VVT and how are you getting on with it ?

James
I'm working on tuning the PID settings. Response is MUCH better so far. Even with my crappy not really meant to be PWMed solenoid.
Linfert Performance/321 Motorsports
SCCA 2019 SM National Champion Crew Chief
SCCA 2023 FP National Champion Tuner/electrical engineer
100s of MS systems built installed and tuned
Support the developers!
y8s
Master MS/Extra'er
Posts: 478
Joined: Wed Jan 07, 2009 3:21 pm

Re: VVT ideas and testers

Post by y8s »

jsmcortina wrote:So... who has tried out alpha 10 for VVT and how are you getting on with it ?

James
You know... I just opened my first alpha 10 log that I drove to work on and the "VVT angle 1" doesn't budge from my minimum angle value (277). The "VVT target 1" appears to display normally. "VVT duty 1" is fixed at 0.0 as well.

I haven't compared to the gauge on the TS dash yet.

I made no changes to the settings for VVT aside from raising my minimum fr 275 to 276.5 so the duty cycle wouldn't drive to zero when the cam was resting at 2 degrees of advance when fully retarded (which should be 0 degrees of advance).
muythaibxr
Site Admin
Posts: 8228
Joined: Thu Oct 14, 2004 12:48 pm

Re: VVT ideas and testers

Post by muythaibxr »

Tried what we discussed on IM?

Ken
Megasquirt is not for use on pollution controlled vehicles. Any advice I give is for off road use only.
Post Reply