主要内容

仿真和分析

运行仿真,可视化模型并运行运动学分析

更新模块图以装配多体模型并可视化其初始配置。可视化图将在多体资源管理器中打开。对模型进行仿真以播放交互式动画。请务必选择适合物理模型的求解器(例如 daessc),并指定足够小的最大时间步,以捕获仿真过程中预期的最快有意义变化。

打开相机管理器以添加用于捕获动画的移动动态相机。动态相机可分为两种类型:关键帧相机或跟踪相机。关键帧相机在多体资源管理器中以交互方式创建的视点之间移动。跟踪相机关联到模型中的坐标系并瞄准它们。使用视频创建器smwritevideo 函数以视频格式录制动画。

使用 KinematicsSolver 类创建模型的运动学表示,并生成要求解的运动学问题。KinematicsSolver 对象包含模型中所有可用的关节变量。通过坐标系变量来补充这些对象,并将关节变量和坐标系变量指定为分析的目标、估计值和输出。

工具

多体资源管理器Visualize and explore multibody models
相机管理器Create, edit, and delete dynamic cameras
视频创建器Create and configure videos of multibody animations

函数

全部展开

simscape.multibody.tirreadRead TIR file (自 R2021b 起)
smwritevideoConfigure and create multibody animation videos
smwritevideoConfigure and create multibody animation videos

表示装配体

KinematicsSolverSolve kinematics problems for a multibody model

配置选项

setVariableUnitChange physical unit of kinematic variable

列出变量

frameVariablesList kinematic variables associated with frame pairs
initialGuessVariablesList all kinematic variables assigned as initial guesses
jointVelocityVariablesList all kinematic variables associated with joint velocities
jointPositionVariablesList all kinematic variables associated with joint positions
outputVariablesList all kinematic variables assigned as outputs
targetVariablesList kinematic variables assigned as targets

添加变量

addFrameVariablesCreate kinematic variables from select frame pair in KinematicsSolver object
addInitialGuessVariablesAssign kinematic variables from KinematicsSolver object as guesses
addOutputVariablesAssign kinematic variables from the KinematicsSolver object as outputs
addTargetVariablesAssign kinematic variables from KinematicsSolver object as targets

清除变量

clearFrameVariablesDrop all frame variables from the KinematicsSolver object
clearInitialGuessVariablesDrop all guess variables from the KinematicsSolver object
clearOutputVariablesDrop all output variables from the KinematicsSolver object
clearTargetVariablesDrop all target variables from the KinematicsSolver object

删除变量

removeFrameVariablesDrop select frame variables from the KinematicsSolver object
removeInitialGuessVariablesDrop select guess variables from the KinematicsSolver object
removeOutputVariablesDrop select output variables from the KinematicsSolver object
removeTargetVariablesDrop select target variables from the KinematicsSolver object

运行分析

generateCodeGenerate C code to run kinematic analysis on KinematicsSolver object
solveRun kinematic analysis for KinematicsSolver object

可视化分析的解

closeViewerClose the Kinematics Solver Viewer window
viewSolutionOpen Multibody Explorer to visualize KinematicsSolver solution
simscape.multibody.DynamicsResultDynamics Results of Multibody Models (自 R2024a 起)

主题

基础可视化

  • Enable Multibody Explorer
    Set the model configuration parameters to ensure that Multibody Explorer opens automatically on model update or simulation.
  • Manipulate the Visualization Viewpoint
    Select a standard view, set the up-axis convention, and use mouse shortcuts to rotate, roll, pan, or zoom a model.
  • Using Operating Points to Initialize Multibody Models
    This example shows how to use operating points to initialize multibody models, specify the initial positions and velocities of the joints in a model, and start simulations of flexible bodies from their deformed states.
  • Update and Simulate a Model
    Workflow steps for updating and simulating a Simscape™ Multibody™ model.
  • Visualize a Model and Its Components
    Visualization is not only a central part of a multibody simulation, but also an essential tool in modeling bodies and verifying their shapes, sizes, frame placements, and colors. Here is an overview of the visualization utilities available in the Simscape Multibody environment and the roles they play in your modeling workflow.
  • Visualize Simscape Multibody Frames
    Use Multibody Explorer frame highlights and Graphic blocks to visualize frames.

高级可视化

相机和视频创建

  • Create a Dynamic Camera
    Use Camera Manager to create or edit a model visualization camera with a moving viewpoint.
  • Create a Model Animation Video
    Save an animation in video format using Video Creator or the smwritevideo function.
  • Visualization Cameras
    Distinction between dynamic cameras and the global camera. Camera Manager as a tool for creating dynamic cameras. Dynamic camera keyframe and tracking modes.
  • Working with Animation
    Review how model animations work and explore the basic controls available for animations.

故障建模

故障排除

精选示例