Download and Installation
The latest version of the package can always be obtained from this page (https://faultdiagnosistoolbox.github.io/). The current version of the toolbox can be found in the zip-archive FaultDiagnosisToolbox_2017-09-08.zip and the current documentation (also included in the zip file) documentation.
The toolbox requires a Matlab v7.6 (R2008a) or later for the object-oriented functionality. Main functionality also requires the Symbolic Toolbox version 7.14 (2012a) or later.
If you use this toolbox in your research, please cite
Erik Frisk, Mattias Krysander, and Daniel Jung. “A Toolbox for Analysis and Design of Model Based Diagnosis Systems for Large Scale Models” IFAC World Congress, 2017. Toulouse, France, 2017.
You can also find more references to related work on our references page.
The installation procedure is very simple:
- Uncompress the zip-file
- Add the src directory to the Matlab-path
- (optional) There are C++ implementations of some computationally expensive algorithms. It is not necessary to compile these for the toolbox to work, there are Matlab implementations directly installed. However, with the compiled versions there might be significant increases in performance. See below for instructions
After the installation, head to the
examples directory to try out functionality or
look in the tutorials section of this site.
To compile the C++ sources, it is required that a functioning compiler
is installed and configured for use with Matlab. Instructions below
are directly applicable for Linux/MacOS systems. There are binaries
included in the distribution if you do not want to compile the sources
yourself. In the directory
binaries there are compiled files
for 64 bit Linux and MacOS. Copy the files corresponding to your system
src directory and hope for the best.
There are two algorithms that have C++ implementations; minimal hitting set and an MSO algorithm.
Minimal Hitting Set
To compile, open Matlab and go to the
src directory. To
compile, type (output from an
Verify that everything has worked by
The use of the compiled algorithm is optional, full functionality is obtained with the Matlab implementation of the minimal hitting set algorithm.
The MSO algorithm uses a library for computing with sparse matrices. The sparse matrix library is part of the software SuiteSparse and can be downloaded from http://faculty.cse.tamu.edu/davis/suitesparse.html. You do not have to compile and install the entire SuiteSparse library, only the CSparse part. The CSparse source is included in the zip-archive.
To install on a Linux or a MacOS system with developer tools installed, go to the CSparse directory and write at a terminal prompt, not in Matlab:
When the CSParse library is compiled, open Matlab and go to the
src directory and type:
On a Mac system, you might get warnings when linking due to different
deployment versions used by the Matlab compiler and the compiler used,
``ld: warning: object file
(../CSparse/Lib/libcsparse.a(cs_add.o)) was built for newer OSX
version (10.12) than being linked (10.9)’’. To avoid this warning,
recompile CSparse with the build version of Matlab by setting the
make to build CSparse.
Verify that everything has worked and the binary has been generated by
For Linux and MacOS there are pre-compiled versions and to install, copy the suitable files from the binaries directory into the src directory.