Determining the parameters for a spiral tangent to an arc and intersecting a specified point in 2D.

360 Views Asked by At

I am attempting to determine the polar equation for a constant pitch spiral of the that starts at an arbitrary point $(r_1,θ_1)$ and is tangent to an arc of radius $a$ centered at $(r_c,θ_c)$ at point $(r_2,θ_2)$. The spiral I need to generate needs to have constant pitch and be centered at $(0,0)$ but is free to have an initial angle and radius. It's equation would be:

$$r=((r_2−r_1)/(θ_2−θ_1))∗(θ−θ_1)+r_1$$

The circle I have is not centered on either axis and has radius $a$ so it's equation is:

$$r=r_c∗cos(θ−θ_c)+\sqrt{a^2−r_c^2sin^2(θ−θc)}$$

The pitch of the spiral is:

$${\frac {dr}{dθ}} = (r_2 - r_1) / (θ_2 - θ_1)$$

The pitch of the arc is:

$${\frac {dr}{dθ}} = r_csin(θ_c - θ) \left(\frac {r_ccos(θ_c - θ)}{\sqrt{a^2 - r_c^2sin^2(θ_c - θ)}} + 1\right)$$

I need to determine the intersection point with the arc $(r_2, θ_2)$.

I am trying to come up with an algorithm to calculate the motion of a polar robot from a starting point smoothly transitioning into an arc. With a polar mechanical system a spiral is preferable to a straight line and I believe this solution will avoid issues that would be caused by straight line motion when the starting point and arc are in different quadrants. I have tried several approaches using the equation of the arc and the derivatives of the arc and the spiral which should be the same at the intersection point. I have tried in both polar and converting to Cartesian and I have had no success.

I apologize for the large number of edits, still getting used to MathJax

Here is a diagram of the problem:

Diagram

UPDATE: I wrote a iterative algorithm that finds an approximation of the point of intersection by guessing a starting value for $r_2$. It then calculates the pitch of a spiral to the point on the arc at that $r_2$ and the pitch of the arc at that $r_2$. The difference in pitch is used as an error term to iterate the test value of $r_2$ until the error is below a set point. This has proven to work well but is a bit slow on the motion controller I have. So an exact solution would still be extremely helpful.

UPDATE 2: My iterative approach has prove to work well, but my use of the difference in pitch as an error term caused some difficulty where the multiplier of the error term had to vary based on the pitch at that point to avoid over correcting. I was able to overcome this but the number of iterations is still high and finding a complete set of solutions (my machine makes up to 8 of these moves per cycle) can take 2 minutes or more.

I have come to understand that this equation is likely transcendental and so an exact algebraic solution is likely not possible. I have also learned that the Newtonian Method may be used to improve my iterative process. I have posted a new question specifically looking for this approximation:

Using the Newtonian Method to determine the parameters for a spiral tangent to an arc and intersecting a specified point in 2D.