Skip to content

RFC: Implement a "Problem" style synthesis interface #307

Open
@imciner2

Description

@imciner2

I was thinking about how the synthesis functions are setup currently, and I think currently they are still very "Matlab-y," which I at least find somewhat awkward to work with because you have to pass around every matrix as an argument (this can grow to a very large number of arguments if you start doing things like linear predictive control, where I have written functions with 7 or more different arguments). On the other hand, I think the LQG type is somewhat too much, where it even does the controller design for you in the constructor instead of in a separate function like you have to do for the rest of the controller types.

I have found that I think I like the idea that the differential equations packages use, where they define problem types that contain the parameters for the problem, and then pass those into the solver functions. I think that would be a nice direction to move to, and possibly then also support a single design function that each type overloads to design the controller. That provides a nice consistent interface (for instance, it removes the need for me to remember whether the function I wanted was lqr, dlqr, lqrd, lqg, etc. and their argument orders since I define everything when I create the problem instance).

Specifically I am thinking of an initial type hierarchy of:

Abstract type ControlProblem
--> Concrete type LQR
--> Concrete type LQG

Then for instance the LQR type has fields for sys, Q, R, S, P, N, and then the synthesis functions have all the information they need inside this type to do the problem synthesis and return the controller matrix. The synthesis functions then take their sampling time from the included system (as is currently done by the overloaded lqr(sys, Q, R) function).

@baggepinnen @mfalt @olof3 Thoughts?

Metadata

Metadata

Assignees

No one assigned

    Labels

    hacktoberfesthttps://discourse.julialang.org/t/hacktoberfest-2020-x-the-julia-language/46927

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions