Daily Archives: August 14, 2011

A C Program to Find Convolution of Two Signals


The convolution of ƒ and g is written ƒg, using an asterisk or star. It is defined as the integral of the product of the two functions after one is reversed and shifted. As such, it is a particular kind of integral transform:

(f * g )(t)\ \ \, \stackrel{\mathrm{def}}{=}\ \int_{-\infty}^{\infty} f(\tau)\, g(t - \tau)\, d\tau
= \int_{-\infty}^{\infty} f(t-\tau)\, g(\tau)\, d\tau.       (commutativity)

While the symbol t is used above, it need not represent the time domain. But in that context, the convolution formula can be described as a weighted average of the function ƒ(τ) at the moment t where the weighting is given by g(−τ) simply shifted by amount t. As t changes, the weighting function emphasizes different parts of the input function.

More generally, if f and g are complex-valued functions on Rd, then their convolution may be defined as the integral:

(f * g )(x) = \int_{\mathbf{R}^d} f(y)g(x-y)\,dy = \int_{\mathbf{R}^d} f(x-y)g(y)\,dy.
In Digital Signal Processing where convolution is done between two discrete signals the procedure followed is :
There are different methods used in finding convolution (refer Signals And Systems by  Openheim for more details on each method). Here i will demonstrate a C program that uses the matrix method to find convolution.
The CODE
/* Vineeth Kartha
Program To Find Convolution
Released Under GPL */
#include<stdio.h>
int main()
{
printf(“\n\tThis program finds the convolution of a signal and its Impulse response\n”);
printf(“—————————————————————————\n\n”);
int i,j,k,x[10],h[10],y[10],a[10][10],n,m;
printf(“enter the number of elements in x[n]:\t”);
scanf(“%d”,&n);
printf(“enter the elements of x[n]:\n”);
for(i=0;i<n;i++)
{
scanf(“%d”,&x[i]);
}
printf(“enter the number of elements in h[n]:\t”);
scanf(“%d”,&m);
printf(“enter the elements of h[n]:\n”);
for(i=0;i<m;i++)
{
scanf(“%d”,&h[i]);
}
for(k=0;k<m;k++)
{
for(i=0;i<n;i++)
{
a[k][i]=h[k]*x[i];
}
}
for(k=0;k<(n+m-1);k++)
{
y[k]=0;
for(i=0;i<m;i++)
{
for(j=0;j<n;j++)
{
if((i+j)==k)
{
y[k]+=a[i][j];
}
}
}
}
printf(“\n\tx[n]={“);
for(i=0;i<n;i++)
{
printf(“%d “,x[i]);
}
printf(“}\n\th[n]={“);
for(i=0;i<m;i++)
{
printf(“%d “,h[i]);
}printf(“}\n\n\n\ty[n]=x[n]*h[n]\n——————————————\n\n\ty[n]={“);for(i=0;i<(n+m-1);i++)
{
printf(“%d “,y[i]);
}
printf(“}\n\n”);
return 0;
}


		
Advertisements

1.2-30V 0.5A Variable DC source for lab applications


Here I will explain to you how I made a Variable DC source whose output voltage can be varied from 1.2-30V and have a load current of 0.5A, This source is suitable for Electronics hobbyists.

The 230V-AC coming from the powercord is fed to the transformer TR1 via the on-off switch and the 500mA fuse. The 30v ac output (approximately) from the transformer is presented to  four general purpose 1N4004 diodes(The rectifier). The pulsating DC output is filtered via the 2200μF capacitor (to make it more manageable for the regulator) and fed to ‘IN’-put of the adjustable LM317 regulator (IC1). The output of this regulator is your adjustable voltage of 1.2 to 30volts varied via the ‘Adj’ pin and the 5K potmeter P1. The large value of C1 makes for a good, low ripple output voltage.
Why exactly 1.2V and not 0-volt? Very basic, the job of the regulator is two-fold; first, it compares the output voltage to an internal reference and controls the output voltage so that it remains constant, and second, it provides a method for adjusting the output voltage to the level you want by using a potentriometer.

