A Unified Framework for IRS Enabled Wireless Powered Sensor Networks

This paper unveils the importance of intelligent reflecting surface (IRS) in a wireless powered sensor network (WPSN). Specifically, a multi-antenna power station (PS) employs energy beamforming to provide wireless charging for multiple Internet of Things (IoT) devices, which utilize the harvested energy to deliver their own messages to an access point (AP). Meanwhile, an IRS is deployed to enhance the performances of wireless energy transfer (WET) and wireless information transfer (WIT) by intelligently adjusting the phase shift of each reflecting element. To evaluate the performance of this IRS assisted WPSN, we are interested in maximizing its system sum throughput to jointly optimize the energy beamforming of the PS, the transmission time allocation, as well as the phase shifts of the WET and WIT phases. The formulated problem is not jointly convex due to the multiple coupled variables. To deal with its non-convexity, we first independently find the phase shifts of the WIT phase in closed-form. We further propose an alternating optimization (AO) algorithm to iteratively solve the sum throughput maximization problem. To be specific, a semidefinite programming (SDP) relaxation approach is adopted to design the energy beamforming and the time allocation for given phase shifts of WET phase, which is then optimized for given energy beamforming and time allocation. Moreover, we propose an AO low-complexity scheme to significantly reduce the computational complexity incurred by the SDP relaxation, where the optimal closed-form energy beamforming, time allocation, and phase shifts of the WET phase are derived. Finally, numerical results are demonstrated to validate the effectiveness of the proposed algorithm, and highlight the beneficial role of the IRS in comparison to the benchmark schemes.

I. INTRODUCTION
In recent years, demands for massive connectivity and high data rate have experienced an explosive growth in next generation wireless networks, which has drawn increasing attention of academics and industries. Internet of things (IoT) is considered as an important portion of the fifth-generation (5G) network and beyond, which significantly enhances highdata access rate for massive wireless devices (WDs) [1], [2]. In a generic IoT system, a number of sensor nodes connect with an access point (AP) forming a wireless sensor network (WSN), which has been widely applied in various practical scenarios, including external environment monitoring, event detection for emergency services, wireless surveillance for public safety, healthcare diagnosis, etc. [3]. The sensors are typically low energy consumption devices, which depend on a finite-capacity battery such that they may not have sufficient energy to support their own computation and commu-nication operations [4]. The sensors are generally equipped with traditional batteries, which limits their potential practical applications, since traditional batteries need to be regularly maintained or even replaced to prolong their own operation lifetime, which is often costly due to the massive number of sensors in use. In addition, the sensors are often deployed in extreme environments, infrastructures, or human bodies such that the battery maintenance or replacement is very challenging. Thus, limited battery lifetime of sensors is still a key challenge in designing future wireless networks [5].
Radio frequency (RF) wireless energy transfer (WET), as one of the promising solutions to address the energy constraint issue, enables novel electric energy transmission from a dedicated energy source to the WDs without any wired connection [6]. As one important solution of RF WET, wireless powered communication networks (WPCNs) collect energy from dedicated energy sources, each of which has a stable energy supply, supporting wireless information transfer (WIT). A WPCN is expected to improve the system throughput in comparison to the conventional battery-powered communications. In WPCNs, a classic protocol named "harvest-thentransmit" was proposed in [7], where the WDs first collect energy from the RF signals broadcast by an AP, and then transmit their independent information to the AP utilizing the harvested energy. A group of power stations (PSs) constitute of a dedicated WET network which is deployed to support WIT in the vicinity [8], [9]. The WDs can gain energy benefits from these PSs to prolong their own battery life via wireless charging. The WPCN improves the energy efficiency in wireless networks which reduces its operational cost. Thus, the WPCN is more suitable for the low energy consumption use cases, i.e., wireless powered sensor networks (WPSNs), which includes many sensor nodes to reduce maintenance cost as well as enhance its deployment flexibility. In addition, the WPSN is generally used to support low-power devices, i.e., radio frequency identification (RFID) IoT sensor nodes and tags [5].
Moreover, 5G and beyond networks have been evolving towards machine-centric driven by a vast range of quality of service (QoS) requirements, e.g., ultra-high spectral efficiency and throughput. Several advanced techniques can be used to enhance spectral efficiency and throughput, e.g., massive multiple-input multiple-output (massive MIMO) with millimetre wave (mmWave), relaying, and ultra-dense networks (UDNs) [10]- [12]. However, these techniques typically require a large amount of RF chains over a high frequency band and incur high energy consumption and hardware cost, which results in more energy consumption [13], [14]. This has given rise to a novel and promising paradigm, named smart radio environment, which is a holographic wireless mode with low cost, size, weight, and power consumption features in hardware architecture [15]. Smart radio environment offers the seamless wireless connectivity and the capability of transmitting and processing data via recycling the existing radio waves instead of generating new ones, which is a transformative way to convert the traditional wireless environment into a programmable intelligent entity [13]- [15].
Intelligent reflecting surface (IRS), as an enabler of smart radio environments, is one of the promising techniques for enhancing the throughput in future sixth generation (6G) wireless communication networks [16]. The IRS is made of a massive number of reconfigurable reflecting elements, and coordinated by a software-oriented IRS controller [13]. These reflecting elements typically have small, low-cost, and lowenergy consumption features, which can efficiently reflect the intended signal without a dedicated RF processing, en/decoding, or re-transmission [17], [18]. The IRS exploits a novel wireless communication paradigm to achieve threedimensional (3D) passive beamforming gains to align the reflected signals with the direct signal by intelligently varying the phase shift at each reflecting element.

A. State of the Art
There are several existing studies in the literature that focus on the IRS assisted wireless communication networks, such as [17]- [23]. In [17], [18], an IRS assisted multiple-input singleoutput (MISO) system is proposed, where the desired signal is passively received and reflected by the IRS to align the reflecting link with the direct link between the access point (AP) and the users via intelligently adjusting the phase shift of each reflecting element. The total transmit power was minimized subject to the individual signal-to-interference-plus-noise ratio (SINR) constraint to jointly design the active transmit and passive reflecting beamforming. The energy efficiency was adopted as a performance metric in the IRS aided MISO downlink system, which is maximized such that the power allocation and the phase shifts of the IRS are optimally designed by an alternating optimization (AO) algorithm, gradient descent search, and sequential fractional programming [19]. In [20], a practical phase shift model was proposed to capture the phase-dependent amplitude variation in the element-wise reflection design. Furthermore, the potential of the IRS enabled wireless security was demonstrated in [21], [22]. These works focus on the IRS-assisted MISO secure system, where an IRS is deployed to reduce power consumption and enhance achievable secrecy performance via alternately designing the secure transmit and reflecting beamforming vectors. In [23], a multi-cell multiple-input multiple-output (MIMO) system was investigated with the assistance of an IRS in enhancing the downlink transmission for cell-edge users to mitigate the inter-cell interference. Moreover, the IRS enabled simultaneous wireless information and power transfer (SWIPT) was investigated in [24]- [26]. In [24], an IRS was introduced in a SWIPT system to achieve high passive beamforming gains. This enhances the WET efficiency and the rate-energy trade-off of the IRS enabled SWIPT system via maximizing weighted harvested energy of energy harvesting users subject to the individual SINR constraint for information decoding users. Extension to the multiple IRSs scenario, which are deployed to support the information/energy transfer from a AP to information decoding/energy harvesting users [25]. The total transmit power is minimized with the QoS constraints for all users, which demonstrates the impact of these IRSs on energy efficiency of the SWIPT system. In [26], an IRS assisted MIMO SWIPT system was studied to maximize the weighted sum rate (WSR) of the information decoding users, while guaranteeing the energy harvesting requirement of the energy harvesting users. The classic block coordinate descent (BCD) algorithm was applied to decompose the formulated problem into several sub-problems and alternately design the transmit precoding and phase shift matrices.
The above-mentioned works focus on the IRS aided downlink transmission. On the other hand, the IRS aided multiple access channel (MAC) has drawn increased research attention recently, such as the IRS enabled MAC [27], the IRS assisted WPCN user cooperation (UC) system [28]. In [27], the capacity region and deployment mechanism of the IRS enabled MAC were investigated for a two-user case with the help of distributed and centralized IRSs. Additionally, an IRSassisted WPCN with UC was considered in [28], where the IRS is deployed to help a WPCN aided UC system to enhance the common throughput performance in downlink WET and uplink WIT phases. Very recently, the IRS was introduced in mobile edge computing (MEC) systems which coordinates the computation and communication capabilities of wireless networks via local computing on the WDs or offloading to the MEC server for processing their own computational tasks [29], [30]. In the IRS assisted MEC system, the WDs offload a portion of their computational tasks to the AP equipped with a MEC server with the assistance of an IRS [29]. The computational latency is minimized to satisfy the constraints of the edge computing capability, which alternately design the computing and communication configurations. In [30], a further extension was investigated in terms of the IRS enabled WPCN MEC network, where the IRS assists the WDs via a reflecting link for WET and computational offloading to reduce the total energy consumption of the WET at the AP and of the edge computing based on orthogonal frequency-division multiplexing (OFDM) configurations.
Although the existing state-of-the-art made variety of research contributions in the downlink/uplink IRS aided wireless systems, the IRS aided SWIPT systems and the IRS assisted MEC systems, there still exists a major research gap on investigation of the IRS's benefits in a WPSN. We introduce the IRS to enhance energy harvesting and data transmission capabilities of the WPSN due to its self-sustainability, which is a promising paradigm and has not yet been investigated in the literature. Also, the IRS is deployed to properly coordinate the energy/information RF signals which can circumvent the high RF signal attenuation due to long distances or construct an effective energy harvesting/charging zone. This provides an coverage enhancement for downlink wireless charging and uplink connectivity so as to improve the throughput performance for the WPSN. In addition, it is imperative that the energy source is equipped with multiple antennas which realizes energy beamforming to perform WET. This is due to the fact that the energy beamforming can bring a significant WET efficiency in comparison to the traditional omnidirectional multi-antenna transmission. To the best of the authors' knowledge, there has been few of work that modelled and investigated the IRS assisted WPSN with multi-antenna energy source, which motivates our work in this paper. This paper investigates an IRS assisted WPSN, where a multi-antenna PS applies energy beamforming to radiate wireless energy to multiple IoT devices which then utilize the harvested energy to transmit their own information to the AP. The IRS is deployed to improve energy harvesting and data transmission capabilities with intelligently adjustable phase shifts. For this novel system model, the main contributions of this paper are summarized in the following.

