JuliaControl / JuliaControl/ControlSystems.jl
Differentiable control design
Nobody has claimed this yet.
- Dominant language
- Julia
- Stars
- 582
- Forks
- 92
- Avg merge
- 1h 12m
- Merged PRs (30d)
- 2
Description
A number of functions in this package and in RobustAndOptimalControl.jl fail when trying to compute gradients through them using ForwardDiff or Zygote. This issue tries to summarize the current status
Problematic functions
| Function | AD package | Comment |
|---|---|---|
c2d |
ForwardDiff | :zoh requires exp!(::Matrix{Dual}). ForwardDiffChainRules buggy, but manual implementation possible. #844 |
feedback |
Zygote | try/catch and @warn |
are |
All | Handled through ImplicitDiff #844 |
hinfnorm |
ForwardDiff | Non-smooth. Works for Zygote. See tests for comments and comment. ForwardDiff in #844 but not for MIMO |
svd/qr/schur |
ForwardDiff | DifferentiableFactorizations.jl may be helpful |
hessenberg |
ForwardDiff, ReverseDiff | GenericLinearAlgebra.Hessenberg has different fieldnames from LinearAlgebra.Hessenberg |
c2d example failing
foo(x) = sum(exp(reshape(x, 2, 2)))
v = randn(4)
using ForwardDiff
ForwardDiff.gradient(foo, v)
ERROR: MethodError: no method matching exp(::Matrix{ForwardDiff.Dual...
Related issues:
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the listed problematic functions—especially c2d, feedback, are, hinfnorm, and hessenberg—and reproduce the c2d example using ForwardDiff.gradient. Read the linked ControlSystems.jl pull request, RobustAndOptimalControl.jl test_hinfgrad.jl, and related issue 57; done would require resolving the documented automatic-differentiation failures across the affected functions and packages.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- julia
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100