Internally the regulator uses a zener diode to provide a fixed reference voltage of 1.2 volt across the external resistor R2. (This resistor is usually around 240 ohms, but 220 ohms will work fine without any problems). Because of this the voltage at the output can never decrease below 1.2 volts,(But there is a neat hack that can be used to achieve this connect two diodes in series and forward biased at output a total voltage drop of 1.4V is obtained thereby making the output voltage Zero) but as the potentiometer (P1) increases in resistance the voltage accross it, due to current from the regulator plus current from R2, its voltage increases. This increases the
output voltage. D1 is a general purpose 1N4001 diode, used as a feedback blocker. It steers any current that might be coming from the device under power around the regulator to prevent the regulator from being damaged. Such reverse currents usually occur when devices are powered down.
The ‘ON’ Led will be lit via the 18K resistor R1. The current through the led will be between 12 – 20mA @ 2V depending on the type
and color Led you are using. C2 is a 0.1μF (100nF) decoupler capacitor to filter out the transient noise which can be induced into the
supply by stray magnetic fields. Under normal conditions this capacitor is only required if the regulator is far away from the filter cap,
but I added it anyway. C3 improves transient response. This means that while the regulator may perform perfectly at DC and at low
frequencies, (regulating the voltage regardless of the load current), at higher frequencies it may be less effective. Adding this 1 μF
capacitor should improve the response at those frequencies.

Construction:

Because of the few components you can use a small case but use whatever you have available..
You can mount the LM317 regulator on a heatsink. Note that the metal tab of the LM317 is connected internally to the ‘Output’ pin. So it has to be insulated when mounting directly to the case.
Drill the holes for the banana jacks, on/off switch, and LED and make the cut-out for the meter. It is best to mount everything in such a way that you are able to trouble-shoot your circuit board with ease if needed. One more note about the on-off switch S1, this switch has 230VAC power to it. After soldering, insulate the bare spots

If all is well, and you are finished assembling and soldering everything, check all connections. Check capacitors C1 & C3 for proper
polarity (especially for C1, polarity reversal may cause explosion). Hookup a multimeter to the power supply output jacks. Set the
meter for DC volts. Switch on S1 (led will light, no smoke or sparks?) and watch the meter movement. Adjust the potentiometer until
it reads on your multimeter. Good luck and have fun building!

First step towards your own server


As per the Wikipedia a Web server can refer to either the hardware (the computer) or the software (the computer application) that helps to deliver content that can be accessed through the Internet.

You may want to setupa a webserver to share your contents with the world or for fun or even to make a little bit money. I set up a web server so that i can share things with my friends and so that I don’t have to send attatchments with my mail. I have an unlimited broadband connection so leaving my system online made things easier for me, though I have to shut it down sometitmes.

The most common use of web servers is to host web sites but there are other uses like data storage or for running enterprise applications.
In this post I will show you how to setup a basic web server and in the coming posts i’ll tell you how to go online. The instructions given below are mainly for ubuntu users as that is what I use. But the other Distros too may have the same procedure

Installing Apache:

Downloading the apache packages and compiling them was a bit tricky for me so this is what I did.(you can download apache from here)

Or You can either use the synaptic package manager and search for apache2 or ucan type in the following in the terminal:

  sudo apt-get install apache2

On Ubuntu, the configuration files for Apache are held in the directory ‘/etc/apache2’. To learn what is supported by the web server, visit ‘/mods-enabled’. There several files with a suffix of ‘.load’ are listed. These are the modules themselves, and their configuration files are in the corresponding ‘.conf’ files. To see which modules are available, see the corresponding ‘mods-available’ directory (/etc/apache2/mods-available). Here you will find a list of all the modules that can be enabled. If a module is listed in mods-available but is not found in mods-enabled, it will not be used. To install a new module from those that are available but not enabled, simply copy the appropriate ‘.load’ file to mods-enabled (using ‘sudo’). After copying the module to ‘mods-enabled’, you may still need to configure it.( I copied everything from mods-available to mods-enabled)
Apache on Ubuntu has two main configuration files: apache2.conf and httpd.conf. Both are found in the directory ‘/etc/apache2’. The first configuration file is generated when the server is installed and is rewritten whenever it is upgraded or reinstalled. The second is available for custom, system-wide configurations. To enable the modules you copied, do the following from a terminal:

    sudo gedit /etc/apache2/httpd.conf

and enter

Userdir public_html
Options +Indexes
Options All

ServerName localhost

<Directory “/home/<your user name here>/public_html/”>
Order allow,deny
Allow from all
AllowOverride All
</Directory>

After saving and closing the file, any user can create a directory called ‘public_html’ in their home directory and post web pages to be served from there. If the directory does not exist, the user simply needs to create it (using ‘mkdir public_html’ or right clicking in the file manager while inside their home directory).

Note, however, that indexing still needs to be turned on explicitly by each user. To do so, the following must be saved within the ‘public_html’ directory and in a file named ‘.htaccess’ (note the dot before the ‘h’):

Options +Indexes

After this, restart the server with the following command:

sudo /etc/init.d/apache2 restart

The above modules are just enough to make Apache usable for local users. If you want to use any scripting language like Python, PHP, or Perl, you will need to install each of those module separately. After installation, however, no configuration is needed. Some configuration options (directives) make Apache work better on Ubuntu.

Now fireup your browser and type localhost or 127.0.0.1 And if u see the page like this your installation was fine.

CYBER LAWS:A REVIEW


The beginning of the 21st century witnessed the birth and growth of the greatest wonders of our time-The Internet. A small project which was started back in 1970s by the US defense department was revolutionized by the introduction of HTML and the World wide web by Tim Berners Lee of CERN. Later on with the introduction of JAVA and with availability of cheaper PCs, the number Internet of Internet users increased exponentially. Data could be transfered from one corner of the world to the other in no time. The world became a “Global Village”. Information-its creation, acquisition, adaptation and dissemination has been the currency of our time. Along with the development of all these a new breed of anti social elements , the Cyber criminals sprouted. Quite often the word hacker is used to refer to such people thereby defaming the real hacker community. Hackers are those people or rather the community that has made all developments in the field.

There are three major classification of hackers:

• The White hats – They break into systems to study the vulnerabilities and to rectify them.
• The Black Hats – Their aim is personal monetary gains or destruction of opponents.
• The Grey hats – Such hackers walk on the thin line separating the blacks and whites, their works are a mixture of both legal and illegal.

With the recent Growth of the IT industry and dependence of man on electronic systems, has made it more vulnerable to crime. The major problem in cyber thefts are that most often the victim doesn’t know what happened. If a physical object is stolen we can feel its absence but if a digital document is stolen we still have a copy and the culprit will have his copy so the victim remains unaware. Cyber crimes extend from using viruses and Trojans to destroy data on another person’s system, stealing data and credit card numbers and even money from accounts to harassing and defaming people and pornography. Everything that has a possibility to fail will fail (Murphy’s law), this is the law that hackers exploit. With the extension of Internet to all walks of life the possibilities have been thoroughly studied by hackers. This changing scenario opened the eyes of the lawmakers.

The Indian Govt. took its first step in the year 2000 by passing the IT ACT 2000, it was based on the UNCITRAL (United Nations Commission on International Trade Law).The Indian Government also declared the year 2000 as the year of e-governance.

What is a Cyber law?
Cyber law encompasses laws relating to:

• Cyber Crimes – Cyber crimes are unlawful acts where the computer is used either as a toolor a target.
• Electronic and Digital Signatures – Electronic signatures are used to authenticate
electronic records. Digital signatures are one type of electronic signature. Digital signatures satisfy three major legal requirements – signer authentication, message authentication and message integrity. The technology and efficiency of digital signatures makes them more trustworthy than hand written signatures.
• Intellectual Property – Intellectual property is refers to creations of the human mind. The facets of intellectual property that relate to cyber space are covered by cyber law.

Fundamentals of Cyber Law These include:

◦ copyright law in relation to computer software, computer source code, websites, cell phone content etc,
◦ software and source code licenses.
◦ trademark law with relation to domain names, meta tags, mirroring, framing, linking etc
◦ semiconductor law which relates to the protection of semiconductor integrated circuits design and layouts,
◦ patent law in relation to computer hardware and software.
Data Protection and Privacy – Data protection and privacy laws aim to achieve a fair
balance between the privacy rights of the individual and the interests of data controllers such as banks, hospitals, email service providers etc. These laws seek to address the challenges to privacy caused by collecting, storing and transmitting data using new technologies.

