Outage analysis and optimisation of NOMA‐based amplify‐and‐forward relay systems

Correspondence Xunan Li, National Computer Network Emergency Response Technical Team/Coordination Center of China, Beijing, China. Email: lixunan@cert.org.cn Abstract In this study, a non-orthogonal multiple access based cooperative relay system is investigated, where the source serves multiple destinations via an amplify-and-forward relay. Direct links between the source and destinations are considered to form a general framework while the maximum ratio combination (MRC) is applied to obtain the largest decoding signal-to-interference-plus-noise ratio (SINR). Firstly, the outage performance is analysed with given successive interference cancellation (SIC) order and power allocation. An excellent approximated expression for the exact outage probabilities is derived in closed form. In addition, the asymptotic expression at high signal-to-noise ratio is provided to gain further insights. Then, in order to fully exploit the potential of the system, a joint optimisation of SIC order design and power allocation is formulated, with the objective of minimising the maximum outage probability of all destinations. By exploring the inherent property of the system, an optimal solution of SIC order and power allocation is developed. Finally, simulation results are presented to verify the correctness of the analytical results as well as indicate the efficiency of authors’ SIC order design and power allocation algorithm.


INTRODUCTION
Non-orthogonal multiple access (NOMA) has been considered as a promising technology in future wireless communications due to its high spectral efficiency and massive connectivity [1,2]. Contrary to conventional orthogonal multiple access (OMA) schemes such as time-division multiple access (TDMA), frequency-division multiple access (FDMA) and code-division multiple access (CDMA), the key idea of NOMA is to realise multiple access at the same time/frequency/code but at different power levels [3]. In NOMA systems, multiple users' signals are superimposed at the transmitter while successive interference cancellation (SIC) is employed to separate the superimposed signal at receivers. NOMA enables a more flexible management of the users performance and is an efficient way to improve user fairness [4]. In addition, NOMA can be easily combined with existing physical layer techniques [5,6].
In various wireless communication scenarios, cooperative relaying has been extensively employed to enhance coverage and high data rate services [7,8]. Recently, NOMA has been a new hybrid DF and AF NOMA transmission scheme was proposed. In [22] and [23], physical layer security was studied in the NOMA-based cooperative relay system. The authors in [24] designed a novel framework with the combination of NOMA, cognitive radio and hybrid satellite-terrestrial networks.
The aforementioned works mainly focus on one-user system [12] or multi-user system without direct links [15][16][17][18][19][20][21][22][23][24], which may not exploit the freedom of the cooperative relay systems sufficiently. The authors in [13,14] studied multi-user systems with direct links. However, selective combining is adopted in [13,14], where the link with higher decoding signal-tointerference-plus-noise ratio (SINR) is selected. It will reduce the SINR compared with maximum ratio combining (MRC). Thus motivated, in order to conduct a comprehensive investigation on the NOMA-based AF relay system, we in this paper consider a general framework with multiple users as well as direct links. Meanwhile, MRC is applied in decoding to fully explore the utilisation of the direct and relay links. Since all direct links are reserved and MRC is employed, we construct a different problem structure. Consequently, the existing performance results in the literature can not be extended to our system. In addition, different from existing works with fixed SIC order and power allocation, we jointly optimise the SIC order and power allocation to further improve the system performance. The main contributions are summarised as: • We mathematically model the NOMA-based AF relay system, under the consideration of all direct links and MRC. In particular, the NOMA transmission scheme with AF strategy is presented and the decoding SINR applying MRC is derived. • By employing the Rayleigh fading channels, we study the outage behaviour and derive the closed-form expression for outage probability. Furthermore, in order to reduce the computational complexity and reveal more insights, the asymptotic outage behaviour at high signal-to-noise ratio (SNR) regime is developed. • We formulate the joint SIC order design and power allocation problem, with the objective of minimising the maximum outage probability of all destinations. We first provide an optimal SIC order under given source and relay power. Then, based on the optimal SIC order and exploring the inherent property, the problem is optimally solved by employing a well-known binary search method.
The rest of the paper is organised as follows. In Section 2, we describe the system model and the transmission scheme. In Section 3, we analyse the outage performance of the system with given SIC order and power allocation. Section 4 provides an optimal solution of the SIC order design and power allocation. Then, we present simulation results in Section 5.

