I think the easy way (linear from 0 to each side) would do, as the sensor mostly isn’t linear too. Normally ago needs very few degrees to keep on line and when doing u turn it steers to max. In my case it didn’t as left right measurement difference was 8°
You need to calculate the the inner and outer steering angle respectively based on wheel width and wheelbase where your base becomes the wheel with the sensor on it. Cotangent is your friend.
If you would like to research the answer, search google for “relationship of left right steering angle ackerman”
Robust estimation of Ackerman angles for front-axle
steered vehicles
That PDF has some hard to understand English in it.
At first, I tried to calculate it with the wheelbase and track width like the following…
But apparently the usual ackerman linkage where track rod is slightly longer or shorter than front axle does have that ideal focal point only at one specific turning angle, just like in that image. Any other turning angle and that focal point is not in line with the rear axle.
I made a little fusion360 model that shows this miss alignment of those lines. In this model, I used dimensions measured from my Puma 155.
File: Dropbox - File Deleted
The model includes also test for the sensor placement similar to Kaupois system.
If the sensorless side turning angle is calculated like I first showed, then you don’t run into problems with the inaccuracy of the mechanical linkage… I hope xD
Like so many things in AgOpenGPS, it doesn’t have to model the world perfectly, it just needs to come up with a pretty close answer.
So, the cotangent of the outer wheel angle minus the cotangent of the inner wheel angle coincidentally equals the width of the track divided by the wheelbase.
Depending on the direction you are turning, an since you only have 1 wheel with a wheel angle sensor, solve for either inner or outer angle accordingly. Farmer math
Why not connect the sensor rod to the track rod?
Hello,
@FiveFinnishFarmers and @grabik, thank a lot for the mathematical approach of calculating the angles of the Ackermann steering. With this, I understund better the code of @doppelgrau.
FiveFinnishFarmers, your Fusion360 modèle is very helpfull to understand how work the Ackermann steering and the evolution of the different angles, thanks a lot ! I’m an OnShape user (never used Fusion360 before) and I made a model of Ackermann with it, but clearly, OnShape is not as powerfull as Fusion360 for motion analisys : I can’t display the evolution of multiple dimentions as you did with your Fusion360 model.
By playing with the model, we can clearly see that the angle of the “virtual wheel in the center of the axle” is the avarage of the left and right wheel angle.
We also can see that the @Kaupoi WAS mounting is wery good : for a “virtual wheel” angle of +/-40°, the WAS mesurement error at the extrem angle is 1°.
So finally, I will have to rework my WAS installation for a better solution and avoid software compensation. In addiction, an installation like Kaupoi is easy to do in my case with the steering rod !
I also like the way you modeled the “virtual centered wheel” with the “red pin slot rod”. I also could be a solution for the linkage between the WAS and the steering rod.
I have to learn Fusion360 to modified your model to do some test. One thing I would try is what will be the error of the WAS if I install It with a “pin slot rod” but not in the center of the wheel base, but somewhere on left or right sight of the WB ?
@Tooki57, @Alan.Webb : because I was convinced that the displacement of the cylinder rod was symetric and I didn’t check this before mounting the WAS. I was wrong.
And in the same time, as the steering rod are not only translating along x and y axis (horizontal plan) like in a classic steering, but also rotating around z (vertical axis) with the affect that the rod don’t stay parallel to the wheel base, I wasn’t sure of the final effect on the WAS measurement.
Thank,
Math
I can see that the rotation of your steering rod in the last picture of post 14 will effect quite a bit on WAS reading, especially when turning left.
But if you connect to the middle of track rod (the bar between the wheels) as Tooki and Alan suggest, the small possible rotation of that bar will not effect the WAS if your connection (about 30 cm long) is parallel to track rod /connection bar. (looking from front end, and same height from ground as connection)
The last piece of connection to track rod must be as short as possible.
Here’s WAS rod connected to center of the track rod of Sampo combine. Works good.
Here is a little program where you can enter sensor value and it tries to calculate the correct steering angle.
there are two different sets of calculations. The first one is my style where the whole steering linkage is simulated and the sensorless wheel position calculated. The second one is basically a copy of the @doppelgrau Arduino code.
I have enjoyed playing with this, probably it is not useful for anything
It’s my first code so there is lot of dumb writing in it, sorry for that.
Well here I thought I had a bad wheel angle sensor but all along it was ackermann steering that was messing with me haha. I have my system driving straight really well now and it can turn right fine but turning left overshoots like crazy do to my left and right turn angles not being the same. Is this code mod going to be something I should try to tackle or will version 4 have this built in .
doesn’t help right now, but…
Hello,
I really like your Fusion360 model. I learn a bit Fusion360 in order to edit it and compare different sensors installations.
Original model:
Edition I made:
And I draw the angle of the 4 sensors, left & right wheel as a function of the virtual centered wheel reference, to mesure the behavior of all of this:
Zoom on the negativ and positiv values:
Sensors position 1, 2 & 3, proposed by @Kaupoi, @Alan.Webb, @Tooki57, @Larsvest works very well to compensate for Ackermann and eliminate the need of specific Arduino algorithm.
I will go throught one of this solution.
I also made a video of your model, perhaps it will help other members that haven’t Fusion360:
Here is the edited Fusion360 model and my Excel file:
It was nice to learn Fusion360, but I really prefer the way OnShape works, so bad that OnShape hasn’t powerfull motion analysis possibility like Fusion360 !
Math
My wheel angle sensor is on the front left side and if I say turn left 25 degrees I get 25 degrees on the left side, if I say turn right 25 degrees I get 35 degrees on the right side.
What would be the Ackerman steering percentage I am after in version 4 Agopengps?
I am thinking it should be 70 but I have tried 70 and 130 and it doesn’t change the position at all…
Adjust the value till its the same.
Can you post a picture of your installation?
I sent different percentages to the arduino through the module config menu and it doesn’t seem to change anything. Does it make a difference which side the WAS is on to begin with?
The tractor has a factory WAS that I started with, but its output wasn’t very linear. I ended up installing this one and It would drive straight and turn one way good. Would be nice to figure out the ackerman steering and have it turn both ways accurately. Three lefts do make a right haha…
The wheels are currently turned full right for the picture. I know most people have been using linkages but I wanted to see if I could eliminate that and have the sensor arm follow the tie rod movement.
It adjusts one side. BAsically all it does is if the steer angle is less then 0 it multiplies steer angle by the percent you set.
Did you upload the latest ino to the steer board? Are you hitting send each time?
// ***** make sure that negative steer angle makes a left turn and positive value is a right turn *****
Okay so if the steer angle is less than zero that means it would be adjusting the left side only.
I had measured my left side and knew it gave me 25 and was trying to get 25 on the right. I’ll try it the other way around tomorrow. I will change the counts per degree to get 25 on the right and then see what I need for a percentage to get a 25 on my left next.
normally the Ackerman correction is the last step in steer calc, so the invertion should be allready applied. The first thought: 25/35 = 71% left/right should be correct.
Just adjust and watch the steer angle numbers change. If they don’t change, its the other direction that does the changing.