5.0

5.0 | 5 ratings Rate this file 12 Downloads (last 30 days) File Size: 6.73 KB File ID: #20209
image thumbnail

2D Multiwall model

by Sebastien Paris

 

08 Jun 2008 (Updated 13 Oct 2011)

A fast implementation of the Multiwall model

| Watch this File

File Information
Description

Compute 2D - MultiWall model
 
Usage
------
 
rs_amp = multiwall_model(TXpoint , RXpoint , walls , material , [L0] , [n]);
 
 
Inputs
-------
 
TXpoint Transmitter points (2 x Nt)
RXpoint Receiver points (2 x Nr)
walls Walls (4 x nwall) where [xi,0 ; yi,0 ; xi,1 ; yi,1] are coordinates of the i'th wall, i = 1,...,nwall.
material Material (2 x nwall) where [typei ; ni] reprensents type of wall and associated attenuation index, i = 1,...,nwall.
L0 Reference loss value at 1m (L0 = 40.2 default)
n Power decay factor (n = 2 default)
 
Outputs
-------
rs_amp Total power (Nt x Nr)

Compilation instruction : Please run mexme_multiwall_model
------------------------------

Run mexme_multiwall_model for compile the mex file (please be sure that mex -setup is ok on your platform).

Run test_multiwall_model for demo.

Please open multiwall_model.c for other examples

MATLAB release MATLAB 7.5 (R2007b)
Other requirements A C compiler (At least included LCC compiler)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (26)
22 Mar 2009 yon

hi
please how i make the (data_mw), the file appeare as winap medea player file.can you clear me that?

so thanks.

25 Mar 2009 Sebastien Paris

I don't understand your question. You have just to run the demo file 'test_multiwall_model.m'. data_mw is matlab data file. You can load it with the command load.

23 Jul 2009 Bing

Hello,
there is a problem,
??? Undefined function or variable 'getpts'.

Error in ==> test_multiwall_model at 27
[x , y] = getpts;

pls help,thank u

25 Jul 2009 Sebastien Paris

Ok, the getpts function is from the image processing toolbox. There are plenty of similar functions in the FEX.

31 Aug 2009 Mohd Sharim

Hello Mr. Sebatien Paris,

I'm interested with the 2D Multiwall Model. Here Im just curious about the reference value and power factor decay that you used. May I know which propagation model that you referred for both of the values.

Thank You,

sincerely Yours,

Sharim

01 Sep 2009 Sebastien Paris

Please open the *.c file and find the quoted reference.

10 Sep 2009 Mohd Sharim

Hello Mr. Sebastien Paris,

Thank you for your help regarding to my last question. Now I need your help to study path loss characteristic in 2D database. Here I got a 2D database. When I tried to load the database base using 'imread' command and then load the file in your multiwall model, MATLAB unable to load the file. So, if you have any idea regarding to this post, please help me Sir.

Thank You,

Sincerely Yours,

Sharim

21 Nov 2009 Mohd Sharim

Hello Sir,

Can you please explain me for the usage of the .mw* file in MATLAB. Thanks

03 Apr 2010 Ben Jones

To get it to work I had to change line 132 in multiwall_model.c from

#define MAX(a , b) ((a) >= (b) ? (a) : (b))

to

#define max(a , b) ((a) >= (b) ? (a) : (b))

04 Apr 2010 Sebastien Paris

Ho yeah, it's true .... Update with this minor bug, thx you.

01 May 2010 michael

Sebastien,

can you please explain the mathematics behind the multi-wall model in your C file?
i know that it counts walls,
but how do you check that you pass them?

thank you

05 May 2010 Sebastien Paris

There is a reference in the top of the C-fille...

Regards,

28 Jun 2010 kimo

Hi,
Can you tell us please if the reflection, diffraction and refraction phenomena are taken into account?
Thanks for responding
Kimo

29 Jun 2010 kimo

Hello again,
sorry but I figured out that the answer was NO.
I have two more questions please.
- Is it possible to take these phenomena easily and efficacely?
- Is the choice of the material matrix dimension (2*N) going in this direction (rather than (1*N))?
Thanks for your response and this vgood file.
Regards,

01 Jul 2010 Sebastien Paris

For a more complete modelization, please have a look to :

http://www.mathworks.com/matlabcentral/fileexchange/21149-particle-filter-for-robot-localization-using-wifi-measurements

24 Aug 2010 Tanyer Alan  
14 Apr 2011 Jachym

Hi Sebastien, thanks for your model. I would like to use it with my small floorplan (for my school work). Which file should I edit to define own walls place and walls materils?
I didn't find manual or something else about model.
Thanks
Jachym

19 Apr 2011 Sebastien Paris

Jachym: you have to fill according to your floorplan variables :

