Announcement

Collapse
No announcement yet.

VGT Turbo M20 Sleeper ('87 325 Sedan)

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • mikey.antonakakis
    replied
    Another test drive tonight. Majority of bugs are fixed, will probably still make some refinements to parts of the algorithm. Overall though it is working smoothly and predictably, needs more tuning.

    Facing one major frustration right now - boost solenoid inconsistency. It’s super important to get a good characterization of the solenoid open threshold (how much PWM to get it to start to crack open). On a 0-255 PWM signal range, it varied anywhere from 55 to 95 tonight for my fill solenoid. Vent solenoid was a little more consistent, but still problematic. This variation throws off the PID controller a huge amount. As I type this it’s just occurred to me that maybe I am being too aggressive with PWM frequency, currently set to 70Hz. Maybe too much dead time for that. Will try 20-40Hz tomorrow to see if that makes them more consistent.

    Leave a comment:


  • mikey.antonakakis
    replied
    Finally got the test drive in! There are a few bugs in the code, but I was able to sort some of them while driving. For instance, I’m using VE in part of my algorithm, assumed MS sent as 0.96 rather than 96%, which threw the math off by a huge amount. Easy fix that got the new VGT algorithm functioning on a basic level.

    There are still a few issues, for example I offset the boost target a little before I include it in the VGT algorithm in order to ensure the vanes open fully at full boost - the new algorithm is a little too harsh with this at low rpm, though. The vanes snap fully open and cause boost to drop, so the vanes close, a nice oscillation.

    I ran this whole session on wastegate-only, with a lighter spring. Getting me 135kPa MAP for full boost (“5psi” if I was at sea level). Even at this low boost the car is quick, absolutely shredded the tires on a first-gear rolling 2-step launch test (2.93 diff).

    Dome pressure control PID code is working well in the garage at this point. The version rolled into the full display/VGT code must have some critical bug though. I made that section of the software switchable (enable or disable it), and enabling it caused the microcontroller to lock up, so I’ll have to see what that’s about… I have a feeling I know what’s going on, will look into it tomorrow.

    Anyway, the VGT algorithm overall seems to work really well. For the purpose of running on wastegate-only (to measure wastegate-only boost level for the dome pressure control) I disabled the “keep the wastegate slammed shut during spool” feature, and from experience that means I wasn’t spooling as hard as I could be. With hardly any VGT tuning it already seems to spool faster, especially at lower engine speeds. Like, 1800rpm I can make a couple psi in a few seconds. 3000rpm I get to 3psi in about 1.5 seconds before the spool really takes off. The code is a lot more manageable now, a lot easier to change settings quickly for comparison.

    Going to iron out some of the bugs/imperfections this weekend and get some data to compare old vs. new algorithms.

    Leave a comment:


  • mikey.antonakakis
    replied
    Oh and Ground Control coilover conversion and Koni sports are on their way, and I’ve got a Z3 rack waiting for my Garagistic order to ship… (ordered 3 weeks ago, but seems like the delrin steering flex disc was backlogged). Finally replacing the last of the original suspension! (Well, still need swaybars…).

    I think the shocks may be original and the rack in the car now is worn causing play between the front wheels despite brand new tie rods, control arms, strut mounts, etc. It will be nice to have non-sloppy steering for the first time ever with this car! I might even wash it for the first time in, I don’t know, 9 years? Gotta be frugal with the washes, the clearcoat is long gone and you can wipe the powdery paint off the car with your finger!

    Leave a comment:


  • mikey.antonakakis
    replied
    After much convolution of thoughts and plans and algorithms I think I have the VGT code (and wastegate dome code) sorted out. Hopefully some testing tonight. Put finalizing the touchscreen OBC board/controller on hold so I could finish the VGT code, I wanna drive the car!

    Leave a comment:


  • mikey.antonakakis
    replied
    To demonstrate with some real data that the current algorithm isn't ideal, see the following snippet.
    • You can see the vanes (white line bottom plot) stay "most-closed" until MAP (red line top plot) gets 65% of the way to boost target (yellow line top plot). At that point, it starts to open rapidly, marked with first vertical line.
    • A very short time later (second vertical line), the vanes have opened significantly and boost starts to climb more slowly.
    • However, between those two points, boost response is the best out of the whole plot!
    So at the very least, once it starts to open the vanes again, it's WAY too aggressive at opening them. Boost is still rising after then vanes are fully open (hence the need for a wastegate...), but it rises much more slowly.

    boost_flatshift_2022-05-19-2 by Mikey Antonakakis, on Flickr

    Leave a comment:


  • mikey.antonakakis
    replied
    Here's a quick and dirty model of the VGT response, comparing the previous algorithm to the new one. Qualitatively, it ramps the vanes open as soon as boost starts to build, and opens them fully once the boost target is reached. The old version kept the vanes fully closed until MAP gets to 65% of the boost target, then ramps to full open. So, kind of the opposite approach. There's a lot more nuance than that, but that's the simplest explanation. In practice I think this means I can get more aggressive when I initially close the vanes.

    To add one level of nuance: the "most-closed" vane position is currently engine speed-dependent and has been tuned seat-of-my-pants. I shouldn't close the vanes the same level at 5000rpm that I would at 3000rpm, the flow would obviously choke more at 5000rpm. The concept here is to try to find this choke point empirically: measure things at a specific engine speed like initial boost response rate when going WOT, or monitor AFR, adjust the most-closed position, repeat. There's going to be an ideal "most-closed" position for a given engine speed where the initial boost response is best, and significant choking of the mass flow will show up in AFR. I have a feeling the point of best response is similar to the point where the flow starts to choke. Initial boost response vs. most-closed setting should have a hump shape, need to find the setting that gives us the peak.

    Using the speed-density concept, should be able to then estimate relative mass flow from that initial response level, and map out in two or three dimensions how to open the vanes. Adjust from that calibrated ideal "most closed" point proportionally to engine speed, MAP, and VE (from the fuel table) and that should give a decent starting point for the VGT calibration. There will be a little error since VE table is set to richen the mixture, but heck, I could even correct that out by monitoring AFR. Might have to correct for EGT too. In any case, the math/algorithm is model-based, but model will be calibrated to match the real world as much as possible.

    Example: Hypothetically I measure initial boost response a bunch of times at 3000rpm when MAP = baro (80kPa for me), and find the ideal most-closed nozzle area is 7cm^2. Now I want to calculate most-closed nozzle position at 5000rpm:
    • Let's say VE at 3000rpm is 86%, and at 5000rpm 98%
      • I use that to calculate the most-closed area at 5000rpm: 7cm^2 * (5000rpm / 3000rpm) * (98% / 86%), gives 13.3cm^2
    • As boost rises at 5000rpm, I now adjust my VGT nozzle size position proportional to boost:
      • Let's say I'm now at 130kPa MAP and baro is still 80kPa:
        • 13.3cm^2 * 130kPa / 80kPa gives 21.6cm^2.

    VGT Algorithm analysis by Mikey Antonakakis, on Flickr
    Last edited by mikey.antonakakis; 05-25-2022, 11:59 PM.

    Leave a comment:


  • mikey.antonakakis
    replied
    Weather is nice again. I think I figured out a better VGT algorithm and accompanying tuning process. Going to code it up and test hopefully tomorrow.

    Leave a comment:


  • mikey.antonakakis
    replied
    Originally posted by Panici View Post
    Yes, just for purely monitoring once the tune is dialed in.
    Right now as ECU output I have a couple warning lights in my cluster and that's it.

    Analog inputs would be fantastic. Could use your device as a gauge hub and get some pressure/temperature sensors to compliment my traditional VDO gauge senders.
    Definitely going to have that feature (I use for oil pressure, fuel pressure, wastegate dome pressure). As long as total 3.3v power usage is less than 250mA, will support almost any analog and digital sensors (e.g. pressure, temperature, accelerometers, GPS, etc.). For reference, analog pressure sensors usually use 5mA or less, and there are up to 14 analog inputs available.

    Leave a comment:


  • Panici
    replied
    Originally posted by mikey.antonakakis View Post

    I don't think is what you meant, but just to be clear I don't have it set up to tune the Megasquirt parameters. I think it would actually be possible to do stuff like flash maps with this unit, but I haven't personally done it, and it doesn't sound fun to do on 2.8" screen lol. But in theory I think you can if you really want to. For purely monitoring though, it definitely beats the hell of out running 52mm gauges everywhere IMO. And having 8 extra analog inputs for MS2 is super handy.
    Yes, just for purely monitoring once the tune is dialed in.
    Right now as ECU output I have a couple warning lights in my cluster and that's it.

    Analog inputs would be fantastic. Could use your device as a gauge hub and get some pressure/temperature sensors to compliment my traditional VDO gauge senders.

    Leave a comment:


  • mikey.antonakakis
    replied
    Originally posted by Panici View Post
    Thanks for the visit, it's coming together slowly but surely!

    Amazing that you're making some of these displays. I commented on your other thread, I am definitely interested in one for my car.
    Sure beats bringing a laptop around all the time, and A LOT cleaner then running a tablet.
    I don't think is what you meant, but just to be clear I don't have it set up to tune the Megasquirt parameters. I think it would actually be possible to do stuff like flash maps with this unit, but I haven't personally done it, and it doesn't sound fun to do on 2.8" screen lol. But in theory I think you can if you really want to. For purely monitoring though, it definitely beats the hell of out running 52mm gauges everywhere IMO. And having 8 extra analog inputs for MS2 is super handy.

    Leave a comment:


  • Panici
    replied
    Originally posted by mikey.antonakakis View Post
    Thank you for the kind words! I was checking out your build thread last night, didn’t realize how tight the exhaust side can be on a M52! It’s looking great.

    I’m actually working on making a few of the touchscreen OBCs available, will integrate great with MS3X (I just started a thread for that here. The idea is to have a separate enclosure for the brains and I/O of the OBC to make it easier to expand and give flexibility in placement. I will probably order a run of PCBs today, design is done I think:
    Thanks for the visit, it's coming together slowly but surely!

    Amazing that you're making some of these displays. I commented on your other thread, I am definitely interested in one for my car.
    Sure beats bringing a laptop around all the time, and A LOT cleaner then running a tablet.

    Leave a comment:


  • mikey.antonakakis
    replied
    Originally posted by Panici View Post
    I just gave the thread a read. Excellent mix of fabrication and electronics! I've subbed for updates.

    Metal work like your turbo inlet tube made to clear the rad hose is ace.
    https://www.r3vlimited.com/board/fil...3&d=1576458403

    I also love that touch-screen OBC replacement. May have to explore a similar option for my E30 running MS3X (once everything else is done).
    Thank you for the kind words! I was checking out your build thread last night, didn’t realize how tight the exhaust side can be on a M52! It’s looking great.

    I’m actually working on making a few of the touchscreen OBCs available, will integrate great with MS3X (I just started a thread for that here. The idea is to have a separate enclosure for the brains and I/O of the OBC to make it easier to expand and give flexibility in placement. I will probably order a run of PCBs today, design is done I think:

    Screenshot 2022-05-24 182951 by Mikey Antonakakis, on Flickr


    Leave a comment:


  • Panici
    replied
    I just gave the thread a read. Excellent mix of fabrication and electronics! I've subbed for updates.

    Metal work like your turbo inlet tube made to clear the rad hose is ace.
    https://www.r3vlimited.com/board/fil...3&d=1576458403

    I also love that touch-screen OBC replacement. May have to explore a similar option for my E30 running MS3X (once everything else is done).

    Leave a comment:


  • mikey.antonakakis
    replied
    Schematic is “done” for the touchscreen OBC. Contemplating exactly how I want to lay out the PCB. TE Connectivity makes some pretty nice looking enclosures for PCB-mounting bulkhead DTM connectors. I want to do it with dual 12-pin connectors but it is really difficult to source all the parts right now.

    Another small job knocked out. Rewired the intercooler heat exchanger fan to run with intercooler pump instead of engine radiator fan. Noticed the intercooler fan had a bad connection, tried to repair it but the motor housing is stamped/spot welded. For $25 I just got a new one, all back together now.

    At some point in the not-so-distant future I might upsize the intercooler radiator. I’ve got about 90sq-in of core area, could easily fit a 12”x12” core, might be able to fit a 24”x7” although it could get a little tricky with fittings. 24”x12” also might just barely be doable. It really will only make a difference in heat soak, would need a bigger water-air core for better short-term performance. Going to delete the ABS unit soon, which will clear up a lot more space for a bigger core in the future. Last time I checked, it performs pretty decently for being a cheap, smallest-offered kit. After several pulls on warm days, MAT will get up to ~50F+ambient. Going through a couple gears hardly does anything. Will do more up-to-date testing before I swap any of it out.
    Frozenboost.com has their warehouse in town, which is highly convenient, and they have a nice 50% off shelf for items with minor defects.

    Untitled by Mikey Antonakakis, on Flickr
    Last edited by mikey.antonakakis; 05-23-2022, 05:31 PM.

    Leave a comment:


  • mikey.antonakakis
    replied
    In other project updates, working on a PCB for the dash display/VGT controller/CAN interface/Boost controller, schematic is 20-30% complete here:

    Capture by Mikey Antonakakis, on Flickr
    Last edited by mikey.antonakakis; 05-23-2022, 05:29 PM.

    Leave a comment:

Working...
X