Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
processes
DoubleTankLab.jl
Commits
d3af836b
Commit
d3af836b
authored
Mar 15, 2018
by
Jacob Wikmark
Browse files
bumpless transfer only if I is on
parent
1900fae6
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/tankdemo.jl
View file @
d3af836b
...
...
@@ -41,12 +41,14 @@ function runprocess(;simulated=false, webservice=true, port=8000, σ = 0.001, du
onv
=
Int
.
([
gui
[
s
]
==
"On"
for
s
in
[
:
pOn
,
:
iOn
,
:
dOn
]])
rv
=
pidcontroller
(
r
,
y
,
onv
)
if
gui
[
:
mode
]
==
"Automatic"
gui
[
:
u
]
=
clamp
(
round
(
rv
,
2
),
0
,
1
)
#u's constructor has a dummy graphic so this is fine
gui
[
:
u
]
=
clamp
(
round
(
rv
,
2
),
0
,
1
)
#u's constructor has
only
a dummy graphic so this is fine
control
(
P
,
rv
)
elseif
gui
[
:
mode
]
==
"Manual"
control
(
P
,
gui
[
:
u
])
#bumpless transfer:
pidcontroller
.
I
=
gui
[
:
u
]
-
(
pidcontroller
.
Tot
-
pidcontroller
.
I
)
if
gui
[
:
iOn
]
==
"On"
pidcontroller
.
I
=
gui
[
:
u
]
-
(
pidcontroller
.
Tot
-
pidcontroller
.
I
)
end
end
push!
(
gui
,
y
,
1
)
push!
(
gui
,
r
,
2
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment