Skip to content

How to correctly create a controller #60

Discussion options

You must be logged in to vote

the difference between the two choices are:
loadVectorUserFunction: is called in every iteration of the solver - in particular for implicit solvers. This means that this is the most accurate solution. However, for large P-control values, the solver does not know the strong coupling of controller output to sensor values, which can be added by using AddODE2LoadDependencies(...), see https://exudyn.readthedocs.io/en/latest/docs/RST/cInterface/SystemData.html
SetPreStepUserFunction: this is a weak coupling, which is similar to a real controller which acts every delta t (the step size or whatever you implement in SetPreStepUserFunction. This may lead to controller instabilities like in real wo…

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by ManuelZ
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants