Tuesday, October 17, 2006

Throughput Algorithm not from Trace File

I found a thread from Velocity Reviews, the author was trying to implement a method in JAVA programming language to calculate the UDP throughput while the simulation is running. The throughput is calculated when the simulation ends. This is not the same as calculating the throughput from ns-2 discrete event network simulator trace file. Click here to view the thread.

Monday, October 16, 2006

Right Shift Operator >>

In the last post, I mentioned about the left shift operator in Java. The right shift operator is to shift the binary to the right. A right shift for non-negative integer is similar to :

value >> 3 is equivalent to value / 2^3


For more information.Click here [source]

Left Shift Operator <<

Silly me, I did not realized that the code:-

size << 3 is actually similar to size*2^3 or size * 8


The size in bytes are converted to the number of bits. I solved the flaw when the VBR generic traffic source transmit higher than the defined maxrate parameter.

Next plan to code call admission into MIRAI-SF3.1 network simulator. So far I have not seen any free source code on the Internet. For the time being, I have to reviewed some literature on call admission to get the basic idea.

Monday, October 09, 2006

Perl Throughput Script

Throughput perl script can be use to calculate the througpuht from the ns-2 trace file.This perl script is available from NS Simulator Course for Beginners page. Click here.

ALternatively, ns-2 user has another option to analyze their ns-2 trace file quickly. Ankur Jain has written a Java program called Network Analyzer for Network Simulator ns-2 (NANS) to quickly analyze and view results in graph. Clik here to find out more.

AvgStats, Instant Jitter and Instant Throughput Awk Script

In the previous post, I mentioned I use instant Troughput awk script from Marco Fiore Website. The downloadable tar file includes avgStats.awk, instantThroughput.awk and instantJitter.awk to analyze your ns-2 trace file.

Click here to get your awk scripts.

Awk script to compute the average and standard deviation from NS Simulator Course for Beginners website. Click here.

Lloyd Wood made a simple awk script to calculate end-to-end delay.Click here.

User of discrete event network simulator ns-2 has another option to analyze their ns-2 trace file quickly. Ankur Jain has written a Java program called Network Analyzer for Network Simulator ns-2 (NANS) to quickly analyze and view results in graph. Clik here to find out more.

Sunday, October 08, 2006

Mersenne Twister

MIRAI-SF3.1 network simulator does not include random generator class. The purpose of random generator because I need to find use the uniform distribution. I was translating the source code of Håkan Byström's VBR traffic model which is C++ to JAVA. A little adjustment have to be made so it can be integrate inside MIRAI-SF3.1 network simulator. Then, I found out that I need a code to generate the uniform distribution.

After some googling on the web, I found a website which offers a Free Java & JavaScript Source code. A random number generator which is I think based on Merseene Twister developed by by Makoto Matsumoto and Takuji Nishimura (alphabetical order) in 1996/1997.

Mersenne Twister(MT) is a pseudorandom number generating algorithm developped by Makoto Matsumoto and Takuji Nishimura (alphabetical order) in 1996/1997. An improvement on initialization was given on 2002 Jan.[source]


The random number generateor code is succefully integrated in to MIRAI-SF network simulator.

Thursday, October 05, 2006

Instant Throughput Dilemma

After numerous compiling the code and observing the output, I think have achieve in calculating the instant throughput and hope it will be accurate enough. Instant throughput is the total number of bits divided the total time. The total time is the difference between the current packet time and the previous time. So why is throughput is important?

It is a good measure of the channel capacity of a communications link, and connections to the internet are usually rated in terms of their bitrate, how many bits they transmit per second (bit/s).[Wikipedia]


The idea of calculating the instant looks simple but I was having a hard time coding the method lol.I added two methods in MIRAI-SF3.1 network simulator's 3g base station subclass.

Instant Throughput method is based on an awk script that can be found at Marco Fiore website.

Here my Pseudocode:

instantThroughput method {

Calibrate tk if the currentpackettime > tk when the method is called for the first time.
Sum the total bytes of data being transmitted.
Sum the total by add the time different between the currentpackettime and previous packet time.
Check if the currentpackettime is larger or equal to time interval, if true then calculate the instant throughput, set the totalBytes and totalTime to zero.
Increase tk by adding interval constant value.
Set the currentpackettime to previouspackettime.

}


calibratetk method{
//check if the method is running for the first time, if true then set the first
//boolean flag to true and add the current tk to the current packet time and return //the tk value.

}


Sometimes, I noticed the currentpackettime is greater than tk when the method is called. The logical reason behind is that the base station does not transmit any packet all time. Instant throughput is calculated every
time the method is called until the tk becomes larger than then
currentpackettime(i.e. Every time instant throughput is calculated, tk is
increased, tk+=interval). To make sure that the current packet time is smaller than tk when the first transmission of packet. Thanks to Kentaro a MIRAI-SF developer from NICT for replying my email.

