Skip to content

Commit 2cb622d

Browse files
committed
add FAQ entries in docstrings
1 parent bbbbaff commit 2cb622d

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

lib/ControlSystemsBase/src/synthesis.jl

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,12 @@ x0 = [1,0]
5757
y, t, x, uout = lsim(sys,u,t,x0=x0)
5858
plot(t,x', lab=["Position" "Velocity"], xlabel="Time [s]")
5959
```
60+
61+
# FAQ
62+
This function requires
63+
- `Q` must be positive semi-definite
64+
- `R` must be positive definite
65+
- The pair `(Q,A)` must not have any unobservable modes on the imaginary axis (cont) / unit circle (disc), e.g., there must not be any integrating modes that are not penalized by `Q`. if this condition does not hold, you may get the error "The Hamiltonian matrix is not dichotomic".
6066
"""
6167
function lqr(::ContinuousType, A, B, Q, R, args...; kwargs...)
6268
S, _, K = arec(A, B, R, Q, args...; kwargs...)
@@ -87,6 +93,12 @@ To obtain a discrete-time approximation to a continuous-time LQG problem, the fu
8793
To obtain an LTISystem that represents the Kalman filter, pass the obtained Kalman feedback gain into [`observer_filter`](@ref). To obtain an LQG controller, pass the obtained Kalman feedback gain as well as a state-feedback gain computed using [`lqr`](@ref) into [`observer_controller`](@ref).
8894
8995
The `args...; kwargs...` are sent to the Riccati solver, allowing specification of cross-covariance etc. See `?MatrixEquations.arec/ared` for more help.
96+
97+
# FAQ
98+
This function requires
99+
- `R1` must be positive semi-definite
100+
- `R2` must be positive definite
101+
- The pair `(A,R1)` must not have any uncontrollable modes on the imaginary axis (cont) / unit circle (disc), e.g., there must not be any integrating modes that are not affected through `R1`. if this condition does not hold, you may get the error "The Hamiltonian matrix is not dichotomic".
90102
"""
91103
function kalman(te, A, C, R1,R2, args...; direct = false, kwargs...)
92104
if direct

0 commit comments

Comments
 (0)