-
Notifications
You must be signed in to change notification settings - Fork 466
/
Copy pathTestActuator.py
589 lines (485 loc) · 23.6 KB
/
TestActuator.py
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
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
# TestActuator.py
#
# Test the <actuator> flight control and regression test for the bug reported in
# FG issue 1503 (https://sourceforge.net/p/flightgear/codetickets/1503/)
#
# Copyright (c) 2014 Bertrand Coconnier
#
# This program is free software; you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free Software
# Foundation; either version 3 of the License, or (at your option) any later
# version.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
# details.
#
# You should have received a copy of the GNU General Public License along with
# this program; if not, see <http://www.gnu.org/licenses/>
#
# This test checks that:
# 1. JSBSim does not hang when the parameter 'sense' of actuator <rate_limit>
# is used.
# 2. The property 'fcs/left-aileron-pos-rad' remains equal to 0.0 during the
# execution of the script c1724.xml when <rate_limit> is read from a
# property.
# 3. The actuator output value is correctly driven by rate_limit.
import os, time, math
import xml.etree.ElementTree as et
from multiprocessing import Process
from scipy import stats
from JSBSim_utils import JSBSimTestCase, CreateFDM, CopyAircraftDef, RunTest
# This wrapper launcher is needed to handle limitations with the Windows version
# of the multiprocessing module since 'complex' objects can't be
# serialized/pickled
def SubProcessScriptExecution(sandbox, script_path):
fdm = CreateFDM(sandbox)
fdm.load_script(script_path)
fdm.run_ic()
while fdm.run():
pass
class TestActuator(JSBSimTestCase):
def setUp(self):
JSBSimTestCase.setUp(self)
self.script_path = self.sandbox.path_to_jsbsim_file('scripts',
'c1724.xml')
# Since we will alter the aircraft definition file, we need make a copy
# of it and of all the files it is refering to.
self.tree, self.aircraft_name, self.path_to_jsbsim_aircrafts = CopyAircraftDef(self.script_path, self.sandbox)
def ScriptExecution(self, fdm, time_limit=1E+9):
fdm.load_script(self.script_path)
fdm.run_ic()
while fdm.run() and fdm.get_sim_time() < time_limit:
aileron_pos = fdm['fcs/left-aileron-pos-rad']
self.assertEqual(aileron_pos, 0.0,
msg="Failed running the script %s at time step %f\nProperty fcs/left-aileron-pos-rad is non-zero (%f)" % (self.script_path, fdm.get_sim_time(), aileron_pos))
def CheckRateValue(self, fdm, rate_value):
aileron_course = []
t0 = fdm.get_sim_time()
while fdm.run() and fdm.get_sim_time() <= t0 + 1.0:
aileron_course += [(fdm.get_sim_time(), fdm[self.output_prop])]
# Thanks to a linear regression on the values, we can check that the
# value is following a slope equal to the rate limit. The correlation
# coefficient r_value is also checked to verify that the output is
# evolving linearly.
slope, intercept, r_value, p_value, std_err = stats.linregress(aileron_course)
self.assertTrue(abs(slope - rate_value) < 1E-9 and abs(1.0 - abs(r_value)) < 1E-9,
msg="The actuator rate is not linear")
def CheckRateLimit(self, incr_limit, decr_limit):
fdm = self.create_fdm()
fdm.set_aircraft_path('aircraft')
self.ScriptExecution(fdm, 1.0)
fdm[self.input_prop] = 1.0
self.CheckRateValue(fdm, incr_limit)
fdm[self.input_prop] = 0.0
self.CheckRateValue(fdm, decr_limit)
def test_regression_bug_1503(self):
# First, the execution time of the script c1724.xml is measured. It
# will be used as a reference to check if JSBSim hangs or not.
fdm = self.create_fdm()
start_time = time.time()
self.ScriptExecution(fdm)
exec_time = time.time() - start_time
# Delete the FDM instance to make sure that all files are closed and
# released before running the same script in another process.
del fdm
# Now the copy of the aircraft definition file will be altered: the
# <rate_limit> element is split in two: one with the 'decr' sense, the
# other with 'incr' sense.
actuator_element = self.tree.getroot().find('flight_control/channel/actuator//rate_limit/..')
rate_element = actuator_element.find('rate_limit')
rate_element.attrib['sense'] = 'decr'
new_rate_element = et.SubElement(actuator_element, 'rate_limit')
new_rate_element.attrib['sense'] = 'incr'
new_rate_element.text = str(float(rate_element.text) * 0.5)
self.tree.write(os.path.join('aircraft', self.aircraft_name,
self.aircraft_name+'.xml'))
# A new process is created that launches the script. We wait for 10
# times the reference execution time for the script completion. Beyond
# that time, if the process is not completed, it is terminated and the
# test is failed.
p = Process(target=SubProcessScriptExecution,
args=(self.sandbox, self.script_path))
p.start()
p.join(exec_time * 20.0) # Wait 20 times the reference time
alive = p.is_alive()
if alive:
p.terminate()
self.assertFalse(alive, msg="The script has hung")
def test_actuator_rate_from_property(self):
# Second part of the test.
# #######################
#
# The test is run again but this time, <rate_limit> will be read from a
# property instead of being read from a value hard coded in the
# aircraft definition file. It has been reported in the bug 1503 of
# FlightGear that for such a configuration the <actuator> output is
# constantly increasing even if the input is null. For this script the
# <actuator> output is stored in the property
# fcs/left-aileron-pos-rad. The function ScriptExecution will monitor
# that property and if it changes then the test is failed.
tree = et.parse(os.path.join(self.path_to_jsbsim_aircrafts,
self.aircraft_name+'.xml'))
root = tree.getroot()
flight_control_element = root.find('flight_control')
actuator_element = flight_control_element.find('channel/actuator//rate_limit/..')
rate_element = actuator_element.find('rate_limit')
property = et.SubElement(flight_control_element, 'property')
property.text = 'fcs/rate-limit-value'
property.attrib['value'] = rate_element.text
rate_element.attrib['sense'] = 'decr'
rate_element.text = property.text
new_rate_element = et.SubElement(actuator_element, 'rate_limit')
new_rate_element.attrib['sense'] = 'incr'
new_rate_element.text = rate_element.text
output_element = root.find('output')
output_element.attrib['name'] = 'test.csv'
tree.write(os.path.join('aircraft', self.aircraft_name,
self.aircraft_name+'.xml'))
fdm = self.create_fdm()
fdm.set_aircraft_path('aircraft')
self.ScriptExecution(fdm)
def prepare_actuator(self):
tree = et.parse(os.path.join(self.path_to_jsbsim_aircrafts,
self.aircraft_name+'.xml'))
flight_control_element = tree.getroot().find('flight_control')
actuator_element = flight_control_element.find('channel/actuator//rate_limit/..')
# Remove the hysteresis. We want to make sure we are measuring the
# rate_limit and just that.
hysteresis_element = actuator_element.find('hysteresis')
actuator_element.remove(hysteresis_element)
input_element = actuator_element.find('input')
self.input_prop = actuator_element.attrib['name'].split('-')
self.input_prop[-1] = 'input'
self.input_prop = '-'.join(self.input_prop)
input_element.text = self.input_prop
self.output_prop = actuator_element.find('output').text
property = et.SubElement(flight_control_element, 'property')
property.text = self.input_prop
property.attrib['value'] = '0.0'
return (tree, flight_control_element, actuator_element)
def test_actuator_rate_is_linear(self):
# Third part of the test.
########################
#
# The test is run again but this time we are checking that rate_limit
# drives the actuator output value as expected. The idea is to store
# the output value of the actuator output vs the time and check with a
# linear regression that
# 1. The actuator output value is evolving linearly
# 2. The slope of the actuator output is equal to the rate_limit value
# The test is run with the rate_limit given by a value, a property,
# different values of the ascending and descending rates and a number
# of combinations thereof.
# The aircraft file definition is modified such that the actuator
# element input is driven by a unique property. The name of this unique
# property is built in the variable 'input_prop' below. When setting
# that property to 1.0 (resp. -1.0) the ascending (resp. descending)
# rate is triggered.
tree, flight_control_element, actuator_element = self.prepare_actuator()
# Add the new properties to <flight_control> so that we can make
# reference to them without JSBSim complaining
property = et.SubElement(flight_control_element, 'property')
property.text = 'fcs/rate-limit-value'
property.attrib['value'] = '0.15'
property = et.SubElement(flight_control_element, 'property')
property.text = 'fcs/rate-limit-value2'
property.attrib['value'] = '0.05'
# First check with rate_limit set to 0.1
rate_element = actuator_element.find('rate_limit')
rate_element.text = '0.1'
output_file = os.path.join('aircraft', self.aircraft_name,
self.aircraft_name+'.xml')
tree.write(output_file)
self.CheckRateLimit(0.1, -0.1)
# Check when rate_limit is set by the property 'fcs/rate-limit-value'
tree = et.parse(output_file)
flight_control_element = tree.getroot().find('flight_control')
actuator_element = flight_control_element.find('channel/actuator//rate_limit/..')
rate_element = actuator_element.find('rate_limit')
rate_element.text = 'fcs/rate-limit-value'
tree.write(output_file)
self.CheckRateLimit(0.15, -0.15)
# Checking when the ascending and descending rates are different.
# First with the 2 rates set by hard coded values (0.1 and 0.2
# respectively)
rate_element.attrib['sense'] = 'decr'
rate_element.text = '0.1'
new_rate_element = et.SubElement(actuator_element, 'rate_limit')
new_rate_element.attrib['sense'] = 'incr'
new_rate_element.text = '0.2'
tree.write(output_file)
self.CheckRateLimit(0.2, -0.1)
# Check when the descending rate is set by a property and the ascending
# rate is set by a value.
rate_element.text = 'fcs/rate-limit-value'
tree.write(output_file)
self.CheckRateLimit(0.2, -0.15)
# Check when the ascending rate is set by a property and the descending
# rate is set by a value.
rate_element.text = '0.1'
new_rate_element.text = 'fcs/rate-limit-value'
tree.write(output_file)
self.CheckRateLimit(0.15, -0.1)
# Check when the ascending and descending rates are set by properties
rate_element.text = 'fcs/rate-limit-value2'
tree.write(output_file)
self.CheckRateLimit(0.15, -0.05)
def CheckClip(self, clipmin, clipmax, rate_limit):
fdm = self.create_fdm()
fdm.set_aircraft_path('aircraft')
fdm.load_script(self.script_path)
fdm.run_ic()
fdm[self.input_prop] = 2.0*clipmax
dt = clipmax/rate_limit
while fdm['simulation/sim-time-sec'] <= dt:
self.assertFalse(fdm[self.saturated_prop])
fdm.run()
self.assertTrue(fdm[self.saturated_prop])
self.assertAlmostEqual(fdm[self.output_prop], clipmax)
# Check that the actuator output can't go beyond clipmax
t = fdm['simulation/sim-time-sec']
while fdm['simulation/sim-time-sec'] <= t+dt:
fdm.run()
self.assertTrue(fdm[self.saturated_prop])
self.assertAlmostEqual(fdm[self.output_prop], clipmax)
fdm[self.input_prop] = 2.0*clipmin
dt = (2.0*clipmax-clipmin)/rate_limit
t = fdm['simulation/sim-time-sec']
while fdm['simulation/sim-time-sec'] <= t+dt:
if fdm[self.output_prop] < clipmax:
self.assertFalse(fdm[self.saturated_prop])
else:
self.assertTrue(fdm[self.saturated_prop])
fdm.run()
self.assertTrue(fdm[self.saturated_prop])
self.assertAlmostEqual(fdm[self.output_prop], clipmin)
# Check that the actuator output can't go below clipmin
t = fdm['simulation/sim-time-sec']
while fdm['simulation/sim-time-sec'] <= t+dt:
fdm.run()
self.assertTrue(fdm[self.saturated_prop])
self.assertAlmostEqual(fdm[self.output_prop], clipmin)
fdm[self.input_prop] = 1E-6
dt = (fdm[self.input_prop]-2.0*clipmin)/rate_limit
t = fdm['simulation/sim-time-sec']
while fdm['simulation/sim-time-sec'] <= t+2.0*dt:
if fdm[self.output_prop] > clipmin:
self.assertFalse(fdm[self.saturated_prop])
else:
self.assertTrue(fdm[self.saturated_prop])
fdm.run()
self.assertAlmostEqual(fdm[self.output_prop], fdm[self.input_prop])
fdm[self.fail_hardover] = 1.0
dt = (clipmax-fdm[self.input_prop])/rate_limit
t = fdm['simulation/sim-time-sec']
while fdm['simulation/sim-time-sec'] <= t+dt:
if fdm[self.output_prop] < clipmax:
self.assertFalse(fdm[self.saturated_prop])
else:
self.assertTrue(fdm[self.saturated_prop])
fdm.run()
self.assertTrue(fdm[self.saturated_prop])
self.assertAlmostEqual(fdm[self.output_prop], clipmax)
fdm[self.input_prop] = -1E-6
dt = (clipmax-clipmin)/rate_limit
t = fdm['simulation/sim-time-sec']
while fdm['simulation/sim-time-sec'] <= t+dt:
if fdm[self.output_prop] > clipmin and fdm[self.output_prop] < clipmax:
self.assertFalse(fdm[self.saturated_prop])
else:
self.assertTrue(fdm[self.saturated_prop])
fdm.run()
self.assertTrue(fdm[self.saturated_prop])
self.assertAlmostEqual(fdm[self.output_prop], clipmin)
def test_clipto(self):
tree, flight_control_element, actuator_element = self.prepare_actuator()
rate_limit = float(actuator_element.find('rate_limit').text)
self.saturated_prop = actuator_element.attrib['name']+"/saturated"
self.fail_hardover = actuator_element.attrib['name']+"/malfunction/fail_hardover"
clipto = actuator_element.find('clipto')
clipmax = clipto.find('max')
clipmin = clipto.find('min')
output_file = os.path.join('aircraft', self.aircraft_name,
self.aircraft_name+'.xml')
tree.write(output_file)
self.CheckClip(float(clipmin.text), float(clipmax.text), rate_limit)
property = et.SubElement(flight_control_element, 'property')
property.text = 'fcs/clip-min-value'
property.attrib['value'] = '-0.15'
property = et.SubElement(flight_control_element, 'property')
property.text = 'fcs/clip-max-value'
property.attrib['value'] = '0.05'
# Check a property for min and a value for max
clipmin.text = 'fcs/clip-min-value'
tree.write(output_file)
self.CheckClip(-0.15, float(clipmax.text), rate_limit)
# Check a property with minus sign for min and a value for max
clipmin.text = '-fcs/clip-max-value'
tree.write(output_file)
self.CheckClip(-0.05, float(clipmax.text), rate_limit)
# Check a property for max and a value for min
clipmin.text = '-0.1'
clipmax.text = 'fcs/clip-max-value'
tree.write(output_file)
self.CheckClip(-0.1, 0.05, rate_limit)
# Check a property with minus sign for max and a value for min
clipmax.text = '-fcs/clip-min-value'
tree.write(output_file)
self.CheckClip(-0.1, 0.15, rate_limit)
# Check a property for max and min
clipmin.text = '-fcs/clip-max-value'
clipmax.text = 'fcs/clip-max-value'
tree.write(output_file)
self.CheckClip(-0.05, 0.05, rate_limit)
# Check the cyclic clip
clipmin.text = str(-math.pi)
clipmax.text = str(math.pi)
clipto.attrib['type'] = 'cyclic'
tree.write(output_file)
fdm = self.create_fdm()
fdm.set_aircraft_path('aircraft')
fdm.load_script(self.script_path)
fdm.run_ic()
fdm[self.input_prop] = 2.0*math.pi
dt = math.pi/rate_limit
while fdm['simulation/sim-time-sec'] <= dt:
self.assertTrue(fdm[self.output_prop] <= math.pi)
self.assertTrue(fdm[self.output_prop] >= 0.0)
self.assertAlmostEqual(fdm[self.output_prop],
fdm['simulation/sim-time-sec']*rate_limit)
fdm.run()
while fdm['simulation/sim-time-sec'] <= 2.0*dt:
self.assertTrue(fdm[self.output_prop] >= -math.pi)
self.assertTrue(fdm[self.output_prop] <= 0.0)
self.assertAlmostEqual(fdm[self.output_prop],
fdm['simulation/sim-time-sec']*rate_limit-2.0*math.pi)
fdm.run()
# Check that the output value does not go beyond 0.0
self.assertAlmostEqual(fdm[self.output_prop], 0.0)
fdm.run()
self.assertAlmostEqual(fdm[self.output_prop], 0.0)
t = fdm['simulation/sim-time-sec']
fdm[self.input_prop] = -0.5*math.pi
while fdm['simulation/sim-time-sec'] <= t+dt:
self.assertTrue(fdm[self.output_prop] >= -math.pi)
self.assertTrue(fdm[self.output_prop] <= 0.0)
self.assertAlmostEqual(fdm[self.output_prop],
(t-fdm['simulation/sim-time-sec'])*rate_limit)
fdm.run()
while fdm['simulation/sim-time-sec'] <= t+1.5*dt:
self.assertTrue(fdm[self.output_prop] <= math.pi)
self.assertTrue(fdm[self.output_prop] >= -0.5*math.pi)
self.assertAlmostEqual(fdm[self.output_prop],
(t-fdm['simulation/sim-time-sec'])*rate_limit+2.0*math.pi)
fdm.run()
# Check the cyclic clip handles correctly negative numbers (GH issue
# #211)
# Case 1 : The interval is positive
clipmin.text = '0.0'
clipmax.text = str(math.pi)
tree.write(output_file)
fdm = self.create_fdm()
fdm.set_aircraft_path('aircraft')
fdm.load_script(self.script_path)
fdm.run_ic()
fdm[self.input_prop] = -2.0*math.pi
t0 = math.pi/rate_limit
t = fdm['simulation/sim-time-sec']
while t <= t0:
self.assertTrue(fdm[self.output_prop] <= math.pi)
self.assertTrue(fdm[self.output_prop] >= 0.0)
if t == 0:
self.assertAlmostEqual(fdm[self.output_prop], 0.0)
else:
self.assertAlmostEqual(fdm[self.output_prop],
math.pi-t*rate_limit)
fdm.run()
t = fdm['simulation/sim-time-sec']
while t <= 2.0*t0:
self.assertTrue(fdm[self.output_prop] <= math.pi)
self.assertTrue(fdm[self.output_prop] >= 0.0)
self.assertAlmostEqual(fdm[self.output_prop],
math.pi-(t-t0)*rate_limit)
fdm.run()
t = fdm['simulation/sim-time-sec']
# Case 2 : The interval is negative
clipmin.text = str(-math.pi)
clipmax.text = '0.0'
tree.write(output_file)
fdm = self.create_fdm()
fdm.set_aircraft_path('aircraft')
fdm.load_script(self.script_path)
fdm.run_ic()
fdm[self.input_prop] = math.pi
dt = math.pi/rate_limit
t = fdm['simulation/sim-time-sec']
while t <= dt:
self.assertAlmostEqual(fdm[self.output_prop],
t*rate_limit-math.pi)
self.assertTrue(fdm[self.output_prop] >= -math.pi-1E-8)
self.assertTrue(fdm[self.output_prop] <= 0.0)
fdm.run()
t = fdm['simulation/sim-time-sec']
t0 = t
fdm[self.input_prop] = -2.0*math.pi
fdm.run()
t = fdm['simulation/sim-time-sec']
while t <= t0+dt:
self.assertTrue(fdm[self.output_prop] >= -math.pi)
self.assertTrue(fdm[self.output_prop] <= 0.0)
self.assertAlmostEqual(fdm[self.output_prop],
(t0-t)*rate_limit)
fdm.run()
t = fdm['simulation/sim-time-sec']
t0 += dt
while t <= t0+dt:
self.assertTrue(fdm[self.output_prop] >= -math.pi)
self.assertTrue(fdm[self.output_prop] <= 0.0)
self.assertAlmostEqual(fdm[self.output_prop],
(t0-t)*rate_limit)
fdm.run()
t = fdm['simulation/sim-time-sec']
# Regression test for the bug reported in issue #200
# JSBSim crashes when "fail hardover" is set while no <clipto> element is
# specified.
def test_failhardover_without_clipto(self):
tree, flight_control_element, actuator_element = self.prepare_actuator()
rate_limit = float(actuator_element.find('rate_limit').text)
fail_hardover = actuator_element.attrib['name']+"/malfunction/fail_hardover"
clipto = actuator_element.find('clipto')
clipmax = float(clipto.find('max').text)
actuator_element.remove(clipto)
output_file = os.path.join('aircraft', self.aircraft_name,
self.aircraft_name+'.xml')
tree.write(output_file)
fdm = self.create_fdm()
fdm.set_aircraft_path('aircraft')
fdm.load_script(self.script_path)
fdm.run_ic()
# Displace the actuator in the maximum position.
fdm[self.input_prop] = clipmax
t = fdm['simulation/sim-time-sec']
dt = clipmax/rate_limit
while fdm['simulation/sim-time-sec'] <= t+dt:
fdm.run()
# Check the maximum position has been reached.
self.assertAlmostEqual(fdm[self.output_prop], clipmax)
# Trigger "fail hardover"
fdm[fail_hardover] = 1.0
t = fdm['simulation/sim-time-sec']
dt = clipmax/rate_limit
while fdm['simulation/sim-time-sec'] <= t+dt:
fdm.run()
# Check the actuator is failed in neutral position
self.assertAlmostEqual(fdm[self.output_prop], 0.0)
# Check that setting an input different from the neutral position does
# not result in a modification of the actuator position.
fdm[self.input_prop] = clipmax
t = fdm['simulation/sim-time-sec']
dt = clipmax/rate_limit
while fdm['simulation/sim-time-sec'] <= t+dt:
fdm.run()
self.assertAlmostEqual(fdm[self.output_prop], 0.0)
RunTest(TestActuator)