Skip to content

Commit 569a7d1

Browse files
committed
add video and docs
1 parent 07e0354 commit 569a7d1

File tree

1 file changed

+26
-2
lines changed

1 file changed

+26
-2
lines changed

docs/src/lib/timefreqresponse.md

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
1+
# Time and Frequency response analysis
12
```@index
23
Pages = ["timefreqresponse.md"]
34
```
45

5-
# Time and Frequency response
66

7-
Frequency responses are calculated using [`freqresp`](@ref), [`bode`](@ref) and [`nyquist`](@ref).
7+
8+
## Frequency response
9+
10+
Frequency responses are calculated using [`freqresp`](@ref), [`bode`](@ref), [`sigma`](@ref) and [`nyquist`](@ref). Frequency-response plots are obtained using [`bodeplot`](@ref), [`sigmaplot`](@ref), [`nyquistplot`](@ref), [`marginplot`](@ref) and [`nicholsplot`](@ref).
811

912
Any [`TransferFunction`](@ref) can be evaluated at a point using
1013
`F(s)`, `F(omega, true)`, `F(z, false)`
@@ -13,10 +16,31 @@ Any [`TransferFunction`](@ref) can be evaluated at a point using
1316
- `F(omega,true)` evaluates the discrete-time transfer function `F` at `exp(i*Ts*omega)`
1417
- `F(z,false)` evaluates the discrete-time transfer function `F` at `z`
1518

19+
A video demonstrating frequency-response analysis in ControlSystems.jl is available below.
20+
21+
```@raw html
22+
<iframe style="height: 315px; width: 560px" src="https://www.youtube.com/embed/_ZvvRLpCLG0" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
23+
```
24+
25+
## Time response (simulation)
26+
1627
Simulation with arbitrary inputs is primarily handled by the function [`lsim`](@ref), with [`step`](@ref) and [`impulse`](@ref) serving as convenience functions to simulate responses to particular inputs.
1728

29+
The function [`lsim`](@ref) can take an input vector `u` containing a sampled input trajectory, or an input function taking the state and time as arguments, `u(x,t)`. This function can be used to easily simulate, e.g., ramp responses or saturated state-feedback control etc. See the docstring of [`lsim`](@ref) for more details.
30+
1831
For more extensive nonlinear simulation capabilities, see the notes on ModelingToolkit and DifferentialEquations under [The wider Julia ecosystem for control](@ref).
1932

33+
#### Example:
34+
The following simulates a step response of a second-order system and plots the result.
35+
```@example TIMERESP
36+
using ControlSystemsBase, Plots
37+
G = tf(1, [1, 1, 1])
38+
res = step(G, 20) # Simulate 20 seconds step response
39+
plot(res)
40+
```
41+
42+
## Docstrings
43+
2044
```@autodocs
2145
Modules = [ControlSystems, ControlSystemsBase]
2246
Pages = [libpath*"/timeresp.jl", libpath*"/result_types.jl", libpath*"/freqresp.jl", "simulators.jl"]

0 commit comments

Comments
 (0)