HOPSAN
   HOME

TheInfoList



OR:

Hopsan is a free
simulation A simulation is the imitation of the operation of a real-world process or system over time. Simulations require the use of Conceptual model, models; the model represents the key characteristics or behaviors of the selected system or proc ...
environment for
fluid In physics, a fluid is a liquid, gas, or other material that continuously deforms (''flows'') under an applied shear stress, or external force. They have zero shear modulus, or, in simpler terms, are substances which cannot resist any shear ...
and
mechatronic Mechatronics engineering also called mechatronics, is an interdisciplinary branch of engineering that focuses on the integration of mechanical, electrical and electronic engineering systems, and also includes a combination of robotics, electronics ...
systems, developed at
Linköping University Linköping University (, LiU) is a public research university based in Linköping, Sweden. Originally established in 1969, it was granted full university status in 1975 and is one of Sweden's largest academic institutions. The university has fou ...
. Although originally developed for simulation of fluid power systems, it has also been adopted for other domains such as
electric power Electric power is the rate at which electrical energy is transferred by an electric circuit. The SI unit of power is the watt, one joule per second. Standard prefixes apply to watts as with other SI units: thousands, millions and billions o ...
,
flight dynamics Flight dynamics in aviation and spacecraft, is the study of the performance, stability, and control of vehicles flying through the air or in outer space. It is concerned with how forces acting on the vehicle determine its velocity and attitude w ...
, and
vehicle dynamics For motorized vehicles, such as automobiles, aircraft, and watercraft, vehicle dynamics is the study of vehicle motion, e.g., how a vehicle's forward movement changes in response to driver inputs, propulsion system outputs, ambient conditions, air ...
. It uses
bi-directional delay line In mathematics, a bi-directional delay line is a numerical analysis technique used in computer simulation for solving ordinary differential equations by converting them to hyperbolic equations. In this way an explicit solution scheme is obtained wit ...
s (or transmission line elements) to connect different components.


History

