Difference between revisions of "Project1: Implement algorithm using microphone array"

From ESE497 Wiki
Jump to navigationJump to search
 
(42 intermediate revisions by the same user not shown)
Line 1: Line 1:
==PC Implementation - Work in groups of 2==
+
*'''Download''' [[media:RoboticSensing.FL14.zip|RoboticSensing.zip]] and extract to your Home Directory. Double-Click on  RoboticSensing\MicSourceLocator.lvproj to open LabVIEW Project
*Start with this [[media:MicSourceLocator.zip|simulation model]] of the 4 microphones. Extract to your Home Directory and run MicSourceLocator.vi. This can be the starting point for your application. In the end, your VI should look like [[media:MicSourceLocatorSolution.jpg|this]].  
+
[[File:MicSourceLocatorProject-2.jpg|MicSourceLocator Project]]
* Simulation
+
*'''Description''' of [[Description of RoboticSensing.lvproj| MicSourceLocator.lvproj]]
** Create FindCCPeak subVI to compute the relative delay between the microphone pairs. Instantiate this into your while loop.
+
*'''Double-Click on My Computer->MicSourceLocator.lvproj.''' and open My Computer -> MicSourceLocator-Array.vi. This is the starting point for your application. In the end, your VI should look like [[media:MicSourceLocatorSolution.jpg|this]]. Pay attention to the drawing on the Simulator.vi front panel to see the definition of the microphone indices.
** Create ComputeAngle subVI to compute the angle of arrival from the delay and the microphone pair geometry. Trap the case where theta is 90 degrees and set the tangent to 1,000,000 instead of infinity.
+
*'''Part A: Simulation'''
** Create ComputeIntersection subVI that computes the triangulation equation to estimate the source location
+
**Create ComputeAngle subVI to compute the angle of arrival from the delay and the microphone pair geometry.
** Create Web subVi that computes all of the possible triangulations. Use your ComputeAngle and ComputeIntersection subVIs.
+
**Create ComputeIntersection subVI that computes the triangulation equation to estimate the source location. Use Functions -> Mathematics -> Script & Formula -> MathScript Node if you can use Matlab syntax. Use the Formula Node for Java/C syntax. Trap the case where theta is 90 degrees and set the tangent to 1,000,000 instead of infinity.
** Plot the results of the Web and the Source Location estimate on an XY graph
+
**Create FindCCPeak subVI to compute the relative delay between the microphone pairs. Instantiate this into your while loop. Make sure to use the Error Cluster. You will use this same vi on the robot and you might run out of memory on that platform.
* Test with the 4 microphone array [[Media:Microphone_Array_Connections.pdf‎ |microphone array]]. Connect the line out from the PC to a speaker and generate a chirp on the sound card using Chirp2SoundCard.vi from the zip file.
+
**Create Web subVi that computes all of the possible triangulations. Use your ComputeAngle and ComputeIntersection subVIs.
**In the DAQ Assistant, make sure the Analog Inputs are from the USB-6210, differential, +/- 1 V. Make sure you wire the Stop control into the DAQ Assistant
+
**Plot the results of the Web and the Source Location estimate on an XY graph. Also, plot the simulated source location and the microphone locations. To add additional traces to the XY graph, you need to use Functions -> Express -> Signal Manip -> Merge Signals instead of Build Array ([[media:XYPlot.vi|XY Plot example]])
* Test with "Real Simulated Data", use RealSimData.vi from the zip file to troubleshoot.
+
**Initially, verify that your triangulation works for a rotation of 0. Once that is working, set the rotations to +/- 45 degress and verify that also.
*When everything is working, clean up your block diagram and modularize your code so it looks like the solution. This will make porting your code to the robot easier.
+
*'''Part B: Hardware'''
==Robot Implementation - Work in groups of 2==
+
**'''Test''' with the 4 microphone array [[Media:Microphone_Array_Connections.pdf‎ |microphone array]]. Connect the line out from the PC to a speaker and generate a chirp on the sound card using Chirp2SoundCard.vi from the zip file.
* Background
+
**In the DAQ Assistant, make sure the Analog Inputs (Voltage) are from the USB-6212, differential, +/- 1 V, Continuous Samples, Samples to Read = 50k, Rate(Hz) = 50K. Make sure you wire the Stop control into the DAQ Assistant
** Read the [[LabVIEW_for_Robotics|LabVIEW for Robotics]] page
+
<!-- **'''Test''' with "Real Simulated Data", use RealSimData.vi from the zip file to troubleshoot.-->
** Download the [[media:RoboticSensing.zip|RoboticSensing.zip]] and open the MicSourceLocator project using LabVIEW 2009.
+
**'''When everything is working''', clean up your block diagram and modularize your code so it looks like the solution. This will make porting your code to the robot easier.
** Using Save As, save DMA Buffered Acquisition-2Channels (HOST).vi to a new name and start editing this.
 
* Compute angle of arrival on Robot platform using your ComputeAngle subVI
 
* Source Location using N Robots
 
** PC to Robot communication using Shared Variable
 
***  NI Example Finder -> Toolkits and Modules -> Real-Time -> Network Communication -> RT Network Communication.lvproj
 
** RT Code to move robot to a new position (x,y,theta)
 
** LabVIEW code to command robot to new Manual Position using Shared Variable
 
** Add a 2nd Robot to Project
 
** Compute source location from 2 robots
 
** Expand to N robots
 
** Automated controller algorithm to optimize robot positions
 
Extra Credit
 
*Thin client communication to Robot
 

Latest revision as of 19:21, 24 September 2014

  • Download RoboticSensing.zip and extract to your Home Directory. Double-Click on RoboticSensing\MicSourceLocator.lvproj to open LabVIEW Project

MicSourceLocator Project

  • Description of MicSourceLocator.lvproj
  • Double-Click on My Computer->MicSourceLocator.lvproj. and open My Computer -> MicSourceLocator-Array.vi. This is the starting point for your application. In the end, your VI should look like this. Pay attention to the drawing on the Simulator.vi front panel to see the definition of the microphone indices.
  • Part A: Simulation
    • Create ComputeAngle subVI to compute the angle of arrival from the delay and the microphone pair geometry.
    • Create ComputeIntersection subVI that computes the triangulation equation to estimate the source location. Use Functions -> Mathematics -> Script & Formula -> MathScript Node if you can use Matlab syntax. Use the Formula Node for Java/C syntax. Trap the case where theta is 90 degrees and set the tangent to 1,000,000 instead of infinity.
    • Create FindCCPeak subVI to compute the relative delay between the microphone pairs. Instantiate this into your while loop. Make sure to use the Error Cluster. You will use this same vi on the robot and you might run out of memory on that platform.
    • Create Web subVi that computes all of the possible triangulations. Use your ComputeAngle and ComputeIntersection subVIs.
    • Plot the results of the Web and the Source Location estimate on an XY graph. Also, plot the simulated source location and the microphone locations. To add additional traces to the XY graph, you need to use Functions -> Express -> Signal Manip -> Merge Signals instead of Build Array (XY Plot example)
    • Initially, verify that your triangulation works for a rotation of 0. Once that is working, set the rotations to +/- 45 degress and verify that also.
  • Part B: Hardware
    • Test with the 4 microphone array microphone array. Connect the line out from the PC to a speaker and generate a chirp on the sound card using Chirp2SoundCard.vi from the zip file.
    • In the DAQ Assistant, make sure the Analog Inputs (Voltage) are from the USB-6212, differential, +/- 1 V, Continuous Samples, Samples to Read = 50k, Rate(Hz) = 50K. Make sure you wire the Stop control into the DAQ Assistant
    • When everything is working, clean up your block diagram and modularize your code so it looks like the solution. This will make porting your code to the robot easier.