MAS601 Design, Modelling and Simulation of Mechatronic Systems, Semester 2, 2017. Page: 1 MAS601 Design, Modeling & Simulation Hardware-In-the-Loop Simulation Bond Graph 20-Sim Siemens PLC ET200S G. Hovland
MAS601 Design, Modelling and Simulation of Mechatronic Systems, Semester 2, 2017. Page: 2 What is Hardware-In-the-Loop verification?
MAS601 Design, Modelling and Simulation of Mechatronic Systems, Semester 2, 2017. Page: 3 V-Model for Product Development System Definition System Testing Rapid Prototyping Hardware-inthe-Loop Testing Targeting An increasing number of companies include HILtesting as a part of FAT (Factory Acceptance Test)
MAS601 Design, Modelling and Simulation of Mechatronic Systems, Semester 2, 2017. Page: 4 From DNV's website As a leading class society, DNV is confident that HIL is the best test method currently available and represents a significant step forward, says Rysst and concludes Indeed, the process may well become the industry standard, and compared to today s maritime test standards, enable a significantly improved testing regime. HIL also has the capacity to make systems safer. For these reasons, DNV is committed to HIL testing.
MAS601 Design, Modelling and Simulation of Mechatronic Systems, Semester 2, 2017. Page: 5 Some Advantages of HIL Testing Reduced need for expensive prototypes Controller design can be started early, in parallel with mechanical/hydraulic design Possibility for more interaction between control engineering discipline and mechanical/hydraulic disciplines at the design-stage (mechatronics) Unlikely situations can be tested (ex. failures and redundancy) The controller s response to sensor failures can be simulated and tested Potential for reducing commissioning time and costs Increased focus on modelling can be an enabler for remote diagnostics and tuning
MAS601 Design, Modelling and Simulation of Mechatronic Systems, Semester 2, 2017. Page: 6 Why use the Bond Graph to Create a HIL simulator? Algebraic loops can be completely removed, even for large and complicated models. Preferred causality on R elements. Models containing no algebraic loops can easily be simulated on relatively simple hardware, such as a PLC. PLCs are robust and, hence, the simulator can be used in rough environments, for example offshore. No need for high-performance CPU power, such as a dedicated real-time PC. Siemens ET200S with IO modules. Will be used to simulate Bond Graph Models.
MAS601 Design, Modelling and Simulation of Mechatronic Systems, Semester 2, 2017. Page: 7 Hardware setup Siemens PLC ET 200S 2. Hardware setup in Step 7 for PLC ET 200S Start up TIA Portal Click on «Create new project«enter a name for your project (e.g. PLC_setting ) and click Create" to confirm.
MAS601 Design, Modelling and Simulation of Mechatronic Systems, Semester 2, 2017. Page: 8 Hardware setup Siemens PLC ET 200S Click on Add new device Select PLC IM 151-8 PN/DP F-CPU Note: We have two CPU types in the lab, 8FB00 and 8FB01.
MAS601 Design, Modelling and Simulation of Mechatronic Systems, Semester 2, 2017. Page: 9 Hardware setup Siemens PLC ET 200S Click on Device Configuration Setup the ethernet address to 192.168.0.1
MAS601 Design, Modelling and Simulation of Mechatronic Systems, Semester 2, 2017. Page: 10 Hardware setup Siemens PLC ET 200S 2. Configuring the remaining HW The CPU is always placed in slot 2. If you have a Power supply, then this can be configured in slot 1. Slot 3 is reserved for an Interface Module (IM), e.g. if you need additional Profinet ports, etc. The Power module PM-E (power to units on the bus) is inserted in slot 4 by selecting slot 4 and double-clicking on the module
MAS601 Design, Modelling and Simulation of Mechatronic Systems, Semester 2, 2017. Page: 11 Hardware setup Siemens PLC ET 200S 2. Configuring the remaining HW Then the 2 DO, 3 DI, 2 AI and 1 AO units are inserted in slots 5-12.
MAS601 Design, Modelling and Simulation of Mechatronic Systems, Semester 2, 2017. Page: 12 Hardware setup Siemens PLC ET 200S Click on the Compile button Check for errors and warnings 2. Establishing contact between PC and PLC
MAS601 Design, Modelling and Simulation of Mechatronic Systems, Semester 2, 2017. Page: 13 Hardware setup Siemens PLC ET 200S The programming device (your PC) must be connected to the IM 151-8 PN/DP CPU interface module. Often an MPI interface is default and we have to change to TCP/IP (Auto). Click on the Refresh button to find the IP address of the PLC Select the PLC in the list of Accessible devices, module type, etc. is assigned to a IP address for the PLC. Click on Load and the hardware configuration is downloaded into the PLC.
MAS601 Design, Modelling and Simulation of Mechatronic Systems, Semester 2, 2017. Page: 14 Hardware setup Siemens PLC ET 200S Select the download option Accept modules different version firmware Load and click Finish
MAS601 Design, Modelling and Simulation of Mechatronic Systems, Semester 2, 2017. Page: 15 Hardware setup Siemens PLC ET 200S Exercise Connect the PC and PLC Start Step 7 and create a project PLC_setting Define the hardware structure in the project. Compile, save and download into the PLC
MAS601 Design, Modelling and Simulation of Mechatronic Systems, Semester 2, 2017. Page: 16 Siemens SCL: Add New Blocks FC = Function without memory FB = Function with memory (DB)
MAS601 Design, Modelling and Simulation of Mechatronic Systems, Semester 2, 2017. Page: 17 Bond Graph: 0-Junction with 3 inputs as FC f2 f3 Positive sign means into the bond SCL Language
MAS601 Design, Modelling and Simulation of Mechatronic Systems, Semester 2, 2017. Page: 18 Bond Graph: 0-Junction with 4 inputs as FC e 1 e 2 f 2 e 3 0 f 1 e 4 f 4 f 3 e 1 = e 2 = e 3 = e 4 f 1 = f 2 f 3 f 4 f2 f3 f4
MAS601 Design, Modelling and Simulation of Mechatronic Systems, Semester 2, 2017. Page: 19 Bond Graph: 1-Junction with 3 inputs as FC
MAS601 Design, Modelling and Simulation of Mechatronic Systems, Semester 2, 2017. Page: 20 Bond Graph: 1-Junction with 4 inputs as FC e 1 e 2 f 2 e 3 1 f 1 e 4 f 4 f 3 f 2 = f 3 = f 4 =f 1 e 1 = e 2 e 3 e 4
MAS601 Design, Modelling and Simulation of Mechatronic Systems, Semester 2, 2017. Page: 21 Bond Graph: Capacitor as FB and DB (Integral Causality) e f C
MAS601 Design, Modelling and Simulation of Mechatronic Systems, Semester 2, 2017. Page: 22 Bond Graph: Inductor as FB and DB (Integral Causality) e f I
MAS601 Design, Modelling and Simulation of Mechatronic Systems, Semester 2, 2017. Page: 23 Bond Graph: Transformer as FC (causality 1) e 1 e TF 2 f 1 f 2
MAS601 Design, Modelling and Simulation of Mechatronic Systems, Semester 2, 2017. Page: 24 Bond Graph: Transformer as FC (causality 2) e 1 e TF 2 f 1 f 2
MAS601 Design, Modelling and Simulation of Mechatronic Systems, Semester 2, 2017. Page: 25 Bond Graph: Gyrator as FC (causality 1) e 1 e GY 2 f 1 f 2
MAS601 Design, Modelling and Simulation of Mechatronic Systems, Semester 2, 2017. Page: 26 Bond Graph: Gyrator as FC (causality 2) e 1 e GY 2 f 1 f 2
MAS601 Design, Modelling and Simulation of Mechatronic Systems, Semester 2, 2017. Page: 27 Bond Graph: Resistor (causality 1) e f R
MAS601 Design, Modelling and Simulation of Mechatronic Systems, Semester 2, 2017. Page: 28 Bond Graph: Resistor (causality 2) e f R
MAS601 Design, Modelling and Simulation of Mechatronic Systems, Semester 2, 2017. Page: 29 Bond Graph: Example 2 3 4 5 Data-Block 1
MAS601 Design, Modelling and Simulation of Mechatronic Systems, Semester 2, 2017. Page: 30 Bond Graph: Simulation in 20-Sim
MAS601 Design, Modelling and Simulation of Mechatronic Systems, Semester 2, 2017. Page: 31 Bond Graph: Initialisation of variables in OB100
MAS601 Design, Modelling and Simulation of Mechatronic Systems, Semester 2, 2017. Page: 32 Bond Graph: Implementation as FBD in OB35
MAS601 Design, Modelling and Simulation of Mechatronic Systems, Semester 2, 2017. Page: 33 Bond Graph: OB35 Network 3
MAS601 Design, Modelling and Simulation of Mechatronic Systems, Semester 2, 2017. Page: 34 Bond Graph: Go Online Steady-State Results (DB1) Steady State Flow f 5 = 1.0 (same as in 20-Sim)
MAS601 Design, Modelling and Simulation of Mechatronic Systems, Semester 2, 2017. Page: 35 PC Station Add a PC Station with network card and WinCC RT Advanced. Set the IP address to: 192.168.0.2 (important). Otherwise, conflict with PLC which has 192.168.0.1
MAS601 Design, Modelling and Simulation of Mechatronic Systems, Semester 2, 2017. Page: 36 PC Station Change name of PC Station to the same as the Windows PC. In UiA labs: MECHATRONICS Add a new screen: Main Double-click on Runtime Settings: Turn off «Full-screen mode»
MAS601 Design, Modelling and Simulation of Mechatronic Systems, Semester 2, 2017. Page: 37 PC Station: Main Screen Insert a Trend Display Right-click: Properties Create a new Trend: Tag: DB1 f5 Trend values = 999 Left value axis: Axis end = 2 f5 = Speed of motor
MAS601 Design, Modelling and Simulation of Mechatronic Systems, Semester 2, 2017. Page: 38 PC Station Check HMI Connection under: Devices and Networks: Network View
MAS601 Design, Modelling and Simulation of Mechatronic Systems, Semester 2, 2017. Page: 39 WinCC RT Advanced To start the HMI, click on «RT» Switch the PLC to Run and check the step-response Should be the same as in in 20-Sim.
MAS601 Design, Modelling and Simulation of Mechatronic Systems, Semester 2, 2017. Page: 40 Analog Input (Potmeter) as Source: Se Add variable in DB1 Type: PIW352
MAS601 Design, Modelling and Simulation of Mechatronic Systems, Semester 2, 2017. Page: 41 WinCC RT Advanced: Main Screen Change: Axis end = 10. Vary Se input (Potmeter) The pot.meter controls the input voltage (Se) in the Bond Graph.
MAS601 Design, Modelling and Simulation of Mechatronic Systems, Semester 2, 2017. Page: 42 WinCC RT Advanced: Main Screen More HMI Elements f5 (Trend, Black) Signal_1 (Trend, red) Signal_1 (Gauge) Circle (Tag on I3.0) Animation (red,blue) Set HMI Tags: Acquisition Cycle = 100ms
MAS601 Design, Modelling and Simulation of Mechatronic Systems, Semester 2, 2017. Page: 43 Further Exercises: Optional Implement these first in 20-Sim, then on the PLC. Compare the responses. Use first Se=1.0, then use Analog Input (Potmeter) as source.