3
3
4
4
Flange fixed in housing at a given angle.
5
5
6
+ # Connectors:
7
+ - `flange` [Flange](@ref)
8
+
6
9
# Parameters:
7
- - `phi0`: [rad] Fixed offset angle of housing
10
+ - `phi0`: [` rad` ] Fixed offset angle of housing
8
11
"""
9
12
function Fixed (;name, phi0= 0.0 )
10
13
@named flange = Flange ()
18
21
19
22
1D-rotational component with inertia.
20
23
21
- # Parameters:
22
- - `J`: [kg·m²] Moment of inertia
23
- - `phi_start`: [rad] Initial value of absolute rotation angle of component
24
- - `w_start`: [rad/s] Initial value of absolute angular velocity of component
25
- - `a_start`: [rad/s²] Initial value of absolute angular acceleration of component
26
-
27
24
# States:
28
- - `phi`: [rad] Absolute rotation angle of component
29
- - `w`: [rad/s] Absolute angular velocity of component (= der(phi))
30
- - `a`: [rad/s²] Absolute angular acceleration of component (= der(w))
25
+ - `phi`: [`rad`] Absolute rotation angle of component
26
+ - `w`: [`rad/s`] Absolute angular velocity of component (= D(phi))
27
+ - `a`: [`rad/s²`] Absolute angular acceleration of component (= D(w))
28
+
29
+ # Connectors:
30
+ - `flange_a` [Flange](@ref) Left flange
31
+ - `flange_b` [Flange](@ref) Right flange
32
+
33
+ # Parameters:
34
+ - `J`: [`kg·m²`] Moment of inertia
35
+ - `phi_start`: [`rad`] Initial value of absolute rotation angle of component
36
+ - `w_start`: [`rad/s`] Initial value of absolute angular velocity of component
37
+ - `a_start`: [`rad/s²`] Initial value of absolute angular acceleration of component
31
38
"""
32
39
function Inertia (;name, J, phi_start= 0.0 , w_start= 0.0 , a_start= 0.0 )
33
40
@named flange_a = Flange ()
53
60
54
61
Linear 1D rotational spring
55
62
63
+ # States:
64
+ - `phi_rel(t)`: [`rad`] Relative rotation angle (`flange_b.phi - flange_a.phi`)
65
+ - `tau(t)`: [`N.m`] Torque between flanges (`flange_b.tau`)
66
+
67
+ # Connectors:
68
+ - `flange_a` [Flange](@ref)
69
+ - `flange_b` [Flange](@ref)
70
+
56
71
# Parameters:
57
- - `c`: [N.m/rad] Spring constant
58
- - `phi_rel0`: Unstretched spring angle
72
+ - `c`: [` N.m/rad` ] Spring constant
73
+ - `phi_rel0`: [`rad`] Unstretched spring angle
59
74
"""
60
75
function Spring (;name, c, phi_rel0= 0.0 )
61
76
@named partial_comp = PartialCompliant ()
73
88
74
89
Linear 1D rotational damper
75
90
91
+ # States:
92
+ - `phi_rel(t)`: [`rad`] Relative rotation angle (= flange_b.phi - flange_a.phi)
93
+ - `w_rel(t)`: [`rad/s`] Relative angular velocity (= D(phi_rel))
94
+ - `a_rel(t)`: [`rad/s²`] Relative angular acceleration (= D(w_rel))
95
+ - `tau(t)`: [`N.m`] Torque between flanges (= flange_b.tau)
96
+
97
+ # Connectors:
98
+ - `flange_a` [Flange](@ref)
99
+ - `flange_b` [Flange](@ref)
100
+
76
101
# Parameters:
77
- - `d`: [N.m.s/rad] Damping constant
102
+ - `d`: [` N.m.s/rad` ] Damping constant
78
103
"""
79
104
function Damper (;name, d)
80
105
@named partial_comp = PartialCompliantWithRelativeStates ()
@@ -91,6 +116,15 @@ Ideal gear without inertia.
91
116
92
117
This element characterizes any type of gear box which is fixed in the ground and which has one driving shaft and one driven shaft.
93
118
119
+ # States:
120
+ - `phi_a(t)`: [`rad`] Relative angle between shaft a and the support
121
+ - `phi_b(t)`: [`rad`] Relative angle between shaft b and the support
122
+
123
+ # Connectors:
124
+ - `flange_a` [Flange](@ref)
125
+ - `flange_b` [Flange](@ref)
126
+ - `support` [Support](@ref) if `use_support == true`
127
+
94
128
# Parameters:
95
129
- `ratio`: Transmission ratio (flange_a.phi/flange_b.phi)
96
130
- `use_support`: If support flange enabled, otherwise implicitly grounded
@@ -107,4 +141,44 @@ function IdealGear(;name, ratio, use_support=false)
107
141
0 ~ ratio* flange_a. tau + flange_b. tau
108
142
]
109
143
extend (ODESystem (eqs, t, sts, [ratio]; name= name), partial_element)
110
- end
144
+ end
145
+
146
+
147
+ """
148
+ RotationalFriction(;name, f, tau_c, w_brk, tau_brk)
149
+
150
+ Models rotational friction with Stribeck effect, Coulomb friction and viscous friction between the two flanges.
151
+ The friction torque is a function of the relative angular velocity between flange_a and flange_b.
152
+
153
+ Friction model: "Armstrong, B. and C.C. de Wit, Friction Modeling and Compensation, The Control Handbook, CRC Press, 1995."
154
+
155
+ # States:
156
+ - `phi_rel(t)`: [`rad`] Relative rotation angle (= flange_b.phi - flange_a.phi)
157
+ - `w_rel(t)`: [`rad/s`] Relative angular velocity (= D(phi_rel))
158
+ - `a_rel(t)`: [`rad/s²`] Relative angular acceleration (= D(w_rel))
159
+ - `tau(t)`: [`N.m`] Torque between flanges (= flange_b.tau)
160
+
161
+ # Connectors:
162
+ - `flange_a` [Flange](@ref)
163
+ - `flange_b` [Flange](@ref)
164
+
165
+ # Parameters:
166
+ - `f`: [`N⋅m/(rad/s)`] Viscous friction coefficient
167
+ - `tau_c`: [`N⋅m`] Coulomb friction torque
168
+ - `w_brk`: [`rad/s`] Breakaway friction velocity
169
+ - `tau_brk`: [`N⋅m`] Breakaway friction torque
170
+ """
171
+ function RotationalFriction (;name, f, tau_c, w_brk, tau_brk)
172
+ @named partial_comp = PartialCompliantWithRelativeStates ()
173
+ @unpack w_rel, tau = partial_comp
174
+ pars = @parameters f= f tau_c= tau_c w_brk= w_brk tau_brk= tau_brk
175
+
176
+ str_scale = sqrt (2 * exp (1 )) * (tau_brk - tau_c)
177
+ w_st = w_brk * sqrt (2 )
178
+ w_coul = w_brk / 10
179
+
180
+ eqs = [
181
+ tau ~ str_scale * (exp (- (w_rel/ w_st)^ 2 ) * w_rel / w_st) + tau_c * tanh (w_rel / w_coul) + f * w_rel # Stribeck friction + Coulomb friction + Viscous friction
182
+ ]
183
+ extend (ODESystem (eqs, t, [], pars; name= name), partial_comp)
184
+ end
0 commit comments