Coder Social home page Coder Social logo

c167boostcontrol's Introduction

C167 Boost PID

Description

Custom boost PID controller implementation targeted for use in Bosch ME7 control units for N/A engines with aftermarket turbo installs.

Features

  • 3D Precontrol map
  • Setpoint map per gear
  • Steady state and Dynamic modes
  • Operation windowing for on/off
  • Runs from pssol_w as setpoint and ps_w as actual measurement, compatible with MAF or MAP
  • Application mode for calibrating precontrol - open loop duty per RPM
  • Anti wind-up, D-kick prevention

Installation

Keil C167 assembler can be used to assemble the file.

The main function should be placed into a scheduled task, that gets run not less than every 20ms.
The frequency at which the PID is executed basically defines the scale of the units in the P, I and D maps.

You need to re-configure a PWM output. Usually on ME7 with a boosted engine PW1 is the N75 output, on N/A they use that output for the manifold changeover flap, see the example file on how to do this.
Any native output writes to the PWM need to be disabled also (CC 00).

The function call to the last part of the code should go where rlsol_w is assigned.

Hardware

Just use a normal N75 from e.g. 1.8T and wire it into the manifold changeover output.

Description of cal parameters from asm

fixdcmap - Fixed DC map for application mode
fixdcflag - When set to 1 the PID is turned off and fixdcmap values are output directly
pilotmap - Pre-control DC map based on RPM and pssol_w. If you are going to be using it at significant elevation changes, it is a good idea to subtract pu_w from pssol_w when reading this map.
dcmax - maximum allowed PWM
dcmin - minimum allowed PWM
piden - minimum pssol_w for enabling PID, should be at around spring cracking pressure
imaxthres - threshold lderr to switch from dynamic (P/D mode) to steady state (PID mode)
pidpmap - P-term
pidimap - I-term
piddmap - D-term
ldrxn - requested load based on RPM and gear

c167boostcontrol's People

Contributors

prj avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.