VILLASframework
Modular co-simulation framework
MATLAB

Source code: http://git.rwth-aachen.de/acs/public/villas/node/tree/master/clients/matlab

MATLAB (matrix laboratory) is a multi-paradigm numerical computing environment and proprietary programming language developed by MathWorks. MATLAB allows matrix manipulations, plotting of functions and data, implementation of algorithms, creation of user interfaces, and interfacing with programs written in other languages, including C, C++, C#, Java, Fortran and Python.

Integration of MATLAB with VILLASnode is relatively is relatively easy by using MATLABs Instrument Control Toolbox. The Instrument Control Toolbox provides a udp() function which can be used to open UDP/IP connections to remote systems like VILLASnode.

Note: Please note that MATLAB is usally not suited for real-time operation. Please have a look at OPAL-RTs RT-Lab environement if real-time execution is a requirement.

Example

Please have a look at the clients/matlab/ directory for an exemplary VILLASnode configuration file and MATLAB code.

You can run this example by execution this receiver script in your MATLAB prompt and starting VILLASnode by running the follwing command in your shell:

villas-node villas.conf

Output

The following figure shows the output of the MATLAB plot() function with the signals generated by VILLASnodes Signal Generator node-type.

villas_matlab_siggen.png