I have a few questions related to dynamic simulation...
1) When using the "formula" rule in the input grapher, can I access "parameters"? It does not appear to work. Where "parameters" I am referring to variables found in the "f(x)" menu.
2) Where is the documentation describing the syntax of the "formula" rule in the input grapher? I stumbled upon something like (P[1] Spatial:2) purely by a lucky google search. Clearly white space matters. Is this documented somewhere?
3) Can the "parameters" menu access variables from the dynamic simulation environment?
I notice it auto-populates with a few:
Final time / Simulation Player
Number of images / Simulation Player
Friction / 3D Contact:1
Etc
But it does not appear that I could access something like (V[1] Spatial:2) for instance.
Even adding that as a user parameter, it cannot parse the name. This would be useful for giving more human readable names to these values.
4) I am trying to implement a crude PID loop in a simulation to control a force. I can do the "P" using the "formula" rule in the input grapher, but it is a bit cludgy since the dynamic simulator environment does not seem to be aware of the parameters menu. Therefor I cannot give easy names like "Pgain" and have to use magic numbers directly in the formula. Although it does work.
How would I implement Integral? I would need to define an error variable, and be able to increment it by SetPoint - (P[3] (Spatial:2)) each frame of the simulation. Is this beyond the scope of Dynamic Simulator? Can I do this with the API, if I had the time to learn it?
Are you using the Wasim Youins book to learn DS?
Can you post sample assembly here?
No I am not using a book.
My questions are not specific to a given assembly. I have attached the test assembly I was working with.
@JOSEPHKOVACH7324 wrote:
But it does not appear that I could access something like (V[1] Spatial:2) for instance.
4) I am trying to implement a crude PID loop in a simulation to control a force.
I hope you stick around here for a while, I've been searching for several years for someone to colaborate with on stuff like this (there doesn't seem to half a dozen users of DS in the world). I like to keep stuff like this in an open forum, but first I would like to run some private stuff by you - please contact me jmather_at_pct_dot_edu (and as an aside for anyone reading this thread - we do have an open faculty position).
I have not tried to do something exactly what you are attempting but V[1] (Spatial:2) is an output resultant of running the simulation. If you go to the Output Grapher you can track this value with a new (user created) curve variable (I named New_Curve, but it could be any desired variable name).
And get the Wasim Younis book (Part 2) Amazon.com - there are a lot of mistakes in the book, but I use them as teaching points. A lot of useful stuff as well.
Thank you for your post. I'd been interested in the Dynamic Simulation tool but hadn't any time to get acquainted until now. I was playing around with your forces and ran into the same problems you had with using parameters. I was able to define two parameters {x1,x2} = {0,180}deg and apply them to the startin and end points of your ForceZ; however, once entered they became un-related constants. When I changed the value of x2=100deg, there was no change in the ForceZ ending point value. I also could not enter any parameters into the overly-hopeful "Formula" property. I was very suprised and disappointed by this lack of parameterization, since that is the core of the whole program in my opinion. I hope Autodesk (or the forum members) can elaborate on this and improve the documentation. It might help the adoption of the tool to reach a full dozen users
-Andrew