I’m implementing inverse sine inside the FPGA VI. To do that, I use lookup table/LUT. I found the attached VI. I’m just wondering if there’s a way that I could be the one to set the input values in the LUT? In the attached VI, the input value is between 0-1023 which is the ‘address’. Is there a way that I could customize LUT for the input value (i.e. input values could be: -1, 0.8, 0.6… not necessarily the address which is 0,1,…1023)? It’s because I’m having a hard time utilizing the attached VI in mapping the input and output to their true values (i.e. -1 to 1 for input, -pi/2 to pi/2 for output). Thank you very much for your time!
asin LUT.vi (24.9 KB)
asin LUT.vi (24.9 KB)
I am confused why you are using a look up table. There is an arc sine function built into LabVIEW. You can find in the Functions Pallet group -> Mathematics -> Elementary & Special Functions -> Trigonometric -> asin
I modified and attached your vi with the asin function in it. If you need to shift the value or do a unit change, you can do it to the output of the asin function.
asin LUT.vi (25.3 KB)
asin LUT.vi (25.3 KB)
I’ll answer your lookup table question, even though I too wonder why you are doing this.
For indices from 0 to 1022, populate your table with arcsine(index/511-1).
To use the table to find arcsine(X) (where -1<=X<=+1), calculate the index as 511*(X+1) and look up the arcsine for that index in the table.
*
*
The built-in asin function cannot be implemented inside FPGA VI. That’s why LUT is necessary.
Hi, Sir! Thanks for giving me an idea! I’ve successfully created the LUT for the inverse sine! Thank you very much again! Btw, the questions I’ve posted in the forums are for my thesis Thanks for all the help!