SYSTEM MODEL
We consider a cooperative relay system consisting of one source, one relay and K destinations (User Equipments, UEs) as shown in Figure 1, where the source communicates with K UEs via the . .

FIGURE 1
System model of the NOMA-based AF relay system cooperation of a relay. The relay is assumed to operate in a timedivision half-duplex mode using the AF strategy. Suppose all channels of source-to-relay, source-to-UE and relay-to-UE are available and undergo independent quasi-static block Rayleigh fading so that the channel state information remains constant during the whole transmission. NOMA is introduced to further improve the performance and the whole transmission over two consecutive slots is presented as follows.
During the first slot, the source broadcasts a superposition coded symbol ∑ K k=1 √ k P s s k to the relay and all UEs, where s k is the message symbol for UE k with E[|s k | 2 ] = 1, P s is the total transmit power of the source and k ∈ [0, 1] is the power allocation coefficient for UE k under the condition that ∑ k k=1 k ≤ 1. The received signals at the relay and UEs in the first slot are, respectively, given by where h s,r and h s,k denote the channel coefficients of source-torelay and source-to-UE k , respectively, and z r (1) and z k (1) are the additive noise. Without loss of generality, we herein assume all noise are additive white Gaussian with zero mean and identical variance 2 . During the second slot, the relay amplifies and forwards the received signal with total transmit power P r . Then, the received signal at UE k in the second slot is given by where h r,k is the channel coefficient of relay-to-UE k and G is the amplifying factor expressed as In order to obtain the largest decoding SINR at each UE, MRC is used to combine the two signals received from both direct links and relay links. Note that MRC increases the complexity of decoding compared with selective combining since we must combine all available branches rather than choose a largest one. However, in our system model, only two branches (i.e. direct link and relay link) need to be considered, and hence, the complexity increment is acceptable.
According to NOMA protocol [3,5], SIC is performed for decoding. In general, it is non-trivial for the real system to perform perfect SIC. In this paper, we consider perfect SIC to obtain a performance upper bound which serves as a benchmark for the studies on practical implementation while we leave the investigation of imperfect SIC as our future work.
It is known that in the conventional NOMA systems, the SIC order typically follows the order of channel qualities [3]. However, regarding the scenario where UEs receive a copy of messages from multiple links (source-to-UE and relay-to-UE), it is non-trivial to determine the SIC order due to the combined channel quality [25,26]. Inspired by this, the SIC order design is considered as an optimisation parameter, rather than a predetermined order, and it is further discussed in Section 4. Denote the SIC order { (k)} K k=1 as a permutation of {1, 2, … , K }, where (k) is the user index corresponding to the decoding order k. Thus (k) = i represents that UE i 's message is thek th decoded message. To illustrate the definition of (k), we present the following example: Consider a three-user system and suppose ( (1), (2), (3)) = (2, 3, 1). Then, the decoding order is UE 2 → UE 3 → UE 1 . In particular, the decoding strategy is given as • UE 1 needs to detect UE 2 's and UE 3 's message in turn before decoding its own message. • UE 2 decodes its message directly.
• UE 3 detects UE 2 's message first and then decodes its own message.

Proposition 1.
With the SIC order (k) and MRC, the SINR of where g e, (k) = g s,r g r, (k) P r g r, (k) P r + g s,r P s + 1 where g s,r = Proof. See Appendix A.1. □ Proposition 1 indicates that g e,k can be treated as the equivalent CNR of UE k . Remark that the equivalent CNR depends on not only the channel coefficients, but also the transmit power of the BS and the relay.
Remark that we investigate a general framework with both direct links of source-to-UE and dynamic SIC order, which help us to fully explore the maximum potential gain of our NOMAbased cooperative relay system. Our proposed scheme can be applied to the practical scenario where a base station serves multiple cell-edge UEs suffering from weak direct channels due to long distance or obstacles. Hence, a relay is necessary to cooperate with the base station to significantly improve the performance. It is worthy mentioned that although our framework can support any number of UEs, signal decoding by using SIC requires additional implementation complexity compared to the orthogonal schemes, since a UE may need to decode some other UEs' messages prior to decoding its own message. Thus, in order to ensure low complexity and low processing delay, we do not want to have too many UEs participate in the NOMA transmission.

