Thursday, May 28, 2009

Orthogonal Frequency Division Multiplexing part 1

1. Definition
Orthogonal Frequency Division Multiplexing (OFDM) is a modulation scheme that is especially suited for high-data-rate transmission in delay dispersive environments. It converts a high-rate datastream into a number of low-rate stream that are transmitted over parallel, narrowband channels that can be easily equalized.

2. Concept
In OFDM, The data is divided into several parallel data streams or channels, one for each sub-carrier. Each sub-carrier is modulated with a conventional modulation scheme (such as quadrature amplitude modulation or phase shift keying) at a low symbol rate, maintaining total data rates similar to conventional single-carrier

modulation schemes in the same bandwidth.

3. Signal Generation

3.1. Transmitter
An OFDM carrier signal is the sum of a number of orthogonal sub-carriers, with baseband data on each sub-carrier being independently modulated commonly using some type of quadrature amplitude modulation (QAM) or phase-shift keying (PSK). This composite baseband signal is typically used to modulate a main RF carrier.
s[n] is a serial stream of binary digits. By inverse multiplexing, these are first demultiplexed into N parallel streams, and each one mapped to a (possibly complex) symbol stream using some modulation constellation (QAM, PSK, etc.). Note that the constellations may be different, so some streams may carry a higher bit-rate than others.

An inverse FFT is computed on each set of symbols, giving a set of complex time-domain samples. These samples are then quadrature-mixed to passband in the standard way. The real and imaginary components are first converted to the analogue domain using digital-to-analogue converters (DACs); the analogue signals are then used to modulate cosine and sine waves at the carrier frequency, fc, respectively. These signals are then summed to give the transmission signal, s(t).

3.2. Receiver

The receiver picks up the signal r(t), which is then quadrature-mixed down to baseband using cosine and sine waves at the carrier frequency. This also creates signals centered on 2fc, so low-pass filters are used to reject these. The baseband signals are then sampled and digitised using analogue-to-digital converters (ADCs), and a forward FFT is used to convert back to the frequency domain.

This returns N parallel streams, each of which is converted to a binary stream using an appropriate symbol detector. These streams are then re-combined into a serial stream, {\hat s}[n], which is an estimate of the original binary stream at the transmitter.


Molisch, Andreas F.. Wireless Communications. Sussex: John Wiley & Sons,LTD, October 2007.
[2] Orthogonal frequency division-multiplexing,Wikipedia
Langton, Charan. Ortogonal Frequency Division Multplexing (OFDM) Tutorial

Latex equation editor on webpage

The CodeCogs Equation Editor is an online editor that facilitates the creation and formatting of LaTeX equations. Used in combination with our LaTeX rendering scripts, it creates HTML code to render an equation on any website and some email programs. The editor is open source and can be easily extended and adapted for any particular need. It is compatible with a range of WYSIWYG editors, supports multiple languages and works across all major internet browsers, including IE, FireFox, Safari and Opera.

There are really two distinct problems that we solve:

  1. First is the creation of LaTeX formulas. Few of us remember all the commands and the CodeCogs editor is there to facilitate this.
  2. Second is how to render code into graphical (nice looking) equations. We use a variety of techniques that can be use in isolation or even collectively. If you're familiar with LaTeX then very often you can create equations without ever using the editor.
The equation editor can be found here

Wednesday, May 27, 2009

Cisco router simulation with Graphical Network Simulator (GNS3)

GNS3 is a graphical network simulator that allows simulation of complex networks.

To allow complete simulations, GNS3 is strongly linked with :

  • Dynamips, the core program that allows Cisco IOS emulation.
  • Dynagen, a text-based front-end for Dynamips.
  • Pemu, a Cisco PIX firewall emulator based on Qemu.

GNS3 is an excellent complementary tool to real labs for Cisco network engineers, administrators and people wanting to pass certifications such as CCNA, CCNP, CCIP or CCIE.

It can also be used to experiment features of Cisco IOS or to check configurations that need to be deployed later on real routers.

This project is an open source, free program that may be used on multiple operating systems, including Windows, Linux, and MacOS X.

Features overview

  • Design of high quality and complex network topologies.
  • Emulation of many Cisco router platforms and PIX firewalls.
  • Simulation of simple Ethernet, ATM and Frame Relay switches.
  • Connection of the simulated network to the real world!
  • Packet capture using Wireshark.
Important notice: users have to provide their own Cisco IOS to use with GNS3.

The installation procedure can be found here
GNS3 Tutorial (Thai) can be found here
Cisco Configuration Tutorial can be found here

