Skip to content
LIBRARY
PlanarMechanics.examples.two_joint_robot.InverseModelDriver.md

PlanarMechanics.examples.two_joint_robot.InverseModelDriver

Drives the joints of an inverse robot model at the acceleration level from a vector-valued reference acceleration and measures the torques required to realize the reference motion. The measured torques constitute a computed-torque feedforward signal.

Usage

MultibodyComponents.PlanarMechanics.examples.two_joint_robot.InverseModelDriver()

Connectors

  • qdd - This connector represents a real signal as an input to a component (RealInput)

  • flange1 - This connector represents a rotational spline with angle and torque as the potential and flow variables, respectively. (Spline)

  • flange2 - This connector represents a rotational spline with angle and torque as the potential and flow variables, respectively. (Spline)

  • support - This connector represents a rotational spline with angle and torque as the potential and flow variables, respectively. (Spline)

  • tau1 - This connector represents a real signal as an output from a component (RealOutput)

  • tau2 - This connector represents a real signal as an output from a component (RealOutput)

Behavior

Source

dyad
"Drives the joints of an inverse robot model at the acceleration level from a vector-valued reference acceleration and measures the torques required to realize the reference motion. The measured torques constitute a computed-torque feedforward signal."
component InverseModelDriver
  "Reference acceleration for each joint"
  qdd = [RealInput() for i in 1:2] {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": -40, "y1": 460, "x2": 60, "y2": 560, "rot": 0}
      },
      "tags": []
    }
  }
  "Flange driving joint 1 of the inverse model"
  flange1 = Spline() {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 950, "y1": 170, "x2": 1050, "y2": 270, "rot": 0}
      },
      "tags": []
    }
  }
  "Flange driving joint 2 of the inverse model"
  flange2 = Spline() {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 950, "y1": 710, "x2": 1050, "y2": 810, "rot": 0}
      },
      "tags": []
    }
  }
  "Support flange of the acceleration sources"
  support = Spline() {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 450, "y1": 950, "x2": 550, "y2": 1050, "rot": 0}
      },
      "tags": []
    }
  }
  "Torque required to realize the reference motion of joint 1"
  tau1 = RealOutput() {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 140, "y1": 960, "x2": 240, "y2": 1060, "rot": 90}
      },
      "tags": []
    }
  }
  "Torque required to realize the reference motion of joint 2"
  tau2 = RealOutput() {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 760, "y1": 960, "x2": 860, "y2": 1060, "rot": 90}
      },
      "tags": []
    }
  }
  qdd_sel1 = MultibodyComponents.Selector(nu = 2, index = 1) {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 150, "y1": 150, "x2": 250, "y2": 250, "rot": 0}
      },
      "tags": []
    }
  }
  qdd_sel2 = MultibodyComponents.Selector(nu = 2, index = 2) {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 150, "y1": 650, "x2": 250, "y2": 750, "rot": 0}
      },
      "tags": []
    }
  }
  accsrc1 = RotationalComponents.Sources.AccelerationSource() {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 350, "y1": 150, "x2": 450, "y2": 250, "rot": 0}
      },
      "tags": []
    }
  }
  accsrc2 = RotationalComponents.Sources.AccelerationSource() {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 350, "y1": 650, "x2": 450, "y2": 750, "rot": 0}
      },
      "tags": []
    }
  }
  tausens1 = RotationalComponents.Sensors.TorqueSensor() {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 600, "y1": 150, "x2": 700, "y2": 250, "rot": 0}
      },
      "tags": []
    }
  }
  tausens2 = RotationalComponents.Sensors.TorqueSensor() {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 600, "y1": 650, "x2": 700, "y2": 750, "rot": 0}
      },
      "tags": []
    }
  }
