File Exchange

image thumbnail

PYTHON/MATLAB optimization for log-distance model + Example

version 1.0.0 (82.8 KB) by Salaheddin Hosseinzadeh
Submission contains both Python and MATLAB codes. They demonstrate non-linear regression analysis (least square) of radio propagation model

2 Downloads

Updated 28 Jan 2019

View License

Submission contains both Python and MATLAB codes. They demonstrate non-linear regression analysis (least square optimization) of the log-distance radio propagation model. You need practical measurements to run this. A set of about 1000 empirically collected signal strength measurements are provided in a CSV format. You only need to run the "log_distance.m" or "logDistance.py" in MATLAB and Python to get the results. The MATLAB file has a different approach and provides you with all the optimization objective functions (not that you'll need it, but gives you a better idea as what's happening). Because of this implementation, MATLAB file takes a longer time to run as it lists all the objective functions. You can use the very same file to analyze your measurements. Just be careful with the format of the file. The CSV file needs to be 2 columns, first column have to be the line of sight distance between transmitter and receiver in meters and second column should be the signal strength that was measured in dB. This code does not make a prediction rather finds the propagation parameters. These parameters are:
1- path loss exponent
2- Any additional loss, due to antenna mismatch, polarization mismatch, cable loss, antenna loss (this analogous to the intercept parameter in regression analysis).
This files does not estimate the propagation, if you need that, check my other submissions please.

Cite As

Salaheddin Hosseinzadeh (2021). PYTHON/MATLAB optimization for log-distance model + Example (https://www.mathworks.com/matlabcentral/fileexchange/70097-python-matlab-optimization-for-log-distance-model-example), MATLAB Central File Exchange. Retrieved .

Comments and Ratings (1)

Sarianto

How did you find the pathloss exponent exacly..i could not fully understand the code.. do you have any article that i can read.. ?
and in the csv data you measuring in dB or dBm, you mentioning in dB but the data look like in dBm, CMIIW ?

I am currenly working on my school project, hope you answer my question.
Thank you.

MATLAB Release Compatibility
Created with R2018b
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!