OUTAGE PERFORMANCE ANALYSIS
In this section, the outage performance, which is an important metric of the considered NOMA-based relay system, is investigated with a given SIC order and power allocation coefficients. Note that in realistic fading channels, the outage probability is a more meaningful criterion compared with the ergodic rate to evaluate the performance of connection-sensitive services, such as voice, real-time gaming and Internet of Vehicles. We derive the closed-form expression for outage probability of each UE. In addition, the asymptotic outage behaviour is studied to gain further insights of the system. Without loss of generality, we set (k) = k for all k, that is, the SIC order is 1 − 2 − … − K , and adopt k instead of (k) as the user index for notation simplicity.

Channel statistical characteristics
In this paper, all channels are assumed to undergo independent Rayleigh fading. Then, we have h s,k ∼  (0, s,k ), h s,r ∼  (0, s,r ) and h r,k ∼  (0, r,k ), where s,k , s,r and r,k are the average channel gains. Accordingly, the probability density function (PDF) and cumulative distribution function (CDF) of CNRs (g s,k , g s,r , g r,k ) are, respectively, given by where Δ ∈ {g s,k , g s,r , g r,k } and is the corresponding average power with ∈ { s,k 2 , s,r 2 , r,k 2 }.
As shown in Proposition 1, the equivalent CNR g e,k will play a key role in the outage performance analysis. However, g e,k is a non-linear combination of multiple channel coefficients such that the derivation of its exact CDF is mathematically intractable. In the following lemma, we divide g e,k into two parts with exact CDFs and adopt an I -step staircase approximation approach [27,28] to develop an excellent approximated CDF of g e,k in closed-form expression.
as the relay part of g e,k . Then, the CDF ofĝ r,k is expressed as where k (x) = P s x 2 +x s,r r,k P r and K 1 (⋅) is the first order modified Bessel function of the second kind [29][eq. (8.432)]. Then, the CDF of g e,k can be approximated as where I is an integer value.

Outage performance analysis
According to NOMA SIC protocol, a certain UE k should decode all messages of UE 1 to UE k successfully. Otherwise, an outage event occurs for this UE. Thus, the outage probability of UE k is obtained as wherẽn is the target SINR of UE n . In what follows, we assume the power allocation meets the condition of n ≥ 1 for all n without loss of generality.

Asymptotic analysis
In order to improve the analytical tractability and reveal some insights of the system, the asymptotic outage performance at high SNR regime is evaluated. Taking e −x ≃ 1 − x and K 1 (x) ≃ 1∕x for x → 0 and omitting the higher order sum term of x, we develop the outage probability for the asymptotic outage behaviour.
Theorem 2. For x → 0, the CDF of g e,k can be simplified as x 2 (13) and hence, the asymptotic outage probability of UE k is given bỹ Proof. See Appendix A.4. □ Theorem 2 shows that the asymptotic result yields a much more straightforward analytical expression for the outage probability and we can further provide the following corollary. Corollary 1. The NOMA-based cooperative relay system with AF protocol can achieve a diversity order of 2.
Remark that our NOMA scheme experiences the same diversity order as OMA scheme. However, it is higher than that of the scheme without direct links, whose diversity order is one. That can be expected from the fact that a diversity gain is attained since we jointly take into account the direct links and the relay links for decoding.

