Pages

Subscribe:

Ads 468x60px

4/17/11

Distance Calculation for Coverage

In simulation of WSN coverage, parameters i used are service area, sensors radius, coverage, coordinate position of x and y of sensors and cost. service area is a area for placement the sensors, coverage is the area that covered by sensors. Every sensor has it's radius and it's radius determine how far the coverage of the sensor which means that it's influence the cost of WSN. Where's radius and position of sensors is generate randomly. Example, there are 6 sensors with difference radius like this :




because it generate randomly, so it's position and radius is could be same or difference. And to calculate the sensor's coverage wide, i used this formula :
where's :
 is sensor's y coordinate value
is sensor's x coordinate value

 is service area's x coordinate value
  is service area's y coordinate value
  is sensor's x radius


Here's the example of type A sensor's coverage calculation :
Type A sensor's position is on {xA, yA} and it has radius as A m. So, with the formula i used, it could be determine which is covered by sensor or not. If  it coverage by sensors, it must be painted red as picture above.
on java programing, it'll be like this :


note : this program is continued from the last post, so that may consist a part or variable from previous post.
and the output is like this :
Since i print "1" for sensor's coverage n "0" for service area that wasn't covered so the output becomes like above. That's why i put it on word n analyze it :
  Where's x is count from up to down and y count from left to right, picture above shows 4 type of sensors from Individu 1. We could calculate coverage total use this program :
Then the result is :
for sensor composition like this :

4/15/11

Make a random value in Java

SO SAD!!! i have write my post for this title but suddenly my PC restarting itself and i must to write again... ugh,, so frustrating!!
But, fortunately i still save some data... Praise my Lord...
So, here is my program for generate a random value in java programing. i'll use an printscreen of my program and it's output.



and it's outputs for every running program is always difference because it's randoms behavior. like this :
second running

third running
so, if you want to generate a random value on java programing :
  • import java.util.*;
  • make an object from class Random :
 Random random = new Random() ;
  • and the syntax is :
individu[i][0][index]=random.nextInt(100);
means that generate an integer random value between 0 and 100.

4/14/11

My Final Project Topics

I think I should post this a few month ago, but still i have enough time to do that till now... so sad, but it's fine! coz i finaly can upload it!! hahahhaha...
Well, actually i got my Final Project's theme from my Lecture. Back then I still a novice, don't know what to do even though i love programming better than make a robots.. hohohohoho...

What i do in my final project is about WSN that make a simulation about coverage of wireless sensors in a square flat field, and change the sensor's radius and position randomly. And the purpose of  this projects is to find the perfect combination of the position and the radius of the sensors. And because the radius sensors determine the cost of the sensors, so every combination of sensor's radius and position have it's cost and coverage. to choose the perfect combination, used a MOO algorithm that's sum of weighted cost function. And to determine the position and the radius of the sensors, use a genetic algorithm. I use java programing to simulate this program and i use NetBeanIDE6.8 as my workplace. this is my proposal i used for my Final Project's Title Assembly, PROPOSAL TPPA  and this project base on this paper : Coverage Modeling and simulating coverage in sensor networks.


Finaly!! My Blog execlusively for my FINAL PROJECT!!!^0^)/

I have ever made a blog before, but it just an ordinary blog that time... So, that's why i made this to save my Final Project and modules that i have learned from  my beloved campus

i have doing my final project since July 2010, but so many things happened till i can save my file on this blog now. Since i'm in my last semester, i realize (actually my lecturer did it) that so many things that i have learn a few years ago becomes fading.
That's why i also wants to make this blog as my dictionary, wishing it will help me to remind what i have learn. i don't want graduate with forget anythings..hahahha...

Fighting!!! Do 100% for my beloved Lord!!!