Pages: [1]
Author Topic: Custom C167 Boost PID  (Read 1564 times)
prj
Hero Member
*****

Karma: +389/-101
Offline Offline

Posts: 4062


« on: March 14, 2021, 10:10:17 AM »

Since I will never need this anymore, I will throw this out here.
The main routine needs to run in a 20ms-100ms loop.

The PID has pre-control, D-kick suppression, anti windup, steady state and dynamic modes as well as an on/off window. It also has an application mode to force DC based on RPM.
I wrote it in assembler from scratch more than 5 years ago.

The GitHub repo contains the assembly code, and a sample implementation on a VR5 file. Including re-configuring the inlet manifold flaps switch output into a N75 PWM output.
I used the Keil assembler to assemble the code.

The controller works off of pssol_w as the setpoint and ps_w as the measurement. Whether from MAF or from SD calculation, both work equally well.
It can be used to add real boost control to things like VR5 and VR6 engines.

Do not ask me to implement it in your file unless you are ready to pay 4 digits.
If you have any questions, post them here.
I would rate the difficulty of integrating this as "advanced". If you do not have a good grip on assembler and C167, just move along, nothing to see here.

GitHub repo:
https://github.com/prj/C167BoostControl
Logged
RBPE
Sr. Member
****

Karma: +35/-5
Offline Offline

Posts: 372



« Reply #1 on: March 14, 2021, 01:05:23 PM »

Nice!
Logged
prj
Hero Member
*****

Karma: +389/-101
Offline Offline

Posts: 4062


« Reply #2 on: March 14, 2021, 04:17:02 PM »

Yes, now put it to use Smiley

I need to release a lot more stuff I've been sitting on, since it has no monetary value for me anymore...
If I only had the time.
Logged
sda2
Jr. Member
**

Karma: +10/-0
Offline Offline

Posts: 30


« Reply #3 on: March 24, 2021, 03:29:50 AM »

Thank you very much for this piece of code! We will see how good this works in a non Bosch ECU Smiley

Attached you'll find an XDF made from the CSV you provided.
Logged
prj
Hero Member
*****

Karma: +389/-101
Offline Offline

Posts: 4062


« Reply #4 on: March 24, 2021, 04:46:36 AM »

It does not care very much about ECU in particular.
But you of course must provide your own actual pressure and target (pressure) and do some modifications.

You will need to patch in a "ldrxn" style map somewhere into the ECU.
And you will need to find how to configure the end stage for the correct frequency.
The biggest change is probably the fact that the map lookup routines are going to be different...
« Last Edit: March 24, 2021, 04:50:43 AM by prj » Logged
dream
Full Member
***

Karma: +2/-2
Offline Offline

Posts: 83


« Reply #5 on: March 27, 2021, 03:03:22 PM »

Thank you for your contribution again Prj Smiley
« Last Edit: March 27, 2021, 03:07:24 PM by dream » Logged
jibberjive
Hero Member
*****

Karma: +22/-2
Offline Offline

Posts: 533


« Reply #6 on: April 04, 2021, 02:05:18 AM »

Very cool.
Logged
jochen_145
Full Member
***

Karma: +9/-4
Offline Offline

Posts: 169


« Reply #7 on: April 04, 2021, 04:41:18 AM »

Great stuff, thanks for sharing  Cool

btw.:
does someone got a A2L, Damos o.i. for 066906032A of prj´s example ?
« Last Edit: April 04, 2021, 06:42:12 AM by jochen_145 » Logged
prj
Hero Member
*****

Karma: +389/-101
Offline Offline

Posts: 4062


« Reply #8 on: April 06, 2021, 12:24:02 PM »

I certainly did not when I made it... NA->Turbo, no damos, no problem Cheesy

I looked and I don't think I do even now.
But really, it should not be so hard to adapt the code. If you have a question about what is what in the binary, I can answer.
Logged
jochen_145
Full Member
***

Karma: +9/-4
Offline Offline

Posts: 169


« Reply #9 on: April 06, 2021, 12:42:37 PM »

Thanks,
I do not plan to start sutch a project, but someone in a german TT-forum got the idee to build an 5-cylinder-turbo TT "RS" 8N based on the VR5..

So I´d like to search a little in the dump and playing around to extend the dump run with a proper and linear torque-model. Even chancing MDNORM to a proper value have effect to a lot maps, as you know..

I am too mutch OEM infected to run bended maps and start without the A2L meanwhile  Lips sealed
Logged
prj
Hero Member
*****

Karma: +389/-101
Offline Offline

Posts: 4062


« Reply #10 on: April 07, 2021, 02:01:12 AM »

Well that's what I did this for 5 or 6 years ago, a Golf mk2 IIRC with a VR5 engine and they managed to make a flange to fit a RS3 turbo on it with the manifold.
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Page created in 0.156 seconds with 17 queries. (Pretty URLs adds 0s, 0q)