Hi there, I'm working on a small project, whereby I'm controlling an inverted pendulum via Flywheel and a bldc motor.
I have a NonlinearStateSpacemodel with a single input u[t] and single output theta[t] (the angle of the pendulum body) .
I have completely simulated the system, and created a control scheme that seems to work well, even made a nice little animation to visualize.
(please excuse the framerate)
Now comes to the point of programming my micrcontroller, and running/verifying the experiment. However, I've come to notice the control equation ends up producing a solution that can could calculate thousands of ampres...However the motor itself can only take 2...Is there a way within Mathematica and the control system to constrain inputs for the gain function directly using builtin functions? Or must this be done via a semi-smooth newtonian solver or something "hand made"
I can gladly post code should a person want to play with my system, or more info is required.
Thanks for the help!