1 Introduction

In many applications of wireless sensor networks (WSNs), reliable end-to-end transmissions are crucial. Typical applications include data aggregation in healthcare networks, target tracking in battle fields, and emergent event triggering in monitoring systems [1]. In these applications, the failures of end-to-end transmission of critical information could directly lead to tremendous loss. Since sensors are usually assigned to fulfill the data collection from the source to the data concentration center following a multi-hop route, the Symbol Error Rate (SER) of the end-to-end transmissions is an important parameter that reflects the reliability. One effective way to improve the reliability is to minimize the source-to-destination (S-D) SER [or equivalently, to maximize the Successful Transmission Rate (STR)].

Besides the reliability issue, energy efficiency is another key concern in WSNs [1]. Since sensors are typically battery-powered, their operation time is stringently limited by the battery capacity. To prolong the lifetime of WSNs, energy resource on sensors should be carefully managed. In this paper, we simultaneously take into account the issues of transmission reliability and energy conservation. Our objective is to maximize the end-to-end STR while satisfying the given power constraint.

It is well known that the multiple-input multiple-output (MIMO) techniques improve system performance and capacity [2]. Thus, it would be desirable to deploy MIMO and apply orthogonal space-time block codes (OSTBC) [3] in WSNs for spatial and temporal diversities in a fading environment. Furthermore, [4] has shown that in many cases the power consumption in the electronic circuit of a MIMO system is more efficient than that in a single-input single-output system (SISO). Hence, from energy efficiency point of view, it is beneficial to implement multiantennas in the sensor nodes. Meanwhile, recent advances in hardware design allow MIMO systems to be integrated into a wireless sensor node [4, 5]. All these development and advantages justify the merits of MIMO sensor systems.

In this paper, we consider the cross-layer optimization problem of physical and network layers to achieve performance enhancement on both transmission reliability and energy conservation. Joint channel coding, power allocation and route planning are studied, based on which, a reliable packet forwarding scheme with optimized energy utilization is proposed. Our work mainly focuses on four aspects: (1) devise an efficient routing protocol; (2) adaptively allocate the transmission power; (3) maximize the STR, and (4) satisfy the total power constraint. Specifically, we formulate the joint power and route optimization problem respectively as deterministic and stochastic optimization problems, and point out that a localized packet forwarding problem could be treated as a typical stochastic optimization problem. The optimization is then separated into two phases: route construction and power reallocation. A low-complexity solution is then presented to reduce the computational complexity by decoupling the decision components of relaying nodes and power budgets.

The rest of this paper is organized as follows. The system model is introduced in Section 2, where the network architecture, nodal requirements and wireless channel model are provided. The problem formulation is presented in Section 3. The globalized and localized routing problems are both taken into account. Section 4 discusses the solution, which reduces the computational complexity by decomposing the decision components. Section 5 reports the results of the simulation results to demonstrate the effectiveness of our scheme. The conclusions are given in Section 6.

2 System model

2.1 Network architecture

We consider a self-organized wireless sensor network (WSN) in a planar architecture (i.e., no infrastructure and without clustering) with a static topology. There is a data center in the network, which is responsible for data fusion and network maintenance. The data center is also the destination of all packets. Let \(\mathcal{V}\) denote the set of all sensor nodes and \(\mathcal{L}\) denote the set of all links. A WSN is modelled as an undirected graph \(G(\mathcal{V},\mathcal{L})\). For \(\forall ~v\in \mathcal{V}\), S(v) is defined as the one-hop neighborhood of node v, which is the reachable (coverage) area of v by using its maximum transmitting power. For \(\forall~ v_i, v_j \in \mathcal{V}\), link \(l=(v_i,v_j)\in \mathcal{L}\) if and only if v j  ∈ S(v i ) [or equivalently, v i  ∈ S(v j )]. A WSN routing problem is described as the problem to find a routing path consisting of a set of nodes {v 0, ⋯ ,v i ,v i + 1, ⋯ ,v N } with \((v_i,v_{i+1})\in \mathcal{L}\), i = 0,1, ⋯ ,N, which connects the source node v 0 and the destination node v N and satisfies performance requirements.

2.2 Sensor node requirements

It is assumed that each sensor node has its position information. The recent availability of small-sized, low power, low cost GPS receivers and position estimation techniques based on signal strength measurement or time-of-arrival (ToA) computation, justify the efficiency and feasibility of position-based routing protocols [6]. In many position-based networking protocols, it is supposed that nodes are deployed uniformly at random in the plane region [7, 8]. We can describe the randomness of the nodal position as the Poisson distribution. To acquire necessary information for route establishment, nodes could exchange position information with their immediate neighboring nodes. The data center plays an important role in the network management and maintenance, which has the knowledge of the nodal density and will send this information to all sensor nodes as a key parameter in the routing scheme. The data center will also announce its position information to all sensors.

We assume that each sensor node is equipped with N t isotropic transmitting antennas and N r isotropic receiving antennas. It is appropriate to utilize MIMO techniques in WSNs for three main reasons. Firstly, by deploying MIMO and applying OSTBC codes in WSNs, the system capacity and the transmission reliability could be clearly improved [2]. Secondly, MIMO systems help to reduce the power consumption of the electronic circuits, compared to SISO systems [4]. Finally, from the point of view of implementation, recent advances in hardware design greatly facilitate the integration of wireless sensor nodes with MIMO systems [4, 5].

2.3 Wireless channel model and reliability function

For the wireless channel, it is supposed to suffer slow and flat Rayleigh fading (i.e., the coherence bandwidth of the channel is larger than the bandwidth of the signal and no frequency-selective fading is induced). Sensor nodes are considered to be sufficiently separated so that any mutual coupling effects among the antennas of different nodes are negligible.

The transmit symbol vector of size K×1 is denoted \(\textbf{x}=[x_1,\ldots,x_{K}]^T\), where \(x_i\in{\mathcal{A}}\), where \({\mathcal{A}}\) is a signal constellation set. The vector \(\textbf{x}\) is transmitted by means of a given OSTBC matrix \(\textbf{C}(\textbf{x})\) of size B×N t , where B and N t are the space and time dimension of the OSTBC, respectively. Let M denote the modulation order. If bits are used as inputs to the system, Klog2 M bits are used to produce the vector \(\textbf{x}\). In [3], the following holds: \(\textbf{C}(\textbf{x})\textbf{C}(\textbf{x})^H=\beta{K}\textbf{I}_B\), where β = 1 if \(\textbf{C}(\textbf{x})=\mathcal{G}_2^T\), \(\textbf{C}(\textbf{x})=\mathcal{H}_3^T\) or \(\textbf{C}(\textbf{x})=\mathcal{H}_4^T\) and β = 2 if \(\textbf{C}(\textbf{x})=\mathcal{G}_3^T\) or \(\textbf{C}(\textbf{x})=\mathcal{G}_4^T\). Here, \(\mathcal{G}_{2,3,4}^T\) and \(\mathcal{H}_{3,4}^T\) are the space-time codes proposed in [3]. The transmission rate is N t /B, and the \(\textbf{C}(\textbf{x})\) is sent over the MIMO channel \(\textbf{H}\) of site N r ×B. At the i-th hop, the N t ×N r receive block signal \(\textbf{Y}\) can be written as

$$ \textbf{Y}=l_i^{-\alpha}\textbf{H}\textbf{C}(\textbf{x})+\textbf{N}, $$
(1)

where l i represents the communication distance of the i-th hop, α denotes the path loss component, and the additive block noise \(\textbf{N}\) is complex Gaussian circularly distributed with independent components having variance N 0 and zero mean.

By generalizing the approach given in [9], the OSTBC system can be shown to be equivalent to a SISO system with the following input output relationship

$$ y_k=\sqrt{\varphi}~l_i^{-\alpha}x_k+n_k, $$
(2)

where k ∈ {1,...,K}, \(\varphi\triangleq{\|\textbf{H}\|^2}\), and \(n_k\thicksim\mathcal{CN}(0,N_0/\beta)\). It can be seen that the receive signal to noise ratio (SNR) γ i for a particular realization of the fading is given by \(\gamma_i\triangleq\frac{{p^{\mathrm{tx}}_i}\beta\varphi}{l_i^{2\alpha}N_0}\), where \(p^{\mathrm{tx}}_i\) is the transmitting power. Generally, \(p^{\mathrm{tx}}_i=p_i-p^{\mathrm{c}}_i\) where p i is the total power consumption of the i-th hop and \(p^{\mathrm{c}}_i\) is the power consumption inside the node. At the i-th hop, for a given γ i , the corresponding symbol error rate (SER) is determined by [10]

$$ SER(\gamma_i)=\frac{1}{\pi}\int_0^{\frac{(M-1)\pi}{M}} \mathrm{exp}\left(-\frac{g_\mathrm{psk}\gamma_i}{\sin^2\theta}\right)d\theta, $$
(3)

where \(g_\mathrm{psk}\triangleq\sin^2\frac{\pi}{M}\). By averaging Eq. 3 over the channel, we can express SER as a function of l i and p i in the following [3, 10]