1)
We first investigate an IRS aided WPSN system, where the IRS acts as a helper to enhance the throughput performance of the WPSN by enabling energy and information reflections during the WET downlink and WIT uplink transmissions, respectively. 2) We maximize the system sum throughput to evaluate the energy harvesting and data transmission capabilities of the IRS assisted WPSN, which jointly designs the energy beamforming of the PS, the passive phase shifts as well as the transmission time allocation of the WET and WIT phases. The formulated problem is not jointly convex, due to multiple coupled variables, and cannot be solved directly. To tackle the non-convexity, we first derive the optimal closed-form phase shifts of the WIT phase. Next, we take into consideration an AO algorithm to alternatively update the energy beamforming, the phase shifts of the WET phase and the transmission time allocation. Specifically, a semi-definite programming (SDP) relaxation scheme is applied to design the energy beamforming as well as the time allocation for given phase shifts of the WET phase which is also solved by the SDP relaxation for given energy beamforming and time allocation. In addition, the rank-profile is characterized to obtain an optimal energy beamforming, while Gaussian randomization is adopted to deal with possible higher-rank phase shift matrix of the WET phase incurred by the SDP relaxation. 3) Although the SDP based AO scheme can efficiently solve the formulated problem, it incurs a higher computational complexity and is time-consuming, especially for a large amount of reflecting elements. Thus, it is imperative to propose an independent scheme which can be deployed on the IRS and the IoT devices, and significantly lowers the computational complexity incurred by the SDP relaxation with Gaussian randomization. In light of this, the low complexity based AO scheme is proposed. Particularly, the optimal closed-form energy beamforming and transmission time allocation are derived by taking into consideration eigen-decomposition, as well as the Lagrange dual method and the KKT conditions, respectively, for given phase shifts of the WET phase. Then, we derive the closed-form phase shifts of the WET phase by the Majorization-Minimization (MM) algorithm for given energy beamforming and transmission time allocation. In addition, the convergence of the proposed MM algorithm and low complexity based AO scheme are analyzed. The remainder of this paper is organized as follows. Section II introduces the system model as well as the sum throughput maximization problem formulation. Section III provides the optimal solution of the formulated problem. Numerical results are demonstrated in Section IV to evaluate the proposed algorithm. Finally, we conclude this paper in Section V.

B. Notations
We use the upper case boldface letters for matrices and lower case boldface letters for vectors. conj(·), (·) T and (·) H denote the conjugate, the transpose and conjugate transpose operations, respectively. Tr(·) stands for trace of a matrix. ρ max (·) represents the maximum eigenvalue, whereas ν max (·) denotes the eigenvector associated with the maximum eigenvalue. A 0 indicates that A is a positive semidefinite matrix. | · | and · denote the absolute value and the Euclidean norm of a vector. I denotes the identity matrix with appropriate size. exp(·) and arg indicate the exponential function and the phase angle, respectively. W(·) denotes the Lambert W function.
{·} represents the real part of a complex number. diag{·} denotes a vector that consists of the diagonal elements of a matrix or a diagonal matrix where the diagonal elements are from a vector. In this paper, we consider an IRS assisted WPSN as shown in Fig. 1. To be more specific, a multi-antenna PS employs energy beamforming to broadcast wireless energy to K IoT devices who send their own information to an AP using the harvested energy. Meanwhile, an IRS is deployed to enhance energy harvesting and data transmission capabilities by generating passive energy and information passive beamformers. It is assumed that the PS is equipped with N T transmit antennas, the IRS consists of N R reflecting elements, while the other devices (i.e., the AP, and all IoT devices) are single-antenna nodes. The IRS controller is generally fixed to coordinate its reflection mode by intelligently varying the phase shift of each reflecting element. In this paper, all channel state information (CSI) is assumed to be perfectly known because we are interested in an upper bound on the sum throughput performance in the IRS assisted WPSN [7], [17]. Several channel estimation techniques have been investigated in the literature for obtaining the CSI of the direct link between the PS and the devices as well as the devices and the AP [7], [31]. Moreover, the IRS is equipped with a controller that coordinates its switching between two working modes, such as reception mode for channel estimation and reflection mode for energy/data transmission [17], which also provides a real-time CSI feedback via this controller. Very recently, a novel channel estimation framework was proposed based on the PARAllel FACtor (PARAFAC) decomposition to unfold the resulting cascaded channel model [32], [33]. On the other hand, we may take into consideration the passive pilots used for the channel estimation of the cascaded CSI. To be specific, the reflecting elements of the IRS passively reflect the pilot sequences transmitted from the IoT devices to the AP/ PS to the IoT devices such that the CSI related to the IRS can be obtained [34]. In addition, while imperfect CSI will degrade the throughput performance due to the channel estimation errors, these channel uncertainties have been tackled in the IRS assisted wireless networks by taking into consideration robust resource allocations for active transmit and passive reflecting beamformers [35]- [37]. In particular, these robust schemes considered the imperfect cascaded BS-IRS-user channels, which typically follow the bounded and statistical CSI uncertainties, and the worst-case and outage probability robust beamforming designs are considered. We denote Θ k = diag [β k,1 exp(jα k,1 ), ..., β k,N exp(jα k,N )] , | exp(jα k,n )| = 1, ∀k ∈ [0, K], n ∈ [1, N R ] as the diagonal matrices associated with the phase shifts of the IRS elements to reflect the k-th IoT device, where α k,n ∈ [0, 2π) and β k,n ∈ [0, 1] are the phase shift and amplitude of the associated reflection coefficient. When k = 0, Θ 0 is known as the energy reflection phase shift matrix, whereas Θ k is denoted as the information reflection phase matrix when k ∈ [1, K]. Also, β k,n , k ∈ [0, K], n ∈ [1, N R ] is typically set to be 1 to maximize the reflected signal at the n-th element of the kth phase shift matrix.

A. Transmission Protocol
In the IRS aided WPSN, we adopt a generic harvest-thentransmit protocol, and the whole operation time period is set to T . The PS first provides wireless energy to the IoT devices during the downlink WET duration τ 0 ∈ [0, 1]. At the same time, the IRS collects the energy signal and reflect it via IRS planar array. Then, these IoT devices utilize the harvested energy to independently transmit their own information to the AP with the help of the IRS by time division multiple access (TDMA). Thus, the uplink WIT time duration of the k-th IoT device is denoted by τ k ∈ [0, 1]. The time allocation satisfies K k=0 τ k = T . The channel coefficients between the PS and the k-th IoT device, the PS and the IRS, the IRS and the k-th IoT device, the k-th IoT device and the AP, the k-th IoT device and the IRS, as well as the IRS and the AP are denoted by 1 Thus, the RF harvested energy at the k-th IoT device is given as 2 where η ∈ [0, 1] is the energy conversion efficiency; w denotes the energy beamforming of the PS satisfying w 2 ≤ P 0 , P 0 is the maximum transmit power available at the PS. It is assumed that all harvested energy at each IoT device is used for the information transmission, which achieves the maximum achievable throughput. 3 Hence, the achievable throughput of the k-th IoT device is given by , and σ 2 denotes the noise power at the AP.

