[help needed] electronic throttle body control ETB

It's all about the code!
960
contributor
contributor
Posts: 285
Joined: Mon Dec 10, 2018 1:22 am
Soldering skill: yes
Coding skill?: yes

Re: electronic throttle body control ETB

Post by 960 » Mon Apr 22, 2019 12:56 pm

At page 1332 in FunktionsRahmen there are some information that can be useful.

It's the ADVE section.

The files ADVE.C and DDVE.C might also be of interest.

http://files.s4wiki.com/docs/Audi_R4-5V_T_132kW_ME7.pdf

mck1117
running engine in first post
running engine in first post
Posts: 226
Joined: Mon Jan 30, 2017 2:05 am
Location: Seattle-ish
Soldering skill: yes
Coding skill?: yes

Re: electronic throttle body control ETB

Post by mck1117 » Mon Apr 22, 2019 10:40 pm

960 wrote:
Mon Apr 22, 2019 10:59 am
How do I set up the Duty bias and calibrate TPS?

The best would be to "turn off" PID and Pedal position influence somehow, and test what duty are needed.

I am not so deep into this yet, so it might be I just misunderstand.

A basic setup procedure would be nice, as I think having the exact correct duty are a must before the PID tuning.

Btw, it was the duty that caused all the issues for me.

I had it working best and even idling with -6 to 20.
I already wrote a summary here:

viewtopic.php?f=5&t=592&start=150#p32044

tl;dr:
  1. Zero out PID gains, adjust bias table to cancel out the spring
  2. Tune PID

960
contributor
contributor
Posts: 285
Joined: Mon Dec 10, 2018 1:22 am
Soldering skill: yes
Coding skill?: yes

Re: electronic throttle body control ETB

Post by 960 » Mon Apr 22, 2019 11:57 pm

mck1117 wrote:
Mon Apr 22, 2019 10:40 pm


I already wrote a summary here:

viewtopic.php?f=5&t=592&start=150#p32044

tl;dr:
  1. Zero out PID gains, adjust bias table to cancel out the spring
  2. Tune PID
Thanks!

That's exactly what I was looking for :-)

User avatar
russian
Site Admin
Posts: 9521
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Soldering skill: yes
Coding skill?: yes
Contact:

Re: electronic throttle body control ETB

Post by russian » Tue Apr 23, 2019 1:33 am

https://rusefi.com/s/etb created and buttons added to TS project. These buttons do not work yet, one step at a time :)

https://github.com/rusefi/rusefi/commit ... de9d81ad9f
https://rusefi.com/s/howtocontribute
very limited telepathic abilities - please post logs & tunes where appropriate - http://rusefi.com/s/questions
my skype is arro239

960
contributor
contributor
Posts: 285
Joined: Mon Dec 10, 2018 1:22 am
Soldering skill: yes
Coding skill?: yes

Re: electronic throttle body control ETB

Post by 960 » Tue Apr 23, 2019 10:30 am

Thanks @, a great step closer in user-friendly direction :-)

One thing I still havent found out is vhat verbose means?

I have never seen the word in any context, and cannot find a meaningful translation.

Feeling stupid :?

User avatar
russian
Site Admin
Posts: 9521
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Soldering skill: yes
Coding skill?: yes
Contact:

Re: electronic throttle body control ETB

Post by russian » Tue Apr 23, 2019 1:10 pm

https://rusefi.com/s/howtocontribute
very limited telepathic abilities - please post logs & tunes where appropriate - http://rusefi.com/s/questions
my skype is arro239

User avatar
kb1gtt
contributor
contributor
Posts: 3407
Joined: Tue Sep 10, 2013 1:42 am
Location: ME of USA
Contact:

Re: electronic throttle body control ETB

Post by kb1gtt » Tue Apr 23, 2019 4:26 pm

Verbose is a common word in Linux land. It simply means to display more stuff in your error logs and similar. It is also common that you have multiple levels of verbose, so you might call a like this

Code: Select all

./program-blah -v 
This would display more than normal error messages to you error logs. However it's common you might call it like this.

Code: Select all

./program-blah -v5 
Or like this

Code: Select all

./program-blah -vvvvv 
The more v's or higher the number, means it displays more and more error logs.

Here's a blip about it relative to the windows command prompt.
https://www.computerhope.com/jargon/v/verbose-mode.htm

I think verbose is a defacto standard, and not really solidly defined. I think it varies from developer to developer and is done however that developer happened to choose to use it.
Welcome to the friendlier side of internet crazy :)

960
contributor
contributor
Posts: 285
Joined: Mon Dec 10, 2018 1:22 am
Soldering skill: yes
Coding skill?: yes

Re: electronic throttle body control ETB

Post by 960 » Tue Apr 23, 2019 4:39 pm

I dont get this working good, and have lots of strange happenings with the ETB.

First of all setting the duty:

I have it closed with just around -4, and open at around 16.

It moves wery slow when pressing the pedal, and are "pulsing" a little all the time.

Is this normal?

When adding numbers to PID fields again, first P it does not reach 100% open anymore.

When setting P (I recall too low), when closing, it "hangs" around 20% for some seconds before it drop to zero.

Also, what are the offset for?

If not at 0, ETB opens, and with just 20 it's around 40% open.

I know I am doing something wrong here, but just dont understand what :?

960
contributor
contributor
Posts: 285
Joined: Mon Dec 10, 2018 1:22 am
Soldering skill: yes
Coding skill?: yes

Re: electronic throttle body control ETB

Post by 960 » Tue Apr 23, 2019 4:42 pm

kb1gtt wrote:
Tue Apr 23, 2019 4:26 pm
Verbose is a common word in Linux land. It simply means to display more stuff in your error logs and similar. It is also common that you have multiple levels of verbose, so you might call a like this

Code: Select all

./program-blah -v 
This would display more than normal error messages to you error logs. However it's common you might call it like this.

Code: Select all

./program-blah -v5 
Or like this

Code: Select all

./program-blah -vvvvv 
The more v's or higher the number, means it displays more and more error logs.

Here's a blip about it relative to the windows command prompt.
https://www.computerhope.com/jargon/v/verbose-mode.htm

I think verbose is a defacto standard, and not really solidly defined. I think it varies from developer to developer and is done however that developer happened to choose to use it.
I see :-)

Then it definitivly doesn't belong in the "Car" world :D

User avatar
russian
Site Admin
Posts: 9521
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Soldering skill: yes
Coding skill?: yes
Contact:

Re: electronic throttle body control ETB

Post by russian » Tue Apr 23, 2019 4:42 pm

with no logs and no tune you rely on telepathy alone
https://rusefi.com/s/howtocontribute
very limited telepathic abilities - please post logs & tunes where appropriate - http://rusefi.com/s/questions
my skype is arro239

960
contributor
contributor
Posts: 285
Joined: Mon Dec 10, 2018 1:22 am
Soldering skill: yes
Coding skill?: yes

Re: electronic throttle body control ETB

Post by 960 » Tue Apr 23, 2019 4:51 pm

russian wrote:
Tue Apr 23, 2019 4:42 pm
with no logs and no tune you rely on telepathy alone
Ok, logging in TS ?

What fields/values?

User avatar
russian
Site Admin
Posts: 9521
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Soldering skill: yes
Coding skill?: yes
Contact:

Re: electronic throttle body control ETB

Post by russian » Tue Apr 23, 2019 5:03 pm

TS logs everything by default. but please use debug mode "ETB". Need more documentation I guess :(
https://rusefi.com/s/howtocontribute
very limited telepathic abilities - please post logs & tunes where appropriate - http://rusefi.com/s/questions
my skype is arro239

User avatar
russian
Site Admin
Posts: 9521
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Soldering skill: yes
Coding skill?: yes
Contact:

Re: electronic throttle body control ETB

Post by russian » Tue Apr 23, 2019 7:46 pm

https://rusefi.com/s/howtocontribute
very limited telepathic abilities - please post logs & tunes where appropriate - http://rusefi.com/s/questions
my skype is arro239

960
contributor
contributor
Posts: 285
Joined: Mon Dec 10, 2018 1:22 am
Soldering skill: yes
Coding skill?: yes

Re: electronic throttle body control ETB

Post by 960 » Tue Apr 23, 2019 10:12 pm

I did not log today, but I got it working a little better.

The thing that I found most strange are the duty cycle values.

The ETB are fully closed at around -4

This is my values:


0.0
1.0
2.0
4.0
99.0
99.0
99.0
100.0

-4.5
-3.0
-1.5
0.0
17.0
17.0
17.0
17.5

How about cranking and idle?

Are there any implementation somewhere I havent found?

I adjusted pedal the position closed value until I had around 3% opening to get it running.

User avatar
russian
Site Admin
Posts: 9521
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Soldering skill: yes
Coding skill?: yes
Contact:

Re: electronic throttle body control ETB

Post by russian » Tue Apr 23, 2019 10:23 pm

960 wrote:
Tue Apr 23, 2019 10:12 pm
This is my values
This is your bias curve but without your PID settings. Can you please just post your log? It could also be nice if you use https://getsharex.com/ to make screen shots - but ONLY if you also post your tune file which is usually called currenttune.msq

It's really sad that we have no logs :( It's valuable information, please invest a bit more time in sharing more objective data.

No ETB cranking or idle at the moment, this is something I will be working on pretty soon. Probably after you post your first logs :)
https://rusefi.com/s/howtocontribute
very limited telepathic abilities - please post logs & tunes where appropriate - http://rusefi.com/s/questions
my skype is arro239

