Skip to main content
. 2023 Apr 8;23(8):3824. doi: 10.3390/s23083824
Algorithm 1: Select candidate relay nodes
  1. Procedure: Find candidate relay nodes

  2. Input: hk,d: Channel coefficient between sink and node,

               hi,j: Channel coefficient between nodes i and j;

  3. Output: R: A set of candidate relay nodes;

  4. For i=1,2,,K do

  5. |  Regard node i as a relay node r

  6. |  Get hk,r (channel coefficient between relay r and node k);

  7. |  Calculate the difference of channel gain to relay and sink, D={|hk,d||hk,r|};

  8. |  Sort D in the ascending order;

  9. |  For j=1,2,,K,ji do

  10. |  |  Assume top j nodes in D use the relay node;

  11. |  |  Minimize MSE of CRP, with power constraint for all nodes including relay;

  12. |  |  Calculate transmission power (Pji) of all nodes;

  13. |  End

  14. |  Find optimal number of nodes that can use node i as relay and record MSEi

  15. End

  16. Sort MSEi in the ascending order;

  17. Select a number of top nodes as relay candidates R based on MSEi;

  18. Return R