Sandhi Open Source Visual Programming Software...heightheight Sandhi Open Source Visual Programming...
Transcript of Sandhi Open Source Visual Programming Software...heightheight Sandhi Open Source Visual Programming...
heightheight
SandhiOpen Source Visual Programming Software
Ambikeshwar SrivastavaFOSSEE, IIT Bombay
Manoj GudiCTO, Focus Analytics
December 16, 2015
Sandhi Team, IIT Bombay Sandhi 1/26
heightheight
Introduction
Sandhi is a visual programming editor based on GNURadioBasic data structure in sandhi is the flowgraphIt has been named Sandhi as it means connecting andconveys our idea of connecting various blocks to come upwith a robust visual programSandhi is aimed to become a visual programming tool forreplacing LabVIEW
Sandhi Team, IIT Bombay Sandhi 2/26
heightheight
Flowgraph
Flowgraph represents the connections of the blocksthrough which a continuous stream of samples flowsThe concept of a flowgraph is an acyclic directional graph:
with one or more source blocks (to insert samples into theflowgraph)one or more sink blocks (to terminate or export samplesfrom the flowgraph) andany functional blocks in between.
Figure 1 : Flowgraph
Sandhi Team, IIT Bombay Sandhi 3/26
heightheight
Motivation to develop Sandhi
Lack of proper open source alternative to LabVIEW.Expensive proprietary software.Being FOSS, it gives you freedom to modify, share and sellyour application without any permission.
Sandhi Team, IIT Bombay Sandhi 4/26
heightheight
Development of Sandhi
GNU RadiosciscipyGRAS
Sandhi Team, IIT Bombay Sandhi 5/26
heightheight
GNU Radio
GNU Radio is a free and open-source softwaredevelopment toolkit that provides signal processing blocksto implement software radios.Supposed to be used by the Electrical Engineeringcommunity for the purpose of digital signal processingIt has a rich module of implemented device drivers andthereby supports a range of devices
Sandhi Team, IIT Bombay Sandhi 6/26
heightheight
Why GNU Radio?
GNURadio is a very promising visual programming toolas:
it make very easy for the developer to abstract his codeprovides a very easy to use framework to the developerit is open source
Sandhi Team, IIT Bombay Sandhi 7/26
heightheight
sciscipy
Sciscipy is an Application Programming InterfaceAimed for Inter Process Communication with scilab whenin workspace of Python programming language
Sample Code:from scilab import Scilabsci = Scilab()x = sci.rand(20, 20)y = x*x.transpose()y inv = sci.inv(y)
Sandhi Team, IIT Bombay Sandhi 8/26
heightheight
GRAS
GRAS stands for GNU Radio Advanced SchedulerIt was impossible to implement the feedback with GNURadio, which uses stock application schedular
Note: Application Scheduler is responsible for threading, controllingthe data flow and managing the use of the computer resources likeprocessor time to various processes.
Sandhi Team, IIT Bombay Sandhi 9/26
heightheight
Blocks in sandhi
Blocks are the basic building component of flowgraphBlocks have the property written in C++ or Python
Figure 2 : Source
Figure 3 : Process
Figure 4 : Sink
Sandhi Team, IIT Bombay Sandhi 10/26
heightheight
Sandhi GUI
Figure 5 : Sandhi GUI
Sandhi Team, IIT Bombay Sandhi 11/26
heightheight
How to create a block
One can create a customized block with knowledge of C++or PythonBlock developer have access to any library available inPythonThere are two files needed to create a block in sandhi:
Functionality written in C++ or PythonProperties written in xml file
Sandhi Team, IIT Bombay Sandhi 12/26
heightheight
Work Flow
Block: A functional processing unit with inputs andoutputs.port: A single input or output of a block.Source: A producer of data.Sink: A consumer of data.
Sandhi Team, IIT Bombay Sandhi 13/26
heightheight
Features
Applications based on flowgraph can be created in sandhiby connecting blocks as per requirementIn sandhi user can create their own customized blocksusing GNU Radio APIIt is capable of passing any practical types of data betweenblocks
Sandhi Team, IIT Bombay Sandhi 14/26
heightheight
Features
User can use scilab script in flowgraph for computationusing sciscipy wrapperFlowgraph with feedback can be create using GRASSandhi provides nice GUI to plot or show data.User can also change value in real time using slider.
Sandhi Team, IIT Bombay Sandhi 15/26
heightheight
Experiments on sandhi: Data Aquisition
Single Board Heater System(SBHS) can controlled usingsandhiUsing Python serial library, one can set the fan,heat valueto SBHS and receive temperature value from SBHS
Figure 6 : SBHS setup Figure 7 : Output Window withslider
Sandhi Team, IIT Bombay Sandhi 16/26
heightheight
Experiments on sandhi: step response of transferfunction
To perform step response the flowgraph is created asfollowsFlowgraph uses Numerator, Denomenator, Response andplot-sink blockThese blocks has been written in Python and response ofsystem is calculated in scilab using sciscipy in Responseblock
Figure 8 : Flowgraph Figure 9 : Output Plot
Sandhi Team, IIT Bombay Sandhi 17/26
heightheight
Architecture
Figure 10 : Sandhi Architecture
Sandhi Team, IIT Bombay Sandhi 18/26
heightheight
Closed Loop System
Figure 11 : Ancient Wisdom
Sandhi Team, IIT Bombay Sandhi 19/26
heightheight
GRAS: GNU Radio Advanced Scheduler
Written by Josh Blum ([email protected])It is application schedulerHandles how the blocks(computational entity) should beformed, scheduledProvides easy API to write our own blocks in PythonUses Theron, PMC, Apology etc. libraries
Sandhi Team, IIT Bombay Sandhi 20/26
heightheight
Being Pythonic
Figure 12 : Really ancient wisdom
Sandhi Team, IIT Bombay Sandhi 21/26
heightheight
Pythonic Sandhi
Figure 13 : Work Function Codesnippet
Sandhi Team, IIT Bombay Sandhi 22/26
heightheight
Ongoing work
Shifting to cloud based architecture(using RPC)A client side containing smaller GRC, runtimeenvironmentServer side containing heaviy librariesPrototyped using RabbitMQ’s RPC service(AMQP)Should work well for heavy simulations (if not realtimeapp)Functional block generator
Sandhi Team, IIT Bombay Sandhi 23/26
heightheight
References/Links
Source codehttps://github.com/gnu-sandhi/sandhi.git
Documentationhttps://github.com/gnu-sandhi/docs.git
Problems using it? Found a bug?Are you sure its a bug and not a feature?Raise an issue on our githubMailing List: gnu [email protected]
Sandhi Team, IIT Bombay Sandhi 24/26
heightheight
Contact Us
If you are interested to contribute please write to us [email protected] through our website sandhi.fossee.inYou can post your queries on Forums at forums.fossee.in
Sandhi Team, IIT Bombay Sandhi 25/26
heightheight
THANK YOU
Sandhi Team, IIT Bombay Sandhi 26/26