Kinematic model for a 5axis mill with universal (nutating) head

More
2 years 10 months ago #289379 by Aciera
Correction:
with the substitution for 'v' we can then solve for Sa and thus for the angle of joint A 

with the substitution for 'v' we can then solve for Ca and thus for the angle of joint A 
The following user(s) said Thank You: tommylight

Please Log in or Create an account to join the conversation.

More
2 years 10 months ago #289419 by Paul01
Thanks Aciera,

Your help means a lot. I wouldn't know how to do any of this on my own.

I've been trying to understand the if-else statements in 'remap.py' for the tool-orientation vector by substituting known values into the calculations, but my math is a little lacking so I still don't fully understand how the calculations work. And I presume I will need to change them if I have a 55° nutating head. For example, if Kwy = 1, A_j = pi and B_j = 0 will only work on a 45° nutating head.

The part of the calculations I understand the least are the parts of the if-else statements similar to this:

            if  -(sqrt(2)*Kwz*Sa_j) <= Sa_j*Sa_j:
                B_j = (- asin(2*(sqrt(2)*Kwz*Sa_j - (Ca_j + 1)*Kwx)/(Ca_j*Ca_j
                       + 2*Sa_j*Sa_j + 2*Ca_j + 1)))

A bit of an explanation about how this works would be great. I'll post the full section of code below.

The '-(tctc-vstc)cb-(cactc-tstc)sb=0' did confuse me for a second, but there was a note in the file stating it referred to row 3, column 1 of the inverse tool kinematic. It was easy enough to understand after this.

Please Log in or Create an account to join the conversation.

More
2 years 10 months ago - 2 years 9 months ago #289420 by Paul01
Warning: Spoiler!
Last edit: 2 years 9 months ago by Paul01.

Please Log in or Create an account to join the conversation.

More
2 years 10 months ago - 2 years 10 months ago #289427 by Aciera
Ok, the point is that once we derive our formulas for the joint angles (A_j and B_j) using the 3rd column of the tranformation matrix as described in my last post we have something like this.

A_j = acos(2*Kwy - 1)
Sa_j = sin(A_j)
Ca_j = cos(A_j)
B_j = asin(2*(sqrt(2)*Kwz*Sa_j - (Ca_j + 1)*Kwx)/(Ca_j*Ca_j + 2*Sa_j*Sa_j + 2*Ca_j + 1))

If you plug that into the remap and test the simulation you will notice that there are ranges of tool-orientations where the resulting angles are offset to what you need to get the spindle correctly oriented. In some ranges it will fit in others it is the complement of what you need or the you need to change the sign of the value. These 'areas' is what I call 'quadrants' in the remap. A lot of this came through trial and error along the lines of 'from here to here need to add 'pi' and from there to there I need to subtract half a pi and change the sign'.

Unfortunately I don't recall how I came up with the conditionals:
if sqrt(2)*Kwz*Sa_j <= Sa_j*Sa_j:

I'll see if that comes back to me.
Here is a somewhat expanded, later version:

Warning: Spoiler!


NB: clearly some of the comments in the code make no sense. Like this one:
 # Kwz <  0 AND Kwz < 0
These are a remnant of the stage where I thought I could keep the quadrants apart by checking whether individual elements of the tool-vector were positive or negative. Alas it's not quite so simple.
 
Last edit: 2 years 10 months ago by Aciera.
The following user(s) said Thank You: tommylight

Please Log in or Create an account to join the conversation.

More
2 years 9 months ago #289593 by Aciera

Unfortunately I don't recall how I came up with the conditionals:
if sqrt(2)*Kwz*Sa_j <= Sa_j*Sa_j:

I've had some time to look at this again and it seems that this condition is always true.
So maybe try to simply remove those and also the formulas for 'quadrants'  112,122,212 and 222

Please Log in or Create an account to join the conversation.

More
2 years 9 months ago #289647 by Paul01
Good to know. The expanded, later version will also help me out too.
It's been a steep learning curve jumping into 5 axis kinematics. Until a month or two ago my machine was only a 3 axis. So it'll take me a bit of time to implement everything correctly.
As a side note, a large portion of the programming I do on the 5 axis machines at my work is just 2D machining on angled faces, so I'm glad TWP's are being worked on in LinuxCNC.
I wonder also if Fusion 360's post can convert tilted work plane operations to XYZABC coordinates and keep the original work coordinate system. This will help me out while I'm working through the 'remap.py' file

Please Log in or Create an account to join the conversation.

Time to create page: 0.142 seconds
Powered by Kunena Forum