AnyInputC3D filter problem

Dear supporters
This is Hai. I try to use the AnyInputC3D to input the data. The data includes the AMTI force plate infromation (Fx, Fy, Fz, Mx, My, Mz). I have used the software of Mokka to transform the data into C3D format. When I try to apply AnyInputC3D to input data, I met the problem. The error message from the AnyBody is:
Loading Main : “E:\AnyBodyCode 4 4.main.any”
Scanning…
Parsing…
Constructing model tree…
Linking identifiers…
Evaluating constants…
Configuring model…
Evaluating model…
ERROR(OBJ1) : E:\AnyBodyCode 4 4.main.any(20) : C3DFileData.Filter.W : The normalized cutoff frequency must be between 0.0 and 1.0

I have tried to adjust the value of Fc, CutOffFrequency. All of these didn’t work. The software always showed the same error message. However, I can input the file of ‘NisaT1.c3d’ successfully. But I failed to read the file of ‘NST1FP.c3d’. I have attached all these files.
Could you give me some suggestions?

Best wishes
Hai

Dear Hai,

there are 2 Filters used, one in the main file, the other one in the ForcePlateType2 file.
In the main file you have to configure the variables N, Fc, … that they match. I tried following wich worked:
AnyInputC3D C3DFileData =
{
FileName = “NST1FP.c3d”;
ReadAllDataOnOff = On;
ConstructModelOnOff = On;
PointsScaleFactor = 0.001;
ConstructChartOnOff = Off;

  Filter =  {
   N = 1;
   Fc = {0.1};
   Type = LowPass;   
  };
  
  /// This filter is used for the analog data
  AnyFunButterworthFilter LowPassFilter = {
    FilterForwardBackwardOnOff = On;
    AutomaticInitialConditionOnOff = On;
    N = 1;
    AnyVar CutOffFrequency=12;
    AnyVar SampleFreq=100;
    W = {1/(SampleFreq*0.5)*CutOffFrequency};
    Type = LowPass;
  };
};

in the ForcePlateType2 file, I changed the low pass Filter and it loaded.

/// A lowpass butterworth filter
AnyFunButterworthFilter LowPassFilter =
{
FilterForwardBackwardOnOff = On;
AutomaticInitialConditionOnOff = On;
N = 1;
Fc = {0.1};
AnyVar CutOffFrequency=0.1;
AnyVar SampleFreq=Folder.Header.VideoFrameRate* Folder.Header.NoAnalogSamplesPer3DFrame ;
W = {1/(SampleFreq*0.5)*CutOffFrequency};
Type = LowPass;
};

PLease make sure the filters still make sense and the graphs seem fine. All the filters are tuned in AnyBody to conventional models.

I hope that helps

Dear Amir
Thank you very much for kind help. I have tried many times. It works well. I have an additional question to you. As far as I know, to do inverse dynamics of muscles requires the body movement and external force. I want to do inverse dynamics analysis during standing on the force plate. Our lab has the motion capture system (Mocap) but only one force plate now. The body movement can be captured by Mocap. My question is whether I can use one force plate data as the external force and input it into the model. If yes, how to realize it?
What I have done was to modified the code of ‘ForcePlateType2.any’ in the MoCap_FullBody. But for this code, each time it requires to define the reaction between foot segment and the force plate. There are two legs (left and right) but only one force. Is any method to react one force to these two segments?

Best wishes for you
Hai

Dear Hai,

It is not good to put both feet on the same force plate.

Then the force plate class template may not work correctly because it can’t judge on which foot the force should be transferred.

Best regards,
Moonki