Le03_IntroductionToHopsan.pdf

TMMS04
1
Hopsan Computer Lesson
2014 HT-1
Introduction
This tutorial will teach you how to use the Hopsan simulation tool, and how to use the special
fork lift component which will be used later on in the course. By using simulation tools,
expensive prototyping and testing can be avoided. It is also possible to speed up the development
process, to reduce costs and time-to-market.
1.1
Downloading Hopsan
Hopsan and all required files can be downloaded from the following address:
http://www.iei.liu.se/flumes/hopsan
• Click Download → Hopsan-0.6.8
• Download the 64-bit zip package ("Hopsan-0.6.8-win64-zip.zip")
• Unzip it to a new folder on the desktop.
With this method you can use Hopsan on any computer without administrator rights. Then
start Hopsan by double-clicking on HopsanGUI.exe in the bin directory.
You also need some tutorial files. Return to the Hopsan homepage and click on Tutorials.
Download the following files:
• tutorial_gettingstarted.pdf
• tutorial_advanced_usage.pdf
• advanced_usage.hmf
• tutorial_simulink.pdf
2
Tasks
The tasks in the computer session consists of three tutorial files and a hands-on exercise with
the forklift component, which you will use later in the course. If you are already familiar with
Hopsan, you may skip some (or all) of the tutorials.
2.1
Tutorial: Getting Started
The getting started tutorial will teach you the basic functionality of Hopsan, such as building
a model, setting parameters, simulating and plotting. All instructions can be found in the
tutorial_gettingstarted.pdf document.
2.2
Tutorial: Advanced Usage
The second tutorial demonstrates more advanced tools in Hopsan, such as system parameters,
subsystems and scripting. All instructions are found in tutorial_advanced_usage.pdf. You
also need to use the model in advanced_usage.hmf.
2.3
Tutorial: Exporting Models to Simulink
In the project work you will need to execute Hopsan models from Simulink. The simulink
tutorial, found in tutorial_simulink.pdf, will show you how to do this.
1
TMMS04
Hopsan Computer Lesson
2014 HT-1
Figure 1: The forklift component can be controlled either by hydraulic actuators or by force
and torque source components.
2.4
The Forklift Component
Later in the course you will do a project work to control the forks on a narrow aisle forklift.
In this project you will simulate the forks in Hopsan. This task will show you how Download
the file ForkLiftLib.zip from the course homepage. This file contains a Hopsan component
representing the forks on the forklift. Unzip it to a new directory. The component can be
loaded from Hopsan by clicking on "Load external library" in the library widget and selecting the
directory you created. When imported, the component appears under the "External Libraries"
folder.
Now create a new model and add the forks component. The component can either be
controlled by a hydraulic system, or by simply using force and torque source components, see
figure 1. Try to create a very simple auto-rotation by using force and torque sources with open
control (no feedback).
Hint: The initial position and angle can be modified by changing the x and a parameters.
Hint: Try the animation mode to view the result!
3
Conclusions
Simulation tools are commonly used in product development. Understanding the basics of
simulation is very important for engineers. Luckily, most programs are quite similar. If you
understand how to use one program, it is usually quite easy to learn another one.
2