Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
T
traffic-scratch
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container Registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mehtank
traffic-scratch
Commits
f19a580f
Commit
f19a580f
authored
8 years ago
by
mehtank
Browse files
Options
Downloads
Patches
Plain Diff
Added bilateral robot controller
parent
120ac9a6
Branches
Branches containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
bestrobot.py
+31
-1
31 additions, 1 deletion
bestrobot.py
with
31 additions
and
1 deletion
bestrobot.py
+
31
−
1
View file @
f19a580f
...
...
@@ -6,7 +6,7 @@ def isstable(model):
def
tf
((
f
,
g
,
h
),
w
):
"""
Return the complex value of linearized transfer function T(jw)
Return the complex value of
the
linearized transfer function T(jw)
"""
return
(
g
*
1j
*
w
+
f
)
/
(
-
w
*
w
+
(
g
+
h
)
*
1j
*
w
+
f
)
...
...
@@ -24,6 +24,36 @@ def htflogmag(model, w):
"""
return
log
(
absolute
(
1
-
tf
(
model
,
w
)))
def
btf
(
human
,
robot
,
gamma
,
w
):
"""
Return the complex value of the linearized transfer function T(jw)
of a bilateral robot controller [ followed by a human ]:
Y(robot) = gamma Tr Y(forward) + (1-gamma) Tr Y(behind)
Y(behind) = Th Y(robot)
Y(robot) = gamma Tr Y(forward) + (1-gamma) Tr Th Y(robot)
Y(robot) = [ gamma Tr ] / [ 1 - (1-gamma) Tr Th ] Y(forward)
"""
tr
=
tf
(
robot
,
w
)
th
=
tf
(
human
,
w
)
t
=
gamma
*
tr
/
(
1
-
(
1
-
gamma
)
*
tr
*
th
)
return
t
def
btflogmag
(
human
,
robot
,
gamma
,
w
):
"""
Return the log of the magnitude of the linearized transfer function
log[ |T(jw)| ]
of a bilateral robot controller [ followed by a human ]
"""
return
log
(
absolute
(
btf
(
human
,
robot
,
gamma
,
w
)))
def
bhtflogmag
(
human
,
robot
,
gamma
,
w
):
"""
Return the log of the magnitude of the linearized headway transfer function
log[ |1-T(jw)| ]
of a bilateral robot controller [ followed by a human ]
"""
return
log
(
absolute
(
1
-
btf
(
human
,
robot
,
gamma
,
w
)))
def
kstable
(
human
,
robot
,
w
,
eta
=
2
):
"""
Return the maximum number of human cars
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment