-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmodel_params.py
More file actions
60 lines (44 loc) · 2.42 KB
/
model_params.py
File metadata and controls
60 lines (44 loc) · 2.42 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
# -*- coding: utf-8 -*-
import numpy as np
import os
h = 0.01 # time step in s
N = int(3.0 / h) # total number of time steps
target_coordinates = (0.0, 0.15) # coordinates of the target
"""
mh: mass of the hand (kg),
k: spring constant of haptic spring connecting the participant hands (N/m)
c: damping constant modeling the viscous properties of muscles and limbs (Ns/ m)
tau: time constant of the second order filter modeling activation to force (s)
r: control cost weighting
wp: position cost weighting
wv: velocity cost weighting
wf: force cost weighting
sig_u: standard deviation of process or control noise
sig_p: standard deviation of position measurement noise
sig_v: standard deviation of velocity measurement noise
sig_f: standard deviation of force measurement noise
sig prop noise: scaling of measurement noise standard deviation for states derived from proprioception
sig haptic noise: scaling of measurement noise standard deviation for states derived from partner haptic
sig vision noise: scaling of measurement noise standard deviation for states derived from partner vision
haptic delay: time delay of haptic partner feedback or self propcioceptive feedback
visual delay: time delay of visual partner feedback
vel cov: scaling for velocity covariance in process noise covariance matrix
pos cov: scaling for position covariance in process noise covariance matrix
settle_steps: step count to settle at target
"""
params = {'h': h, 'N': N,
'm': 1.0, 'k_h': 50, 'k_vp': 0, 'k_vp_': 0, 'c': 20, 'tau': 0.04,
'r': 0.00001, 'wp': 1, 'wv': 0.2, 'wf': 0.01,
'sig_u': 0.05, 'sig p': 0.01, 'sig v': 0.1, 'sig f': 1,
'sig prop noise': 0.4, 'sig partner noise': 0.2, 'haptic delay': 5, 'sig self noise':0.2, 'visual delay': 10,
'vel cov': 0.03, 'pos cov': 0.001, 'force cov': 0.01, 'u cov': 0.2,
'settle_steps': 1}
process_noise = params['sig_u'] * np.array([0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 1.0,
0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 1.0,
0.0, 0.0, 0.0, 0.0, 0.0, 0.0]) # process additive noise standard deviations
hand_init = [0, 0] # hand initial x coordinates
target_coordinates = [0, 0.15]
viapoint1_coordinates = [0.05, 0.05]
viapoint2_coordinates = [-0.05, 0.1]
viapoint_crossing_timestep = [100, 200]
data_save_directory = os.getcwd() + r'\\Data'