The development on Hopsan first began in 1977 at the Division of Hydraulics and Pneumatics at Linköping University. The first version was written in FORTRAN, with a
drag-and-drop In computer graphical user interfaces, drag and drop is a pointing device gesture in which the user selects a virtual object by "grabbing" it and dragging it to a different location or onto another virtual object. In general, it can be used to ...
graphical user interface The GUI ( "UI" by itself is still usually pronounced . or ), graphical user interface, is a form of user interface that allows users to interact with electronic devices through graphical icons and audio indicator such as primary notation, inste ...
written in
Visual Basic Visual Basic is a name for a family of programming languages from Microsoft. It may refer to: * Visual Basic .NET (now simply referred to as "Visual Basic"), the current version of Visual Basic launched in 2002 which runs on .NET * Visual Basic (cl ...
. In addition to the simulation capability it also had features for simulation based
optimization Mathematical optimization (alternatively spelled ''optimisation'') or mathematical programming is the selection of a best element, with regard to some criterion, from some set of available alternatives. It is generally divided into two subfi ...
. This used the COMPLEX direct search optimization method or a
generic algorithm Generic programming is a style of computer programming in which algorithms are written in terms of types ''to-be-specified-later'' that are then ''instantiated'' when needed for specific types provided as parameters. This approach, pioneered by ...
(GA). It also had features for
frequency analysis In cryptanalysis, frequency analysis (also known as counting letters) is the study of the frequency of letters or groups of letters in a ciphertext. The method is used as an aid to breaking classical ciphers. Frequency analysis is based on t ...
and
transfer function In engineering, a transfer function (also known as system function or network function) of a system, sub-system, or component is a function (mathematics), mathematical function that mathematical model, theoretically models the system's output for ...
analysis, on simulated results. It also supported co-simulation under
Simulink Simulink is a MATLAB-based graphical programming environment for modeling, simulating and analyzing multidomain dynamical systems. Its primary interface is a graphical block diagramming tool and a customizable set of block libraries. It offers t ...
. Component models were written as FORTRAN subroutines. A separate tool called COMPGEN, written in
Mathematica Wolfram Mathematica is a software system with built-in libraries for several areas of technical computing that allow machine learning, statistics, symbolic computation, data manipulation, network analysis, time series analysis, NLP, optimizat ...
, was also developed, which can be used to generate component models in a more straightforward way. In 1991 the method of bi-directional delay lines (or transmission line modelling TLM) was introduced for system simulation. In 2009 the development of the first version of Hopsan was dropped in favor for a brand new generation of the software, written in
C++ C++ (pronounced "C plus plus") is a high-level general-purpose programming language created by Danish computer scientist Bjarne Stroustrup as an extension of the C programming language, or "C with Classes". The language has expanded significan ...
. This working name of the project is Hopsan NG, and the first
beta version A software release life cycle is the sum of the stages of development and maturity for a piece of computer software ranging from its initial development to its eventual release, and including updated versions of the released version to help impro ...
was released in February 2011. Parts of the source code in Hopsan was used in the OpenModelica Connection Editor (OMEdit) in a collaboration with the
OpenModelica OpenModelica is a free and open source environment based on the Modelica modeling language for modeling, simulating, optimizing and analyzing complex dynamic systems. This software is actively developed by Open Source Modelica Consortium, a non-p ...
project.


Program Overview

The current generation of Hopsan consists of two parts, a graphical user interface and a simulation core library. These are completely separated, so that the core can be used stand-alone, for example in
embedded systems An embedded system is a computer system—a combination of a computer processor, computer memory, and input/output peripheral devices—that has a dedicated function within a larger mechanical or electronic system. It is ''embedded'' as ...
or target computers. System models are built using components from the built in or external libraries. These includes components for hydraulic, pneumatic, electrical , mechanical and control systems (filters, non-linear functions and arithmetic) The library components are pre-compiled, so that no compilation is required during runtime. Custom user models can be created and compiled as separate
library A library is a collection of materials, books or media that are accessible for use and not just for display purposes. A library provides physical (hard copies) or digital access (soft copies) materials, and may be a physical location or a vir ...
files, which can be loaded into Hopsan. There is also a built-in automated equation based component generator using Modelica syntax. Models can also be generated from equations by using Mathematica. Numerical optimization can be performed by a built-in tool, using COMPLEX-RF, COMPLEX-RFP or particle swarm algorithms. It is also possible to perform Monte Carlo sensitivity analysis. The plotting tool is capable of generating frequency spectrums and performing frequency analysis to generate Bode diagrams and Nyquist plots. Hopsan models can be exported to Simulink. Plot data can be exported to
XML Extensible Markup Language (XML) is a markup language and file format for storing, transmitting, and reconstructing arbitrary data. It defines a set of rules for encoding documents in a format that is both human-readable and machine-readable. T ...
, CSV,
gnuplot gnuplot is a command-line and GUI program that can generate two- and three-dimensional plots of functions, data, and data fits. The program runs on all major computers and operating systems (Linux, Unix, Microsoft Windows, macOS, FreeDOS, an ...
and
Matlab MATLAB (an abbreviation of "MATrix LABoratory") is a proprietary multi-paradigm programming language and numeric computing environment developed by MathWorks. MATLAB allows matrix manipulations, plotting of functions and data, implementation ...
. Experiments with including the Hopsan simulation core to
LabVIEW Laboratory Virtual Instrument Engineering Workbench (LabVIEW) is a system-design platform and development environment for a visual programming language from National Instruments. The graphical language is named "G"; not to be confused with G-co ...
Simulation Interface Toolkit by using a
wrapper library Wrapper libraries (or library wrappers) consist of a thin layer of code (a "shim") which translates a library's existing interface into a compatible interface. This is done for several reasons: * To refine a poorly designed or complicated interfac ...
have been successful. Support for model exchange, both import and export, by using the
Functional Mock-up Interface The Functional Mock-up Interface (or FMI) defines a standardized interface to be used in computer simulations to develop complex cyber-physical systems. The vision of FMI is to support this approach: if the real product is to be assembled from a ...
is currently being implemented. Hopsan is a
cross-platform In computing, cross-platform software (also called multi-platform software, platform-agnostic software, or platform-independent software) is computer software that is designed to work in several computing platforms. Some cross-platform software r ...
project, with the intention of running on
Windows Windows is a group of several proprietary graphical operating system families developed and marketed by Microsoft. Each family caters to a certain sector of the computing industry. For example, Windows NT for consumers, Windows Server for serv ...
,
Unix Unix (; trademarked as UNIX) is a family of multitasking, multiuser computer operating systems that derive from the original AT&T Unix, whose development started in 1969 at the Bell Labs research center by Ken Thompson, Dennis Ritchie, and ot ...
and
Macintosh The Mac (known as Macintosh until 1999) is a family of personal computers designed and marketed by Apple Inc., Apple Inc. Macs are known for their ease of use and minimalist designs, and are popular among students, creative professionals, and ...
systems. The current beta release is only available for Windows and Linux, but the intention is to create versions for the other systems as well. The transmission line element method is very suitable for parallel execution, due to physically motivated time delays between certain components. Hopsan has support for dividing simulations in separate threads, making it possible to take advantage of
multicore processor A multi-core processor is a microprocessor on a single integrated circuit with two or more separate processing units, called cores, each of which reads and executes program instructions. The instructions are ordinary CPU instructions (such a ...
s. Features in the graphical user interface include
Python Python may refer to: Snakes * Pythonidae, a family of nonvenomous snakes found in Africa, Asia, and Australia ** ''Python'' (genus), a genus of Pythonidae found in Africa and Asia * Python (mythology), a mythical serpent Computing * Python (pro ...
scripting, an
undo Undo is an interaction technique which is implemented in many computer programs. It erases the last change done to the document, reverting it to an older state. In some more advanced programs, such as graphic processing, undo will negate the las ...
/redo function,
XML Extensible Markup Language (XML) is a markup language and file format for storing, transmitting, and reconstructing arbitrary data. It defines a set of rules for encoding documents in a format that is both human-readable and machine-readable. T ...
-based model and configuration files, hydraulic symbols according to the ISO 1219-1 standard and global system parameters that can be shared between components.


References

{{reflist


External links


GitHub repository
Fortran software C++ software Simulation software