The IT Act 2000 attempts to change outdated laws and provides ways to deal with cyber crimes. We need such laws so that people can perform purchase transactions over the Net through credit cards without fear of misuse. The Act offers the much-needed legal framework so that information is not denied legal effect, validity or enforceability, solely on the ground that it is in the form of electronic records. In view of the growth in transactions and communications carried out through electronic records, the Act seeks to empower government departments to accept filing, creating and retention of official documents in the digital format. The Act has also proposed a legal framework for the authentication and origin of electronic records / communications through digital signature.

• From the perspective of e-commerce in India, the IT Act 2000 and its provisions contain    many positive aspects. Firstly, the implications of these provisions for the e-businesses   would be that email would now be a valid and legal form of communication in our country  that can be duly produced and approved in a court of law.
• Companies shall now be able to carry out electronic commerce using the legal infrastructure    provided by the Act.
• Digital signatures have been given legal validity and sanction in the Act.
• The Act throws open the doors for the entry of corporate companies in the business of being    Certifying Authorities for issuing Digital Signatures Certificates.
• The Act now allows Government to issue notification on the web thus heralding e-
governance.
• The Act enables the companies to file any form, application or any other document with any office, authority, body or agency owned or controlled by the appropriate Government in   electronic form by means of such electronic form as may be prescribed by the appropriate  Government.
• The IT Act also addresses the important issues of security, which are so critical to the success of electronic transactions. The Act has given a legal definition to the concept of secure digital signatures that would be required to have been passed through a system of a  security procedure, as stipulated by the Government at a later date.
• Under the IT Act, 2000, it shall now be possible for corporates to have a statutory remedy in case if anyone breaks into their computer systems or network and causes damages or copies data. The remedy provided by the Act is in the form of monetary damages, not exceeding  Rs. 1 crore.
• Electronic documents are now accepted as evidence in a court of law.
• Electronic cheques are now accepted as a valid means of transaction.

Need for Cyber Law

There are various reasons why it is extremely difficult for conventional law to cope with
cyberspace. Some of these are discussed below.

1. Cyberspace is an intangible dimension that is impossible to govern and regulate usingconventional law.
2. Cyberspace has complete disrespect for jurisdictional boundaries. A person in India could break into a an account hosted on a computer in USA and steal data all within minutes. All he would need is a laptop computer and a cell phone.
3. Cyberspace handles gigantic traffic volumes every second. Billions of emails are
crisscrossing the globe even as we read this, millions of websites are being accessed every minute and billions of dollars are electronically transferred around the world by banks every day.
4. Cyberspace is absolutely open to participation by all without any regard for the distance or the anonymity between them.
5. Cyberspace offers enormous potential for anonymity to its members. Readily available encryption software and stenographic tools that seamlessly hide information within image and sound files ensure the confidentiality of information exchanged between cyber-citizens.
6. Cyberspace offers never-seen-before economic efficiency. Billions of dollars worth of software can be traded over the Internet without the need for any government licenses, shipping and handling charges and without paying any customs duty.
7. Electronic information has become the main object of cyber crime. It is characterized by extreme mobility, which exceeds by far the mobility of persons, goods or other services. International computer networks can transfer huge amounts of data around the globe in a matter of seconds.
8. A software source code worth crores of rupees or a movie can be pirated across the globe within hours of their release.
9. Theft of corporeal information (e.g. books, papers, CD ROMs, floppy disks) is easily covered by traditional penal provisions. However, the problem begins when electronic records are copied quickly, inconspicuously and often via telecommunication facilities. Here the “original” information, so to say, remains in the “possession” of the “owner” and yet information gets stolen.

Our Present Scenario

Looking back after 10 years we can still see the gap that has not yet been filled between the government and the common Indian. Today almost every Indian has access to the Internet, but our government has still outdated sites and it still follows the age old practices for its activities. Philippines was the first country to adopt 100% e- governance. The reason that our country is left back is because there is a lack of qualified personnel at the government level and due to the serious inefficiency of our cyber laws

Loopholes

