diff --git a/benchmarks/double_pendulum/Specifications.txt b/benchmarks/double_pendulum/Specifications.txt new file mode 100644 index 0000000..deac834 --- /dev/null +++ b/benchmarks/double_pendulum/Specifications.txt @@ -0,0 +1,12 @@ +Initial states: + +x1 = [0.6, 0.7] +x2 = [-0.7, -0.6] +x3 = [-0.4, -0.3] +x4 = [0.5, 0.6] + +t = 20 seconds + +Property: + +The system, states 1 to 3, always stays within the box x ∈ [-1,1] \ No newline at end of file diff --git a/benchmarks/double_pendulum/controller_double_pendulum_less_robust.h5 b/benchmarks/double_pendulum/controller_double_pendulum_less_robust.h5 new file mode 100644 index 0000000..0f30dc2 Binary files /dev/null and b/benchmarks/double_pendulum/controller_double_pendulum_less_robust.h5 differ diff --git a/benchmarks/double_pendulum/controller_double_pendulum_less_robust.mat b/benchmarks/double_pendulum/controller_double_pendulum_less_robust.mat new file mode 100644 index 0000000..2dca0ce Binary files /dev/null and b/benchmarks/double_pendulum/controller_double_pendulum_less_robust.mat differ diff --git a/benchmarks/double_pendulum/controller_double_pendulum_less_robust.nnet b/benchmarks/double_pendulum/controller_double_pendulum_less_robust.nnet new file mode 100644 index 0000000..8c22e5d --- /dev/null +++ b/benchmarks/double_pendulum/controller_double_pendulum_less_robust.nnet @@ -0,0 +1,114 @@ +// The contents of this file are licensed under the Creative Commons +// Attribution 4.0 International License: https://creativecommons.org/licenses/by/4.0/ +// Neural Network File Format by Kyle Julian, Stanford 2016 +3, 4, 2, 25 +4, 25, 25,2, 2 +0 +0 +0 +0 +0 +-0.34314, 0.17609, -0.32021, 0.27763 +-0.07520, 0.13272, 0.02095, 0.69984 +0.16026, 0.46490, 0.01967, 0.33188 +-0.36239, -0.06820, -0.65771, -0.00895 +-0.39231, 0.32117, 0.30141, -0.06219 +-0.19429, -0.45929, -0.35781, -0.14636 +-0.85548, 0.08778, -0.13307, 0.00979 +0.01552, -0.20127, -0.16800, -0.04828 +-0.36456, 0.42668, -0.59721, 0.64106 +0.33870, 0.03072, -0.11430, 0.01992 +-0.31140, 0.53856, -0.06437, -0.24278 +-0.45872, -0.04649, -0.43990, -0.20006 +-0.31810, 0.18750, 0.52345, -0.41329 +0.31108, -0.42147, 0.37144, -0.51386 +0.18804, 0.27937, 0.54554, 0.09850 +0.37332, 0.12850, 0.40752, -0.12706 +-0.03250, -0.26784, 0.24607, -0.62424 +-0.72702, -0.37828, -0.64471, -0.33567 +-0.38239, -0.50789, -0.06443, -0.40373 +0.47486, -0.50209, -0.25595, -0.10999 +0.70837, -0.09001, 0.46370, 0.12592 +0.23127, -0.16521, 0.70807, 0.26932 +0.27679, -0.01715, 0.06704, -0.17248 +-0.57733, 0.42936, -0.03145, 0.11692 +-0.00463, -0.25263, 0.54903, 0.04384 +0.09754 +-0.01656 +0.09881 +0.06605 +0.05203 +-0.09993 +-0.01834 +0.09175 +0.08020 +-0.08955 +-0.12360 +0.14693 +-0.05878 +-0.00368 +-0.08791 +-0.00161 +0.13250 +0.01848 +-0.01331 +-0.10540 +0.14037 +-0.02042 +-0.02188 +0.12500 +0.05550 +-0.13990, 0.08530, -0.07580, -0.17947, -0.09166, -0.12941, -0.19954, -0.32842, -0.00789, -0.30382, 0.21001, -0.34612, -0.25531, 0.13489, -0.30186, -0.24897, -0.01259, 0.26938, -0.34396, 0.30040, -0.32719, -0.31611, 0.20132, -0.17142, 0.17942 +0.10414, 0.36268, -0.22015, 0.31610, 0.06277, 0.22758, 0.26321, 0.19338, 0.15284, 0.35955, 0.29580, 0.25842, 0.06965, 0.32890, 0.24313, 0.14917, -0.06180, 0.34589, -0.00995, 0.35477, 0.02285, 0.29509, -0.33228, -0.18958, 0.22840 +0.07707, 0.21178, -0.12156, -0.20812, -0.33735, 0.30677, 0.02212, 0.06580, 0.19962, -0.21886, 0.11039, -0.33454, 0.02216, 0.11627, -0.11832, -0.34935, -0.15682, -0.34173, 0.03425, -0.15701, 0.08383, 0.24910, 0.22065, -0.06673, -0.20732 +-0.26475, 0.28247, -0.04656, 0.12314, -0.10742, -0.28359, 0.27177, 0.07172, -0.31683, -0.13758, 0.21134, 0.07240, -0.27968, -0.21969, 0.29993, -0.13754, -0.32276, 0.03628, 0.29513, -0.22904, 0.16103, -0.21238, -0.18582, -0.13775, -0.11817 +-0.41335, 0.11755, 0.00685, -0.01937, 0.07634, -0.00671, 0.12035, -0.21106, -0.27038, -0.13928, 0.15656, 0.09071, -0.21924, 0.19797, 0.21226, 0.05599, 0.08262, -0.34912, -0.09989, 0.28732, 0.08305, -0.16782, -0.00796, -0.35265, -0.20779 +0.46862, 0.08381, -0.11431, 0.21560, 0.20368, 0.22176, 0.31660, 0.26708, 0.14121, -0.18334, 0.35964, 0.31406, -0.15901, 0.19454, -0.07553, 0.24594, 0.31252, 0.23188, -0.06400, -0.06552, -0.41182, -0.21834, 0.09020, -0.21504, 0.25083 +-0.05087, 0.33949, 0.17689, 0.25375, 0.30473, -0.33590, 0.30612, -0.11056, 0.20815, 0.05360, -0.04703, 0.21325, 0.03037, -0.44658, 0.08162, -0.10619, -0.31959, 0.38092, -0.18907, 0.22181, 0.11582, -0.11084, -0.07112, 0.54859, -0.30153 +-0.31602, 0.23912, 0.10271, 0.24135, -0.14296, 0.19907, 0.18600, 0.17523, -0.24827, 0.08190, -0.26689, 0.05246, -0.05037, 0.66434, -0.35226, -0.24219, 0.03191, 0.24471, 0.28362, 0.02095, 0.51493, -0.20055, 0.11078, -0.36779, -0.27638 +0.24489, -0.13432, 0.15655, 0.39887, -0.10353, 0.12205, 0.41195, -0.05582, 0.25806, -0.11520, 0.08574, -0.17583, -0.32382, 0.24357, 0.45338, -0.29480, -0.13743, 0.39888, -0.27573, 0.66536, -0.01359, 0.26254, 0.11327, 0.15209, -0.12128 +0.22109, -0.23328, 0.06133, -0.02473, -0.26756, 0.10910, 0.22178, -0.07795, -0.15174, -0.23003, -0.28544, -0.30808, 0.13539, 0.08526, 0.07669, -0.19677, 0.02498, 0.09001, 0.01680, -0.30187, 0.23728, -0.02484, -0.17275, 0.10248, -0.09233 +-0.07267, 0.09345, 0.09862, 0.24127, 0.42726, -0.02881, 0.13040, 0.12125, 0.07382, 0.26964, -0.10030, -0.25075, -0.25257, -0.31375, 0.28040, 0.26852, -0.38188, 0.01970, -0.41232, 0.35937, 0.45844, 0.31991, 0.32157, 0.09309, 0.28926 +-0.07197, -0.34943, 0.07236, 0.19066, -0.03455, 0.41234, 0.01988, 0.23982, 0.03861, -0.22367, 0.14019, 0.43808, 0.41920, 0.24421, 0.29367, -0.36082, -0.01164, -0.21647, 0.18968, 0.06460, -0.12903, -0.31665, -0.26997, -0.05307, 0.17964 +0.12286, 0.07585, -0.28470, 0.10228, -0.16822, -0.20227, 0.18123, -0.31381, -0.14590, -0.32637, -0.14639, -0.10526, 0.22582, -0.02194, -0.32314, 0.18336, -0.12334, -0.12625, 0.21606, -0.00902, -0.08088, -0.02792, 0.02491, 0.10739, 0.11624 +-0.32515, -0.30913, 0.09555, -0.11864, -0.18048, 0.05781, -0.34173, -0.12314, -0.17653, -0.18551, -0.02490, -0.01314, 0.04877, -0.18012, -0.05447, -0.23263, 0.00801, -0.22364, -0.31650, 0.24381, 0.18492, -0.32716, -0.23455, 0.04467, -0.07684 +-0.09914, 0.29147, 0.37402, -0.28913, 0.22796, 0.03862, 0.18679, 0.08818, -0.18345, -0.19605, 0.40524, -0.53158, 0.08398, 0.05408, 0.34567, -0.02722, 0.03307, 0.03742, 0.26849, -0.19754, 0.80640, -0.22246, 0.08045, -0.12965, 0.08886 +0.16507, -0.12553, -0.27519, -0.05230, -0.01331, -0.32772, -0.26605, -0.21892, -0.00590, -0.11393, -0.27020, 0.09073, -0.33199, 0.26065, 0.14828, -0.17959, -0.14179, -0.19826, 0.11478, 0.23010, -0.29593, 0.08710, -0.08353, 0.26943, 0.19547 +-0.39706, -0.32863, 0.26147, 0.13659, -0.12645, 0.34315, 0.12280, 0.03970, 0.12854, -0.17061, 0.40314, -0.50303, 0.31335, 0.56936, 0.23424, 0.36732, -0.00861, 0.31636, -0.41258, 0.29539, 0.15635, 0.32055, 0.17688, -0.07874, -0.07607 +0.17830, 0.50576, -0.00219, -0.02187, 0.54048, 0.21210, 0.12010, -0.89069, 0.25314, -0.18552, 0.43176, 0.01515, 0.36268, 0.23598, -0.04723, -0.03223, -0.43737, -0.22217, 0.22514, -0.09331, -0.44471, -0.07328, 0.40528, -0.08322, 0.30582 +-0.41634, 0.20488, 0.09347, -0.14702, 0.20131, 0.17010, 0.10194, -0.23052, -0.16651, -0.03277, -0.53742, -0.34469, -0.22605, -0.26640, -0.03174, 0.26550, 0.13492, -0.11540, -0.18259, -0.23656, 0.18639, -0.04249, -0.28048, -0.15205, 0.19924 +0.60146, -0.97561, 0.27350, 0.44028, 0.69020, 0.21074, -0.85001, -0.03056, 0.31048, 0.19397, 0.08901, -0.47141, -0.30156, 1.20018, 0.02762, -0.15480, -0.84272, -0.46534, 0.38680, -0.40176, 0.14407, -0.26292, 0.01869, 0.31262, 0.00186 +0.08348, 0.25760, -0.15483, 0.25492, -0.25399, 0.20356, 0.19562, -0.28534, -0.20354, -0.05014, -0.28905, -0.02286, 0.27616, 0.21015, 0.29657, 0.00113, -0.01728, -0.21134, -0.19627, -0.12894, 0.12197, -0.26466, 0.21721, -0.07927, 0.00136 +0.17269, 0.04854, 0.36637, -0.07459, 0.05467, 0.04370, 0.19781, -0.10861, 0.20262, -0.14750, 0.31682, -0.08255, -0.29711, 0.00738, -0.20903, 0.23996, -0.29214, 0.44493, -0.56597, 0.57447, 0.09196, 0.21034, -0.15153, -0.00739, 0.11432 +-0.12845, -0.15137, -0.25738, -0.11709, -0.06374, 0.16646, 0.31491, 0.34943, 0.21314, -0.03750, 0.42559, 0.09106, 0.09550, 0.34273, 0.18100, 0.18193, 0.51308, -0.34563, 0.50668, 0.08080, -0.15891, -0.44428, 0.24326, -0.11659, 0.53261 +0.01695, 0.28416, 0.12605, 0.28749, -0.24388, 0.08076, -0.87717, -0.00764, 0.21450, -0.35381, 0.50366, -0.01004, 0.37737, -0.32448, 0.17998, 0.31461, 0.01655, -0.04981, -0.10623, -0.27180, -0.51313, -0.20920, -0.28292, 0.23051, -0.58139 +-0.09215, 0.33378, -0.18189, -0.31547, -0.32323, -0.33430, 0.22967, -0.03824, -0.18449, 0.28576, -0.02972, -0.07052, 0.27150, 0.09048, 0.25870, -0.28950, 0.03428, -0.21225, 0.05969, 0.06324, 0.13086, 0.21734, 0.28528, -0.14148, -0.08119 +-0.01967 +0.03559 +-0.02620 +-0.04567 +-0.07042 +0.07701 +0.04781 +0.05584 +-0.02797 +-0.06504 +0.06395 +0.03840 +-0.05675 +-0.09036 +0.09547 +-0.03947 +0.06525 +-0.03588 +-0.01433 +-0.03945 +-0.04918 +0.03391 +0.01596 +-0.04480 +-0.05115 +0.32572, 0.34553, 0.37909, -0.02378, 0.41530, 0.53754, 0.20562, -0.15415, 0.13422, -0.16312, -0.17649, 0.12461, -0.37714, 0.30123, -0.55484, -0.00138, -0.34006, -0.01835, -0.30119, 0.03982, 0.17807, -0.02361, -0.06747, -0.26130, 0.44117 +-0.20917, 0.36491, 0.11873, -0.01854, 0.40869, 0.41791, -0.45455, 0.50492, -0.32974, -0.41196, -0.24731, 0.15702, -0.29611, 0.40445, -0.09036, -0.10686, -0.38578, 0.43218, 0.11577, -0.55330, -0.04459, -0.46964, 0.16472, 0.33468, -0.09867 +-0.07319 +-0.02503 diff --git a/benchmarks/double_pendulum/controller_double_pendulum_less_robust.onnx b/benchmarks/double_pendulum/controller_double_pendulum_less_robust.onnx new file mode 100644 index 0000000..2eec231 Binary files /dev/null and b/benchmarks/double_pendulum/controller_double_pendulum_less_robust.onnx differ diff --git a/benchmarks/double_pendulum/controller_double_pendulum_more_robust.h5 b/benchmarks/double_pendulum/controller_double_pendulum_more_robust.h5 new file mode 100755 index 0000000..c2a97e4 Binary files /dev/null and b/benchmarks/double_pendulum/controller_double_pendulum_more_robust.h5 differ diff --git a/benchmarks/double_pendulum/controller_double_pendulum_more_robust.mat b/benchmarks/double_pendulum/controller_double_pendulum_more_robust.mat new file mode 100644 index 0000000..7f753eb Binary files /dev/null and b/benchmarks/double_pendulum/controller_double_pendulum_more_robust.mat differ diff --git a/benchmarks/double_pendulum/controller_double_pendulum_more_robust.nnet b/benchmarks/double_pendulum/controller_double_pendulum_more_robust.nnet new file mode 100644 index 0000000..fe64b2d --- /dev/null +++ b/benchmarks/double_pendulum/controller_double_pendulum_more_robust.nnet @@ -0,0 +1,114 @@ +// The contents of this file are licensed under the Creative Commons +// Attribution 4.0 International License: https://creativecommons.org/licenses/by/4.0/ +// Neural Network File Format by Kyle Julian, Stanford 2016 +3, 4, 2, 25 +4, 25, 25,2, 2 +0 +0 +0 +0 +0 +-0.65322, 0.56348, 0.11143, 0.43745 +-0.13917, -0.27471, -0.30453, -0.37446 +-0.81573, -0.80161, -0.06326, -0.08245 +0.21058, -2.07283, -0.04141, 0.45586 +-0.13611, -1.27570, -0.72408, 0.38146 +-1.45124, 0.44155, -0.43696, -0.15128 +0.95641, 0.78721, 0.13760, 0.34908 +0.00496, 0.81414, -0.27889, 0.39849 +0.75806, -1.56297, 0.10996, 0.11835 +-0.47206, -0.67700, -0.04122, 0.11931 +-1.22877, 0.94453, -0.24356, 0.10125 +0.86699, 0.12439, 0.34558, -0.22081 +-0.17207, -0.45277, 0.17072, -0.01408 +0.85946, -0.33742, 0.16125, 0.24754 +0.20474, -0.20941, -0.34172, -0.78301 +0.09495, -0.52044, 0.03385, 0.01021 +0.21600, -2.71416, -0.48748, -0.16733 +0.36326, -0.14624, 0.51307, -0.34693 +-0.38633, 0.40642, -0.10367, 1.32220 +-0.78796, -0.61202, -0.78609, -0.40472 +-0.36848, 0.09991, -0.08277, 0.13028 +-1.80681, 0.40541, -0.06432, -0.42338 +-0.26881, 0.15618, -0.70180, 0.56059 +1.94409, -1.86877, 0.32473, -0.30235 +1.20329, 0.44238, 0.13065, 0.11360 +0.07033 +1.23292 +1.21009 +0.81374 +-0.00478 +0.55039 +0.11128 +-0.09827 +-0.11808 +-0.36569 +-0.13560 +-0.36352 +-0.55360 +-1.31334 +-0.00413 +-0.31611 +0.13549 +0.19501 +-3.37608 +-0.12817 +-0.98037 +0.57819 +0.00285 +0.18375 +-0.62401 +-0.10258, -0.24838, -1.19408, 0.32203, -0.05487, -0.92653, 0.86263, -0.34522, 0.37473, 0.18312, -0.28196, 0.46491, -0.05792, -0.51639, -0.37231, -0.08184, -0.59525, 0.46965, -2.34504, 0.08800, 0.08161, 0.70005, -0.57812, -0.18592, 0.08441 +0.11913, -0.30372, -0.38501, 0.00399, 0.18771, -0.31573, -0.00110, -0.27918, -0.15205, -0.36622, -0.34478, 0.01238, -0.01444, 0.22477, 0.02308, -0.28371, 0.12537, -0.27683, 0.11467, 0.17533, 0.07332, -0.06274, -0.50956, -0.37021, 0.09153 +0.13345, -1.02695, -0.60796, -0.48779, -0.09040, 0.32463, -0.18559, -0.49684, -0.09698, -0.48191, -0.14445, -0.14695, 0.00575, -0.60529, -1.92049, -0.00228, -0.00665, -0.17871, -0.60232, -1.02675, -0.64732, -0.28146, -0.58657, -0.23959, -0.48865 +0.01874, 0.44423, 0.82098, -1.17922, 0.49353, 0.24924, -2.38860, -0.70643, 0.85253, 0.90542, 0.09119, -1.82342, 0.12007, -2.20346, 0.18377, -0.58466, 0.73521, -2.94466, -0.10003, 0.31910, -0.25398, -0.11769, -0.27998, 1.04429, -0.06584 +-0.09429, -0.13609, -0.08970, -0.52234, -0.12376, 0.03936, -0.23261, -0.15374, 0.01591, -0.05066, -0.16494, -0.26554, -0.06158, -0.06600, -0.00807, -0.16622, 0.00069, -0.06297, 0.39606, 0.16923, 0.17001, -0.40184, -0.21567, -0.01716, -0.01037 +1.50692, 0.21002, 1.66018, -0.79581, -0.14218, -0.33676, -0.86673, -0.61859, -2.54826, -0.83174, -5.34671, 0.39820, -0.04647, -0.11518, -0.83719, -0.25680, -2.00469, 0.71612, -0.19096, 0.97420, 0.95074, -0.92811, 0.68882, -2.39253, -0.71064 +-0.22415, 0.36144, -0.61142, 1.10224, -0.62317, 0.39586, -0.12116, -0.13050, 0.67693, 0.27519, 0.01433, -0.14649, 0.12094, -0.32695, -0.46181, 0.22183, 0.49116, -0.18330, -2.56542, 0.46022, -0.68973, 0.22690, 0.90301, -4.52128, -0.78871 +-0.13072, 0.31100, -1.65376, 0.42190, -0.10171, -0.44904, 0.22040, -1.44225, 0.28832, -0.26414, -1.07839, 0.01344, -0.33907, 0.12853, -0.30538, 0.18388, 0.04150, 0.27614, -0.71068, 0.98080, 0.10122, 0.28402, -0.30887, 0.45367, 0.02276 +0.44243, -3.14085, -1.00792, -1.64035, -0.57196, 0.70977, -0.04364, 0.35542, -0.45214, 0.01858, -0.30203, -0.16895, -0.35156, -0.30185, -1.36758, -0.13432, -1.53669, -0.43220, -1.17065, -1.05830, 0.15805, -0.44248, 0.32166, -1.38840, -0.51585 +-0.06042, -0.82768, 0.14040, -0.35379, -0.73813, 0.30596, -0.23918, 0.01284, -0.03455, -0.05977, -0.02289, -0.33908, 0.30991, -0.30571, -0.60105, -0.44386, 0.47264, -0.14649, -0.18889, 0.07189, -0.04780, -0.44592, -0.02213, -0.29868, -0.63757 +-0.14465, -0.45745, 0.98664, 0.05460, -0.54437, 1.17963, -0.69142, 0.44400, 0.20395, 0.53503, 0.59665, 0.95762, -0.09328, -0.78789, -0.08197, 0.01991, 1.13401, -0.32030, -0.26038, -0.13281, 0.26937, 0.26095, 0.53538, -0.67864, -0.36865 +-0.85727, 0.04966, 1.06689, 1.07668, -2.28115, -0.80987, 0.69224, 0.12433, -0.05185, 0.38244, -1.26043, -1.77280, -0.10070, -0.49995, -3.48264, 0.07201, -0.96433, -0.45720, -1.36092, -0.47070, -0.24438, -3.25391, -0.39299, -0.33304, -2.36933 +-0.21887, 0.12422, 0.65631, -0.06790, -1.51352, 0.19748, -0.15295, -0.07982, -0.18454, 0.06807, 0.00194, 0.50918, 0.46406, -0.67403, 0.70725, -0.27031, 0.61656, 0.12395, -2.60219, 0.39315, -0.05876, -0.22454, 0.41305, 0.26357, 0.21876 +0.34353, -0.69204, -1.01317, 1.16088, -0.15296, 0.19572, 0.31871, -0.09880, 0.41669, 0.21245, 0.33126, -0.03954, 0.01912, -0.02893, -0.11736, -0.10957, -4.02221, 0.16098, -1.97271, -0.72897, -0.30088, 0.20797, -0.64680, -0.26514, -0.13745 +0.20932, -1.04805, -1.12594, 0.17715, -0.37883, 0.24644, 0.57313, 0.48387, 0.21196, -0.38845, 0.16813, 0.12520, 0.23653, -0.56489, -0.43061, 0.01530, 0.01580, 0.09411, -3.10294, 0.40568, -0.10210, -0.27435, 0.42305, -0.06985, 0.16884 +-0.30473, 0.21065, 0.01190, 0.34130, 0.10153, -0.08743, -0.33133, 0.46656, -0.78213, 0.25482, 0.24082, -0.40954, 0.42671, -0.30212, 0.54068, 0.18825, 0.76677, 0.02483, 1.24235, 1.18777, -0.20882, -0.24504, 0.25614, 0.30210, -0.04524 +-0.50037, 0.23183, -0.81721, -0.44236, -0.29616, 0.18930, 0.19507, 0.47877, 0.83626, -0.18407, 0.12554, -0.47511, -0.10945, -0.19676, -0.28800, 0.14655, 0.18152, 0.00434, -1.84949, -0.28260, -0.23544, 0.91323, 0.45166, -1.02891, -0.17245 +-0.28327, 0.47691, 0.07065, -0.13697, -1.62073, -2.37556, 0.08533, -2.05948, -0.13328, -0.16982, -3.06072, -0.07632, 0.20134, 0.05375, -0.27505, 0.11381, -0.03724, 0.11220, -0.70603, -0.41312, 0.16816, -0.50219, -1.26019, -0.10327, -0.04227 +-0.41049, 0.15427, 0.00032, -0.71942, 0.25287, 0.20222, 0.01543, -0.76094, 1.03927, -0.42290, -0.21527, 0.48299, -0.34531, -1.42728, -0.37652, -0.42724, -0.00475, 0.70103, -2.08565, 0.12043, -0.10700, 0.69257, -0.18982, 0.32744, 0.06271 +-0.24657, -0.51702, -0.27771, -0.29991, -0.07707, -0.29422, -0.08720, -0.02487, -0.22748, -0.13818, -0.40504, -0.45884, 0.11483, -0.33570, -0.22799, 0.20092, -0.05981, -0.34365, -0.16645, -0.02094, -0.11956, 0.02993, -0.16749, -0.66520, -0.25281 +-1.62424, -0.01840, 0.59613, 0.01490, -0.80382, -0.40125, 0.91099, 0.61385, -1.20548, 0.08330, -3.05664, 0.31239, 0.36655, -1.18631, -0.32099, 0.04752, -0.62988, 0.09901, -0.73648, -0.59059, -0.55973, -0.43839, 1.32010, -4.23443, -6.35789 +0.07545, -0.10929, 0.01518, -0.19422, 0.13895, -0.16240, 0.00401, -0.04128, -0.25825, 0.21767, -0.45609, -0.41618, 0.23268, -0.04028, -0.49908, -0.32281, -0.08444, -0.40350, -0.29310, 0.06335, -0.35127, -0.15158, -0.43069, -0.49163, -0.48867 +0.39731, -0.54158, 0.73436, 0.77265, 1.52259, -0.79840, -0.40407, -4.12586, 0.36628, -0.42734, -0.48351, 0.53854, -0.01711, 1.01980, -0.13239, 0.22649, 0.49514, 1.09312, -1.15227, 0.26544, -0.17143, 0.23938, -1.25938, -0.06842, -0.24547 +-1.43038, 0.76075, -0.23818, 1.01672, 0.20675, -1.18741, 0.20272, -0.52338, -0.14747, -0.10802, 0.21426, -0.27463, 0.04986, -0.52692, -1.07034, -0.09160, -2.80514, -0.55144, -1.69579, -0.94322, -0.24468, -3.21814, -0.47197, -0.20468, -0.33145 +0.07029, -0.65586, 0.03391, 0.72134, 0.00240, 0.93639, -1.03944, 0.23261, 0.13435, -0.21882, -0.02579, -1.29813, -0.16605, -0.71788, -0.90025, 0.19813, -1.17859, -0.02102, -2.97173, 0.21008, -0.19900, 0.54103, 0.49366, -2.20122, -0.64250 +1.52000 +-0.30138 +0.29734 +0.15226 +-0.12107 +0.29952 +1.25426 +1.11472 +1.52959 +-0.20106 +-0.97487 +0.37101 +0.49843 +1.32355 +1.43992 +0.50424 +1.15586 +0.70909 +1.07831 +-0.21624 +0.79257 +-0.53454 +-0.26614 +1.45261 +-0.46211 +-0.48293, 0.06047, 0.02364, 0.38088, -0.32111, -0.47931, 0.31789, -0.30592, -0.11011, 0.11669, -0.09016, 2.27401, 0.04796, -0.34591, -0.25153, 0.31471, 0.47863, 0.00886, -0.18144, -0.36906, 1.22824, 0.00766, 0.22091, 0.47157, 0.76725 +-0.15094, -0.03531, 0.01539, 0.27162, -0.27052, -0.58085, 0.28679, -0.03020, -0.52610, -0.21955, -0.34578, 1.06163, 0.24263, -0.23639, -0.68732, 0.17131, -0.17235, 0.49812, 0.37649, 0.28723, 1.14548, 0.17161, 0.32568, 0.11248, 0.14659 +-1.05854 +-1.33805 diff --git a/benchmarks/double_pendulum/controller_double_pendulum_more_robust.onnx b/benchmarks/double_pendulum/controller_double_pendulum_more_robust.onnx new file mode 100644 index 0000000..6fc3d4b Binary files /dev/null and b/benchmarks/double_pendulum/controller_double_pendulum_more_robust.onnx differ diff --git a/benchmarks/double_pendulum/double_pendulum_solver.m b/benchmarks/double_pendulum/double_pendulum_solver.m new file mode 100644 index 0000000..8c97aa8 --- /dev/null +++ b/benchmarks/double_pendulum/double_pendulum_solver.m @@ -0,0 +1,26 @@ +syms x1 x2 th1 th2 u1 u2 g mass l c T1 T2 'real' + +ex1 = 2 * x1 + x2 * cos(th2 - th1) - u2 ^ 2 * sin(th2 - th1) + ... + - 2 * g / l * sin(th1) + (c * u1 - T1) / (mass * l ^ 2); + +ex2 = x1 * cos(th2 - th1) + x2 + u1 ^ 2 * sin(th2 - th1) + ... + - g / l * sin(th2) + (c * u2 - T2) / (mass * l ^ 2); + +x1s = solve(ex1, x1); +ex2s = subs(ex2, x1, x1s); +x2ss = solve(ex2s, x2); +x1ss = subs(x1s, x2, x2ss); + +x1ss_sub = subs(x1ss, [mass, g, l, c], [0.5, 1, 0.5, 0]); +%x1ss_sub = subs(x1ss, [mass, g, l, c], [1, 1, 1, 0]); +disp(x1ss_sub); +disp(simplify(x1ss_sub)) + + +x2ss_sub = subs(x2ss, [mass, g, l, c], [0.5,1,0.5, 0]); +%x2ss_sub = subs(x2ss, [mass, g, l, c], [1,1,1, 0]); +disp(x2ss_sub); +disp(simplify(x2ss_sub)) + +% fprintMatPy('du1', {'th1', 'th2', 'u1', 'u2', 'g', 'mass', 'l', 'c', 'T1', 'T2'}, x1ss); +% fprintMatPy('du2', {'th1', 'th2', 'u1', 'u2', 'g', 'mass', 'l', 'c', 'T1', 'T2'}, x2ss); diff --git a/benchmarks/double_pendulum/dynamics.m b/benchmarks/double_pendulum/dynamics.m new file mode 100644 index 0000000..e73f643 --- /dev/null +++ b/benchmarks/double_pendulum/dynamics.m @@ -0,0 +1,20 @@ +function [dx] = dynamics(t,x,T) +% Ex_double pendulum +% constants as per the documentation m=0.5, L=0.5, c= 0, g=1.0 +% description of the pararameters in these equations can be found here +% https://github.com/amaleki2/benchmark_closedloop_verification/blob/master/AINNC_benchmark.pdf +% Equations with different parameters of m, L, c,g, can be found in +% double_pendulum_solver + + + +th1 = x(1); +th2 = x(2); +T1 = T(1); +T2 = T(2); + +dx(1,1) = x(3); +dx(2,1) = x(4); +dx(3,1) = 4*T1 + 2*sin(th1) - (u2^2*sin(th1 - th2))/2 + (cos(th1 - th2)*(sin(th1 - th2)*u1^2 + 8*T2 + 2*sin(th2) - cos(th1 - th2)*(- (sin(th1 - th2)*u2^2)/2 + 4*T1 + 2*sin(th1))))/(2*(cos(th1 - th2)^2/2 - 1)); +dx(4,1) = -(sin(th1 - th2)*u1^2 + 8*T2 + 2*sin(th2) - cos(th1 - th2)*(- (sin(th1 - th2)*u2^2)/2 + 4*T1 + 2*sin(th1)))/(cos(th1 - th2)^2/2 - 1); +end \ No newline at end of file