Now, how do i code a variable bit rate (VBR) application? Scratching my head again.

Wednesday, October 04, 2006

How to fold a shirt in Japan

Shirt folding is all the rave in japan


By the way, I'm lazy at folding my T-shirt but like to hang them straight away.

Riding the Superconducting Maglev Train - Linear Motor Car

Riding Japan's Superconducting Maglev "Linear Motor Car" Train at 502 kilometers/hour on a beautiful day at JR Railway Technical Research Institute's Yamanashi Maglev Test Line.
This was shot with a JVC Everio GZ-MC500 3CCD hard disk drive camcorder. The length is 6 minutes and 11 seconds. Courtesy of Harvard Club of Japan and Central Japan Railway Company

Friday, September 29, 2006

Obfuscate

I came acrosss a new word Obsfuscate while reading Kathy Sierra's Book. Haha there is a note from the author asking the reader to look up the word and email back the author. It is on the page 296. I googled with the keyword "define obfuscate". One of the definition which definitely that I am looking is:

Obfuscated code is source code that is (perhaps intentionally) very hard to read and understand. Some languages are more prone to obfuscation than others. C, C++ and Perl are most often cited as easily obfuscatable languages. Macro preprocessors are often used to create hard to read code by masking the standard language syntax and grammar from the main body of code. The term shrouded code has also been used.
[Source]

Thursday, September 28, 2006

Olympus

Olympus Mons or Nix Olympica is the tallest mountain in our solar system located at Planet Mars. Click to Google Mars Map

Olympus Mons (Latin, "Mount Olympus") is the tallest known mountain in our solar system, located on the planet Mars at approximately 18° N 133° W. Before space probes revealed its identity as a mountain, Olympus Mons was known to astronomers as the albedo feature, Nix Olympica ("Snows of Olympus").


It is about three times the height of Mount Everest from sea level and 2.6 times higher than Maune Kea which a dormant volcano locate the Hawaiian Island measured from the base. [Source]

Talking about Olympus, I saw advertisement on two latest Digital Camera from Olympus in theStar newspaper. FE-190 and FE-180 both priced at RM 899 and RM 599. I would love to have FE-190 because it has a sleek and slim metal constructed body measured at 0.7 inches. This six megapixels digital camera features Digital Image Stablization, 2.5 inches LCD screen, built-in help guide and comes with Li-Ion Rechargeable Battery.

Hahahaha, I still have problem in implementing the instant Throughput. Ok, instant throughput is total bits divided by interval time. This methods that I did was based on the instantThroughput.awk script obtained from the Internet. I ran the network simulation with one mobile node moving around but the throughput is constantly at 30 kbps. The funny thing is still at 30 kbps when there are many mobile node during the simulation. I think the reason why this is happening because of the constant packet size, data rate is constant due to the application is pumping a constant bit rate and no variable delay. The simpler reasons are bugs in the code or the person who wrote the code. That's me. haha

MIRAI-SF3.1 does not have any application that uses a bit rate parameter for its interval calculation but MIRAI-SF4.1 does have constant bit rate application. I just need to make a little adjustment to the source code and then integrate into MIRAI-SF3.1. In additon, I need create some applications that generate variable data rate using exponential and pareto distribution. I just need to take a look at NS-2 source code and enhanced the source code in MIRAI-SF3.1.

Friday, September 22, 2006

KingMax USB FLash

Have you ever experienced when your favourite USB thumb drive or flash drive failed? I have two thumb drives which are 64MB and 128MB. The 64MB carries an APACER brand which cost about RM 120 in 2003. Today, the prices for USB flash drive are getting cheaper. I apparently ‘stole’ the 128MB from my dad’s collection of USB drives.

Unfortunately, two days ago my dad’s KINGMAX USB drive just failed. The light indicator stops blinking and no matter how much I banged it against the surface of my desk and threw against the wall. The blue and black USB flash drive just stops working. All the important data are lost. I remembered when my room mate accidentally had his USB thumb drive wash in a washing machine. Luckily, the APACER USB flash drive stills work after he dismantled and dried.

So far I have some experience in using OMNET++, NS-2 and MIRAI-SF which is based on SSFnet network simulator. You can find more information on the simulators by using the google search. I just found out there is a commercial of OMNET++ called OMNEST.

Thursday, September 21, 2006

Canon DigiCam