$$ SER(l_i,p_i) =\frac{1}{\pi}\int_0^{\frac{(M-1)\!\pi}{M}}\!\!\left[\!1\!+\!\frac{g_\mathrm{psk}\beta}{N_0{\sin^2\theta}}{(p_i\!-\!p^{\mathrm{c}}_i)}~l_i^{-2\alpha}\!\right]^{\!-N_tN_r}\!\!\!\!d\theta. $$
(4)

Accordingly, the Successful Transmission Rate (STR) is then given by

$$ STR(l_i,p_i) = 1-SER(l_i,p_i) $$
(5)

Finally, we define the reliability function F R as the end-to-end STR

$$ F_R = \prod\limits_{i=1}^{N}ST\!R(l_i,p_i) $$
(6)

3 Problem formulation

The joint power and routing optimization problem is to build up an end-to-end routing path and to find a power allocation scheme, which maximizes the STR while satisfying the power consumption requirement. In this section, we formulate the joint power and routing problem respectively from the point of view of globalized routing and localized routing.

3.1 Globalized routing problem

A wireless sensor network is modelled by the undirected graph \(G(\mathcal{V},\mathcal{L})\), where \(\mathcal{V}\) and \(\mathcal{L}\) are respectively the node and the link sets. Consider an end-to-end routing path {v 0, ⋯ ,v i , ⋯ ,v N }, \(v_i\in \mathcal{V}, i=0,1,\cdots,N\), where v 0 and v N respectively stand for the source and the destination nodes. Let l i denote the i-th link (v i − 1,v i ), and p i the corresponding power consumption of the i-th hop. Let L = {l 1, ⋯ ,l N } and P = {p 1, ⋯ ,p N } respectively denote the link and the power consumption sets of the forwarding scheme. The joint power and route optimization problem can be formulated as the following constrained optimization problem.

$$\begin{array}{rll} \max\limits_{\substack{L\subset \mathcal{L},~P\subset \mathbb{R}}} & \quad F_R(L,P) = \prod\limits_{i=1}^{N}ST\!R(l_i,p_i) \\ \mathrm{s.t.} & \quad \displaystyle\sum\limits_{i=1}^{N}p_i \leq P_c\\ & \quad p_i \geq 0, ~(i=1,\cdots,N) \end{array} $$
(7)

where STR(l i , p i ) is the successful transmission rate of the i-th hop given by Eq. 5, and P c is the power constraint for end-to-end transmissions. In Eq. 7, we set the power consumption as constraints for two main reasons. Firstly, the routing power consumption is limited by the sum of the maximum possible transmission power of the sensors in the route. This means that each routing path should have a potential power consumption. Secondly, energy management is crucial to prolong the network lifetime. The maximally allowed power for each sensor should be strictly limited according to the status of the residual battery. In principle, the power constraint of sensors should be set proportionally to the amount of residual battery. It is noticeable that, problem 7 is a typical linear programming problem that simultaneously involves continuous and combinational optimizations. The problem would be intractable, because the computational complexity grows rapidly in an exponential way with the increase of the problem dimension (i.e., the number of nodes and links). Even if we neglect the computational complexity, problem 7 is still unsuitable for describing a real WSN routing problem. As we all know that, WSN routing algorithms are always carried out in a distributed manner. Although local message exchange is allowed, global broadcasting of networking information in the entire network is strictly undesirable. However, the optimal solution of problem 7 requires global path searching and power allocation that are practically not implementable in WSNs. Therefore, it is necessary to reformulate the joint power and route optimization problem as a localized routing problem.

3.2 Localized routing problem

In the following, we start from a case study in which the routing performance is intuitively analyzed. The observation from the case helps to understand the key points of the problem and a promising direction to transform the globalized routing problem into a localized one. After that, we propose the relay-selecting rule which explains how relaying nodes are determined hop by hop. The localized routing problem is then described in the form of stochastic optimization.

3.2.1 A case study

Given the source and the destination nodes and the power constraint P c , we suppose that all intermediate nodes can be placed anywhere to construct the route. Denote the source-destination distance by d 0 and the hop count by N. In order to achieve the best reliability, all intermediate nodes should be placed evenly on the line connecting the source and the destination node, with equal distance between arbitrary two neighboring nodes. Each hop should be allocated the equal power consumption \(\frac{P_c}{N}\). According to Eq. 6, the reliability function could be calculated by

$$ F_R(N) = ST\!R\bigg(\frac{d_0}{N},\frac{P_c}{N}\bigg)^{\!\!N}, $$
(8)

