New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixed max torque, for more actual torque #497

Closed
wants to merge 4 commits into
base: devel
from

Conversation

Projects
None yet
2 participants
@Gernby
Copy link

Gernby commented Jan 10, 2019

The stock torque command doesn't exceed 3840 (0xF00), and exceeding that value actually results in less torque.

@Gernby

This comment has been minimized.

Copy link
Author

Gernby commented Jan 10, 2019

This explains several observations I've had over the thousands of miles I've been working with OP. The most confusing observation was that the car would sometimes make a corner, and sometimes not come close. Also, when I increased the max value to 32K, I did experience some increase in response, since it allowed more "wrap around" of the bits that are used.

@rbiasini

This comment has been minimized.

Copy link
Contributor

rbiasini commented Jan 10, 2019

How do you know this is true? did you use cabana to compare cmd torque VS electrical EPS torque?
If this is true, I'm ok merging it, but I would remove MAX_SCALE and simply adjust Kp, Ki and Kf tuning according to the new max (linear scaling would keep the control behavior roughly unchanged).

@Gernby

This comment has been minimized.

Copy link
Author

Gernby commented Jan 10, 2019

I haven't reviewed it in cabana yet, but I observed it with my real-time dashboard while doing a test drive on one of my standard test routes. While the response is still lacking, it's far better than I've ever experienced with this car. I was able to take corners at higher speeds with less lane wandering.
screenshot 2019-01-09 22 58 06

@Gernby

This comment has been minimized.

Copy link
Author

Gernby commented Jan 10, 2019

Regarding the STEER_SCALE, I agree it would be preferrable to adjust all of the other Honda's K values to eliminate the need for STEER_SCALE. I actually did something like that at first, but the response wasn't the same. Without actually calculating the values, I assumed that all of the [0.6,], [0.18,] values would "nicely" convert to the [0.8,], [0.24,] values that the CRV's and Civics use, but those values didn't work well for my Accord. Also, the standard value for all Honda's Kf is 0.00006, so it seems less desirable to split the 2 existing "tuning groups" into 4:
Existing tuning groups:
Kf = 0.00006, Kp = 0.6, and Ki = 0.18
Kf = 0.00006, Kp = 0.8, and Ki = 0.24

New tuning groups:
Kf = 0.000064, Kp = 0.64, and Ki = 0.192
Kf = 0.000064, Kp = 0.853, and Ki = 0.256

EDIT: I went the wrong way with the conversions in my original post...

@Gernby

This comment has been minimized.

Copy link
Author

Gernby commented Jan 10, 2019

I should mention the issue I raised a few weeks ago about some "episodes" I experienced relating to the stock RDM system, which prompted me to do some testing with OP in passive mode to observe the stock RDM values. The max values for RDM were 3840.
image

Gernby added some commits Jan 10, 2019

@Gernby

This comment has been minimized.

Copy link
Author

Gernby commented Jan 29, 2019

After more testing, I don't think there is a max torque value, just a max response (per time). Here are some test results while steering with a keyboard to command values multiple times higher than 0x1000. Note that the EPS responded almost identically in each direction, with 2 steering "bursts" about 5-6 seconds apart.

I'm going to close this PR, since it seems unnecessary.
screenshot 2019-01-28 16 16 45
screenshot 2019-01-28 16 48 22

@Gernby Gernby closed this Jan 29, 2019

@Gernby Gernby deleted the Gernby:fix-max-torque branch Feb 16, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment