Model rigid body tree motion given joint-space inputs
Robotics System Toolbox / Manipulator Algorithms
The Joint Space Motion Model block models the closed-loop joint-space
motion of a manipulator robot, specified as a rigidBodyTree
object. The motion model behavior is defined by the Motion Type
parameter.
qRef
— Joint positionsn-element vector representing the desired joint positions of
radians, where n is the number of nonfixed joints in the rigidBodyTree
object of the Rigid body
tree
parameter.
To enable this port, set the Motion
Type
parameter to Computed Torque Control
,
PD Control
, or Independent Joint
Motion
.
qRefDot
— Joint velocitiesn-element vector representing the desired joint velocities of
radians per second, where n is the number of nonfixed joints in the
rigidBodyTree
object of the Rigid body
tree
parameter.
To enable this port, set the Motion
Type
parameter to Computed Torque Control
,
or Independent Joint Motion
.
qRefDDot
— Joint accelerationsn-element vector representing the desired joint velocities of
radians per second squared, where n is the number of nonfixed
joints in the rigidBodyTree
object of the Rigid body
tree
parameter.
To enable this port, set the Motion
Type
parameter to Computed Torque Control
,
PD Control
, or Independent Joint
Motion
.
FExt
— External forces acting on systemA 6-by-m matrix of external forces for the m
bodies in the rigidBodyTree
object of the Rigid body
tree
parameter.
To enable this port, set the Show external
force input
parameter to on
.
q
— Joint positionsJoint positions output as an n-element vector in radians or
meters, where n is the number of nonfixed joints in the rigidBodyTree
object of the Rigid body
tree
parameter.
qd
— Joint velocitiesJoint velocities output as an n-element vector in radians per
second or meters per second, where n is the number of nonfixed
joints in the rigidBodyTree
object of the Rigid body
tree
parameter
qdd
— Joint accelerationsJoint accelerations output as an n-element vector in radians
per second squared or meters per second squared, where n is the
number of nonfixed joints in the rigidBodyTree
object of the Rigid body
tree
parameter
Rigid body tree
— Robot modeltwoJointRigidBodyTree
(default) | RigidBodyTree
objectRobot model, specified as a rigidBodyTree
object. You can also import
a robot model from an URDF (Unified Robot Description Formation) file using importrobot
.
The default robot model, twoJointRigidBodyTree
, is a manipulator
with revolute joints and two degrees of freedom.
Motion Type
— Type of motion computed by motion modelComputed Torque Control
(default) | Independent Joint Motion
| PD Control
| Open Loop Dynamics
Type of motion, specified as a string scalar or character vector that defines the closed-loop joint-space behavior that the object models. Options are:
Computed Torque Control
— Compensates for full-body
dynamics and assigns the error dynamics specified in the Natural
frequency
and Damping
ratio
parameters.
Independent Joint Motion
— Models each joint as an
independent second order system using the error dynamics specified by the Natural
frequency
and Damping
ratio
parameters.
PD Control
— Uses proportional-derivative (PD)
control on the joints based on the specified Proportional
gain
and Derivative
gain
parameters.
Open Loop Dynamics
— Disables inputs except for
FExt
if Show external
force input
is enabled. This is an open-loop configuration.
Specification format
— Inputs to control robot Damping Ratio / Natural Frequency
(default) | Step Response
Inputs to control the robot system. Options are:
Damping Ratio / Natural Frequency
— Setting the
natural frequency using the Natural
frequency
parameter of the system in Hz, and the damping ratio using
the Damping
ratio
parameter.
Step Response
— Model at discrete time-steps with a
fixed settling time and overshoot using the Settling
time
and the Overshoot
parameters.
To enable this parameter, set the Motion
Type
parameter to Computed Torque Control
or
Independent Joint Motion
.
Damping ratio
— Damping ratio of system1
(default) | numeric scalarDamping ratio use to decay system oscillations. A value of 1
results in no damping, whereas 0
fully dampens the system.
To enable this parameter, set the Specification
format
parameter to Damping Ratio / Natural
Frequency
.
Natural frequency
— Natural frequency of system10
(default) | numeric scalarFrequency of the system oscillations if unimpeded, specified in Hz.
To enable this parameter, set the Specification
format
parameter to Damping Ratio / Natural
Frequency
.
Settling time
— Settling time of system0.59
(default) | numeric scalarThe time taken for each joint to reach steady state, measured in seconds.
To enable this parameter, set the Specification
format
parameter to Step Response
.
Overshoot
— System overshoot0.0
(default) | numeric scalarThe maximum value that the system exceeds the target position.
To enable this parameter, set the Specification
format
parameter to Step Response
.
Proportional gain
— Proportional gain for PD Control100
(default) | n-by-n matrix | scalarProportional gain for proportional-derivative (PD) control, specified as a scalar or
n-by-n matrix, where n is the
number of nonfixed joints in the rigidBodyTree
object of the Rigid body
tree
parameter.
To enable this parameter, set the Specification
format
parameter to PD Control
.
Derivative gain
— Derivative gain for PD control10
(default) | n-by-n matrix | scalarDerivative gain for proportional-derivative (PD) control, specified as a scalar or
n-by-n matrix, where n is the
number of nonfixed joints in the rigidBodyTree
object of the Rigid body
tree
parameter
To enable this parameter, set the Specification
format
parameter to PD Control
.
Show external force input
— Display FExt
portoff
(default) | on
Enable this parameter to input external forces using the FExt
port.
To enable this parameter, set the Motion
Type
parameter to Computed Torque Control
,
PD Control
, or Open Loop
Dynamics
.
Initial joint configuration
— Initial joint positions0
(default) | n-element vector | scalarInitial joint positions, specified as a n-element vector or
scalar in radians. n is the number of nonfixed joints in the rigidBodyTree
object in the Rigid body
tree
parameter.
Initial joint velocities
— Initial joint velocities0
(default) | n-element vector | scalarInitial joint velocities, specified as a n-element vector or
scalar in radians per second. n is the number of nonfixed joints in
the rigidBodyTree
object in the Rigid body
tree
parameter.
Simulate using
— Type of simulation to runInterpreted execution
(default) | Code generation
Interpreted execution
— Simulate model using
the MATLAB® interpreter. For more information, see Simulation Modes (Simulink).
Code generation
— Simulate model using
generated C code. The first time you run a simulation, Simulink® generates C code for the block. The C code is reused for subsequent
simulations, as long as the model does not change.
Tunable: No
[1] Craig, John J. Introduction to Robotics: Mechanics and Control. Upper Saddle River, NJ: Pearson Education, 2005.
[2] Spong, Mark W., Seth Hutchinson, and Mathukumalli Vidyasagar. Robot Modeling and Control. Hoboken, NJ: Wiley, 2006.