Sunday, May 24, 2009


The equipment list
1. Cisco router (model : 1721) : link : datasheet : IOS image
2. Cisco switch (model : Catalyst 2950) : link : datasheet : IOS image
3. 3com Wireless ADSL Router (model : 3CRWDR101A-75) : link : Manual
4. D-Link ADSL Router (model : DSL2640T) : link : Manual

Saturday, May 23, 2009

Ubuntu 9.04 keyboard and mouse problem

I just found Ubuntu 9.04 problem (possibly bug) of keyboard and mouse on my hardware (Dell Vostro 1310, Ubuntu 9.04 kernel 2.6.28-11). In the login splash screen, Ubuntu sometimes does not detect or enable my keyboard and touchpad, so I cannot login to my account.

Many ubuntu dell users also complain about this problem too. Some of them think that it is kernel version problem, so they use the older kernel instead. The others try to configure the xwindow using command xfix in recovery mode or power on and off the laptop.

For me, I use the solution given in this dell ubuntu forum.

Solution : just append the word "i8042.reset" after kernel /boot/vmlinuz-2.6.28-12-generic root=UUID=d655bf5b 3061-44bb-a9d8-2d6d9b4afc57 ro quiet splash of "/boot/grub/menu.lst"
title Ubuntu 9.04, kernel 2.6.28-12-generic
uuid d655bf5b-3061-44bb-a9d8-2d6d9b4afc57
kernel /boot/vmlinuz-2.6.28-12-generic root=UUID=d655bf5b 3061-44bb-a9d8-2d6d9b4afc57 ro quiet splash i8042.reset
initrd /boot/initrd.img-2.6.28-12-generic

Wednesday, May 20, 2009

NS-2 Tutorial

NS-2 Installation on Ubuntu 9.04

The procedure for installing NS-2 in Ubuntu 9.04 on Dell Vostro 1310.

1. Download
ns-allinone-2.33.tar from here.
2. Place it in somewhere, e.g. /home/programmer, then extract it.
$ cd /home/programmer
$ tar -xvf ns-allinone-2.33.tar
3. Download & install some packages from repository
$ sudo apt-get install build-essential autoconf automake libxmu-dev
4. Install the ns2
$ cd ns-allinone-2.33
$ ./install
5. Edit some paths
$ gedit ~/.bashrc
Put these lines on that file. Off course, you might change /home/programmer for it depends on where you extract ns-allinone-2.33.tar.



6. Validate it (take very long time compare to install process)
$ cd ns-2.33
$ ./validate
7. (Optionally) Create a symlink, so that ns can be called from everywhere
$ sudo ln -s /home/programmer/ns-allinone-2.33/ns-2.33/ns /usr/bin/ns
8. Let it take effect immediately
$ source ~/.bashrc
9. Try to run it (and pray :)
$ ns
10. If the installation success, you will see % at the command prompt. Type following command to exit
% exit


Testing ns2 Installation
Use the following ns batch command
set ns [new Simulator]
$ns at 1 “puts \“Hello World!\””
$ns at 1.5 “exit”
$ns run
1. Copy the commands above and paste in the text editor
2. Save the file as simple.tcl
3. Type command in command prompt
$ ns simple.tcl
4. It will show Hello World in the line below

Troble Shooting
1. Problem : The system cannot find Tcl or it tells that Tcl does not install correctly
Solution 1 : Check your ns tcl nam ... version, check folder name. If it is not correct, edit the .bashrc
Solution 2 : run ./install again
2. Problem : nam does not work
Solution 1 : In fact, you need to change that particular file in your Linux manually.

Here is what you should do.
--- tk8.4.18-orig/generic/tkBind.c 2006-07-21 08:26:54.000000000 +0200
+++ tk8.4.18/generic/tkBind.c 2008-07-05 12:17:10.000000000 +0200

@@ -586,6 +586,9 @@

/* ColormapNotify */ COLORMAP,

/* ClientMessage */ 0,
/* MappingNotify */ 0,

+#ifdef GenericEvent
+ /* GenericEvent */ 0,

/* VirtualEvent */ VIRTUAL,

/* Activate */ ACTIVATE,

/* Deactivate */ ACTIVATE,

This @@ -586,6 +586,9 @@ indicates exact location of the line that you start to edit, if you are using gedit or other similar editor in Linux.
The + sign indicates what to add, and the - sign indicates what to delete.
Then run $ ./install to compile and install ns2 again

Fedora forum