960
contributor
contributor
Posts: 285
Joined: Mon Dec 10, 2018 1:22 am
Soldering skill: yes
Coding skill?: yes

Re: electronic throttle body control ETB

Post by 960 » Tue Apr 23, 2019 10:55 pm

russian wrote:
Tue Apr 23, 2019 10:23 pm
960 wrote:
Tue Apr 23, 2019 10:12 pm
This is my values
This is your bias curve but without your PID settings. Can you please just post your log? It could also be nice if you use https://getsharex.com/ to make screen shots - but ONLY if you also post your tune file which is usually called currenttune.msq

It's really sad that we have no logs :( It's valuable information, please invest a bit more time in sharing more objective data.

No ETB cranking or idle at the moment, this is something I will be working on pretty soon. Probably after you post your first logs :)
I will continue tomorrow, and make some logs.

Reason I didnt today was that I was sure my setup was wrong, or I misunderstand.
When I do the setup, I cannot move the ETB freely both ways, like there was no spring.
Then I would have to disconnect the pedal?

Should the duty be changed after the PID setting?

I found these values so strange, they differ so much both from yours and the LINK/MaxxEcu basemaps.

They go to about the same value both negative and positive.

Rest of the settings was mostly the same as you posted I think, but I have tried changing a lot.

This is the currenttune I have now, if you will check if anything are wery wrong :-)
Audi_A4.msq
(139.14 KiB) Downloaded 24 times

User avatar
russian
Site Admin
Posts: 9521
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Soldering skill: yes
Coding skill?: yes
Contact:

Re: electronic throttle body control ETB

Post by russian » Wed Apr 24, 2019 1:07 am

@ please report your Final Result. Log files are automatically written to "out" folder.

https://rusefi.com/s/howtocontribute
very limited telepathic abilities - please post logs & tunes where appropriate - http://rusefi.com/s/questions
my skype is arro239

User avatar
russian
Site Admin
Posts: 9521
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Soldering skill: yes
Coding skill?: yes
Contact:

Re: electronic throttle body control ETB

Post by russian » Wed Apr 24, 2019 12:21 pm

https://rusefi.com/s/howtocontribute
very limited telepathic abilities - please post logs & tunes where appropriate - http://rusefi.com/s/questions
my skype is arro239

960
contributor
contributor
Posts: 285
Joined: Mon Dec 10, 2018 1:22 am
Soldering skill: yes
Coding skill?: yes

Re: electronic throttle body control ETB

Post by 960 » Wed Apr 24, 2019 12:53 pm

Going out to test again soon!

Btw, I have a F767 at this board, can this alter something?

It's got other speed, are the pwm still correct?

User avatar
russian
Site Admin
Posts: 9521
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Soldering skill: yes
Coding skill?: yes
Contact:

Re: electronic throttle body control ETB

Post by russian » Wed Apr 24, 2019 1:10 pm

please validate using a logic analyzer and report if any issues. there is exactly zero people on staff :)
https://rusefi.com/s/howtocontribute
very limited telepathic abilities - please post logs & tunes where appropriate - http://rusefi.com/s/questions
my skype is arro239

960
contributor
contributor
Posts: 285
Joined: Mon Dec 10, 2018 1:22 am
Soldering skill: yes
Coding skill?: yes

Re: electronic throttle body control ETB

Post by 960 » Wed Apr 24, 2019 1:26 pm

Just a theory, the initial ETB setup could be done automatically with just one routine/button ?

1. disable pedal position/PID
2. store the tps rest position
3. increase negative duty until tps adc stop counting, store min.
4. increase duty until tps stops counting, store max.
5. increase negative duty until it reaches 0%, store min duty.
6 increase duty until it reach 100%, store max duty.

Am I totally wrong, or what do you think?

User avatar
russian
Site Admin
Posts: 9521
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Soldering skill: yes
Coding skill?: yes
Contact:

Re: electronic throttle body control ETB

Post by russian » Wed Apr 24, 2019 1:41 pm

Please post a log of your best settings with the standart test in fresh console, i believe we have no data to discuss without it.

please try your algorithm and report results. the only way to know is to try things and gather hard evidence. please start posting hard evidence :)
https://rusefi.com/s/howtocontribute
very limited telepathic abilities - please post logs & tunes where appropriate - http://rusefi.com/s/questions
my skype is arro239

960
contributor
contributor
Posts: 285
Joined: Mon Dec 10, 2018 1:22 am
Soldering skill: yes
Coding skill?: yes

Re: electronic throttle body control ETB

Post by 960 » Wed Apr 24, 2019 1:50 pm

russian wrote:
Wed Apr 24, 2019 1:41 pm
Please post a log of your best settings with the standart test in fresh console, i believe we have no data to discuss without it.

please try your algorithm and report results. the only way to know is to try things and gather hard evidence. please start posting hard evidence :)

Going out again now, but are the software pwm affected by MCU speed?


Also just found something interesting about both self-learning and spring-check :-)

960
contributor
contributor
Posts: 285
Joined: Mon Dec 10, 2018 1:22 am
Soldering skill: yes
Coding skill?: yes

Re: electronic throttle body control ETB

Post by 960 » Wed Apr 24, 2019 4:08 pm

First log file:
2019-04-24_18_01_07.msl
(1.05 MiB) Downloaded 115 times

User avatar
russian
Site Admin
Posts: 9521
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Soldering skill: yes
Coding skill?: yes
Contact:

Re: electronic throttle body control ETB

Post by russian » Wed Apr 24, 2019 4:51 pm

Not so bad! There is oscillation for sure but at least it kind of goes somewhere.

Is this test button or you? What is your test value?

I still suggest building a test rig outside of the car.
Attachments
javaw_ycVhUmIoi3.png
javaw_ycVhUmIoi3.png (125.54 KiB) Viewed 340 times
https://rusefi.com/s/howtocontribute
very limited telepathic abilities - please post logs & tunes where appropriate - http://rusefi.com/s/questions
my skype is arro239

960
contributor
contributor
Posts: 285
Joined: Mon Dec 10, 2018 1:22 am
Soldering skill: yes
Coding skill?: yes

Re: electronic throttle body control ETB

Post by 960 » Wed Apr 24, 2019 5:27 pm

It should be just test-button.

I have got it much better, it seems to be all about the bias-curve.

I think it's related to my non-linear analog inputs.

Chech these settings:
Audi_A4.msq
(138.99 KiB) Downloaded 25 times
2019-04-24_19_18_22.msl
(582.54 KiB) Downloaded 111 times

User avatar
russian
Site Admin
Posts: 9521
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Soldering skill: yes
Coding skill?: yes
Contact:

Re: electronic throttle body control ETB

Post by russian » Wed Apr 24, 2019 5:29 pm

I do not think you have shared your Final Result value since technically that's the value we are trying to minimize.
https://rusefi.com/s/howtocontribute
very limited telepathic abilities - please post logs & tunes where appropriate - http://rusefi.com/s/questions
my skype is arro239

960
contributor
contributor
Posts: 285
Joined: Mon Dec 10, 2018 1:22 am
Soldering skill: yes
Coding skill?: yes

Re: electronic throttle body control ETB

Post by 960 » Wed Apr 24, 2019 7:05 pm

russian wrote:
Wed Apr 24, 2019 5:29 pm
I do not think you have shared your Final Result value since technically that's the value we are trying to minimize.
I recall the last one was 247.xxx.

I need to learn more about this for this to be useful.

Right now I am just wasting lots of time just trying different things in blind, without understanding how it works.

from what I have found, the bias curve makes tons of difference, and difficult to get right.

I think that this could be done automatically much better.

User avatar
russian
Site Admin
Posts: 9521
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Soldering skill: yes
Coding skill?: yes
Contact:

Re: electronic throttle body control ETB

Post by russian » Wed Apr 24, 2019 9:07 pm

960 wrote:
Wed Apr 24, 2019 1:26 pm
Just a theory, the initial ETB setup could be done automatically with just one routine/button ?

1. disable pedal position/PID
2. store the tps rest position
3. increase negative duty until tps adc stop counting, store min.
4. increase duty until tps stops counting, store max.
5. increase negative duty until it reaches 0%, store min duty.
6 increase duty until it reach 100%, store max duty.

Am I totally wrong, or what do you think?
This is pretty close to "Magic Spot Finder" from the recent video? Also I've just added "more" and "less" buttons for direct PWM drive.
https://rusefi.com/s/howtocontribute
very limited telepathic abilities - please post logs & tunes where appropriate - http://rusefi.com/s/questions
my skype is arro239

960
contributor
contributor
Posts: 285
Joined: Mon Dec 10, 2018 1:22 am
Soldering skill: yes
Coding skill?: yes

Re: electronic throttle body control ETB

Post by 960 » Wed Apr 24, 2019 10:17 pm

russian wrote:
Wed Apr 24, 2019 9:07 pm
This is pretty close to "Magic Spot Finder" from the recent video? Also I've just added "more" and "less" buttons for direct PWM drive.
Yes, partly.

But the values are not used for anything.

With just a few additions, it can catch + store/set both bias curve points + TPS min, max and rest.

No need to manually set TPS values, it can just run until ADC values stops counting?

Post Reply