1) walls (4 x nwall) where [xi,0 ; yi,0 ; xi,1 ; yi,1] are coordinates of the i'th wall, i = 1,...,nwall.
 
2) material (2 x nwall) where [typei ; ni] reprensents type of wall and associated attenuation index, i = 1,...,nwall.

This part is the most boring to do from a floorplan.

05 Oct 2011 midavisdj

Hi Sebastien

I need to know if I can use an image (.jpg) and use it as background.

07 Oct 2011 Sebastien Paris

midavisdj,

No you can't process like directly. You must to some image processing to extract walls from your floorplan ....

13 Oct 2011 Faisol Riza

Hello Mr. Sebastien,

I wonder how you set the parameter of L0=40.2 in the m file. Whereas in the reference you attach in C file, it say 47,4. It is very helpfull if you would explain it.

Thank you very much

13 Oct 2011 Sebastien Paris

Faisol... Can't tell you, I can't remember this detail.

13 Oct 2011 Faisol Riza

It's ok then. Btw thank you very much. Your work is so good.

13 Oct 2011 Sebastien Paris

Thanks u. A small update with openMP support will be published soon.

27 Oct 2011 Gowrishankar S

Dear All,

 I'm getting the following error while compiling the multiwall_model.c file. Can anyone give me some pointer on how to rectify this error?

Thanks in advance

mex multiwall_model.c
lcc preprocessor warning: multiwall_model.c:241 Unknown preprocessor control endifs
lcc preprocessor error: multiwall_model.c:289 Unterminated #if/#ifdef/#ifndef
Warning multiwall_model.c: 236 local `double u' is not referenced
Warning multiwall_model.c: 236 local `double t' is not referenced
Warning multiwall_model.c: 236 local `double dy' is not referenced
Warning multiwall_model.c: 236 local `double dx' is not referenced
Warning multiwall_model.c: 236 local `double by' is not referenced
Warning multiwall_model.c: 236 local `double bx' is not referenced
Warning multiwall_model.c: 236 local `double cy' is not referenced
Warning multiwall_model.c: 236 local `double cx' is not referenced
Warning multiwall_model.c: 236 local `double denom' is not referenced
Warning multiwall_model.c: 235 local `double L' is not referenced
Warning multiwall_model.c: 235 local `double Lfsl' is not referenced
Warning multiwall_model.c: 235 local `double disttr' is not referenced
Warning multiwall_model.c: 234 local `double y4' is not referenced
Warning multiwall_model.c: 234 local `double y3' is not referenced
Warning multiwall_model.c: 234 local `double y2' is not referenced
Warning multiwall_model.c: 234 local `double _y1' is not referenced
Warning multiwall_model.c: 234 local `double x4' is not referenced
Warning multiwall_model.c: 234 local `double x3' is not referenced
Warning multiwall_model.c: 234 local `double x2' is not referenced
Warning multiwall_model.c: 234 local `double x1' is not referenced
Warning multiwall_model.c: 233 local `int iNt' is not referenced
Warning multiwall_model.c: 233 local `int kd' is not referenced
Warning multiwall_model.c: 233 local `int jd' is not referenced
Warning multiwall_model.c: 233 local `int id' is not referenced
Warning multiwall_model.c: 232 local `int k' is not referenced
Warning multiwall_model.c: 232 local `int j' is not referenced
Warning multiwall_model.c: 232 local `int i' is not referenced
Error multiwall_model.c: 288 syntax error; found `end of input' expecting `}'
2 errors, 28 warnings
 
  C:\PROGRA~1\MATLAB\R2007A\BIN\MEX.PL: Error: Compile of 'multiwall_model.c' failed.

28 Oct 2011 Sebastien Paris

Gowrishankar,

Please change your C compiler. You can use the free MSVC express from Microsoft. Please refer which MSCV express you can use according to you current Matlab version

Please login to add a comment or rating.
Updates
04 Sep 2008

Some minor speedup

27 Nov 2009

-add mexme_multiwall_model, a better inputs description and some small speed-up

04 Apr 2010

A minor bug in a #define and add mexme_multiwall_model

13 Oct 2011

-Cleanup code
-Add openMP support (to be compile with -DOMP directive and link with MKL)

Tag Activity for this File
Tag Applied By Date/Time
wireless Sebastien Paris 22 Oct 2008 10:05:14
indoor propagation Sebastien Paris 22 Oct 2008 10:05:15
emperical parametric model Sebastien Paris 22 Oct 2008 10:05:15
communications Sebastien Paris 22 Oct 2008 10:05:15
communications Ben Jones 03 Apr 2010 06:16:14
indoor propagation Ben Jones 03 Apr 2010 06:16:23

Contact us at files@mathworks.com