Controllers: PID, Sliding Mode, Root Locus, Ect...
th3jester
Posts: 81
Has there been any work on creating an object for different control algorithms? I've searched the OBEX and found a few PID objects, some I don't exactly trust. Is anyone interested in working on this with me? The need for accurate control in embedded systems is in high demand and should be used. A few, stated in the subject line, PID, Sliding Mode, Root Locus, and various others could be included. Being able to use Laplace transforms would be beneficial as it makes the PID and Root Locus very easy.
Any thoughts? suggestions?
Any thoughts? suggestions?
Comments
Controller.PID(Kp, Ki, Kd, @output)
The sliding mode and root locus will be similar if I can figure out how to code it. Others will be added once I discuss this with an expert in control systems.
EDIT: oopps.... I forget the set points and process variable, so it will look like this.
Controller.PID (SetPoint, ProcessVariable, Kp, Ki, Kd, @output)
I could have an Init method to set the Kp, Ki, and Kd gains yet this would limit the loop to only one process. Making it versatile on the fly is a big advantage.
This will be a very useful object once it's complete.
I have to do a little more research on sliding mode and root locus as it was a year ago that I took the class.
EDIT: I have almost immediately regretted taking on Sliding Mode Control. After reading a few papers on it and realized how advanced the control may get, I believe this will be the last implementation of the object. The PID will be completely optimized and accurate as well as the Root Locus control. Other simpler controls will be added upon suggestion and discovery.
I have realized that the need for the process function is a high priority. So a method will need to be created to identify a pseudo-code equation with given inputs and variables i.e :
Controllers.SMC(x^2 + ax + a, alpha1, alpha2, alpha3)
where the process is x^2 + ax + a
and the gains are alpha1, alpha2, alpha3.
This is just an example of what need to be done, not the actual code required. Because for a system you have a process and a controller. The function of a system is the process * the controller ( in real simplified terms). TF = Gp * Gc