Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

MATLAB to automatically create a wireless network.

Status
Not open for further replies.

ellobazo

Newbie level 4
Joined
Oct 11, 2009
Messages
6
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,283
Location
barcelona
Activity points
1,363
Hi

I am trying to develop a program using Matlab that automatically designs a wireless network.

I need to program Matlab to insert base Stations in an area and allow me to move it around .

any idea how to insert the base station and move it.?

Thanks
 

Masterpiece

Newbie level 5
Joined
Feb 19, 2003
Messages
10
Helped
16
Reputation
30
Reaction score
14
Trophy points
1,283
Location
Egypt
Activity points
73
ellobazo said:
Hi

I am trying to develop a program using Matlab that automatically designs a wireless network.

I need to program Matlab to insert base Stations in an area and allow me to move it around .

any idea how to insert the base station and move it.?

Thanks

Hi ellobazo,

What do you mean by "to move it around"? Do you want something with a graphical user interface?

I'm currently working on a project where I randomly place nodes in a two-dimentions space. It's useful in Wireless Sensor Networks simulations. Let me know if this is useful and I can share it with you (it's a very simple code)
 

ellobazo

Newbie level 4
Joined
Oct 11, 2009
Messages
6
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,283
Location
barcelona
Activity points
1,363
HI .. I am Using a GUI, my plan is to allow the user to decide how many base stations to be entered by the program, (this can be random locations.).

I am using Inpolygon to try to place the base station( dots, stars, circles anything) within the map but i cant do it. im using an example from MATLAB called 'the travelling sales man'. but i can show a picture but cant place things (base station) on it.

If you could help me solve this problem i will be very happy. Many thanks,
 

Masterpiece

Newbie level 5
Joined
Feb 19, 2003
Messages
10
Helped
16
Reputation
30
Reaction score
14
Trophy points
1,283
Location
Egypt
Activity points
73
Hi ellobazo,

Unfortunately, I don't have much experience with the GUI. I'm programming in my project with Matlab but using no GUI. I'm simulating Wireless Sensor Networks which is different in operations than the Cellular Networks as it uses multi-hop communication with no base stations. Sorry.
 

ellobazo

Newbie level 4
Joined
Oct 11, 2009
Messages
6
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,283
Location
barcelona
Activity points
1,363
Masterpiece said:
Hi ellobazo,

Unfortunately, I don't have much experience with the GUI. I'm programming in my project with Matlab but using no GUI. I'm simulating Wireless Sensor Networks which is different in operations than the Cellular Networks as it uses multi-hop communication with no base stations. Sorry.

Hi..

could i have a look at your code or examples. so that i can try to modify and make it work with the GUI ?. perhaps after doing so i might get and new idea of how to implement mine. because now that you talk about sensor networks, i also need my program to sense when something is too close to a base station, for example. if there are 2 base stations but there is a third which is not needed and is making contact with the other two, it could be deleted or disable or something.

thanks
 

Masterpiece

Newbie level 5
Joined
Feb 19, 2003
Messages
10
Helped
16
Reputation
30
Reaction score
14
Trophy points
1,283
Location
Egypt
Activity points
73
ellobazo said:
Masterpiece said:
Hi ellobazo,

Unfortunately, I don't have much experience with the GUI. I'm programming in my project with Matlab but using no GUI. I'm simulating Wireless Sensor Networks which is different in operations than the Cellular Networks as it uses multi-hop communication with no base stations. Sorry.

Hi..

could i have a look at your code or examples. so that i can try to modify and make it work with the GUI ?. perhaps after doing so i might get and new idea of how to implement mine. because now that you talk about sensor networks, i also need my program to sense when something is too close to a base station, for example. if there are 2 base stations but there is a third which is not needed and is making contact with the other two, it could be deleted or disable or something.

thanks

Hi ellobazo,

Wireless Sensor Networks (WSN) is different than the Cellular Networks as I mentioned earlier.

A WSN is composed of a large number of sensor nodes that communicate using a wireless medium (air).
The sensor nodes are deployed randomly in the environment to be monitored.
The sensor nodes distributed in ad hoc structure.
In WSN there is no base station and not all nodes hear each other.
The WSN is a multi-hop network.

Basic part of my code is to randomly place the sensor nodes in the given space then connecting each two nodes if the distance between them less than or equal to the communication radius. Please check Matlab code below.

Code:
clear;
noOfNodes  = 50;
rand('state', 0);
figure(1);
clf;
hold on;
L = 1000;
R = 200; % maximum range;
netXloc = rand(1,noOfNodes)*L;
netYloc = rand(1,noOfNodes)*L;
for i = 1:noOfNodes
    plot(netXloc(i), netYloc(i), '.');
    text(netXloc(i), netYloc(i), num2str(i));
    for j = 1:noOfNodes
        distance = sqrt((netXloc(i) - netXloc(j))^2 + (netYloc(i) - netYloc(j))^2);
        if distance <= R
            matrix(i, j) = 1;   % there is a link;
            line([netXloc(i) netXloc(j)], [netYloc(i) netYloc(j)], 'LineStyle', ':');
        else
            matrix(i, j) = inf;
        end;
    end;
end;
 
Last edited by a moderator:

cdivya

Newbie level 1
Joined
Nov 23, 2009
Messages
1
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,283
Location
chennai
Activity points
1,284
i too need this same program.one program is uploades in this.in that instead of for loop i need to assign one matrix and to create the link.that matrix is by using blom scheme.
Masterpiece said:
ellobazo said:
Masterpiece said:
Hi ellobazo,

Unfortunately, I don't have much experience with the GUI. I'm programming in my project with Matlab but using no GUI. I'm simulating Wireless Sensor Networks which is different in operations than the Cellular Networks as it uses multi-hop communication with no base stations. Sorry.

Hi..

could i have a look at your code or examples. so that i can try to modify and make it work with the GUI ?. perhaps after doing so i might get and new idea of how to implement mine. because now that you talk about sensor networks, i also need my program to sense when something is too close to a base station, for example. if there are 2 base stations but there is a third which is not needed and is making contact with the other two, it could be deleted or disable or something.

thanks

Hi ellobazo,

Wireless Sensor Networks (WSN) is different than the Cellular Networks as I mentioned earlier.

A WSN is composed of a large number of sensor nodes that communicate using a wireless medium (air).
The sensor nodes are deployed randomly in the environment to be monitored.
The sensor nodes distributed in ad hoc structure.
In WSN there is no base station and not all nodes hear each other.
The WSN is a multi-hop network.

Basic part of my code is to randomly place the sensor nodes in the given space then connecting each two nodes if the distance between them less than or equal to the communication radius. Please check Matlab code below.

clear;
noOfNodes = 50;
rand('state', 0);
figure(1);
clf;
hold on;
L = 1000;
R = 200; % maximum range;
netXloc = rand(1,noOfNodes)*L;
netYloc = rand(1,noOfNodes)*L;
for i = 1:noOfNodes
plot(netXloc(i), netYloc(i), '.');
text(netXloc(i), netYloc(i), num2str(i));
for j = 1:noOfNodes
distance = sqrt((netXloc(i) - netXloc(j))^2 + (netYloc(i) - netYloc(j))^2);
if distance <= R
matrix(i, j) = 1; % there is a link;
line([netXloc(i) netXloc(j)], [netYloc(i) netYloc(j)], 'LineStyle', ':');
else
matrix(i, j) = inf;
end;
end;
end;
 

frenzz.b

Newbie level 1
Joined
Dec 22, 2009
Messages
1
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Location
noida
Activity points
1,286
hi ellobazo,
i really appreciate this idea of yours. Sir, can i borrow this idea of yours for my final year engineering project. Sir, i request you to provide me the full details of your idea if you approve of my taking this great innovative idea of yours as a final year project..

would be really grateful to you for the above.
thanks
 

ellobazo

Newbie level 4
Joined
Oct 11, 2009
Messages
6
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,283
Location
barcelona
Activity points
1,363
Hi ...
I am currently using this Idea for my final year project. I am doing Computer systems Engineering. I guess you could do something related but not similar as this will or might bring inconvenient to mine. hope you understand.




i really appreciate this idea of yours. Sir, can i borrow this idea of yours for my final year engineering project. Sir, i request you to provide me the full details of your idea if you approve of my taking this great innovative idea of yours as a final year project..

would be really grateful to you for the above.
thanks[/quote]
 

harish.choula

Newbie level 1
Joined
May 10, 2010
Messages
1
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,284
i want to manually deploy nodes using MATLAB.......CAN ANY ONE HELP ME
 

abe_yhk

Newbie level 1
Joined
Jul 21, 2010
Messages
1
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Location
UK
Activity points
1,286
Hey there,

I am trying to simulate RSS and ToA for WSN and I am facing difficulties doing so ... do you have a code in which I can compare with the one i have that plots a gaussian probability distribution function for a large number of sensor nodes ... that is a code that distributes thousands of nodes and form a GAUSSIAN PDF results ??

If possible please provide me with a code to compare with mine using 'MATLAB'
 

cherlyflar

Newbie level 1
Joined
Aug 16, 2010
Messages
1
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Location
Chennai
Activity points
1,284
Hi,
will any one of you please help me to write code in Matlab to simulate WSN Scenario as i am newer to this project in PG
 

craft2002

Newbie level 2
Joined
Oct 31, 2008
Messages
2
Helped
11
Reputation
22
Reaction score
9
Trophy points
1,283
Activity points
1,290
This is a sample of creating a node manuly using GUI
BeconX=500;
BeconY=500;
axes(handles.axes1);
gca;
hold on;
hbecon=plot(BeconX,BeconY,'s')
set(hbecon,'color','red','LineWidth',8);

Added after 3 minutes:

I Think this site can helps
https://www.eecs.umich.edu/~hero/localize/


Can I have your matlab code if u need help
 

sonoso

Newbie level 1
Joined
Oct 23, 2010
Messages
1
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,283
Activity points
1,285
Hi ellobazo,


Wireless Sensor Networks (WSN) is different than the Cellular Networks as I mentioned earlier.

A WSN is composed of a large number of sensor nodes that communicate using a wireless medium (air).
The sensor nodes are deployed randomly in the environment to be monitored.
The sensor nodes distributed in ad hoc structure.
In WSN there is no base station and not all nodes hear each other.
The WSN is a multi-hop network.

Basic part of my code is to randomly place the sensor nodes in the given space then connecting each two nodes if the distance between them less than or equal to the communication radius. Please check Matlab code below.

clear;
noOfNodes = 50;
rand('state', 0);
figure(1);
clf;
hold on;
L = 1000;
R = 200; % maximum range;
netXloc = rand(1,noOfNodes)*L;
netYloc = rand(1,noOfNodes)*L;
for i = 1:noOfNodes
plot(netXloc(i), netYloc(i), '.');
text(netXloc(i), netYloc(i), num2str(i));
for j = 1:noOfNodes
distance = sqrt((netXloc(i) - netXloc(j))^2 + (netYloc(i) - netYloc(j))^2);
if distance <= R
matrix(i, j) = 1; % there is a link;
line([netXloc(i) netXloc(j)], [netYloc(i) netYloc(j)], 'LineStyle', ':');
else
matrix(i, j) = inf;
end;
end;
end;
hi ...
can i get some help in creating a wireless sensor network with certain specs please??????????????

if u accept to help me please contact me personally in my personal email....which is sonoso at hot mail

thank u
 

wonk.xags1

Newbie level 4
Joined
Dec 23, 2010
Messages
5
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,313
Dear, I am doing MS thesis on "Energy Efficient Localization in Wireless Sensor Network". I have to simulate in NS-2 and OPNET. Can any one help me in sharing data and tutorial related to my thesis. Please don't hesitate.
I am also available on Skype : usman_msee
and on Facebook at : ugorgeous4me@yahoo.com

Looking forward for the act of kindness.
 

KR-151

Newbie level 1
Joined
Feb 16, 2011
Messages
1
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,283
Activity points
1,287
Dear all,
i am student completing Bsc Computer Science with Network Security. my final year thesis is based on simulating a neighbor base clustering algorithm for wireless sensor network. having been through lot of trouble finding source codes or even pseudocode of the 2 algorithms under neighbor base scheme, PEGASIS and TECA, i really need some help, does anyone happen to posses the related codes in matlab or ns2 or help me out in ways possible.
thanks

skype: kpermal
hotmail:krishnen8
 

pakitos

Advanced Member level 1
Joined
Nov 14, 2005
Messages
457
Helped
77
Reputation
154
Reaction score
35
Trophy points
1,308
Activity points
3,639
Hi there,
I want to randomly generate sensor nodes in a square area using matlab. And then retrieve the position of each sensor
thanks to all
 

pakitos

Advanced Member level 1
Joined
Nov 14, 2005
Messages
457
Helped
77
Reputation
154
Reaction score
35
Trophy points
1,308
Activity points
3,639
Hi, this topic is beeing selected by students. It will be very useful if you share your work when a problem is solved
remember once you were in the same shoe as the ones who are now asking for help
for sure I wont forget these.
I need to generate randomly 3 types of nodes (normal,problematic) then make 1 of the normal as sink plot and retreive the position
can you help?
thanks in advance
 

jaxrobinson

Newbie level 5
Joined
May 23, 2011
Messages
9
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,315
This is actually gonna be very interesting.I am really going to feel on the world if it works out.
 

pakitos

Advanced Member level 1
Joined
Nov 14, 2005
Messages
457
Helped
77
Reputation
154
Reaction score
35
Trophy points
1,308
Activity points
3,639
Everything is going on so well till now
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top