A digital cameral is another cool gadget on my wish list. I'm looking for a camera that is under RM 1000. Steves Digicams website reviewed Canon PowerShot A540 features six megapixels resolution and 4x optical zoom. CNET rated as 7.6 out of 10. There is a CNET Video review which you can watch and gauge how big the camera is. Canon Powershot A540 has optional accessories such as Underwater casing that you can purchased. It is priced at RM 888.


In the previous post, I did mentioned that I implementing a method to measure the throughput on certain interval of time. Well, I'm still doing it and I'm stuck. I can not seem to get the method working to my preference. Ideas please come to me. MIRAI-SF network simulator has some codes which has similar concept but it is calculater based on how many packets are passed through a node on certain interval.

Wednesday, September 20, 2006

Free Laptop

Anyone of you want to give their for free? I received forwarded email saying that there is a marketing company in Canada would give an Acer notebook for free. I think have received similar email not so long time ago. All you have to do is register with their web. It's a hoax. Who would want to give a mobile pc for free. Click here!
I bet that website would just want to collect emails so they can spam peoples' inbox with stupid advertisements.

Anyway, my dad is thinking of buying an entry level Acer notebook. I checked the price list at lowyat.net which is quoted at RM 2199 with a Linux OS.

I used to play around with Knoppix which is an OS runs from your CD-ROM drive. You would need at least 256Mbytes of random access memory. Once the OS is loaded, you could access all the partition of Windows's Hard Drive.In addition, you could even connect to the Internet or join the local area network. Cool eh. Go and download the *.iso disk image and burn it onto a cd.

Tuesday, September 19, 2006

'akashah on the world map

Haha gotcha, I'm still in Malaysia lah!. I was surprised that when I googled and found that `Akashah is located in Northern Sudan, Afrika. Click `Akashah google map. :P

An update of my work. I'm still in the progress implementing a method to measure the throughput of the packets when the 3g base station is transmitting the packets to mobile node. The packets is actually had been traced in the log file. The problem is that I have still have to do some simple script to calculate the throughtput. It would save some time and memory space if I implements directly into the code.

I have some problem with queue. I still thinking how I'm going to integrate the simulator. Right now, I have no idea. I stumbled upon which explained the modelling of queue. I have got time to read it yet.

Monday, September 18, 2006

Broadband BandWagon

Currently, I'm on 512kbps TMnet Streamyx which I pay for RM 66 per month which is quite reasonable compared to the TMnet 1515 dial-up service which can cost a bomb when you go online for 24 hours a day. Not to mention the 56kbps which is extremely slow.

TheStar online reported that Maxis which going to roll out High Speed Broadband for home over its 3G network. TMnet only offers maximun 1Mbps for Home user. I hope Maxis would offer a greater bandwidth than the current TMnet 1 Mbps at a reasoble price. I would be the one to be sign up. Hahaha maybe.

Maxis mentioned the Broadband service will be using HSDPA (High Speed Data Packet Access) technology. Hey, I used to research this topic before I move to Fast Handover for Mobile IP. HSDPA simulation could be simulated using ns-2 extension called EURANE. Back to the topic, So I bet we have to use a wireless Modem not like our TMnet Streamyx modem which connected to normal copper phone line. Cool!

More? Click here

Saturday, August 19, 2006

drop tail

It seems I dont really have to implement OVSF tree. I just to need concentrate on queue and simple bandwidth allocation.MIRAI-SF3.1 does not implement any queue in routers, switches and accesspoints. So I think my job would be implementing a drop tail queue that can be integrate in network components.I started off by making a simple queue in two nodes and using the MIRAI-SF3.1 simulator core libraries.Messages are transmiited between the two nodes.

Wednesday, August 09, 2006

OVSF

I just found out that when the mobile node is trying to connect to the base station. The basestation will allocate a code. This code is allocated from a binary tree called Orthogonal variable spreading factor (OVSF). It is a unique code that allows to differentiate each user on the same resource. It is like two persons talking to each other in a noisy and crowded area. Only the two persons can understand and hear each other because of them has the unique code that have been allocated. The people around of them only hear background noise.

Friday, July 28, 2006

Changes...

I got a new task for my final project. I got to make some change in the current 3G base station and 3G device implementation.

The changes are :-
1) bandwidth for the link between the bs and mobile node
2) the incoming connection from a mobile node will be defer and packet loss or drop will occur.
3) each mobile node is allocated some of the total bandwidth
3) the bandwidth is return when mobile node disconnects from the bs.

How? where? what?

Monday, July 17, 2006

Handover latency

Mana aku nak cari nilai handover latency ni. Aku baru halfway cari kat ts 25 series kat 3gpp.org. aku ada gak cari kat journal dr ieee. so far tak jumpe lagi. argh geram aku..namun usaha harus teruskan.

aku nak jerit kuat2.....arghhhhhhhhhhhhhhhhhhhh gerammnya aku.........