Electronic Design and Automation Lab: Migration to Scilab

The third semester B.Tech Electronics and Communication Engineering programme of Kerala Technological University (KTU) has a lab course on electronic design and automation. The course aims to introduce the students to various electronic design and simulation tools like SPICE, MATLAB and HDL.

diode

I had proposed the migration of the MATLAB section of this lab course to SCILAB, a popular open source alternative to MATLAB. The migration is now complete with support from FOSSEE . The source code of the experiments are now available here. A detailed lab manual will be made available soon.

spiral

 

FOSS migration of electronic circuit simulation lab

My proposal for migrating basic electronic circuit simulation lab to the FOSS tool eSim has been approved. The source code and documentation of experiments can now be downloaded from here.

eSim is an open source EDA tool for circuit design, simulation, analysis and PCB design. eSim is developed by FOSSEE (Free and Open Source Software for Education) – an initiative of MHRD, Govt. of India. FOSSEE promotes the migration of labs in educational institutions from proprietary tools to FOSS only ones through lab migration projects.

I am really happy to have become a part of this project. You can read my previous post on eSim usage here.

Feedback on KTU Syllabus of Electronics and Communication Engineering

Kerala Technological University (KTU) published a draft syllabus for the third and fourth semesters of Electronics and Communication Engineering for the coming academic year. It raised widespread concerns regarding:

  • The depth and vastness of contents
  • The obsoleteness of contents
  • Sequence of introducing concepts and the pedagogy involved
  • FOSS friendliness

To discuss the matter and collect feedback from a wider academic community, KTU called for a syllabi discussion meeting at its office on 13th May, 2016. More than a hundred faculties from various engineering colleges in Kerala came over and expressed their genuine concerns, comments and suggestions. I got opportunity to attend the same.

The syllabi committee agreed to wait till 20th May, to receive more comments before they publish the revised draft by 25th of May. Theare collaboratively created document on the changes to be incorporated to the content of various courses can be found here.

Concerns on Electronic Design Automation Lab

As per the draft syllabi published, KTU plans to introduce a new course ‘ELECTRONICS DESIGN AUTOMATION LAB’ to its third Semester Electronics and Communication Engineering syllabus. Its well and good to familiarize the software tools needed to automate many tasks like design and simulation of electronic circuits, introduction to numerical computations, PCB Designing, Hardware Description using HDL etc.

Many pedagogical concerns were raised in the meeting about the introduction of all these diverse EDA tools as a single course. The need of the tools should be obvious to the students while they learn it. It was proposed that SPICE simulations should go along with the Network Theory and Electronic Circuits. Also Logic Circuit Design should be taught with the aid of HDL.

What is more of  a concern is that the syllabus is not FOSS friendly. It clearly specifies some proprietary tools like MATLAB for numerical computation, analysis and plotting. It specifies PSICE for electronic circuit simulation and  VHDL for logic design. This proposal would be like forcing every technology institute to buy a licensed version of these software.

The Govt. of India has an Open Source Software adoption policy. Kerala State Govt. too has a  policy to adopt Free and Open Source software. As per this policy  use of proprietary tools are allowed only when there are no open source alternatives. There are open source software like Scilab and xcos, Octave, Scipy and Numpy etc. that can be used for the numerical computation experiments specified in the syllabus.

Why FOSS adoption is important?

Teaching and learning should not be tool/product specific. Syllabus should be neutral and should not endorse a brand. The students should not be locked on to a specific vendor. The learners who wish to install the software and experiment further shouldn’t  be restricted by any licensing terms and high cost. It would otherwise encourage unethical practices like usage of pirated copies of software.

Development of open source software is through open collaboration.  The algorithmic implementations are not black boxes as in proprietary tools. They are openly licensed for learning and modifications, for the enthusiasts. Learning an EDA tools should not end with the lab course. Students should acquire the skill necessary to solve any engineering problem that comes on their way using these tools.

There are MHRD initiatives like FOSSEE (Free and Open Software in Education) project to promote the use of FOSS tools to improve the quality of education in our country. The aim is to reduce dependency on proprietary software in educational institutions. FOSSEE encourages the use of FOSS tools through various activities to ensure commercial software is replaced by equivalent FOSS tools. They even develop new FOSS tools and upgrade existing tools to meet requirements in academia and research. FOSSEE supports academic institutions for FOSS adoption through lab migration and textbook companion projects.

Why not KTU collaborate with FOSSEE?

FOSS adoption might not be a very easy task. There might be a need for technical support to institutions and faculty members. KTU can collaborate with FOSSEE in this regard. They have created a repository of spoken tutorials for various FOSS tools for numerical computations, analog and digital circuit simulation etc.

Free software will have cost for training, maintenance just like proprietary software. But the learning curve can be smoothed through joint efforts.

If the tools and software used are open source, KTU can plan to create an open repository of solved simulation experiments, which can be continuously enriched by contributions from faculties and students. Hope KTU takes some steps in this direction as per the suggestions submitted.

Experimenting eSim- A tool for Electronic Circuit Simulation

I did not have much exposure to open source Electronic Design Automation tools during my graduation course in Electronics and Communication Engineering. My institute had proprietary EDA tools in the lab and all my experiences were limited to them.  I must confess I never tried to explore the FOSS world for alternatives until I was in a need to offer a lab course on basic circuit simulation.

Web searches took me to the  design suite eSim . It  is an open source EDA tool for circuit design, simulation, analysis and PCB design. It is an integrated tool built using open source software such as KiCad and Ngspice. eSim is released under GPL. It’s GUI guides the user through the steps of schematic creation, netlist generation, PCB design and simulation. eSim source code iis hosted at: https://github.com/FOSSEE/eSim .

eSim is developed by FOSSEE (Free and Open Source Software for Education) – an initiative of MHRD, Govt. of India. FOSSEE promotes the migration of labs in educational institutions from proprietary tools to FOSS only ones through lab migration projects. The source code of lab experiments are crowd sourced from faculties and students under lab migration project. These are made available by FOSSEE under  Creative Commons Attribution-ShareAlike 4.0 International Licence.

My proposal for migrating the basic electronics lab to eSim is under review. There was good technical support from the eSim team during solving various experimental issues. The first version of user’s guide for carrying out the experiments proposed under this project is published here.   It is under  Creative Commons Attribution-ShareAlike 4.0 India Licence.This guide provides solutions to specific simulation problems using eSim. Experimental procedures are explained with screen shots.

Have a look and propose suggestions. If you have ideas on improving the contents, feel free to contribute. Git repository of user guide: https://github.com/kavyamanohar/e-design-simulation-guide

 

Frequency modulation in gnu-octave : square wave carrier and sinusoidal message

Frequency modulation is a common analog modulation technique. Here the instantaneous frequency of the carrier wave is varied with the instantaneous amplitude of the message signal. That is the information regarding the message is available in the frequency of the carrier. It is a kind of more generic technique called angle modulation.

fmsquare
Sinusoidal frequency modulation of square wave carrier

Gnu-octave has built-in function fmmod() available in octave-communications package for implementing frequency modulation. But this function modulates the given message signal with a sinusoidal carrier of specified frequency. If we want the carrier to be a square wave as shown in the figure, the built-in function would not help.

Let us see how this can be done. The carrier is a square wave. It may be represented as $$A_c square(\theta_c)$$.  The angle modulated wave has the information content available in the angle part ($$\theta_c$$) of the carrier. When the carrier is angle modulated, the instantaneous value of $$\theta$$ depends on the message signal.

$$FM=A_c square(\theta_{i}(t))$$

The angle is not a constant. It varies with time depending on the message signal. In case of frequency modulation, the instantaneous value of that angle is the integral of instantaneous frequency of the modulated signal. Assume $$\omega_i(\tau)$$ is the frequency in radians per second and $$f_i(\tau)$$ is the frequency in Hz.

$$FM=A_c square(\int_0^t\omega_i(\tau)d\tau)$$

$$FM=A_c square(2\pi \int_0^t f_i(\tau) d\tau)$$

The instantaneous value of this frequency $$f_i(\tau)$$ is the sum of the carrier frequency $$f_c$$ and the frequency change due to the message signal amplitude. Assuming $$x(\tau)$$ is the unit normalized message and $$f_{dev}$$ is the maximum possible deviation from carrier frequency $$f_c$$.

$$FM=A_c square(2\pi \int_0^t(f_c+f_{dev}x(\tau) d\tau)$$

$$FM=A_c square(2\pi f_ct+2\pi f_{dev}\int_0^tx(\tau)d\tau)$$

To code the same in octave, each continuous time signal is assumed to be sampled at high sampling rate to obtain corresponding discrete time signal. The sampling frequency $$F_s$$ is kept high to avoid improper interpolation of signals while plotting them. Built-in functions can be used to define sine and square waves. The key step is in defining the modulated signal. As per the above equation the message signal has to be integrated with respect to time. For discrete time signals the integration can be replaced by using cumulative sum cumsum() function. The integration is along time axis. This effect can be implemented in the code by dividing cumsum() by $$F_s$$.  The plot() function can be used to display the result of modulation. See the code snippet below.

A laboratory manual for basic analog communication experiments

I was in need of a manual for introducing the analog communication lab experiments to students who had no prior exposure to electronic circuits or analog communication techniques. Since I found no such book which matched my needs, I planned  to prepare a laboratory manual which could help students with the basic understanding of electronic circuit theory to learn and experiment the fundamentals of analog communication techniques.

am6332

The lab manual discusses different methods of implementing analog modulation and demodulation using transistors, switching IC CD4016, opamp IC 741, PLL IC CD4046, timer IC 555 etc along with passive components like IFTs(Intermediate Frequency Transformers), capacitors and resistors. Introduction of every new circuit component is associated with an appendix section which contains details from the manufacturer’s data sheet. Every experiment is explained with associated circuit diagrams, which were drawn using gEDA schematic editor. Signal waveforms associated with the experiments were simulated in octave and given along with the experiment.

The first version is released and it is available here.

Comments on improvement in conceptual clarity, diagrams, typography or language is most welcome. If you have ideas on expanding the contents with more experiments please let me know.

The github repository of the project: https://github.com/kavyamanohar/analogcommunication.

This work is licensed under Creative Commons Attribution-Share Alike 4.0 India License.