B. Problem Formulation
To evaluate the performance of the IRS assisted WPSN, we are interested in maximizing the sum throughput which jointly designs the phase shifts of the WET and WIT phases as well as the transmission time allocation. Hence, the sum throughput maximization problem is formulated as In problem (2), (2a) is the constraint of phase shifts, (2b) denotes the the transmission time constraint, and (2c) is the transmit power constraint of the PS. Problem (2) cannot be solved directly due to its non-convexity with respect to the energy beamforming w, the time allocation vector τ and the phase shift matrices Θ. In the following, we first derive the phase shifts of the WIT phase in closed-form. Then, the SDP based AO and low complexity based AO schemes are applied to solve problem (2) which alternately designs the energy beamforming, the time allocation, and the phase shifts of the WET phase.

III. SUM THROUGHPUT MAXIMIZATION
In this section, we aim to solve the sum throughput maximization problem (2). Specifically, we first optimize the phase shift matrix Θ k , ∀k ∈ [1, K] by maximizing its objective function. To proceed, the following theorem is presented to derive the optimal closed-form phase shifts of the WIT phase.
Theorem 1: The optimal phase shifts of the WIT phases, i.e., Θ k for ∀k ∈ [1, K], are given as Proof: See Appendix A. For the optimal phase shift matrix Θ * k , we have the following proposition Proposition 1: The optimal phase shift matrix Θ * k aligns the cascaded link between the k-th IoT device and the AP via the IRS with the direct link between them, which can be expressed as where ξ k is positive scalar denoting the signal strength metric from the cascaded link between the k-th IoT device and the AP via the IRS.
Proof: See Appendix B. By exploiting Proposition 1, we have the following remark Remark 1: By exploiting Proposition 1, for given w, τ and Θ 0 , the IRS can strengthen the received signal power of the k-th IoT device at the AP at most (1 + ξ k ) 2 times in comparison to that without IRS. In addition, ξ k for ∀k ∈ [1, K] is proportional to the number of the IRS reflecting elements. Hence, a significant improvement can be introduced in terms of the sum throughput performance with a larger number of reflecting elements. Moreover, the IRS deployment as well as the pathloss model of the cascaded link between the k-th IoT device and the AP via the IRS also play an important role in affecting the received signal strength [38].
To proceed, we define t k = |h k Θ * k h r +h d,k | 2 and substitute it into problem (2) to get Problem (5) is still intractable due to the non-convex nature of its objective function (5a) and the modulus constraint (5b).
In order to circumvent this non-convex issue, we propose the AO algorithm to solve (5). Specifically, we first investigate the SDP relaxation scheme to reformulate (5) into a convex optimization problem to alternately design the energy beamforming, the time allocation and the phase shifts of the WET phase. Consequently, we propose a low complexity scheme to derive the optimal closed-form energy beamforming, time allocation and the phase shifts of the WET phase in closedform which efficiently reduces the computational complexity incurred by the SDP relaxation scheme.

A. SDP Relaxation Scheme
In this section, we consider an SDP relaxation scheme to alternately design the energy beamformer w, the time allocation τ , and the phase shift matrix Θ 0 by applying the AO algorithm [17], [24]. To be specific, we first fix Θ 0 to optimize w and τ , then the Θ 0 can be optimally designed for given w and τ . To proceed, we define V 0 = τ 0 W and W = ww H and problem (5) is relaxed as The following lemma is required to characterize the joint convexity of problem (6).
Proof: See Appendix C. Note that the relaxed problem (6) guarantees the rank-one nature of V 0 , thus, the following lemma is introduced to characterize the rank-profile of V 0 .
Lemma 2: The optimal solution to problem (6) is a rank-one matrix, i.e., rank(V * 0 ) = 1. Proof: See Appendix D. Since (6) is a convex optimization problem without the nonconvex rank-one constraint, we can employ interior-point methods [39], to efficiently solve it to find the optimal solution (V * 0 , τ * ). We further obtain W * = V * 0 τ * 0 and rank(W * ) = 1 by applying Lemma 2. Thus, the optimal energy beamformer w * can be recovered from W * using eigen-decomposition.
Then, we design the phase shift matrix Θ 0 for given w and τ . To proceed, problem (5) is relaxed as . By dropping the non-convex rank-one constraint rank(∆ 0 ) = 1, (7) is a convex optimization problem, which can be efficiently solved via interior-point methods [39]. Let us denote the solution to problem (7) as ∆ * 0 . Due to the rank-one relaxation, the relaxed problem (7) may have a higher rank solution, i.e., rank(∆ * 0 ) ≥ 1. In order to recover θ 0 from ∆ * 0 , we apply a Gaussian randomization technique to construct an approximate rank-one solution [40]. Specifically, the eigenvalue decomposition of V * 0 is written as and Λ ∈ C (N R +1)×(N R +1) is a diagonal matrix with eigenvalues arranged in decreasing order. To proceed, we construct a feasible solution asθ H 0 = ΥΛ 1 2 κ, where κ ∈ C (N R +1)×1 is randomly generated to follow complex circularly symmetric uncorrelated Gaussian variables with zero-mean and covariance matrix I N R +1 . According to [17], the optimal phase vector is given by θ * 0 = [exp(jα * 0,1 ), ..., exp(jα * 0,N R )], where α * 0,n = arg θ 0 (n) for ∀n ∈ [1, N R ]. Thus, the optimal Θ * 0 can be further obtained from θ * 0 . In the proposed AO algorithm, we replace solving problem (5) with alternately solving problems (6) and (7) in an iterative fashion, in which the solution obtained in each iteration is used as the initial point of the next iteration. We summarize the detailed procedure of the proposed AO algorithm in Algorithm 1. to obtain the optimal solution of the energy beamforming w (m+1) and the time allocation τ (m+1) by solving problem (6). b) Fix w = w (m+1) and τ = τ (m+1) to obtain the optimal solution of the phase shift matrix θ (m+1) 0 by solving problem (7).
Now, the following proposition is required to characterize the convergence of Algorithm 1 Proposition 2: The objective value of problem (6) produces a non-descending trend over iterations by employing Algorithm 1, and its convergence is guaranteed.
Proof: See Appendix E. Note that the maximum values of problems (6) and (7) serve as upper bounds for the reformulated counterparts of problem (5) with respect to w for givenθ 0 and with respect toθ 0 for given w, respectively [41]. We solve problems (6) and (7)  , [42]. Also, provided that problem (5) is always feasible, Algorithm 1 yields a feasible solution [43].

