Email: helpdesk@telkomuniversity.ac.id

This Portal for internal use only!

  • My Download
  • Checkout
Application Package Repository Telkom University
All Categories

All Categories

  • IBM
  • Visual Paradigm
  • Adobe
  • Google
  • Matlab
  • Microsoft
    • Microsoft Apps
    • Analytics
    • AI + Machine Learning
    • Compute
    • Database
    • Developer Tools
    • Internet Of Things
    • Learning Services
    • Middleware System
    • Networking
    • Operating System
    • Productivity Tools
    • Security
    • VLS
      • Office
      • Windows
  • Opensource
  • Wordpress
    • Plugin WP
    • Themes WP
  • Others

Search

0 Wishlist

Cart

Categories
  • Microsoft
    • Microsoft Apps
    • Office
    • Operating System
    • VLS
    • Developer Tools
    • Productivity Tools
    • Database
    • AI + Machine Learning
    • Middleware System
    • Learning Services
    • Analytics
    • Networking
    • Compute
    • Security
    • Internet Of Things
  • Adobe
  • Matlab
  • Google
  • Visual Paradigm
  • WordPress
    • Plugin WP
    • Themes WP
  • Opensource
  • Others
More Categories Less Categories
  • Get Pack
    • Product Category
    • Simple Product
    • Grouped Product
    • Variable Product
    • External Product
  • My Account
    • Download
    • Cart
    • Checkout
    • Login
  • About Us
    • Contact
    • Forum
    • Frequently Questions
    • Privacy Policy
  • Forum
    • News
      • Category
      • News Tag

iconTicket Service Desk

  • My Download
  • Checkout
Application Package Repository Telkom University
All Categories

All Categories

  • IBM
  • Visual Paradigm
  • Adobe
  • Google
  • Matlab
  • Microsoft
    • Microsoft Apps
    • Analytics
    • AI + Machine Learning
    • Compute
    • Database
    • Developer Tools
    • Internet Of Things
    • Learning Services
    • Middleware System
    • Networking
    • Operating System
    • Productivity Tools
    • Security
    • VLS
      • Office
      • Windows
  • Opensource
  • Wordpress
    • Plugin WP
    • Themes WP
  • Others

Search

0 Wishlist

Cart

Menu
  • Home
    • Download Application Package Repository Telkom University
    • Application Package Repository Telkom University
    • Download Official License Telkom University
    • Download Installer Application Pack
    • Product Category
    • Simple Product
    • Grouped Product
    • Variable Product
    • External Product
  • All Pack
    • Microsoft
      • Operating System
      • Productivity Tools
      • Developer Tools
      • Database
      • AI + Machine Learning
      • Middleware System
      • Networking
      • Compute
      • Security
      • Analytics
      • Internet Of Things
      • Learning Services
    • Microsoft Apps
      • VLS
    • Adobe
    • Matlab
    • WordPress
      • Themes WP
      • Plugin WP
    • Google
    • Opensource
    • Others
  • My account
    • Download
    • Get Pack
    • Cart
    • Checkout
  • News
    • Category
    • News Tag
  • Forum
  • About Us
    • Privacy Policy
    • Frequently Questions
    • Contact
Home/Matlab/Using sigstrength() for raytracing propagation model

Using sigstrength() for raytracing propagation model

/ 2025-01-07
Using sigstrength() for raytracing propagation model
Matlab

I’m trying to run a ray tracing simulation for a simple ground reflection scenario. I have an STL file with a "floor" that is 1m wide (in y-direction) and 25m long (in the x-direction). I place a transmitter at the location [0.1;0.5;3]. I place 1000 receivers collinear with the transmitter, and at the same height:

clear all;clc;close all;
stlFile = ’25m1m_floor.stl’;
viewer = siteviewer(‘SceneModel’,stlFile); % Required to link STL for ray tracing

tx = txsite(‘cartesian’, ‘AntennaPosition’, [0.1;0.5;3], ‘TransmitterFrequency’, 900e6, ‘TransmitterPower’, 0.001);

numPointsX = 1000;numPointsY = 1;
x = linspace(0.1, 25, numPointsX); y = linspace(0.5, 0.5, numPointsY); [X, Y] = meshgrid(x, y);
Z = 3 * ones(size(X));

