Some vector math is involved here so prepare yourself.
I am developing a robotic arm that moves in two dimensions. It is a rotary-rotary design which looks roughly like the picture in this post: Building Robotic arm joint
I am now trying to limit the speed of the end-effector. I am using Simulink and believe that the best way to limit the speed is the limit the rate of change of the X and Y coordinates that I tell it to move to.
Now, I also want the end-effector to be able to move in a straight line and believe that I can accomplish this by defining functions that calculate the maximum rate for movement in the X or Y direction based on the distance the arm is trying to travel. The equasion I came up with is this :
xRate = (abs(currentX - nextX) / max(abs(currentX - nextX), abs(currentY - nextY)) yRate = (abs(currentY - nextY) / max(abs(currentX - nextX), abs(currentY - nextY))
So basically, XRate: distance in x / max between distance in X and distance in Y.
Now, for the actual problem. Because this limits the speed in both X and Y, the end-effector can travel (for instance) 1 in./sec in both directions at the same time. Meaning that it is travelling at OVER 1 in./sec overall. If, however, it is only moving in ONE direction then it will only move at that 1 in./sec speed because there is no second component. It boils down to the fact that the max speed the arm can move is 'sqrt(2)' and the minimum is '1'.
My main question is: Given that I need to calculate a max xRate and a max yRate, how can I limit the overall speed of the end-effector?
Secondarily, is there a way for me to implement a rate control that will limit the overall rate instead of limiting X and Y independantly using Simulink?