[info] electronic throttle body control ETB

It's all about the code!
960
contributor
contributor
Posts: 336
Joined: Mon Dec 10, 2018 1:22 am
Location: Norway

Re: electronic throttle body control ETB

Post by 960 »

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: 1493
Joined: Mon Jan 30, 2017 2:05 am
Location: Seattle-ish

Re: electronic throttle body control ETB

Post by mck1117 »

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:

https://rusefi.com/forum/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: 336
Joined: Mon Dec 10, 2018 1:22 am
Location: Norway

Re: electronic throttle body control ETB

Post by 960 »

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


I already wrote a summary here:

https://rusefi.com/forum/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
AndreyB
Site Admin
Posts: 14292
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Github Username: rusefillc
Slack: Andrey B

Re: electronic throttle body control ETB

Post by AndreyB »

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/f09119b6fa9412b948b578cf299d58de9d81ad9f
Very limited telepathic abilities - please post logs & tunes where appropriate - http://rusefi.com/s/questions

Always looking for C/C++/Java/PHP developers! Please help us see https://rusefi.com/s/howtocontribute
960
contributor
contributor
Posts: 336
Joined: Mon Dec 10, 2018 1:22 am
Location: Norway

Re: electronic throttle body control ETB

Post by 960 »

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
AndreyB
Site Admin
Posts: 14292
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Github Username: rusefillc
Slack: Andrey B

Re: electronic throttle body control ETB

Post by AndreyB »

Very limited telepathic abilities - please post logs & tunes where appropriate - http://rusefi.com/s/questions

Always looking for C/C++/Java/PHP developers! Please help us see https://rusefi.com/s/howtocontribute
User avatar
kb1gtt
contributor
contributor
Posts: 3758
Joined: Tue Sep 10, 2013 1:42 am
Location: ME of USA

Re: electronic throttle body control ETB

Post by kb1gtt »

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: 336
Joined: Mon Dec 10, 2018 1:22 am
Location: Norway

Re: electronic throttle body control ETB

Post by 960 »

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: 336
Joined: Mon Dec 10, 2018 1:22 am
Location: Norway

Re: electronic throttle body control ETB

Post by 960 »

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
AndreyB
Site Admin
Posts: 14292
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Github Username: rusefillc
Slack: Andrey B

Re: electronic throttle body control ETB

Post by AndreyB »

with no logs and no tune you rely on telepathy alone
Very limited telepathic abilities - please post logs & tunes where appropriate - http://rusefi.com/s/questions

Always looking for C/C++/Java/PHP developers! Please help us see https://rusefi.com/s/howtocontribute
960
contributor
contributor
Posts: 336
Joined: Mon Dec 10, 2018 1:22 am
Location: Norway

Re: electronic throttle body control ETB

Post by 960 »

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
AndreyB
Site Admin
Posts: 14292
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Github Username: rusefillc
Slack: Andrey B

Re: electronic throttle body control ETB

Post by AndreyB »

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

Always looking for C/C++/Java/PHP developers! Please help us see https://rusefi.com/s/howtocontribute
User avatar
AndreyB
Site Admin
Posts: 14292
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Github Username: rusefillc
Slack: Andrey B

Re: electronic throttle body control ETB

Post by AndreyB »

Very limited telepathic abilities - please post logs & tunes where appropriate - http://rusefi.com/s/questions

Always looking for C/C++/Java/PHP developers! Please help us see https://rusefi.com/s/howtocontribute
960
contributor
contributor
Posts: 336
Joined: Mon Dec 10, 2018 1:22 am
Location: Norway

Re: electronic throttle body control ETB

Post by 960 »

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
AndreyB
Site Admin
Posts: 14292
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Github Username: rusefillc
Slack: Andrey B

Re: electronic throttle body control ETB

Post by AndreyB »

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 :)
Very limited telepathic abilities - please post logs & tunes where appropriate - http://rusefi.com/s/questions

Always looking for C/C++/Java/PHP developers! Please help us see https://rusefi.com/s/howtocontribute
960
contributor
contributor
Posts: 336
Joined: Mon Dec 10, 2018 1:22 am
Location: Norway