for j = 1:numPointsX
for i = 1:numPointsY
rxs(i,j) = rxsite(‘cartesian’, ‘AntennaPosition’, [X(i,j); Y(i,j); Z(i,j)], ‘CoordinateSystem’, ‘cartesian’);
end
end

%To display the tx and rx in siteviewer
%{

show(tx,"ShowAntennaHeight",false);

for i = 1:numel(rxs)
show(rxs(i),"ShowAntennaHeight",false);
end
%}

pm = propagationModel(‘raytracing’, ‘Method’, ‘sbr’, ‘MaxNumReflections’, 1,…
‘SurfaceMaterial’, ‘concrete’, ‘CoordinateSystem’, ‘cartesian’);

ss(1,:) = sigstrength(rxs,tx,pm);

packetLength = 33;
txPower = 0.01;
for j = 1:numPointsX
for i = 1:numPointsY
rx = rxs(i,j);
rays_out = raytrace(tx, rx, pm);
rays = rays_out{:};
[RSS(i,j), rxPower(i,j)] = calcRSSRays(rays,packetLength,txPower);
end
end

figure;plot(x,RSS);
hold;plot(x,ss);

function [RSS,rxPower] = calcRSSRays(rays,packetLength,txPower)

data = randi([0 3], packetLength, 1);
txPacket = sqrt(txPower)*pskmod(data, 4, pi/4);

rxPacket = zeros(1, packetLength);

pathGains = -[rays.PathLoss];
phaseShifts = [rays.PhaseShift];

pathGainsLinear = 10.^(pathGains / 10);

for s = 1:packetLength
E_ray = sqrt(pathGainsLinear) .* exp(-1j .* phaseShifts);
E_total = sum(E_ray * txPacket(s),"all");
rxPacket(s) = E_total;
end
rxPower = mean(abs(rxPacket).^2);
RSS = 10 * log10(rxPower./txPower);

end

The transmitter frequency is 900Mhz so the wavelength is around 0.33m. I’ve specified MaxNumReflections as 1, which I think should capture the ground reflection, and when I plot for one tx-rx pair, I can see that:

Since the tx and rx are all at the same height, I think I should get an RSS profile which decays with distance according to the power rule (i.e. 1/d^2), but with undulations where the ground reflected path interferes constructively and destructively with the line of sight ray.
However, when I plot the output from the sigstrength() function, there are no undulations. I’ve also tried calculating RSS from a packet-level simulation that I wrote, taking the rays output from the raytrace function – I think this is correct, because I do see the interference pattern in it:

Does anyone know if I’ve made a mistake in the ray-tracing/use of sigstrength()? Or is any further calculation required on it?
Or is this something to ask Mathworks support?

NOTE 1: Question editor doesn’t recognize .stl file extension for upload, so I’ve changed the extension to .txt. Extension needs to be changed to .stl to run it.
NOTE 2: I posted this question earlier, but I’ve come up with a better version of the simulation, so I’ve deleted that one before any answers/comments were posted on it.I’m trying to run a ray tracing simulation for a simple ground reflection scenario. I have an STL file with a "floor" that is 1m wide (in y-direction) and 25m long (in the x-direction). I place a transmitter at the location [0.1;0.5;3]. I place 1000 receivers collinear with the transmitter, and at the same height:

clear all;clc;close all;
stlFile = ’25m1m_floor.stl’;
viewer = siteviewer(‘SceneModel’,stlFile); % Required to link STL for ray tracing

tx = txsite(‘cartesian’, ‘AntennaPosition’, [0.1;0.5;3], ‘TransmitterFrequency’, 900e6, ‘TransmitterPower’, 0.001);

numPointsX = 1000;numPointsY = 1;
x = linspace(0.1, 25, numPointsX); y = linspace(0.5, 0.5, numPointsY); [X, Y] = meshgrid(x, y);
Z = 3 * ones(size(X));

for j = 1:numPointsX
for i = 1:numPointsY
rxs(i,j) = rxsite(‘cartesian’, ‘AntennaPosition’, [X(i,j); Y(i,j); Z(i,j)], ‘CoordinateSystem’, ‘cartesian’);
end
end

%To display the tx and rx in siteviewer
%{

show(tx,"ShowAntennaHeight",false);

for i = 1:numel(rxs)
show(rxs(i),"ShowAntennaHeight",false);
end
%}

pm = propagationModel(‘raytracing’, ‘Method’, ‘sbr’, ‘MaxNumReflections’, 1,…
‘SurfaceMaterial’, ‘concrete’, ‘CoordinateSystem’, ‘cartesian’);

ss(1,:) = sigstrength(rxs,tx,pm);

packetLength = 33;
txPower = 0.01;
for j = 1:numPointsX
for i = 1:numPointsY
rx = rxs(i,j);
rays_out = raytrace(tx, rx, pm);
rays = rays_out{:};
[RSS(i,j), rxPower(i,j)] = calcRSSRays(rays,packetLength,txPower);
end
end

figure;plot(x,RSS);
hold;plot(x,ss);

function [RSS,rxPower] = calcRSSRays(rays,packetLength,txPower)

data = randi([0 3], packetLength, 1);
txPacket = sqrt(txPower)*pskmod(data, 4, pi/4);

rxPacket = zeros(1, packetLength);

pathGains = -[rays.PathLoss];
phaseShifts = [rays.PhaseShift];

pathGainsLinear = 10.^(pathGains / 10);

for s = 1:packetLength
E_ray = sqrt(pathGainsLinear) .* exp(-1j .* phaseShifts);
E_total = sum(E_ray * txPacket(s),"all");
rxPacket(s) = E_total;
end
rxPower = mean(abs(rxPacket).^2);
RSS = 10 * log10(rxPower./txPower);

end

The transmitter frequency is 900Mhz so the wavelength is around 0.33m. I’ve specified MaxNumReflections as 1, which I think should capture the ground reflection, and when I plot for one tx-rx pair, I can see that:

Since the tx and rx are all at the same height, I think I should get an RSS profile which decays with distance according to the power rule (i.e. 1/d^2), but with undulations where the ground reflected path interferes constructively and destructively with the line of sight ray.
However, when I plot the output from the sigstrength() function, there are no undulations. I’ve also tried calculating RSS from a packet-level simulation that I wrote, taking the rays output from the raytrace function – I think this is correct, because I do see the interference pattern in it:

Does anyone know if I’ve made a mistake in the ray-tracing/use of sigstrength()? Or is any further calculation required on it?
Or is this something to ask Mathworks support?

NOTE 1: Question editor doesn’t recognize .stl file extension for upload, so I’ve changed the extension to .txt. Extension needs to be changed to .stl to run it.
NOTE 2: I posted this question earlier, but I’ve come up with a better version of the simulation, so I’ve deleted that one before any answers/comments were posted on it. I’m trying to run a ray tracing simulation for a simple ground reflection scenario. I have an STL file with a "floor" that is 1m wide (in y-direction) and 25m long (in the x-direction). I place a transmitter at the location [0.1;0.5;3]. I place 1000 receivers collinear with the transmitter, and at the same height:

clear all;clc;close all;
stlFile = ’25m1m_floor.stl’;
viewer = siteviewer(‘SceneModel’,stlFile); % Required to link STL for ray tracing

tx = txsite(‘cartesian’, ‘AntennaPosition’, [0.1;0.5;3], ‘TransmitterFrequency’, 900e6, ‘TransmitterPower’, 0.001);

numPointsX = 1000;numPointsY = 1;
x = linspace(0.1, 25, numPointsX); y = linspace(0.5, 0.5, numPointsY); [X, Y] = meshgrid(x, y);
Z = 3 * ones(size(X));

for j = 1:numPointsX
for i = 1:numPointsY
rxs(i,j) = rxsite(‘cartesian’, ‘AntennaPosition’, [X(i,j); Y(i,j); Z(i,j)], ‘CoordinateSystem’, ‘cartesian’);
end
end

%To display the tx and rx in siteviewer
%{

show(tx,"ShowAntennaHeight",false);

for i = 1:numel(rxs)
show(rxs(i),"ShowAntennaHeight",false);
end
%}