B. Low Complexity Scheme
In Section III-A, we proposed the SDP based AO scheme to solve problem (5), which alternately designs the energy beamforming, the time allocation, and the phase shifts of the WET phase. However, the AO base SDP scheme may incur a very high computational complexity due to the SDP relaxation with Gaussian randomization. Thus, it is imperative to develop an independent scheme which can be deployed on the IRS and the IoT devices. In this subsection, we propose the low complexity based AO scheme which derives an optimal closedform solution to alternately solve problem (5) to significantly reduce the computation complexity compared with the SDP based AO scheme.
1) Optimization of w and τ for given Θ 0 : First, let W = ww H , we rewrite problem (5) for given Θ 0 as (8) Note that rank(W) = 1 is satisfied in problem (8) due to the SDP relaxation (i.e., W = ww H ). Problem (8) is not jointly convex with respect to W and τ due to the non-convex property of (8a) which cannot be directly solved. In order to circumvent this issue, we consider the following Lagrange dual function for given W to derive a closed-form solution for τ .
where µ is the non-negative dual multiplier associated with the constraint (2b). Also, its dual problem is given by where S is the feasible set of any τ k for ∀k ∈ [0, K], which has been shown in the constraint (2b). Note that (8) can be reformulated into a convex optimization problem and guarantees Slater's condition, since τ ∈ S, τ 0, and K k=1 τ k < T . Hence, strong duality holds such that the optimal solution to (8) satisfies the Karush-Kuhn-Tucker (KKT) conditions [39], which is given by From (11a), we have the optimal dual variable satisfies µ * > 0, since the optimal solution to problem (8) (i.e., τ * ) guarantees the equality K k=0 τ k = T . According to (11b), we take into consideration the first-order derivative of (9) in terms of τ k for ∀k ∈ [1, K] and set it to zero, which is given by The left hand side (LHS) of (12) can be written in the form of f (x) = log(1 + x) − x 1+x , which is a monotonically increasing function with respect to x. To guarantee the K equations in (12), we further have Substitute (14) into the constraint (2b), the following derivations are required to obtain the following expression for λ Substitute (15) into (14), the optimal solution of τ k for ∀k ∈ [1, K] is given by We substitute (16) into problem (8) and letG = t 1g1 , ..., t KgK , (8) is written as Problem (17) is still not jointly convex in terms of W and τ 0 . In the following, we derive the optimal closed-form solution W for given τ 0 using the following theorem. Theorem 2: The optimal closed-form solution to problem (17), i.e., W, is given by W * = P 0 ν max GG H ν max GG H H . Proof: See Appendix F. Due to the rank-one condition rank(W) = 1, the optimal energy beamformer is easily derived as w * = √ P 0 ν max GG H . By applying Theorem 2, problem (17) can be rewritten with respect to τ 0 as Problem (18) is a single-value optimization problem, where the optimal time allocation τ 0 can be easily attained by using onedimensional line search, e.g., golden search [44]. However, this numerical search will introduce a very high computational complexity. In order to circumvent this issue, we propose a low complexity method to derive the optimal closed-form τ 0 without such an exhaustive search. To proceed, the following theorem is required Theorem 3: The optimal time allocation τ 0 can be derived in closed-form as Proof: See Appendix G. 2) Optimization of Θ 0 for given w and τ : Here, we first rewrite problem (5) with respect to Θ 0 as Problem (20) is not convex due to its non-convex unit-modulus constraint. Thus, we propose a novel method to derive the optimal closed-form phase shifts of the WET phase. It is easily verified that maximizing problem (20) is equivalent to the maximization of the following problem where b k = diag g H r,k G 0 w and d k = g H d,k w. By applying a few mathematical manipulations to (21a), we have where where Φ = −Φ 1 , and e = −e 1 . Problem (23) is still intractable due to its unit modulus equality constraint (23b). In order to tackle this issue, the Majorization-Minimization (MM) algorithm is adopted, and a sequence of tractable sub-problems are considered to iteratively solve problem (23) by approximating its objective function and constraint set [42]. Now, consider the following problem: We approximate both the objective function and feasible constraints set of problem (24) at each iteration. 5 Thus, the following convex sub-problem can be solved at the m-th iteration.
The sequence x (m) results in a monotonically decreasing f 0 (x) which converges to a KKT point [42]. In other words, the sub-problem (25) is introduced from the upper bound of the objective function in (24) via a convex surrogate function, and the feasible set in (24) is approximated via linearization [42]. Proposition 3: [42], [45] The objective function (23a) is approximated in the following for any given θ (m) at the m-th iteration and for any feasible θ.
Also,θ 0 denotes the approximated solution to θ 0 which is achieved in the previous iteration via the alternating algorithm. Proposition 3 constructs a surrogate function of (23a), and it is easily verified that g(θ|θ (m) ) in (27) guarantees the conditions in (26). By exploiting Proposition 3, problem (23) is reformulated as Also, it is easy to obtain θ 0 2 = N R due to |θ 0 (n)| = 1, ∀n ∈ [1, N R ]. The term {θ 0γ } can be maximized when the phases of θ 0 (n) andγ(n) are identical. Hence, the optimal solution to (28) is derived as which can be obtained via (29).
The objective value of problem (8) produces a non-decreasing trend over iterations by applying Algorithm 2, and its convergence is guaranteed. The proof of this statement is similar to that of Proposition 2, and is omitted here due to space limitation.

Fig. 2. System deployment.
In this section, numerical results are presented to illustrate the theoretical results of the proposed algorithms as derived in Section III. In our simulations, we consider the system deployment shown in Fig. 2. Unless otherwise stated, the PS, the AP, and the IRS are located at (−10, 0, 0), (10, 0, 0) and (−2, 6, 0). All IoT sensor nodes are assigned at (0, 0, n×l 2 ) if n = 1, ..., (2k + 1), and 0, 0, − (n−1)×l 2 , if n = 2, ..., 2k, where l is the interval between two neighbouring IoT devices. The channel coefficient is composed of distance-dependent path loss model and small-scale fading. The path loss model is set to P L = Ad −ε , where A = −30 dB, ε is the path loss exponent, and d represents the distance between any two nodes, i.e., the PS and the IRS, the PS and the k-th IoT devices, the IRS and the k-th IoT device, the IRS and the AP, as well as the k-th IoT device and the AP. The channel coefficients between the PS and the IRS, the IRS and the k-th IoT device, the k-th IoT device and the IRS, as well as the IRS and the AP are modelled as   We first plot the convergence performance of Algorithm 1 and Algorithm 2 in Fig. 3. From this figure, it is seen that the sum throughput increases with iterations and then achieves a converged value within five iterations, which confirms the convergence of the proposed AO algorithms. Also, the proposed low complexity scheme performance matches with the SDP relaxation scheme when the algorithms converge, which confirms the theoretical derivations as shown in Section III-B.
To highlight our proposed schemes, we also evaluate the performance of the following benchmark schemes under the same parameters for comparison.
• Random phase shift (RPS): the phase shifts are uniformly and randomly distributed in [0, 2π). • Fixed time allocation (FTA) (τ 0 = 0.5). [46]. • Equal time allocation (ETA) (τ k = 1 K+1 , ∀k ∈ [0, K]) [46]. • Without IRS [7]. In Fig. 4, the sum throughput versus the transmit power at the PS P 0 is plotted for each scheme. From this figure, one can observe that the sum throughput increases with P 0 , because more energy is collected by the IoT devices with a higher PS's transmit power which yields a larger sum throughput. In addition, the performances of the proposed SDP based AO and low complexity based AO schemes are identical and significantly outperform the benchmark schemes and the gap between the proposed schemes and the benchmark schemes becomes larger. This highlights the beneficial role of the IRS in the WPSN.
Next, we evaluate the sum throughput versus the number of reflecting elements at the IRS N R in Fig. 5. It can observed from this figure that large-size reflecting arrays can achieve higher sum throughput than all benchmark schemes. In benchmark schemes, FTA achieves a slower increase in terms of sum throughput, since it employs a given time allocation instead of optimal time allocation, while RPS and ETA have an inconspicuous increase due to random phase shift distributed and equal time allocation. The scheme without IRS remains constant with N R since the IRS does not involve energy and information reflections during the WET and WIT phases.
Then, we demonstrate the impact of the number of transmit antennas at the PS N T and IoT devices K, on the sum throughput in Fig. 6 and Fig. 7, respectively. Fig. 6 demonstrates that the proposed schemes outperform all benchmark schemes in terms of sum throughput which increases with N T . This is due to the fact that a larger number of transmit antennas at the PS brings more power via energy beamforming to improve energy/information reflection efficiency. In addition, Fig. 7 shows that a large number of IoT devices K improve the throughput performance for each scheme. To be specific, the sum throughput gradually increases with respect to K and until about K ≥ 8. This is due to the fact that as K increases, more and more IoT devices are located farther away from the PS, the IRS, and the AP (refer to the system deployment in Fig.  2) which degrades the energy and information reflection efficiencies such that the sum throughput gain becomes smaller.
Furthermore, the impact of the reflection's path loss model on the sum throughput is evaluated in Fig. 8 and Fig. 9, which investigate the energy reflection performance in the reflecting link from the PS to the IRS as well as the IRS to the IoT devices, respectively. Fig. 8 depicts the sum throughput versus the path loss exponent between the PS and the IRS, i.e., ε is denoted by ε PS2IRS . It is apparent from this figure that the sum throughput exhibits a declining trend with ε PS2IRS for the IRS assisted schemes, since a larger-scale fading between the PS and the IRS will result in a weaker energy signal reflected from the IRS, diminishing its benefits. Moreover, the proposed schemes have a significantly better performance than all benchmark schemes in terms of sum throughput. Specifically, the FTA can achieve a very close performance to the proposed schemes for a larger region of the path loss exponent ε PS2IRS , which demonstrates that the optimal time allocation τ 0 of the proposed schemes approaches 0.5 at this point. Since the IRS is not deployed in the traditional WPSN, its sum throughput remains constant with ε PS2IRS . Fig.  9 depicts the sum throughput versus the path loss exponent between the IRS and the IoT devices, i.e., ε is denoted by ε IRS2D . Interestingly, similar trends and arguments from Fig.  8 can be also observed here in terms of the sum throughput, which has been omitted due to space limitation. Fig. 10 depicts the sum throughput versus the path loss exponent between the IRS and the AP, i.e., ε is denoted by ε IRS2AP , which studies the information reflection of the reflecting link from the IRS to the AP. A slight throughput decreases is observed from this figure for the proposed schemes, which outperform their counterparts, i.e., RPS, FTA and ETA. This demonstrates that the information reflection of the IRS has a slight impact on the sum throughput due to large-scale fading and attenuation of the information signal transmitted by the energy harvested IoT devices. Finally, we evaluate the impact of the x-coordinate of the IRS (denoted by X IRS ) and the IoT devices (denoted by X U ) on the sum throughput in Fig. 11 and 12 11, we plot the sum throughput versus the x-coordinate of the IRS, i.e., X IRS . It is apparent from this figure that the sum throughput first increases and then decreases with X IRS . This illustrates that the optimal deployment of the IRS effectively improves the energy collection at the IoT devices so as to maximize the information reception at the AP. Fig. 12 shows the sum throughput versus x-coordinate of the IoT devices, i.e., X U . The PS and AP are located (−5, 0, 0) and (5, 0, 0) for convenience and without loss of generality. As seen in this figure, the sum throughput first decreases and then increases for each scheme. This illustrates that the IoT devices should be deployed either in the proximity to the AP or to the PS, resulting in a higher sum throughput.

V. CONCLUSION
In this paper, we maximize the sum throughput of an IRS assisted WPSN by optimally designing the energy beamforming, the phase shifts of the WET and WIT phases and the transmission time allocation. We first derive the optimal phase shifts of the WIT phase in closed-form. Then, the AO algorithm was applied to alternately solve the sum throughput maximization problem. Specifically, the SDP relaxation scheme was adopted to alternately design the energy beamforming and the phase shifts of the WET phase, respectively. In addition, a low complexity scheme was proposed to derive the optimal energy beamformer, the phase shifts of WET phase and the time allocation in closed-form. Numerical results were presented to quantify the sum throughput gains of the proposed algorithm in comparison to the several benchmarks. For future work, it is interesting to investigate robust designs for the IRS assisted WPSN, where the imperfect cascaded CSIs of the PS-IRS-IoT device and IoT device-IRS-AP channels are unknown. These cascaded CSI uncertainties follow the bounded and statistical models, and the worst-case and outage probability robust beamforming designs may be adopted in the IRS assisted WPSN. However, these robust designs may demonstrate that a low complexity scheme is not feasible since it may not be possible to derive closed-form solutions of the phase shifts of the IRS, the transmission time allocation, and the energy beamforming.

APPENDIX
A. Proof of Theorem 1 To prove Theorem 1, we first need to solve an equivalent sub-problem. To proceed, it is easily verified that the throughput at the AP from the k-th device R k is monotonically increasing with respect to |h k Θ k h r + h d,k | 2 . Thus, solving problem (2) with respect to Θ k is equivalent to maximizing |h k Θ k h r + h d,k | 2 , for ∀k ∈ [1, K], each of which only relies on Θ k with |exp (jα k,n )| = 1 and α k,n ∈ [0, 2π]. Thus, we solve the following sub-problem with respect to Θ k , ∀k ∈ [1, K], instead of solving (2) In order to solve (30), its objective function can be equivalently modified as where b k = diag(h k )h r , θ k = [θ k,1 , ..., θ k,N R ] = [exp(jα k,1 ), ..., exp(jα K,N R )], |θ k (n)| = 1, ∀k ∈ [1, K], n ∈ [1, N R ]. To proceed, we apply the following triangle inequality [17], [28] where b k (n) is the n-th element of b k and the equality holds with |θ k,n | = 1 for n ∈ [1, N R ]. We obtain the upper bound in (32) via α k,n = arg(h d,k ) − arg (b k (n)) and θ k,n = exp(jα k,n ), where arg(·) is the the phase operator. The optimal solution to problem (30) is denoted by θ * k , and equivalently the optimal phase shift matrix Θ * k is found from θ * k .

B. Proof of Proposition 1
By applying a few basic mathematical manipulations, the term |h k Θ k h r + h d,k | 2 is further equivalent to From (33), it is easily verified that |h k Θ k h r + h d,k | 2 achieves its maximum value if This means that the phases of the direct and cascaded links between the k-the IoT device and the AP are identical, i.e., arg(h d,k ) = arg(h k Θ k h r ), thus, (4) holds. This completes the proof of Proposition 1.

C. Proof of Lemma 1
First, the objective function (6a) is the sum of logarithm functions, i.e., τ k log 1 +t , each of which preserves its concavity with respect to τ and V 0 since it is the perspective function of the concave function log 1 +t k Tr g kg H k V 0 . In addition, all the constraints (6b) and (2b) are affine with τ and V 0 . We have completed the proof of Lemma 1.

D. Proof of Lemma 2
For given τ , we consider the following problem It is observed that (34a) is a logarithmic function which is concave but non-linear. To linearize it, we take into consideration a successive convex approximation (SCA) to transform (34a) into a series of linear programming (LP) as follows where V (m) 0 denotes the optimal solution to (35) at the m-th iteration. By exploiting [47], it is easily verified that V (m+1) 0 can be obtained by iteratively solving (35) which yields a rankone solution at each iteration. Thus, the optimal solution to problem (6), denoted by V * 0 , always returns a rank-one matrix. This completes the proof of Lemma 2.

F. Proof of Theorem 2
It is easily verified that (17a) is an logarithmic function which is increasing with respect to the term Tr GG H W , thus, the optimal solution to problem (17) is equivalent to solving the following problem max W 0 Tr G H WG , s.t. Tr (W) ≤ P 0 .
Due to the SVD in (41), ḡ 1 2 is the maximum for all terms ḡ m 2 if and only ifũ 1 is also the first column of UG, i.e., u 1 is equivalent to u 1 , which is also known as the eigenvector associated with the maximum eigenvalue ofGG H , denoted by ρ 1 . Thus, the optimal solution to problem (37) is given by W * = P 0 ν max GG H ν max GG H H , which completes the proof of Theorem 2.

G. Proof of Theorem 3
In order to prove Theorem 19, we first rewrite the objective function in (18)  We take the first-order derivative of f (τ 0 ) with respect to τ 0 and set it to zero, is equivalently written as After a series of mathematical manipulations, (44) is equivalent to (44) ⇒ log x exp (1) exp log x exp(1) = P 0 ρ max GG H − 1 exp (1) .
By exploiting the Lambert W function, i.e.,x exp(x) =ȳ ⇒ x = W(ȳ), From (46), the optimal time allocation can be easily obtained in (19), which completes the proof of Theorem 3.


CrisisBERT: A Robust Transformer for Crisis Classification and Contextual Crisis Embedding

Classification of crisis events, such as natural disasters, terrorist attacks and pandemics, is a crucial task to create early signals and inform relevant parties for spontaneous actions to reduce overall damage. Despite crisis such as natural disasters can be predicted by professional institutions, certain events are first signaled by civilians, such as the recent COVID-19 pandemics. Social media platforms such as Twitter often exposes firsthand signals on such crises through high volume information exchange over half a billion tweets posted daily. Prior works proposed various crisis embeddings and classification using conventional Machine Learning and Neural Network models. However, none of the works perform crisis embedding and classification using state of the art attention-based deep neural networks models, such as Transformers and document-level contextual embeddings. This work proposes CrisisBERT, an end-to-end transformer-based model for two crisis classification tasks, namely crisis detection and crisis recognition, which shows promising results across accuracy and f1 scores. The proposed model also demonstrates superior robustness over benchmark, as it shows marginal performance compromise while extending from 6 to 36 events with only 51.4% additional data points. We also proposed Crisis2Vec, an attention-based, document-level contextual embedding architecture for crisis embedding, which achieve better performance than conventional crisis embedding methods such as Word2Vec and GloVe. To the best of our knowledge, our works are first to propose using transformer-based crisis classification and document-level contextual crisis embedding in the literature.

