Sign in to follow this  
Followers 0
JimRowell

Inverse Trig functions

8 posts in this topic

I've always been able to avoid this issue by just using pythagoras but I think its finally caught up with me. I need to find the length of an arc when given the radius of the circle and the length of the chord (the straight-line distance between the two ends of the arc). I'm told there is no way to do it without having access to inverse trig functions. The FX2n can do sin, cos and tan but it won't do arcsin, arccos, etc. For the life of me, I don't know what Mitsi was thinking. Chances are if you want the standard trig functions, you also have a need for the inverses. Has anyone ever had to overcome this limitation? Any ideas? Jim

Share this post


Link to post
Share on other sites
I am pretty sure someone else would be able to provide an equivalent or approximate formula. Anyway, did you think of lookup table? Do you know how many points you need? Small tables would easily fit into any PLC program. Simply do the math in excell and then dump the values into PLC's D-table. (just an idea)

Share this post


Link to post
Share on other sites
Quite a few and I'd have to interpolate if I didn't have a very large table. The arc lengths and therefore the angles will cover a wide spread and accuracy is important. There is an approximation of inverse functions in the form of a trig series that is well known (I just heard about it a few minutes ago) but I'm considering the look-up table approach too. Its kind of frustrating that with the amount of difficult work involved in this project, I have to consider such a basic thing. Thanks Jim

Share this post


Link to post
Share on other sites
Technically you need arcsin. I am really surprised they dot have it, like they don't have Ethernet module - who needs it;) If you have a lot of room in D-Registers table will be the best way. Personally I would look for trig series. Series will use only simple math, so it will be easy to implement. Edited by PLC_Cables

Share this post


Link to post
Share on other sites
Here is a formula you need. I tested it in Excel and depending on the accuracy you may need 4-6 sequence members. More flexible than table.

Share this post


Link to post
Share on other sites
Thanks PlC Cables, I think I found a pretty good solution. Here's a copy of a reply to my request in a math forum. Its from a gentleman named Ricardo Gibert: <quote> let pi = 3.14159... let a = arc length let c = chord length let r = radius let y = c/2 let x = sqrt(r*r - y*y) let u = min(y, x) let v = max(y, x) Now we have u, v and r being the sides of a right triangle sth u <= v <= r. Now compute smallest angle U in degrees: U = 172*u/(v + 2*r) with roughly 4 digits of accuracy! This approximation was given by Ozanam in 1699. If u = y then A = 2*U else A = 2*(90 - U) A is now the angle needed to compute a. a = pi*r*A/180 </quote> Is that sweet or what? Jim

Share this post


Link to post
Share on other sites
This is a good lesson for CONTROLS GUYS, like myself - ask correct people when you don't know the answer Knowledge of basic colledge math is not enough! Originally you and myself as well changed the task: instead of looking for the final answer we were looking for arcsin I found it and forgot about the original task. Well just keep in mind: when next time you need arcsin only look for the Taylor Series. Edited by PLC_Cables

Share this post


Link to post
Share on other sites
Actually, I appreciate the picture you gave of the Taylor Series. Its gives a little more of the detail that a non-math person such as myself needs than any others I've seen on the net. Thanks again. Jim

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0