Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

improve some docstrings #660

Merged
merged 1 commit into from
Mar 3, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion src/analysis.jl
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,7 @@ end


"""
reduce_sys(A::AbstractMatrix, B::AbstractMatrix, C::AbstractMatrix, D::AbstractMatrix, meps::AbstractFloat)
Implements REDUCE in the Emami-Naeini & Van Dooren paper. Returns transformed
A, B, C, D matrices. These are empty if there are no zeros.
"""
Expand Down Expand Up @@ -409,6 +410,7 @@ returns frequencies for gain margins, gain margins, frequencies for phase margin
If `!allMargins`, return only the smallest margin

If `full` return also `fullPhase`
See also [`delaymargin`](@ref) and [`RobustAndOptimalControl.diskmargin`](https://juliacontrol.github.io/RobustAndOptimalControl.jl/dev/api/#RobustAndOptimalControl.diskmargin)
"""
function margin(sys::LTISystem, w::AbstractVector{<:Real}; full=false, allMargins=false)
ny, nu = size(sys)
Expand Down Expand Up @@ -530,7 +532,9 @@ end
"""
dₘ = delaymargin(G::LTISystem)

Only supports SISO systems"""
Return the delay margin, dₘ. For discrete-time systems, the delay margin is normalized by the sample time, i.e., the value represents the margin in number of sample times.
Only supports SISO systems.
"""
function delaymargin(G::LTISystem)
# Phase margin in radians divided by cross-over frequency in rad/s.
if G.nu + G.ny > 2
Expand Down Expand Up @@ -566,6 +570,7 @@ Given a transfer function describing the plant `P` and a transfer function descr
- `CS = C/(1+PC)` Measurement noise to control signal
- `T = PC/(1+PC)` Complementary sensitivity function

If `minimal=true`, [`minreal`](@ref) will be applied to all transfer functions.
Only supports SISO systems
"""
function gangoffour(P::LTISystem, C::LTISystem; minimal=true)
Expand Down