octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Octave-Scilab co-simulation toolbox


From: Romanov Alexey
Subject: Octave-Scilab co-simulation toolbox
Date: Tue, 17 Nov 2015 13:38:56 +0300

Hi,
I've finished sci_cosim toolbox. The main idea of this toolbox is to add the 
Simulink functionality into Octave.  From the point of view of a researcher 
Simulink is an external application for MATLAB, that just shares common 
variable workspace. As you now the most featured open source Simulink 
alternative is xcos from Scilab. I tried to use Scilab as my main tool, but its 
quite different from Octave. Also there is no working debugger in Scilab. So 
I've decided to use xcos as an alternative for Simulink and Octave as an 
alternative for MATLAB, and write toolbox for variable exchange between those 
programs workspaces.

To use sci_cosim you will need octave 4.0.0 with sockets toolbox, and Scilab 
5.5.2 with Toolbox Backdoor (could be added by ATOMS package manager from 
Technical category). 

sci_cosim toolbox has few functions and very simple to use.

First you should manually run both Octave and Scilab. Also check that Toolbox 
Backdoor was correctly loaded in SciLab. It should write "BackDoor: listening 
to connections on TCP port 28020" in Scilab console during startup.

Once per session you should run  sci_connect  function in Octave to connect to 
Scilab. In the end of session you should disconnect from Scilab using 
sci_disconnect

After that you can transfer any variables to Scilab workspace using  sci_setvar 
function, and back from Scilab to Octave workspace using  sci_getvar function;
Also you can set variables and even  execute commands in Scilab with sci_cmd 
function.

And of course you can start xcos simulation from Octave using  sci_sim  
function, same as Simulink simulation could be started using sim command.

With sci_cosim toolbox you can use only xcos without using Scilab scripting for 
your simulations. 

sci_sim_example.m contains simple example of sci_cosim toolbox usage. To run it 
correct, sci_sim_example.m and sci_ap_model.xcos should be in Octave's current 
directory.

On my PC there wasn't any critical perfomance changes between running xcos 
simulation from Octave and Scilab scripts.

Toolboxs prepared package and source code can be found on 
https://github.com/amromanov/sci_cosim
 
Do not hesitate to contact me in case of any questions or bugs found.

Alexey Romanov



reply via email to

[Prev in Thread] Current Thread [Next in Thread]