1. No clear provision for handling of domain name issues. They are presently covered by legal norms applicable to intellectual properties such as trademarks
2. Cyber theft, cyber stalking, cyber harassment and cyber defamation are presently not covered under the act
3. Jurisdiction problems are likely to arise as the act applies to both Indians and foreign citizens
4. The law is now covered under civil procedure, making the enforcement process slow. This deters companies from approaching the cyber crime cell
5. Some definitions in the act are vague and can cause problems to the plaintiff
6. The act does not lay down parameters for its implementation Improvements needed
1. The act needs amendment for handling domain name issues and related concerns such as cyber squatting
2. These crimes need to have specific provisions in the act to enable the police to take quick action
3. There should be clear briefs on how the act will apply to any offence, and how action will be taken against any person who has committed the crime outside India
4. If the law is covered under criminal procedure, the process could be faster
5. Definitions, prescriptions of punishment and certain provisions need specific amendment
6. Law enforcement officials need to be trained for effective enforcement In spite of having a cyber law there are still many reported and even more unreported cases of cyber crimes. The major setback that the Indian cyber law faces is the lack of trained and skilled personnel in the Law and Order and the justice departments to investigate such cases of cyber crimes.

Another great set back is the average Internet user, who is not careful enough to protect his/her data and system from being hacked and misused. We also have a major role to play, avoid pirated software and movies,pornography, misuse of emails and in case you fall victim to a cyber crime report it immediately to the cyber cell. Then only the government will realize the vast amount of cyber crimes in our country and lets hope that it will open the eyes of our law makers.

The Rebel Code Hacked


Introduction

It has not been a bed of roses for Linux and FOSS .As it has been with alll
revolutions in the world history,Linux and FOSS have had tough time.But
now the Sun is shining over Linux.

19 years back Linus Trovalds a computer Science student first posted about
his ‘minix clone’.No one expected it ti grow into a powerfull Operating
system..But as it is said when the going gets tough its the tough that get
get going.And today despite ignorance,despite ridicule Linux has proved its
power.

How It All Begun

In the year 1969 Engineers at AT & T Labs who had been withdrawn from
the project MULTICS were sitting idle.Dennis Ritchie & ken Thomp-
son who were among them decided to modiy the multics to form a better and
stable OS,thus the UNIX was born.UNIX was written in C language, it was
Multitasking,multiuser, and was powerull and was distrubuted freely.Later
on companies started commercialising it and soon hackers lost control of it.
Frustrated by this a hacker RICHARD STALLMAN at the MIT AI LAB set
out to built a UNI like OS but which was entirely free. In 1984he started
the GNU (GNU is Not Unix) project.And in 1985 he founded the Free Sot-
ware Foundation.Stallman developed Emacs a tet editor and several appli-
cations needed for an OS.But finall when it came to the kernel he wasn’t
successful.It was during this time that Linus Trovalds a student made a ker-
nel which he named Linux.Soon Stallman adopted Linux as the kernel.Thus
GNU/LINUX was born an OS for the hackers ,of the hackers and by the
hackersAnone could use it and anyone could modify it and most importantly
it was free.And soon everyone began contributing to the new Linux kernel.

The Present Scenario

Ater a long bumpy ride for 19 years now the GNU/Linux OS is gaining pop-
ularity.Enterpriseslike RedHat Inc. and Novell have released several server
editions that are stable and reliable used on almost all networks today.And
companies like Canonical are giving Microsoft Corp. a tough time with their
UBUNTU a GNU/linux OS for the home users.
This rising popularity of Linux is due to the virus free environment, it ensures
a crash-free system and most of all software worth of thousands of dollars
are available for free.There is nothing that cannot be done on a linux system.
What Bill Gates considered as an OS of the hobbyist and student, today has
reached the desktop of common Man.It has shaken the foundations of Mi-
crosoft.it has ended the monopoly of Microsoft in the field of microcomputer
OS. Linu provides a secure system where crashes and data losses are mini-
mum.The kernel can be modified according to our taste and needs to bring
out the maximum potential of our hardware.Users receive support from a
community of hackers willing to share and help.In Linux there is no copy-
rights or piracy, its all about sharing.The television is called ‘the idiot box’
because we switch it on and see whatever is telecasted.PCs which use ‘win-
dows’ are also idiot boxes.GNU/Linux is based on the idea that we deserve
to know and decide how our systemswork and we have the right to make it
work the way we want.It is for this right that hackers like Richard Stallman,
Linus Trovalds and many others are fighting for.This is a revolution and its
time we too became a part of it. LONG LIVE REVOLUTION!!!!!!!.

