PID controller potential bug

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • hwiputra
    Member
    • Jun 2022
    • 67

    #1

    PID controller potential bug

    Hi All,

    Ihave a simulation of a pressure expandsion of an aorta. I applied a load controller with PID and without PID in the two codes as lc="2". This load controller is not being used iin with PID script, literally just hanging out. However, the presence of it is enough to break the code. It did not show the aorta expanding in the .xplt file. It is likely a bug for a PID controller. I am planning to use PID controller for a robin-like boundary, but it seems to not be working now.

    Thank you.

    Regards,
    Hadi
    Attached Files
  • maas
    Lead Code Developer
    • Nov 2007
    • 3875

    #2
    Hi Hadi,

    I tried it with the latest version of FEBio (version 4.7) and I don't seem to have any issues. It looks like you are using version 4.6, so perhaps try to update to latest version and then give it another try. Let me know if you still find issues.

    Best,

    Steve
    Department of Bioengineering, University of Utah
    Scientific Computing and Imaging institute, University of Utah

    Comment

    • hwiputra
      Member
      • Jun 2022
      • 67

      #3
      Hi Steve,

      I reran the cases with febio 4.7 and found that the PID case returns very small deformation, while no PID case returns much larger deformation. The PID case didnt attach the loadcurve to any parameters. I believe the two codes need to return the same values but did not.

      Thank you.

      Regards,
      Hadi
      Attached Files

      Comment

      • maas
        Lead Code Developer
        • Nov 2007
        • 3875

        #4
        Hi Hadi,

        According to the log files you attached, the two problems ran pretty much identically. There is a small difference in convergence norms towards the end, but that is not entirely surprising if you are running on a computer with multiple processors (See here for a note on repeatability). What makes you say that one case has a small deformation and the other has a big deformation?

        Thanks,

        Steve
        Department of Bioengineering, University of Utah
        Scientific Computing and Imaging institute, University of Utah

        Comment

        • hwiputra
          Member
          • Jun 2022
          • 67

          #5
          Hi Steve,

          That is weird, I saw that too, but the xptl files gives out different output. I attach the video I got and the displacement from the two cases.

          Regards,
          Hadi
          Attached Files

          Comment

          • maas
            Lead Code Developer
            • Nov 2007
            • 3875

            #6
            Hi Hadi,

            Okay, I think I finally figured it out. It turns out that it was a problem with the plotfile. By default, FEBio will write the PID values to the plotfile, but there was a bug that corrupted the plot file. As a result, although FEBio was working fine, the data was not written correctly to the plotfile. And that's why you were not seeing the correct results in the file with the PID controller.

            This should be fixed now, so please update to the latest development version (see here for instructions) and then give it another try. Let me know what you find.

            Best,

            Steve
            Department of Bioengineering, University of Utah
            Scientific Computing and Imaging institute, University of Utah

            Comment

            • hwiputra
              Member
              • Jun 2022
              • 67

              #7
              Hi Steve,

              I tried it, it works now! Thank you.

              Regards,
              Hadi

              Comment

              • hwiputra
                Member
                • Jun 2022
                • 67

                #8
                Hi Steve,

                The .feb file I sent in the first post is a "test" code, and today I ran the full problem with the attached feb file. It showed the same error as described previously. I ran one without a PID controller before and it ran fine.



                This .feb file takes quite some time to run. It seems to still have the same zero-displacement bug. The earlier code I sent you not longer have that issue.

                Is it because I skipped some load controller indexing or that some of the load controller were not in use?

                Im sorry for the trouble, thank you.

                Regards,
                Hadi

                Comment

                • maas
                  Lead Code Developer
                  • Nov 2007
                  • 3875

                  #9
                  Hi Hadi,

                  It turns out that this was a different issue. In FEBio Studio, there was an assumption that there are a maximum of 256 data fields defined in the plotfile. Since all the PID controllers are also added to the plotfile, that limit was exceeded for your model, and strange issues ensued. I upped the limit to 65,535 (16 bit instead of 8 bit), which hopefully will be enough. Please do a dev update and give it another try. Since the problem was with FEBio Studio you should not have to rerun the file in FEBio. Let me know what you find.

                  Best,

                  Steve
                  Department of Bioengineering, University of Utah
                  Scientific Computing and Imaging institute, University of Utah

                  Comment

                  • hwiputra
                    Member
                    • Jun 2022
                    • 67

                    #10
                    Hi Steve,

                    I've tested the .feb file again and it works like a charm.

                    Thank you.

                    Regards,
                    Hadi

                    Comment

                    Working...
                    X