0

I am working on a spreadsheet to determine the kinematics of a vehicle steering column that uses three shafts connected by two universal joints. The mechanism can lie anywhere in 3D space.

An important part of the problem is to calculate the angle between the two planes defined by each consecutive pair of shafts and the joint between them, i.e. plane $1$ is defined by the upper and intermediate shafts, and plane $2$ is defined by the intermediate and lower shafts.

The problem I have is that the two equations I have tried both return the same answer when the second plane is flipped by changing the direction of the lower shaft so that it is mirrored in plane $1$. This is just an example to show that the same answer is given for multiple configurations of the mechanism. In reality I will be given only one configuration, but the ratio of output to input rotation is dependent on knowing the exact direction (and angular disposition) of the shafts.

To clarify, here are the two plane normals:

Plane $1$: $u = [0, 32000, 0]$;

Plane $2$: $v = [-10944, -30070, -20209.1904]$

The first equation I tried was:

$\operatorname{atan2} (x, y)$

Where:

$x=u\cdot v$

$y=||u\times v||$

Note the order of the arguments is $x$ then $y$ as I'm working in Excel.

This gives $142.61^\circ$.

The next equation I tried (from: https://math.stackexchange.com/a/1782769/539130) was:

$2\cdot \operatorname{atan2}(x, y)$

Where:

$x=||\,||v||u+||u||v\,||$

$y=||\,||v||u−||u||v\,||$

This too gives $142.61^\circ$

Then I changed the lower shaft direction so that the normal of plane $2$ was changed to plane $2'$:

Plane $2'$: $v = [10944, -30070, 20209.1904]$

Both equations continue to give $142.61^\circ$.

Could you advise on a method that can distinguish between these two configurations so that I can be assured of the correct (i.e. desired) angle?

The calculation of the plane normals is consistent, using the order of the shafts from top to bottom and with the right-hand rule. Could I perhaps use some similar knowledge to ensure consistent calculation of the angle between the normals?

Thanks, Simon.

enter image description here

  • The problem is that a plane's normal can be written as $(a, b, c)$ or $(-a, -b, -c)$. Both will give supplementary angles. One of the ways could be that you fixed $z$ direction to be positive for measuring angles between planes. If $z$ component is zero then you have to have convention on $x$ or $y$. I am not sure if it satisfies your requirement. – Math Lover Jul 15 '21 at 15:58
  • If it matters, after you flipped the normal of plane 2, the normal reported here is $v = [10944, −30070, 20209.1904]$, whose second component is the same as before reflecting. That sign error might, of course, be a typo when the question was composed.... – Andrew D. Hwang Jul 15 '21 at 21:14
  • I think I should add an explanatory paragraph. My spreadsheet calculator would be presented with one configuration or the other - either plane 1 and plane 2 or plane 1 and plane 2 'flipped'. The purpose of the above query is to show that there are multiple configurations that give the same answer for this stage of the process - the angle between the planes. I need to ensure by some means that I can determine the exact configuration of shafts because a positive rotation of the input shaft will give different output rotations for each of the above arrangements. – Simon Aldworth Jul 16 '21 at 07:16
  • @AndrewD.Hwang. The coordinates are correct - the vector is mirrored in plane 1. – Simon Aldworth Jul 16 '21 at 07:17
  • Thanks for the formatting edits but two were not correct. It is atan2 not a.tan2. I don't seem to be qualified to review the edits so I've just put those two back as they were, plus added a dot in 2.atan2 – Simon Aldworth Jul 16 '21 at 12:01
  • I'd misunderstood what was meant by "flipping". <> IIRC, plane 1 is the $(x, z)$ plane. To reflect in plane 1, only the second component changes sign, not the first and third components. That should reconcile the apparent discrepency with angles. – Andrew D. Hwang Jul 16 '21 at 14:19
  • Andrew is correct. I urge you to try plotting your three vectors, along with the normal plane of $u$ if you can, on an actual 3D visualization tool, and look at them from various perspectives. The vectors whose coordinates you have given us do not look like the picture you drew; you can get $u$ and the original $v$ to match the picture reasonably well (except that contrary to the picture, $v$ is longer than $u$), but the coordinates of the "flipped" $v$ are opposite to the vector you have drawn. – David K Jul 17 '21 at 01:13
  • Recall the formula $u\cdot v = \lVert u\rVert \lVert v\rVert \cos\theta,$ where $\theta$ is the angle between the vectors $u$ and $v.$ If two vectors make an acute angle with each other, their dot product is always positive. Your dot product $u\cdot v$ is negative even after you "flip" $v.$ That's another proof that the numbers don't match the picture. – David K Jul 17 '21 at 02:44
  • My sincerest apologies to all, particularly Andrew, who quite correctly first pointed out my mistakes. I made quite a hash of it. If I could beg you to review the revised question and image then I would be very grateful. The vectors in the image are now the correct length whereas they were arbitrary before, however, the view is not normal to any particular plane. My mistakes stemmed from working in a different coordinate system in the CAD and then totally failing to spot the obvious discrepancies between the coordinates for plane 2' and the image. Apologies again. – Simon Aldworth Jul 17 '21 at 11:10
  • In continuing to look at the problem now that the image and CAD are correct, I can see that the cross product of the pairs of plane normals is a vector along the line of the intermediate shaft - by definition of the two planes. In the first configuration, the cross product is 'looking' along the shaft at the first joint, whilst in the second it is 'looking' along the shaft away from the first joint. Perhaps I can use this to determine the desired angle if there is a mathematical way of defining which way the cross product vector is looking in relation to the first joint? – Simon Aldworth Jul 17 '21 at 11:32
  • @DavidK. Thanks for the comment, I will take a look in due course. In the meantime, regarding your second comment, the speed of the output shaft of a UJ varies considerably throughout its rotation and as a function of the joint angles. See here for an old time video with suggested application for an unwanted club membership card: https://youtu.be/gmV4qwLfOMY – Simon Aldworth Jul 19 '21 at 15:48
  • The slight variations in phasing are significant to the performance of the system. The 140-odd degrees is not the shaft phasing. It is the angle between the planes as defined in my question and describes the directional arrangement of the shafts (as opposed to the relative rotation of the shafts). If the shafts all lie in a single plane then the angle between planes would be 180 or 0 deg. I think I have found a solution using the method I mention above - the cross product of the two plane normals will be either 0 or 180 deg to the middle shaft depending on specific configuration. – Simon Aldworth Jul 21 '21 at 07:19

1 Answers1

1

I have found a suitable solution by using the fact that the cross product of the two plane normals will be a vector that makes an angle of either 0 or 180 deg to the intermediate shaft depending on which of the two configurations the system is in.

For example, the two plane normals in the first arrangement were:

$Plane\,1: u=[0,32000,0];$

$Plane\,2: v=[−10944,−30070,−20209.1904]$

So their cross product is:

$z=||u×v||=[-646694092.8,0,350208000]$

The intermediate shaft has the vector:

$i=[-369.32,0,200]$

The angle between $z$ and $i$ using the dot product is:

$angle=z\cdot i=0\unicode{xB0}$

If the lower shaft is mirrored in Plane $1$, then:

$Plane\,2: v=[10944,−30070,20209.1904]$

so now:

$z=||u×v||=[646694092.8,0,-350208000]$

and:

$angle=z\cdot i=180\unicode{xB0}$

So I can determine the exact difference between the two configurations that both present the same angle between Plane $1$ and Plane $2$.