QUCS: AN OPEN SOURCE CIRCUIT SIMULATOR


We use many electronic gadgets in our daily life. Life can be a bit tough without these gadgets. But making an electronic circuit ‘work’ is even tougher. Electronics is a hobby for many, and it can be really expensive. Unlike most other hobbies like philately or numismatics there are a lot of things that an electronic hobbyist must know before getting his hands wet, otherwise things can get real messy and you may loose a lot of money. Circuit designing and debugging can be one heck of a job. If the design is wrong then there is no point in proceeding further, also most electronic components get damaged even if a very small mistake is made in designing the circuit. I have spent upto 3 weeks trying to figure out what was wrong with a circuit I made. Though it was simple it was difficult and I burned out many components. I knew about some circuit simulators but the experiences that I had when I first tried one was not so good. But very recently I came to know about Quite Universal Circuit Simulator.

What is QUCS?

Quite Universal Circuit Simulator (Qucs) is a open sourceelectronics circuit simulator software released under GPL, and is still in development process. Though still in development process it is very stable and effective, but of course there are things missing here and there, we will see what all qucs can do and cannot do. QUCS is a circuit simulator with graphical user interface (GUI). The GUI is based on Qt by Troltech. The software aims to support all kinds of circuit simulation types, e.g. DC, AC, S-parameter, Harmonic Balance analysis, noise analysis, etc. The outputs of these analysis can be expressed in various forms like Smith-Chart, Cartesian, Tabular, Polar, Smith-Polar combination, 3D-Cartesian, Locus Curve, Timing Diagram and Truth Table.

INSTALLING QUCS

In a debian based system qucs can be installed by issuing the command

sudo apt-get install qucs

In Ubuntu qucs is available in the Ubuntu software center. Or you can do it the hard way, download the QUCS file from http://qucs.sourceforge.net/download.html and execute the following commands.

Unpack the distribution tarball:

$ tar xvzf qucs-.tar.gz

Change into the source directory: $ cd qucs-<version>

Configure the source package for your system:

    $ ./configure

Now compile the package:

    $ make

Install Qucs:

    $ make install

Once installed you will find QUCS in the applications-> Education-> menu in case of ubuntu or you can type qucs in the command terminal.

THE QUCS STRUCTURE

QUCS is actually a collection of different modules and each has a different function.

1) The GUI is used to create schematics, setup simulations, display simulation results, writing VHDL code, etc.

2) The analog simulator is a command line program which is run by the GUI in order to simulate the schematic which you previously setup. It takes a netlist, checks it for errors, performs the required simulation actions, and finally produces a dataset.

3) The text editor is used to display netlists and simulation logging information, and to edit files included by certain components (e.g. SPICE netlists, or Touchstone files).

4) The filter synthesis application can be used to design various types of filters.

5) The transmission line calculator can be used to design and analyze different types of transmission lines (e.g. microstrips, coaxial cables).

6) The component library manager holds models for real life devices (e.g. transistors, diodes, bridges, opamps). It can be extended by the user.

7) The attenuator synthesis application can be used to design various types of passive attenuators.

8) The command line conversion program tool is used by the GUI to import and export datasets, netlists and schematics from and to other CAD/EDA software. The supported file formats as well as usage information can be found on the manpage of qucsconv.

9) Additionally, the GUI steers other EDA tools. For digital simulations (via VHDL) the program FreeHDL is used. For circuit optimization (minimization of a cost function), ASCO is configured and run.

The QUCS component library has almost all components needed for most of the circuits but as it is still in development stages some components might be missing.

The following categories of components are provided:

  • Lumped components (R, L, C, amplifier, phase shifter, etc.)

  • Sources

  • Probes

  • Transmission lines

  • Nonlinear components (diodes, transistors, etc.)

  • Digital components

  • File containers (S-parameter datasets, SPICE netlists)

  • Paintings

There is also a Component library that includes various standard components available in the market (bridges, diodes, varistors, LEDs, JFETs, MOSFETS, and so on).

QUCS provides many transistor models. These include FBH-HBT, HICUM L0 v1.12, HICUM L0 v1.2, HICUM L2 v2.1, HICUM L2 v2.22, HICUM L2 v2.23, MESFET (Curtice, Statz, TOM-1 and TOM-2), SGP (SPICE Gummel-Poon), MOSFET, JFET and EPFL-EKV MOSFET v2.6.

WORKING WITH QUCS

Before I begin let me remind you that this is just an introductory article and not a complete tutorial to qucs i’ll be just briefly touching the important points( Nothing to worry qucs is easy to learn :-))

Open qucs from the applications menu or type qucs in the terminal.

Making a project

Click on the new button in the explorer window, a dialog box will appear asking for project name.

Give the name and proceed. Once the project is created you can see all the contents of the project in the explorer window. In the work space we draw our circuit.

Lets start with a simple potential divider circuit. You can find the components in the components button on the left side of the explorer window.

Place two resistors from the lumped components and a dc source from sources. Connect them using the wire(CTRL + E) , now place the ground symbol near the negative of cell.(Specifying a ground point is very essential in all circuit simulators)

Select Insert->wire label and click on the point between the two resistors and name it Vout (or anything you want).

Now from simulations place the dc simulation block, the schematic should look as given below.

Now save it. Go to Simulation ->Simulate.

A new work area appears and also the explorer window changed to diagram tab. From there select table and drag it to work area. Placing diagrams

Choose the tabular (list of values) diagram and place it on the data display page. After

dropping the tabular, the diagram dialog appears

By double clicking the Vout.V the graph (i.e. values in a tabular plot) is added to

the diagram. Beside the node voltage Vout.V also the current through the DC voltage

source V1.I is available. Only items listed in the dataset list can be put into the graph.

Available dataset items

Depending on the type of simulation the user performed you find the following types of

items in the dataset.

  1. node.V – DC voltage at node node

  2. name.I – DC current through component name

  3. node.v – AC voltage at node node

  4. name.i – AC current through component name

  5. node.vn – AC noise voltage at node node

  6. name.in – AC noise current through component name

  7. node.Vt – transient voltage at node node

  8. name.It – transient current through component name

  9. S[1,1] – S-parameter value

Depending on the type of graph you have various options to choose for the graph. For

a tabular graph there is the the number precision as well as type of number notation

(important for complex values). Press the “Ok” button to close the dialog.

You will get something as below.

You can change the properties of the components by double clicking on them and changing the properties in the property box.

Parameter Sweep

Now lets see how we can plot the forward characteristics of a pn junction diode. The diode can be obtained from the non linear components. Since we are going to plot how voltage varies as current passing through the diode is changed we will use a dc current source and we will change its numerical value to a variable If. This can be done by double clicking the component and editing the component dialog box. The wire up the circuit (Don’t forget to ground the circuit) place a wire label at a point between the diode and the positive of the current source. Name it as Vd.

Now place the DC SIMULATION BLOCK

and also place the PARAMETER SWEEP BLOCK. In the parameter sweep properties give

simulation as DC1 ( the name of the DC SIMULATION BLOCK you placed)

parameter as If ( the parameter u wish to change)

then give the type of variation you want whether its linear or logarithmic. Then give the starting and ending values I gave 0 to 10. and also give

number as the number of points you need (100 will give you a pretty neat graph)

Now simulate and in the data display page place the Cartesian diagram instead of table as in previous example and choose the parameter you want to display. You will have the forward characteristics of the diode with voltage on y axis and current along x axis

WHAT NEXT ?

I believe that students should be taught such simulation software along with their lab experiments. And also students should try to use such tools when doing there projects in that way a lot of time and money can be saved. We can analyze how a system will respond in a given situation. Also we should contribute back to such projects that are available as open source or free software after all FOSS is all about sharing and giving and learning.

For further details about qucs you can visit http://qucs.sourceforge.net/

Well I hope these are enough to get you started. There are lots of tutorials available on the net and in the site mentioned above.There is a lot more that you can do with QUCS like digital simulation harmonic analysis, transient analysis etc. If you really liked the software try contributing back. What you can do is given in http://qucs.sourceforge.net/road.html.

%d bloggers like this: