@@ -166,7 +166,7 @@ discrete-time model `DiscreteAngleControlledDyadBot` is identical except that
166166The controller gains can be tuned with the script `scripts/tune_angle_pid.jl`.
167167"""
168168component AngleControlledDyadBot
169- world = MultibodyComponents.PlanarMechanics.World(g = 9.82) {^world}
169+ world = MultibodyComponents.PlanarMechanics.World(g = 9.82, nominal_length = 0.1 ) {^world}
170170 plant = PlanarDyadBot(phi0 = phi0) {^plant}
171171 controller = AngleController(k_angle = k_angle, Ti_angle = Ti_angle, Td_angle = Td_angle) {^controller}
172172 "Proportional gain of the angle controller"
@@ -237,7 +237,7 @@ model except that the control system is a sampled-data `DiscreteAngleController`
237237The sample interval is set by the top-level structural parameter `Ts`.
238238"""
239239component DiscreteAngleControlledDyadBot
240- world = MultibodyComponents.PlanarMechanics.World(g = 9.82) {^world}
240+ world = MultibodyComponents.PlanarMechanics.World(g = 9.82, nominal_length = 0.1 ) {^world}
241241 plant = PlanarDyadBot(phi0 = phi0) {^plant}
242242 controller = DiscreteAngleController(k_angle = k_angle, Ti_angle = Ti_angle, Td_angle = Td_angle, Ts = Ts) {^controller}
243243 "Proportional gain of the angle controller"
@@ -611,7 +611,7 @@ and `scripts/tune_cascade_pid.jl`, or all simultaneously with
611611`scripts/tune_cascade_structured.jl`.
612612"""
613613component CascadeControlledDyadBot
614- world = MultibodyComponents.PlanarMechanics.World(g = 9.82) {^world}
614+ world = MultibodyComponents.PlanarMechanics.World(g = 9.82, nominal_length = 0.1 ) {^world}
615615 plant = PlanarDyadBot(phi0 = phi0) {^plant}
616616 square = BlockComponents.Sources.Square(amplitude = 0.05, frequency = 1 / 10) {^square}
617617 firstorder = BlockComponents.Continuous.FirstOrder(T = 0.1) {^firstorder}
@@ -636,10 +636,10 @@ relations
636636 initial firstorder1.x = 0.0
637637 connect(square.y, firstorder.u) {^id7}
638638 connect(firstorder.y, firstorder1.u) {^id8}
639- connect(firstorder1.y, controller.pos_reference ) {^id9}
640- connect(plant.x , controller.pos_measurement ) {^id10}
641- connect(plant.theta , controller.angle_measurement ) {^id11}
642- connect(controller.torque, plant.torque ) {^id12}
639+ connect(controller.torque, plant.torque ) {^id9}
640+ connect(plant.theta , controller.angle_measurement ) {^id10}
641+ connect(plant.x , controller.pos_measurement ) {^id11}
642+ connect(firstorder1.y, controller.pos_reference ) {^id12}
643643metadata {
644644 "Dyad": {
645645 "tests": {"case1": {"stop": 20}},
@@ -663,30 +663,31 @@ metadata {
663663 }
664664 },
665665 "square": {
666- "Dyad": {"placement": {"diagram": {"x1": -660 , "y1": 430 , "x2": -560 , "y2": 530 }}}
666+ "Dyad": {"placement": {"diagram": {"x1": -230 , "y1": 450 , "x2": -130 , "y2": 550 }}}
667667 },
668668 "firstorder": {
669- "Dyad": {"placement": {"diagram": {"x1": -510 , "y1": 430 , "x2": -410 , "y2": 530 }}}
669+ "Dyad": {"placement": {"diagram": {"x1": -90 , "y1": 450 , "x2": 10 , "y2": 550 }}}
670670 },
671671 "firstorder1": {
672- "Dyad": {"placement": {"diagram": {"x1": -350 , "y1": 430 , "x2": -250 , "y2": 530 }}}
672+ "Dyad": {"placement": {"diagram": {"x1": 60 , "y1": 450 , "x2": 160 , "y2": 550 }}}
673673 },
674674 "controller": {
675- "Dyad": {"placement": {"diagram": {"x1": -180 , "y1": 430 , "x2": 60 , "y2": 620 }}}
675+ "Dyad": {"placement": {"diagram": {"x1": 240 , "y1": 410 , "x2": 480 , "y2": 600 }}}
676676 },
677677 "id7": {"Dyad": {"edges": [{"S": 1, "M": [], "E": 2}]}},
678678 "id8": {"Dyad": {"edges": [{"S": 1, "M": [], "E": 2}]}},
679- "id9": {"Dyad": {"edges": [{"S": 1, "M": [], "E": 2}]}},
679+ "id9": {
680+ "Dyad": {"edges": [{"S": 1, "M": [{"x": 501, "y": 505}, {"x": 501, "y": 500}], "E": 2}]}
681+ },
680682 "id10": {
681683 "Dyad": {
682684 "edges": [
683685 {
684686 "S": 1,
685687 "M": [
686- {"x": 840, "y": 468},
687- {"x": 840, "y": 760},
688- {"x": -190, "y": 760},
689- {"x": -190, "y": 620}
688+ {"x": 820, "y": 492},
689+ {"x": 820, "y": 710},
690+ {"x": 412.79999999999995, "y": 710}
690691 ],
691692 "E": 2
692693 }
@@ -698,18 +699,17 @@ metadata {
698699 "edges": [
699700 {
700701 "S": 1,
701- "M": [
702- {"x": 820, "y": 492},
703- {"x": 820, "y": 700},
704- {"x": 30, "y": 700},
705- {"x": 30, "y": 620}
706- ],
702+ "M": [{"x": 850, "y": 468}, {"x": 850, "y": 760}, {"x": 304.8, "y": 760}],
707703 "E": 2
708704 }
709705 ]
710706 }
711707 },
712- "id12": {"Dyad": {"edges": [{"S": 1, "M": [], "E": 2}]}}
708+ "id12": {
709+ "Dyad": {
710+ "edges": [{"S": 1, "M": [{"x": 196.5, "y": 500}, {"x": 196.5, "y": 505}], "E": 2}]
711+ }
712+ }
713713 }
714714}
715715end
@@ -720,7 +720,7 @@ model except that the control system is a sampled-data `DiscreteCascadeControlle
720720running on a common clock with period `Ts`.
721721"""
722722component DiscreteCascadeControlledDyadBot
723- world = MultibodyComponents.PlanarMechanics.World(g = 9.82) {^world}
723+ world = MultibodyComponents.PlanarMechanics.World(g = 9.82, nominal_length = 0.1 ) {^world}
724724 plant = PlanarDyadBot(phi0 = phi0) {^plant}
725725 square = BlockComponents.Sources.Square(amplitude = 0.05, frequency = 1 / 10) {^square}
726726 firstorder = BlockComponents.Continuous.FirstOrder(T = 0.1) {^firstorder}
0 commit comments