Qualtech Systems Inc. Modeling Converter
1
Team 1702 Jay Meyer EE Andrew Morse EE/CSE Brandon Singleton CSE William Salguero EE
Qualtech Systems Inc. Modeling Converter Team 1702 Jay Meyer EE - - PowerPoint PPT Presentation
Qualtech Systems Inc. Modeling Converter Team 1702 Jay Meyer EE Andrew Morse EE/CSE Brandon Singleton CSE William Salguero EE 1 Overview Introduction Background Qualtech Systems Inc. (QSI) Simulink vs TEAMS Designer
1
Team 1702 Jay Meyer EE Andrew Morse EE/CSE Brandon Singleton CSE William Salguero EE
▶ Introduction ▶ Background
▶ Qualtech Systems Inc. (QSI) ▶ Simulink vs TEAMS Designer ▶ Languages (XML, Java)
▶ Design Implementation and Results
▶ XSL Stylesheet Design ▶ Model Verifier Design ▶ Conclusion
2
▶ Developer of the TEAMS family of modeling and diagnostic software
▶
TEAMS-Designer
▶
TEAMS-RDS (Remote Diagnostic Server)
▶
And more ...
▶ TEAMS-Designer provides system and component inputs, outputs, fault
conditions, dependencies, and tests.
▶ Links potential failures to the system’s built-in tests, troubleshooting steps,
and repair procedures.
3
▶ Useful for abstracting the design and implementation of complex systems
prior to and after delivery.
▶ Both QSI’s TEAMS-Designer and MatLab’s Simulink allow for the use of
modeling components (modules) to represent real hardware.
▶ Simulink’s library of components is large but lacks a simple way of
performing fault detection and correction.
▶ TEAMS-Designer is a simpler modeling system that is focused on fault
detection, error correction, and troubleshooting.
4
▶ Model consisting of submodules,links, and ports.
5
▶ Same model in Simulink
6
▶ TEAMS-Designer and Simulink are similar but inherently incompatible ▶ The underlying theory of modeling software applies to both
▶ Abstraction of components as modules ▶ Use of links to show connections and signal flow
▶ Similar hierarchical structure
▶ Modules > submodules
▶ Reduce (or eliminate) the amount of duplicate modeling work
▶ Many of QSI’s customers use Simulink ▶ QSI employees must manually recreate the Simulink models
7
Simulink Model XML
Transforming Document
XSLT
Converter/ Transformer Java
Extension Functions
Verifier Java
TEAMS Model
XML
▶ What is XML?
▶ Similar to HTML as they both are used to represent information ▶ Industry standard markup language for formatting and common use ▶ Supported by both Simulink and TEAMS-Designer
▶ How do Simulink and TEAMS-Designer utilize XML?
▶ Both have the ability to import and export modeling information in XML format
9
▶ XSL
▶ Made of three parts those but we use only two being XSLT and Xpath ▶ XSLT is the main part of the XSL that helps transform one XML to another XML or HTML ▶ Xpath is a language used by the XSLT to seek and refer to parts in the XML for info ▶ We used this find specific blocks and and references in our SImulink model
▶ XSLT (Converter Module)
▶ The document that allows for XML transformations (conversions) ▶ Conversion programs take an XSL and original XML as inputs and outputs a new XML in the target style
▶ in our case repackages it into a .tmsx file to be opened on TEAMS
▶ Java functions can be integrated into an XSL ▶ Useful for defining custom functions (unique algorithms or quick math) ▶ Essential for passing variables between layers in the transformation ▶ Created an entire arraylist structure to hold variables and information from the source XML ▶ Also used to create the Model Verifier ▶ Separate Java project element called JAXB
11
▶ Some models can be huge ▶ Hundreds of modules, tens of layers for each module ▶ Difficult to visually compare transform at this size ▶ Has to be separate from the XSLT ▶ Avoid a bias comparison by using different tools ▶ Output only relevant model information in user friendly format
12
▶ Takes 2 XML files with specific formats (Simulink and TEAMS) and looks at: ▶ Modules/Blocks ▶ Ports ▶ Lines/Links ▶ Test-Point/Scopes ▶ Checks for consistency of names, hierarchy and connections for each of the above ▶ Returns true or false for overall success ▶ Outputs list of both model’s contents ▶ But how do we compare 2 XMLs without XSL?
13
▶ JAXB is a framework that allows users to map Java Classes to XML elements ▶ JAXB has Unmarshalling: XML -> Java Objects
15
▶ Designed in Oxygen XML Editor
▶ XSL Debugging environment
▶ Structured as 1 main XSL document with several supporting XSL files ▶ Java integrated through 1 supporting Jar file ▶ Once completed, transfer to new, final environment
▶ Saxonica EE is a professional environment to run XSL Transforms ▶ Can be controlled through command line ▶ End goal for our transform process
16
17
▶ Several factors went into a successful transformation ▶ Finding and saving all of the relevant information in the Simulink XML
▶ Overall model information
▶
Top layer ports, canvas size, metadata, etc.
▶ Specific module information
▶
Module type, location, size, ports, etc.
▶ Saved using implemented Java arraylist structure
▶ Saving all data into a new format recognizable by TEAMS Designer ▶ Error recognition
▶ What to do if something new happens (new format, module type, etc.) ▶ Goal is to have it still finish even if it cannot understand something
18
▶ Script was written to increase efficiency of transform ▶ Written in Powershell, saved with all necessary XSL and Java files into an EXE ▶ When run it extracts to a temporary folder
▶ Takes user input of Simulink XML source file location ▶ Utilizes Saxon EE to run transform on source file ▶ Packages into TMSX file type and saves in source location ▶ Cleans up and deletes all temp files/folders on exit
▶ Significant step, XSL Stylesheets had to be updated for the new environment
19
▶ Started small, gradually creating and testing more and more complex models
▶ First model, empty canvas ▶ Slowly integrated ports, different layers, different module types, etc.
▶ Final complex testing model included everything possible that could be tested ▶ Lots of visual testing at first (running transform, opening file and comparing)
20
21
22
▶
Successfully completed all goals and satisfied mission statement set at beginning of this project
▶
XSL Transform
▶
Model Verifier
▶
Packaged all pieces up into one executable
▶
When run, performs all steps efficiently and displays any errors to user
▶
Outputs transformed TMSX file and relevant verifier data
23
24
25