PERFORMANCE OPTIMISATION
In Section 3, the outage performance of the NOMA-based cooperative relay system with given SIC order and power allocation is analysed. It is well known that SIC order and power allocation have a crucial impact on the performance of NOMA since NOMA exploits the power domain by SIC [30,31]. To this end, we investigate the optimisation of SIC order and power allocation to further improve the system performance.
In this paper, we aim to jointly search for the SIC order and power allocation for each UE, with the objective of minimising the maximum outage probability of all UEs to guarantee user fairness. Specifically, the problem is formulated as It is noteworthy that the optimal SIC order is the order leading to the minimum source transmit power while satisfying the outage probability requirement of each UE. However, Proposition 1 indicates that the equivalent CNR relies on not only the channel statistical characteristics but also the source and relay power. That is to say, the optimal SIC order is coupled with the transmit power, which raise the challenge to develop the SIC order directly. For tractability, we first fix the source and relay power as P S and P R and obtain the optimal SIC order by solving where P ⊛ s is the minimum transmit power actually needed by the source and k is the outage probability requirement of each UE.
Theorem 3. The optimal SIC order with given P s and P r is as the increasing order of F −1 g e,k ( k ), that is, the optimal (k) is the permutation such that F −1 g e, (1) ( (1) ) ≤ … ≤ F −1 g e, (k) ( (k) ) ≤ … ≤ F −1 g e, (K ) ( (K ) ), where F −1 g e,k (⋅) is the inverse function of F g e,k (⋅). The minimum transmit power is given by The optimal power allocation coefficients can be obtained as Proof. See Appendix A.5. □ It is worthy mentioned that the authors in [32] investigate the SIC order design for a conventional NOMA with Rayleigh fading channels. In Theorem 3, we note that F g e,k (⋅) can be replaced by a CDF of any statistical distribution model. In other words, a much more general type of theoretical results of the SIC order and power allocation is developed. Thereby, the results can be easily extended to other NOMA structures. However, unfortunately, it is quite challenging to get the inverse function of F g e,k (⋅) in (9) in closed form. Alternatively, we use numerical methods to calculate the value of the inverse function. The minimum transmit power is given by The optimal power allocation coefficients can be obtained as Remark that at high SNR regime, a closed-form SIC order and power allocation can be obtained with the asymptotic outage probabilities, which definitely reduces the computational complexity.
Theorem 3 and Corollary 2 show that the optimal SIC order depends on the CDF of the equivalent channels and the outage probability requirements, while it is independent of the target SINRs. For given source power P S and relay power P R , the minimum transmit power P ⊛ s obtained from Theorem 3 or Corollary 2 may be not equal to the given source power. In particular, • P ⊛ s < P S or ∑ K k=1 (k) < 1, the source power is redundant, (k) = 1, the source power is exactly sufficient, • P ⊛ s > P S or ∑ K k=1 (k) > 1, the source power is not enough.
By employing this property, we can further solve OP1. Obviously, OP1 can be transformed to the following equivalent problem as For a certain , we can obtain the minimum transmit power from Theorem 3 or Corollary 2. Moreover, the minimum transmit power is monotonously decreasing in . As a consequence, a simple binary search method [33] can be used to find the optimal with the optimal condition P ⊛ s = P S (i.e. ∑ K k=1 (k) = 1). The whole joint SIC order design and power allocation algorithm is summarised in Algorithm 1. Remark that our proposed algorithm needs (log 2 (1∕ )) iterations of binary search while for each iteration, (K ) times of power allocation are performed. Thus, the complexity of our algorithm is (K log 2 (1∕ )). Compared with the exhaustive search over all possible SIC order (K !K log 2 (1∕ )), our algorithm is much more implementable.