Introduction
Crisis-related events, such as earthquakes, hurricanes and train or airliner accidents, often stimulate a sudden surge of attention and actions from both media and the general public. Despite the fact that crises, such as natural disasters, can be predicted by professional institutions, certain events are first signaled by everyday citizens, i.e., civilians. For instance, the recent COVID-19 pandemics was first informed by general public in China via Weibo, a popular social media site, before pronouncements by government officials.
Social media sites have become centralized hubs that facilitate timely information exchange across government agencies, enterprises, working professionals and the general public. As one of the most popular social media sites, Twitter enables users to asynchronously communicate and exchange information with tweets, which are mini-blog posts limited to 280 characters. There are on average over half a billion tweets posted daily [1]. Therefore, one can leverage on such high volume and frequent information exchange to expose firsthand signals on crisis-related events for early detection and warning systems to reduce overall damage and negative impacts.
Event detection from tweets has received significant attention in research in order to analyze crisis-related messages for better disaster management and increasing situational awareness. Several recent works studied various natural crisis events, such as hurricanes and earthquakes, and artificial disasters, such as terrorist attacks and explosions [2,3,4,5].
These works focus on binary classifications for various attributes of crisis, such as classifying source type, predicting relatedness between tweets and the crises, and assessing informativeness and applicability [6,7,8]. On the other hand, several works proposed multi-label classifiers on affected individuals, infrastructure, casualties, donations, caution, advice, etc. [9,10]. Crisis recognition tasks are likewise conducted such as identifying crisis types, i.e. hurricanes, floods and fires [11,12].
Machine Learning-based models are commonly introduced in performing the above mentioned tasks. Conventional linear models such as Logistic Regression, Naive Bayes and Support Vector Machine (SVM) are reported for automatic binary classification on informativeness [13] and relevancy [8], among others. These models were implemented with pre-trained word2vec embeddings [14]. Several unsupervised approaches are also proposed for classifying crisis-related events, such as the CLUSTOP algorithm utilizing Community Detection for automatic topic modelling [15]. A transfer-learning approach is also proposed [16], though its classification is only limited to two classes. The ability for cross-crisis evaluation remains questionable.
More recently, numerous works proposed Neural Networks (NN) models for crisis-related data detection and classification. For instance, ALRashdi and O'Keefe investigated two deep learning architectures, namely Bidirectional Long Short-Term Memory (BiLSTM) and Convolutional Neural Networks (CNN) using domain-specific and GloVe embeddings [17]. Nguyen et al. propose a CNN-based classifier with Word2Vec embedding pretrained on Google News [14] and domain-specific embeddings [18]. Lastly, parallel CNN architecture was proposed to detect disaster-related events using tweets [19,20].
While prior works report remarkable performance on various crisis classification tasks using NN models and word embeddings, no studies are found to leverage the most recent Natural Language Understanding (NLU) techniques, such as attention-based deep classification models [21] and document-level contextual embeddings [22], which reportedly improve state-of-the-art performance for many challenging natural language problems from upstream tasks such as Named Entity Recognition and Part of Speech Tagging, to downstream tasks such as Machine Translation and Neural Conversation.

Main Contributions
This work focuses on deep attention-based classification models and document-level contextual representation models to address two important crisis classification tasks. We study recent NLU models and techniques that reportedly demonstrated drastic improvement on state-of-the-art and localize for domain-specific crisis related tasks.
Overall, our main contribution of this work includes: • proposing CrisisBERT, an attention-based classifier that improves state-of-the-art performance for both crisis detection and recognition tasks; • demonstrating superior robustness over various benchmarks, where extending CrisisBERT from 6 to 36 events with 51.4% of additional data points only results in marginal performance decline, while increasing crisis case classification by 500%; • proposing Crisis2Vec, a document-level contextual embedding approach for crisis representation, and showing substantial improvement over conventional crisis embedding methods such as Word2vec and GloVe . . .
To the best of our knowledge, this work is the first to propose a transformer-based classifier for crisis classification tasks. We are also first to propose a document-level contextual crisis embedding approach.

Attention-based Neural Crisis Classifier
In this section, we discuss the recent works that propose various machine learning approaches for crisis classification tasks. While these works report substantial improvement in performance over prior works, none of the works uses state of the art attentionbased models, i.e., Transformers [21], to perform crisis classification tasks. We propose CrisisBERT, a transformer-based architecture that builds upon a Distilled BERT model, fine-tuned by large-scale hyper-parameter search.

Conventional Crisis classifiers
Various works propose linear classifiers for crisis-related events. For instance, Parilla-Ferrer et al. proposed an automatic binary classification, based on informative and uninformative tweets using Naive Bayes and Support Vector Machine (SVM) [13]. A SVM with pretrained word2vec embeddings approach was also proposed [14].
Besides linear models, recent works also propose deep learning based methods with different neural network architectures. For instance, ALRashdi and O'Keefe investigated Bidirectional Long Short-Term Memory (BiLSTM) and Convolutional Neural  figure) and passed into a DistrilBERT model. Since we are performing classification task, the CLS token vector, i.e. the first output vector, is then passed into a linear classifier for detection or recognition task, whereas the remainder of the output vectors are average-pooled to create Crisis2Vec embeddings.
Network (CNN) models using domain-specific and GloVe embeddings [23]. Nguyen et al. proposed a CNN model to classify tweets to get information types using Google News and domain-specific embeddings [18].

Transformer
In 2017, Vaswani et al. from Google introduced Transformer [21], a new category of deep learning models which are solely attention-based and without convolution and recurrent mechanisms. Later, Google proposed the Bidirectional Encoder Representations from Transformers (BERT) model [24] which drastically improved state-of-the-art performance for multiple challenging Natural Language Processing (NLP) tasks. Since then, multiple transformer-based models have been introduced, such as GPT [25] and XLNet [26], among others. Transformer-based models were also deployed to solve domain specific tasks, such as medical text inferencing [27] and occupational title embedding [28], and demonstrated remarkable performance.
The Bidirectional Encoder Representation of Transformer (BERT), for instance, is a multi-layer bidirectional Transformer en-coder with attention mechanism [24]. The proposed BERT model has two variants, namely (a) BERT Base, which has 12 transformer layers, a hidden size of 768, 12 attention heads, and 110M total parameters; and (b) BERT Large, which has 24 transformer layers, a hidden size of 1024, 16 attention heads, and 340M total parameters. BERT is pre-trained with self-supervised approaches, i.e., Masked Language Modeling (MLM) and Next Sentence Prediction (NSP).
While Transformers such as BERT are reported to perform well in natural language processing, understanding and inference tasks, to the best of our knowledge, no prior works propose and examine the performance of transformer-based models for crisis classification.

CrisisBERT
In this work, we investigate the transformer approach for crisis classification tasks and propose CrisisBERT, a transformer-based classification model that surpasses conventional linear and deep learning models in performance and robustness.   [29], optimizers, learning rates, and batch sizes. Table 1 shows the breakdown of the search space and the final hyper-parameters for CrisisBERT. Each set of parameters is randomly chosen and ran with 3 epochs and two trials. In total, we evaluate over 300 hyper-parameters sets using a Nvidia Titan-X (Pascal) for over 1,000 GPU hours.
Taking into consideration of performance and efficiency trade-off, we select the DistilBERT model for our Transformer LM layer. DistilBERT is a compressed version of BERT Base through Knowledge Distillation. With utilization of only 50% of the layers of BERT, DistilBERT performs 60% faster while preserving 97% of the capabilities in language understanding tasks. The optimal set of hyper-parameters for DistilBERT includes an AdamW [30] optimizer, and initial learning rate of 5e-5, and a batch size of 32.
Output Layer. The output layer of DistilBERT LM is a set of 768-d vectors led by the class header vector. Since we are conducting classification tasks, only the [CLS] token vector is used as the aggregate sequence representation for classification with a linear classifier. The remainder of the output vectors are processed into Crisis2Vec embeddings using Mean-Pooling operation.

Crisis2Vec
As discussed in Section 2.3, Crisis2Vec embedding is a byproduct of CrisisBERT, where the embeddings are constructed based on a pre-trained BERT model, and subsequently fine-tuned with three corpora of crisis-related tweets [6,31,32] to be domain-specific for crisis-related tweet representation.
Crisis2Vec leverages the advantages of Transformers, including (1) leveraging a self-attention mechanism to incorporate sentencelevel context bidirectionally, (2) leveraging both word-level and positional information to create contextual representation of words, and (3) taking advantage of the pre-trained models on large relevant corpora.
To the best of our knowledge, we are the first who propose a document-level contextual embedding approach for crisis-related document representation. Upon convergence, we construct the fixed-length tweet vector using a MEAN-Pooling strategy [22], where we compute the mean of all output vectors, as illustrated in Algorithm 1.

Crisis Classification
In this work, we conduct two crisis classification tasks, namely Crisis Detection and Crisis Recognition. We formulate the Crisis Detection task as a binary classification model that identifies if a tweet is relevant to a crisis-related event. The Crisis Recognition task on the other hand extends the problem into multi-class classification, where the output is a probability vector that indicate the likelihood of a tweet indicating specific events. Both tasks are modelled as Sequence Classification problems that are formally defined below.

Crisis Detection
We define the Crisis Detection task D = (S, Φ), which is specified by S = {s 1 , ..., s n } a finite sample space of tweets with size n. Each sample s i is a sequence of tokens at T time steps, i.e., s i = {s 1 i , ..., s T i }. Φ denotes the set of labels that has the same sequence as the sample set, Φ = {φ 1 , ..., φ n } and φ i ∈ {0, 1} where φ i = 1 indicates that sample s i is relevant to crisis, and φ i = 0 indicates otherwise. A deterministic classifier C D : S → φ specifies the mapping from sample tweets to their flags.
Our objective is to train a crisis detector using the provided tweets and labels that minimizes the differences between predicted labels and true labels, i.e., where J D denotes some cost function.

Crisis Recognition
Similarly, we define a Crisis Recognition task R = (S, L), where sample space S is identical to that in Crisis Detection. L denotes a sequence of multi-class labels that have the same sequence as S, i.e., L = {l 1 , ..., l n }, and l i ∈ R m for m number of classes. A deterministic classifier C R : S → L specifies the mapping from the sample tweets to the crisis classes.
The objective of the crisis classification tasks is to train a sequence classifier using the provided tweets and labels that minimizes the differences between predicted labels and true labels, i.e., where J R denotes some cost function for classifier C R .

