Go to Post Is any robot ever actually done? - BlondeNerd [more]
Home
Go Back   Chief Delphi > Technical > Programming > NI LabVIEW
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 22-01-2012, 12:04
Betty Boop Betty Boop is offline
Registered User
no team
 
Join Date: Jan 2012
Location: Philippines
Posts: 14
Betty Boop is an unknown quantity at this point
inverse sine FPGA

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!
Attached Files
File Type: vi asin LUT.vi (24.9 KB, 11 views)

Last edited by Betty Boop : 22-01-2012 at 12:13.
Reply With Quote
  #2   Spotlight this post!  
Unread 22-01-2012, 13:54
MotorHead's Avatar
MotorHead MotorHead is offline
Programming Mentor
AKA: Jeff Beltramo
FRC #1922 (OZ-Ram)
Team Role: Coach
 
Join Date: Jan 2008
Rookie Year: 2006
Location: Concord, NH
Posts: 68
MotorHead is a splendid one to beholdMotorHead is a splendid one to beholdMotorHead is a splendid one to beholdMotorHead is a splendid one to beholdMotorHead is a splendid one to beholdMotorHead is a splendid one to beholdMotorHead is a splendid one to behold
Re: inverse sine FPGA

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.
Attached Files
File Type: vi asin LUT.vi (25.3 KB, 7 views)
__________________
Jeff Beltramo
Team #1922
Concord, New Hampshire

Reply With Quote
  #3   Spotlight this post!  
Unread 22-01-2012, 15:15
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,072
Ether has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond repute
Re: inverse sine FPGA

Quote:
Originally Posted by Betty Boop View Post
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).
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.

Reply With Quote
  #4   Spotlight this post!  
Unread 22-01-2012, 18:34
Betty Boop Betty Boop is offline
Registered User
no team
 
Join Date: Jan 2012
Location: Philippines
Posts: 14
Betty Boop is an unknown quantity at this point
Re: inverse sine FPGA

Quote:
Originally Posted by MotorHead View Post
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.
The built-in asin function cannot be implemented inside FPGA VI. That's why LUT is necessary.
Reply With Quote
  #5   Spotlight this post!  
Unread 23-01-2012, 00:42
Betty Boop Betty Boop is offline
Registered User
no team
 
Join Date: Jan 2012
Location: Philippines
Posts: 14
Betty Boop is an unknown quantity at this point
Re: inverse sine FPGA

Quote:
Originally Posted by Ether View Post
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.

Hi, Sir! :D Thanks for giving me an idea! :D I've successfully created the LUT for the inverse sine! :D Thank you very much again! :D Btw, the questions I've posted in the forums are for my thesis :D Thanks for all the help! :D
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 21:57.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi