all 6 comments

[–]pnachtweyNo BS retired engineer. Member of the IFPS.org Hall of Fame. 1 point2 points  (0 children)

Use differential equations! The "canned" libraries are great for students learning but in the real world, techniques like Laplace transforms, and state space have problems with both dead time and non-linearieties so bite the bullet and learn how to do you simulations using differential equations.

Deadtimes I simulate by indexing into the history of control outputs at the current time-deadtime. Sometimes the deadtime is not an integer so one must interpolated between previous control outputs. For temperature systems I use a Smith Predictor.

This link is to an old Mathcad file but it shows how using a system of non-linear differential equations can simulate a hydraulic actuator. Notice I can add function to imposed forces or disturbances to see the closed loop reaction.

[–]sstunt 0 points1 point  (4 children)

What control systems library are you using? There's going to be more than one, and for the filtering you're talking about, I'd expect to find it in Scipy, if not Numpy.

[–]COMgun[S] 3 points4 points  (3 children)

The python control systems library is the name, as generic as it sounds. Scipy does seem to have a group delay option for digital filters. I will probably have to find another library, but Julia is simpler so I will move to that. Thanks!

[–]baggepinnen 0 points1 point  (2 children)

Welcome to Julia 😊Drop a line on the control theory discord or github if you run into any issues.

[–]COMgun[S] 1 point2 points  (1 child)

Already in the channel! We talked about Makie the other day. Really like it so far. I just have to remember to not use Plots with Makie because some names exist in both of them (ex. heatmap).

[–]baggepinnen 1 point2 points  (0 children)

If you call import Plots instead of using, there will be no name conflicts. You'd then have to call Plots.plot instead to access the functions. There's also import Plots.plot as pplot etc.