pm = propagationModel(‘raytracing’, ‘Method’, ‘sbr’, ‘MaxNumReflections’, 1,…
‘SurfaceMaterial’, ‘concrete’, ‘CoordinateSystem’, ‘cartesian’);

ss(1,:) = sigstrength(rxs,tx,pm);

packetLength = 33;
txPower = 0.01;
for j = 1:numPointsX
for i = 1:numPointsY
rx = rxs(i,j);
rays_out = raytrace(tx, rx, pm);
rays = rays_out{:};
[RSS(i,j), rxPower(i,j)] = calcRSSRays(rays,packetLength,txPower);
end
end

figure;plot(x,RSS);
hold;plot(x,ss);

function [RSS,rxPower] = calcRSSRays(rays,packetLength,txPower)

data = randi([0 3], packetLength, 1);
txPacket = sqrt(txPower)*pskmod(data, 4, pi/4);

rxPacket = zeros(1, packetLength);

pathGains = -[rays.PathLoss];
phaseShifts = [rays.PhaseShift];

pathGainsLinear = 10.^(pathGains / 10);

for s = 1:packetLength
E_ray = sqrt(pathGainsLinear) .* exp(-1j .* phaseShifts);
E_total = sum(E_ray * txPacket(s),"all");
rxPacket(s) = E_total;
end
rxPower = mean(abs(rxPacket).^2);
RSS = 10 * log10(rxPower./txPower);

end

The transmitter frequency is 900Mhz so the wavelength is around 0.33m. I’ve specified MaxNumReflections as 1, which I think should capture the ground reflection, and when I plot for one tx-rx pair, I can see that:

Since the tx and rx are all at the same height, I think I should get an RSS profile which decays with distance according to the power rule (i.e. 1/d^2), but with undulations where the ground reflected path interferes constructively and destructively with the line of sight ray.
However, when I plot the output from the sigstrength() function, there are no undulations. I’ve also tried calculating RSS from a packet-level simulation that I wrote, taking the rays output from the raytrace function – I think this is correct, because I do see the interference pattern in it:

Does anyone know if I’ve made a mistake in the ray-tracing/use of sigstrength()? Or is any further calculation required on it?
Or is this something to ask Mathworks support?

NOTE 1: Question editor doesn’t recognize .stl file extension for upload, so I’ve changed the extension to .txt. Extension needs to be changed to .stl to run it.
NOTE 2: I posted this question earlier, but I’ve come up with a better version of the simulation, so I’ve deleted that one before any answers/comments were posted on it. ray tracing, signal processing, communication, simulation MATLAB Answers — New Questions

​

Tags: matlab

Share this!

Related posts

Generate ST code from a look-up table with CONSTANT attribute
2025-05-22

Generate ST code from a look-up table with CONSTANT attribute

“no healthy upstream” error when trying to access My Account
2025-05-22

“no healthy upstream” error when trying to access My Account

MATLAB Answers is provisionally back?
2025-05-21

MATLAB Answers is provisionally back?

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Search

Categories

  • Matlab
  • Microsoft
  • News
  • Other
Application Package Repository Telkom University

Tags

matlab microsoft opensources
Application Package Download License

Application Package Download License

Adobe
Google for Education
IBM
Matlab
Microsoft
Wordpress
Visual Paradigm
Opensource

Sign Up For Newsletters

Be the First to Know. Sign up for newsletter today

Application Package Repository Telkom University

Portal Application Package Repository Telkom University, for internal use only, empower civitas academica in study and research.

Information

  • Telkom University
  • About Us
  • Contact
  • Forum Discussion
  • FAQ
  • Helpdesk Ticket

Contact Us

  • Ask: Any question please read FAQ
  • Mail: helpdesk@telkomuniversity.ac.id
  • Call: +62 823-1994-9941
  • WA: +62 823-1994-9943
  • Site: Gedung Panambulai. Jl. Telekomunikasi

Copyright © Telkom University. All Rights Reserved. ch

  • FAQ
  • Privacy Policy
  • Term

This Application Package for internal Telkom University only (students and employee). Chiers... Dismiss