-
Notifications
You must be signed in to change notification settings - Fork 471
/
Copy pathrotor_control.xml
452 lines (383 loc) · 14.6 KB
/
rotor_control.xml
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
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
<system name="rotor control">
<!-- =========================================================================
=================
Documentation
=================
- Rationale -
Besides the rotor definition which is handled by the C++ code - obviously
the most important part of a helicopter model - a good control setup is
actually more important than the remaining aerodynamics (assuming the
given/guessed coefficients are at least within a 50% window).
The basic relation is straight forward:
rotor-ctrl-x = pilot-input-x * gain + offset.
- Collective Mixing -
Unless real-world data is available, it's reasonable to adjust gain and
offset for minimal input travel as a first step. This simple approach has
a drawback. When one input is changed, the other three need to be
readjusted. This is most notably when the collective input is changed, and
to compensate for this, some part of the collective input is mixed into
the lateral and yaw channels.
There are two principal goals of collective-mixing:
a) compensation in level flight - lateral, and anti-torque controls
follow accordingly, minimizing input requirements.
b) compensation for the torque change - lateral, and anti-torque changes
should give proper counter moments.
Both tasks can't be fullfilled with simple contol mixing, the compromise in
this system is biased towards dynamic compensation of the collective input.
- Input Mapping -
The system also provides configurable support for simulator inputs.
Collective input can be turned more sensitve for the intermediate control
range (fcs/adj/collective-profile), and the other inputs use a common
'power function' approach for center sensitivity (fcs/adj/center-sensitivity).
These features might be also present as part of an advanced joystick
configuration, so it's your choice which one to use.
- Notes -
All adjustable control parameters can be found under 'JSBSIMNODE/fcs/adj/'.
If the model is run with flightgear, it's relatively easy to optimize the
parameters via the property tree browser.
An enabled AFCS/SAS should be able to ease control a lot, and AFAIK all
larger and all modern helicopters rely on such systems. There is also a
(!really serious!) alternative for a 'fully augmented' helicopter - just
use flightgears' UFO fdm and stop bothering about the stuff above ;).
- - - - - - - - - - - - - - - - -
===============================
System Interface/Properties
===============================
Inputs by the pilot:
fcs/collective-cmd-norm (often called 'pitch' in germany - a brilliant convention...)
fcs/elevator-cmd-norm (longitudinal)
fcs/aileron-cmd-norm (lateral)
fcs/rudder-cmd-norm (anti-torque, tail-collective)
Trim inputs/settings:
fcs/collective-trim-cmd-norm
fcs/pitch-trim-cmd-norm
fcs/roll-trim-cmd-norm
fcs/yaw-trim-cmd-norm
Inputs from AFCS/SAS system:
ap/collective-cmd
ap/elevator-cmd
ap/aileron-cmd
ap/rudder-cmd
Adjustable properties:
fcs/adj/collective-gain
fcs/adj/collective-bias
fcs/adj/longitudinal-gain
fcs/adj/longitudinal-bias
fcs/adj/lateral-gain
fcs/adj/lateral-bias
fcs/adj/lateral-col-mix-infl
fcs/adj/lateral-col-mix-gain
fcs/adj/lateral-col-mix-bias
fcs/adj/pedal-gain
fcs/adj/pedal-bias
fcs/adj/pedal-col-mix-infl
fcs/adj/pedal-col-mix-gain
fcs/adj/pedal-col-mix-bias
Simulator 'mapping' properties:
fcs/adj/collective-profile
fcs/adj/center-sensitivity
Outputs for a decent helicopter (ie: big main rotor, smaller tail rotor for
anti-torque):
propulsion/engine/collective-ctrl-rad
propulsion/engine/longitudinal-ctrl-rad
propulsion/engine/lateral-ctrl-rad
propulsion/engine[1]/antitorque-ctrl-rad
========================================================================= -->
<!-- ==================================
Declare and initialise control
================================== -->
<property value="0.0"> fcs/collective-cmd-norm </property>
<property value="0.0"> fcs/collective-trim-cmd-norm </property>
<!-- ==================================
Setup for interactive use
================================== -->
<!--
Collective input, provide more 'bits' for the intermediate range, 0 for
unmodified input, 1 for more sensitivity.
-->
<property value="1.0"> fcs/adj/collective-profile </property>
<!--
Higher center resolution for the other three controls, set to 1 for
unmodified input, treat 2 as an upper limit.
-->
<property value="1.5"> fcs/adj/center-sensitivity </property>
<!-- - - - - - - - - - - - - - - - - -
math helper
- - - - - - - - - - - - - - - - - -->
<channel name="collective control profile">
<fcs_function name="fcs/misc/collective-cmd-norm-polymod">
<description>
A s-shaped profile, described with a 5th order polynomial.
f(x) = x**5 + x | [-1:1], mapped to [0:1]x[0:1], resulting in
f(x) = 8*x**5 - 20*x**4 + 20*x**3 - 10*x**2 + 3*x.
Well, the latter is way too mean to be coded as a function.
</description>
<function>
<table>
<independentVar lookup="row"> fcs/collective-cmd-norm </independentVar>
<tableData>
0.000000 0.000000
0.050000 0.127377
0.100000 0.218080
0.150000 0.282983
0.200000 0.330560
0.250000 0.367188
0.300000 0.397440
0.350000 0.424393
0.400000 0.449920
0.450000 0.474997
0.500000 0.500000
0.550000 0.525002
0.600000 0.550080
0.650000 0.575608
0.700000 0.602560
0.750000 0.632813
0.800000 0.669440
0.850000 0.717018
0.900000 0.781920
0.950000 0.872623
1.000000 1.000000
</tableData>
</table>
</function>
</fcs_function>
</channel>
<!-- ==================================
Rotor Control System
================================== -->
<!-- - - - - - - - - - - - - - - - - -
collective
- - - - - - - - - - - - - - - - - -->
<property value='0.22'> fcs/adj/collective-gain </property>
<property value='0.14'> fcs/adj/collective-bias </property>
<channel name="collective">
<fcs_function name="fcs/collective-cmd-norm-variant">
<function>
<sum>
<!-- regular collective input if 'collective-profile' is 0 -->
<product>
<property> fcs/collective-cmd-norm </property>
<difference>
<value> 1.0 </value>
<property> fcs/adj/collective-profile </property>
</difference>
</product>
<!-- mapped input if 'collective-profile' is 1 -->
<product>
<property> fcs/adj/collective-profile </property>
<property> fcs/misc/collective-cmd-norm-polymod </property>
</product>
</sum>
</function>
</fcs_function>
<summer name="fcs/collective-cmd-trim-sum">
<input> fcs/collective-cmd-norm-variant </input>
<input> fcs/collective-trim-cmd-norm </input>
<clipto>
<min> -1.0 </min>
<max> 1.0 </max>
</clipto>
</summer>
<pure_gain name="fcs/collective-gain">
<input> fcs/collective-cmd-trim-sum </input>
<gain> fcs/adj/collective-gain </gain>
</pure_gain>
<summer name="fcs/collective-ctrl-rad">
<input> fcs/collective-gain </input>
<input> ap/collective-cmd </input>
<input> fcs/adj/collective-bias </input>
<output> fcs/collective-ctrl-rad </output>
</summer>
<lag_filter name="fcs/collective-ctrl-rad-lag">
<input> fcs/collective-ctrl-rad </input>
<!-- c1 ranges: 5.0 - 20.0 -->
<c1> 10.0 </c1>
<clipto>
<min> 0.0 </min>
<max> 0.7 </max>
</clipto>
<output> propulsion/engine/collective-ctrl-rad </output>
</lag_filter>
</channel>
<!-- - - - - - - - - - - - - - - - - -
longitudinal
- - - - - - - - - - - - - - - - - -->
<property value='0.125'> fcs/adj/longitudinal-gain </property>
<property value='0.020'> fcs/adj/longitudinal-bias </property>
<channel name="longitudinal">
<fcs_function name="fcs/elevator-cmd-norm-exmod">
<description>
Provide higher sensitivity when near center.
new_input = sgn(input) * abs(input)**sensitivity,
with sensitivity ranging between 1..2 .
</description>
<function>
<product>
<sign> <property> fcs/elevator-cmd-norm </property> </sign>
<pow>
<abs> <property> fcs/elevator-cmd-norm </property> </abs>
<property> fcs/adj/center-sensitivity </property>
</pow>
</product>
</function>
</fcs_function>
<summer name="fcs/longitudinal-cmd-trim-sum">
<input> fcs/elevator-cmd-norm-exmod </input>
<input> fcs/pitch-trim-cmd-norm </input>
<clipto>
<min> -1.0 </min>
<max> 1.0 </max>
</clipto>
</summer>
<pure_gain name="fcs/longitudinal-gain">
<input> fcs/longitudinal-cmd-trim-sum </input>
<gain> fcs/adj/longitudinal-gain </gain>
</pure_gain>
<summer name="fcs/longitudinal-ctrl-rad">
<input> fcs/longitudinal-gain </input>
<input> fcs/adj/longitudinal-bias </input>
<input> ap/elevator-cmd </input>
<clipto>
<min> -0.7 </min>
<max> 0.7 </max>
</clipto>
</summer>
<lag_filter name="fcs/longitudinal-ctrl-rad-lag">
<input> fcs/longitudinal-ctrl-rad </input>
<!-- c1 ranges: 10.0 - 50.0 -->
<c1> 20.0 </c1>
<output> propulsion/engine/longitudinal-ctrl-rad </output>
</lag_filter>
</channel>
<!-- - - - - - - - - - - - - - - - - -
lateral
- - - - - - - - - - - - - - - - - -->
<property value='0.05'> fcs/adj/lateral-gain </property>
<property value='0.00'> fcs/adj/lateral-bias </property>
<property value='1.00'> fcs/adj/lateral-col-mix-infl </property>
<property value='-0.1'> fcs/adj/lateral-col-mix-gain </property>
<property value='0.01'> fcs/adj/lateral-col-mix-bias </property>
<channel name="lateral">
<fcs_function name="fcs/aileron-cmd-norm-exmod">
<description> See longitudinal channel. </description>
<function>
<product>
<sign> <property> fcs/aileron-cmd-norm </property> </sign>
<pow>
<abs> <property> fcs/aileron-cmd-norm </property> </abs>
<property> fcs/adj/center-sensitivity </property>
</pow>
</product>
</function>
</fcs_function>
<summer name="fcs/lateral-cmd-trim-sum">
<input> fcs/aileron-cmd-norm-exmod </input>
<input> fcs/roll-trim-cmd-norm </input>
<clipto>
<min> -1.0 </min>
<max> 1.0 </max>
</clipto>
</summer>
<pure_gain name="fcs/lateral-gain">
<input> fcs/lateral-cmd-trim-sum </input>
<gain> fcs/adj/lateral-gain </gain>
</pure_gain>
<summer name="fcs/lateral-sum">
<input> fcs/lateral-gain </input>
<input> ap/aileron-cmd </input>
<input> fcs/adj/lateral-bias </input>
<clipto>
<min> -0.7 </min>
<max> 0.7 </max>
</clipto>
</summer>
<!-- collective compensation -->
<fcs_function name="fcs/lateral-ctrl-rad">
<function>
<sum>
<property> fcs/lateral-sum </property>
<product>
<property> fcs/adj/lateral-col-mix-infl </property>
<sum>
<product>
<property> fcs/collective-ctrl-rad </property>
<property> fcs/adj/lateral-col-mix-gain </property>
</product>
<property> fcs/adj/lateral-col-mix-bias </property>
</sum>
</product>
</sum>
</function>
</fcs_function>
<lag_filter name="fcs/lateral-ctrl-rad-lag">
<input> fcs/lateral-ctrl-rad </input>
<!-- c1 ranges: 10.0 - 50.0 -->
<c1> 20.0 </c1>
<output> propulsion/engine/lateral-ctrl-rad </output>
</lag_filter>
</channel>
<!-- - - - - - - - - - - - - - - - - -
pedal/antitorque
- - - - - - - - - - - - - - - - - -->
<property value='0.18'> fcs/adj/pedal-gain </property>
<property value='0.00'> fcs/adj/pedal-bias </property>
<property value='1.00'> fcs/adj/pedal-col-mix-infl </property>
<property value='0.65'> fcs/adj/pedal-col-mix-gain </property>
<property value='-0.1'> fcs/adj/pedal-col-mix-bias </property>
<channel name="pedal">
<fcs_function name="fcs/rudder-cmd-norm-exmod">
<description> See longitudinal channel. </description>
<function>
<product>
<sign> <property> fcs/rudder-cmd-norm </property> </sign>
<pow>
<abs> <property> fcs/rudder-cmd-norm </property> </abs>
<property> fcs/adj/center-sensitivity </property>
</pow>
</product>
</function>
</fcs_function>
<summer name="fcs/pedal-cmd-trim-sum">
<input> fcs/rudder-cmd-norm-exmod </input>
<input> fcs/yaw-trim-cmd-norm </input>
<clipto>
<min> -1.0 </min>
<max> 1.0 </max>
</clipto>
</summer>
<pure_gain name="fcs/pedal-gain">
<input> fcs/pedal-cmd-trim-sum </input>
<gain> fcs/adj/pedal-gain </gain>
</pure_gain>
<summer name="fcs/pedal-sum">
<input> fcs/pedal-gain </input>
<input> fcs/adj/pedal-bias </input>
<input> ap/rudder-cmd </input>
</summer>
<!-- collective compensation -->
<fcs_function name="fcs/pedal-ctrl-rad">
<function>
<sum>
<property> fcs/pedal-sum </property>
<product>
<property> fcs/adj/pedal-col-mix-infl </property>
<sum>
<product>
<property> fcs/collective-ctrl-rad </property>
<property> fcs/adj/pedal-col-mix-gain </property>
</product>
<property> fcs/adj/pedal-col-mix-bias </property>
</sum>
</product>
</sum>
</function>
</fcs_function>
<lag_filter name="fcs/pedal-ctrl-rad-lag">
<input> fcs/pedal-ctrl-rad </input>
<!-- c1 ranges: 10.0 - 50.0 -->
<c1> 20.0 </c1>
<!-- mind: tail rotor is on engine 1 -->
<output> propulsion/engine[1]/antitorque-ctrl-rad </output>
</lag_filter>
</channel>
</system>