Welcome to the FEBio Forum. This forum serves the community of FEBio and FEBio Studio users and developers. Forum participants are encouraged to post questions, as well as answer posts from others. A broad level of participation is encouraged, to create a vibrant community that helps improve the quality and usefulness of these open-source/free software products. Moderators are here to assist with explaining novel features, addressing bug reports and reviewing feature requests, but the effectiveness of the forum depends critically on the participation of experienced users who can assist novices or share ideas and models that explore challenging problems. Please feel free to join in this effort. You can subscribe to forums by pressing the "Subscribe" button at the top of the forum. This will allow you to stay up to date on recent activity on the forum.
The FEBio software downloads and knowledgebase can be found here.
I saw in the release notes that an option to implement a PID controller has been added. That's great news! Is there an example file available I could look at that makes use of this functionality?
I've attached a simple example that uses a PID controller to control a force between two rigid bodies that tries to reach a desired orientation. I realize we don't have any documentation of this feature yet. I'll try to add some soon, but here is a brief description of the parameters:
* var: the model variable that the PID controller tracks.
* target: the desired value of the tracked variable.
* Kp: the scale factor for the "proportional" part of the PID controller.
* Ki : the scale factor for the "integration" part of the PID controller.
* Kd: the scale factor for the "derivative" part of the PID controller.
In this example, the PID controller is attached to the f0 parameter of the "RigidConnector2" constraint, which is the actual parameter whose values is modified by the PID controller. Please take a look and let me know if you have any questions.
Cheers,
Steve
Last edited by maas; 09-08-2020, 03:13 PM.
Reason: (removed attachment)
Department of Bioengineering, University of Utah
Scientific Computing and Imaging institute, University of Utah
Thanks for the quick reply. The latest version of FEBioStudio is giving the error ' unrecognized value "rigid revolute joint for attribute contraint.type" ' upon import.
It looks like that file had some formatting issues. I've fixed them and uploaded the new file. That said, the new load controllers, including the PID controllers, are not yet supported in FEBio Studio. I'll try to get to that soon and to make sure it stays on my radar, I've made an issue on our github page:
As a follow-up to this. Is there a resource available that lists the variables that can be interfaced with the PID controller? Or can I assume any measurable variables are compatible, such as stress in a certain element. Now that I think about it, I may want to use the peak stress in a part, or perhaps the average over the part. I'm also wondering if the PID controller can have a dynamic target that changes based on other variables. For example, can a load curve be used as the target?
The supported variables are any model input parameter (i.e. any parameter that can be defined in the input file), and a limited number of output variables. There is another mechanism, which is currently still under development, for accessing additional output data and you could get to the element stress. (Peak stress or average stress is not yet possible, but I'll look into that.) If you could tell me a little bit more about what you are trying to do, I'll try to make a simple demo model that illustrates the approach.
You can attach a load curve to the target parameter to make it time-dependent, but you cannot make it depend on other variables. Of course, I'm happy to look into that as well.
Cheers,
Steve
Department of Bioengineering, University of Utah
Scientific Computing and Imaging institute, University of Utah
The first thing I'd like to do as assign a load curve that describes the kinematics of something. In that example file you sent me - instead of the target rotation being a set 90 degrees, I'd like to start out by having the target be a time vs position curve. I've been trying to modify the file to do that, but I don't know what the proper syntax should be to assign a load curve to the target. I've since modified that file so instead of a rigid force providing the contraction, I've put in a trans iso mooney rivlin model with active contraction and would like to control the activation curve using the PID.
I can follow up with you either here or through email about the stress providing the feedback to the controller - that application is a bit more involved.
To follow-up my last post - I've successfully attached a load curve to the target parameter in the PID controller using your example file you sent me. However, I'm still unable to get the trans iso mooney rivlin model to run with its active contraction feature attached to a PID controller.
Comment