A common problem facing a lot of independent designers is the choice of tools they have for the simulation needs. “Do I need precise and fast help that a paid licence from MATLAB/Simulink offers, or can I work with a tool that has documentation mostly offered by its users?”
As with most answers in life, this one too is an, “It depends.” The final decision depends on the scope of the project, time limit and, may be, the depth of your pockets. In this article, we introduce you to a little simulator by the name of Xcos, developed by Scilab Enterprises.
What is Xcos and how it can help
Numerical simulation is very important for all designers, almost indispensable to the system design process. Instead of wasting money on real experiments like someone from 1980s, today it is all about simulations and their results. Complex phenomena like electrical and mechanical interactions are modelled at the smallest level, and today’s engineers know that they need to be aware of these techniques in order to be better than good at what they do.
Distributed along with Scilab, Xcos is a tool used to model and simulate hybrid dynamic systems. Users can model discrete as well as continuous and causal, as well as acausal, models on it along with being able to design, load, save, compile and simulate. Most commonly-used blocks, namely, signal processing, electrical systems, thermo-hydraulic systems, mathematical operations and much more, are available for use on Xcos. There are ways to import user-defined blocks that can be easily added to Xcos framework, which is flexible enough to handle all that.
Association of Scilab with LabView allows it access to numerous free gateways and links, which is critical for enhanced perfor-mance. It also connects to National Instruments’ NIDAQ module for better access to data-acquisition I/O devices.
Like other simulation, different blocks represent different functions, predefined or user-defined. Users can arrange these in order of requirement of the system and run the simulation to see the effects. Xcosis freely distributed under CeCILL v2 licence, and can be run on Windows, Linux and Mac OS X.
After launching Xcos, you can see two windows, namely, a palette browser, which houses all predefined blocks and an editing window where you can place the blocks and make requisite connections. To design a circuit, you can simply pick these up from the palette browser and drop it into the editing window. And, connect the blocks using their different ports, inputs, outputs and events so as to simulate the given circuit.
Features of Xcos
Xcos environment supports simulation as well as modelling, and its systems include the
Standard palettes and blocks
• Model building and editing
• Sub-modelling for models reuse and simplification
• Customisation of built models
• Simulation includes a built-in Modelica compiler and C code generation for better performance
Results analysis and visualisation
One of the major advantages of this tool is that, unlike certain simulators, Xcos is a visual editor and, hence, much easier to pick up for a novice than a simulator that requires to learn coding in a particular language. There is no doubt that when compared to MATLAB/Simulink, it is not as polished.
But, we must remember that the aim of Xcos is to introduce users to the world of simulation using a visual editor, and it is aimed mostly at students and academicians.
As mentioned earlier, simulation includes an integrated Modelica compiler and, hence, there is assurance of a legacy compiler for users’ needs. It also supports batch simulation, cutting down on wait time for them.
The ability to customise a template means that a high degree of flexibility and, as a result, the ability to customise a solution is achieved. Make no mistake, this is a great tool for beginners, but you would be surprised as to how quickly you can level up on this software. I am speaking from personal experience; I did not understand the basics of Simulink at one point.
A further advantage lies in the fact that it is very easy to share models on Xcos, as it is easy to get access to the modelling environment. MATLAB/Simulink tends to bring out the cost factor a bit more, as all collaborators on a team need to have a licensed version, which can stretch most budgets. This is never an issue to take lightly and is offset only if the licence is bought in bulk.
Regardless of other factors, if you are starting out in the area of visual editing and want software to help you ease into it.