Thanks for your interest , i will try to provide more details and hope they will be helpful for you.
But first, in that link, i am not using "ATN and HYP", nor "X and Y", nor arctan or arcos or logarith or interpolation...
all my work is that i am getting Power. It is given as you know by:
P = V x I x Cos alpha.
and i am using PIC 16F876A with PicBasic Pro.
I solved the matter of V and I by applying sensors. and for the phase between them, i used a PLL. now i am inserting all 3 variables as inputs for the PIC and i need it to give me the correct power but i discovered that it is giving very wrong values!
i found out that it's from the "cos" because as it is stated, the cosine give value in 2's complement from -127 to +127 and not in the traditional way from 0 to 359 degrees...
But for us, we use the traditional numbering system.... so i need to use it! But it is not working... i can do it with a table but i need to find out if there is a mathematical way to use the same function "cosine" , already provided..
thanks again and i hope you will be able to help me.
Bookmarks