Announcement

Collapse
No announcement yet.

Synchronising with Vicon

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Synchronising with Vicon

    Hey

    I was hoping to use a Vicon MX system to measure walking speed while I record EMG data with a separate device. Is there a way to simultaneously initiate the data collection of both systems?

    My initial idea was to trigger both systems so they start recording simultaneously or to use one system to send a pulse to trigger the other. I am new to using the Vicon system so I am not sure if this would be possible?

    I would be very grateful for any other ideas or to hear from anybody who has done something similar.

    Thank you

    Cat

  • #2
    Re: Synchronising with Vicon

    Hi Cat,

    If your EMG system cannot connect directly to the MX system's analog input then what you describe is the best way. Under the collection tab in Nexus there's a few options that allow you to set the collection to start on an external trigger, then you hit the "Arm" button and it will start listening for the pulse. The manual for the system describes required voltages and where you plug things in and all that. If you're using Ultranets and an MX Sync the info is in appendix B; if you're using an Ultranet HD I don't have the manual handy.

    Have a good one,

    Dan

    Comment


    • #3
      Re: Synchronising with Vicon

      Synchronizing EMG data with 3D data is something that sounds like it should be easy but often turns out to be difficult to do accurately. If your EMG system has analog outputs and your Vicon system has an ADC (therefore analog data collection support) then the most accurate way to get the EMG into the Vicon system is to feed the analog EMG data into the Vicon ADC and collect both data streams on the Vicon at the same time. If the EMG system has any significant delays in its signal processing (~16-50ms delays or more are not uncommon, although EMG systems designed for motion capture will have ideally delays less than the camera frame rate) then you will have to take the EMG system delay into account to accurately synchronize the two data streams.

      If for some reason you can not use the Vicon ADC to record the EMG data then you're going to have to record it separately - then merge and synchronize the data, post-collection. This is not going to be easy - it's the reason why motion capture manufacturers can charge good money for including ADC capabilities in their systems.


      Start off by figuring out what control you have over the two systems - all of the Vicon systems that I've played with have some abilities to remote trigger (RUN-STOP) data collection - read the manual and figure out how to control this feature. The basic idea here is to have good data collection control on one of the systems (usually the motion capture system) and use that as the "master" data collection with the idea that you'll sync the second data stream (the EMG stream in your case) with the "master".

      You don't mention which EMG system you are using, or what type of signal outputs it produces, so the next part gets complicated depending on the system and EMG collection method.

      If your EMG system has analog outputs (and for some reason you can't connect these to the motion capture system) then you will need an external ADC and probably an PC to control it - if this is the case then read the manual on the EMG ADC unit and see if you have some form of remote control (RUN-STOP) that you can activate at the same time as the Vicon remote control. If this is the case then you'll be able to record kinematic data into a Vicon C3D file and the EMG data into a file on the PC. You can assume that both the Vicon and the EMG ADC will start recording data at the same time but in fact this is quite unlikely to be the case - there may be small delays associated with starting to data collection process and there's the EMG system delay that I mentioned above. So you'll have to find some way to verify that the two data streams (kinematic and EMG) are synced - and of course, you're going to have to merge the EMG data stream with the kinematic data in the Vicon C3D file.

      If your EMG system does not have analog outputs - direct USB connection to a PC perhaps - then you'll have to figure out what remote control capabilities are provided with EMG system. Assuming that the EMG system has a RUN-STOP control line somewhere then the procedure is similar to the method described above - just trigger both systems to start running and synchronize the data post-collection.

      But what if the EMG system doesn't have any remote control capabilities? Or data collection if controlled via a GUI? Assuming that the system has some means of recording its data - and that you can retrieve the data later - then it's still possible to sort this out but it's not going to be easy. If this is the case then you're going to have to start both the EMG system and the Vicon system manually and collect the data asynchronously. This means that you're going to have to have some common data signals recorded by both systems so that post-collection you have some sync pulses to guide you when you attempt to merge the EMG data into the Vicon C3D file. I'm not sure what kind of sync signals are available from your motion capture system but if you can tap into a gated camera sync signal (present when the camera strobes are fired) then you could record that signal into the EMG system to provide a common sync signal.

      In this situation you'll start the EMG system running and then collect the kinematic data with the Vicon system and then stop the EMG system each time you perform a data collection. Then, post-collection, you'll have to read the EMG data and merge it with the Vicon C3D file using the sync pulses from the Vicon system that you recorded into the EMG data stream to guide you.

      Points to watch:
      If you cross connect the EMG system and the Vicon system to get a sync signal then be very careful that you don't invalidate the electrical isolation of the EMG system by collecting the isolated and non-isolated sides of the system. Ask your EMG system manufacturer about this if you are in any doubt about the electrical isolation of your subject!

      Check the synchronization between the two systems at least a dozen or more times - don't assume that the synchronization delays when using RUN-STOP controls will always be the same every time the systems start.

      Check the EMG system delay (subject muscle to EMG output) - EMG systems designed for motion capture use will have very low delays (less than the camera frame rate) but EMG systems intended for biofeedback and other uses may have much larger delays. You'll need to account for this delay in order to synchronize the data.

      Try and make sure that the EMG sample rate is a multiple of the motion capture camera frame rate to make your synchronization easier later - and make sure that you sample the EMG data fast enough. Your minimum EMG sample rate must be twice the bandwidth of your EMG system e.g. if the EMG system has a 1000Hz bandwidth and your cameras are running at 60Hz then your minimum EMG sample rate is 2000 sample/sec and the closest multiple of the camera frame rate is 34 - so sample the EMG at 2040 samples/sec.

      It's going to be harder than you expect to synchronize the EMG data with the 3D data - if you use the C3Dserver then you'll find it fairly easy to read and write the C3D data but you'll still have to figure out the format used to store the EMG data.

      Finally, this post would have been a lot shorter if you'd provided some information about the EMG system you are using and what sort of things you've tried already. The more information that's posted about a problem then the easier it is for people to help you.

      Good Luck!

      Edmund Cramp
      Motion Lab Systems, Inc.

      Comment


      • #4
        Re: Synchronising with Vicon

        Thank you for your replies. I should have mentioned that the EMG device I am using has been designed by my project advisor. The preamplifier is worn by the subject and is connected to a ADC which electrically isolates the circuitry from the mains supply and this is in turn connected to a PC via USB. For recording the data a program is being used which runs in Linux.

        As the test subjects will be freely walking while their EMG is being measured, the plan was to have them wear a backpack which contains a laptop for recording the EMG so the set-up doesn't need to be wireless. The problem comes from synchronising this data which will be collected on the laptop to the PC collecting the Vicon data as a wired connection might not be possible. One suggestion has been a potential bluetooth link but this might introduce a delay.

        I am very interested in looking into using the camera sync signal and thanks for all the important points which have been raised.

        Cat

        Comment


        • #5
          Re: Synchronising with Vicon

          "recording the data a program is being used which runs in Linux"

          Have you/your advisor also figured out how to run Vicon software in WINE? I realize that your plan doesn't necessitate that if you're going to use an external trigger and then later download the EMG data, but if you have I'd love to hear how you went about it.

          Comment


          • #6
            Re: Synchronising with Vicon

            Thanks - a description of the equipment helps a great deal. It sounds like a fun project!

            A wireless link would allow you to feed the Vicon ADC (assuming that you have one) and might simplify the data collection enough that compensating for the delay introduced by the Bluetooth would be the lesser evil. However you always have the issues of interference with wireless that would not exist with your current "logging" method.

            Assuming that you decide to keep to your current approach - have you thought about trying to collect the IR strobe pulse from the Vicon cameras and recording the strobe pulses along with the EMG data? This would give you a frame by frame sync pulse that could be used to sync the data into the Vicon C3D file after the trial.

            Comment

            Working...
            X