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
LabProcesses.jl
Commits
e0f22a40
Commit
e0f22a40
authored
Aug 26, 2019
by
Julian Salt
Browse files
Update furuta.jl
parent
4c2b67b2
Pipeline
#747
failed with stage
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
src/interface_implementations/furuta.jl
View file @
e0f22a40
...
@@ -87,18 +87,22 @@ control(p::FurutaSimulator, u::Number) = p.s(u)
...
@@ -87,18 +87,22 @@ control(p::FurutaSimulator, u::Number) = p.s(u)
measure_phi
(
p
::
Furuta
)
=
read
(
p
.
measure_phi
)
measure_phi
(
p
::
Furuta
)
=
read
(
p
.
measure_phi
)
phi
(
p
::
Furuta
)
=
measure_phi
(
p
)
*
2.56
measure_phi_dot
(
p
::
Furuta
)
=
read
(
p
.
measure_phi_dot
)
measure_phi_dot
(
p
::
Furuta
)
=
read
(
p
.
measure_phi_dot
)
phi_dot
(
p
::
Furuta
)
=
(
measure_phi_dot
(
p
)
+
0.0708
)
*
2.0
phi_dot
(
p
::
Furuta
)
=
(
measure_phi_dot
(
p
)
+
0.0708
)
*
2.0
measure_theta
(
p
::
Furuta
)
=
read
(
p
.
measure_theta
)
measure_theta
(
p
::
Furuta
)
=
read
(
p
.
measure_theta
)
#theta(p::Furuta) = (measure_theta(p) + 5.1763)*0.3091
measure_theta_dot
(
p
::
Furuta
)
=
read
(
p
.
measure_theta_dot
)
measure_theta_dot
(
p
::
Furuta
)
=
read
(
p
.
measure_theta_dot
)
#theta_dot(p::Furuta) = (measure_theta_dot(p) - 0.022)*3.76
measure_theta_precise
(
p
::
Furuta
)
=
read
(
p
.
measure_theta_precise
)
measure_theta_precise
(
p
::
Furuta
)
=
read
(
p
.
measure_theta_precise
)
#theta_precise(p::Furuta) = (measure_theta_precise(p) + 0.7792)*0.058
measure_theta_dot_precise
(
p
::
Furuta
)
=
read
(
p
.
measure_theta_dot_precise
)
measure_theta_dot_precise
(
p
::
Furuta
)
=
read
(
p
.
measure_theta_dot_precise
)
#theta_dot_precise(p::Furuta) = measure_theta_dot_precise(p)*0.68
function
phi
(
p
::
Furuta
)
a
=
rem
(
measure_phi
(
p
)
*
2.56
,
2
*
pi
)
if
a
>
pi
a
=
a
-
2
*
pi
elseif
a
<
pi
a
=
a
+
2
*
pi
end
return
a
end
function
theta
(
p
::
Furuta
)
function
theta
(
p
::
Furuta
)
a
=
(
measure_theta
(
p
)
+
5.1763
)
*
0.3091
a
=
(
measure_theta
(
p
)
+
5.1763
)
*
0.3091
if
abs
(
a
)
<
0.5
if
abs
(
a
)
<
0.5
...
...
Write
Preview
Markdown
is supported
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