SIMULATION RESULTS
In this section, simulation results are presented to validate our analysis. We normalised the noise power as 2 = 1 and assume that the source power is equal to the relay power, that is, P S = P R . The SNR is denoted as the transmit power to noise ratio. The step number I of calculating CDF of g e,k is set as I = 50 [27] to significantly reduce the approximation error. All Monte Carlo simulations are performed with an average calculation of 10 6 blocks. In Figure 2, our analytical results are compared with Monte Carlo results and the results of OMA scheme. Besides, NOMA without direct links between the source and UEs and NOMA with selective combining instead of MRC [13]are also presented as benchmarks. The results of NOMA are based on given SIC order and power allocation, where the SIC order is as the increasing order of average channel gains of relay-to-UE link. In order to meet the power allocation condition in Theorem 1 and guarantee the user fairness as NOMA protocol, the power allocation coefficients are set as k : k+1 = 3. We herein consider an opportunistic OMA scheme, where the UE with the lowest outage probability is scheduled to access the system and the target SINR of OMA is equal to that of NOMA. The results of OMA scheme are obtained by Monte Carlo simulations. It is observed that the analytical results perfectly match with the Monte Carlo results, which verifies the correctness of the analytical derivations. Meanwhile, the asymptotic results nearly coincide with the analytical results in high SNR (more than 8 dB), indicating that the asymptotic results can be used to get a sufficient approximation at high SNR regime. Compared with the selective combining, our proposed scheme with MRC significantly reduces the outage probability for both UEs. It demonstrates that applying MRC can improve the performance indeed since MRC exploits full utilisation of the direct and relay links. Moreover, we observe that OMA attains a lower outage probability. It is from the fact that in OMA scheme, only one UE is served and the inter-UE interference disappears such that OMA has a higher decoding SINR than NOMA scheme. However, compared with OMA, NOMA allows more UEs to be served simultaneously to guarantee user fairness. The system spectral efficiency is further evaluated in the subsequent simulations. In addition, we can see that the diversity orders of NOMA scheme and OMA scheme are same but higher than that of no direct link scheme, which is in agreement with the conclusion in Corollary 1.
In Figure 3, we compare the performance of NOMA and OMA from the system perspective. In order to assess the overall system performance, the system outage throughput [34,35] is adopted as the metric of spectral efficiency. In particular, the system outage throughput is defined as It is shown in Figure 3 that our proposed general NOMA scheme attains the largest throughput. That is to say, although OMA has lower outage probability, NOMA can achieve larger system spectral efficiency. This observation is expected because NOMA allows more UEs to access the system such that it makes more efficient use of the spectrum, which is an intrinsic advantage of NOMA [5]. Moreover, we can see that reserving direct links with MRC can indeed improve the system performance while the performance gain decreases as the transmit SNR increases. Finally, all NOMA schemes converge to the same upper bound of the system outage throughput, that is, ∑ K k=1 log 2 (1 +̃k) as (22). Figure 4 shows the impact of the link between the source and the relay (source-to-relay). The conventional NOMA scheme without relay is provided as a benchmark, where the source communicates with all UEs directly through direct links by NOMA. It can be seen that when the average channel gain of source-to-relay link tends to zero, the general scheme tends to have the same outage performance as the scheme without relay, which is consistent with our intuition. Furthermore, MRC and selective combining have the same performance since only the direct link can be selected due to zero relay channel gain. As the average channel gain increases, introducing the relay can signif- icantly reduce the outage probability and our proposed scheme with MRC outperforms the scheme with selective combining. However, a performance bottleneck exists when the source-torelay link is relatively strong. This phenomenon can be explained by the fact that the decoding SINR from the relay link is jointly decided by the source-to-relay link and the relay-to-UE link. When the source-to-relay link is strong enough, the outage performance is restricted by the relay-to-UE link and hence, a performance bottleneck appears. Figures 5 and 6 show the performance of optimisation. For a comprehensive evaluation, we consider different channel gain order. Specifically, in Figure 5, the relay channels have the same channel gain order ([ r,1 , r,2 , r,3 ] = [5,15,25]) as the direct channels while in Figure 6, the relay channels have an inverse order ([ r,1 , r,2 , r,3 ] = [25,15,5]). The results for the fixed scheme are obtained as the above simulations with given SIC order and power allocation coefficients. The exact optimised results are based on Theorem 3 while the asymptotic optimised results are based on Corollary 2. It is observed that our optimisation can obviously improve the outage performance compared with the fixed scheme. The reason behind is that through our optimisation of joint SIC order design and power allocation, the resource is utilised more efficiently. We can also find that the performance improvement is obtained for both same or inverse channel gain orders, which demonstrates the robustness of our algorithm. In addition, the asymptotic results are nearly the same as the exact results at high SNR regime, indicating that the asymptotic results can be used to obtain an excellent approximation with a significant reduction of the computational complexity.

CONCLUSION
This paper studied a NOMA-based cooperative relay system with AF strategy. Both the direct links and the relay links were applied to serve the destinations. The outage behaviour was analysed and the exact as well as the asymptotic outage probabilities were derived in closed form. The diversity order was obtained from the asymptotic results. Moreover, the SIC order and power allocation were jointly optimised to further improve the system performance and an optimal solution was developed.
Simulation results revealed the accuracy of the analytical results and indicated that NOMA is superior to OMA in spectral efficiency without losing diversity order. In addition, our SIC order design and power allocation algorithm can significantly improve the outage performance compared with fixed SIC order and power allocation.  (1) to UE (k−1) should be decoded and canceled in turn. Hence, for a certain UE (n) 's message decoding at UE (k) where n ≤ k, the messages of UE (1) to UE (n−1) have been canceled and the remaining signals of y (k) (1) and y (k) (2) from the direct link and the relay link, respectively, are where G = √ P r |h s,r | 2 P s + 2 is the amplifying factor. Denote 1 and 2 as the combination factors. Then, the SINR of 1 y (k), (n) (1) + 2 y (k), (n) (2) for decoding UE (n) 's message is where g e, (k) = | 1 h s, (k) + 2 h s,r h r, (k) G | 2 Accordingly, we need to find 1 and 2 maximising g e, (k) to obtain the maximum decoding SINR. By invoking Cauchy-Schwarz inequality, we have where x * is the complex conjugation of x. Then, we have the maximum g e, (k) as g e, (k) = |h s,r | 2 |h r, (k) | 2 P r (|h r, (k) | 2 P r + |h s,r | 2 P s + 2 ) 2 + |h s, (k) | 2 2 , (A.5) that is, the equivalent CNR in (5). Thereby, we can obtain the maximum SINR as (4).