We have two important observations from Eq. 8. Firstly, the hop count N is a crucial factor affecting the reliability performance. To maximize the end-to-end STR, the optimal hop count N * should be found. Secondly, given a hop count N, it is easy to prove that, the reliability function in Eq. 8 has reached the upper bound [6]. This means that the corresponding route is the optimal one for all possible node distributions. In a practical network, to obtain the best performance, we may try to find a route mostly similar to the optimal route. Intuitively, this could be done by selecting the relaying node at each hop as close as possible to the position of the corresponding node in the optimal route. These observations motivates us to propose the following relay-selection rule.

3.2.2 Relay-selection rule

Relay-selection rule describes the instructions to select the relaying nodes. It could be carried out hop by hop in a distributed manner. Considering the i-th hop as shown in Fig. 1, the following concepts are introduced.

  • Target position: In order to determine the relaying node v i , node v i − 1 firstly assigns a target position \(\hat{v}_{i}\), indicating the ideal position of node v i . Target position \(\hat{v}_{i}\) will always appear on the line connecting v i − 1 and destination v N .

  • Target advancement: The distance from node v i − 1 to the ideal position \(\hat{v}_{i}\) is called the target advancement of the i-th hop, denoted by \(\hat{l}_i=(v_{i-1},\hat{v}_{i})\).

  • Relay-selection area: Given an ideal position \(\hat{v}_{i}\) and the target advancement \(\hat{l}_i\), the disk area centering at \(\hat{v}_{i}\) and with radius \(\hat{l}_i\) is called the relay-selection area of the i-th hop, denoted by \(A(\hat{v}_{i},\hat{l}_i)\). To avoid backward forwarding, we restrict that the relaying node v i should locate within \(A(\hat{v}_{i},\hat{l}_i)\).

  • Deviation vector: The vector from \(\hat{v}_i\) to v i is called the deviation vector of the i-th hop, denoted by ω i . Due to the uncertainty of node distribution, deviation vector ω i is actually a random variable. For the ease of representation, we introduce polar coordinate and alternatively denote the deviation vector by two-tuple deviation variables (r i ,θ i ).

Fig. 1
figure 1

One-hop relaying model

There is a geometric relationship among the target advancement \(\hat{l}_i\), the deviation vector ω i [or equivalently (r i , θ i )] and link l i

$$ l_i = \sqrt{\hat{l}_i^2+r_i^2+2 \hat{l}_i r_i\cos\theta_i}, $$
(9)

For the sake of presentation, we let \(g(\hat{l}_i,{\omega}_i)= \sqrt{\hat{l}_i^2+r_i^2+2 \hat{l}_i r_i\cos\theta_i}\) hereafter.

The relay-selection rule works as follows: at the i-th hop, the current node v i − 1 should first specify the target advancement \(\hat{l}_i\) as well as the target position \(\hat{v}_i\). After that, node v i − 1 should select a neighboring node within the relay-selecting are \(A(\hat{v}_i,\hat{l}_i)\) as the relaying node v i , which is the closest to the target position \(\hat{v}_i\).

