Automatic Matlab and DIgSILENT
Automatic Matlab and DIgSILENT
Automatic Matlab and DIgSILENT
I created a simple example of automatic data exchange between Matlab and DIgSILENT that
could be modified according to the user needs. So, I attached two files, one is MatDIg.m file, which
contains the Matlab code for the automatic data exchange and where the user can design the algorithm
and the other is DIgMat.pfd file, that contains the power system model and the script (DIgMat script),
that contains the DIgSILENT code for the automatic data exchange. This communication between
software is realized throughout 2 .cvs files (Flag.csv and Data.csv).
Flag.csv - contains only one value (1 or 0). 1 - means that Matlab works and DIgSILENT
stays. 0 - means that Matlab stays and DIgSILENT works.
Data.csv - contains a vector of data and is divided in two. First 10 values can be filled with
variables that are necessary in the data exchange procedure, and from 11 forward are the variables of
interest that must be transferred in order to be used by DIgSILENT.
In figure, is represented the overall procedure.
Flag.csv
Matlab DIgSILENT
Data.csv
Obs.: to understand better the whole procedure, open these two files and follow the code carefully,
because it contains a large amount of comments regarding each sequence of code. Succes!