Skip to content

Commit

Permalink
improve docstring
Browse files Browse the repository at this point in the history
  • Loading branch information
baggepinnen committed Jul 21, 2023
1 parent a2c1770 commit 406266c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/DiscretePIDs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,11 @@ u = K \\left( e + \\dfrac{1}{Ti} \\int e dt + T_d \\dfrac{de}{dt} \\right)
U(s) = K \\left( bR(s) - Y(s) + \\dfrac{1}{sT_i} \\left( R(s) Y(s) \\right) - \\dfrac{sT_d}{1 + s T_d / N}Y(s)
```
Call the controller like this
```julia
u = pid(r, y, uff) # uff is optional
u = calculate_control!(pid, r, y, uff) # Equivalent to the above
# Arguments:
- `K`: Proportional gain
- `Ti`: Integral time
Expand All @@ -48,7 +53,7 @@ U(s) = K \\left( bR(s) - Y(s) + \\dfrac{1}{sT_i} \\left( R(s) Y(s) \\right) - \\
- `D`: Derivative part
- `yold`: Last measurement signal
See also [`calculate_control`](@ref), [`set_K!`](@ref), [`set_Ti!`](@ref), [`set_Td!`](@ref)
See also [`calculate_control!`](@ref), [`set_K!`](@ref), [`set_Ti!`](@ref), [`set_Td!`](@ref)
"""
function DiscretePID(;
K::T = 1f0,
Expand Down

0 comments on commit 406266c

Please sign in to comment.