ADAMS、MATLAB和AMESim机电液联合仿真介绍及应用 ppt课件
AMESim工程机械机电液系统仿真技术
AMESim中的液压相关专业库(非热)
HCD
13 copyright LMS International - 2011
b AMESim液阻库/热液阻库 管接头
•对任何流体管网系统进行建模、分析和设计。 •建立简单管网流动,分支管网,树状管网以及回路及相互连 接的模型。 •对重力和离心效应进行建模。 •可以接受用户的专用数值来覆盖内嵌的数值。 •处理不可压缩流动和可压缩流动。 •可进行稳态和动态分析。 •对管网系统的规模没有限制。
从图中可以看到,当变量泵进入恒功率调节区域时,主泵的流量随着压力的升高而减小,但是主泵的吸 收功率基本保持恒定在53kW左右,实现了变量泵的恒功率调节。而且,仿真的单泵流量、功率曲线与实测 的单泵流量、功率曲线基本保持一致,说明仿真模型基本合理,能够仿真力士乐A8VO120恒功率变量泵的 动态特性和变量特性。
4 copyright LMS International - 2011
b AMESim多领域系统仿真平台
图形化模块化多学科系统建模
基于集中参数和物理元件数学模型 仿真模型由多个物理元件模型组合而成 每个物理元件模型用图标表示,且完全 参数化 流体、机械、热、电气与电磁、控制、 驾驶、发动机等40多个专业库 主要分析功能 动态响应分析 稳态分析 模态分析 频率响应分析、根轨迹分析 DOE、优化分析、蒙特卡罗分析 活性指数分析 阶次分析 实时仿真与硬件在环 与其它软件的无缝集成 多体动力学 CFD 控制系统
辅助元件:硬管、油箱
25 copyright LMS International - 2011
第一步:负载感应式变量柱塞泵模型
变量机构
负载感应控制器 主动压力截止
史上最全的AMESim-Matlab 联合仿真设置步骤(集大成者,图文并茂)
史上最全的AMESim-Matlab 联合仿真设置步骤(集大成者,图文并茂)中国矿业大学机电学院 haierdhg目前,文库及网上流行的AMESim-Matlab 联合仿真步骤基本不能用,经过几天的研究,终于找到了解决方案。
本文论述了联合仿真的设置步骤、仿真时应注意的事项,以及有用的参考资料,敬请大家分享。
一、版本为AMESim8.0,Matlab2011b,VC++6.0二、安装步骤个人认为以上三个软件,没有安装顺序,但还是建议先安装VC++1.将VC++中的"vcvar32.bat"文件从Microsoft Visual C++目录(通常是.\Microsoft Visual Studio\VC98\Bin中)拷贝至AMESim目录下(我的是C:\AMESim\v800)。
(如果先安装的VC,后安装的AMESim,则在AMESim安装时,自动会拷贝该文件)2.环境变量确认:(这里网上的教程大多是错的!环境变量分为用户变量和系统变量,网上教程大多没说清楚)1)选择“控制面板-系统”或者在“我的电脑”图标上点右键,选择“属性”;2)在弹出的“系统属性”窗口中选择“高级”页,选择“环境变量”;3)用户变量中添加HOME C:\ (我将AMESim Matlab装在了C盘,自己根据情况修改) MATLAB C:\MATLAB\R2011bPath D:\Program Files\Microsoft Visual Studio\Common\Tools\WinNT;D:\Program Files\Microsoft VisualStudio\Common\MSDev98\Bin;D:\Program Files\Microsoft Visual Studio\Common\Tools;D:\Program Files\Microsoft Visual Studio\VC98\bin4)在系统变量中添加AME C:\AMESim\v800 (这个一般都有的,不需要自己添加);Path D:\Program Files\Microsoft Visual Studio;C:\AMESim\v800;C:\AMESim\v800\win32;C:\AMESim\v800\sys\mingw32\bin;C:\AMESim\v800\sys\mpich\mpd\bin;C:\AMESim\v800\sys\cgns;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;C:\MATLAB\R2011b\bin\win32;C:\WINDOWS\system32;C:\WINNT (该处很重要一定要添加,而且一定要包含C:\WINDOWS\system32,不然会有引起很多错误)3.确认是否在AMESim中选择VC作为编译器。
AMEsim与Matlab_simulink联合仿真技术
目录摘要 (1)0 引言 (1)1 联合仿真技术 (2)1.1 联合仿真技术的特点与应用 (2)1.2 联合仿真技术的实现途径 (2)2 联合仿真接口技术 (3)2.1 系统环境配置 (3)2.2 系统编译器配置 (3)3 联合仿真应用举例 (5)4 结论 (8)致谢 (8)参考文献 (9)AMESim与Matlab_Simulink联合仿真技术机械电子系0802班李敏M200870228摘要:根据AMESim与Matlab/Simulink软件各自的特点,对两者联合仿真技术进行了研究,解决了联合仿真的接口与实现问题,并把该技术应用于电液位置伺服系统的仿真,取得了良好的效果。
关键词:AMESim;Matlab/Simulink;联合仿真;接口Abstract:United Matlab/Simulink technique with AMESim and Matlab/Simulink was discussed based on their own characteristics. The problem of their interface and realization were solved. As an applied example, Matlab/Simulink of electro hydraulic servo-system was shown. Good results were achieved.Keywords:AMESim;Matlab/Simulink;United simulation;Interface0 引言传统的设计方法往往是通过反复的样品试制和试验来分析该系统是否达到设计要求,结果造成大量的人力和物力投入在样品的试制和试验上。
随着计算机仿真技术的发展,在工程系统的软件设计开发中,大量地采用了数值成型的方法,即通过建立系统的数值模型,利用计算机仿真使得大量的产品设计缺陷在物理成型之前就得到了处理,从而可以使企业在最短的时间、以最低的成本将新产品投放到市场。
ADAMS+AMESIM+SIMULINK操作说明
ADAMS+AMESIM+SIMULINK总体思路:对于一个实际的机械电液控制系统的建模仿真,用ADAMS进行机械部分的建模,AMESIM进行液压部分的建模,SIMULINK进行控制部分的建模。
将ADAMS建立的机械模型导入到AMESIM中(通常接口处是油缸或是马达),再将整合后AMESIM模块当作一个整体的模块导入到SIMULINK中,在SIMULINK中进行仿真。
仿真时,SIMULINK给出控制信号以控制AMESIM输出的力或是扭矩,AMESIM给出力或是扭矩来控制ADAMS机械系统的运动量(位移、速度、加速度。
),ADAMS会将运动量反馈给AMESIM,SIMULINK 可根据这些反馈做出相应的控制。
下面以一个例子来简介三者联仿的步骤:例子:一只油缸固连一只仅受重力的小球,小球的初始状态为静止。
现在仿真这么一个状态:油缸从一端运动到另一端时的小球的运动变化。
步骤一:准备工作。
1.首先得装好四个软件。
我用的是ADAMS2005,AMESIM8.0,MATLAB2007b,Microsoft Visual C++ 6.0。
另外三个软件要有相应的破解文件以支持联仿。
2.ADAMS到AMESIM的设置:在Windows中设置环境变量%AME_ADAMS_HOME%,该环境变量的值为ADAMS的安装路径(例如C :\ADAMS2005。
注意在ADAMS的安装路径中不能出现空格)。
3.AMESIM到SIMULINK的设置:(1)确认在系统变量PATH中包含系统安装目C:\WINNT\System32。
(2)在Matlab的目录列表里加上AMESim与Matlab接口文件所在的目录%AME%\MATLAB\AMESim。
File→Set Path→Add Folder加上c:\AMESim\MATLAB\AMESim。
(3)确认是否在AMESim中选择VC作为编译器。
具体操作在AMEsim→0pions→AMEsim→Preferences→Compilation/Parameters中。
247.AMESim和ADAMS联合仿真操作说明
AMESim与ADAMS联合仿真操作说明摘要:物理系统可能由各种元件组成,例如气动的,机械的,液压的,电子的以及控制系统等,所有的元件协同工作。
多学科领域系统和复杂多体系统之间的相互作用很难在单一的软件平台中来仿真。
解决的方案就是通过AMESim和专用的多体动力学软件ADAMS之间的接口,使得两者在仿真中协同工作。
本文结合天线的简单实例介绍AMESim与ADAMS联合仿真的操作过程。
关键词:AMESim ADAMS 联合仿真1引言AMESim(Advanced Modeling Environment for Simulation of engineering systems)软件是由法国IMAGINE公司于1995年推出的多学科复杂领域系统工程高级建模和仿真平台,该软件不要求用户具备完备的仿真专业知识,采用面向系统原理图建模的方法,便于工程技术人员掌握和使用。
机构动力学分析软件ADAMS (automatic dynamic of mechanical system)集建模、求解和可视化技术于一体,能有效分析和比较多种参数方案。
运用AMESim与ADAMS的联合仿真,可以有效的对设备的动态过程进行分析,根据交互分析产生的结果来评价设备的性能,为了更加真实的符合实际情况,理论分析用来完成检验产生的数值结果。
这种虚拟产品开发方法与得出的结论将对设计人员提供一定帮助。
通过AMESim/ADAMS之间的接口,有两种方式实现联合仿真:(1)将模型从一个平台中输入到另一个平台中,采用单一的积分器进行计算。
(2)各个平台分别利用自己的积分器计算自己的模型,通过预先统一的通讯间隔进行信息交换。
2.软件环境要求首先AMESim软件需要4.2级以上版本; ADAMS需要2003级以上版本(含A/Control模块)。
其次必须要有Microsoft Visual C++ 编译器。
如果需要从ADAMS环境中使用接口,那么还强烈推荐Fortran编译器,这样可以将AMESim的模型编译成为ADAMS的子函数(Subroutine)。
adams-amesim联合仿真PPT课件
改善品质
REFINE
• 输入法则 • 加入摩擦、滑动等 参数
ITERATE
• What if? 执行试验设计
改善效率 产品改善
OPTIMIZE • 最优化 • 敏感度研究
AUTOMATE • 使用Macro命令 • 自行定义对话框
• 结果比较
Do results match?
NO • 加入控制挠性(FEA)
多体机械系统模型
液压、控制系统模型
7/21/2020
.
12
系统设计方法
7/21/2020
.
13
联合仿真流程
7/21/2020
.
14
联合仿真流程
√
√
7/21/2020
.
15
基本前提配置
编译环境: Microsoft Visual C++编译器 版本要求:AMESim4.2级以上
ADAMS2003级以上(含A/Control模块) 环境变量:变量名为AME_ADAMS_HOME
7/21/2020
.
29
仿真结果
既可以在AMESim软件中查看,又可以在ADAMS软件中查看仿真结果: AMESim中:
7/21/2020
.
30
仿真结果
既可以在AMESim软件中查看,又可以在ADAMS软件中查看仿真结果: ADAMS中:
7/21/2020
.
31
7/21/2020
.
19
定义输入输出接口
指定输入输出变量:
➢应用控制组件 Plant Input 指定输入变量,创建控制输入 ➢应用控制组件 Plant Output 指定输出变量,创建控制输出
Matlab Amesim Adams联合仿真
联合仿真可以充分利用各仿真软件的优点,从而简化建模实现快速仿真。
这里首先讲下如何实现联合仿真,工欲善其事,必先利其器。
一.Matlab与Amesim1. 安装好matlab与amesim。
要点:安装目录不要有空格,比如不要放到program files这个目录中。
2.安装编译器(compiler)Microsoft Visual C++ 6.0(必须)或者Compaq Visual Fortran Pro v6.6.0(可选),在安装过程中遇到设置环境变量的(environmental variance)选择‘yes’,免得以后自己添加麻烦3.拷贝Microsoft Visual C++ 6.0安装目录下\VC98\Bin\VCVARS32.BAT文件到Amesim的安装目录下。
比如:C:\Program Files\Microsoft Visual Studio\VC98\Bin中的VCVARS32.BAT拷贝到C:\AMESim\7.0.0下面4.设置Matlab环境变量,这样联合仿真时Amesim才能找到matlab。
在系统变量中添加‘MATLAB’,其值为Matlab的安装路径,如D:\MATLAB\R2009a。
5.在matlab中设置编译器(如下图)。
在matlab命令行里输入mex -setup,选择编译器Microsoft Visual C++6.0 ,最后选Y确定。
6. 在Amesim里选择编译器。
打开Amesim--tools--options--Amesim preferences选择Microsoft Visual C++7.在Matlab 的目录列表里加上AMESim与Matlab 接口文件所在的目录%AME%\matlab\amesim,其中%AME%是AMESim的安装目录,如果安装在C:\AMEsim ,则就加上C:\AMEsim\matlab\amesim。
(有的版本这个目录可能是安装目录\******ing\matlab\amesim)8.在matlab中set path中继续添加路径:%AME%\7.0.0\interface\simulink以及%AME%\7.0.0\interface\sl2ame9. 完成,实现amesim to simulink 和simulink to amesim 的联合仿真。
ADAMS与AMESim联合仿真实例2
以AMESim为主软件,与Adams联合仿真ADAMS与AMESim的联合仿真分两种形式,一是将AMESim模型导入ADAMS中(需要Fortran 编译器),另一种是将ADAMS模型导入AMESim中,选取ADAMS2012自带的例子进行联合仿真,具体步骤如下:1、将ADAMS安装目录下名为antenna.cmd(X:/MSC.Software/Adams/2012/controls/examples/antenna/anten na.cmd,X代表Adams安装目录)的文件复制到工作目录中;2、将antenna.cmd导入ADAMS中如下图示;3、通过Settings—Interface Style—Classic将界面切换到经典模式,便于与教程相对照:图示:5、Build—System Elements—New,创建状态变量azimuth_position,control_torque,elevation_position,rotor_velocity;6、Build—System Elements—Modify修改变量7、通过Date Elements—Plant—Plant Input/Plant Output建立输入输出变量,并与状态变量连接起来8、右击azimuth—actuator将力与输入变量连接起来8、通过Controls—Plant Export,导出模型,完成相关设置后点OK;9、zuoye文件夹中生成以下文件:10、在AMESim中建立以下模型,如下图示通过Modeling—Interface block—Import Adams model,选择工作目录中刚刚生成的adams2amesim .inf文件完成如下图示的相关设置11、最终建立的AMESim模型如下图示:12、进行模拟仿真13、在Amesim中查看模拟结果14、在Adams/PostProcessor 中查看模拟结果。
AmeSim与Adams在液压中的应用
文本可以旋转,但不允许进行镜像,如果不 能旋转该文本,可能是出现重叠造成的
Submodel(子模型) 系统元件的数学模型描述为子模型
Premier submodel(首选子模型) 一个元件可能有多个子模型与之关联,可以 手工选择,也可由AMESim自动选择最简单 模型。这就是首选子模型功能目的。多个子 模型时,其复杂程度按列向下增加。
批处理运行
批处理运行是以不同的一组参数对一系列 仿真进行初始化,这些仿真运行是按顺序 进行的。其基本步骤如下:
1.在Parameters模式下,从Setting菜单— Batch parameters;
2.将所需参数拖放到Batch Control Paramerter Setup对话框中并进行设置;
一、单一平台上实现多学科领域的系统工程 的建模与仿真,比如机械、液压、气动、 热、电和磁等物理领域 。
二、智能求解器能够根据用户所建立模型的 数学特性自动选择最佳的积分算法,并根 据不同仿真时刻的系统特点动态地切换积 分算法和调整积分步长以缩短仿真时间和 提高仿真精度。
三、基本元素理念(构成工程系统的最小要 素)使得用户用尽可能少的要素来建立尽 可能详细的反映工程系统和零部件功能的 复杂模型。
➢Adams软件应用
✓Adams软件概述 ✓学习思路 ✓初级实例
Adams软件概述
ADAMS(Automatic Dynamic Analysis of Mechanical Systems):机械系统自动化 动力学仿真软件。
Mechanical Dynamics Incorporated (MDI) 由美国密西根大学的ADAMS 代码开发研究 人员发起成立,位于美国密西根州的Ann Arbor,2002年MSC.Software 以1.2亿美金 收购了MDI公司。
AMESim工程机械机电液系统仿真技术
运动体动态性能 流体可压缩性 限位和饱和 摩擦和泄漏 液动力 可变流量系数(雷诺数和流数) 可变容积 可变通流面积 液压力 Servo-valve
用途:
可模拟各类液压零部件,如泵、单向
阀、调压阀、作动器…… 详细建立并验证零部件设计方案
12 copyright LMS International - 2011
型与流体系统回路的整体模型结合在一起进行综合分析。
16 copyright LMS International - 2011
液压元件
下图所示为在b AMESim液压系统模型中的不同类型的液压元件
作动器 液压容腔 液压阀 节流孔
油泵
液压管道
17 copyright LMS International - 2011
时候,只要排量未达到最大值,负载感应控制器就会增加泵的排量以维持通过换向阀的恒定的压差。
23 copyright LMS International - 2011
应用案例:轮式装载机的负载感应系统建模与仿真分析
AMESim仿真模型
系统建模
轮式装载机
设计验证
结果曲线
仿真分析
24 copyright LMS International - 2011
T
19 copyright LMS International - 2011
管道模型
20 copyright LMS International - 2011
b AMESim液压阀模型
常用阀
安全阀
减压阀
可控安全阀 压力阀 单向阀
通用的滑阀
3
位6通
3位4通
5 1
辅助元件:硬管、油箱
AMESim和adams联合仿真使用说明
ADAMS interface® Rev 9 – November 2009Copyright © LMS IMAGINE S.A. 1995-2009AMESim® is the registered trademark of LMS IMAGINE S.A.AMESet® is the registered trademark of LMS IMAGINE S.A.AMERun® is the registered trademark of LMS IMAGINE S.A.AMECustom® is the registered trademark of LMS IMAGINE S.A.LMS b is a registered trademark of LMS International N.V.LMS b Motion is a registered trademark of LMS International N.V.ADAMS® is a registered United States trademark of MSC.Software Corporation.MATLAB and SIMULINK are registered trademarks of the Math Works, Inc.Modelica is a registered trademark of the Modelica Association.UNIX is a registered trademark in the United States and other countries exclusively licensed by X / Open Company Ltd.Windows is the registered trademark of the Microsoft Corporation.All other product names are trademarks or registered trademarks of their respective companies.TABLE OF CONTENTS1. Introduction (1)1.1. Organization of this manual 22. Preliminaries (3)2.1. License requirements 32.2. Compiler requirements 32.2.1. Requirements to import ADAMS model into AMESim 32.2.2. Requirements to export AMESim models into ADAMS 32.3. Versions of ADAMS supported 42.4. Platforms supported 42.5. Setting up the environment 43. Importing AMESim into ADAMS (7)3.1. Preliminary 73.2. Import AMESim models into ADAMS 93.2.1. Preparing an AMESim model for export to ADAMS 93.2.2. Importing the model in ADAMS 114. Importing Adams into AMESim (20)4.1. Introduction 204.2. Preparing an ADAMS model for export to AMESim 224.2.1. Step 1: Check exchanged variables 224.2.2. Step 2: Create the Interface 254.2.3. Step 3: Export the system from ADAMS into AMESim 264.3. Importing the model into AMESim 274.3.1. Step 1: Import file generated by ADAMS 274.3.2. Step 2: Configuration of the interface block 294.3.3. Step 3: Running a simulation 304.4. Analyzing results in both software 325. Co-simulation or full export? (32)6. Tips on using the interface (35)6.1. How to stop a simulation 356.2. How do you execute ADAMS commands before a co-simulation? 367. Advanced use of the interface (36)7.1. How to setup interface with template-based ADAMS products 367.1.1. Using more than one interface 377.2. Advanced configuration of the interface 377.2.1. Configuration file 37Using theAMESim / ADAMS Interface 1. IntroductionThe AMESim ADAMS interface enables you to link an AMESim model with an ADAMS multibody model of a mechanical structure. By coupling motion simulation and system simulation, this interface improves the accuracy of your full system simulation.This interface is useful when hydraulic or pneumatic fluid power systems or other AMESim systems interact with complex mechanical structures.The interface is designed so that you can continue to use many of the AMESim facilities while the model is running in ADAMS. In particular, you can change the parameters of the AMESim model within AMESim in the normal way and monitor the results by creating plots just as if you were producing a regular run.Normally you will have AMESim and ADAMS running simultaneously so that you can use the full facilities of both packages. An illustration of this process follows:When the process is finished, the user can change the AMESim model parameters within AMESim, as well as the ADAMS parameters within ADAMS.1.1. Organization of this manualThis manual describes both the two-way full export interface (using ADAMS or AMESim integrator exclusively for the full system) and the two-way co-simulation interface (where both solvers are used, one of them being called by the other).The main part of the manual deals with the standard interface and section 5 looks at the differences between export and co-simulation.The structure of this manual is the following:•Section 1 is the current section.• Section 2: Preliminaries, describes how you must set your working environment so that you can use the interface.• Section 3:Error! Reference source not found. describes how ADAMS imports the AMESim model.2. Section 4: Importing Adams into AMESim•, uses a simple example to describe how to create an AMESim model and configure it to run in cooperation with ADAMS.•Section 5: This section describes the differences between co-simulation interface and the export facility.• Section 6: Tips on using the interface, gives some advice on efficient use of the interface.• Section 7: Advanced use of the interface and Section 8: Advanced configuration of the interface, are useful for customized use of the interface (advanced users). Sometimes a section of text is only valid for a UNIX or Linux environment, for such text, the following presentation is used:Using UNIX:Description for Unix/Linux based environments.Similarly, sometimes a section of text is only valid for a Windows environment, for such text, the following presentation is used:Using Windows:Description for Windows based environments.We assume that either the reader of this manual is already familiar with using AMESim and ADAMS or an AMESim user and an ADAMS user will collaborate in performing the task.We recommend that new AMESim users at least do the tutorial examples in the AMESim manual before attempting a combined simulation. Similarly, a new ADAMS user should become familiar with using ADAMS before attempting a combined simulation.3. Preliminaries3.1. License requirementsWhen the user is running a coupled simulation from the AMESim environment, an Adams interface license is required in AMESim in combination with a standard AMESim runtime license. On the ADAMS side the module Adams/Controls (A/Controls) is needed.When running simulations from ADAMS the user only needs Adams interface and AMESim runtime licenses, A/Controls is unused.3.2. Compiler requirements3.2.1. Requirements to import ADAMS model into AMESimUsing Unix:You will need an ANSI C compiler.Using Windows:You must have at least Microsoft Visual C/C++ 6.0, .NET 2003, 2005.3.2.2. Requirements to export AMESim models into ADAMS AMESim follows the requirements given for ADAMS 2005Software specifications are:Hardware Vendor OperatingSystem Fortran C/C++Intel andIntel- compatible PCs Windows 2000,Windows XPProfessionalCompaq VisualFortran 6.6BMS Visual C/C++ 6.0 (SP5)orVisual Studio C++.NET 2003c89 11.01.20aC++ 03.27Hewlett Packard HP-UX 11, 11i f90 2.4.13SGI IRIX6.5.14m7.3.1.2m 7.3.1.2mIBM AIX 4.3.3, 5.1*XL Fortran 7.1 Visual Age C/C++ 5.0.2Sun Microsystems Solaris 7, 8, 9 6 Update 16 Update 1* ADAMS Service Pack APN-130-257 is required to run on this operating system.3.3. Versions of ADAMS supportedThis manual applies to ADAMS 2005. The interface was developed using this version and when using a mode that requires A/Controls (i.e. importing into AMESim) we suggest that you use that version with following patches:A/View 2003 Service Pack 1 APN-130-240A/Solver 2003 Service Pack APN-130-252A/Controls 2003 Service Pack APN-130-256This manual was also revisited to add some particular aspects for using this interface with the Adams 2008 release3.4. Platforms supportedWindows (2000, XP), HP, Sun and IBM.3.5. Setting up the environmentIn order to use the AMESim / ADAMS interface it is necessary to set an environment variable that points to the ADAMS installation directory. If this is not set, AMESim will not be able to find the files necessary to compile the system.To find out if this environment variable is set, type the following line in a terminal window: Using Unix:echo $AME_ADAMS_HOMEThe result should be something like:/opt/Adams2005being printed on screen. If nothing is printed, or the message “AME_ADAMS_HOME: Undefined variable” is displayed, you must set this variable. To do this you need to know where ADAMS is installed. If your working environment is set up properly to run ADAMS, type either:which adams05 (if you are using C shell) or,whence adams05 (for Korn shell - ksh or Bourne shell - sh) or,type adams05 (for some versions of Bourne shells).This will tell you the location of the command to start ADAMS e.g./opt/bin/adams05Then type:l s –l /opt/bin/adams05This finds the link to the ADAMS directory, it may give something like:/opt/bin/adams05 Æ /opt/Adams2005/mdi*Remove the last part from this pathname to get the value to set for AME_ADAMS_HOME, in this case /opt/Adams2005. If you are using Unix C shell, you can then set the environment variable as follows:setenv AME_ADAMS_HOME /opt/Adams2005This statement can also be added to your .cshrc file so that the environment variable is set every time you log in.For Bourne or Korn shells the corresponding would be:AME_ADAMS_HOME=/opt/Adams2005; export AME_ADAMS_HOMEAdd these statements to your .profile file so that the environment variable is set every time you log in or add it to a script that launches AMESim .Using Windows:echo %AME_ADAMS_HOME%The result should be something like:C:\ADAMS2005being printed on screen. If the environment variable is not set, %AME_ADAMS_HOME% is printed and you need to set the environment variable to point to the ADAMS installation directory. This can be done from the Windows Control Panel.If you want to use this interface from ADAMS side, you will need a Fortran compiler as stated in section 2.2. Using Windows:In this case the file dfvars.bat must be copied into $AME. This file sets up the environment to use Fortran libraries.For Compaq Visual Fortran this file can be found here:C:\Program Files\Microsoft Visual Studio\DF98\BINCopy this file into the AMESim installation directory.Using Unix: You need access to a Fortran compiler. To be certain that the compiler is installed, type one of the following commands in a terminal window. For IBM type: xlf , for SGI type f77 and for Sun type f77. If the command issues an error message, please contact your system administrator.¾ In AMESim the $AME/libadams directory must be in the current path list.to 20.¾ AMS_HOME environment variable must be defined with a DOS-¾ the Visual C compiler, the make file called¾ n depending¾You must set the environment variable ADAMS_CONTROLS_WTIME Generally, this waiting time is enough to initialize connections between AMESim and ADAMS.The AME_AD type path (that can be found in the .inf file generated by ADAMS), for example: D:\PROGRA~1\MSC~1.ADA\To use this interface using amesim_adams_gsec.make located in $AME/interfaces/adams/ should not contain the library dform.lib which is reserved for Fortran compilers.The library for ADAMS must be replaced in the AMESim installatio on the ADAMS version used. The library files are located in $AME/libadams/lib as shown below.Replace AMEADAMS.lib with the correct library file4. Importing AMESim into ADAMS4.1. PreliminaryThe recommended way of working is to first create independent sub-system models in AMESim and ADAMS,each of which has a very simple model of the other domain sub-system.Thus if the end result of a simulation study is to investigate how a hydraulic actuator system will work in a mechanical system it is often best to first model the hydraulic system separately with a simplified model of the mechanical system using the mechanical submodels available in AMESim. This would probably be a prescribed velocity and displacement.In parallel a separate model of the mechanical system would be built in ADAMS with a simplified hydraulic system. This would probably be a prescribed force instead of an actuator. The two sub-system models should then be verified thoroughly. As much independent tuning of the sub-systems as possible should be done at this stage. When the two separate models work properly, they can be integrated.A good general rule is that the ports where the hydraulic and multi-body sub-systems are connected will correspond to hydraulic linear actuator rods or the shafts of hydraulic pumps, motors or rotary actuators.It is not too difficult to think of exceptions but the overwhelming majority of applications will satisfy this rule.You will look at one simple system that uses this way of interfacing. The tutorial case is the ADAMS tutorial example of the antenna. It is strongly recommended that you reproduce this system.When using the interface, there are four important points to treat carefully•units,•sign conventions,•implicit variables (when using AMESim from ADAMS),•numerical aspects.With reasonable care these points can be solved without any problem.The problem of different units in ADAMS and AMESim often leads to the need for the interfacing variables to be adjusted with some unit conversion factor.What we mean by a sign convention is the significance of the signs of forces, displacements and velocities in both AMESim and ADAMS. It is almost always necessary to reverse the sign of displacements and velocities when they are imported into AMESim if hydraulic jacks or hydraulic pumps, motors or rotary actuators are used. Since the sign convention depends on the interfacing of components and variables it is necessary to use caution regarding the sign. This is another good reason for creating two separate sub-system models. The single software simulation results will give good insight into the system behavior and make any sign errors in the combined simulation apparent.As explained in the AMESim manual, AMESim can solve two kinds of systems of differential equations: ordinary differential equations (ODEs) and differential algebraic equations (DAEs). The latter uses implicit variables. The interface between AMESim and the General State Equation in ADAMS supports only ODEs. It is therefore impossible to use any submodel in AMESim that uses implicit variables when exporting the model into ADAMS. It may also be necessary to modify the AMESim model to eliminate any implicit variables that may be created to resolve algebraic loops.When working from ADAMS, numerical problems arise due to the fact that the interface uses the ADAMS integrator, which is tuned to work well with the equations governing multi-body systems. The numerical characteristics of a fluid power system are different. Another source of numerical problems is that an AMESim model when run with the AMESim integrators can employ some special tricks to deal with discontinuities. This is not possible when using the ADAMS integrator. In fact, the documentation of the ADAMS GSE facility, states that the imported system of ODEs must be continuous. It is therefore recommended to avoid hard discontinuities completely in the AMESim model. By a hard discontinuity we mean that there are jump changes in the values of state variables. Fortunately very few AMESim submodels employ hard discontinuities. Avoid the following hydraulic actuator icons that have an integral mass as the corresponding submodels employ hard discontinuities.It is not impossible to use these submodels but if you do, make sure that the jack never hits its end-stops. However, submodels associated with alternative icons employ elastic end-stops, which do not have hard discontinuities. Hence it is preferable to use these.USE THESE ICONSNOT THESESimilarly if you use the mechanical icons, , use MAS21 not MAS005.Looking at the input and output requirements of these preferred submodels and at the requirements of hydraulic pumps and motors, a second general rule becomes apparent. The ADAMS model normally calculates position and velocity, (or angle and angular velocity) and passes them to the AMESim model, which calculates the corresponding force (or torque).Again it is possible to think of exceptions but this rule is very useful.In the same way when working from AMESim, numerical problems can arise when importing a large ADAMS system. The AMESim integrator is not designed to solve such problems, and simulation times may rise significantly.In these cases the co-simulation interface can be a solution if no workaround is found to make the full import facility efficient.4.2. Import AMESim models into ADAMSIn this section you will focus on the interface method to import the AMESim model into ADAMS. We designed the facility for multiple reasons:An ADAMS user needs to integrate a validated AMESim component into a mechanical system; he can still work with ADAMS facilities while taking advantage of AMESim’s ability to design multi-disciplinary control systems.•AMESim may sometimes encounter difficulties in solving a complex ADAMS mechanical structure; in this case, we suggest that user tries the other methodfor coupling the systems, especially if the AMESim system is simple.•This methodology requires no supplementary license for A/controls product.In this case, you will use AMESim subsystem in ADAMS as a general state equation (GSE) block. ADAMS executable will communicate with AMESim using a library. In fact, AMESim will not generate an executable as usual but rather a dynamic link library (dll) on Windows platforms or a library (so) on UNIX platforms.One advantage of this methodology is that you do not need to have AMESim installed on the ADAMS machine; you will just need an AMESim runtime license.4.2.1. Preparing an AMESim model for export to ADAMSIn this section, you will see how to export an AMESim system into ADAMS.In Sketch mode, construct your AMESim system with non-connected ports corresponding to ADAMS inputs and outputs. Then, select Modeling Interface block Create interface icon…, as shown in the screen capture below:Figure 1: Creating export icon in AMESimIt opens a dialog box window named Interface Icon Creation, you select there a Type of interface it should be Adams or AdamsCosim depending whether you want to run discrete coupling or continuous export.Set the number of input variables to ADAMS and output variables from ADAMS and give them a name.In the antenna case it should be one input and two outputs and the created icon looks like this:Figure 2: AMESim subsystem containing ADAMS blockIt is also possible to change the interface status without having to re-do the export, just go to the menu and use Modeling Interface block Display interface status. Then you can switch from Adams to AdamsCosim.Now switch to Submodel mode and Parameter mode. After the compilation of the system AMESim creates the library. Switch to Simulation mode to generate all necessary files or by using File Write auxiliary files.The model cannot have implicit variables otherwise the interface does not work. During the compilation process, the following information is presented:You are now ready to work under ADAMS and import the AMESim system; this is the subject of the next section.4.2.2. Importing the model in ADAMSAs an example, you will use the ADAMS tutorial of the antenna controlled within AMESim. This example comes from A/Controls tutorials; copy the A/View command file antenna.cmd from {ADAMS_DIR}/controls/examples/antenna into a working directory.In ADAMS, do not forget to select the working directory where the AMESim model is located. Use the menu item File Select Directory… By default, the working directory is set to $HOME. This interface also uses libraries located in the $AME/$MACHDIR where $MACHDIR is the machine directory, for example win32 for Windows. This variable must be in the patch directory.¾Import the file within A/view environment.¾The ADAMS model contains an input on the azimuth_motion_csd. variable to force the rotation during the simulation. This input must be deactivated because it is managed in the controller (AMESim model). If we do not deactivate this variable, there will be a conflict between the AMESim control and ADAMS control.To do this, select the Edit Deactivate entry. This action displays the Database Navigator to access the data tree.In the window Database Navigator select azimuth_motion_csd.Figure 3: Deactivate a motion in A/View Apply by clicking OKIf we reopen the Database Navigator, the variable appears as OFF4.2.2.1. Step 1: Create the arrays for inputs, outputs and statesAdams 2005: In A/View go to the Build Controls Toolkit menu.Adams 2008: In A/View go to the Build Data Elements Array menu.¾First, choose the U input array. There you create inputs to the AMESim subsystem, so it will be a 2-dimensional array containing ADAMS variables for velocity and position.Adams 2005Adams 2008¾ Next choose X states array.- discrete export:X state array size = 1 (a dummy state variable)- continuous export: size of the array = AMESim number of states (*) (if = 0 put 1) (*) this number is displayed in the build dialog box.The model cannot have implicit variables otherwise the interface does not work.Adams 2005Adams 2008¾ Finally, choose Y output array. It represents the outputs from AMESim so in our case it will be a 1-dimension array for the control torque.Adams 2005Adams 20084.2.2.2. Step 2: Association of array output value to the modelThe control torque computed by AMESim needs to be associated with the ADAMS model. You do it in the single component torque using ARYVAL ADAMS function. This one permits you to get an array value.Note that, as a first argument to this function you use the array of outputs and the second argument is the position of the required value; 1 in our case.From the Database Navigator, select the azimuth_actuator and we have access to the following dialog box to modify the functionFigure 4: Associate AMESim output to the ADAMS model4.2.2.3. Step 3: Creating the GSE and linking with the AMESim libraryIn the Build System Elements General State Equation menu, choose New… thisopens the dialog box window below.Fill in the window as shown in the following figures. The States line corresponds to the coupling method you chose previously under AMESim; choose discrete for a co-simulation and continuous for an export. The User Function Parameters field always needs three parameters and corresponds respectively to the ID of U Array, Y Array and X Array. AMESim will need them to be able to get correct values from ADAMS during simulation.Figure 5: Creating a GSE in ADAMS; discrete modeFigure 6: Creating a GSE in ADAMS; continuous modeOnce completed, you have to indicate to A/Solver to use the AMESim library.Go to the Settings Solver Executable… menu, in the dialog box window for Solver Library supply the AMESim library path as shown in the figure below:Figure 7: A/Solver settings when using AMESim libraryIn AMESim, select the appropriate settings for the simulation4.2.2.4. Step 4: Running a simulationCreate a command script. Here is an example of a Solver command script:simulate/dynamics, end=0.250000, dtout=0.001 Select Simulate Simulation Script … NewSince A/Solver will use an external library only scripted simulations are available. Select Simulate Scripted Controls …Run the simulation within ADAMS, at the same time the AMESim library writes a result file. The AMESim model is executed in the background. The communication with ADAMS takes place at the library level (dll on Windows and so on Unix platforms). In the aside figure you can notice that AMESim outputs some messages during the simulation.4.2.2.5. Step 5: Checking the resultsIf you have AMESim installed on the same machine, you can look at the results within AMESim. Otherwise, you can focus on ADAMS results only.Results of common variables are as follows under AMESim.In Adams we can also see the variable curves.5. Importing Adams into AMESim5.1. IntroductionAs an example, you will use the same ADAMS tutorial of the antenna controlled within AMESim.The final sketch in AMESim will look like:Figure 8: Antenna sketch in AMESim¾The example comes from A/Controls tutorials; copy the A/View command file antenna.cmd from {ADAMS_DIR}/controls/examples/antenna into a working directory.In ADAMS, do not forget to select the working directory where the AMESim model is located. Use the menu item File Select Directory… By default, the working directory is set to $HOME¾Import the file within the A/view environment.¾The ADAMS model contains an input on azimuth_motion_csd variable to force the rotation during the simulation. This input must be deactivated because it is managed in the controller (AMESim model). If we do not deactivate this variable, there will be a conflict between AMESim control and ADAMS control.To do this, select the Edit Deactivate entry. This action displays the Database Navigator to access to data tree.In the window Database Navigator select azimuth_motion_csd.Figure 9: Deactivate a motion in A/ViewApply by clicking OK.If we reopen the Database Navigator, the variable appears as OFF5.2. Preparing an ADAMS model for export to AMESimIn this case, AMESim is the master software, you will launch simulations from AMESim and AMESim controls ADAMS simulation.There are two ways to export ADAMS into AMESim:•Discrete export, or co-simulation mode, AMESim tells ADAMS to supply its outputs at fixed intervals, ADAMS solves its system,•Continuous mode, AMESim gets the complete system from ADAMS and tries to integrate all equations, ADAMS acts then as a function evaluator.These modes require that you have a valid license for A/Controls.The ADAMS side of the procedure is unchanged whichever mode you use. It is only in AMESim that you make your choice.5.2.1. Step 1: Check exchanged variablesIn this step, you will check the definition of some ADAMS state variables1. You will use them as exchanged variables between the two software packages, for example for a hydraulic actuator modeled in AMESim and acting on an ADAMS mechanical structure, these variables should be a force, a position and a velocity. AMESim needs position and velocity and computes a force.Outputs from ADAMS, often velocity and position, are defined with ADAMS intrinsic functions; AZ( ) for an angle measurement, WZ( ) for a rotational velocity, DM( ) for a displacement magnitude.1 Be careful, the meaning of state variables is not the same in AMESim and in MSC.ADAMS. For the latter these are simple variables defined by an algebraic equation whereas in AMESim these are the variables integrated by the solver.Select the variables in the Database NavigatorBe careful with units (accessible from Settings/Units… menu in A/View). They should be compatible with what AMESim expects, if you do not want to change them in ADAMS, do not forget to place a gain (conversion factor) on the AMESim sketch before inputting the signals into AMESim submodels.Inputs to ADAMS, mainly forces/torques, are used in standard elements like single component force/torque or general force (6 components). At creation, these variables are set to zero value because the other software (AMESim) will compute their values.In our example, the unique input variable is referenced in a torque single component using the function VARVAL.The element azimuth_actuator can be accessed from the Tools Database Navigator…menu in A/View. The control_torque state variable is accessible from Build System Elements State Variables Modify… menu.Figure 11: Creating input variable in ADAMSOnce you have created input and output variables, in the next section you will learn how to define the interface in ADAMS.。
MATLAB与AMEsim的联合仿真设置方法
成功设置的版本:Matlab 2008a ,amesim R10Amesim 与matlab 联合仿真参数设置实验软件平台Matlab2008a,amesimR10 ,VC6.0步骤:1 将VC++中的"vcvar32.bat" 文件从Microsoft VisualC++目录(通常是.\Microsoft Visual Studio\VC98\Bin 中)拷贝至AMESim 目录下。
2 设置环境变量:我的电脑- 〉属性-〉高级- 〉环境变量。
设置AMESim 环境变量:变量名AME,值为其安装路径如安装在C 盘中则值为C:\+amesim 安装路径。
设置Matlab 环境变量:变量名MATLAB 值为D:\MATLAB,此处我安装的matlab 在D 盘根目录下。
确认在系统环境变量PATH 中包含系统安装目录C:\WINDOWS\system323 在Matlab 的目录列表里加上AMESim 与Matlab 接口文件所在的目录%AME%\scripting\matlab\amesim 设置到matlab 默认路径中4 将联合仿真的许可证文件licnese.dat 拷贝到AMESim 安装目录下的licnesing 文件夹中5 确认是否在AMESim 中选择VC 作为编译器。
具体操作在AMESim-〉Opions-> AMESimPreferences->Compilation/Parameters 中。
.在MATLAB 命令窗口中输入命令Mex -setup,选择VC作为编译器注意点:1,Vc 建议安装企业版而且是英文的,其第一次打开安装文件安装并不完全,重启动以后再次点安装文件,会出现于第一次安装文件不同的界面,就说明没有安装完全2,Matlab 的安装目录和amesim 的安装目录都不能在中文路径下,而去文件夹的名称不能有空格3,联合仿真设置成功的标志: 可以运行amesim- 〉HELP- 〉GET AMESIM DEMO-〉interface- 〉amesimsimulink 下的范例4,如果运行的现实找不到matlab bin 则说明系统环境变量中没有设置matlab 路径,设置方法见上面,再重启电脑,再次用amesim打开范例并到参数模式下,运行TOOLS-〉Start matlab,系统会调用matlab 程序,再在打开的matlab 中找到与amesim 中打开的文件同目录且同名的.mdl 文件,在matlab 中运行仿真,如果没有错误则在amesim 中进入仿真模式打开相应的元件就可以看到曲线(注意在amesim 中不用运行仿真)。
基于AMESim-MATLAB-ADAMS联合的机电液一体化仿真综合案例高级专题
详情介绍
《第10讲 三自由度平台的机电液一体化联合仿真基于 MATLAB-AMESim-ADAMS联合仿真(以MATLAB为主)》
本讲内容在MATLAB-AMESim-ADAMS三个软件联合仿真的 软件安装与接口设置已经成功完成的基础上,进行的三自由度平台的 机电液一体化联合仿真的综合案例实现,详细讲解了该案例的 ADAMS模型的建立,连接、驱动和状态变量等设置,AMESim液压 驱动模型建立,MATLAB/simulink控制系统闭环负反馈控制算法的 建立,三个软件联合仿真接口导入与参数设置,让大家熟练掌握机电 液一体机构的机电液一体化联合仿真 基于AMESim与ADAMS联合仿真(以AMESim为主) 》
本讲内容是在AMESim与ADAMS联合仿真软件安装和接口 设置确定正确的前提下,进行的液压油缸变幅机构机电液一体化 联合仿真的综合案例实现,详细讲解了该案例的ADAMS模型的 建立,连接、驱动和状态变量等设置,AMESim液压驱动模型和 闭环负反馈PID控制算法的建立,联合仿真接口导入与参数设置, 让大家对以AMESim为主的联合仿真整体流程和方法有了一定的 掌握。
详情介绍
《第3讲 挖掘机的机电液一体化联合仿真 基于AMESim与ADAMS联合仿真(以AMESim为主)》
本讲内容是在液压油缸驱动变幅机构综合案例的基础上,进 行的挖掘机 机电一体化联合仿真的综合案例实现,详细讲解了 该案例的多自由度ADAMS模型的建立,连接、驱动和状态变量 等设置, AMESim液压驱动模型和闭环负反馈PID控制算法的 建立,联合仿真接口导入与参数设置,让大家熟练掌握以 AMESim为主的联合仿真整体流程和方法。
本讲内容在MATLAB-AMESim-ADAMS三个软件联合仿真的 软件安装与接口设置已经成功完成的基础上,进行的液压油缸变幅机 构机电液一体化联合仿真的综合案例实现,详细讲解了该案例的 ADAMS模型的建立,连接、驱动和状态变量等设置,AMESim液压 驱动模型建立,MATLAB/simulink控制系统闭环负反馈控制算法的 建立,三个软件联合仿真接口导入与参数设置,让大家对这三个软件 的联合仿真整体流程和方法有了一定的掌握。
ADAMS matlab联合仿真
一、ADAMS /Controls模块ADAMS /Controls是ADAMS其他模块如ADAMS/View,ADAMS/Car,ADAMS/solver等的插件模块,为建立的模型添加控制系统。
通过ADAMS/Controls 模块,可以将机械系统仿真分析工具同控制设计仿真软件MATLAB,EASY5,MATRIX等有机地连接起来,实现以下功能。
(1)将复杂的控制系统添加到机械系统模型中,然后对机电一体化进行联合分析。
(2)直接利用ADAMS程序创建控制系统分析中的机械系统仿真模型,而不需要使用数学公式建模。
(3)在ADAMS环境或控制应用程序环境获得机电联合仿真结果。
ADAMS /Controls控制系统可以有两种使用方式:●交互式:在ADAMS/Car, ADAMS /Chassis,ADAMS/Rail, ADAMS/View等模块中添加ADAMS /Controls,通过运动仿真查看控制系统和模型结构变化的效果。
●批处理式:为了获得更快的仿真结果,直接利用ADAMS /Solver这个强有力的分析工具运行ADAMS /Controls。
设计ADAMS/Controls控制系统主要分为4个步骤:1.建模:机械系统模型既可以在ADAMS /Controls下直接建立,也可以外部输入已经建好的模型。
模型要完整包括所需的所有几何条件、约束、力以及测量等。
2.确定输入输出:确定ADAMS 输入输出变量,可以在ADAMS和控制软件之间形成闭环回路。
3.建立控制模型:通过一些控制软件如Matlab、Easy5或者Matrix等建立控制系统模型,并将其与ADAMS机械系统连接起来。
4.仿真模型:使用交互式或批处理式进行仿真机械系统与控制系统连接在一起的模型。
二、MATLAB/Simulink工具箱MATLAB是MathWorks公司开发的软件,具有很多工具箱,其中Simulink工具箱,可以应用于对动态系统进行仿真和分析,他可以处理的系统包括:线性、非线性系统;离散、连续及混合系统;单任务、多任务离散事件系统。
Amesim 和 Adams联合仿真设置过程和关键点
高版本的Adams已经不再支持Adams导入Amesim这种联合模式(以Amesim 作为master的co-simulation也不行),但是将Amesim导入Adams或者以Adams 作为master的co-simulation还是没有问题的。
下表是兼容性对比图表(来自Amesim的help文档):下面讲述的过程是基于Amesim R13 、Adams 2012和VS 2009(32-bit):1、安装软件最好的安装顺序:VS , Adams,Amesim安装路径不要有中文和空格及特殊字符2、环境变量设置AME_ADAMS_HOME,指向Adams安装目录,如:D:\MSC.Software\MD_Adams\R3 ADAMS_CONTROLS_WTIME=203、安装完成后,确认在AMESim安装目录下(如:AMESim/v1300)已包含如下文件:nmake.exevcvars32.bat如果没有,从VS安装目录拷贝过来。
3、将adams库加入到Amesim路径中:完成之后在你的Amesim库列表中包含Import of Adams models库:4、以下以Amesim之中help自带的例子讲述联合仿真操作过程(简单、方便联合仿真调通)将例子拷贝到某个目录下,用Amesim打开.ame文件,编译器选择VC++编译,确保在同一个目录下生成了.dll文件:5、打开adams,设置路径(Select Directory…)到.ame文件所在位置(这步很关键,如果不选可能会出错)6、导入Adams的cmd格式文件,一般在%AME%\v1300\demo\Platform\1D3DCAE\MBS\AMESimAdams,如:D:\AMESim\v1300\demo\Platform\1D3DCAE\MBS\AMESimAdams7、选择solver:为了方便在仿真时看结果,可以选择Display,在Show Messages 后面选择Yes再选择编译器和dll文件,Executable 下拉菜单选择External;Solver Library 后面灰色出双击鼠标左键,找到.ame文件生成的.dll文件在Choice后面选择C++作为编译器此处有建议选择FORTRAN的,我的Fortran版本太低,当时无法计算;不过选择C++就能正常计算,一般情况也不需要再安装Fortran。
Adams和AMESim联合仿真的设置和简单例子(都是13版本)
Adams和AMESim的联合仿真前言:本人并不是Adams和AMESim的高手,接触AMESim的时间很短,但是需要做Adams和AMEsim的联合仿真,这里分享一下我探索联合仿真的经验。
目录如下:一、仿真前需要做的准备。
1、软件的安装2、环境变量的设置二、一个具体的联合仿真例子。
(这里只介绍Adams主控的仿真)***********************************************************一、仿真前的准备1、软件的安装软件的版本对联合仿真有重要影响,这里只介绍我自己安装软件的情况。
我的系统是win7 32位,安装的软件是Adams2013、LMS b AMESim Rev 13、Visual Studio 2010。
Adams2013和AMESim Rev 13网上有很多下载资源和安装教程。
这里我只强调一下Visual Studio 2010。
也就是可以建立两个仿真软件联系的Visual C++程序。
Visual C++和VisualStudio等之间的关系大家可以自己在网上查,其实都包含有C++语言。
网上有些教程是用VC++6.0来建立两者之间的关系,但是我安装了VC++6.0的各种版本(企业版,中文版,英文版)都没有成功建立仿真,后来安装了完整的Visual Studio 2010就可以了,但是Visual Studio 2010有些大,我下载的是1.75G。
另外就是安装顺序,最好先安装VC++或者VS(我是最后安装的Visual Studio 2010,先安装的说法我这里并没有证实)。
下面是我的软件的安装位置,安装目录没有中文D:\zy\ADAMSD:\AMESimD:\Program Files\Microsoft Visual Studio 10.0在最后安装好Visual Studio 10后把D:\ProgramFiles\Microsoft Visual Studio 10.0\VC\bin下的nmake和vcvars32文件拷贝到AMESim的安装目录下D:\AMESim\v1300。
AMESim和ADAMS联合仿真设置
AMESim和ADAMS联合仿真设置AMESim和ADAMS依托AMESim7.0与adams2021或2021联合仿真过程,除要用到这两中软件外还要安装完整版的vc++(注意不能要绿色版,要完整破解版)。
设置环境变量:右键点击我的电脑>属性>高级>环境变量,在administration 用户变量栏下点“新建”,设置:变量名 AME_ADAMS_HOME变量值填写你安装adams的安装路径(例如:D:\\adams2021)然后确定。
在开始>运行栏中打cmd进入dos环境,输入 echo %AME_ADAMS_HOME%注意echo后有空格,然后回车,显示你的adams安装路径(例如:D:\\adams2021)说明正确。
下面总体说一下联合仿真过程,简单的说,是两种软件量与量的交换过程。
首先在adams中会建立一个接受AMESim传来的量(f)驱动模型,然后从adams中输出一个模型量(w)传到AMESim。
建立adams模型:首先建立一个工作文件夹,adams和AMESim的工作目录全部指向它,注意这个文件夹的名字和路径全部为英文不能有其他符号和字符,视频教程中建在c盘根目录下,命名aa。
为了说明清楚,在这里仅建立了一个绕固定点旋转的杆件模型,在它和ground直接加入铰接关系,就是那个合页的连接关系,给它加入空间力矩。
然后在build下选system elements>stable variable>new建立新的变量(fAMESim输入扭矩),用同样的方法建立变量w(adams输出角速度),并且设置w的值,从build下选system elements>stable variable>modify选择model中的w,设定f=值,点击三个小点的按钮进入function build,在下拉框中选择velocity,单击anglar velocity about Z,点击assist,在to marker 栏右键单击,选择marker>browse,选择part2 cm(杆中心点),OK,Ok,删掉原有的0,然后确定,然后选择build>contral toolit>plant input在弹出对话框中,双击variable name 栏,Database Navigator中选择f,OK;同样在build>contral toolit>plant output的Database Navigator中选择w为输出变量,OK!将前面设定的扭矩值设定为f,就是在那个fuction窗口中选data element>plant input.从tool>plung manage>中选择control,调出control,在control下选择plant explorer,在plant input选择pinput1,在plant output选择poutput1,点确定。
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
2
1 几何建模
2 测量
3 恢复/重做
4 连接
5 色盘
8 建构力元素
9 10 11 12 13 14 15 16
6 运动
7 移动
9 动态浏览 10 动态旋转 11 前后视图
12左右视图 13 上下视图 14 背景顏色 15 其他 16 视窗布置
7
工程软件MATLAB简介
MATLAB是美国Mathworks公司推出的高性 能数值计算和可视化软件。
理想化阀控缸位置控制
期望位移 X 位移/电流转换 IX + ∆IX PID IX I'X -
阀Q 传感器
油缸 Y
液压缸输出位移 对阀流量传递函数
其中:A-液压缸有效面积;ωh-固有频率;ξh-阻尼比
17
联合仿真实现一种位置控制系统
利用AMESim与ADAMS联合仿真实现
AMESim
F
ADAMS
控 制 方 程
墙壁
样
伸缩油缸(内置) 一节臂 二节臂 三节臂四节臂 平台
机
模
型
变幅油缸
15
联合仿真的工程应用案例
高空车直线轨迹控制系统(ADAMS+MATLAB)
高度 速度
距离
举升高度(m) 举升速度 (m/s)
水平距离 (m)
时间(s)
平台举升曲线
时间(s)
平台水平运动曲线
16
联合仿真实现一种位置控制系统
海上风电吊装简化图
ADAMS+AMESim
12
联合仿真的工程应用案例
风电吊装缓冲装置(ADAMS+AMESim)
零点起吊 高
零点起吊
度
位
受
变
移
力
化
变
变
化
化
F (N)
H (mm)
H (mm)
速
零点起吊
蓄
能
蓄
零点起吊
能
度
器
器
变
压
体
化
力
积
V (mm^3)
P (MPa)
V (m/s)
运行时间 t(s)
吊钩和风机运动曲线
XV
18
联合仿真实现一种位置控制系统
利用MATLAB与ADAMS联合仿真实现
X
MATLAB/Simulink
ADAMS
Step
1 s2+s+1 Transfer Fcn
PID PID Controller
adams _sub
F
19
8
工程软件MATLAB简介
界面
Simulink 工作路径
当前目录
历史命令
开始按钮
M文件 编辑器
命令窗口 9
工程软件MATLAB简介
Simulink
10
联合仿真的工程应用案例
风电吊装缓冲装置(ADAMS+AMESim)
海上风电吊装
吊装对接的缓冲过程
11
联合仿真的工程应用案例
风电吊装缓冲装置(ADAMS+AMESim)
ADAMS、MATLAB和AMESim机电液联合仿真 介绍及应用
2012 / 03 / 21
索引
联合仿真技术及其主要方式 工程软件ADAMS/MATLAB简介 联合仿真的工程应用案例 联合仿真实现一种位置控制系统
多体动力学 ADAMS
液压系统 AMESim
控制系统 MATLAB
2
联合仿真技术及其主要方式
FM xvα
控制系统 MATLAB
4
工程软件ADAMS简介
ADAMS是美国MDI公司开发的机械系统运动 学和动力学仿真软件。
5
工程软件ADAMS简介
进入ADAMS/View 菜单栏 模型名称 主工具栏
全局坐标系 状态栏 6
工程软件ADAMS简介
1 34 56 78
ADAMS/View工具栏
运行时间 t(s)
缓冲缸和蓄能器曲线
13
联合仿真的工程应用案例
高空车直线轨迹控制系统(ADAMS+MATLAB)
变幅伸缩臂高空车
变幅伸缩臂高空车
14
联合仿真的工程应用案例
高空车直线轨迹控制系统(ADAMS+MATLAB)
高 伸缩油缸 空 (内置) 作 业 变幅油缸 平 转台 台 下车
操作平台
多学科和多软件平台协同建模和仿真技术 涉及机械、控制、液压等不同学科领域 是计算机仿真技术应用的发展趋势之一
市场
构思
设计
产品
市场
构思
设计
仿真
产品
3
联合仿真技术及其主要方式
基于接口的联合仿真: 软件独立建模;接口传递计算结果。
多体动力学 ADAMS
FM xvα
液压系统 AMESim
FM xvα