Experiments and Results
In this section, we discuss the experiments performed and their results in order to propose a highly effective and efficient approach for text classification.

Datasets
Three datasets of labelled crisis-related tweets [6,31,32] are used to conduct crisis classification tasks and evaluate the proposed methods against benchmarks. In total, these datasets consist of close to 8 million tweets, where overall 91.6k are labelled. These data sets are in the form of: (1) 60k labelled tweets on 6 crises [6], (2) 3.6k labelled tweets for 8 crises [32], and (3) 27.9k labelled tweets for 26 crises [31]. Table 2 describes more detail about each dataset and their respective classes.
For our experimental evaluation, the 91.6k labelled crisis-related tweets are organized into two datasets, annotated as C6 and C36. In particular, C6 consists of 60k tweets from 6 classes of crises, whereas C36 comprises all 91.6k tweets in 36 classes. Both datasets are split into training, validation and test sets that consist of 90%, 5% and 5% of the original sets, respectively.

Proposed Models
CrisisBERT. We evaluate the performance of CrisisBERT against multiple benchmarks, which comprise recently proposed crisis classification models in the literature. These works include linear classifiers, such as Logistic Regression (LR), Support Vector Machine (SVM) and Naive Bayes [33], and non-linear neural networks, such as Convolutional Neural Network (CNN) [20] and Long Short-Term Memory [34].
Furthermore, we investigate the robustness of CrisisBERT for both detection and recognition tasks. This is achieved by extending the experiments from C6 to C36, which comprise 6 and 36 classes respectively, but with only 51.4% additional data points. We evaluate the robustness of the proposed models against benchmarks by observing the compromise in robustness performance, while realizing the drastically improved classification performance.
As described in Section 2.3, we use the optimal set of hyper-parameters for CrisisBERT in the experiments, which include the use of a BERT model with distillation (i.e. DistilBERT), an AdamW [30] optimizer, an initial learning rate of 5e-5, a batch size of 32, and a word dropout rate of 0.25.
Crisis2Vec. To evaluate Crisis2Vec, we choose the two classifiers with the aim to represent both traditional Machine Learning approaches and the NN approaches. The two selected models are: (1) a linear Logistic Regression model, denoted as LR c2v , and (2) a non-linear LSTM model, denoted as LST M c2v . We evaluate the performance of Crisis2Vec with the two models by replacing the original embedding to Crisis2Vec, ceteris paribus.

Metrics
We use two common evaluation metrics, namely Accuracy and F1 score, which are functions of True-Positive (TP), False-Positive (FP), True-Negative (TN) and False-Negative (FN) predictions. Accuracy is calculated by: For a F1-score of multiple classes, we calculate the unweighted mean for each label, i.e., for n classes of labels as: where P recision = T P T P + F P and Recall = T P T P + F N

Benchmark Algorithms
We select and implement several crisis classifiers proposed in recent works to serve as benchmarks for evaluating our proposed methods. Concretely, we compare CrisisBERT with the following models: • LR w2v : Logistic regression model with Word2Vec embedding pre-trained on Google News Corpus [33] • SV M w2v : Support Vector Machine model with Word2Vec embedding pre-trained on Google News Corpus [33] • N B w2v : Naive Bayes model assuming Gaussian distribution for features with Word2Vec embedding pre-trained on Google News Corpus [33] • CN N gv : Convolutional Neural Network model with 2 convolutional layers of 128 hidden units, kernel size of 3, pool size of 2, 250 filters, and GloVe for word embedding [20] • LST M w2v : Long Short-Term Memory model with 2 layers of 30 hidden states and a Word2Vec-based Crisis Embedding [34] Models

Results
Overall, the experimental results show that both proposed models achieve significant improvement on performance and robustness over benchmarks across all tasks. The experimental results for CrisisBERT and Crisis2Vec are tabulated in Table 4. Robustness. Comparing Crisis Detection task between C6 and C36, CrisisBERT shows 1.7% and 1.3% decline for F1-score and Accuracy, which is much better than most benchmarks, i.e., from 1.7% to 6.3%, except CNN. However, when we compare the more challenging Crisis Recognition tasks between C6 and C36, the performance of CrisisBERT compromises marginally, i.e., 1.6% for F1-score and 0.7% for Accuracy. On the contrary, all benchmark models record significant decline, i.e. from 6.0% to 67.2%.
Discussion. Based on experimental results discussed above, we observe that: (1) CrisisBERT's performance exceeds state-of-theart performance for both detection and recognition tasks, with up to 8.2% and 25.0% respectively, (2) CrisisBERT demonstrates higher robustness with marginal decline for performance (i.e. less than 1.7% in F1-score and Accuracy), and (3) Crisis2Vec shows superior performance as compared to conventional Word2Vec embeddings, for both LR and LSTM models across all experiments.
5 Related Work

Crisis Classification
Event detection from tweets has received significant attention in research in order to analyze crisis-related messages for better disaster management and increasing situational awareness [4,5,2,3]. Parilla-Ferrer et al. proposed automatic binary classification of informativeness using Naive Bayes and Support Vector Machine (SVM) [13]. Stowe et al. presented an annotation scheme for tweets to classify relevancy and six [8]. Furthermore, use of pre-trained word2vec reportedly improved SVM for Crisis classification [14]. Lim et al. proposed CLUSTOP algorithm utilizing the community detection approach for automatic topic modelling [15]. Pedrood et al. proposed to transfer-learn classification of one event to the other using a sparse coding model [16], though the scope was only limited to only two events, i.e. Hurricane Sandy (2012) and Supertyphoon Yolanda (2013).
A substantial number of works focusses on usign Neural Networks (NN) with word embeddings for crisis-related data classification. Manna et al. [33] compared NN models with conventional ML classifiers [33]. ALRashdi and O'Keefe investigated and showed good performance for two deep learning architectures, namely Bidirectional Long Short-Term Memory (BiLSTM) and Convolutional Neural Networks (CNN) with domain-specific GloVe embeddings [17]. However, the study had yet to validate the relevance of model on a different crisis type. Nguyen et al. applied CNN to classify information types using Google News and domain-specific embeddings [18]. Kersten et al. [20] implemented a parallel CNN to detect two disasters, namely hurricanes and floods, which reported a F1-score of 0.83. The CNN architecture was proposed earlier by Kim et al. [19].

Crisis Embedding
Word-level Embeddings such as Word2Vec [35] and GloVe [23] are commonly used to form the basis of Crisis Embedding [18,36] in various crisis classification works to improve model performance. For context, Word2Vec uses a Neural Network Language Model (NNLM) that is able to represent latent information on the word level. GloVe achieved better results with a simpler approach, constructing global vectors to represent contextual knowledge of the vocabulary.
More recently, a series of high quality embedding models, such as FastText [37] and Flair [38], are proposed and reported to have improved state of the art for multiple NLP tasks. Both word-level contextualization and character-level features are commonly used for these works. Pre-trained models on large corpora of news and tweets collections are also made publicly available to assist in downstream tasks. Furthermore, Transformer-based models are proposed to conduct sentence-level embedding tasks [22].

Conclusion
Social media such as Twitter has become a hub of crowd generated information for early crisis detection and recognition tasks. In this work, we present a transformer-based crisis classification model CrisisBERT, and a contextual crisis-related tweet embedding model Crisis2Vec. We examine the performance and robustness of the proposed models by conducting experiments with three datasets and two crisis classification tasks. Experimental results show that CrisisBERT improves state of the art for both detection and recognition class, and further demonstrates robustness by extending from 6 classes to 36 classes, with only 51.4% additioanl data points. Finally, our experiments with two classification models show that Crisis2Vec enhances classification performance as compared to Word2Vec embeddings, which is commonly used in prior works.


Optimization Research on Server Detection Based on RGB Maximum Mean Features and Deep Belief Network Model

The intelligent detection about the running state of server equipment in computer room is a very important research field. In general, the state recognition research of signal lamp mainly includes the color and shape characteristics of signal lamp, and machine learning models. At present, the research results in this respect are not ideal for the recognition of signal lamps, Due to the small size and high density of the detected server lamp source, its shape characteristics cannot be accurately obtained, and state information is difficult to be perceived. This paper proposes a RGBMM features algorithm and a DBN network model algorithm, which is different from the traditional signal state recognition algorithm. According to the characteristics of server signal lamp, the color state image data of signal lamp is extracted effectively by RGBMM features algorithm, then the DBN network model algorithm is used to evaluate and identify the sampled signals, so as to judge whether the server is working normally. The experimental results show that the state recognition accuracy of the signal lamp is up to 98%, while the recognition rate of the signal lamp color state image using HSV( ( Hue, Saturation, Value) ) transformation is 90.7%. The difference between the three is different the algorithms used. So the RGBMM features algorithm and the DBN network model algorithm have a wider use for the signal lamp color status recognition.

