Automatic Calibration for Partial Redundant TPS-like Sensors
- Dominant language
- C
- Stars
- 138
- Forks
- 69
- Avg merge
- 5d 20h
- Merged PRs (30d)
- 4
Description
Implement a routine to enable automatic calibration for partial redundant TPS-like sensors; e.g. Toyota ETCS-i ETB.
Automate the process described on the wiki and below.
---
https://wiki.fome.tech/Advanced-Features/ETB/Redundant-Sensors/#partial-redundancy-sensors
> FOME supports partially redundant sensors with the tpsSecondaryMaximum and ppsSecondaryMaximum tune configurations. When necessary, these values should be tuned to indicate the percent of the primary sensor's full-scale reading at which the secondary sensor has just reached it's maximum. There are a number of techniques to determine this value, both directly/precisely and indirectly.
>
> A direct method would be like:
>
> 1. calibrate the sensor's minimum and maximum, e.g. tps1PrimaryMin/tps1PrimaryMax and tps1SecondaryMin/tps1SecondaryMax
> 2. manipulate the sensor until the secondary value just reaches its maximum value, and record the primary's percentage at this point as the sensor's secondary maximum, e.g. tpsSecondaryMaximum
>
> Another method is to iterate upon a close value, looking for TPS error while manipulating the sensor, and adjusting the value until the error goes away. This can lead to imprecision in the calibration however, and may lead to redundancy faults when environmental conditions change too much from that of its calibration.
---
@diy-efi's notes:
> My process is the following week
>
> ETB off
> Get the pedal dialogue up.
> Calibrate that.
> Sweep the pedal slowly until I see the error.
> Use that number for PPS starting point.
>
> Enabled ETB
> Auto calibrate tps.
> It's usually quick enough to not error.
> If that fails repeatedly, turn off ETB.
> Calibrate manually with fingers in the throttle.
>
> ETB back on, sweep until I find the error point, use that.
>
> Power cycle, autotune the pid.
>
> I did it on 3 cars back to back on the old implementation.
>
> So this should be even easier.
----
@mck1117 notes this can be implemented by:
1. actuate the ETB across the range
2. determine the redundancy bend
---
I noted that https://github.com/FOME-Tech/fome-fw/issues/433 seemed to be impeding this notion (though perhaps in [my] mistake), and so may need addressing for conformity as part of this effort
> **nmschulte**:
> ... I started adding a new TS test command (X14) to automate calibration of the partial TPS (and pedal) secondary max ...
> but, the TPS calib can only be fully automated if ETB is configured; I assume this logic should live in electronic_throttle.cpp then.
> however ... pedal cannot be fully automated; will require user to "slowly" actuate the pedal sensor (i.e. via pedal) ...
> both though, will require a sort of iterative approach: EtbImpl's update is used for current TPS auto-cal ... but how would that work for pedal? is a new thread needed or some such?
> ^ led me to: maybe auto-cal partial TPS-like isn't so useful ...
> **nmschulte**:
> the issue with automating it is that it'd need to be an iterative process as far as I can currently tell: need to know the ranges to be able to control it, and controlling it w/ improper ranges causes errors
> **mck1117**:
> why would it be iterative?
> you can enable the sensors, sweep once, look for the corner, done
> **nmschulte**:
> I need to look at it closer, I think it's doable, but it wasn't as straight-forward as I'd anticipated when I tried.
> the TPS or ETB error was getting in the way IIRC
> **mck1117**:
> wiggle it with your finger
> **nmschulte**:
> like, it needed tuned manually (the ranges) before it could sweep
> word, that should work: manually sweep while in the mode 👍
> I was trying for a single button to do it all
> **mck1117**:
> you still don’t need that
> You can do it off the raw values in a log
Contributor guide
Assessment
This issue has not been assessed yet.