Run kinematic analysis for KinematicsSolver object
solves, or attempts to solve, the kinematic problem posed in the
targets] = solve(
ks. The unknowns are the variables assigned as outputs in
ks. Their solution hinges on the initial position constraints of the
model and on the position targets of the object. When multiple solutions exist, position
guesses bias the solver toward one over the others.
ks — Kinematics solver object
Kinematics solver object, specified as a
KinematicsSolver object that
is the representation of the Simscape™
Multibody™ model used for kinematic analysis.
Example: ks = simscape.multibody.KinematicsSolver("DoublePendulumExample'')
targets — Desired values of target variables
vector of doubles
Desired values of the target variables of
ks. Specify the
values in the order of the variables as shown in the
targetVariables table. The
values are interpreted in the units listed in the table. If no target variables exist,
enter an empty vector. If neither target nor initial guess variables exist, enter an
empty vector or omit the argument altogether.
Example: '[0 45 30]'
initialGuesses — Values of initial guess variables
vector of doubles
Values of the initial guess variables of
ks. Specify the values
in the order of the variables as shown in the
initialGuessVariables table. The
values are interpreted in the units listed in that table. If no initial guess variables
exist, enter an empty vector or omit the argument altogether.
Example: '[10 25]'
outputs — Computed values of output variables
vector of doubles
Computed values of the output variables. The variables show in the order of their
ranking in the
outputVariables table. They are
each in the units listed there.
The solution may not satisfy all position targets or even all model constraints.
statusFlag argument for an overview of the issues
encountered in the solution.
statusFlag — Flag with overall status of solution
Flag with the overall status of the analysis results. A positive flag means that all
target variables and model constraints have been satisfied. A negative flag means that
one or more have not. See the
targetFlags argument to check which
of the targets the solver may have missed. See the
to see the actual values reached for each.
1 － All model constraints and target variables are satisfied.
2 － All model constraints and target variables are satisfied, but the mechanism is in a singular configuration.
-1 － All model constraints are satisfied, but one or more target variables are not satisfied.
-2 － All model constraints are satisfied, but one or more target variables are not satisfied, and the mechanism is in a singular configuration.
-3 － The solution is invalid because one or more model constraints cannot be satisfied. The output variables are set to
-4 － The solution is invalid because the mechanism is in a singular configuration. The output variables are set to
In a singular configuration, the mechanism's motion is restricted and certain velocities cannot be computed. The most common type of kinematic singularity is due to gimbal lock in Bearing Joint, Bushing Joint, or Gimbal Joint. In addition, mechanisms with a Constant Velocity Joint or a belt-cable network may also have kinematic singularities.
targetFlags — Logical flags with status of each target variable
Logical flags with the status of each target variable. A logical
1 indicates that a target has been satisfied. A logical
0 indicates that it has been missed. The flags show in the order
given in the
targetVariables table of the
object. The vector is empty in kinematic problems without target variables.
targets — Computed values of target variables
Introduced in R2019a