What's new

New Version of the 4 Link Calculator

damit,,,,, i had to enable macros...


hahahahahahaha

ahhahaha
1636046692438.png



1636046732252.png

1636046760110.png
 
Treefrog I keyed in every value exactly the same on a freshly downloaded sheet and did not have the problem. I guess I'll attribute this to use error. Please ignore above issues I mentioned.
 
Treefrog I keyed in every value exactly the same on a freshly downloaded sheet and did not have the problem. I guess I'll attribute this to use error. Please ignore above issues I mentioned.
Good to hear. I'm guessing you saved it in open office or another program that doesn't like the macro side of things.
 
Good to hear. I'm guessing you saved it in open office or another program that doesn't like the macro side of things.
not sure , there was a big yellow banner that said enable macros, i thought that was just part of the program and did not mess with it. but then i clicked yes and bam she works. hahhaha :^)
 
is there a way to run the calculator on a Mac with numbers?
 
Version 6.8 is out over on the resources page. Mostly fixes that don't affect anything. Such as, input validation on Shock and Pitch pages. Fixed the lower coilover and shock end location math when mounting to the rear lower link. Fixed a direction issue on the front panhard movement plot.

The only one that may be noticeable is the roll over prediction calculations have been fixed.



On a related note, I've been looking into the compatibility and needed software issue. I wanted to get this last small update finished before I dig into 7. It will not be excel based. It should be more expandable going forward as well. It will take some time, have to teach myself a new programing language for it. There will be a Mac version and a Windows version. They should be the same, just need to have a version for each to avoid having supporting software.

As for new features. Adjustable number of travel points. Using travel at the wheel instead of the lower control arm point. Only update plots on the page being looked at. Plan to store all of the inputs in a separate file. Should make it much better for the user if any updated versions come out. Also a dark background.

Possible long term new features include ORI struts and dual coilover/strut support.

Feature requests are also considered.

I do plan to document the math behind the calculator as I go so that if anyone works on it in the future they won't have to try to figure it out as they go. And so that people can second guess everything.
 
Have not used this, hopefully in the future I will, but wanted to thank you for making this available to all. Awesome work and to put effort into actual documentation is dedication I hope we all can appreciate. :beer::beer:
Version 6.8 is out over on the resources page. Mostly fixes that don't affect anything. Such as, input validation on Shock and Pitch pages. Fixed the lower coilover and shock end location math when mounting to the rear lower link. Fixed a direction issue on the front panhard movement plot.

The only one that may be noticeable is the roll over prediction calculations have been fixed.



On a related note, I've been looking into the compatibility and needed software issue. I wanted to get this last small update finished before I dig into 7. It will not be excel based. It should be more expandable going forward as well. It will take some time, have to teach myself a new programing language for it. There will be a Mac version and a Windows version. They should be the same, just need to have a version for each to avoid having supporting software.

As for new features. Adjustable number of travel points. Using travel at the wheel instead of the lower control arm point. Only update plots on the page being looked at. Plan to store all of the inputs in a separate file. Should make it much better for the user if any updated versions come out. Also a dark background.

Possible long term new features include ORI struts and dual coilover/strut support.

Feature requests are also considered.

I do plan to document the math behind the calculator as I go so that if anyone works on it in the future they won't have to try to figure it out as they go. And so that people can second guess everything.
Have not used this, hopefully in the future I will, but wanted to thank you for making this available to all. Awesome work and to put effort into actual documentation is dedication I hope we all can appreciate. :beer::beer::beer:
 
Just downloaded Version 6.8, I have been running Version 3 for years. Input the same values into 6.8 and I am a little shocked that the AS values are almost half the percentage from 3. Just wondering what has changed between the versions. Thanks,
Pete.
 
Just downloaded Version 6.8, I have been running Version 3 for years. Input the same values into 6.8 and I am a little shocked that the AS values are almost half the percentage from 3. Just wondering what has changed between the versions. Thanks,
Pete.
Drive bias was added. Version 3 had this set as 100% for the axle in question.
 
Plan to store all of the inputs in a separate file. Should make it much better for the user if any updated versions come out.

This is an awesome idea. Maybe we could get a library going on here of members files. This would allow someone who's thinking about linking their rig to find a rig like there's as a starting point.
 
This is an awesome idea. Maybe we could get a library going on here of members files. This would allow someone who's thinking about linking their rig to find a rig like there's as a starting point.
That was part of the idea behind the check my numbers thread.
 
Had a delayed MLK day day off today, so watched the EMC race and got started on the new version. Its probably going to take a decent amount of time to finish. The math is easy, but a bit time consuming to do. And the GUI is going to take quite a while to figure out.

So part 1 of the math behind the calculator. Expect a mix of drawings showing what is going on, descriptions, and some equations. This post is mostly supporting math functions. Future posts will go into how these are used.

Part 2 post number: 106, movement of point on axle
Part 3 post number: 110, panhard movement
Part 4 post number: 113, roll centers and slopes
Part 5 post number: 114, anti values
Part 6 post number: 115, link forces
Part 7 post number: 119, pitch
Part 8 post number: 121, link sizing

Part 9 post number: 122, driveshafts
Part 10 post number: 123, shock movement
Part 11 post number: , shock install ratios
Part 12 post number: , shock spring stuff


Distance Between 2 Points​
Example of uses: link length, frame separation, axle separation

This is used in two forms: 2D and 3D
Uses the Pythagorean theorem.
Point 1 as: x1 y1 z1
Point 2 as: x2 y2 z2
In 3D: distance = sqrt[ (x1-x2)^2 + (y1-y2)^2 + (z1-z2)^2 ]
In 2D: distance = sqrt[ (x1-x2)^2 + (y1-y2)^2 ]

Rotation of 1 point about another in 2D​
Example of uses: shock travel, finding wheel centers, panhard movement

Stationary point as: x0 y0
Rotating point start as: xi yi
Rotating point end as: x y
Angle of rotation: theta

The stationary point and rotation point start are translated such that the stationary point is at the origin.
The rotating point is the rotated about the origin by theta.
The points are translated such that the stationary point is back where it started.

x = (xi - xo) * cos(theta) - (yi - yo) * sin(theta) + xo
y = (yi - yo) * cos(theta) + (xi - xo) * sin(theta) + yo

Line Intersection in 2D​
Example of uses: finding ICs, finding roll centers

2 lines for by pairs of points. Points 1 and 2 for line 1. Points 3 and 4 for line 2.
Point 1 as: x1 y1 z1
Point 2 as: x2 y2 z2
Point 3 as: x3 y3 z3
Point 4 as: x4 y4 z4

From Wikipedia:
Code:
     (((x1*y2)-(y1*x2))(x3-x4)) - ((x1-x2)((x3*y4)-(y3 * x4)))
Px = ---------------------------------------------------------
               ((x1-x2)(y3-y4))-((y1-y2)(x3-x4))
Code:
     (((x1*y2)-(y1*x2))(y3-y4)) - ((y1-y2)((x3*y4)-(y3 * x4)))
Py = ---------------------------------------------------------
               ((x1-x2)(y3-y4))-((y1-y2)(x3-x4))

Distance Between 2 Infinite Lines​
Example of use: distance from shocks to roll axis

2 lines for by pairs of points. Points 1 and 2 for line 1. Points 3 and 4 for line 2.
Point 1 as: x1 y1 z1
Point 2 as: x2 y2 z2
Point 3 as: x3 y3 z3
Point 4 as: x4 y4 z4

From various webpages:
Code:
                         | x2-x1     y2-y1      z2-z1|
                         |   a1        b1       c1   |
                         |   a2        b2       c2   |
    Distance = ---------------------------------------------------
               sqrt((b1c2-b2c1)^2 + (a1c2-a2c1)^2 + (a1b2-a2b1)^2)

Distance Between 2 Line Segments​
Example of uses: distance between links, distance between shocks

2 lines for by pairs of points. Points 1 and 2 for line 1. Points 3 and 4 for line 2.
Credit

TLDR: parameterize lines, use math to find two closest points
if points are in line segments, calculate distance​
if not, find parameter value for closest point to end of segment, check if on segment, calculate distance from end of segment to closest point on other segment, take lowest of distances from each end point​

X and Z when Y equals 0​
Example of use: points defining roll axis

Line defined by two points.
Point 1 as: x1 y1 z1
Point 2 as: x2 y2 z2

Find parameter for y=0 and solve for X and Z
t = -y1/(y2-y1)
x = x1+(x2-x1)*t
z = z1+(z2-z1)*t


Suspension Travel​
Example of uses: find suspension travel:flipoff2:, concepts could be used for solving cantilevered setups

Done in 2D side view. Travel is measured at the lower control arm axle point.

Points are abbreviated.

Step 1: Find new LA_Z.
Add travel to ride LA_Z​
Step 2: Find new LA_X.
Use Pythagorean's Theorem to find the delta X of the moved lower link: sqrt(lowerLength^2 - (LA_Z - LF_Z) ^2)​
Check if frame location is in front of axle location​
Y: Subtract the delta X from the LF_X​
N: Add the delta X to the LF_X​

Step 3: Solve the line between the axle points.

1644034414678.png

  1. Find the angle between horizontal and the lower link.
  2. Find the length between the UF and LA.
  3. Find the length between the frame points and axle points.
  4. Use law of cosines to find the angle between lower link and UF->LA.
  5. Add the angles to find the angle between horizontal and axle.
  6. Use trig to find delta x and delta y for axle and add to LA to get UA.
 
Last edited:
Got around to putting a bit more time into this today. Got through two more functions, wheel center movement and wheel center travel.

Wheel center travel first. The goal here is to have the travel the user puts in be the wheel travel. In all previous versions the user technically inputs the travel of the lower control arm axle point. This is fairly accurate with low pinion angle change and a wheel center near the lower control arm point, add portals and/or lots of pinion angle change and you can easily be off by an inch. All it is is an iterative loop that solves the travel, solves for the wheel center, finds the error from the wheel center Z travel to desired Z travel, subtracts the error from the current LA Z travel to get LA Z travel for the next pass, repeat until error gets small. 0.0001" error is where it is set right now.

The wheel center movement function finds the new wheel center after travel. Form an imaginary line between the lower and upper point at on the axle at ride. Do the same at the travel height. Find the angle from the ride line to the travel line. Rotate the wheel center at ride about the LA point by the angle. Then translate the point after rotation from lower axle ride to lower axle bump. See crude picture. The two yellow lines are parallel and the same length.
1646617732273.png
 
Does it specify wheelbase change through travel?
It is not a directly reported value in the Excel versions. Couple reasons behind this. Mostly due to it being a factor of front and rear and which combination of travel to report. Also because the pitching of the vehicle affects it.

Two ways to find it though. If you are just looking for the values at full bump or full droop, hover the mouse over the end of the black wheel center movement line in the 3rd from thee top plot in the center column of the "Link Calculator" sheet. The other method is to go to the "Calculations" sheet. At the top, columns AD reports the rear wheel center throughout travel and BN for the front.
 
Another progress report. Done with solving the link travel. Now onto all of the outputs we want like roll slopes and antis.

Skipped over the math behind one of the outputs in the last update. Pinion and caster angle changes. The angle change that is used for rotation is the pinion angle change.

And for today's math lesson: Panhard movement.

This one is the first point so far that moves in 3D. There is a big simplification made for this. The axle doesn't move side to side. Put another way, the panhard doesn't affect the axle's movement. This is far from reality, but the math to solve everything in 3D scares and confuses me.

The first part of finding the axle side movement is to find the new X and Z coordinates. The good news is that this is the exact same thing as finding the wheel hub movement (post 106). We also need the 3D length of the panhard (post 105). From there we rearrange the 3d distance equation to solve for Y final.
 
Is there a cheaper or free version of Excel that can run this calculator? I just got a new laptop and my trial version of Excel expired. They want $100/year to keep using it. This calculator is probably the only thing I will use Excel for, so I don't need the full version with all the bells and whistles.
 
Is there a cheaper or free version of Excel that can run this calculator? I just got a new laptop and my trial version of Excel expired. They want $100/year to keep using it. This calculator is probably the only thing I will use Excel for, so I don't need the full version with all the bells and whistles.
Version 5.5 under the history tab on the calc's resources page should be runnable in google sheets.
 
Got through the roll slope and center stuff today. Next up will be antis.

All of the roll center information is defined by two points. Once these two points are known the roll slope can be found by rise over run, aka dz/dx, to give us the in/in or mm/mm slope. A little bit of trig can give us the angle. The roll center can be found by using the line intersection equation from post 105. The second line is defined by the points (wheel hub X, 0, 0) and (wheel hub X, 0, 1). We use the X and Z values when using the intersect equation. The chassis roll slope is found the same way as the suspension ones using the roll centers as the two points.

The hardest part is finding the two points. For simplicity lets call them the upper point and the lower point. Their names comes from which pair of links they are defined by, not which point is higher than the other. For both points, y = 0. As such, we only need to find the X and Z values.

First the lower point. This is the intersection of the lower control arms. So we just use the Y = 0 section from post 105. But this only works when the lower links aren't parallel. When they are parallel the intersection is at infinity. As such the line going from the upper point goes to this infinite point meaning we can treat the roll slope line as parallel to the links. So we add the change in x and z values between the two ends of the lower link to the upper point to get the lower point.

The upper point provides the choice either the upper links or the panhard. The upper links use the same approach as the lower. For the panhard, we take where it crosses Y = 0 plane. In the case of an over constrained suspension of 2 uppers and a panhard, we treat it as the panhard is in control and ignore the upper links.

This creates an issue. When there is no panhard, the uppers are parallel, and the lowers are parallel, we get two points that are dependent on the other for their location. We would never do this in reality since it would result in a suspension that has no side to side resistance, but we still need to account for this situation in the code. Easy way out is set it at Z = -1, and X at +- 1 from the hub. And visually it will show something is wrong when plotted.
 
Now for the antis. The only thing left for the link calculator and that is the forces on the links which is only a link or two of code. I will probably do most of pitch next since it is very similar to the 4 link portion. Then it will be onto link sizing followed by driveshaft lengths and angles; the math for link sizing and driveshaft is short, simple, and straight forward. And wrap it up with the shock portion.

The antis have quite a few assumptions and simplifications made. Some are below with the associated math. Not included below are: the opposing axle and the chassis do not move, the vehicle does not pitch at all, the vehicle is not side sloping or rolling.

First step is to find the tire rate in terms of inches compression per inch travel. This is something new to the calculator, and its use is toggleable. Theoretically it should be more accurate. To find the tire rate, we take the unloaded radius of the tire and subtract the rolling radius. Then divide by the droop.

Next is the ICs. So we once again use the line intersect formula. This time finding where the upper and lower links meet.

Followed by the contact point of the tire. The X value is the same as the hub which we already have. Finding Z using the way its done in versions 6 and earlier is the Z value of the hub minus the rolling radius of the tire. The newer way that accounts for tire compression is hub Z -( unloaded tire radius - tire rate * travel used).

The next part we need is the X location to measure at. We end up needing to measure at 4 points. Front driving, front braking, rear driving and rear braking. Fronts the easy one. Drive and brake biases times the wheelbase accounting for changes in wheelbase caused by the front axle moving. For the rear, its the same concept but we add the rear hub X to account for the rear axle no longer being at 0.

Once again using the intersect function we find where the line from the tire contact patch to the wheel crosses over the X location from the previous step. We only need the Z value, not the X value from this.

What we need next is the CG height of the sprung mass. In this case the sprung mass is the mass of everything that is not moving, the body and the opposing axle. First we have to find the Z location of the center of mass of the axle that is moving. While its not 100% accurate and can't account for water in the tires, we take the centerline of the axles as the CG. When portals are involved we add .5 times the portal height times the cosine of the change in pinion angle. The limitation here is that we are not accounting for the caster that the portal is installed at. Though that may change in the future. To find the sprung CG height of the stationary part of the vehicle, we multiply the mass of vehicle times the CG height of the vehicle minus the moving unsprung mass times the moving unsprung masses CG height. Then we divide this by the vehicle mass minus the moving mass.

And with that we have the 3 values we need. Value 1 is different for all of the 4 antis.
  1. The height of where the line from the wheel to the IC crosses the point of wheelbase * bias
  2. The height of the combined CG of the chassis and the opposing axle
  3. The height of the contact point of the tire and the ground
The antis are calculated by (value 1 - value 3) / (value 2 - value 3).
 
Forces: I could try to explain them but it would not go well. I'm relying on the work of Triaged and Vetteboy being accurate for these.

The logic for all of them is the same. Find the X component of the force. Correct to the angle of the links in the Y and Z directions. Its been a bit since I did this type of math but its fairly standard 3D truss and 2 force member stuff. Panhard solves for forces in the Y directions.

In versions past we took the force at ride. A few versions back, either 5 or 6 I think, I switched it over to max force through travel.

I did forget something in the last post. When the links are parallel. Similar approach to the parallel links for roll centers. Add the lower links to the contact point to get a fake IC that falls along the line to the real IC at infinity.

Hoping to be through Pitch, Link Sizing, and Driveshafts by the end of the week. Guessing a week or two more for shocks. Then the real fun of figuring out the GUI starts.
 
how do i change from metric to standard measurements on this?
At the top of the "Link Calculator" tab in the "Global Settings" box, there is a cell for unit system. Click on the light blue box to get a drop down menu and you can choose between imperial and metric. At least, on version 6.8
 
New version. 6.9.

Rear panhard axle Z was using a hardcoded value instead of the inputted value.

7.0 is still in the works. Been busy so not much progress. Most of the way through pitch. Just need to finish the CG location parts. The prediction parts of it will have to wait until after the shocks stuff is done.
 
Calculator math time. Pitch math.

Antis and roll are calculated using the same method described previously. The stuff important for pitch is CG movement, link movement, and body movement. Lots of the stuff here was described in previous sections, so those will be used but not explained.

Before moving things we need the X and Z coordinates of the sprung mass. We get these by rearranging vehicle mass * vehicle CG = sum(mass of component * CG of component) to isolate CG of component.

We use the same iterative method used for finding the limits of travel to find the lower axle change in Z. We do this front and rear. Next we find the bottom of the wheel accounting for tire compression if desired. Nice thing about tires, the distance from center to bottom does not change. We then find the angle of the line from the bottom point of the rear tire to the bottom point of the front tire. And we rotate all of the suspension points and the CG of the body by this angle. We then translate the points so that the bottom of the rear tire is at X=0 and Z=0. We then calculate two CG heights:
  1. Sprung mass and front unsprung mass
  2. Sprung mass and rear unsprung mass
(1) gets used for the rear antis, (2) gets used for front antis. We do have to account for any rotation of the axle assemblies in case portals are in use.

That sums up everything that can be done to pitch right now. Everything else takes info from the shock calculations. So Link Sizing will be next. Hopefully I don't get to distracted and get to it pretty quick. I expect the math to be short since the same things are being calculated for all linkages including panhards. The materials and rod end databases may take a little time to figure out.
 
Top Back Refresh