Skip to content

Commit cbc4493

Browse files
committed
docs: fix namespacing in DC motor tutorial
1 parent 447e587 commit cbc4493

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

docs/src/tutorials/dc_motor_pi.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,8 @@ plot(p1, p2, layout = (2, 1))
9292
When implementing and tuning a control system in simulation, it is a good practice to analyze the closed-loop properties and verify robustness of the closed-loop with respect to, e.g., modeling errors. To facilitate this, we added two analysis points to the set of connections above, more specifically, we added the analysis points named `:y` and `:u` to the connections (for more details on analysis points, see [Linear Analysis](@ref))
9393

9494
```julia
95-
connect(sys.speed_sensor.w, :y, feedback.input2)
96-
connect(sys.pi_controller.ctr_output, :u, source.V)
95+
connect(sys.speed_sensor.w, :y, sys.feedback.input2)
96+
connect(sys.pi_controller.ctr_output, :u, sys.source.V)
9797
```
9898

9999
one at the plant output (`:y`) and one at the plant input (`:u`). We may use these analysis points to calculate, e.g., sensitivity functions, illustrated below. Here, we calculate the sensitivity function $S(s)$ and the complimentary sensitivity function $T(s) = I - S(s)$, defined as
@@ -111,7 +111,7 @@ matrices_S, simplified_sys = Blocks.get_sensitivity(
111111
model, :y, op = Dict(unknowns(sys) .=> 0.0))
112112
So = ss(matrices_S...) |> minreal # The output-sensitivity function as a StateSpace system
113113
matrices_T, simplified_sys = Blocks.get_comp_sensitivity(
114-
model, :y, op = Dict(model.inertia.phi => 0.0, model.inertia.w => 0.0))
114+
model, :y, op = Dict(sys.inertia.phi => 0.0, sys.inertia.w => 0.0))
115115
To = ss(matrices_T...)# The output complementary sensitivity function as a StateSpace system
116116
bodeplot([So, To], label = ["S" "T"], plot_title = "Sensitivity functions",
117117
plotphase = false)

0 commit comments

Comments
 (0)