Re: electronic throttle body control ETB

Post by 960 »

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 :-)

[The extension msq has been deactivated and can no longer be displayed.]

User avatar
AndreyB
Site Admin
Posts: 14292
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Github Username: rusefillc
Slack: Andrey B

Re: electronic throttle body control ETB

Post by AndreyB »

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

Very limited telepathic abilities - please post logs & tunes where appropriate - http://rusefi.com/s/questions

Always looking for C/C++/Java/PHP developers! Please help us see https://rusefi.com/s/howtocontribute
User avatar
AndreyB
Site Admin
Posts: 14292
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Github Username: rusefillc
Slack: Andrey B

Re: electronic throttle body control ETB

Post by AndreyB »

Very limited telepathic abilities - please post logs & tunes where appropriate - http://rusefi.com/s/questions

Always looking for C/C++/Java/PHP developers! Please help us see https://rusefi.com/s/howtocontribute
960
contributor
contributor
Posts: 336
Joined: Mon Dec 10, 2018 1:22 am
Location: Norway

Re: electronic throttle body control ETB

Post by 960 »

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
AndreyB
Site Admin
Posts: 14292
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Github Username: rusefillc
Slack: Andrey B

Re: electronic throttle body control ETB

Post by AndreyB »

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

Always looking for C/C++/Java/PHP developers! Please help us see https://rusefi.com/s/howtocontribute
960
contributor
contributor
Posts: 336
Joined: Mon Dec 10, 2018 1:22 am
Location: Norway

Re: electronic throttle body control ETB

Post by 960 »

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
AndreyB
Site Admin
Posts: 14292
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Github Username: rusefillc
Slack: Andrey B

Re: electronic throttle body control ETB

Post by AndreyB »

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 :)
Very limited telepathic abilities - please post logs & tunes where appropriate - http://rusefi.com/s/questions

Always looking for C/C++/Java/PHP developers! Please help us see https://rusefi.com/s/howtocontribute
960
contributor
contributor
Posts: 336
Joined: Mon Dec 10, 2018 1:22 am
Location: Norway

Re: electronic throttle body control ETB

Post by 960 »

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: 336
Joined: Mon Dec 10, 2018 1:22 am
Location: Norway

Re: electronic throttle body control ETB

Post by 960 »

First log file:
2019-04-24_18_01_07.msl
(1.05 MiB) Downloaded 727 times
User avatar
AndreyB
Site Admin
Posts: 14292
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Github Username: rusefillc
Slack: Andrey B

Re: electronic throttle body control ETB

Post by AndreyB »

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 28535 times
Very limited telepathic abilities - please post logs & tunes where appropriate - http://rusefi.com/s/questions

Always looking for C/C++/Java/PHP developers! Please help us see https://rusefi.com/s/howtocontribute
960
contributor
contributor
Posts: 336
Joined: Mon Dec 10, 2018 1:22 am
Location: Norway

Re: electronic throttle body control ETB

Post by 960 »

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:

[The extension msq has been deactivated and can no longer be displayed.]

2019-04-24_19_18_22.msl
(582.54 KiB) Downloaded 712 times
User avatar
AndreyB
Site Admin
Posts: 14292
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Github Username: rusefillc
Slack: Andrey B

Re: electronic throttle body control ETB

Post by AndreyB »

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

Always looking for C/C++/Java/PHP developers! Please help us see https://rusefi.com/s/howtocontribute
960
contributor
contributor
Posts: 336
Joined: Mon Dec 10, 2018 1:22 am
Location: Norway

Re: electronic throttle body control ETB

Post by 960 »

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
AndreyB
Site Admin
Posts: 14292
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Github Username: rusefillc
Slack: Andrey B

Re: electronic throttle body control ETB

Post by AndreyB »

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.
Very limited telepathic abilities - please post logs & tunes where appropriate - http://rusefi.com/s/questions

Always looking for C/C++/Java/PHP developers! Please help us see https://rusefi.com/s/howtocontribute
960
contributor
contributor
Posts: 336
Joined: Mon Dec 10, 2018 1:22 am
Location: Norway

Re: electronic throttle body control ETB

Post by 960 »

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