relations
  connect(qdd, qdd_sel1.u) {
    "Dyad": {
      "edges": [{"S": 1, "M": [{"x": 10, "y": 200}], "E": 2}],
      "renderStyle": "standard"
    }
  }
  connect(qdd, qdd_sel2.u) {
    "Dyad": {
      "edges": [{"S": 1, "M": [{"x": 50, "y": 510}, {"x": 50, "y": 700}], "E": 2}],
      "renderStyle": "standard"
    }
  }
  connect(qdd_sel1.y, accsrc1.a_ref)
  connect(qdd_sel2.y, accsrc2.a_ref)
  connect(accsrc1.spline, tausens1.spline_a)
  connect(accsrc2.spline, tausens2.spline_a)
  connect(tausens1.spline_b, flange1) {
    "Dyad": {
      "edges": [{"S": 1, "M": [{"x": 850, "y": 200}, {"x": 850, "y": 220}], "E": 2}],
      "renderStyle": "standard"
    }
  }
  connect(tausens2.spline_b, flange2) {
    "Dyad": {
      "edges": [{"S": 1, "M": [{"x": 850, "y": 700}, {"x": 850, "y": 760}], "E": 2}],
      "renderStyle": "standard"
    }
  }
  connect(accsrc1.support, support) {
    "Dyad": {
      "edges": [{"S": 1, "M": [{"x": 400, "y": 290}, {"x": 500, "y": 290}], "E": 2}],
      "renderStyle": "standard"
    }
  }
  connect(accsrc2.support, support) {
    "Dyad": {
      "edges": [{"S": 1, "M": [{"x": 400, "y": 960}, {"x": 500, "y": 960}], "E": 2}],
      "renderStyle": "standard"
    }
  }
  connect(tausens1.tau, tau1) {
    "Dyad": {
      "edges": [
        {
          "S": 1,
          "M": [
            {"x": 615, "y": 340},
            {"x": 560, "y": 340},
            {"x": 560, "y": 860},
            {"x": 190, "y": 860}
          ],
          "E": 2
        }
      ],
      "renderStyle": "standard"
    }
  }
  connect(tausens2.tau, tau2) {
    "Dyad": {
      "edges": [
        {
          "S": 1,
          "M": [
            {"x": 615, "y": 920},
            {"x": 807.5, "y": 920},
            {"x": 807.5, "y": 970},
            {"x": 810, "y": 970}
          ],
          "E": 2
        }
      ],
      "renderStyle": "standard"
    }
  }
metadata {
  "Dyad": {"icons": {"default": "dyad://MultibodyComponents/InverseModelDriver.svg"}}
}
end
Flattened Source
dyad
"Drives the joints of an inverse robot model at the acceleration level from a vector-valued reference acceleration and measures the torques required to realize the reference motion. The measured torques constitute a computed-torque feedforward signal."
component InverseModelDriver
  "Reference acceleration for each joint"
  qdd = [RealInput() for i in 1:2] {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": -40, "y1": 460, "x2": 60, "y2": 560, "rot": 0}
      },
      "tags": []
    }
  }
  "Flange driving joint 1 of the inverse model"
  flange1 = Spline() {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 950, "y1": 170, "x2": 1050, "y2": 270, "rot": 0}
      },
      "tags": []
    }
  }
  "Flange driving joint 2 of the inverse model"
  flange2 = Spline() {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 950, "y1": 710, "x2": 1050, "y2": 810, "rot": 0}
      },
      "tags": []
    }
  }
  "Support flange of the acceleration sources"
  support = Spline() {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 450, "y1": 950, "x2": 550, "y2": 1050, "rot": 0}
      },
      "tags": []
    }
  }
  "Torque required to realize the reference motion of joint 1"
  tau1 = RealOutput() {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 140, "y1": 960, "x2": 240, "y2": 1060, "rot": 90}
      },
      "tags": []
    }
  }
  "Torque required to realize the reference motion of joint 2"
  tau2 = RealOutput() {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 760, "y1": 960, "x2": 860, "y2": 1060, "rot": 90}
      },
      "tags": []
    }
  }
  qdd_sel1 = MultibodyComponents.Selector(nu = 2, index = 1) {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 150, "y1": 150, "x2": 250, "y2": 250, "rot": 0}
      },
      "tags": []
    }
  }
  qdd_sel2 = MultibodyComponents.Selector(nu = 2, index = 2) {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 150, "y1": 650, "x2": 250, "y2": 750, "rot": 0}
      },
      "tags": []
    }
  }
  accsrc1 = RotationalComponents.Sources.AccelerationSource() {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 350, "y1": 150, "x2": 450, "y2": 250, "rot": 0}
      },
      "tags": []
    }
  }
  accsrc2 = RotationalComponents.Sources.AccelerationSource() {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 350, "y1": 650, "x2": 450, "y2": 750, "rot": 0}
      },
      "tags": []
    }
  }
  tausens1 = RotationalComponents.Sensors.TorqueSensor() {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 600, "y1": 150, "x2": 700, "y2": 250, "rot": 0}
      },
      "tags": []
    }
  }
  tausens2 = RotationalComponents.Sensors.TorqueSensor() {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 600, "y1": 650, "x2": 700, "y2": 750, "rot": 0}
      },
      "tags": []
    }
  }
relations
  connect(qdd, qdd_sel1.u) {
    "Dyad": {
      "edges": [{"S": 1, "M": [{"x": 10, "y": 200}], "E": 2}],
      "renderStyle": "standard"
    }
  }
  connect(qdd, qdd_sel2.u) {
    "Dyad": {
      "edges": [{"S": 1, "M": [{"x": 50, "y": 510}, {"x": 50, "y": 700}], "E": 2}],
      "renderStyle": "standard"
    }
  }
  connect(qdd_sel1.y, accsrc1.a_ref)
  connect(qdd_sel2.y, accsrc2.a_ref)
  connect(accsrc1.spline, tausens1.spline_a)
  connect(accsrc2.spline, tausens2.spline_a)
  connect(tausens1.spline_b, flange1) {
    "Dyad": {
      "edges": [{"S": 1, "M": [{"x": 850, "y": 200}, {"x": 850, "y": 220}], "E": 2}],
      "renderStyle": "standard"
    }
  }
  connect(tausens2.spline_b, flange2) {
    "Dyad": {
      "edges": [{"S": 1, "M": [{"x": 850, "y": 700}, {"x": 850, "y": 760}], "E": 2}],
      "renderStyle": "standard"
    }
  }
  connect(accsrc1.support, support) {
    "Dyad": {
      "edges": [{"S": 1, "M": [{"x": 400, "y": 290}, {"x": 500, "y": 290}], "E": 2}],
      "renderStyle": "standard"
    }
  }
  connect(accsrc2.support, support) {
    "Dyad": {
      "edges": [{"S": 1, "M": [{"x": 400, "y": 960}, {"x": 500, "y": 960}], "E": 2}],
      "renderStyle": "standard"
    }
  }
  connect(tausens1.tau, tau1) {
    "Dyad": {
      "edges": [
        {
          "S": 1,
          "M": [
            {"x": 615, "y": 340},
            {"x": 560, "y": 340},
            {"x": 560, "y": 860},
            {"x": 190, "y": 860}
          ],
          "E": 2
        }
      ],
      "renderStyle": "standard"
    }
  }
  connect(tausens2.tau, tau2) {
    "Dyad": {
      "edges": [
        {
          "S": 1,
          "M": [
            {"x": 615, "y": 920},
            {"x": 807.5, "y": 920},
            {"x": 807.5, "y": 970},
            {"x": 810, "y": 970}
          ],
          "E": 2
        }
      ],
      "renderStyle": "standard"
    }
  }
metadata {
  "Dyad": {"icons": {"default": "dyad://MultibodyComponents/InverseModelDriver.svg"}}
}
end


Test Cases

No test cases defined.

  • Examples

  • Experiments

  • Analyses