A.2
Proof of Lemma 1 Supposeĝ r,k = g s,r g r,k P r g r,k P r + g s,r P s + 1 ≤ x, (A. 6) and we have (g s,r − x)g r,k P r ≤ xg s,r P s + x.
ii. For g s,r > x, (A.7) is equivalent as By employing the CDF of g r,k in (6b), we can obtain Based on the above two cases, the CDF ofĝ r,k is obtained as (A.10) Adopting t ′ = t − x and after some mathematical manipulations, F̂g r,k (x) can be written as (A.11) The integral part of the above equation can be calculated with the aid of [29] [eq. (3.324.1)]. Consequently, the exact CDF of g r,k is obtained as (8).
The CDF of g e,k =ĝ r,k + g s,k is expressed as Since it is yet observed to be extremely hard to get an exact closed-form of the CDF, we adopt an I -step staircase approach [27,28] to approximate the solution. Accordingly, the CDF can be calculated as .
(A.13) By inserting the CDF of g s,k , we can obtain the approximated CDF of g e,k as (9).

A.4
Proof of Theorem 2 Using e −x ≃ 1 − x and K 1 (x) ≃ 1∕x for x → 0, the PDF of g s,k and the CDF ofĝ r,k can be simplified as Then, the CDF of g e,k is obtained as Thus, with the simplified CDF, the asymptotic outage probability of UE k can be obtained as (11).
A.5 Proof of Theorem 3 Firstly, we derive the optimal SIC order. For simplicity, we consider a two-user scenario to deal with the SIC order and the proof can be easily extended to multi-user scenario.
Suppose P 1 and P 2 are the transmit power of UE 1 and UE 2 , respectively, and 1 and 2 are the outage probability requirement. Without loss of generality, we further assume F −1 g e,1 ( 1 ) ≤ F −1 g e,2 ( 2 ). Then, we compare the following two cases.
i) The SIC order is as 1 to 2, that is, UE 1 decodes its message directly while UE 2 decodes and removes UE 1 's message before decoding its own message. Thus, for UE 1 , the outage probability requirement  1,out ≤ 1 is satisfied if For UE 2 , the outage probability requirement  2,out ≤ 2 is satisfied if̃1 Accordingly, we can obtain the minimum sum power as .
(A. 25) ii) The SIC order is as 2 to 1. Similarly, the minimum sum power is expressed as .

(A.26)
By invoking the assumption of F −1 g e,1 ( 1 ) ≤ F −1 g e,2 ( 2 ), we can easily conclude that the SIC order of 1 to 2 achieves a smaller sum power. In other words, the optimal SIC order is as the increasing order of F −1 g e,k ( k ). Next, we investigate the corresponding sum power with the optimal SIC order. For notation simplicity, we assume that the optimal SIC order is (k) = k and adopt k instead of (k) as the sub-index. Thereby, UE k 's message should be decoded by UE k , UE k+1 , …, UE K . Based on the condition of the optimal SIC order above, we have Denoting S k = ∑ K i=k i P s and after some mathematical manipulations, we obtain the recursion rule from (A.28) as . (A.29) By multiplying ∏ k−1 i=1 (1 +̃i ) on both sides of the above equation, we have (1 +̃i ).
(A.30) Then, define T k = ∏ k−1 i=1 (1 +̃i )S k and (A.30) can be rewritten as Based on the above recursion rule, T 1 = S 1 , that is, the total transmit power can be easily obtained as Finally, using (k) instead of k, we can directly obtain (17) in Theorem 3. Meanwhile, the power allocation coefficients can be calculated as (A.27) as the order from K to 1.