-
Notifications
You must be signed in to change notification settings - Fork 164
/
SupportFriction.mo
197 lines (188 loc) · 7.24 KB
/
SupportFriction.mo
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
within Modelica.Mechanics.Translational.Components;
model SupportFriction "Coulomb friction in support"
extends Modelica.Mechanics.Translational.Interfaces.PartialElementaryTwoFlangesAndSupport2;
extends Modelica.Thermal.HeatTransfer.Interfaces.PartialElementaryConditionalHeatPortWithoutT;
parameter Real f_pos[:, 2]=[0, 1]
"Positive sliding friction characteristic [N] as function of v [m/s] (v>=0)";
parameter Real peak(final min=1) = 1
"Peak for maximum friction force at v==0 (f0_max = peak*f_pos[1,2])";
extends Translational.Interfaces.PartialFriction;
SI.Position s "= flange_a.s - support.s";
SI.Force f "Friction force";
SI.Velocity v "Absolute velocity of flange_a and flange_b";
SI.Acceleration a "Absolute acceleration of flange_a and flange_b";
equation
// Constant auxiliary variables
f0 = Modelica.Math.Vectors.interpolate(
f_pos[:, 1],
f_pos[:, 2],
0,
1);
f0_max = peak*f0;
free = false;
s = flange_a.s - s_support;
flange_a.s = flange_b.s;
// velocity and acceleration of flanges
v = der(s);
a = der(v);
v_relfric = v;
a_relfric = a;
// Friction force
flange_a.f + flange_b.f - f = 0;
// Friction force
f = if locked then sa*unitForce else (
if startForward then
Modelica.Math.Vectors.interpolate(f_pos[:, 1], f_pos[:, 2], v, 1)
else if startBackward then
-Modelica.Math.Vectors.interpolate(f_pos[:, 1], f_pos[:, 2], -v, 1)
else if pre(mode) == Forward then
Modelica.Math.Vectors.interpolate(f_pos[:, 1], f_pos[:, 2], v, 1)
else
-Modelica.Math.Vectors.interpolate(f_pos[:, 1], f_pos[:, 2], -v, 1));
lossPower = f*v_relfric;
annotation (
Documentation(info="<html>
<p>
This element describes <strong>Coulomb friction</strong> in <strong>support</strong>,
i.e., a frictional force acting between a flange and the housing.
The positive sliding friction force \"f\" has to be defined
by table \"f_pos\" as function of the absolute velocity \"v\".
E.g.
</p>
<blockquote><pre>
v | f
---+-----
0 | 0
1 | 2
2 | 5
3 | 8
</pre></blockquote>
<p>
gives the following table:
</p>
<blockquote><pre>
f_pos = [0, 0; 1, 2; 2, 5; 3, 8];
</pre></blockquote>
<p>
Currently, only linear interpolation in the table is supported.
Outside of the table, extrapolation through the last
two table entries is used. It is assumed that the negative
sliding friction force has the same characteristic with negative
values. Friction is modelled in the following way:
</p>
<p>
When the absolute velocity \"v\" is not zero, the friction force
is a function of v and of a constant normal force. This dependency
is defined via table f_pos and can be determined by measurements,
e.g., by driving the gear with constant velocity and measuring the
needed driving force (= friction force).
</p>
<p>
When the absolute velocity becomes zero, the elements
connected by the friction element become stuck, i.e., the absolute
position remains constant. In this phase the friction force is
calculated from a force balance due to the requirement, that
the absolute acceleration shall be zero. The elements begin
to slide when the friction force exceeds a threshold value,
called the maximum static friction force, computed via:
</p>
<blockquote><pre>
maximum_static_friction = <strong>peak</strong> * sliding_friction(v=0) (<strong>peak</strong> >= 1)
</pre></blockquote>
<p>
This procedure is implemented in a \"clean\" way by state events and
leads to continuous/discrete systems of equations if friction elements
are dynamically coupled which have to be solved by appropriate
numerical methods. The method is described in
(see also a short sketch in <a href=\"modelica://Modelica.Mechanics.Rotational.UsersGuide.ModelingOfFriction\">UsersGuide.ModelingOfFriction</a>):
</p>
<dl>
<dt>Otter M., Elmqvist H., and Mattsson S.E. (1999):</dt>
<dd><strong>Hybrid Modeling in Modelica based on the Synchronous
Data Flow Principle</strong>. CACSD'99, Aug. 22.-26, Hawaii.</dd>
</dl>
<p>
More precise friction models take into account the elasticity of the
material when the two elements are \"stuck\", as well as other effects,
like hysteresis. This has the advantage that the friction element can
be completely described by a differential equation without events. The
drawback is that the system becomes stiff (about 10-20 times slower
simulation) and that more material constants have to be supplied which
requires more sophisticated identification. For more details, see the
following references, especially (Armstrong and Canudas de Wit 1996):
</p>
<dl>
<dt>Armstrong B. (1991):</dt>
<dd><strong>Control of Machines with Friction</strong>. Kluwer Academic
Press, Boston MA.<br><br></dd>
<dt>Armstrong B., and Canudas de Wit C. (1996):</dt>
<dd><strong>Friction Modeling and Compensation.</strong>
The Control Handbook, edited by W.S.Levine, CRC Press,
pp. 1369-1382.<br><br></dd>
<dt>Canudas de Wit C., Olsson H., Åström K.J., and Lischinsky P. (1995):</dt>
<dd><strong>A new model for control of systems with friction.</strong>
IEEE Transactions on Automatic Control, Vol. 40, No. 3, pp. 419-425.<br><br></dd>
</dl>
</html>"),
Icon(coordinateSystem(preserveAspectRatio=true, extent={{-100,-100},{100,100}}),
graphics={
Polygon(
points={{-50,-50},{-10,-90},{-10,-100},{10,-100},{10,-90},{50,-50},{-50,-50}},
lineColor={95,95,95},
fillColor={131,175,131},
fillPattern=FillPattern.Solid),
Ellipse(
extent={{-48,-10},{-28,-30}},
lineColor={0,127,0},
fillPattern=FillPattern.Sphere,
fillColor={255,255,255}),
Ellipse(
extent={{-10,-10},{10,-30}},
lineColor={0,127,0},
fillPattern=FillPattern.Sphere,
fillColor={255,255,255}),
Ellipse(
extent={{30,-10},{50,-30}},
lineColor={0,127,0},
fillPattern=FillPattern.Sphere,
fillColor={255,255,255}),
Ellipse(
extent={{-50,30},{-30,10}},
lineColor={0,127,0},
fillPattern=FillPattern.Sphere,
fillColor={255,255,255}),
Ellipse(
extent={{-10,30},{10,10}},
lineColor={0,127,0},
fillPattern=FillPattern.Sphere,
fillColor={255,255,255}),
Ellipse(
extent={{30,30},{50,10}},
lineColor={0,127,0},
fillPattern=FillPattern.Sphere,
fillColor={255,255,255}),
Rectangle(
extent={{-90,10},{90,-10}},
lineColor={0,127,0},
fillColor={160,215,160},
fillPattern=FillPattern.Solid),
Text(
extent={{-150,100},{150,60}},
textString="%name",
textColor={0,0,255}),
Polygon(
points={{-60,30},{60,30},{60,20},{80,20},{80,50},{-80,50},{-80,20},{-60,20},{-60,30}},
lineColor={95,95,95},
fillPattern=FillPattern.Solid,
fillColor={131,175,131}),
Line(
visible=useHeatPort,
points={{-100,-100},{-100,-20},{0,-20}},
color={191,0,0},
pattern=LinePattern.Dot),
Polygon(
points={{-60,-30},{60,-30},{60,-20},{80,-20},{80,-50},{-80,-50},{-80,-20},{-60,-20},{-60,-30}},
lineColor={95,95,95},
fillPattern=FillPattern.Solid,
fillColor={131,175,131})}));
end SupportFriction;