Skip to content

Commit

Permalink
reformule
Browse files Browse the repository at this point in the history
  • Loading branch information
TienPoly committed May 15, 2019
1 parent deb24fb commit 720d2d5
Show file tree
Hide file tree
Showing 20 changed files with 761 additions and 924 deletions.
16 changes: 0 additions & 16 deletions cfg/controllerDyn.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -72,12 +72,6 @@ group4.add("ky", double_t, CONTROLLER_GAIN["value"],"k-y",
group4.add("kvy", double_t, CONTROLLER_GAIN["value"],"k-yd", -0.5505, -2.0, 0.0)
group4.add("kiy", double_t, CONTROLLER_GAIN["value"],"k-iy", -0.7657, -2.0, 0.0)

#group4.add("kx", double_t, CONTROLLER_GAIN["value"],"k-x", 1.6651, 0.0, 2.0)
#group4.add("kvx", double_t, CONTROLLER_GAIN["value"],"k-xd", 0.9236, 0.0, 2.0)
#group4.add("kix", double_t, CONTROLLER_GAIN["value"],"k-ix", 1.3486, 0.0, 2.0)
#group4.add("ky", double_t, CONTROLLER_GAIN["value"],"k-y", -1.5145, -2.0, 0.0)
#group4.add("kvy", double_t, CONTROLLER_GAIN["value"],"k-yd", -0.8551, -2.0, 0.0)
#group4.add("kiy", double_t, CONTROLLER_GAIN["value"],"k-iy", -1.1930, -2.0, 0.0)

group4.add("kphi", double_t, CONTROLLER_GAIN["value"],"k-phi", 1.7378, 0.0, 10.0)
group4.add("kp", double_t, CONTROLLER_GAIN["value"],"k-p", 0.3476, 0.0, 1.0)
Expand All @@ -92,14 +86,4 @@ group4.add("kpsi", double_t, CONTROLLER_GAIN["value"],"k-psi",
group4.add("kr", double_t, CONTROLLER_GAIN["value"],"k-p", 0.3130, 0.0, 0.5)
group4.add("kipsi", double_t, CONTROLLER_GAIN["value"],"k-ipsi", 0.3162, 0.0, 0.5)

#group4.add("kphi", double_t, CONTROLLER_GAIN["value"],"k-phi", 2.6042, 0.0, 10.0)
#group4.add("kp", double_t, CONTROLLER_GAIN["value"],"k-p", 0.4431, 0.0, 1.0)
#group4.add("kiphi", double_t, CONTROLLER_GAIN["value"],"k-iphi", 0.0, 0.0, 20.0)
#group4.add("ktheta", double_t, CONTROLLER_GAIN["value"],"k-theta", 2.8913 , 0.0, 10.0)
#group4.add("kq", double_t, CONTROLLER_GAIN["value"],"k-q", 0.5163, 0.0, 1.0)
#group4.add("kitheta", double_t, CONTROLLER_GAIN["value"],"k-itheta", 0.0, 0.0, 20.0)
#group4.add("kpsi", double_t, CONTROLLER_GAIN["value"],"k-psi", 0.7660, 0.0, 1.0)
#group4.add("kr", double_t, CONTROLLER_GAIN["value"],"k-p", 0.4006, 0.0, 1.0)
#group4.add("kipsi", double_t, CONTROLLER_GAIN["value"],"k-ipsi", 0.5774, 0.0, 1.0)

exit(gen.generate(PACKAGE, "gsft_control", "controllerDyn"))
57 changes: 8 additions & 49 deletions cfg/controllerGS1Dyn.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ CONTROLLER_GAIN = gen.const("CONTROLLER_GAIN", int_t, 0x00000008, "controller_
group1 = gen.add_group("group_control")
group2 = gen.add_group("group_waypoint_references")
#group3 = gen.add_group("group3_drone_parameters")
group4 = gen.add_group("group_controller_gains")
#group4 = gen.add_group("group_controller_gains")
group5 = gen.add_group("group_LOE")

# Name Type Reconfiguration level Description Default Min Max
Expand All @@ -30,15 +30,15 @@ test_mode_enum = gen.enum([ gen.const("TEST_MANUAL", int_t, 0, "Manual test"
gen.const("TEST_WAYPOINT", int_t, 1, "Waypoint test"),
gen.const("TEST_TRACKING", int_t, 2, "Circular tracking test")],
"An enum to chose test mode")
gen.add("test_mode", int_t, 0, "test mode", 0, 0, 2, edit_method=test_mode_enum)
gen.add("test_mode", int_t, 0.0, "test mode", 0, 0, 2, edit_method=test_mode_enum)

LOE_mode_enum = gen.enum([ gen.const("NO", int_t, 1, "Nominal test"),
gen.const("LOE_TRUE", int_t, 2, "LOE true"),
gen.const("LOE_FICTIVE", int_t, 3, "LOE fictive"),
gen.const("LOE_CALCUL", int_t, 4, "LOE calcul"),
gen.const("LOE_FDD", int_t, 5, "LOE fdd")],
LOE_mode_enum = gen.enum([ gen.const("NO", int_t, 0, "Nominal test"),
gen.const("LOE_TRUE", int_t, 1, "LOE true"),
gen.const("LOE_FICTIVE", int_t, 2, "LOE fictive"),
gen.const("LOE_CALCUL", int_t, 3, "LOE calcul"),
gen.const("LOE_FDD", int_t, 4, "LOE fdd")],
"An enum to chose LOE estimation mode")
gen.add("LOE_mode", int_t, 0, "LOE mode", 1, 1, 5, edit_method=LOE_mode_enum)
gen.add("LOE_mode", int_t, 0.0, "LOE mode", 0, 0, 4, edit_method=LOE_mode_enum)

group1.add("enable_take_off", bool_t, ENABLE_CTRL["value"], "enable take off", False) # ENABLE_CTRL["value"] = 0x00000001
group1.add("enable_landing", bool_t, ENABLE_CTRL["value"], "enable landing", False)
Expand Down Expand Up @@ -69,45 +69,4 @@ group5.add("LOE_t6", double_t, 0.0, "fault time 6",
#group3.add("kT", double_t, NEW_PARAMETERS["value"], "thrust constant", 8.54858e-6, 1e-7, 1e-5)
#group3.add("factor", double_t, NEW_PARAMETERS["value"], "scaling factor", 0.035, 0.0, 0.05)

group4.add("kz", double_t, CONTROLLER_GAIN["value"],"k-z", 14.7226, 0.0, 23.2925)
group4.add("kvz", double_t, CONTROLLER_GAIN["value"],"k-zd", 6.8078, 0.0, 8.47)
group4.add("kiz", double_t, CONTROLLER_GAIN["value"],"k-iz", 12.2474, 0.0, 25.025)

group4.add("kx", double_t, CONTROLLER_GAIN["value"],"k-x", 1.2426, 0.0, 2.0)
group4.add("kvx", double_t, CONTROLLER_GAIN["value"],"k-xd", 0.7085, 0.0, 2.0)
group4.add("kix", double_t, CONTROLLER_GAIN["value"],"k-ix", 0.9913, 0.0, 2.0)
group4.add("ky", double_t, CONTROLLER_GAIN["value"],"k-y", -0.9258, -2.0, 0.0)
group4.add("kvy", double_t, CONTROLLER_GAIN["value"],"k-yd", -0.5770, -2.0, 0.0)
group4.add("kiy", double_t, CONTROLLER_GAIN["value"],"k-iy", -0.6662, -2.0, 0.0)

#group4.add("kx", double_t, CONTROLLER_GAIN["value"],"k-x", 1.6651, 0.0, 2.0)
#group4.add("kvx", double_t, CONTROLLER_GAIN["value"],"k-xd", 0.9236, 0.0, 2.0)
#group4.add("kix", double_t, CONTROLLER_GAIN["value"],"k-ix", 1.3486, 0.0, 2.0)
#group4.add("ky", double_t, CONTROLLER_GAIN["value"],"k-y", -1.5145, -2.0, 0.0)
#group4.add("kvy", double_t, CONTROLLER_GAIN["value"],"k-yd", -0.8551, -2.0, 0.0)
#group4.add("kiy", double_t, CONTROLLER_GAIN["value"],"k-iy", -1.1930, -2.0, 0.0)

group4.add("kphi", double_t, CONTROLLER_GAIN["value"],"k-phi", 2.0050, 0.0, 10.0)
group4.add("kp", double_t, CONTROLLER_GAIN["value"],"k-p", 0.4087, 0.0, 1.0)
group4.add("kiphi", double_t, CONTROLLER_GAIN["value"],"k-iphi", 0.0, 0.0, 20.0)
group4.add("ktheta", double_t, CONTROLLER_GAIN["value"],"k-theta", 2.2946, 0.0, 10.0)
group4.add("kq", double_t, CONTROLLER_GAIN["value"],"k-q", 0.4589, 0.0, 1.0)
group4.add("kitheta", double_t, CONTROLLER_GAIN["value"],"k-itheta", 0.0, 0.0, 20.0)
#group4.add("kpsi", double_t, CONTROLLER_GAIN["value"],"k-psi", 0.3036, 0.0, 0.498)
#group4.add("kr", double_t, CONTROLLER_GAIN["value"],"k-p", 0.2440, 0.0, 0.3130)
#group4.add("kipsi", double_t, CONTROLLER_GAIN["value"],"k-ipsi", 0.1581, 0.0, 0.3162)
group4.add("kpsi", double_t, CONTROLLER_GAIN["value"],"k-psi", 0.498, 0.0, 1.0)
group4.add("kr", double_t, CONTROLLER_GAIN["value"],"k-p", 0.3130, 0.0, 0.5)
group4.add("kipsi", double_t, CONTROLLER_GAIN["value"],"k-ipsi", 0.3162, 0.0, 0.5)

#group4.add("kphi", double_t, CONTROLLER_GAIN["value"],"k-phi", 2.6042, 0.0, 10.0)
#group4.add("kp", double_t, CONTROLLER_GAIN["value"],"k-p", 0.4431, 0.0, 1.0)
#group4.add("kiphi", double_t, CONTROLLER_GAIN["value"],"k-iphi", 0.0, 0.0, 20.0)
#group4.add("ktheta", double_t, CONTROLLER_GAIN["value"],"k-theta", 2.8913 , 0.0, 10.0)
#group4.add("kq", double_t, CONTROLLER_GAIN["value"],"k-q", 0.5163, 0.0, 1.0)
#group4.add("kitheta", double_t, CONTROLLER_GAIN["value"],"k-itheta", 0.0, 0.0, 20.0)
#group4.add("kpsi", double_t, CONTROLLER_GAIN["value"],"k-psi", 0.7660, 0.0, 1.0)
#group4.add("kr", double_t, CONTROLLER_GAIN["value"],"k-p", 0.4006, 0.0, 1.0)
#group4.add("kipsi", double_t, CONTROLLER_GAIN["value"],"k-ipsi", 0.5774, 0.0, 1.0)

exit(gen.generate(PACKAGE, "gsft_control", "controllerGS1Dyn"))
4 changes: 2 additions & 2 deletions src/tuning_GS1_grt_rtw/multiword_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
*
* Code generation for model "tuning_GS1".
*
* Model version : 1.2101
* Model version : 1.2189
* Simulink Coder version : 8.12 (R2017a) 16-Feb-2017
* C++ source code generated on : Mon Oct 22 19:08:51 2018
* C++ source code generated on : Thu Mar 7 15:36:47 2019
*
* Target selection: grt.tlc
* Note: GRT includes extra infrastructure and instrumentation for prototyping
Expand Down
4 changes: 2 additions & 2 deletions src/tuning_GS1_grt_rtw/rtmodel.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
*
* Code generation for model "tuning_GS1".
*
* Model version : 1.2101
* Model version : 1.2189
* Simulink Coder version : 8.12 (R2017a) 16-Feb-2017
* C++ source code generated on : Mon Oct 22 19:08:51 2018
* C++ source code generated on : Thu Mar 7 15:36:47 2019
*
* Target selection: grt.tlc
* Note: GRT includes extra infrastructure and instrumentation for prototyping
Expand Down
4 changes: 2 additions & 2 deletions src/tuning_GS1_grt_rtw/rtwtypes.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
*
* Code generation for model "tuning_GS1".
*
* Model version : 1.2101
* Model version : 1.2189
* Simulink Coder version : 8.12 (R2017a) 16-Feb-2017
* C++ source code generated on : Mon Oct 22 19:08:51 2018
* C++ source code generated on : Thu Mar 7 15:36:47 2019
*
* Target selection: grt.tlc
* Note: GRT includes extra infrastructure and instrumentation for prototyping
Expand Down
Loading

0 comments on commit 720d2d5

Please sign in to comment.