没有合适的资源?快使用搜索试试~ 我知道了~
首页基于python的FMU仿真工具
资源详情
资源评论
资源推荐

LUND UNIVERSITY
PO Box 117
221 00 Lund
+46 46-222 00 00
PyFMI: A Python Package for Simulation of Coupled Dynamic Models with the
Functional Mock-up Interface
Andersson, Christian; Åkesson, Johan; Führer, Claus
Published: 2016-01-01
Document Version
Publisher's PDF, also known as Version of record
Link to publication
Citation for published version (APA):
Andersson, C., Åkesson, J., & Führer, C. (2016). PyFMI: A Python Package for Simulation of Coupled Dynamic
Models with the Functional Mock-up Interface. (Technical Report in Mathematical Sciences; Vol. 2016, No. 2).
Centre for Mathematical Sciences, Lund University.
General rights
Copyright and moral rights for the publications made accessible in the public portal are retained by the authors
and/or other copyright owners and it is a condition of accessing publications that users recognise and abide by the
legal requirements associated with these rights.
• Users may download and print one copy of any publication from the public portal for the purpose of private
study or research.
• You may not further distribute the material or use it for any profit-making activity or commercial gain
• You may freely distribute the URL identifying the publication in the public portal

Take down policy
If you believe that this document breaches copyright please contact us providing details, and we will remove
access to the work immediately and investigate your claim.
Download date: 07. Jul. 2018

PyFMI: A Python Package for
Simulation of Coupled Dynamic Models
with the Functional Mock-up Interface
Christian Andersson, Johan Åkesson, Claus Führer
Preprints in Mathematical Sciences
2016:2
Faculty of Engineering
Centre for Mathematical Sciences
Numerical Analysis
CENTRUM SCIENTIARUM MATHEMATICARUM


PyFMI: A Python Package for Simulation of Coupled
Dynamic Mo dels with the Functional Mo ck-up Interface
Christian Andersson
a,b
, Johan
˚
Akesson
b
, Claus F¨uhrer
a
a
Centre for Mathematical Sciences, Lund University, Lund, Sweden
b
Modelon AB, Lund, Sweden
Abstract
With the advent of the Functional Mock-up Interface (FMI) standard, ex-
changing dynamic models between modeling and simulation tools has been
greatly simplified. At the core of it, FMI is a standardized and unified model
execution interface for dynamic models. FMI has gained widespread adoption
among users and numerous commercial and open source tools implement sup-
port for the standard. In this article, the Python package PyFMI is introduced.
PyFMI supports loading and execution of models compliant with the FMI stan-
dard, called Functional Mock-up Units (FMUs). It includes a master algorithm
for simulation of coupled FMUs together with connections to both Assimulo,
for simulation of single FMUs, and to SciPy, for performing parameter estima-
tion. Accessing models compliant with FMI in Python, which is an open and
accessible scripting language, is intended to further spread the standard and
also promote and facilitate future development of the standard. This is due
to Python being a convenient language for experimentation and prototyping of
numerical algorithms. PyFMI is also demonstrated on a number of problems
that highlights its viability for solving industrial grade simulation problems with
FMUs.
Keywords: Functional Mock-up Interface; FMI; Python; Simulation;
Co-Simulation; Ordinary differential equations; Parameter Estimation;
1. Introduction
Different simulation and modeling tools often use their own definition of how
a model is represented and how model data is stored. Complications arise when
trying to model parts in one tool and importing the resulting model in another
tool, or when trying to verify a result by using a different simulation tool. The
Functional Mock-up Interface (FMI) [1] is a standard to provide a unified model
execution interface for exchanging dynamic system models between modeling
tools and simulation tools. The standard has been a great success as numerous tools,
both open source and commercial have adopted it as well as having gained widespread
adoption among users.
Email addresses: chria@maths.lth.se (Christian Andersson),
johan.akesson@modelon.com (Johan
˚
Akesson), claus@maths.lth.se (Claus F¨uhrer)
不同的仿真和建模工具通常使用它们自己对
模型如何表示以及如何存储模型数据的定义。
当尝试在一个工具中对零件进行建模并在另一
个工具中导入结果模型时,或者在尝试使用不
同的模拟工具验证结果时,会出现并发症。 功
能模拟接口(FMI)[1]是一种标准,用于提供
统一的模型执行接口,用于在建模工具和仿真
工具之间交换动态系统模型。 该标准取得了巨
大的成功,因为众多工具,无论是开源还是商
业,都采用了它,并且已经在用户中得到广泛
采用。
随着功能模拟接口(FMI)标准的出现,
在建模和仿真工具之间交换动态模型已经大大
简化了。 FMI的核心是动态模型的标准化和统
一模型执行界面。
FMI已在用户中得到广泛采
用,众多商业和开源工具实现了对该标准的支
持。在本文中,介绍了Python软件包PyFMI。
PyFMI支持加载和执行符合
FMI标准的模型,
称为功能模拟单元(FMU)。它包括用于仿真
耦合FMUs
的主算法并与Assimulo结合、用于仿
真单个FMU、结合SciPy用于执行参数估计。访
问Python中符合FMI的模型,这是一种开放且
易于访问的脚本语言,旨在进一步传播标准,
并促进和促进标准的未来发展。这是因为
Python
是一种方便的语言,可用于数值算法的
实验和原型设计。 PyFMI还演示了一些问题,
强调了它在用FMUs解决工业级模拟问题方面
的可行性。
剩余45页未读,继续阅读












安全验证
文档复制为VIP权益,开通VIP直接复制

评论0