Sandhi Open Source Visual Programming Software...heightheight Sandhi Open Source Visual Programming...

26
ht Sandhi Open Source Visual Programming Software Ambikeshwar Srivastava FOSSEE, IIT Bombay Manoj Gudi CTO, Focus Analytics December 16, 2015 Sandhi Team, IIT Bombay Sandhi 1/26

Transcript of Sandhi Open Source Visual Programming Software...heightheight Sandhi Open Source Visual Programming...

Page 1: Sandhi Open Source Visual Programming Software...heightheight Sandhi Open Source Visual Programming Software Ambikeshwar Srivastava FOSSEE, IIT Bombay Manoj Gudi CTO, Focus Analytics

heightheight

SandhiOpen Source Visual Programming Software

Ambikeshwar SrivastavaFOSSEE, IIT Bombay

Manoj GudiCTO, Focus Analytics

December 16, 2015

Sandhi Team, IIT Bombay Sandhi 1/26

Page 2: Sandhi Open Source Visual Programming Software...heightheight Sandhi Open Source Visual Programming Software Ambikeshwar Srivastava FOSSEE, IIT Bombay Manoj Gudi CTO, Focus Analytics

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

Page 3: Sandhi Open Source Visual Programming Software...heightheight Sandhi Open Source Visual Programming Software Ambikeshwar Srivastava FOSSEE, IIT Bombay Manoj Gudi CTO, Focus Analytics

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

Page 4: Sandhi Open Source Visual Programming Software...heightheight Sandhi Open Source Visual Programming Software Ambikeshwar Srivastava FOSSEE, IIT Bombay Manoj Gudi CTO, Focus Analytics

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

Page 5: Sandhi Open Source Visual Programming Software...heightheight Sandhi Open Source Visual Programming Software Ambikeshwar Srivastava FOSSEE, IIT Bombay Manoj Gudi CTO, Focus Analytics

heightheight

Development of Sandhi

GNU RadiosciscipyGRAS

Sandhi Team, IIT Bombay Sandhi 5/26

Page 6: Sandhi Open Source Visual Programming Software...heightheight Sandhi Open Source Visual Programming Software Ambikeshwar Srivastava FOSSEE, IIT Bombay Manoj Gudi CTO, Focus Analytics

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

Page 7: Sandhi Open Source Visual Programming Software...heightheight Sandhi Open Source Visual Programming Software Ambikeshwar Srivastava FOSSEE, IIT Bombay Manoj Gudi CTO, Focus Analytics

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

Page 8: Sandhi Open Source Visual Programming Software...heightheight Sandhi Open Source Visual Programming Software Ambikeshwar Srivastava FOSSEE, IIT Bombay Manoj Gudi CTO, Focus Analytics

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

Page 9: Sandhi Open Source Visual Programming Software...heightheight Sandhi Open Source Visual Programming Software Ambikeshwar Srivastava FOSSEE, IIT Bombay Manoj Gudi CTO, Focus Analytics

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

Page 10: Sandhi Open Source Visual Programming Software...heightheight Sandhi Open Source Visual Programming Software Ambikeshwar Srivastava FOSSEE, IIT Bombay Manoj Gudi CTO, Focus Analytics

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

Page 11: Sandhi Open Source Visual Programming Software...heightheight Sandhi Open Source Visual Programming Software Ambikeshwar Srivastava FOSSEE, IIT Bombay Manoj Gudi CTO, Focus Analytics

heightheight

Sandhi GUI

Figure 5 : Sandhi GUI

Sandhi Team, IIT Bombay Sandhi 11/26

Page 12: Sandhi Open Source Visual Programming Software...heightheight Sandhi Open Source Visual Programming Software Ambikeshwar Srivastava FOSSEE, IIT Bombay Manoj Gudi CTO, Focus Analytics

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

Page 13: Sandhi Open Source Visual Programming Software...heightheight Sandhi Open Source Visual Programming Software Ambikeshwar Srivastava FOSSEE, IIT Bombay Manoj Gudi CTO, Focus Analytics

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

Page 14: Sandhi Open Source Visual Programming Software...heightheight Sandhi Open Source Visual Programming Software Ambikeshwar Srivastava FOSSEE, IIT Bombay Manoj Gudi CTO, Focus Analytics

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

Page 15: Sandhi Open Source Visual Programming Software...heightheight Sandhi Open Source Visual Programming Software Ambikeshwar Srivastava FOSSEE, IIT Bombay Manoj Gudi CTO, Focus Analytics

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

Page 16: Sandhi Open Source Visual Programming Software...heightheight Sandhi Open Source Visual Programming Software Ambikeshwar Srivastava FOSSEE, IIT Bombay Manoj Gudi CTO, Focus Analytics

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

Page 17: Sandhi Open Source Visual Programming Software...heightheight Sandhi Open Source Visual Programming Software Ambikeshwar Srivastava FOSSEE, IIT Bombay Manoj Gudi CTO, Focus Analytics

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

Page 18: Sandhi Open Source Visual Programming Software...heightheight Sandhi Open Source Visual Programming Software Ambikeshwar Srivastava FOSSEE, IIT Bombay Manoj Gudi CTO, Focus Analytics

heightheight

Architecture

Figure 10 : Sandhi Architecture

Sandhi Team, IIT Bombay Sandhi 18/26

Page 19: Sandhi Open Source Visual Programming Software...heightheight Sandhi Open Source Visual Programming Software Ambikeshwar Srivastava FOSSEE, IIT Bombay Manoj Gudi CTO, Focus Analytics

heightheight

Closed Loop System

Figure 11 : Ancient Wisdom

Sandhi Team, IIT Bombay Sandhi 19/26

Page 20: Sandhi Open Source Visual Programming Software...heightheight Sandhi Open Source Visual Programming Software Ambikeshwar Srivastava FOSSEE, IIT Bombay Manoj Gudi CTO, Focus Analytics

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

Page 21: Sandhi Open Source Visual Programming Software...heightheight Sandhi Open Source Visual Programming Software Ambikeshwar Srivastava FOSSEE, IIT Bombay Manoj Gudi CTO, Focus Analytics

heightheight

Being Pythonic

Figure 12 : Really ancient wisdom

Sandhi Team, IIT Bombay Sandhi 21/26

Page 22: Sandhi Open Source Visual Programming Software...heightheight Sandhi Open Source Visual Programming Software Ambikeshwar Srivastava FOSSEE, IIT Bombay Manoj Gudi CTO, Focus Analytics

heightheight

Pythonic Sandhi

Figure 13 : Work Function Codesnippet

Sandhi Team, IIT Bombay Sandhi 22/26

Page 23: Sandhi Open Source Visual Programming Software...heightheight Sandhi Open Source Visual Programming Software Ambikeshwar Srivastava FOSSEE, IIT Bombay Manoj Gudi CTO, Focus Analytics

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

Page 24: Sandhi Open Source Visual Programming Software...heightheight Sandhi Open Source Visual Programming Software Ambikeshwar Srivastava FOSSEE, IIT Bombay Manoj Gudi CTO, Focus Analytics

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

Page 25: Sandhi Open Source Visual Programming Software...heightheight Sandhi Open Source Visual Programming Software Ambikeshwar Srivastava FOSSEE, IIT Bombay Manoj Gudi CTO, Focus Analytics

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

Page 26: Sandhi Open Source Visual Programming Software...heightheight Sandhi Open Source Visual Programming Software Ambikeshwar Srivastava FOSSEE, IIT Bombay Manoj Gudi CTO, Focus Analytics

heightheight

THANK YOU

Sandhi Team, IIT Bombay Sandhi 26/26