View Single Post
  #3   Spotlight this post!  
Unread 09-06-2008, 15:08
Joe Ross's Avatar Unsung FIRST Hero
Joe Ross Joe Ross is offline
Registered User
FRC #0330 (Beachbots)
Team Role: Engineer
 
Join Date: Jun 2001
Rookie Year: 1997
Location: Los Angeles, CA
Posts: 8,563
Joe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond repute
Re: Collaborate on LabView virtual Kalman robot?

Quote:
Originally Posted by KHall View Post
I would like to ask a general question to the CPU experts:

If we have a 400MHz CPU does that mean 1 machine instruction every 0.0025uS? Lets say for discussions that we can make use of the techniques in the PDF and compensate for the sensor/motor latency. Then if an autonomous robot takes say 1,000,000 machine instructions between 'reactions' does that mean it can implement changes to its behavior every 2.5mS?
The IFI speed controllers have a maximum update rate of around 120hz. No one knows what we will be using in the future, but that has been a limitation in the past. See this page for more details: http://www.ifirobotics.com/forum/viewtopic.php?t=303

Most CPUs do not execute 1 instruction per cycle, instead, each instruction can take different amounts of cycles to execute. And, things that might seem like 1 instruction (eg one operation in C) can be many machine instructions. PICs are designed for one cycle per operation, so you can add two 8 bit values in operation because there is an instruction for that. But, you can't add two 32 bit numbers in one operation, because there isn't an instruction for that. Instead, the C compiler, when you write something that is a long + a long generates many instructions to complete that one operation.

It's even harder to figure out when you have a highly abstracted language (Labview) and an operating system (VxWorks). On the other hand, with a real time OS, you should be able to schedule tasks and make sure your calculations run at a set rate (at the expense of lower priority tasks).



Overall, your project is very ambitious, but is a great learning experience in real robotics. I work with GPS/Navigation and a lot of time goes into tuning a Kalman filter (although I've never dealt with them directly).