TEST HTLM SEITE
⚡ Pluto.jl ⚡
Example: Transport systems
Transport systems are typical candidates for systems. They can be described by the one-dimensional partial differential equation (or simply transport equation)
with velocity
Function
For simplicity, it is assumed that control input
Solution in Laplace-domain
Further the output is assumed at the right side of the system (
with
Test cases
Two scenarios are considered next:
Fluid flow in a pipe with single boundary input
, thus andConveyor system with distributed input
, thus .
Fluid flow in a pipe
The transfer function is noted as
xxxxxxxxxx
using ControlSystems
1.0
xxxxxxxxxx
L = 1.0 # Length of pipe
0.2
xxxxxxxxxx
ν = 0.2 # Flow velocity [m/s]
5.0
xxxxxxxxxx
Tt = L/ν # Delay
DelayLtiSystem{Float64,Float64}
P: StateSpace{Continuous,Float64,Array{Float64,2}}
D =
0.0 1.0
1.0 0.0
Continuous-time state-space model
Delays: [5.0]
xxxxxxxxxx
g0 = delay(Tt) # Ideal delay
The ideal delay is approximated by
with
xxxxxxxxxx
a html"<input type='range' start='1' step='1'>"
1
xxxxxxxxxx
a
DelayLtiSystem{Float64,Float64}
P: StateSpace{Continuous,Float64,Array{Float64,2}}
A =
-1.0
B =
0.0 1.0
C =
1.0
0.0
D =
0.0 0.0
1.0 0.0
Continuous-time state-space model
Delays: [5.0]
xxxxxxxxxx
g_approx = tf(a, [1, a])*g0
Step response
10
xxxxxxxxxx
Tf = 10 # Final simulation time
xxxxxxxxxx
stepplot(g_approx, Tf)
Bode plot
0.010000000000000002:0.010000000000000002:99.99000000000002
xxxxxxxxxx
ω = 10^(-2) : 10^(-2) : 10^(2) # Frequencies for Bode and Nyquist plot
xxxxxxxxxx
bodeplot(g_approx, ω, legend=false)
"dB"
:identity
"(dB)"
xxxxxxxxxx
setPlotScale("dB")
Nyquist plot
xxxxxxxxxx
md"### Nyquist plot"
xxxxxxxxxx
nyquistplot(g_approx, ω, legend=false)
Conveyor system
The transfer function is noted as
Values for
xxxxxxxxxx
md"## Conveyor system
The transfer function is noted as
$\hat{g}_{0} = \frac{\hat{y}(s)}{\hat{u}_{0}(s)} = \frac{1}{s} \left[1 - \exp(-s ~ T_{t})\right] ~ \quad \text{with} ~ T_{t} = \frac{L}{\nu}.$
Values for $L$ and $\nu$ are the same as above.
"
DelayLtiSystem{Float64,Float64}
P: StateSpace{Continuous,Float64,Array{Float64,2}}
A =
0.0 0.0
0.0 0.0
B =
1.0 0.0
0.0 1.0
C =
1.0 -1.0
0.0 0.0
D =
0.0 -0.0
1.0 0.0
Continuous-time state-space model
Delays: [5.0]
xxxxxxxxxx
g1 = tf(1, [1, 0]) - tf(1, [1, 0])*delay(Tt)
Step plot
xxxxxxxxxx
md"### Step plot"
xxxxxxxxxx
stepplot(g1, Tf)
Bode plot
xxxxxxxxxx
md"### Bode plot"
xxxxxxxxxx
bodeplot(g1, ω, legend=false)
Nyquist plot
xxxxxxxxxx
md"### Nyquist plot"
xxxxxxxxxx
nyquistplot(100.0*g1, ω)