Introduction
In the more and more intelligent power system, it is very important to design a detection system that can monitor the running state of each equipment in real time and accurately. It is very important to design a set of inspection system which can monitor the running status of each equipment in time and accurately.At present, the research of signal lamp state recognition mainly includes two aspects: (1)The color and shape characteristics of the signal lamp, The main research results are color spaces based on HSV [1] , RGB (Red，Green, Blue) [2] , HIS (Hue-Saturation-Intensity) [3] 2 Salti et al. [4] have researched and developed a set of traffic lamp detection and recognition system, which adopts the method of extracting RGB color feature data in the effective area of the signal lamp state image, but the effect of color detection and recognition is not very good.; (2) The machine learning mode used by the signal lamp. For example, Qian H et al [5] proposed a fast detection and recognition algorithm of traffic lamps based on deep learning aiming at the technical difficulties such as the minimum proportion of the images in the detection data set.
Using the different color, direction, and shape information of traffic lamps, we can detect the status of traffic lamps [6] . However, due to the impact of server size, the server signal lamp is small and dense, and the shape features cannot be obtained, so it is more difficult to perceive its state information. The inspection system of the information machine room developed by State Grid Lishui company needs manual collection for the detection data of the equipment lamp Status, and then the background system is used for intelligent analysis, so the work intensity of personnel is high and the efficiency is low. At present, Comprehensive recognition method [7] are still used for traffic signal lamp identification, with low accuracy.
We designed a set of the safety intelligent inspection system of the signal lamp status detection.. The algorithm to extract the color state image information of the signal lamp adopts the RGBMM (RGB maximum mean value) feature algorithm. The algorithm to classify and recognize in the signal lamp image is the DBN (depth confidence network) algorithm, and these two algorithms are embedded in the hardware system. A large number of experimental data prove the effectiveness of this method,the accurate recognition rate of the sigal lamp state processed by the combination of these two algorithms can reach more than 98%.

Extraction of RGBMM Features of Signal Lamp State Image
The operation of the server equipment in the machine room is indicated by the green, red and yellow lamps on the server. The green lamp represents the normal operation of the equipment, the red lamp represents the failure of the equipment, and the yellow lamp represents the equipment to be inspected. Therefore, the on and off of the three color lamps are the main indicators to judge the operation of the equipment. Because these three kinds of signal lamps on the server are small and lamp-emitting, they will interfere with the images taken by the industrial camera; on the other hand, the reason why an image cannot be focused is interfered by multiple signal lamps, and the color of the image is affected by the external lamp, so it is difficult to obtain accurate signal lamp status information from the image. At present, the HSV color space, HIS color space eigenvalue, RGB eigenvalue and color histogram algorithms for the recognition of the status information of the signal lamp have many shortcomings. Therefore, the RGBMM feature algorithm proposed in this paper is more accurate and effective in extracting the state information of signal lamp. After the signal lamp image denoising, the data extraction process of RGBMM feature algorithm is as follows: (1)Using Kalman tracking algorithm [8] , pixel points are extracted by segmentation of a signal color region of interest(ROI), (2)The software system calculates the number of ROI pixels and reads the R, G, and B binary luminance values of each pixel (data range 0-255).
(3)The RGB three primary colors luminance values of each pixel are arranged in order from large to small. The luminance maxima of the first 20% RGB three primary colors in RGB arrangement are read and stored in RM, GM and BM maxima sequences respectively.
(4)The RGB average value of RM, GM, BM maxima sequence is calculated and recorded as R Ma , G Ma and B Ma respectively.
(5)Using the maximum average value of R Ma , G Ma and B Ma , the RGB maximum ratio of the ROI is calculated, which is recorded as MR r , MR g and MR b respectively

Get Input Data Set
The experiment is carried out in the information room of a power supply company, which is equipped with 50 sets of cabinets of various types. The signal lamp identification system which completes the patrol inspection function mainly includes the track, the rail car, the platform installed on the rail car and the industrial camera fixed on the top of the machine room. During the experiment, the platforms first received the signal lamp automatic inspection instruction, and then the industrial camera captured 89 server image photograghs with the cloud platforms moving freely in orbit. The segmented signal lamp image photographs are different in distance, brightness, color and size, which are in line with the actual inspection situation. Kalman tracking algorithm is used to separate and extract data from the interested signal lamp color state image area. In a single segmented signal lamp image,200 green lamp images,200 red lamp images and 200 blue lamp images are randomly selected as training samples,and their RGBMM eigenvalues are extracted as the initial training data set for DBN pre training. In addition, 100 green, red and yellow lamp images are selected to extract the RGBMM eigenvalues, which are then used as test samples.According to the RGBMM images of green, red and yellow lamps, it is found that the average values of MR g , MR r and MR b of green lamp images are 0.4840.0048, 0.3110.0031 and 0.2050.0021, respectively, and the maximum mean values of red, green and blue of RGBMM of green lamp images are quite different; the average values of MR g , MR r and MR b of red lamp images are 0.330.0033,and the difference among the mean values of red, green and blue is small; the average value of MR g and MR r of yellow lamp image is about 0.360.036, and the difference between the average values of red and green base color is small, but the average value of MR b is 0.2690.027, and the average value of blue base color is obviously different from that of red green base color. Therefore, the distribution of RGBMM average of red, green and yellow lamp images is obviously different. It is easy to distinguish these three kinds of images by using RGBMM features. [12][13] The MR r , MR g and MR b of the red, green and yellow lights calculated by the RGBMM feature algorithm are used as the input nodes of DBN. Since the DBN model is used to evaluate the recognition image state, the number of output nodes is set to 1. The number of hidden nodes in the DBN model determines the ability to obtain useful information. In general, too few hidden nodes cannot give the data model, and too many hidden nodes may over fit the data, resulting in the deterioration of the final evaluation performance, The number of initial training data sets for DBN pre training is 120 , RMB structure adopts 3layers, according to the structure characteristics of DBN, the architecture of the DBN model is set to DBN1[3;100,100,50,10;1].Then we input the training input data set into the DBN pre-training model,and input the test data set into the DBN pre-training model for detection , we get a clear and stable detection result image, as shown in Figure1. By observing the RGBMM detection result image shown in Figure 2, it is found that the DBN evaluation value of the green lamp sample is stable near 0.8, the DBN evaluation value of the red lamp sample is stable near 0.4, and the DBN evaluation value of the yellow lamp is stable near 0.5, and the DBN evaluation value of the three types of images is significantly different. Therefore, according to the evaluation value of the DBN model, the color of signal lamp can be accurately identified.  By analyzing the small red circle mark in Figure 7, it is found that there are two samples in the green lamp area, one sample in the red lamp area, and three samples in the yellow lamp area, totally six samples are not accurately identified, accounting for about 1% of the sample number, that is, 99% of the samples can be accurately identified.

Discussion
In order to further prove the superiority of the method based on the RGBMM feature and DBN network model to the recognition of the signal lamp, the experiments of the combination of the RGBMM feature with the HSV feature and the combination of the RGBMM feature with the hidden Markov model (HMM) are carried out respectively, and a comparative study is carried out.
HSV (hue, saturation, and brightness) color space is an intuitive color model close to human visual perception, which is widely used in image classification and recognition. However, there is no significant difference in the state representation of different signal lamp images in HSV space, so extracting the mean and variance of H and s features can be used for image recognition. After analyzing a group of experimental data, the structure of DBN model with HSV color space feature is DBN2[4;100,100,50,10;1]. Through the analysis of the detected image results (as shown in Figure 5), it is found that the DBN evaluation value of the green lamp area image is in the [0.6,0.9] range, and the recognition accuracy of the green lamp image can reach about 93%; the DBN evaluation values of the yellow lamp and red lamp area image are in the [0.9,1.2] range(as shown in Figure 6), so the yellow lamp and red lamp image samples cannot be recognized by the DBN model. The experimental results show that the server detection method based on RGBMM features and DBN network model has the ability of fast and accurate recognition of the color state of the signal lamp.

Conclusion
We have developed a set of intelligent detection system algorithm for server equipment in the computer room. The core of this algorithm is the algorithm of signal state image recognition -RGBMM feature combined with the DBN network model algorithm. Firstly, the input data of feature training is obtained by using rgbmm features, and then the acquired DBN network model is used to evaluate and classify the signal lamp images. Compared with the HSV color space feature combined with the DBN model, the algorithm is proved to be effective and can be used to detect the running state of the server room. In future research, we need to optimize the algorithm to make it faster and more accurate for the on-line detection of the signal lamp state image.