LIBRARY
examples.suspension.SuspensionWithExcitation
Quarter-car suspension driven by a sinusoidal wheel-position excitation.
Wraps a QuarterCarSuspension and drives the point where the wheel would be (suspension.wheel_frame) through a vertical Prismatic joint whose position is commanded by a sinusoid amplitude*sin(2π*freq*t). A SphericalSpherical actuation rod connects the prismatic to the suspension to avoid over-constraining the loop. The chassis is exposed via chassis_frame.
Usage
MultibodyComponents.examples.suspension.SuspensionWithExcitation(rod_radius=0.02, amplitude=0.1, freq=2, r=[0, 0, 0.2286], r_0=[0, 0.1, 0])
Parameters:
| Name | Description | Units | Default value |
|---|---|---|---|
spring | – | true | |
mirror | – | false | |
rod_radius | Radius of the rods | – | 0.02 |
amplitude | Amplitude of the wheel displacement [m] | – | 0.1 |
freq | Frequency of the wheel displacement [Hz] | Hz | 2 |
r | Actuation attachment position relative to the world | m | [0, 0, 0.2286] |
r_0 | Nominal vector of the actuation rod (sets its length) | m | [0, 0.1, 0] |
Connectors
chassis_frame- Frame3D is the fundamental 3D connector used for 6DOF motion. Most components have one or severalFrame
connectors that can be connected together (Frame3D)
Behavior
Source
dyad
"""
Quarter-car suspension driven by a sinusoidal wheel-position excitation.
Wraps a `QuarterCarSuspension` and drives the point where the wheel would be
(`suspension.wheel_frame`) through a vertical `Prismatic` joint whose position is
commanded by a sinusoid `amplitude*sin(2π*freq*t)`. A `SphericalSpherical`
actuation rod connects the prismatic to the suspension to avoid over-constraining
the loop. The chassis is exposed via `chassis_frame`.
"""
component SuspensionWithExcitation
"Frame rigidly attached to the chassis"
chassis_frame = Frame3D() {
"Dyad": {
"placement": {
"diagram": {"iconName": "default", "x1": 295, "y1": 65, "x2": 395, "y2": 165, "rot": 0}
},
"tags": []
}
}
fixed = MultibodyComponents.Fixed() {
"Dyad": {
"placement": {
"diagram": {"iconName": "default", "x1": 70, "y1": 350, "x2": -30, "y2": 450, "rot": 90}
},
"tags": []
}
}
suspension = QuarterCarSuspension(spring = spring, mirror = mirror, rod_radius = rod_radius) {
"Dyad": {
"placement": {
"diagram": {"iconName": "default", "x1": 420, "y1": 170, "x2": 520, "y2": 270, "rot": 0}
},
"tags": []
}
}
wheel_prismatic = MultibodyComponents.Prismatic(n = [0, 1, 0], statePriority = 100) {
"Dyad": {
"placement": {
"diagram": {"iconName": "default", "x1": 165, "y1": 245, "x2": 265, "y2": 345, "rot": 0}
},
"tags": []
}
}
actuation_rod = MultibodyComponents.SphericalSpherical(r_0 = r_0, radius = rod_radius, kinematic_constraint = false) {
"Dyad": {
"placement": {
"diagram": {"iconName": "default", "x1": 295, "y1": 245, "x2": 395, "y2": 345, "rot": 0}
},
"tags": []
}
}
actuation_position = MultibodyComponents.FixedTranslation(r = r, render = false) {
"Dyad": {
"placement": {
"diagram": {"iconName": "default", "x1": 35, "y1": 245, "x2": 135, "y2": 345, "rot": 0}
},
"tags": []
}
}
wheel_position = TranslationalComponents.Sources.Position() {
"Dyad": {
"placement": {
"diagram": {"iconName": "default", "x1": 35, "y1": 120, "x2": 135, "y2": 220, "rot": 0}
},
"tags": []
}
}
structural parameter spring::Boolean = true
structural parameter mirror::Boolean = false
"Radius of the rods"
parameter rod_radius::Real = 0.02
"Amplitude of the wheel displacement [m]"
parameter amplitude::Real = 0.1
"Frequency of the wheel displacement [Hz]"
parameter freq::Frequency = 2
"Actuation attachment position relative to the world"
parameter r::Length[3] = [0, 0, 0.2286]
"Nominal vector of the actuation rod (sets its length)"
parameter r_0::Length[3] = [0, 0.1, 0]
relations
wheel_position.s_ref = amplitude * sin(2 * π * freq * time)
connect(wheel_position.flange, wheel_prismatic.axis) {
"Dyad": {
"edges": [{"S": 1, "M": [{"x": 215, "y": 170}], "E": 2}],
"renderStyle": "standard"
}
}
connect(fixed.frame_b, actuation_position.frame_a) {
"Dyad": {
"edges": [{"S": 1, "M": [{"x": 20, "y": 295}], "E": 2}],
"renderStyle": "standard"
}
}
connect(actuation_position.frame_b, wheel_prismatic.frame_a) {"Dyad": {"edges": [{"S": 1, "M": [], "E": 2}], "renderStyle": "standard"}}
connect(wheel_prismatic.frame_b, actuation_rod.frame_a) {"Dyad": {"edges": [{"S": 1, "M": [], "E": 2}], "renderStyle": "standard"}}
connect(actuation_rod.frame_b, suspension.wheel_frame) {
"Dyad": {
"edges": [{"S": 1, "M": [{"x": 470, "y": 295}], "E": 2}],
"renderStyle": "standard"
}
}
connect(chassis_frame, suspension.chassis_frame) {
"Dyad": {
"edges": [{"S": 1, "M": [{"x": 470, "y": 115}], "E": 2}],
"renderStyle": "standard"
}
}
metadata {
"Dyad": {
"icons": {"default": "dyad://MultibodyComponents/SuspensionWithExcitation.svg"}
}
}
endFlattened Source
dyad
"""
Quarter-car suspension driven by a sinusoidal wheel-position excitation.
Wraps a `QuarterCarSuspension` and drives the point where the wheel would be
(`suspension.wheel_frame`) through a vertical `Prismatic` joint whose position is
commanded by a sinusoid `amplitude*sin(2π*freq*t)`. A `SphericalSpherical`
actuation rod connects the prismatic to the suspension to avoid over-constraining
the loop. The chassis is exposed via `chassis_frame`.
"""
component SuspensionWithExcitation
"Frame rigidly attached to the chassis"
chassis_frame = Frame3D() {
"Dyad": {
"placement": {
"diagram": {"iconName": "default", "x1": 295, "y1": 65, "x2": 395, "y2": 165, "rot": 0}
},
"tags": []
}
}
fixed = MultibodyComponents.Fixed() {
"Dyad": {
"placement": {
"diagram": {"iconName": "default", "x1": 70, "y1": 350, "x2": -30, "y2": 450, "rot": 90}
},
"tags": []
}
}
suspension = QuarterCarSuspension(spring = spring, mirror = mirror, rod_radius = rod_radius) {
"Dyad": {
"placement": {
"diagram": {"iconName": "default", "x1": 420, "y1": 170, "x2": 520, "y2": 270, "rot": 0}
},
"tags": []
}
}
wheel_prismatic = MultibodyComponents.Prismatic(n = [0, 1, 0], statePriority = 100) {
"Dyad": {
"placement": {
"diagram": {"iconName": "default", "x1": 165, "y1": 245, "x2": 265, "y2": 345, "rot": 0}
},
"tags": []
}
}
actuation_rod = MultibodyComponents.SphericalSpherical(r_0 = r_0, radius = rod_radius, kinematic_constraint = false) {
"Dyad": {
"placement": {
"diagram": {"iconName": "default", "x1": 295, "y1": 245, "x2": 395, "y2": 345, "rot": 0}
},
"tags": []
}
}
actuation_position = MultibodyComponents.FixedTranslation(r = r, render = false) {
"Dyad": {
"placement": {
"diagram": {"iconName": "default", "x1": 35, "y1": 245, "x2": 135, "y2": 345, "rot": 0}
},
"tags": []
}
}
wheel_position = TranslationalComponents.Sources.Position() {
"Dyad": {
"placement": {
"diagram": {"iconName": "default", "x1": 35, "y1": 120, "x2": 135, "y2": 220, "rot": 0}
},
"tags": []
}
}
structural parameter spring::Boolean = true
structural parameter mirror::Boolean = false
"Radius of the rods"
parameter rod_radius::Real = 0.02
"Amplitude of the wheel displacement [m]"
parameter amplitude::Real = 0.1
"Frequency of the wheel displacement [Hz]"
parameter freq::Frequency = 2
"Actuation attachment position relative to the world"
parameter r::Length[3] = [0, 0, 0.2286]
"Nominal vector of the actuation rod (sets its length)"
parameter r_0::Length[3] = [0, 0.1, 0]
relations
wheel_position.s_ref = amplitude * sin(2 * π * freq * time)
connect(wheel_position.flange, wheel_prismatic.axis) {
"Dyad": {
"edges": [{"S": 1, "M": [{"x": 215, "y": 170}], "E": 2}],
"renderStyle": "standard"
}
}
connect(fixed.frame_b, actuation_position.frame_a) {
"Dyad": {
"edges": [{"S": 1, "M": [{"x": 20, "y": 295}], "E": 2}],
"renderStyle": "standard"
}
}
connect(actuation_position.frame_b, wheel_prismatic.frame_a) {"Dyad": {"edges": [{"S": 1, "M": [], "E": 2}], "renderStyle": "standard"}}
connect(wheel_prismatic.frame_b, actuation_rod.frame_a) {"Dyad": {"edges": [{"S": 1, "M": [], "E": 2}], "renderStyle": "standard"}}
connect(actuation_rod.frame_b, suspension.wheel_frame) {
"Dyad": {
"edges": [{"S": 1, "M": [{"x": 470, "y": 295}], "E": 2}],
"renderStyle": "standard"
}
}
connect(chassis_frame, suspension.chassis_frame) {
"Dyad": {
"edges": [{"S": 1, "M": [{"x": 470, "y": 115}], "E": 2}],
"renderStyle": "standard"
}
}
metadata {
"Dyad": {
"icons": {"default": "dyad://MultibodyComponents/SuspensionWithExcitation.svg"}
}
}
endTest Cases
No test cases defined.
Related
Examples
Experiments
Analyses