We can see that relay-selecting rule facilitates the localized routing. It regulates the basic operations for each node to determine the next relaying node sorely based on the local information. Following the relay-selection rule, the exact positions of the relaying nodes are determined by both the routing decisions (i.e., the target advancements \(\hat{l}_i\)’s, and the uncertain factors (i.e., the random deviation vectors ω i ’s). The STR however varies with these uncertain factors provided the routing decisions. To more effectively evaluate the routing decisions, we redefine the reliability function as the average end-to-end STR over the deviation vectors. By doing so, we actually aim to find out the probabilistically optimal forwarding scheme which leads to the maximum end-to-end average STR. The localized routing problem can then be described as a stochastic optimization problem.

3.2.3 Stochastic optimization problem

Let \(\hat{L}=\{\hat{l}_1,\cdots,\hat{l}_N\}\) denote the set of target advancements and Ω = {ω 1, ⋯ ,ω N } the set of deviation vectors. Considering the relay-selection rule, we now formulate the joint power and route optimization problem as stochastic optimization.

$$ \begin{array}{rll} \max\limits_{\substack{\hat{L}\subset \mathbb{R},~P\subset \mathbb{R}}} & \quad F_R(\hat{L},P) = \mathbf{E}_{\substack{\Omega}}\left[\prod\limits_{i=1}^{N}ST\!R(g(\hat{l}_i,w_i),p_i)\right] \\ \mathrm{s.t.} & \quad \displaystyle\sum\limits_{i=1}^{N}p_i \leq P_c\\ & \quad p_i \geq 0, ~(i=1,\cdots,N)\\ \end{array} $$
(10)

where the deviation vectors are treated as random factors that affect the actual positions of relaying nodes. Since the distribution of nodes’ positions can be described by stochastic models [8], the Probability Density Function (PDF) of deviation vectors is computable, and therefore the average routing performance is theoretically predictable.

4 Low-complexity solution

As problem 10 depicts, the objective is to find a forwarding scheme with target advancements \(\hat{l}_i\)’s and power budgets p i ’s, which maximizes the average end-to-end STR while satisfying the power constraint P c . In this paper, we develop a low-complexity suboptimal solution, which reduces the complexity by decoupling the variables \(\hat{l}_i\)’s and p i ’s. We decompose the joint optimization process into two separate phases as explained below.

  • Route construction: Assuming that all hops are allocated equal power, relaying nodes can be selected hop by hop using relay-selection rule to compose the route.

  • Power reallocation: Given an end-to-end route, the source node performs the power reallocation to maximize the end-to-end STR.

Let us consider the i-th hop in the first phase. Node v i − 1 will compute the target advancement \(\hat{l}_i\) and select the relaying node v i by relay-selecting rule. To decide \(\hat{l}_i\), we recall the i-th hop in the case study (Section 3.2) in which the distance of link l i is chosen as \(\frac{d_{i-1}}{N-i+1}\) with d i − 1 representing the distance between v i − 1 and v N . Since the route in the simple case is optimal, we could approximate it by setting target advancement \(\hat{l}_i=\frac{d_{i-1}}{N-i+1}\). However, the total hop count N is unknown a priori. Therefore, the optimal hop count N * should be computed by the source node at the beginning of first phase, and then delivered hop by hop to all relaying nodes. Once the route is established, the destination node will feedback a message to the source node announcing the route information. The second phase is then triggered, in which the source node will perform power reallocation according to the feedback information using the methodology of linear programming. The framework of low-complexity solution is shown in Fig. 2, The main operations are discussed in the following.

Fig. 2
figure 2

Low-complexity distributed solution

4.1 Optimal hop count determination

At the beginning of the first phase, the source node computes the optimal hop count N *. The computation consists of two steps: (i) computing average STR per hop, and (ii) approximating average STR of the entire route.

4.1.1 Average STR per hop

Supposing that the hop count is N, we investigate the i-th hop as shown in Fig. 1. Let f ω (r i ,θ i ) represent the PDF of deviation vector ω of the i-th hop, and \(\overline{ST\!R}(\hat{l}_i,p)\) the average STR of the i-th hop. Following the relay-selecting rule, we have

$$\begin{array}{rll} \overline{ST\!R}(\hat{l}_i,p)&=&\mathbf{E}_{\omega_i}\left[ST\!R(l_i,p)\right] \\ &=&\int_0^{\hat{l}_i}\!\!\int_0^{2\pi}\!ST\!R\left(l_i,p\right)f_{{\omega}}(r_i,\theta_i)r_i~d\theta_i dr_i \end{array}$$
(11)

where \(\hat{l}_i=\frac{d_{i-1}}{N-i+1}\), \(p=\frac{P_c}{N}\) and l i is given by Eq. 9. Note that, when sensors are deployed uniformly at random in the field, the explicit form of f ω (r,θ) could be obtained by Poisson Process model. The detailed derivation is shown in the Appendix.

4.1.2 Average STR of entire path

Let Ω k  = {ω 1,ω 2, ⋯ ,ω k }, k = 1, ⋯ ,N, and specially Ω = Ω N . The average STR of the entire path is given by

$$ \overline{ST\!R} = \mathbf{E}_{\Omega}\left[\prod\limits_{i=1}^{N} \overline{ST\!R}(\hat{l}_i,p)\right] $$
(12)

Since actual STR is usually very close to one, the logarithm function is almost linear. We are allowed to exchange the operation order of expectation and logarithm. Then, we have

$$\begin{array}{rll} \log\left(\overline{ST\!R}\right) &\simeq& \mathbf{E}_{\Omega}\left\{\log\left[\prod\limits_{i=1}^{N} \overline{ST\!R}(\hat{l}_i,p)\right]\right\} \\ &=& \sum\limits_{i=1}^{N} \mathbf{E}_{\Omega_i}\left\{ \log [\overline{ST\!R}(\hat{l}_i,p)]\right\} \\ &\simeq& \sum\limits_{i=1}^{N} \log \left\{ \mathbf{E}_{\Omega_i}[\overline{ST\!R}(\hat{l}_i,p)]\right\} \end{array}$$
(13)

By computing exponential function on both sides of Eq. 13, we have

$$ \overline{ST\!R}\simeq\prod\limits_{i=1}^{N}\mathbf{E}_{\Omega_i}\left[\overline{ST\!R}(\hat{l}_i,p)\right] $$
(14)

where the average STR of the entire path is the product of the average STR of all hops.

Note that \(\hat{l}_i=\frac{d_{i-1}}{N-i+1}\) and \(\mathbf{E}_{\Omega_i}[\overline{ST\!R}(\hat{l}_i,p)]=\mathbf{E}_{\Omega_i}[\overline{ST\!R}(\frac{d_{i-1}}{N-i+1},p)]\). The accurate computation of \(\mathbf{E}_{\Omega_i}[\overline{ST\!R}(\frac{d_{i}}{N-i},p)]\) is considerably complex when i is large. To show this, let us consider the iterative relationship of d i and d i − 1 as shown in Fig. 3.

$$ d_{i} =\sqrt{r_i^2+(d_{i-1}-\hat{l}_i)^2-2r_i(d_{i-1}-\hat{l}_i)\cos\theta_i} $$
(15)

For convenience, we let \(h(d_{i-1},{\omega}_i)=\sqrt{r_i^2+(d_{i-1}-\hat{l}_i)^2-2r_i(d_{i-1}-\hat{l}_i)\cos\theta_i}\), where the deviation vector ω i  = (r i ,θ i ). It is shown in Eq. 15 that the value of d i depends on the value of d i − 1 as well as the deviation vector \(\hat{\omega}_i\). The derivation of the PDF of d i is explicitly related to the PDF of d i − 1, and then implicitly to the PDFs of d i − 2, d i − 3, ⋯, d 1. Therefore as i increases, the computation of PDF of d i becomes nontrivial, and the accurate computation of \(\mathbf{E}_{\Omega_i}[\overline{ST\!R}(\frac{d_{i}}{N-i},p)]\) becomes too complicated to be carried out in practical sensor nodes. Alternatively, we adopt the following approximation

$$ \mathbf{E}_{\Omega_i}\bigg[\overline{ST\!R}\big(\frac{d_{i}}{N\!\!-\!i},p\big)\bigg]\simeq \overline{ST\!R}\bigg(\frac{\mathbf{E}_{\Omega_i}[d_{i}]}{N\!\!-\!i},p\bigg) $$
(16)

where the expectation of \(\overline{ST\!R}(\frac{d_{i}}{N-i},p)\) over Ω i is approximated by the value of function \(\overline{ST\!R}(\cdot,p)\) at the single point \(\frac{\mathbf{E}_{\Omega_i}[d_{i}]}{N-i}\).

Fig. 3
figure 3

Algorithm of optimal hop count computation

Next, we compute expectation on the both sides of Eq. 15 and obtain

$$\begin{array}{rll} \mathbf{E}_{\Omega_i}[d_{i}] &=& \mathbf{E}_{\Omega_i}\left[h(d_{i-1},{\omega}_i)\right] \\ &\simeq& \mathbf{E}_{\omega_{i}}\left\{h(\mathbf{E}_{\Omega_{i-1}}[d_{i-1}],{\omega}_i)\right\} \end{array}$$
(17)

Similar as Eq. 16, we replace the expectation of h(d i − 1,ω i ) over Ω i − 1 by the value of function h(·,ω i ) at the point \(\mathbf{E}_{\Omega_{i-1}}[d_{i-1}]\). Actually, Eq. 17 provides an approximative iteration of \(\mathbf{E}_{\Omega_i}[d_i]\), which could be extended to

$$ \mathbf{E}_{\Omega_i}[d_i]=\int_{0}^{l'_i}\!\!\!\!\int_{0}^{2\pi}\!h\left(\mathbf{E}_{\Omega_{i-1}}[d_{i-1}],{\omega}_i\right)f_{{\omega}}(r_i,\theta_i)r_i~ d\theta_i dr_i $$
(18)

where \(l'_i=\frac{\mathbf{E}_{\Omega_{i-1}}[d_{i-1}]}{N-i+1}\) is the average target advancement of the i-th hop

The algorithm in searching the optimal hop count is presented in Fig. 3.

4.2 Routing path determination

After computing the optimal hop count N *, the source node launches the process of routing path determination. Starting from the source node and hop by hop sequentially, a current node selects the relaying node and forwards the packet according to the relay-selection rule. In particular, when it comes to node v i − 1 to forward the packet, it computes the target position \(\hat{v}_{i}\) and the target advancement \(\hat{l}_i\), and selects a neighboring node within the relay-selection area \(A(\hat{v}_i,\hat{l}_i)\), which is the closest to \(\hat{v}_i\) as node v i . Node v i − 1 then transmits the packet to node v i , consuming power \(p=\frac{P_c}{N^*}\). These operations are carried out iteratively until the packet arrives node v N − 1, which directly communicates with the destination node v N .

When executing relay-selection rule, a special situation should be noticed when there is no sensor within the relay-selection area. To deal with the situation, an additional rule should be followed: when node v i − 1 fails to find a relaying node within the relay-selection area \(A(\hat{v}_{i},\hat{l}_i)\), it should reduce the total hop count by N = N − 1, and recompute the target position \(\hat{v}_{i}\) and the target advancement \(\hat{l}_i\). Once the relay-selection area \(A(\hat{v}_{i},\hat{l}_i)\) is reset, node v i − 1 try to reselect the relaying node v i within the new \(A(\hat{v}_{i},\hat{l}_i)\). Nevertheless, this special situation occurs very infrequently in practice. For instance, supposing the nodal density is 0.1/m2, this happens only with probability 3.8×10 − 4 for \(\hat{l}_i=5\) m, and 1.8×10 − 9 for \(\hat{l}_i=8\) m.

4.3 Power reallocation

After the route is established, the source node will reallocate the power consumption of all hops based on the distances of links l i ’s. When the links l i ’s are given, problem 10 reduces to the following deterministic optimization problem

$$\begin{array}{lll} \max & \quad \displaystyle\sum\limits_{i=1}^{N}ST\!R'_i(l_i,p_i),\\[8pt] \mathrm{s.t.} & \quad \displaystyle\sum\limits_{i=1}^{N}p_i\leq{P_c}\\[8pt] {} & \quad p_i\geq{0}, (i=1,\cdots, N). \end{array}$$
(19)

where STR′ = log(STR). Before deriving the optimal solution for the problem given in Eq. 19, the following theorem is presented.

Theorem 1

The optimal power allocation p 1,...,p N in the optimization problem stated in Eq.  19 is unique.

Proof

The power constraints in Eq. 19 are linear functions and hence convex functions of the power allocating parameters. It is clear that the SER function in Eq. 4 is a convex function with respect to p i . As a consequence, the corresponding \(ST\!R_k^{'}=\log(ST\!R_k)\) is also convex as 0 ≤ STR ≤ 1. From [11], the sum of a series of convex functions is also convex. This is sufficient to show that the objective function in Eq. 19 is convex, and therefore, has unique solution. □

The power reallocation is to find p i ’s such that the STR′ (or equivalently STR) in Eq. 19 is maximized subject to the power constraint by solving the following optimization problem

$$ L(p_1,\cdots,p_N)=\sum\limits_{i=1}^{N}ST\!R_i^{'}-\lambda\bigg(\sum\limits_{i=1}^{N}p_i-P_c\bigg). $$
(20)

where λ is a positive Lagrange multiplier. The necessary condition for optimality can be obtained by finding the derivatives of Eq. 20 with respect to p i ’s. For nodes v i ’s with nonzero consumption power, we have

$$ \frac{\partial{L(p_1,\cdots,p_N)}}{\partial{p_i}}=\frac{\partial{ST\!R_i^{'}}}{\partial{p_i}}-\lambda, $$
(21)

where

(22)

Using Eqs. 21 and 22, the optimal power budget at each hop can be calculated by the gradient descent optimization method [12]

$$\begin{array}{rll} p_i(k+1)&=&p_i(k)-\mu\frac{\partial{L(p_1,\ldots,p_N)}}{\partial{p_i}}\\ &=&p_i(k)-\mu\left(\frac{\partial{ST\!R_i^{'}}}{\partial{p_i}}-\lambda(k)\right), (i\!=\!1,\cdots,N) \end{array}$$
(23)

where p i (k) and λ(k) represent the transmission power and Lagrangian multiplier at the k-th iteration, and μ stands for the positive step size. Using the power constraint, λ(k) can be obtained by the following equation

$$ \sum\limits_{i=1}^{N}p_i(k+1)-P_c=0 $$
(24)

The power reallocation scheme can be easily solved by initializing some positive values for p i (i = 1, ⋯ ,N) and using Eq. 23 in an iterative manner. With Theorem 1, the mentioned approach results in optimal power allocation at a given route. It is noteworthy that the value of p i ’s in Eq. 23 are always positive. To prove this, it is sufficient to show that μ > 0 and \(\frac{\partial{L(p_1,\cdots,p_N)}}{\partial{p_i}}<0\). This algorithm is guaranteed to converge at least to a local maximum, since at the each step the objective function is decreased and is bounded below by zero.

5 Numerical results

This section evaluates the proposed packet forwarding scheme by simulation results. In the simulation, we consider a square field with area 100×100 m2. Sensor nodes are uniformly deployed at random in the region with nodal density 0.1/m2. Wireless bandwidth is supposed to be 1 MHz. Packet size is chosen to be 1 kbs. Parameters in the reliability function are set as follows: number of transmit antennas N t  = 2, number of receive antennas N r  = 2, constellation size M = 2, attenuation coefficient α = 3, OSTBC matrix \(\textbf{C}(\textbf{x})=\mathcal{G}_2^T\), β = 1, normalized noise power N 0 = 1, normalized power consumption inside sensor nodes p c = 1.2. Besides the proposed scheme, we also simulate two traditional energy-efficient routing algorithms for comparison: SP-power [6] and PARO [13]. In the figures, the proposed scheme, SP-power and PARO are labelled as LP, SPR and PARO, respectively.

We first validate the theoretical computation of optimal hop count N *. In particular, given the source and destination nodes and the power constraint, we investigate the relationship between hop count N and the average end-to-end STR. Three cases are considered where the normalized power constraints P c are fixed by 50, and the distances of source and destination nodes are set to be 100 m, 80 m and 50 m, respectively. As shown in Fig. 4, curves of theoretical computation and simulation results are very close in all cases. The theoretical optimal hop count (i.e., 14 for S-D = 100 m, 10 for S-D = 80 m and 5 for S-D = 50 m) exactly equals to the one that will generate maximum STR in the simulation experiments. These results verify the correctness of the optimal hop count computation. Although approximations are involved to reduce computational complexity, the theoretical computation still provides an accurate prediction of the optimal hop count and the end-to-end STR values.

Fig. 4
figure 4

Average STR vs. hop count

Table 1 reports the details of the linear programming for power reallocation. We conduct five individual simulations, where the normalized power constraint P c is fixed by 50 and the S-D distances are set to be 100 m, 90 m, 80 m, 70 m and 60 m respectively. The actual link distances, power budgets and total power consumption are recorded. As shown in Table 1 that, although P c is fixed, the proposed scheme could adaptively regulate the power budgets of all hops according to the actual link distances. The total power consumptions strictly follow the constraints in all simulations, which indicates that the proposed scheme is suitable for energy management in WSNs.

Table 1 Power budgets in linear programming (\(P_c=5\times 10^4\))

Figure 5 illustrates the actual forwarding route and the power allocation scheme. The source and destination nodes locate at (80,30) and (0,0) respectively. The normalized end-to-end power consumption is constrained by 50. For contrast, the forwarding schemes of PARO and SP-power are also presented. These three schemes generate different routes even if the node distribution are the same. In addition, the power budgets of these three schemes are also different. The proposed scheme tends to allocate power corresponding to the link distances. The longer the link distance the more the power budget. But the traditional schemes always assign equal power to all hops. From the view point of transmission reliability and power conservation, the proposed scheme consumes the total power in a more efficient way, and therefore achieves better reliability as the figure has shown.

Fig. 5
figure 5

Illustration of packet forwarding schemes. The source node and destination node are located at (80, 30) and (0, 0), respectively. STR in LP, SPR and PARO are 0.98008, 0.91966 and 0.91059, respectively

Figures 6 and 7 provide more quantitative results to compare the reliability performance of the three schemes. We investigate the influences of S-D distance and power constraint to the end-to-end STR. In Fig. 6, the power constraint is fixed as 50 while in Fig. 7, the S-D distance is fixed as 50 m. We change the S-D distance in Fig. 6 and power constraint in Fig. 7, and keep track of the end-to-end STR. As shown in Figs. 6 and 7, the proposed scheme clearly outperforms the traditional algorithms, especially when the S-D distance is large or the power constraint is stringent. It is noticeable that, the proposed scheme could reduce the end-to-end SER at least 30% in Fig. 6 when the S-D distance is 60 m, and about 50% in Fig. 7 when the power constraint is 50. These results are expectable because the proposed scheme simultaneously takes into account of the issues of transmission reliability and power conservation. It aims at maximizing the reliability by fully exploiting the limited power resource.

Fig. 6
figure 6

STR performance in term of S-D distance

Fig. 7
figure 7

STR performance in term of power constraint

6 Conclusion

In this paper, we propose a cross-layer optimized forwarding scheme for reliable transmissions in WSNs. Each sensor has multiple antennas using OSTBC codes. Channel coding, power allocation and route planning are jointly optimized to maximize the end-to-end STR while satisfying the power constraint. The localized reliable forwarding problem is formulated as a stochastic optimization problem, where the random distribution of sensor nodes is treated as the uncertain factor that influences the actual route. By decoupling the components of forwarding decision, we propose a low-complexity suboptimal solution to the stochastic optimization problem. Extensive simulation is carried out to evaluated the proposed forwarding scheme. The results validate the effectiveness of the proposed scheme, and show that it significantly outperforms two traditional energy-efficient routing algorithms.