Ford Focus Forum, Ford Focus ST Forum, Ford Focus RS Forum

Ford Focus Forum, Ford Focus ST Forum, Ford Focus RS Forum (https://www.focusfanatics.com/forum/)
-   MK3 Focus (https://www.focusfanatics.com/forum/mk3-focus/)
-   -   Torque PID for Ford Focus (https://www.focusfanatics.com/forum/mk3-focus/430434-torque-pid-ford-focus.html)

millinnium 06-16-2014 12:07 AM

Torque PID for Ford Focus
 
Here you go community:

Latest Update 20/6/14:
Learned Relative Octane Adjust "OCTANE ADJ" "2203E8" "((256*A)+B)*(-0.0000610124)+3.998717499" "%"
Equation for Learned Octane Adjust confirmed.

Equation for Clutch Slip Corrected:
Clutch A Slip "CLUTCH A SLIP" "221ebb" "((Signed(A)*256)+B)/4" "RPM"
Clutch B Slip "CLUTCH B SLIP" "221ebc" "((Signed(A)*256)+B)/4" "RPM"

Update 19/6/14:
Battery Current Equation found, added to confirm working and correct equation section


CONFIRM WORKING AND CORRECT EQUATION:

Name "ShortName" "ModeAndPID" "Equation" "Min Value" "Max Value" "Units" "Header"
Accelerator Pedal Position "ACC PEDAL POS" "22032b" "A/2" "%"
Air Cond Compressor State "AIR COND" "22099b" "A"
Battery Age "BATT AGE" "224027" "((A*256)+B)" "Days" "726"
Battery Charge "BATT%" "224028" "A" "%" "726"
Battery Current BATT CUR 224090 (((A*256)+B)/16)-511.7 -600 600 Amp 726
Battery Temperature "BATT Temp" "224029" "A-40" "C" "726"
Fuel Level "FUEL LEVEL" "22f42f" "A/256*100" "%"
Fuel Pump Pressure Desired "FUEL PSI DESIRED" "2203dc" "((256*A)+b)*10*.145" "PSI"
Gear Commanded by Output State "GEAR" "221e12" "A" "Gear"
In Car Temperature "INCARTEMP" "22dd04" "A/8" "C" "726"
Lateral G "LAT G" "222b11" "((signed(A)*256)+B)*0.02" "g" "ABS"
Longitude G "LONG G" "222b0c" "((signed(A)*256)+B)*0.02" "g" "ABS"
Steering Wheel Angle "STWHEEL" "223302" "((signed(A)*256+b))/10-780" "" "ABS"
Throttle Position (Desired) "TP D" "22091a" "((A*256)+B)*(100/8192)" ""
Trans Axle Gear Ratio Measured "GEAR RATIO" "221e16" "((A*256)+B)/4096" ":1"
Transmission Gear Engaged "GEAR ENGAGED" "221e1f" "A" "Gear"
Transmission Gear Mode "GEAR MODE" "221e23" "A" "Mode"
ABS Wheel Speed 1 "ABS RFW" "222b06" "A" "KM/H" "ABS"
ABS Wheel Speed 2 "ABS LFW" "222b07" "A" "KM/H" "ABS"
ABS Wheel Speed 3 "ABS RRW" "222b08" "A" "KM/H" "ABS"
ABS Wheel Speed 4 "ABS LRW" "222b09" "A" "KM/H" "ABS"
Engine Knock "Knock" "2203ec" "signed(A)/2" ""

EQUATION not solved but PID working:
Brake Fluid line Hydraulic Pressure "BFLHP" "222b0d" "A" "kpa"
Catalyst Temperature "CAT TEMP" "22f43c" "((A*256)+B)-40" "C"
Clutch Open "CLUTCH STATE" "221eA0" "A&256"
Engine Total Distance "ENG DIST" "22dd01" "((A*256)+B)" "KM"
In Gear "IN GEAR" "221e04" "A"
Inlet Air Temperature Fault "INLET TEMP" "220700" "A"
Max Diff between TP1 and TP2 "DIFF TP1 TP2" "2203A7" "A" ""
Torque Control Request "TORQ CON" "2203AF" "A"
Transmission Temperature "Trans" "221E1C" "(((SIGNED(A)*256)+B)*(9/8)+320)/10" "-40" "260" "C" "TCM"

PratoN 06-16-2014 11:03 AM

Aww yis.

EDIT: I copied this into a text file and opened it with excel - it makes it easier to read and gets rid of the "" characters that aren't really supposed to be there. I still had to move around the units/headers to the correct columns if there aren't min/max values specified. Cool stuff - I'll test it tonight!

millinnium 06-17-2014 01:18 AM

Quote:

Originally Posted by PratoN (Post 6295362)
Aww yis.

EDIT: I copied this into a text file and opened it with excel - it makes it easier to read and gets rid of the "" characters that aren't really supposed to be there. I still had to move around the units/headers to the correct columns if there aren't min/max values specified. Cool stuff - I'll test it tonight!

Sadly i cannot attach a CSV file to this forum, so yes, have to do it the manual way. Let me know if you can figure out better equations. I have manage to figure out most but not all.

BetaDnB 06-17-2014 11:52 AM

Quote:

Originally Posted by millinnium (Post 6300881)
Sadly i cannot attach a CSV file to this forum...

You could always make it public on a cloud and provide the link.

zehkaiser 06-17-2014 07:38 PM

I've been trying to get my hands on something like this for a while. Thanks!

papaacer 06-17-2014 07:41 PM

48 Attachment(s)
subbed

zehkaiser 06-17-2014 08:15 PM

I am currently formatting this into a CSV so we can all import, but I'm having a problem with MIN/MAX values. I have to set one for each line, or the import fails. How do I know what those values should be?

zehkaiser 06-17-2014 09:03 PM

Updated to match OP on 6/20/14

Get the csv here. If you prefer to past the text into your own csv, the data is below.

Code:

"Name","ShortName","ModeAndPID","Equation","Min Value","Max Value","Units","Header"
"Accelerator Pedal Position","Acc Pedal Pos","22032b","A/2",0,100,"%",""
"Air Cond Compressor State","Air Cond","22099b","A",0,1,"",""
"Battery Age","Batt Age","224027","((A*256)+B)",0,1825,"Days","726"
"Battery Charge","Batt %","224028","A/256*100",0,100,"%","726"
"Battery Current","Batt Cur","224090","(((A*256)+B)/16)-511.7",-300,300,"Amp","726"
"Battery Temperature","Batt Temp","224029","A-40",0,100,"C","726"
"Brake Fluid Line Hydraulic Pressure","Brk Fl Press","222b0d","A",0,7000,"kpa",""
"Catalyst Temperature","Cat Temp","22f43c","((A*256)+B)-40",0,1000,"C",""
"Clutch A Slip","Clutch A Slip","221ebb","((Signed(A)*256)+B)/4",-1000,1000,"RPM",""
"Clutch B Slip","Clutch B Slip","221ebc","((Signed(A)*256)+B)/4",-1000,1000,"RPM",""
"Clutch Open","Clutch State","221eA0","A*256",0,1,"",""
"Engine Total Distance","Eng Dist","22dd01","((A*256)+B)",0,200000,"km",""
"Fuel Level","Fuel Lvl","22f42f","A/256*100",0,100,"%",""
"Fuel Pump Pressure Desired","Fuel PSI Des","2203dc","((256*A)+b)*10*.145",0,75,"PSI",""
"Gear Commanded by Output State","Gear Cmd","221e12","A",-1,6,"Gear",""
"In Car Temperature","In Car Temp","22dd04","A/8",0,50,"C","726"
"In Gear","IN GEAR","221e04","A",0,1,"",""
"Inlet Air Temperature Fault","Inlet Temp","220700","A",-25,50,"",""
"Lateral Angle","Lat ","222b0c","SIGNED(A)",-90,90,"","ABS"
"Lateral G","Lat G","222b11","((signed(A)*256)+B)*0.02",-1,1,"g","ABS"
"Learned Relative Octane Adjust","Octane Adj","2203E8","((256*A)+B)*(-0.0000610124)+3.998717499",-

100,100,"%",""
"Longitude G","Long G","222b0c","((signed(A)*256)+B)*0.02",-1,1,"g","ABS"
"Max Diff between TP1 and TP2","Diff TP1 TP2","2203A7","A",0,90,"",""
"Steering Wheel Angle","StWheel Ang","223302","((signed(A)*256+b)/10-780",-720,720,"","ABS"
"Throttle Position (Desired)","T Pos D","22091a","((A*256)+B)*(100/8192)",0,90,"",""
"Torque Control Request","Trq Cont","2203AF","A",0,100,"",""
"Trans Axle Gear Ratio Measured","Gear Ratio","221e16","((A*256)+B)/4096",0,10,":1",""
"Transmission Gear Engaged","Gear Eng","221e1f","A",-1,6,"Gear",""
"Transmission Gear Mode","Gear Mode","221e23","A",-1,6,"Mode",""
"Transmission Temperature","Trans","221E1C","(((SIGNED(A)*256)+B)*(9/8)+320)/10",0,150,"C","TCM"
"ABS Wheel Speed 1","ABS RFW","222b06","A",0,200,"km/h","ABS"
"ABS Wheel Speed 2","ABS LFW","222b07","A",0,200,"km/h","ABS"
"ABS Wheel Speed 3","ABS RRW","222b08","A",0,200,"km/h","ABS"
"ABS Wheel Speed 4","ABS LRW","222b09","A",0,200,"km/h","ABS"
"Engine Knock","Knock","2203ec","signed(A)/2",0,90,"",""


millinnium 06-18-2014 07:25 AM

Quote:

Originally Posted by zehkaiser (Post 6306985)
Here goes nothing... I slapped together this file. You can download it here. It is also in plain text so anyone can paste it into notepad, save it to a .csv and call it a day. I also fixed a typo in an equation and removed the extra characters.

Code:

"Name","ShortName","ModeAndPID","Equation","Min Value","Max Value","Units","Header"
"Accelerator Pedal Position","ACC PEDAL POS","22032b","A/2",0,100,"%",""
"Air Cond Compressor State","AIR COND","22099b","A",0,1,"",""
"Battery Age","BATT AGE","224027","((A*256)+B)",0,4096,"Days",""
"Battery Charge","BATT%","224028","A/256*100",0,100,"%",""
"Battery Temperature","BATT Temp","224029","A-40",-100,256,"C",""
"Brake Fluid Line Hydraulic Pressure","BFLHP","222b0d","A",0,16384,"kpa",""
"Catalyst Temperature","CAT TEMP","22f43c","((A*256)+B)-40",-100,512,"C",""
"Clutch A Slip","CLUTCH A SLIP","221ebb","((A*256)+B)*(1/4)",0,1024,"RPM",""
"Clutch B Slip","CLUTCH B SLIP","221ebc","((A*256)+B)*(1/4)",0,1024,"RPM",""
"Clutch Open","CLUTCH STATE","221eA0","A*256",0,1,"",""
"Engine Total Distance","ENG DIST","22dd01","((A*256)+B)",0,1000000,"km",""
"Fuel Level","FUEL LEVEL","22f42f","A/256*100",0,100,"%",""
"Fuel Pump Pressure Desired","FUEL PSI DESIRED","2203dc","((256*A)+b)*10*.145",0,512,"PSI",""
"Gear Commanded by Output State","GEAR","2.21E+14","A",-1,6,"Gear",""
"In Car Temperature","INCARTEMP","22dd04","A/8",-100,100,"C",""
"In Gear","IN GEAR","2.21E+06","A",-1,6,"",""
"Inlet Air Temperature Fault","INLET TEMP","220700","A",-100,256,"",""
"Lateral Angle","LAT ","222b0c","SIGNED(A)",-360,360,"","ABS"
"Lateral G","LAT G","222b11","((signed(A)*256)+B)*0.02",-32,32,"g","ABS"
"Learned Relative Octane Adjust","OCTANE ADJ","2.20E+11","A/256*100",-256,256,"%",""
"Longitude G","LONG G","222b0c","((signed(A)*256)+B)*0.02",-32,32,"g","ABS"
"Max Diff between TP1 and TP2","DIFF TP1 TP2","2203A7","A",0,360,"",""
"Steering Wheel Angle","STWHEEL","223302","((signed(A)*256+b)/10-780",0,1440,"","ABS"
"Throttle Position (Desired)","TP D","22091a","((A*256)+B)*(100/8192)",0,90,"",""
"Torque Control Request","TORQ CON","2203AF","A",0,1,"",""
"Trans Axle Gear Ratio Measured","GEAR RATIO","2.21E+18","((A*256)+B)/4096",0,24,":1",""
"Transmission Gear Engaged","GEAR ENGAGED","221e1f","A",-1,6,"Gear",""
"Transmission Gear Mode","GEAR MODE","2.21E+25","A",-1,6,"Mode",""
"Transmission Temperature","Trans","221E1C","(((SIGNED(A)*256)+B)*(9/8)+320)/10",-100,256,"C","TCM"
"ABS Wheel Speed 1","ABS RFW","222b06","A",0,512,"km/h","ABS"
"ABS Wheel Speed 2","ABS LFW","222b07","A",0,512,"km/h","ABS"
"ABS Wheel Speed 3","ABS RRW","222b08","A",0,512,"km/h","ABS"
"ABS Wheel Speed 4","ABS LRW","222b09","A",0,512,"km/h","ABS"
"Engine Knock","Knock","2203ec","signed(A)/2",0,100,"",""

Here are screenshots from my BlackBerry running Torque showing the PIDs while my car was running. Not all of them are working, and I can't even validate that some of these are accurate. I chose MIN and MAX values that I felt would be within the bounds of the sensor, but I can't tell if that is causing problems.

http://i.imgur.com/huApz7H.png
http://i.imgur.com/lpurEDn.png
http://i.imgur.com/mD8ztUz.png
http://i.imgur.com/JrVZuFr.png

Hi Zehkaiser, thank you for your good work.

for your battery settings, make sure to use header "726", this will make your battery PIDs work.

All I request is more people in this community help figure out the equations.

zehkaiser 06-18-2014 07:28 AM

Quote:

Originally Posted by millinnium (Post 6309065)
Hi Zehkaiser, thank you for your good work.

for your battery settings, make sure to use header "726", this will make your battery PIDs work.

All I request is more people in this community help figure out the equations.

Well, I feel stupid. I'll update the post and the file. Thanks for supplying the PIDs. I ran some logging this morning on my way to work, but I haven't looked at the data to see if anything looks weird.


All times are GMT -5. The time now is 01:40 AM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2019, vBulletin Solutions, Inc.
Search Engine Optimization by vBSEO 3.6.1
vBulletin Security provided by vBSecurity v2.2.2 (Pro) - vBulletin Mods & Addons Copyright © 2019 DragonByte Technologies Ltd.