JuliaControl/ControlSystems.jl

Differentiable control design

Open

#791 创建于 2023年1月4日

在 GitHub 查看
 (1 评论) (1 反应) (0 负责人)Julia (90 fork)batch import
help wanted

仓库指标

Star
 (578 star)
PR 合并指标
 (平均合并 203天 12小时) (30 天内合并 12 个 PR)

描述

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:

贡献者指南