Announcement

Collapse
No announcement yet.

How to run force plate with MATLAB?

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

  • How to run force plate with MATLAB?

    Hi everyone,

    Apologize if I'm multi-posting. I thought I posted but I couldn't find my earlier post.

    So here it goes again. For the upcoming project, I borrowed an old AMTI force plate, which is hooked up to an AMTI Wheatstone bridge amplifier using a BNC cable. The amplifier is, then, connected to a standard 15 channel breakout box. The data stream from the box is then sent to an A/D converter, which is in a desktop. Everyone I know ran force plate with optical cameras using the Qualysis Track Manager software. Unfortunately, my office doesn't have any cameras and the QMT won't even start recording. When I talked to the Qualysis tech support team, they said I won't be able to do it because the software doesn't support force place alone. So I turned to MATLAB because some people said they used MATLAB in their papers. However, I have no idea how to access the data stream from MATLAB. I'm wondering if someone can point me to any information; a kind tutorial for novices is good; a sample MATLAB code is even better. Can anyone give me a lead? Thx in advance!

  • #2
    Re: How to run force plate with MATLAB?

    I think that your problem has a fairly simply solution but unfortunately your description of your setup is ambiguous and makes it hard for anyone to give you detailed advice. To break your description down by item:

    1. "an old AMTI force plate" - the plate will have a model number and providing that would help.
    2. "which is hooked up to an AMTI Wheatstone bridge amplifier using a BNC cable" - again, a model number for the amplifier would be helpful, and are you certain that it is connected to the force plate via a BNC cable? The older AMTI plates used a multi-pin MIL-spec locking connector. I've not seen a plate connected via BNC cables.
    3. "The amplifier is, then, connected to a standard 15 channel breakout box." - How is it connected? Your idea of a standard 15 channel breakout box may be very different from mine.
    4. "The data stream from the box is then sent to an A/D converter, which is in a desktop." - I assume that MATLAB can access and control the ADC, but perhaps it's using a separate application - can you record data from the ADC?

    Have you read the manual for the AMTI plate and amplifier? They usually provide quite good details of the specification and output signals from the force plate and simply reading the manual should give you a lot of clues for possible force data collection and processing. I'm offering these questions and comments in the hope that a better understanding of exactly what your experimental setup actual is will make your problem very easy to solve.

    Comment


    • #3
      Re: How to run force plate with MATLAB?

      The other question I'd add to Eddie's excellent ones is what A/D board do you have? Assuming you can get data flowing into that board, Matlab still won't automatically know how to talk to it. I have not used Matlab for analog data acquisition before, but with LabView the commands you use and structure of the data coming to you is entirely dependent on the A/D board's driver. I'll bet that the manufacturer of the A/D board will have sample code for Matlab once you determine which it is.

      Comment


      • #4
        Re: How to run force plate with MATLAB?

        Some mocap manufacturers use their own proprietary ADCs and others use commercially available ADCs made by other companies. Matlab or other drivers are usually available for the latter but probably not for the former, proprietary ADCs - those ADCs can usually only be used with the mocap vendor's software. So as Ajit says, you need to know exactly what ADC you have. I believe Qualisys may use ADCs from Measurement Computing. Most of MC's hardware is supported by Matlab's Data Acquisition Toolbox:

        MC also have free chart recorder-style software for basic recording that may be sufficient for basic applications.

        If you can't talk to the existing ADC, then there are cheap-ish USB ADCs from companies such as MC and DATAQ, with free software for basic recording. How many channels do you need to acquire for your application ? Do you need all 6 AMTI analog channels (eg for COP, Tz), or do you only need the 3 orthogonal force channels ? What sample rate ? I assume you have the calibration sheet for the plate, to make sense of the outputs ?

        Tim Wrigley
        University of Melbourne

        Comment


        • #5
          Re: How to run force plate with MATLAB?

          This question has already been replied in sufficient details. To add to this, you need software access to each, separate digital channel (there will be 6 in total for AMTI Force Plate-from each of 6 sensors) that your ADC outputs. In your case software is Matlab, so you need either Matlab driver, or if Matlab driver is not available, may have to write Matlab code using C/C++ API of ADC to access each data stream from each of the 6 channels and to control/configure the Force platform output through ADC.

          Resolving the 6 channel Force platform output into GRF is simply the issue of applying calibration matrix of specific Force Platform to the output from ADC.

          Comment


          • #6
            Re: How to run force plate with MATLAB?

            Hi Edmund,

            Thank you for your reply. Sorry about missing information.

            1. What I have is a prototype of the very first OR6-6 force platform that AMTI manufactured back in 1986. Since it's a prototype and happens to survive this long, I do not have a formal user manual.
            2. The amplifier is the AMTI SGA6-3 amplifier.
            3. I'm attaching the images. Since I'm quite new to this whole thing, it's really difficult for me to describe in words exactly. I apologize.
            4. No not yet. I've checked that the Qualysis Task Manager recognized the A/D converter card (which is installed in the desktop). But I haven't tried to access the card or the data coming from the card from the MATLAB yet.

            AMTI.JPG

            Comment


            • #7
              Re: How to run force plate with MATLAB?

              Hi,

              Thx to point that out. I'll check the AD board and and follow up with the comments. Thank you again!

              Comment


              • #8
                Re: How to run force plate with MATLAB?

                Hi,

                Thx a lot for the reply, Tim. Actually, I should thank everyone who's following up my question. Since I'm new here, I'm bothering a lot of people actually, including the web manager. I'm quite spoiled with the interface of the web that I usually go to and not familiar with this one. So I may be causing some troubles. Sorry about that.

                That being said, I actually checked what kind of ADC I have, which turns out to be PCI-DAS6402/16. I simply executed the QTM and checked the analog boards that the QTM finds. I know the other people have been using the same ADC and a later version of AMTI force plate along with a suit of optical cameras in a different building which has all the necessary equipments that lets the QTM record the data. Anyways... I went to the link Tim provided and checked that the card is actually supported by the MATLAB version 2 whatever that would mean. I have MATLAB 7.8.0 R2009a, which corresponds to the version 2.14 according to the table I checked. So I guess the data acquisition toolbox of the MATLAB I have should support the PCA-DAS6402/16. (This whole idea is quite new to me..)

                Because I've never used data acquisition toolbox, I googled and found one or two links. I found some related documents, but I'm still not sure about the details. For instance, I saw that I had to do something like ai = analoginput('something'), but the sample code I found had 'winsound.' So now you see how dumb I am here. So, actually sent an e-mail to the MC tech support asking for the sample MATLAB code that may work with the PCI-DAS6402/16.

                I think I need all the 6 channels (3 forces and 3 moments) since I need to compute COPs. I do have the calibration sheet, which took me a while to obtain. I'll need to collect data at 50hz if possible and stream the data over the TCP/IP to a larger system, which runs on Linux. As long as the data gets to the Linux side, I know how to handle it because I'll use the code I wrote on the Linus side.

                Anyways... until I get some support from the MC, I'll want to try what I can do. Given this information I provide so far, can anyone provide some sample code or a link to the code/tutorial? Thank you very much!

                Comment


                • #9
                  Re: How to run force plate with MATLAB?

                  MCC site has good example script at http://kb.mccdaq.com/KnowledgebaseArticle50495.aspx explaining use of Data Acquisition Toolbox in Matlab. There is a video too at https://www.youtube.com/watch?v=0uIr...ature=youtu.be.

                  Comment


                  • #10
                    Re: How to run force plate with MATLAB?

                    This video is also useful http://www.mathworks.in/videos/acqui...&wfsid=5251159

                    Comment


                    • #11
                      Re: How to run force plate with MATLAB?

                      There's lots of good information in these posts and I think that you should be able to get everything running without too much trouble but it's always a learning process.

                      I'd suggest that that you start by verifying the analog data collection process before worrying about the force data - test the data collection using simple inputs to the ADC and verify that you can record data from 6 channels - the AMTI amp will normally output data at +/- 10V. Once you are confident that you can record six channels of data and access it then you can connect the force plate and work on interpreting the data with the confidence that your equipment is functional.

                      You may want to increase the sample rate beyond 50Hz - a 50Hz sample rate means that the highest frequency that you can record is 25Hz and impact transients as a subject walks over the plate will contain frequencies much higher than 25Hz.

                      Good Luck!

                      Comment


                      • #12
                        Re: How to run force plate with MATLAB?

                        Hi Edmund and all the other people,

                        Thank you very much. And I'm frankly quite impressed by the quality of the inputs you have made here. I was going to report later when I analyze what I have more, but let me do it anyway to keep you all on the same page.

                        So, I've followed up the tutorial and found a very easy sample MATLAB code. I tested this morning and seem to get some data. I'm actually getting data from 7 channels; channel 0 is ground and the rest are the 6 channels with 3 forces and 3 moments. I collected one set of data without putting anything and another set while I was stepping on it and off. I applied FFT and plotted the results of both; the first plot seemed quite flat, which was expected I guess; also the second plot showed me some wavy plot, which was also kinda expected. I think it's giving me something. So, I guess now I have to verify if the plate is working properly and I'm getting some meaningful data. Essentially, I'm planning to compute COP values out of this plate reading. I guess it'll become obvious if I visualize the results.

                        I think I used +/- 5V, but according to your suggestion, I may have to switch to +/1 10V. Also, I collected at 50Hz and ended up getting FFT results at 25Hz; honestly, I didn't know that. So I'll probably bump it up to 100Hz. I initially wanted to do at 50Hz because other sensors (which are equivalent to optical camera in function) run at 50Hz. But, I guess, 100Hz is equal to 50Hz in the case of force plate.

                        Thx everyone for your timely help. This is an amazing experience. Also, I'll probably follow up this thread within a couple of days and report the progress. Thx again.

                        Comment


                        • #13
                          Re: How to run force plate with MATLAB?

                          Hi Manvendra,

                          Thx for the links. Helped quite a lot. I tried the example script with some modification, I did read some numbers but it's a bit confusing. I'm trying to figure out, but I thought I wouldn't loose asking here. So, the code I ran is as follows.

                          count = 1000;
                          rate = 100;
                          range = 10.0;
                          ai = analoginput('mcc', 0);
                          ch = addchannel(ai, 1:6);
                          ch.InputRange = [-range, range];
                          ai.SampleRate = rate;
                          ai.SamplePerTrigger = count;
                          ai.TriggerType = 'Immediate';
                          start(ai);
                          y = getdata(ai);

                          It seemed to get some numbers. When I replaced 1:6 with 0:30 inside the addchannel function, I got some numbers from all the 31 channels too. I kinda expected to get all zeros from 7:30. I use the channel 0 as ground, and I'm getting numbers that are close to 0. But, I'm getting some patterns of numbers from channel 7:30, which surprised me quite a lot. Is it normal and they are just meaningless?

                          Comment

                          Working...
                          X