Skip to content

Commit 1ab9deb

Browse files
committed
add warnings
1 parent 724b349 commit 1ab9deb

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

docs/src/examples/dc_motor_pi.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,7 @@ lens!([1.2, 1.6], [0.75, 1.02], inset=(1, bbox(.6, .5, .3, .4))) # 1 is subplot
174174
In the plot above, we compare the result of the discrete-time control system to the continuous-time result from before. We see that with the chosen sample-interval of `dt=0.005` (provided to the `Sampler` block), we have a slight degradation in the control performance as a consequence of the discretization.
175175

176176
### Adding a slower outer position loop
177+
Below, we add an outer control loop that controls the position of the motor by manipulating the reference to the inner speed controller. This is a common control strategy, often referred to as _cascade control_.
177178

178179
![block diagram of a cascade control loop](https://help.juliahub.com/juliasimcontrol/dev/figs/cascade_pid.png)
179180

@@ -184,7 +185,6 @@ In the plot above, we compare the result of the discrete-time control system to
184185
sampler = Sampler(clock = Clock(0.005))
185186
# cc = ClockChanger(from = get_clock(sampler), to = get_clock(inner.sampler)) # Currently deactivated due to bug
186187
cc = Gain(k = 1)
187-
# cc = SISO()
188188
ref = Blocks.Ramp(height = 1, start_time = 0.05, duration = 0.85, smooth = false)
189189
ref_diff = DiscreteDerivative() # This will differentiate q_ref to q̇_ref
190190
add = Blocks.Add() # The middle ∑ block in the diagram

src/discrete_blocks.jl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -257,10 +257,14 @@ end
257257
# Connectors:
258258
- `input` (continuous-time signal)
259259
- `output` (discrete-time signal)
260+
261+
!!! danger "Experimental"
262+
The ClockChanger component is experimental and has known correctness issues. Please use with caution.
260263
"""
261264
@mtkmodel ClockChanger begin
262265
begin
263266
isdefined(Main, :JuliaSimCompiler) || error("JuliaSimCompiler must be defined in the Main module for the ClockChanger component to work. Run `import JuliaSimCompiler`.")
267+
@warn "The ClockChanger component is experimental and has known correctness issues. Please use with caution."
264268
end
265269
@extend u, y = siso = SISO()
266270
@structural_parameters begin

0 commit comments

Comments
 (0)