# STARS-ISAC: How Many Sensors Do We Need?

Zheng Zhang, , Yuanwei Liu, ,
Zhaolin Wang, , Jian Chen Zheng Zhang and Jian Chen are with the School of
Telecommunications Engineering, Xidian University, Xi’an 710071, China
(e-mail<EMAIL_ADDRESS>jianchen@mail.xidian.edu.cn). Yuanwei
Liu and Zhaolin Wang are with the School of Electronic Engineering and
Computer Science, Queen Mary University of London, London E1 4NS, U.K.
(e-mail<EMAIL_ADDRESS>zhaolin.wang@qmul.ac.uk;).

###### Abstract

A simultaneously transmitting and reflecting surface (STARS) enabled
integrated sensing and communications (ISAC) framework is proposed, where a
novel bi-directional sensing-STARS architecture is devised to facilitate the
_full-space_ communication and sensing. Based on the proposed framework, a
joint optimization problem is formulated, where the
Cram$\acute{\text{e}}$r-Rao bound (CRB) for estimating the 2-dimension
direction-of-arrival of the sensing target is minimized. Two cases are
considered for sensing performance enhancement. 1) For the two-user case, an
alternating optimization algorithm is proposed. In particular, the maximum
number of deployable sensors is obtained in the closed-form expressions. 2)
For the multi-user case, an extended CRB (ECRB) metric is proposed to
characterize the impact of the number of sensors on the sensing performance.
Based on the proposed metric, a novel penalty-based double-loop (PDL)
algorithm is proposed to solve the ECRB minimization problem. To tackle the
coupling of the ECRB, a general decoupling approach is proposed to convert it
to a tractable weighted linear summation form. Simulation results reveal that
1) the proposed PDL algorithm can achieve a near-optimal performance with
consideration of sensor deployment; 2) without violating the communication
under the quality of service requirements, reducing the receive antennas at
the BS does not deteriorate the sensing performance; and 3) it is preferable
to deploy more passive elements than sensors in terms of achieving optimal
sensing performance.

###### Index Terms:

Beamforming design, integrated sensing and communications (ISAC),
simultaneously transmitting and reflecting surface (STARS), sensor deployment.

##  I Introduction

With the commercialization of the fifth generation (5G) wireless networks, the
2030-oriented sixth generation (6G) wireless communication systems drew
growing attention in both academia [1] and industry [2, 3]. 6G seeks a
fundamental paradigm shift in wireless network architecture, which breaks the
physical boundaries of sensing and communications to support more emerging
applications, such as extended reality (XR), auto-driving, and Metaverse. To
realize this vision, a key enabling technique, integrated sensing and
communication (ISAC), has been proposed to unify the two functions via the
same hardware platform and signal processing module [4, 5]. To elaborate,
through the dedicated co-designed framework, ISAC is capable of significantly
enhancing the utilization efficiency of the network resources, thereby
resulting in low implementation overheads. Furthermore, through deep
integration, ISAC is also envisioned to realize mutual assistance and win-win
benefit between the two functions [6].

To provide ubiquitous wireless connection with low energy consumption,
reconfigurable intelligent surface (RIS) has emerged as another promising and
cost-effective technique for future wireless networks [7, 8]. Technically, RIS
can be regarded as a metasurface-based planar array, which is composed of lots
of passive tunable elements. The electromagnetic response at each element can
be proactively adjusted via an external smart controller, which aims to
reconfigure the amplitude and phase shifts of the incident signal and thus
realize a smart radio environment. However, since the conventional RIS can
merely reflect the incident signals and provide half-space coverage, the
design flexibility is stringently limited by its geographical location and
panel orientation. As a remedy, a new RIS paradigm, namely simultaneously
transmitting and reflecting surface (STARS), has been proposed [10, 9].
Compared to the conventional reflecting-only RIS, STARS can provide _full-
space_ electromagnetic environment reconfiguration [11].

###  I-A Prior Works

There have been lots of efforts devoted to the ISAC networks [12, 13, 14, 15,
16]. More specifically, the authors of [12] devised a pair of antenna setups
for multi-antenna ISAC systems, where a high-accuracy beampattern strategy is
proposed to improve the sensing performance while guaranteeing the
communication requirements. As a further advance, the authors of [13] proposed
the optimal sensing waveform strategies, where the performance tradeoff
between communication and sensing was investigated. To introduce more degrees-
of-freedom (DoFs) for target sensing, a sophisticated ISAC framework was
proposed in [14], where the independent radar waveforms and communication
symbols were exploited to form the multiple beams for high-quality sensing.
However, the aforementioned works only focused on the waveform design at the
transmitter while neglecting the sensing performance imposed by the received
echo at the receiver. To provide a comprehensive evaluation of the sensing
performance, the authors of [15] introduced the Cram$\acute{\text{e}}$r-Rao
bound (CRB) as the sensing performance metric of an unbiased estimation at the
receiver. Furthermore, the authors of [16] developed a fairness-oriented
unified resource allocation framework, where the BS was employed to carry out
the device-free sensing services while satisfying communication QoS demands.

More recently, it is claimed that the proper exploitation of RISs in ISAC
systems can further boost the sensing performance [17, 18, 19, 20, 21]. In
[17], the authors proposed a RIS-assisted ISAC framework, in which a RIS is
employed to establish reliable line-of-sight (LoS) links for distance and
velocity estimation. To support scenarios with multiple point-like targets,
the authors of [18] developed a majorization-minimization algorithm for target
tracking by collaboratively designing the transmit beampattern and RIS
coefficients. In [19], the authors conceived a joint optimization scheme
regarding the sensing waveform and the RIS coefficients from the perspective
of sensing mutual information. Considering the practical restriction of
discrete phase shifts, a constant-modulus sensing waveform was designed in
[20], in which the multi-user interference was minimized under the sensing CRB
constraint. In [21], the authors considered utilizing the RIS to provide
sensing services to the blind-zone target, where the CRB minimization problems
were investigated in the cases of point target and extended target,
respectively.

However, the direct combination of RIS and ISAC in the aforementioned works
inevitably increased the number of reflections experienced by the echo
signals, which restricted the sensing performance. To address this issue, the
authors of [22] pioneered a RIS-self-sensing architecture, where the dedicated
sensors are deployed at the RIS to carrying out the sensing functionality.
Shortly thereafter, the authors of [23] proposed a two-phase semi-passive RIS-
assisted ISAC scheme, where the RIS supported the uplink communications in the
first phase while carrying out the multi-user location sensing in the second
one. Exploiting the same semi-passive sensing-at-RIS architecture, the authors
of [24] studied the effect of sensing functionality on the communications,
where the RIS was employed to sense the user location to facilitate the
communication beamforming design. Most recently, there was a preliminary
exploration of STARS-enabled ISAC networks in [25], where a sensing-at-STARS
structure was proposed to achieve the 2-dimension direction-of-arrivals (DOAs)
estimation.

###  I-B Motivations and Contributions

Based on the aforementioned RIS-enabled ISAC works [17, 18, 19, 20, 21, 22,
23, 24, 25], we can obtain following two observations.

  * •

Although there have been a few works focusing on the RIS/STARS-enabled ISAC
systems, the communication users and/or targets are only considered to be
located on one side of the RIS/STARS111In the work [25], STARS is employed to
divide the whole space into the communication region and sensing region, where
the communication users and target are only situated on the corresponding
half-space region.. Whereas in the practical networks, the users and targets
are probably in different geographical positions at different times, even on
both sides of the RIS/STARS. Apparently, such a problem cannot be coped with
by the existing schemes, which thus calls for a more general strategy for the
RIS/STARS-enabled ISAC systems.

  * •

For the sensor-at-RIS/STARS architecture [22, 23, 24, 25], a critical
endogenous problem has not been answered yet, i.e., should we deploy more
sensors or passive elements (PEs) at the RIS/STARS? Given the fixed number of
total elements of the RIS/STARS, deploying more sensors can increase the echo
sampling resolution. Whereas deploying more PEs can introduce more spatial
DoFs to favor both communication and sensing performance. Hence, there may
exist a tradeoff between the number of sensors and PEs, which requires further
investigation.

Motivated by the above observations, we propose a STARS-enabled ISAC
framework, where the communication users and the targets are located on both
sides of the STARS, with a particular focus on the tradeoff between the number
of sensors and PEs. Our main contributions are summarized below.

  * •

We propose a novel bi-directional sensing-STARS architecture, where the micro-
sized sensors with encapsulated antennas are integrated into the transparent
substrate of STARS to provide full-space communication and sensing service. To
tackle the energy/signal leakage issue in uplink STARS transmissions, a time
switching (TS) protocol based two-phase scheme is proposed, where the STARS
periodically switches between the reflection and transmission modes to support
different users/targets. With this transmission framework, the closed-form CRB
expression is derived as the sensing performance metric for estimating the
2-dimension DOAs.

  * •

We first consider a two-user network. A CRB minimization problem is formulated
subject to the communication quality of service (QoS) constraint of the
ergodic achievable rate. To facilitate the optimization, the approximated
ergodic rate is derived in the closed-form expression. Then, we propose an
alternating optimization (AO) algorithm, where the optimal sensing waveform,
transmit power, and reflection/transmission coefficients are alternately
obtained by utilizing the standard semidefinite program (SDP) method. To
provide further insights, the maximum number of sensors that can be deployed
is derived in the closed-form expression, which unveils that the maximum
number of sensors is only relevant to the QoS requirements of communications.

  * •

We further consider a multi-user network, where a new metric of extended CRB
(ECRB) is proposed to transform the impact of the number of sensors on the
sensing accuracy into an explicit form. We aim to minimize the proposed ECRB
under the communication QoS requirements. To efficiently solve the formulated
mixed integer non-linear program (MINLP), a generic decomposing method is
devised to transform the non-convex objective function of the ECRB into a
weighted linear summation form of the constant ECRB matrices. Based on the
transformation, a penalty-based double-loop (PDL) algorithm is proposed to
solve the resultant non-convex optimization problem.

  * •

Numerical results demonstrate the effectiveness and convergence of the
proposed algorithms. It is also verified that the proposed PDL can enable a
near-optimal allocation of the number of sensors. Besides, two insights are
observed: 1) with the proposed bi-directional sensing-STARS architecture,
reducing the number of receive antennas at the BS does not deteriorate the
sensing performance provided that QoS requirements are satisfied; and 2) given
a fixed total number of STARS elements, deploying more PEs at the STARS is
more attractive than sensors in terms of sensing performance enhancement.

The organization of this paper is as follows. In Section II, we present the
system model and performance metrics. In Section III, we conceive an AO
algorithm to minimize CRB under the given number of sensors. Section IV
develops a PDL algorithm for the joint optimization of beamforming and the
number of sensors. The numerical results are illustrated in Section V.
Finally, the conclusion is presented in Section VI

Notations: we use the boldface capital $\mathbf{X}$ and lower-case letter
$\mathbf{x}$ to represent matrix and vector, respectively. For any $N\times
M$-dimensional matrix $\mathbf{X}\in\mathbb{C}^{N\times M}$, $\mathbf{X}^{T}$
and $\mathbf{X}^{H}$ denote the transpose and Hermitian conjugate operations.
Similarly, $\text{rank}(\mathbf{X})$, $\text{Tr}(\mathbf{X})$,
$\|\mathbf{X}\|$, $\|\mathbf{X}\|_{\text{F}}$ represent the rank value, trace
value, spectral norm operation and Frobenius norm operation.
$\mathbf{X}\succeq\mathbf{0}$ denotes that $\mathbf{X}$ is a positive
semidefinite matrix, while $\mathbf{x}\sim\mathcal{CN}(0,\mathbf{X})$ denotes
that $\mathbf{x}$ is a circularly symmetric complex Gaussian (CSCG) vector
with zero mean and covariance matrix $\mathbf{X}$. For a matrix $\mathbf{X}$,
$\text{vec}(\mathbf{X})$ and $\mathbf{X}^{-1}$ denote the vectorizing and
inverse matrix operation. For any vector $\mathbf{x}$,
$\text{diag}(\mathbf{x})$ denotes a diagonal matrix whose main diagonal
elements equal to the elements of $\mathbf{x}$. $|x|$ and $\|\mathbf{x}\|$
denote the modulus of $x$ and the Euclidean norm of the vector $\mathbf{x}$,
respectively. $\mathbb{E}($·$)$ is the statistical expectation operation.
$\mathbf{I}_{N}$ is a $N$-dimensional identity matrix, and $\mathbf{0}_{N}$ is
a $N$-dimensional zero matrix. $\Re(\cdot)$ and $\Im(\cdot)$ denote the real
component and imaginary component of the complex value. For any complex scalar
$z$, $\tilde{z}$ denotes the conjugate of $z$. For any real scalar
$x$,$\lfloor x\rfloor$ and $\lceil x\rceil$ denote the round-down and round-up
operations. $\odot$ denotes the Hadamard product.

##  II System Model

Figure 1: The bi-directional sensing-STARS enabled uplink ISAC network.

###  II-A Network Description

As shown in Fig. 1, we consider a STARS-enabled uplink ISAC network, where a
STARS is deployed to establish reliable LoS links for $K$ blind-zone users
$\\{\text{U}_{1},\cdots,\text{U}_{K}\\}$ to communicate with a BS while
relaying the probing signal intended for the targets
$\\{\text{T}_{1},\text{T}_{2}\\}$. The whole space is divided by the STARS
into two separate region, each of which contains a target requiring
estimation. It is assumed that the direct links of BS-users, users-targets,
and BS-targets channels are blocked due to the obstacles. To mitigate the
full-duplex self-interference at the BS, the BS is assumed to be equipped with
an $M_{\text{t}}$-antenna transmit uniform linear array (ULA) and an
$M_{\text{r}}$-antenna receive ULA [15], and all the users are single-antenna
nodes. The STARS is composed of a uniform planar array (UPA) with
$N=N_{\text{v}}N_{\text{h}}$ sub-wavelength elements, where $N_{\text{v}}$ and
$N_{\text{h}}$ denote the number of elements located vertically and
horizontally in the x-o-z plane, respectively.

To support the full-space communication and sensing, we propose a bi-
directional sensing-STARS architecture, which divides the $N$ STARS elements
into two parts. The former $N_{1}$ PEs are employed to support the uplink
communication, and the latter $N_{2}=N-N_{1}$ elements (referred to as sensing
elements) are equipped with the sensors for targets estimation. More
specifically, the PEs operate in the reflection or transmission mode for
information transmission [10]. For each sensing element, a micro-sized low-
cost sensor with antennas in packages is integrated inside the transparent
substrate of STARS, where the adjacent tunable element operates in the full
transmission mode, with the unit amplitude coefficient and zero phase-shift
manipulation for the dual-sided incident signals [26]. Thus, the sensor is
cable of receiving full-space echo waves without suffering penetration
attenuation caused by STARS element. All the inter-antenna/element distances
are assumed to be sub-wavelength, so the adjacent channel
reflected/transmitted by the STARS element can be deemed to be independent
channels [27].

The considered network is assumed to be a narrow-band system, where the BS and
users transmit probing signal and communication signal in one coherence block
of $T$ consecutive sample frames [15]. All the channels are assumed to be
static at one coherence block, but vary over different coherence blocks [23].
The channel coefficients from PEs to the BS and $\text{U}_{k}$ are
respectively denoted as $\mathbf{G}_{\text{r}}\in\mathbb{C}^{N_{1}\times
M_{\text{r}}}$, $\mathbf{G}_{\text{t}}\in\mathbb{C}^{N_{1}\times
M_{\text{t}}}$ and $\mathbf{h}_{k,\text{S}}\in\mathbb{C}^{N_{1}\times 1}$. All
the channels are assumed to follow Rician fading model since STARS can be
flexibly deployed to favor the LoS links. Hence, the communication channels
$\mathbf{H}_{\text{c}}\in\\{\mathbf{G}_{\text{r}},\mathbf{G}_{\text{t}},\mathbf{h}_{k,\text{S}}\\}$
are modeled as

$\mathbf{H}_{\text{c}}=L_{\text{c}}\left(\sqrt{\frac{\kappa}{1+\kappa}}\mathbf{\hat{H}}_{\text{c}}+\sqrt{\frac{1}{1+\kappa}}\mathbf{\tilde{H}}_{\text{c}}\right),$
(1)

where $\kappa$ denotes the Rician factor, $\mathbf{\hat{H}}_{\text{c}}$
represents the LoS component, and $\mathbf{\tilde{H}}_{\text{c}}$ denotes the
non-LoS component.
$L_{\text{c}}\\!=\\!\sqrt{\\!L_{0}d_{\text{c}}^{-{\alpha_{\text{c}}}}}\\!\in\\!\\{L_{\text{r}},L_{\text{t}},L_{k,\text{S}}\\}$
denotes the corresponding path loss, where $d_{\text{c}}$ is the communication
distance, $\alpha_{\text{c}}$ represents the path-loss exponent, and $L_{0}$
denotes the path loss at the reference distance of $1$ meter (m). For the
sensing process, the probing signal and echo wave undergoes the
PEs$\rightarrow$target$\rightarrow$sensors channels, which is modeled as

$\mathbf{H}_{[\imath],\text{s}}=\alpha_{[\imath]}\mathbf{b}(\varphi_{[\imath]},\phi_{[\imath]})\mathbf{a}^{T}(\varphi_{[\imath]},\phi_{[\imath]}),\quad
1\leq\imath\leq 2,$ (2)

where $\alpha_{[\imath]}\in\mathbb{C}$ is the reflection coefficient
containing the radar cross section (RCS) of $\text{T}_{\imath}$ and the round-
trip path-loss, $\varphi_{[\imath]}$ denotes the azimuth angle of
arrival/departure from the STARS to the target $\text{T}_{\imath}$, and
$\phi_{[\imath]}$ denote the elevation angle of arrival/departure from the
STARS to the target $\text{T}_{\imath}$. Note that
$\mathbf{a}(\varphi_{[\imath]},\phi_{[\imath]})$ and
$\mathbf{b}(\varphi_{[\imath]},\phi_{[\imath]})$ denote the steering vectors
of PEs and sensors, where the $n$-th elements of
$\mathbf{a}(\varphi_{[\imath]},\phi_{[\imath]})$ and
$\mathbf{b}(\varphi_{[\imath]},\phi_{[\imath]})$ are given by [23]

$\displaystyle\mathbf{a}(\varphi_{[\imath]},\phi_{[\imath]})[n]$
$\displaystyle=e^{\jmath\left[\bar{n}\pi\cos\phi_{[\imath]}\sin\varphi_{[\imath]}+(n-1-N_{\text{h}}\bar{n})\pi\sin\phi_{[\imath]}\right]},\quad
1\leq n\leq N_{1},$ (3)
$\displaystyle\mathbf{b}(\varphi_{[\imath]},\phi_{[\imath]})[n]$
$\displaystyle=e^{\jmath\left[\bar{n}\pi\cos\phi_{[\imath]}\sin\varphi_{[\imath]}+(n-1-N_{\text{h}}\bar{n})\pi\sin\phi_{[\imath]}\right]},\quad
N_{1}+1\leq n\leq N,$ (4)

where $\bar{n}=\lfloor\frac{n-1}{N_{\text{h}}}\rfloor$. To investigate the
fundamental performance limit of the considered network, the perfect channel
information state (CSI) is assumed for all the channels.

###  II-B Signal Model

Without loss of generality, we focus on the transmission at the $t$-th time
frame and propose a TS-based framework, which equally divides the each time
frame into following two phases.

####  II-B1 Phase I

The PEs operates in the reflection mode and users
$\mathcal{K}_{1}\triangleq\\{\text{U}_{1},\cdots,\text{U}_{K_{1}}\\}$ transmit
the communication signal
$c_{[1]}(t)=\sum_{k\in\mathcal{K}_{1}}\sqrt{P_{k}}c_{k}(t)$ with
$\mathbb{E}\\{|c_{k}(t)|^{2}\\}=1$ to the PEs. Meanwhile, the BS exploits the
multiple beams to send the dedicated probing signal
$\mathbf{s}_{[1]}(t)=\sum_{j=1}^{I_{[1]}}\check{\mathbf{s}}_{j}(t)\in\mathbb{C}^{M\times
1}$ with a general-rank covariance matrix
$\mathbf{R}_{[1],\text{s}}=\mathbb{E}\\{\mathbf{s}_{[1]}(t)\mathbf{s}_{[1]}^{H}(t)\\}$.
On receiving the omnidirectional signal, the PEs reflects the communication
signal to the BS while combining the $c_{[1]}(t)$ and $\mathbf{s}_{[1]}(t)$ as
a new probing signal to perform estimation.

####  II-B2 Phase II

The PEs operates in the transmission mode. The users
$\mathcal{K}_{2}\triangleq\\{\text{U}_{K_{1}+1},\cdots,\text{U}_{K}\\}$ send
the communication signal
$c_{[2]}(t)=\sum_{k\in\mathcal{K}_{2}}\sqrt{P_{k}}c_{k}(t)$ to the PEs.
Meanwhile, the BS transmits probing signal
$\mathbf{s}_{[2]}(t)=\sum_{j=1}^{I_{[2]}}\check{\mathbf{s}}_{j}(t)\in\mathbb{C}^{M\times
1}$
($\mathbf{R}_{[2],\text{s}}=\mathbb{E}\\{\mathbf{s}_{[2]}(t)\mathbf{s}_{[2]}^{H}(t)\\}$)
to the PEs. At the STARS, the PEs is exploited to transmit the $c_{[2]}(t)$ to
the BS while reconfiguring the probing signal to detect $\text{T}_{2}$.

Accordingly, the received signal at the BS in the $\imath$-th phase is given
by

$\mathbf{y}_{[\imath]}(t)=\mathbf{h}_{k,\text{S}}^{H}\bm{\Theta}_{\text{r}/\text{t}}\mathbf{G}_{\text{r}}\sum_{k\in\mathcal{K}_{\imath}}\sqrt{P_{k}}c_{k}(t)+\mathbf{n}_{[\imath]}(t),$
(5)

where
$\mathbf{n}_{[\imath]}(t)\sim\mathcal{CN}(0,\sigma^{2}\mathbf{I}_{M_{\text{r}}})$
denotes the $\imath$-th phase additive white Gaussian noise (AWGN) at the BS,
and $\bm{\Theta}_{\text{r}/\text{t}}=\bm{\Theta}_{\text{r}}$ in case of
$\imath=1$ while denoting $\bm{\Theta}_{\text{t}}$ in case of $\imath=2$.
Thereinto, the reflection/transmission coefficient matrix is defined as
$\bm{\Theta}_{\text{r}/\text{t}}=\text{diag}(\mathbf{u}_{\text{r}/\text{t}})$
with
$\mathbf{u}_{\text{r}/\text{t}}=[\sqrt{\beta_{\text{r}/\text{t},1}}e^{\jmath\theta_{\text{r}/\text{t},1}},\dots,\sqrt{\beta_{\text{r}/\text{t},N}}e^{\jmath\theta_{\text{r}/\text{t},N}}]^{T}$.
To recover $c_{k}(t)$, we assume that a unit-norm linear combination vector
$\mathbf{v}_{[\imath],k}\in\mathbb{C}^{M_{\text{r}}\times 1}$ is employed at
the BS. The extracted signal for $\text{U}_{k}$ is given by

$\mathbf{y}_{[\imath]}(t)\mathbf{v}_{[\imath],k}=\underbrace{\mathbf{h}_{k,\text{S}}^{H}\bm{\Theta}_{\text{r}/\text{t}}\mathbf{G}_{\text{r}}\mathbf{v}_{[\imath],k}\sqrt{P_{k}}c_{k}(t)}_{\text{desired
signal}}+\underbrace{\mathbf{h}_{j,\text{S}}^{H}\bm{\Theta}_{\text{r}/\text{t}}\mathbf{G}_{\text{r}}\mathbf{v}_{[\imath],k}\sum\limits_{j\neq
k,j\in\mathcal{K}_{\imath}}\sqrt{P_{j}}c_{j}(t)}_{\text{interference}}+\mathbf{n}_{[\imath]}(t)\mathbf{v}_{[\imath],k}.$
(6)

While for the sensing, the equivalent probing signal from PEs at the $t$-th
time frame of the $\imath$-th phase is given by

$\displaystyle\mathbf{x}_{[\imath]}(t)=\begin{cases}\mathbf{H}_{\text{U},\text{S}}\sqrt{\mathbf{\bar{P}}}\mathbf{c}(t)+\mathbf{G}_{\text{t}}\mathbf{s}_{[1]}(t),\quad&\text{if}\
\imath=1,\\\ \mathbf{G}_{\text{t}}\mathbf{s}_{[2]}(t),\quad&\text{if}\
\imath=2,\\\ \end{cases}$ (7)

where
$\mathbf{H}_{\text{U},\text{S}}=[\mathbf{h}_{1,\text{S}},\cdots,\mathbf{h}_{K_{1},\text{S}}]$,
$\mathbf{\bar{P}}=\text{diag}[P_{1},\cdots,P_{K_{1}}]$, and
$\mathbf{c}(t)=[c_{1},\cdots,c_{K_{1}}]^{T}$. Accordingly, the covariance
matrix of $\mathbf{x}_{[\imath]}(t)$ is given by

$\displaystyle\mathbf{R}_{[\imath],\mathbf{x}}=\mathbb{E}[\mathbf{x}_{[\imath]}(t)\mathbf{x}_{[\imath]}(t)^{H}]=\begin{cases}\mathbf{H}_{\text{U},\text{S}}\mathbf{\bar{P}}\mathbf{H}_{\text{U},\text{S}}^{H}+\mathbf{G}_{\text{t}}\mathbf{R}_{[1],\text{s}}\mathbf{G}_{\text{t}}^{H},\quad&\text{if}\
\imath=1,\\\
\mathbf{G}_{\text{t}}\mathbf{R}_{[2],\text{s}}\mathbf{G}_{\text{t}}^{H},\quad&\text{if}\
\imath=2,\\\ \end{cases}$ (8)

Thus, the received echo wave at the sensors over $T$ consecutive time frames
of the $\imath$-th phase is given by

$\mathbf{Y}_{[\imath],\text{s}}=\mathbf{H}_{[\imath],\text{s}}\bm{\Theta}_{\text{r}/\text{t}}\mathbf{X}_{[\imath]}+\mathbf{N}_{[\imath]},$
(9)

where
$\mathbf{X}_{[\imath]}=[\mathbf{x}_{[\imath]}(1),\cdots,\mathbf{x}_{[\imath]}(T)]$
and
$\mathbf{N}_{[\imath]}=[\mathbf{n}_{[\imath]}(1),\cdots,\mathbf{n}_{[\imath]}(T)]$.

###  II-C Performance Metric

As stated above, the achievable rate at the BS in the $\imath$-th phase to
decode $c_{k}(t)$ is expressed as

$R_{[\imath],k}=\frac{1}{2}\log_{2}\left(1+\frac{P_{k}|\mathbf{h}_{k,\text{S}}^{H}\bm{\Theta}_{\text{r}/\text{t}}\mathbf{G}_{\text{r}}\mathbf{v}_{[\imath],k}|^{2}}{\sum\limits_{j\neq
k,j\in\mathcal{K}_{\imath}}P_{j}|\mathbf{h}_{j,\text{S}}^{H}\bm{\Theta}_{\text{r}/\text{t}}\mathbf{G}_{\text{r}}\mathbf{v}_{[\imath],k}|^{2}+\sigma^{2}}\right),\quad
1\leq\imath\leq 2,$ (10)

For the sensing, we focus on the CRB performance with unknown parameters
$\bm{\varsigma}_{[\imath]}=[\varphi_{[\imath]},\phi_{[\imath]},\\\
\Re(\alpha_{[\imath]}),\Im(\alpha_{[\imath]})]\in\mathbb{R}^{4\times 1}$. To
facilitate deriving CRB expression, we vectorize equation (9), which can be
rewritten as

$\mathbf{y}_{[\imath],\text{s}}=\text{vec}(\mathbf{Y}_{[\imath],\text{s}})=\text{vec}\left(\mathbf{H}_{[\imath],\text{s}}\bm{\Theta}_{\text{r}/\text{t}}\mathbf{X}_{[\imath]}\right)+\mathbf{n}_{[\imath]},$
(11)

where
$\mathbf{n}_{[\imath]}=\text{vec}(\mathbf{N}_{[\imath]})\sim\mathcal{CN}(0,\sigma^{2}\mathbf{I}_{MT})$.
Let
$\mathbf{q}_{[\imath]}=\text{vec}\left(\mathbf{H}_{[\imath],\text{s}}\bm{\Theta}_{\text{r}/\text{t}}\mathbf{X}_{[\imath]}\right)$,
the Fisher information matrix (FIM)
$\mathbf{F}_{[\imath]}\in\mathbb{R}^{4\times 4}$ for estimating
$\bm{\varsigma}_{[\imath]}$ can be expressed as a Jacobian matrix with the
$h$-th row and $v$-th column element being given by [28]

$\displaystyle\mathbf{F}_{[\imath]}[h,v]$
$\displaystyle=2\Re\left(\frac{\partial\mathbf{q}_{[\imath]}^{H}}{\partial\bm{\varsigma}_{[\imath],h}}\mathbf{R}_{\mathbf{n}_{[\imath]}}^{-1}\frac{\partial\mathbf{q}_{[\imath]}}{\partial\bm{\varsigma}_{[\imath],v}}\right)+\text{Tr}\left(\mathbf{R}_{\mathbf{n}_{[\imath]}}^{-1}\frac{\partial\mathbf{R}_{\mathbf{n}_{[\imath]}}}{\partial\bm{\varsigma}_{[\imath],h}}\mathbf{R}_{\mathbf{n}_{[\imath]}}^{-1}\frac{\partial\mathbf{R}_{\mathbf{n}_{[\imath]}}}{\partial\bm{\varsigma}_{[\imath],v}}\right)$
$\displaystyle=\frac{2}{\sigma^{2}}\Re\left(\frac{\partial\mathbf{q}_{[\imath]}^{H}}{\partial\bm{\varsigma}_{[\imath],h}}\frac{\partial\mathbf{q}_{[\imath]}}{\partial\bm{\varsigma}_{[\imath],v}}\right),\quad
1\leq h,v\leq 4,$ (12)

where $\mathbf{R}_{\mathbf{n}_{[\imath]}}=\sigma^{2}\mathbf{I}_{MT}$.
Accordingly, we can repartition $\mathbf{F}_{[\imath]}$ as

$\mathbf{F}_{[\imath]}=\begin{bmatrix}\mathbf{J}_{\bm{\Psi}_{[\imath]}\bm{\Psi}_{[\imath]}}&\mathbf{J}_{\bm{\Psi}_{[\imath]}\bm{\alpha}_{[\imath]}}\\\
\mathbf{J}_{\bm{\Psi}_{[\imath]}\bm{\alpha}_{[\imath]}}^{T}&\mathbf{J}_{\bm{\alpha}_{[\imath]}\bm{\alpha}_{[\imath]}}\end{bmatrix},$
(13)

where $\bm{\Psi}_{[\imath]}=[\varphi_{[\imath]},\phi_{[\imath]}]$,
$\bm{\alpha}_{[\imath]}=[\Re(\alpha_{\imath}),\Im(\alpha_{\imath})]$, while
the specific expressions of
$\mathbf{J}_{\bm{\Psi}_{[\imath]}\bm{\Psi}_{[\imath]}}$,
$\mathbf{J}_{\bm{\Psi}_{[\imath]}\bm{\alpha}_{[\imath]}}$ and
$\mathbf{J}_{\bm{\alpha}_{[\imath]}\bm{\alpha}_{[\imath]}}$ are given in
Appendix A. Then, with the inverse formula of the second order matrix, we can
derive the CRB expression of the $\imath$-th phase with regard to
$\bm{\Psi}_{[\imath]}$ [29] as

$\text{CRB}(\bm{\Psi}_{[\imath]})=\left[\mathbf{J}_{\bm{\Psi}_{[\imath]}\bm{\Psi}_{[\imath]}}-\mathbf{J}_{\bm{\Psi}_{[\imath]}\bm{\alpha}_{[\imath]}}\mathbf{J}_{\bm{\alpha}_{[\imath]}\bm{\alpha}_{[\imath]}}^{-1}\mathbf{J}_{\bm{\Psi}_{[\imath]}\bm{\alpha}_{[\imath]}}^{T}\right]^{-1}.$
(14)

##  III Beamforming Optimization Under Fixed Sensor Number

In this section, we concentrate on joint sensing waveform and communication
beamforming optimization with the fixed number of sensors. To draw instructive
insights for practical system design, we consider a special network setup of
two users, and utilize the ergodic rate as the average communication
performance metric. The the closed-form approximation expression of ergodic
achievable rate is derived. Accordingly, an AO algorithm to efficiently solve
the non-convex problem.

###  III-A Problem Formulation

Since inter-user interference is non-existent in the two-user case, the
achievable rate at the BS in the $\imath$-th phase to decode $c_{k}(t)$ is
rewritten to

$R_{[\imath],k}=\frac{1}{2}\log_{2}\left(1+\frac{P_{k}|\mathbf{h}_{k,\text{S}}^{H}\bm{\Theta}_{\text{r}/\text{t}}\mathbf{G}_{\text{r}}\mathbf{v}_{[\imath],k}|^{2}}{\sigma^{2}}\right).$
(15)

To provide the generalised insights to the CRB optimization, we employ the
ergodic achievable rate as the average performance metric for the
communication. Accordingly, we target at minimizing the CRB performance for
DOA $\bm{\Psi}_{[\imath]}$ at each phase. Subject to the average QoS
requirements of users, the joint optimization of the transmit power at the
users, reflection/transmission coefficients of the PEs, the receive
beamforming and the sensing waveform at the BS is considered. The optimization
problem in the $\imath$-th phase is formulated as follows.

$\displaystyle\min\limits_{\mathbf{P}_{[\imath]},\bm{\Theta}_{\text{r}/\text{t}},\mathbf{R}_{[\imath],\text{s}},\mathbf{v}_{[\imath],k}}\quad\text{Tr}(\text{CRB}(\bm{\Psi}_{[\imath]}))$
(16a)
$\displaystyle\quad\text{s.t.}\quad\text{Tr}(\mathbf{R}_{[\imath],\text{s}})\leq
P_{\text{BS},\text{max}},$ (16b) $\displaystyle\quad\quad\quad\,\,P_{k}\leq
P_{\text{U},\text{max}},\quad 1\leq k\leq K,$ (16c)
$\displaystyle\quad\quad\quad\,\,\mathbb{E}\\{R_{k}\\}\geq
R_{\text{er},\text{t}},$ (16d)
$\displaystyle\quad\quad\quad\,\,\|\mathbf{v}_{[\imath],k}\|^{2}=1,\quad 1\leq
k\leq K,$ (16e)
$\displaystyle\quad\quad\quad\,\,\theta_{\text{r},n},\theta_{\text{t},n}\in[0,2\pi],\
1\leq n\leq N,$ (16f)
$\displaystyle\quad\quad\quad\,\,\beta_{\text{r},n},\beta_{\text{t},n}\in[0,1],\
1\leq n\leq N,$ (16g)

where $\mathbf{P}_{[1]}=[P_{1},\cdots,P_{K_{1}}]$,
$\mathbf{P}_{[2]}=[P_{K_{1}+1},\cdots,P_{K}]$, $R_{\text{er},\text{t}}$
denotes the ergodic QoS rate of users, $P_{\text{U},\text{max}}$ denotes the
maximal transmit power at the users, and $P_{\text{BS},\text{max}}$ denotes
the transmit power budget at the BS. (16b) and (16c) denote the transmit power
constraint at the BS and users’ sides, respectively; (16d) represents the
ergodic QoS constraint of users; (16e) denotes the normalization constraint of
the receive beamforming; (16f) and (16g) are the phase-shift and amplitude
constraints of the PEs. Notably, the intractable expression of CRB and the
non-convex constraints (16d) and (16e) make problem (16) non-convex and
challenging to solve. In the following, we consider optimizing the sensing
waveform and communication beamforming in an alternating manner.

###  III-B Problem Reformulation

Before handling the challenging problem, we can observe that
$\mathbf{v}_{[\imath],k}$ only exists in the constraint (16d) and has no
direct influence on the CRB performance, which indicates that only the
feasible $\mathbf{v}_{[\imath],k}$ are required. For maximum compliance with
QoS constraint, the optimal receive beamforming is given by
$\mathbf{v}_{[\imath],k}=\frac{(\mathbf{h}_{k,\text{S}}^{H}\bm{\Theta}_{\text{r}/\text{t}}\mathbf{G}_{\text{r}})^{H}}{\|\mathbf{h}_{k,\text{S}}^{H}\bm{\Theta}_{\text{r}/\text{t}}\mathbf{G}_{\text{r}}\|}$,
to obtain the best communication performance. Hence, (15) can be transformed
into
$R_{[\imath],k}=\frac{1}{2}\log_{2}\left(1+\frac{P_{k}\|\mathbf{h}_{k,\text{S}}^{H}\bm{\Theta}_{\text{r}/\text{t}}\mathbf{G}_{\text{r}}\|^{2}}{\sigma^{2}}\right)$.
With this in mind, we further rewrite
$\|\mathbf{\hat{h}}_{k,\text{S}}^{H}\bm{\Theta}_{\text{r}/\text{t}}\mathbf{\hat{G}}_{\text{r}}\|^{2}$
as
$\text{Tr}(\mathbf{\hat{H}}_{k,\text{S}}\mathbf{\hat{H}}_{k,\text{S}}^{H}\mathbf{U}_{\text{r}/\text{t}})$,
with definition of
$\mathbf{U}_{\text{r}/\text{t}}=\mathbf{u}_{\text{r}/\text{t}}\mathbf{u}_{\text{r}/\text{t}}^{H}$
and
$\mathbf{\hat{H}}_{k,\text{S}}=\text{diag}(\mathbf{\hat{h}}_{k,\text{S}}^{H})\mathbf{\hat{G}}_{\text{r}}$.
Then, we resort Lemma 1 to obtain the approximation expression of
$\mathbb{E}\\{R_{k}\\}$.

###### Lemma 1

The ergodic achievable rate in (16d) can be approximated as

$\displaystyle\mathbb{E}\\{R_{[\imath],k}\\}$
$\displaystyle\approx\frac{1}{2}\log_{2}\\!\\!\bigg{(}\\!1\\!+\\!\frac{P_{k}L_{k,\text{S}}^{2}L_{\text{r}}^{2}}{\sigma^{2}(1\\!+\\!\kappa)^{2}}\bigg{[}\kappa^{2}\text{Tr}(\mathbf{\hat{H}}_{k,\text{S}}\mathbf{\hat{H}}_{k,\text{S}}^{H}\mathbf{U}_{\text{r}/\text{t}})\\!+\\!\kappa\text{Tr}(\mathbf{\hat{G}}_{\text{r}}\mathbf{\hat{G}}_{\text{r}}^{H}\mathbf{U}_{\text{r}/\text{t}})+$
$\displaystyle\kappa$ $\displaystyle
M_{\text{r}}\text{Tr}\left(\text{diag}(\mathbf{\hat{h}}_{k,\text{S}}^{H})\mathbf{U}_{\text{r}/\text{t}}\text{diag}(\mathbf{\hat{h}}_{k,\text{S}})\right)+M_{\text{r}}\text{Tr}(\mathbf{U}_{\text{r}/\text{t}})\bigg{]}\bigg{)}.$
(17)

###### Proof:

See Appendix B. ∎

The approximation accuracy can be verified in Fig. 4. To proceed, we further
introduce Lemma 2 to convexify the non-convex objective function (16a).

###### Lemma 2

According to [30], we have that for any $\mathbf{X}\succeq\mathbf{0}$ and
$\mathbf{Y}\succeq\mathbf{0}$, if $\mathbf{X}\succeq\mathbf{Y}$ is guaranteed,
the inequality of $\text{Tr}(\mathbf{X}^{-1})\leq\text{Tr}(\mathbf{Y}^{-1})$
holds.

As such, with the fact that FIM matrix
$\left[\mathbf{J}_{\bm{\Psi}_{[\imath]}\bm{\Psi}_{[\imath]}}-\mathbf{J}_{\bm{\Psi}_{[\imath]}\bm{\alpha}_{[\imath]}}\mathbf{J}_{\bm{\alpha}_{[\imath]}\bm{\alpha}_{[\imath]}}^{-1}\mathbf{J}_{\bm{\Psi}_{[\imath]}\bm{\alpha}_{[\imath]}}^{T}\right]$
is positive semidefinite, we can introduce an auxiliary variable
$\mathbf{E}_{[\imath]}\succeq\mathbf{0}$ to equivalently transform (16a) into
$\text{Tr}(\mathbf{E}_{[\imath]}^{-1})$, with satisfying following linear
matrix inequality (LMI) constraint.

$\begin{bmatrix}\mathbf{J}_{\bm{\Psi}_{[\imath]}\bm{\Psi}_{[\imath]}}-\mathbf{E}_{[\imath]}&\mathbf{J}_{\bm{\Psi}_{[\imath]}\bm{\alpha}_{[\imath]}}\\\
\mathbf{J}_{\bm{\Psi}_{[\imath]}\bm{\alpha}_{[\imath]}}^{T}&\mathbf{J}_{\bm{\alpha}_{[\imath]}\bm{\alpha}_{[\imath]}}\end{bmatrix}\succeq\mathbf{0}.$
(18)

With the transformations above, problem (16) can be reformulated as follows.

$\displaystyle\min\limits_{\mathbf{E}_{[\imath]},\mathbf{U}_{\text{r}/\text{t}},\mathbf{R}_{[\imath],\text{s}},\mathbf{P}_{[\imath]}}\quad\text{Tr}(\mathbf{E}_{[\imath]}^{-1})$
(19a) $\displaystyle\quad\text{s.t.}\quad\eqref{16b},\eqref{16c},\eqref{18},$
(19b)
$\displaystyle\quad\quad\quad\frac{P_{k}L_{k,\text{S}}^{2}L_{\text{r}}^{2}}{(1+\kappa)^{2}}\bigg{[}\kappa^{2}\text{Tr}(\mathbf{\hat{H}}_{k,\text{S}}\mathbf{\hat{H}}_{k,\text{S}}^{H}\mathbf{U}_{\text{r}/\text{t}})\\!+\\!\kappa
M_{\text{r}}\text{Tr}\left(\text{diag}(\mathbf{\hat{h}}_{k,\text{S}}^{H})\mathbf{U}_{\text{r}/\text{t}}\text{diag}(\mathbf{\hat{h}}_{k,\text{S}})\right)$
$\displaystyle\quad\quad\quad+\kappa\text{Tr}(\mathbf{\hat{G}}_{\text{r}}\mathbf{\hat{G}}_{\text{r}}^{H}\mathbf{U}_{\text{r}/\text{t}})+M_{\text{r}}\text{Tr}(\mathbf{U}_{\text{r}/\text{t}})\bigg{]}\geq\sigma^{2}(2^{2R_{\text{er},\text{t}}}-1),$
(19c)
$\displaystyle\quad\quad\quad\mathbf{E}_{[\imath]}\succeq\mathbf{0},\quad\mathbf{U}_{\text{r}/\text{t}}\succeq\mathbf{0},$
(19d) $\displaystyle\quad\quad\quad\mathbf{U}_{\text{r}/\text{t}}[n,n]\leq
1,\quad 1\leq n\leq N,$ (19e)
$\displaystyle\quad\quad\quad\text{rank}(\mathbf{U}_{\text{r}/\text{t}})=1.$
(19f)

###  III-C Joint Beamforming Optimization

####  III-C1 Transmit power and sensing waveform optimization

With the fixed $\mathbf{U}_{\text{r}/\text{t}}$, the problem (19) is reduced
to the following subproblem.

$\displaystyle\min\limits_{\mathbf{R}_{[\imath],\text{s}},\mathbf{E}_{[\imath]},\mathbf{P}_{[\imath]}}\quad\text{Tr}(\mathbf{E}_{[\imath]}^{-1})$
(20a)
$\displaystyle\quad\text{s.t.}\quad\eqref{16b},\eqref{16c},\eqref{18},\eqref{19c},$
(20b) $\displaystyle\quad\quad\quad\mathbf{E}_{[\imath]}\succeq\mathbf{0},$
(20c)

which is a SDP and can be optimally solved by the convex toolbox, e.g., CVX.

####  III-C2 Reflection/Transmission coefficients optimization

With fixed $\\{\mathbf{R}_{[\imath],\text{s}},\mathbf{P}_{[\imath]}\\}$,
problem (19) is rewritten as

$\displaystyle\min\limits_{\mathbf{E}_{[\imath]},\mathbf{U}_{\text{r}/\text{t}}}\quad\text{Tr}(\mathbf{E}_{[\imath]}^{-1})$
(21a) $\displaystyle\quad\text{s.t.}\quad\eqref{18},\eqref{19c}-\eqref{19f}.$
(21b)

To handle the non-convex LMI constraint (18), we adopt the singular value
decomposition (SVD) to equivalently convert the quadratic terms
$\\{\mathbf{J}_{\bm{\Psi}_{[\imath]}\bm{\Psi}_{[\imath]}},\mathbf{J}_{\bm{\Psi}_{[\imath]}\bm{\alpha}_{[\imath]}},\mathbf{J}_{\bm{\alpha}_{[\imath]}\bm{\alpha}_{[\imath]}}\\}$
to the tractable forms. Specifically, by decomposing
$\mathbf{R}_{\mathbf{x}_{[\imath]}}$ into
$\sum_{q}\mathbf{s}_{q}\mathbf{d}_{q}$, we have

$\displaystyle\bm{\Theta}_{\text{r}/\text{t}}\mathbf{R}_{\mathbf{x}_{[\imath]}}\bm{\Theta}_{\text{r}/\text{t}}^{H}$
$\displaystyle=\sum_{q}\text{diag}(\mathbf{s}_{q})\mathbf{u}_{\text{r}/\text{t}}\mathbf{u}_{\text{r}/\text{t}}^{H}\text{diag}(\mathbf{d}_{q})$
$\displaystyle=\sum_{q}\mathbf{S}_{q}\mathbf{u}_{\text{r}/\text{t}}\mathbf{u}_{\text{r}/\text{t}}^{H}\mathbf{D}_{q}=\sum_{q}\mathbf{S}_{q}\mathbf{U}_{\text{r}/\text{t}}\mathbf{D}_{q}.$
(22)

Then, we substitute (22) into FIM matrix, the constraint (18) becomes convex
with respect to $\mathbf{U}_{\text{r}/\text{t}}$. While for the non-convex
constraint (19f), we employ the penalty-based rank-one relaxation approach
[31], which exploits the successive convex approximation (SCA) technique to
relax the equivalent rank-one constraint
$\text{Tr}(\mathbf{U}_{\text{r}/\text{t}})-\|\mathbf{U}_{\text{r}/\text{t}}\|_{2}=0$
as a convex penalty term in objective function (21a). Accordingly, the problem
(21) is reformulated as

$\displaystyle\min\limits_{\mathbf{E}_{[\imath]},\mathbf{U}_{\text{r}/\text{t}}}\quad\text{Tr}(\mathbf{E}_{[\imath]}^{-1})-\frac{1}{2\rho_{1}}\left[\text{Tr}(\mathbf{U}_{\text{r}/\text{t}})-\|\mathbf{U}_{\text{r}/\text{t}}^{[n-1]}\|_{2}-\text{Tr}(\mathbf{\bar{u}}_{\text{r}/\text{t}}^{[n-1]}(\mathbf{\bar{u}}_{\text{r}/\text{t}}^{[n-1]})^{H}(\mathbf{U}_{\text{r}/\text{t}}-\mathbf{U}_{\text{r}/\text{t}}^{[n-1]}))\right],$
(23a) $\displaystyle\quad\text{s.t.}\quad\eqref{18},\eqref{19c}-\eqref{19e},$
(23b)

where $\mathbf{U}_{\text{r}/\text{t}}^{[n-1]}$ denotes the optimized result in
the $(n-1)$-th iteration, $\mathbf{\bar{u}}_{\text{r}/\text{t}}^{[n-1]}$
denotes the leading eigenvector of $\mathbf{U}_{\text{r}/\text{t}}^{[n-1]}$,
and $\rho_{1}$ represents the penalty factor. The resultant problem (23) is a
convex program, where the rank-one solution can be optimally obtained when $p$
is sufficiently small [31, Proposition 2]. The specific SCA algorithm to
optimize $\mathbf{U}_{\text{r}/\text{t}}$ is summarized in Algorithm 1.

Algorithm 1 SCA algorithm for rank-one solution.

1: Initialize initial $\mathbf{U}_{\text{r}/\text{t}}^{[n-1]}$ and $p_{1}$
with $n=1$. Set a convergence accuracy $\epsilon_{1}$ and calculate the
leading eigenvector $\mathbf{\bar{u}}_{\text{r}/\text{t}}^{[n-1]}$.

2: repeat

3: update $\mathbf{U}_{\text{r}/\text{t}}^{[n]}$ by solving problem (23).

4: update the leading eigenvector
$\mathbf{\bar{u}}_{\text{r}/\text{t}}^{[n]}$.

5: set $n=n+1$ and $\rho_{1}=\frac{\rho_{1}}{c_{1}}$ ($c_{1}>1$).

6: until the penalty term in objective function (23a) drops below
$\epsilon_{1}$.

###### Remark 1

(MLE Validation) In this paper, we consider employing the maximum likelihood
estimation (MLE) approach in [21, Appendix E] to obtain the estimated DoA
$\bm{\Psi}_{[\imath]}^{\text{es}}$ under the optimized waveform, where the the
correctness of the proposed CRB optimization framework is demonstrated in Fig.
6.

###### Corollary 1

(Maximal Number of Sensor Deployment) For the special case of single receive
antenna, i.e., $M_{\text{r}}=1$, the optimal reflection/transmission
coefficients and the maximal number of sensors to be deployed can be derived
as following closed-form expressions.

$\displaystyle\begin{cases}\theta_{\text{r},n}^{\text{opt}}=\angle\mathbf{\hat{h}}_{1,\text{S}}[n]-\angle\mathbf{\hat{g}}_{\text{r}}[n],\quad\beta_{\text{r},n}^{\text{opt}}=1\\\
\theta_{\text{t},n}^{\text{opt}}=\angle\mathbf{\hat{h}}_{2,\text{S}}[n]-\angle\mathbf{\hat{g}}_{\text{r}}[n],\quad\beta_{\text{t},n}^{\text{opt}}=1,\end{cases}$
(24) $\displaystyle
N_{2}^{\text{max}}=N-\left\lceil\frac{1}{2\kappa^{2}}\Bigg{[}\sqrt{(2\kappa+1)^{2}+4\kappa^{2}\frac{\sigma^{2}(2^{2R_{\text{er},\text{t}}}-1)(1+\kappa)^{2}}{P_{\text{U},\text{max}}L_{k,\text{S}}^{2}L_{\text{r}}^{2}}}-(2\kappa+1)\Bigg{]}\right\rceil,$
(25)

where $\mathbf{\hat{g}}_{\text{r}}$ is the degenerated channel of
$\mathbf{\hat{G}}_{\text{r}}$.

###### Proof:

See Appendix C. ∎

###  III-D Overall Algorithm

Algorithm 2 AO algorithm.

1: Initialize initial $\mathbf{U}_{\text{r}/\text{t}}^{[l-1]}$ and
$\text{Tr}(\text{CRB}(\bm{\Psi}_{[\imath]}))^{[l-1]}$ with $l=1$. Set a
convergence accuracy $\epsilon_{2}$.

2: repeat

3: update the optimal receive beamforming
$\mathbf{v}_{[\imath],k}^{\text{opt}}=\frac{(\mathbf{h}_{k,\text{S}}^{H}\bm{\Theta}_{\text{r}/\text{t}}\mathbf{G}_{\text{r}})^{H}}{\|\mathbf{h}_{k,\text{S}}^{H}\bm{\Theta}_{\text{r}/\text{t}}\mathbf{G}_{\text{r}}\|}$.

4: update optimal
$\\{\mathbf{R}_{[\imath],\text{s}}^{[l]},\mathbf{P}_{[\imath]}^{[l]}\\}$ by
solving problem (20).

5: update optimal $\mathbf{U}_{\text{r}/\text{t}}^{[l]}$ by carrying out
Algorithm 1.

6: set $l=l+1$ and calculate
$\text{Tr}(\text{CRB}(\bm{\Psi}_{[\imath]}))^{[l]}$.

7: until
$|\text{Tr}(\text{CRB}(\bm{\Psi}_{[\imath]}))^{[l]}-\text{Tr}(\text{CRB}(\bm{\Psi}_{[\imath]}))^{[l-1]}|\leq\epsilon_{2}$.

The overall algorithm is summarized in Algorithm 2, which optimizes the
sensing waveform and reflection/transmission coefficients alternatively. By
denoting the CRB value at $l$-th iteration as a function of
$\mathbf{R}_{[\imath],\text{s}}$ and $\mathbf{U}_{\text{r}/\text{t}}$, i.e.,
$g(\mathbf{R}_{[\imath],\text{s}},\mathbf{P}_{[\imath]},\mathbf{U}_{\text{r}/\text{t}})$,
the following inequality always holds

$\displaystyle
g(\mathbf{R}_{[\imath],\text{s}}^{[l-1]},\mathbf{P}_{[\imath]}^{[l-1]},\mathbf{U}_{\text{r}/\text{t}}^{[l-1]})\overset{(a)}{\geq}g(\mathbf{R}_{[\imath],\text{s}}^{[l]},\mathbf{P}_{[\imath]}^{[l]},\mathbf{U}_{\text{r}/\text{t}}^{[l-1]})\overset{(b)}{\geq}g(\mathbf{R}_{[\imath],\text{s}}^{[l]},\mathbf{P}_{[\imath]}^{[l]},\mathbf{U}_{\text{r}/\text{t}}^{[l]}),$
(26)

where inequality signs $(a)$ and $(b)$ hold because the optimal sensing
waveform and optimal reflection/transmission coefficients are both guaranteed
in the step $4$ and step $5$ at the same AO iteration. Meanwhile, since
$g(\mathbf{R}_{[\imath],\text{s}},\mathbf{P}_{[\imath]},\mathbf{U}_{\text{r}/\text{t}})$
is continuous over the compact feasible set of problem, there exists a finite
positive number that serves as a lower bound on the objective value. This
proves that our proposed AO algorithm remains non-increasing over the
iterations. On the other hand, the computational complexity of AO algorithm
mainly relies on solving SDP problems (20) and (23). The overall complexity
based on the interior-point method is given by
$\mathcal{O}\left(\log(\frac{1}{\epsilon_{2}})\left((M_{\text{t}}^{2}+5)^{3.5}+\log(\frac{1}{\epsilon_{1}})(N_{1}^{2}+4)^{3.5}\right)\right)$
[32].

##  IV How Many Sensors Do We Need?

In this section, we consider the general multi-user system with the joint
optimization of beamforming design and the number of sensors. By modifying the
traditional CRB expression, a new metric of ECRB is proposed, which can
evaluate the sensing performance while taking the sensors’ deployment into the
consideration. Based on the proposed ECRB, a PDL algorithm is devised to
jointly optimize the ISAC waveform, reflection/transmission coefficients and
the number of PEs/sensors.

###  IV-A Extended CRB Derivation

To facilitate the optimization of sensor number, we define two $N$-dimensional
matrices $\mathbf{A}=\text{diag}[\mathbf{I}_{N_{1}},\mathbf{0}_{N_{2}}]$ and
$\mathbf{B}=\text{diag}[\mathbf{0}_{N_{1}},\mathbf{I}_{N_{2}}]$, where
$\mathbf{A}$ and $\mathbf{B}$ are the element selection matrices for PEs and
sensors, respectively. With the definition above, we can rewrite the steering
vector $\mathbf{a}(\varphi_{[\imath]},\phi_{[\imath]})$ and
$\mathbf{b}(\varphi_{[\imath]},\phi_{[\imath]})$ as the extended form.

$\displaystyle\mathbf{a}(\varphi_{[\imath]},\phi_{[\imath]})=\mathbf{A}\bm{\varepsilon}(\varphi_{[\imath]},\phi_{[\imath]})\quad\mathbf{b}(\varphi_{[\imath]},\phi_{[\imath]})=\mathbf{B}\bm{\varepsilon}(\varphi_{[\imath]},\phi_{[\imath]}).$
(27)

Here,
$\bm{\varepsilon}(\varphi_{[\imath]},\phi_{[\imath]})\in\mathbb{C}^{N\times
1}$ denotes the steering vector of the STARS, $n$-th element of which is
defined in (3) with $1\leq n\leq N$. For convenience of denotation, we
abbreviate $\bm{\varepsilon}(\varphi_{[\imath]},\phi_{[\imath]})$ as
$\bm{\varepsilon}_{[\imath]}$ in the following. Then, we introduce Proposition
1 to derive the expression of the extended FIM matrix.

###### Proposition 1

The $h$-th row and $v$-th column element of extended FIM matrix is given by

$\displaystyle\mathbf{F}_{[\imath]}[h,v]=\frac{2TC_{[\imath]}^{(h,v)}}{\sigma^{2}}\text{Tr}\left(\mathbf{B}\mathbf{\bar{C}}_{\bm{\varsigma}_{[\imath]}[v]}\mathbf{A}\bm{\Theta}^{\text{r}/\text{t}}\mathbf{R}_{\mathbf{X}_{[\imath]}}\bm{\Theta}_{\text{r}/\text{t}}^{H}\mathbf{A}\mathbf{\bar{C}}_{\bm{\varsigma}_{[\imath]}[h]}^{H}\mathbf{B}\right),\,1\leq
h,v\leq 4,$ (28)

where

$\displaystyle
C_{[\imath]}^{(i,j)}=\begin{cases}|\alpha_{[\imath]}|^{2},\\!\\!&\text{if}\
1\leq i,j\leq 2,\\\ \tilde{\alpha}_{[\imath]},\\!\\!&\text{if}\
\overline{\iota}=3,\underline{\iota}\leq 2,\\\
\jmath\tilde{\alpha}_{[\imath]},\\!\\!&\text{if}\
\overline{\iota}=4,\underline{\iota}\leq 2,\\\ 1,\\!\\!&\text{if}\ 3\leq
i,j\leq
4,\end{cases}\quad\mathbf{\bar{C}}_{\bm{\varsigma}_{[\imath]}[i]}=\begin{cases}\frac{\partial\bm{\varepsilon}_{[\imath]}}{\partial\bm{\Psi}_{[\imath]}[i]}\bm{\varepsilon}_{[\imath]}^{T}+\bm{\varepsilon}_{[\imath]}\frac{\partial\bm{\varepsilon}_{[\imath]}^{T}}{\partial\bm{\Psi}_{[\imath]}[i]}\\!\\!&\text{if}\
1\leq i\leq 2,\\\
\bm{\varepsilon}_{[\imath]}\bm{\varepsilon}_{[\imath]}^{T},\\!\\!&\text{if}\
3\leq i\leq 4,\end{cases}$ (29)

where $\overline{\iota}=\max\\{i,j\\}$ and $\underline{\iota}=\min\\{i,j\\}$,
and $\bm{\Theta}_{\text{r}/\text{t}}\in\mathbb{C}^{N\times N}$ is the
reflection/transmission coefficient matrix of STARS.

###### Proof:

See Appendix D. ∎

Therefore, the ECRB expression can be derived by substituting the extended FIM
matrix expression into (14). Similarly, the extended achievable rate
expression can be expressed as
$R_{[\imath],k}=\frac{1}{2}\log_{2}\left(1+\frac{P_{k}|\mathbf{h}_{k,\text{S}}^{H}\bm{\Theta}_{\text{r}/\text{t}}\mathbf{A}\mathbf{G}_{\text{r}}\mathbf{v}_{[\imath],k}|^{2}}{\sum\nolimits_{j\neq
k,j\in\mathcal{K}_{\imath}}P_{j}|\mathbf{h}_{k,\text{S}}^{H}\bm{\Theta}_{\text{r}/\text{t}}\mathbf{A}\mathbf{G}_{\text{r}}\mathbf{v}_{[\imath],k}|^{2}+\sigma^{2}}\right)$
with $\mathbf{h}_{k,\text{S}}\in\mathbb{C}^{N\times 1}$ and
$\mathbf{G}_{\text{r}}\in\mathbb{C}^{N\times M_{\text{r}}}$.

###  IV-B Problem Formulation

With the derivations above, we aim to minimize the ECRB value for estimating
$\bm{\Psi}_{[\imath]}$ of each phase under the QoS constraints, by jointly
optimizing the transmit power at the users, the reflection/transmission
coefficients of the PEs, the number of PEs/sensors at the STARS, the receive
beamforming and sensing waveform at the BS. Based on the definitions of
$\mathbf{U}_{\text{r}/\text{t}}=\mathbf{u}_{\text{r}/\text{t}}\mathbf{u}_{\text{r}/\text{t}}^{H}$
and
$\mathbf{H}_{k,\text{S}}=\text{diag}(\mathbf{h}_{k,\text{S}}^{H})\mathbf{G}_{\text{r}}$,
the problem formulation in the $\imath$-th phase is given by

$\displaystyle\min_{\mathbf{E}_{[\imath]},\mathbf{P}_{[\imath]},\mathbf{U}_{\text{r}/\text{t}},\atop\mathbf{V}_{[\imath],k},\mathbf{A},\mathbf{B},\mathbf{R}_{[\imath],\text{s}}}$
$\displaystyle\text{Tr}(\mathbf{E}_{[\imath]}^{-1})$ (30a) s.t.
$\displaystyle\eqref{16b},\eqref{16c},\eqref{18},\eqref{19d}-\eqref{19f},$
(30b) $\displaystyle
P_{k}\text{Tr}(\mathbf{A}\mathbf{H}_{k,\text{S}}\mathbf{V}_{[\imath],k}\mathbf{H}_{k,\text{S}}^{H}\mathbf{A}\mathbf{U}_{\text{r}/\text{t}})\\!\geq\\!\gamma_{\text{t}}\Big{(}\\!\\!\sum\limits_{j\neq
k,j\in\mathcal{K}_{\imath}}\\!\\!\\!\\!\\!\\!P_{j}\text{Tr}(\mathbf{A}\mathbf{H}_{j,\text{S}}\mathbf{V}_{[\imath],k}\mathbf{H}_{j,\text{S}}^{H}\mathbf{A}\mathbf{U}_{\text{r}/\text{t}})\\!+\\!\sigma^{2}\Big{)},$
(30c) $\displaystyle\mathbf{A}[n,n]\in\\{0,1\\}\
,\mathbf{B}[n,n]\in\\{0,1\\},\quad 1\leq n\leq N,$ (30d)
$\displaystyle\mathbf{A}+\mathbf{B}=\mathbf{I}_{N},$ (30e)
$\displaystyle\text{Tr}(\mathbf{V}_{[\imath],k})=1,\quad\mathbf{V}_{[\imath],k}\succeq\mathbf{0},$
(30f)

where $\gamma_{\text{t}}=(2^{2R_{\text{t}}}-1)$ with $R_{\text{t}}$
representing the QoS requirements of users, and
$\mathbf{V}_{[\imath],k}=\mathbf{v}_{[\imath],k}(\mathbf{v}_{[\imath],k})^{H}$.
(30d) and (30e) denote the integer variable constraints for selection
matrices. Note the problem (30) is a MINLP that cannot be optimally solved by
conventional convex optimization methods, except for exhaustive search. To
strike a balance between optimality and complexity, we propose a PDL algorithm
obtain the near-optimal solution of problem (30), which optimizes the
constructed augmented Lagrangian (AL) problem in the inner loop while updating
the penalty factor in the outer loop.

###  IV-C Augmented Lagrangian Problem Construction

To convert problem (30) to a tractable form, we introduce the auxiliary
variables $[p_{1},\cdots,p_{N-1}]$, which satisfies $p_{n}\in\\{0,1\\}$ and
$\sum_{n=1}^{N-1}p_{n}=1$. Then, we can equivalently rewrite (28) as

$\displaystyle\mathbf{F}_{[\imath]}[h,v]=\frac{2TC_{[\imath]}^{(h,v)}}{\sigma^{2}}\sum_{n=1}^{N-1}p_{n}\text{Tr}\left(\mathbf{\bar{F}}_{n,v}\bm{\Theta}^{\text{r}/\text{t}}\mathbf{R}_{\mathbf{X}_{[\imath]}}\bm{\Theta}_{\text{r}/\text{t}}^{H}\mathbf{\bar{F}}_{n,h}^{H}\right),$
(31)

where the constant matrix
$\mathbf{\bar{F}}_{n,v}=\mathbf{\bar{C}}_{\bm{\varsigma}_{[\imath]}[v]}\mathbf{A}_{n}-\mathbf{A}_{n}\mathbf{\bar{C}}_{\bm{\varsigma}_{[\imath]}[v]}\mathbf{A}_{n}$
with $\mathbf{A}_{n}=[\mathbf{I}_{n},\mathbf{0}_{N-n}]$. Also, the QoS
constraint (30c) can be transformed into

$\displaystyle
P_{k}H_{[\imath],n}^{k,k}\geq\gamma_{\text{t}}\left(\sum\limits_{j\neq
k,j\in\mathcal{K}_{\imath}}P_{j}H_{[\imath],n}^{k,j}+\sigma^{2}\right),$ (32)

where
$H_{[\imath],n}^{k,j}=\sum_{n=1}^{N-1}p_{n}\text{Tr}(\mathbf{A}_{n}\mathbf{H}_{j,\text{S}}\mathbf{V}_{[\imath],k}\mathbf{H}_{j,\text{S}}^{H}\mathbf{A}_{n}\mathbf{U}_{\text{r}/\text{t}})$.
Note that when $p_{n}=1$ and $p_{m}=0$ ($m\neq n$) hold, the selection matrix
$\mathbf{A}$ can be exactly determined, i.e., $\mathbf{A}=\mathbf{A}_{n}$.
Thus, the problem (30) can be converted to the following AL form without
selection matrices.

$\displaystyle\min\limits_{\mathbf{E}_{[\imath]},\mathbf{P}_{[\imath]},\mathbf{U}_{\text{r}/\text{t}},\mathbf{V}_{[\imath],k},\mathbf{R}_{[\imath],\text{s}},p_{n},\rho_{2}}\quad$
$\displaystyle\text{Tr}(\mathbf{E}_{[\imath]}^{-1})+\frac{1}{2\rho_{2}}\sum_{n=1}^{N-1}(p_{n}-p_{n}^{2})$
(33a) s.t.
$\displaystyle\eqref{16b},\eqref{16c},\eqref{18},\eqref{19d}-\eqref{19f},\eqref{30f},\eqref{32},$
(33b) $\displaystyle\sum_{n=1}^{N-1}p_{n}=1.$ (33c)

Thereinto, when $\rho_{2}\rightarrow\infty$, the penalty term
$p_{n}-p_{n}^{2}$ approaches $0$, which would be equivalent to integer
constraint $p_{n}\in\\{0,1\\}$. In the inner loop, we adopt the AO framework
to optimize the transmit power $\mathbf{P}_{[\imath]}$, the ISAC waveform
$\mathbf{R}_{[\imath],\text{s}}$, the reflection/transmission coefficients
$\mathbf{U}_{\text{r}/\text{t}}$ and the weight coefficient $p_{n}$.

###  IV-D Joint Beamforming and Elements Optimization

####  IV-D1 Receive beamforming optimization

With fixed
$\\{\mathbf{P}_{[\imath]},\mathbf{U}_{\text{r}/\text{t}},\mathbf{R}_{[\imath],\text{s}},p_{n}\\}$,
problem (33) is equivalent to the following feasible detection problem with
respect to $\\{\mathbf{V}_{[\imath],k}\\}$.

$\displaystyle\mathop{{\rm{find}}}\quad$
$\displaystyle\mathbf{V}_{[\imath],k}$ (34a) s.t.
$\displaystyle\text{rank}(\mathbf{V}_{[\imath],k})=1,$ (34b)
$\displaystyle\eqref{30f},\eqref{32},$ (34c)

which can be efficiently handled by using penalty-based rank-one relaxation
method [31]. The converted problem is given by

$\displaystyle\min\limits_{\mathbf{V}_{[\imath],k}}\quad$
$\displaystyle\frac{1}{2\rho_{1}}\left[\text{Tr}(\mathbf{V}_{[\imath],k})-\|\mathbf{V}_{[\imath],k}^{[n-1]}\|_{2}-\text{Tr}(\mathbf{\bar{v}}_{[\imath],k}^{[n-1]}(\mathbf{\bar{v}}_{[\imath],k}^{[n-1]})^{H}(\mathbf{V}_{[\imath],k}\mathbf{V}_{[\imath],k}^{[n-1]}))\right]$
(35a) s.t. $\displaystyle\eqref{30f},\eqref{32},$ (35b)

where $\mathbf{V}_{[\imath],k}^{[n-1]}$ is the given point determined by
($n-1$)-th iteration and $\mathbf{\bar{v}}_{[\imath],k}^{[n-1]}$ is the
leading eigenvector of $\mathbf{V}_{[\imath],k}^{[n-1]}$. Note that the
optimal $\mathbf{v}_{[\imath],k}$ can be obtained by carrying out SCA
iterations with the accuracy $\epsilon_{v}$.

####  IV-D2 Transmit power and sensing waveform optimization

With fixed
$\\{\mathbf{U}_{\text{r}/\text{t}},\mathbf{v}_{[\imath],k},p_{n}\\}$, problem
(33) is reduced to

$\displaystyle\min\limits_{\mathbf{R}_{[\imath],\text{s}},\mathbf{E}_{[\imath]},\mathbf{P}_{[\imath]}}\quad$
$\displaystyle\text{Tr}(\mathbf{E}_{[\imath]}^{-1})$ (36a) s.t.
$\displaystyle\eqref{16b},\eqref{18},\eqref{20c},\eqref{32},$ (36b)

The optimal solutions
$\\{\mathbf{R}_{[\imath],\text{s}},\mathbf{P}_{[\imath]}\\}$ can be easily
obtained by solving the SDP problem (36).

####  IV-D3 Reflection/transmission coefficient optimization

With fixed
$\\{\mathbf{R}_{[\imath],\text{s}},\mathbf{P}_{[\imath]},\mathbf{v}_{[\imath],k},p_{n}\\}$
and the transformation of (22), problem (33) can be re-expressed as

$\displaystyle\min\limits_{\mathbf{E}_{[\imath]},\mathbf{U}_{\text{r}/\text{t}}}\quad$
$\displaystyle\text{Tr}(\mathbf{E}_{[\imath]}^{-1})$ (37a) s.t.
$\displaystyle\eqref{18},\eqref{19d}-\eqref{19f},\eqref{32},$ (37b)

which can be optimally solved by Algorithm 1.

####  IV-D4 Weight coefficient optimization

With the fixed
$\\{\mathbf{R}_{[\imath],\text{s}},\mathbf{P}_{[\imath]},\mathbf{v}_{[\imath],k},\mathbf{U}_{\text{r}/\text{t}}\\}$,
the following AL problem is obtained.

$\displaystyle\min\limits_{\mathbf{E}_{[\imath]},p_{n}}\quad$
$\displaystyle\text{Tr}(\mathbf{E}_{[\imath]}^{-1})+\frac{1}{2\rho_{2}}\sum_{n=1}^{N-1}(p_{n}-p_{n}^{2})$
(38a) s.t. $\displaystyle\eqref{18},\eqref{20c},\eqref{32},\eqref{33c}.$ (38b)

To handle the non-convex penalty term $p_{n}-p_{n}^{2}$, we adopt the first-
order Taylor expansion to construct the linear upper bound approximation
expression at $m$-th iteration, i.e.,

$\displaystyle p_{n}-p_{n}^{2}\leq
p_{n}-(p_{n}^{[m-1]})^{2}-2p_{n}^{[m-1]}(p_{n}-p_{n}^{[m-1]}),$ (39)

where $p_{n}^{[m-1]}$ denotes the optimized value of $p_{n}$ at $(m-1)$-th
iteration. By substituting the right-hand side of (39) into the penalty term
of the objective function (38a), the problem (38) becomes convex with respect
to $p_{n}$ and can be solved over the SCA iterations. The details of the SCA
algorithm to optimize weight coefficient is summarized in Algorithm 3.

Algorithm 3 SCA algorithm for weight coefficient optimization.

1: Initialize $p_{n}^{[m-1]}$ and
$\text{Tr}(\text{CRB}(\bm{\Psi}_{[\imath]}))^{[m-1]}$ with $m=1$. Set a
convergence accuracy $\epsilon_{3}$.

2: repeat

3: update $p_{n}^{[m]}$ by solving problem (38).

4: calculate the $\text{Tr}(\text{CRB}(\bm{\Psi}_{[\imath]}))^{[m]}$ and set
$m=m+1$.

5: until
$|\text{Tr}(\text{CRB}(\bm{\Psi}_{[\imath]}))^{[m]}-\text{Tr}(\text{CRB}(\bm{\Psi}_{[\imath]}))^{[m-1]}|\leq\epsilon_{3}$.

In the outer loop, we consider initializing $\rho_{2}$ as a large value to
make the integer constraint trivial at the beginning, so that we can find a
good starting point for original problem. Then, we gradually decrease
$\rho_{2}$ over the outer loop iterations to obtain the feasible solution.

###  IV-E Overall Algorithm

The overall algorithm is summarized in Algorithm 4. Similarly, since the
optimal transmit power, sensing waveform, reflection/transmission coefficients
and weight coefficients are guaranteed at each step, the proposed PDL
algorithm theoretically converges to the stationary point solution over the
non-increasing iterations. For the computational complexity, the entire
complexity of Algorithm 4 relies on the complexity to solve the SDP problems
(35), (36) (37) and (38). By exploiting the interior-point method, the
computational complexity of PDL algorithm at the $\imath$-th phase can be
expressed as
$\mathcal{O}\Big{(}l_{\text{out}}\log(\frac{1}{\epsilon_{2}})\big{(}\log(\frac{1}{\epsilon_{v}})(M_{\text{r}}^{2})^{3.5}+(M_{\text{t}}^{2}+4+K_{\imath})^{3.5}+\log(\frac{1}{\epsilon_{1}})(N^{2}+4)^{3.5}+\log(\frac{1}{\epsilon_{3}})(N+3)^{3.5}\big{)}\Big{)}$
[32], where $K_{\imath}=K_{1}$ in case of $\imath=1$, $K_{\imath}=K-K_{1}$ in
case of $\imath=2$, and $l_{\text{out}}$ denotes the iteration number required
in the outer loop.

Algorithm 4 Penalty-based double-loop algorithm.

1: Initialize
$\\{\mathbf{U}_{\text{r}/\text{t}}^{[m-1]},p_{n}^{[m-1]},\text{Tr}(\text{CRB}(\bm{\Psi}_{[\imath]}))^{[m-1]}\\}$
with $m=1$ and $\rho_{2}^{[l-1]}$ with $l=1$. Set the convergence accuracy
$\\{\epsilon_{2},\rho_{\text{th}}\\}$.

2: repeat

3: repeat

4: update $\mathbf{v}_{[\imath],k}^{[m]}$ by solving problem (35).

5: update
$\\{\mathbf{R}_{[\imath],\text{s}}^{[m]},\mathbf{P}_{[\imath]}^{[m]}\\}$ by
solving problem (36).

6: update $\mathbf{U}_{\text{r}/\text{t}}^{[m]}$ by carrying out Algorithm 1
to solve problem (37).

7: update $p_{n}^{[m]}$ by carrying out Algorithm 3 to solve problem (38).

8: calculate the CRB value
$\text{Tr}(\text{CRB}(\bm{\Psi}_{[\imath]}))^{[m]}$and set $m=m+1$.

9: until
$|\text{Tr}(\text{CRB}(\bm{\Psi}_{[\imath]}))^{[m]}-\text{Tr}(\text{CRB}(\bm{\Psi}_{[\imath]}))^{[m-1]}|\leq\rho_{\text{th}}$.

10: $\rho_{2}^{[l]}=\frac{\rho_{2}^{[l]}}{c_{2}}$ ($c_{2}>1$) and set $l=l+1$.

11: until The penalty term $\sum_{n=1}^{N-1}(p_{n}-p_{n}^{2})$ drops below
$\epsilon_{2}$.

##  V Numerical Results

Figure 2: Top view of the simulation setup.

In this section, the numerical results are provided to demonstrate the
effectiveness of the proposed strategy. The top view of a three-dimensional
coordinate network simulation setup is illustrated in Fig. 2, where the BS is
located at $(0,0,0)$ m, and the STARS is located at a distance of $50$ m from
the BS, i.e., $(25\sqrt{2},25\sqrt{2},0)$ m. $\text{U}_{k}$ is randomly
distributed on a circle with a radius of $d_{k}$ m centred on STARS, while
$\text{T}_{1}$ and $\text{T}_{1}$ are located at a distance of $10$ m from the
STARS with the directions of $(342^{\circ},30^{\circ})$ and
$(18^{\circ},30^{\circ})$. The path loss at the unit reference distance is set
as $L_{0}=-30$ dB, the path-loss exponents for communication links are set as
$2.2$, the path-loss exponents of sensing links are set as $2.5$, the noise
power is set as $-115$ dBm, $T=10$, $N_{\text{v}}=5$, and
$N_{\text{h}}=\frac{N}{N_{\text{v}}}$. The other simulation parameters are
listed in the caption of each figure. Moreover, each figure is the average
result over the $100$ independent Monte-Carlo experiments.

###  V-A Verification of Lemma 1 and Corollary 1

Figure 3: Accuracy of the approximated ergodic rate versus $\kappa$ with
$M_{\text{r}}=8$, $M_{\text{t}}=16$, $d_{1}=20$ m, $K=2$, $d_{2}=10$ m, and
$P_{\text{U},\text{max}}=15$ dBm.

Figure 4: The maximum number of sensor deployment versus the transmit power
budget at the users with $N=20$, $M_{\text{r}}=1$, $M_{\text{t}}=4$, $K=2$,
$d_{k}=20$ m, and $P_{\text{BS},\text{max}}=15$ dBm.

The accuracy of the approximated ergodic rate expression derived in Lemma 1 is
verified in Fig. 4, where the identity reflection/transmission coefficients
$\mathbf{U}_{\text{r}/\text{t}}=\mathbf{I}_{N_{1}}$ are adopted and the
numerical ergoric rate is calculated based on the $10000$ independent
channels. It is shown that the approximated ergodic rate is accurate to the
actual ergodic rate for different $N_{1}$, and $\text{U}_{2}$ achieves higher
ergodic rate. These observations are expected since 1) the average non-LoS
components follow the complex Gaussian distribution with unit variance due to
the law of large numbers; and 2) $\text{U}_{1}$ suffers the severer large-
scale path loss than $\text{U}_{2}$. It is also observed that the achievable
ergodic rate firstly increases with the rise of $\kappa$ and gradually turns
into stable. This is since that 1) when the $\kappa$ is relatively small,
increasing $\kappa$ can make the LoS components prodominate and provide the
stronger transmission links; and 2) when $\kappa$ becomes large, the Rician
channels tend to be the constant pure LoS channels.

In Fig. 4, we evaluate the the maximum-number sensor deployment policy derived
in Corollary 1 for both the transmission (T) and reflection (R) phases, where
the actual maximum number of sensors are obtained by solving the feasible
detection problem with different number of sensors for $100$ independent
channel realizations. Firstly, we can observe that the analytical maximum
number of sensors is exactly equal to the numerical results. Also can be seen,
the maximum number of sensors for T phase and R phase are equal. This is
intuitive because the maximum-number sensor deployment is only restricted by
the corresponding QoS target rates, which are the same for different phases in
the considered network. Moreover, when $P_{\text{U},\text{max}}$ increases and
$R_{\text{er,\text{t}}}$ decreases, less PEs would be required to satisfy the
QoS constraint, so a significant upward trend in the number of sensors can be
observed.

Figure 5: The estimated azimuth and elevation angles via the MLE method with
$N=20$, $N_{1}=5$, $M_{\text{r}}=M_{\text{t}}=8$, $K=2$, $d_{k}=20$ m,
$R_{\text{er,\text{t}}}=2.5$ bps/Hz, and
$P_{\text{U},\text{max}}=P_{\text{BS},\text{max}}=35$ dBm.

Figure 6: Convergence of the proposed algorithms with the common parameters
$N=20$, $M_{\text{r}}=8$, and $d_{k}=20$ m.

###  V-B Effectiveness of Proposed Algorithms

To demonstrate the correctness of the proposed algorithms from the perspective
of sensing accuracy, the MLE spectrum lines under the two-user and fixed
number of sensors are illustrated in Fig. 6, where the estimated DOA angle can
be determined by the exhaustive search of the highest value point of the MLE
spectrum [21, Appendix E]. As such, we can observe that the MLE estimates
angles are $(-17.9904^{\circ},29.9999^{\circ})$ and
$(17.9904^{\circ},29.9999^{\circ})$, respectively, which perfectly align with
the presupposed DOA angles $(342^{\circ},30^{\circ})$ and
$(18^{\circ},30^{\circ})$ and validate the effectiveness of the optimized
sensing waveform and reflection/transmission coefficients. Fig. 6 plots the
convergence performance of the proposed algorithms, where $M_{\text{t}}=8$,
$N_{1}=15$, $K=2$, $R_{\text{er,\text{t}}}=2.5$ bps/Hz,
$P_{\text{U},\text{max}}=25$ dBm, $P_{\text{BS},\text{max}}=35$ dBm are
adopted for AO algorithm, while $M_{\text{t}}=12$, $K=4$,
$R_{\text{er,\text{t}}}=0.5$ bps/Hz,
$P_{\text{U},\text{max}}=P_{\text{BS},\text{max}}=45$ dBm are set for PDL
algorithm. Note that for coinciding with the practical DOA angles, we
transform the radian-based root CRB into the degree unit in Fig. 6. As can be
observed, both algorithms are capable of converging to the stationary point
solutions within the finite iterations. This is because the optimal solutions
at each step for solving the subproblem can be guaranteed in both two
algorithms, which ensures a non-increasing trend over the iterations.
Meanwhile, we can observe that R phase achieves smaller CRB compared to the T
phase. It can be explained by the fact that in the R phase, the STARS
reconfigure the communication signal from the users and the sensing signal
from the BS as a new probing signal for estimation, which introduces more DoFs
and enhance the received echo energy, thus improving the sensing performance.

Figure 7: The root CRB versus the QoS target rate with $N=20$, $N_{1}=10$,
$M_{\text{r}}=M_{\text{t}}=8$, $K=2$, $d_{k}=20$ m,
$P_{\text{U},\text{max}}=15$ dBm, and $P_{\text{BS},\text{max}}=30$ dBm .

Figure 8: The root CRB versus the transmit power budget at the BS with with
$N=20$, $M_{\text{r}}=8$, $M_{\text{r}}=12$, $K=4$, $d_{k}=20$ m,
$R_{\text{er,\text{t}}}=1$ bps/Hz, and $P_{\text{U},\text{max}}=45$ dBm.

###  V-C Performance Comparison

To verify the performance of the proposed scheme, we consider following
benchmark schemes for comparison:

  * •

C-RIS-AO: In the “conventional-RIS-AO” (C-RIS-AO) scheme, we consider
replacing the STARS by a reflecting-only RIS and a transmitting-only RIS,
where the proposed AO algorithm is modified to jointly optimize the
coefficients of PEs at conventional RIS, transmit power at users and the
receive beamforming at the BS under the two-user and fixed sensor number
setup. For fairness comparison, each conventional RIS is assumed to possess
$\frac{N_{1}}{2}$ PEs and $\frac{N_{2}}{2}$ sensors.

  * •

STARS-COC: In the “STARS-communication-oriented coefficients (COC)” scheme,
the reflection/transmission coefficients of PEs is determined by maximizing
the minimum ergodic rate of the user, i.e.,
$\bm{\Theta}_{\text{r}/\text{t}}^{\text{COC}}=\max\limits_{\bm{\Theta}_{\text{r}/\text{t}}}\
\min\limits_{k}\ \mathbb{E}\\{R_{[\imath],k}\\}$.

  * •

C-RIS-PDL: In the “C-RIS-PDL” scheme, we deploy an $\frac{N}{2}$-element
reflecting-only RIS and an $\frac{N}{2}$-element transmitting-only RIS at the
same location of STARS, where the proposed PDL algorithm is modified to
jointly optimize the number of sensors, the coefficients of PEs, transmit
power at users and the receive beamforming at the BS.

  * •

STARS-exhaustive-search: In the “STARS-exhaustive-search” scheme, we
independently optimize $N-1$ subproblems with respect to the
reflection/transmission coefficients, transmit power and the beamforming at
the BS, where $p_{n}=1$ ($\sum_{n}^{N-1}p_{n}=1$) is set for the $n$-th
subproblem. Then, we choose the smallest CRB as the final solution of this
scheme.

As depicted in Fig. 8 and Fig. 8, the proposed scheme can always achieve
better sensing performance compared to the conventional RIS. This can be
expected since the STARS enables the double number of elements, which
introduces more spatial DoFs for supporting the communication and sensing. In
Fig. 8, it is also observed that the sensing performance of the considered
network deteriorates with the increasing QoS target rate, and the STARS-COC
scheme achieves the worst performance. An intuitive explanation for the
phenomenon is: 1) both the sensing and communication relies on the
coefficients setup of PEs, so when the QoS rate increases, STARS has to
prioritise support for communications to satisfy the QoS constraints, which
leads to a reduction in sensing performance; and 2) since the STARS-COC scheme
only focuses on the communication performance improvement, which would
inevitably sacrifice the accuracy of sensing. Moreover, we can observe that
the CRB achieved by the STARS-COC scheme does not vary with the QoS changes
from Fig. 8. This is because the impact of QoS target rate on the sensing
performance can only be realized by affecting the coefficients of PEs, which
indicates that the sensing performance is independent of the QoS constraint
under any fixed reflection/transmission coefficients setup. For the Fig. 8, we
can observe that the proposed PDL algorithm can achieves the comparable
performance of the optimal solution via the exhaustive search, which
significantly validates the equivalence of the derived ECRB expression in
Proposition 1.

###  V-D Impact of STARS Elements

Figure 9: The root CRB versus the number of STARS elements with $K=4$,
$d_{k}=20$ m, $R_{\text{er,\text{t}}}=0.5$ bps/Hz, and
$P_{\text{U},\text{max}}=P_{\text{BS},\text{max}}=45$ dBm.

Figure 10: Benchmarks under 2-user setup with $N=20$, $M_{\text{r}}=8$,
$M_{\text{t}}=12$, $d_{k}=20$ m, $R_{\text{er,\text{t}}}=0.5$ bps/Hz,
$P_{\text{U},\text{max}}=P_{\text{BS},\text{max}}=45$ dBm, and
$N_{\text{v}}=10$.

Fig. 10 investigates the influence of STARS element number on the sensing
performance. Firstly, It can be observed that the root CRB monotonically
decreases as $N$ increases. This is because:1)a larger $N$ can provide a
higher array gains; and 2) under the near-optimal allocation of number of
sensors, increasing $N$ also increases the number of sensors, which improves
the sensing reception ability at the sensing array. We can also observe an
interesting result that increasing number of transmit antennas at the BS
significantly reduces the root CRB, but increasing number of receive antennas
at the BS has almost no effect on the CRB. This is resulted from the bi-
directional sensing-STARS architecture. Specifically, by exploiting this
architecture, the receive antenna at the BS is only responsible for receiving
the communication signal, which implies that we only need the number of
receive antennas that meets the QoS requirements in the considered network.
However, increasing transmit antenna can expand the DoFs of the sensing
waveform, which provides a more flexible design of the sensing waveform for
supporting the sensing.

In Fig. 10, we illustrate the impact of the number of sensors under the fixed
total number of STARS elements. It can be seen that when the number of sensors
is less than 7, deploying more sensors than PEs are preferable, and when the
number of sensors is larger than 7, increasing the number of sensors can
hardly bring the constructive impact to the network anymore. It reveals that
there exists a trade-off between the the number of sensors and PEs. In detail,
with a small number of sensors, it is required to deploy more sensors to
obtain sufficient echo sampling resolution to extract target information.
Whereas, in the case of large number of sensors, the information loss of the
sensing targets caused by insufficient echo sampling resolution is relatively
small. Thus, deploying more PEs to provide more DoFs for both communication
and sensing becomes the dominant factor in the sensing performance.
Furthermore, we observe that increasing number of users degrades the sensing
performance, which is expected since the reflection/transmission coefficients
of PEs needs to be more oriented towards enhancing communications for
satisfying the QoS requirements of users.

##  VI Conclusion

A new STARS-empowered ISAC scheme was proposed, where a bi-directional
sensing-STARS architecture was devised to support the full-space communication
and sensing tasks. Two efficient algorithms were developed to obtain the near-
optimal solutions of the CRB minimization problems. The correctness and
effectiveness of proposed scheme was demonstrated by the experiment results.
It was also unveiled that: 1) STARS was capable of providing superior
performance compared to the conventional RIS; 2) under the unique design of
bi-directional sensing-STARS architecture, the number of receive antennas at
the BS has little impact on the sensing performance; 3) increasing number of
PEs is more appealing than sensors for sensing performance improvement. This
work validated the potential of STARS in supporting full-space dual-functional
transmissions, and revealed an endogenous tradeoff that how do we determine
the number of sensors to be deployed. Both of them provided useful guidance
for practical system design.

## Appendix A: Derivation of FIM Matrix

According (11), the element matrix in FIM matrix $\mathbf{F}_{[i]}$ can be
expressed as

$\displaystyle\mathbf{J}_{\bm{\Psi}_{[\imath]}\bm{\Psi}_{[\imath]}}=\frac{2}{\sigma^{2}}\begin{bmatrix}\Re\left(\frac{\partial\mathbf{q}_{[\imath]}^{H}}{\partial\varphi_{[\imath]}}\frac{\partial\mathbf{q}_{[\imath]}}{\partial\varphi_{[\imath]}}\right)&\Re\left(\frac{\partial\mathbf{q}_{[\imath]}^{H}}{\partial\varphi_{[\imath]}}\frac{\partial\mathbf{q}_{[\imath]}}{\partial\phi_{[\imath]}}\right)\\\
\Re\left(\frac{\partial\mathbf{q}_{[\imath]}^{H}}{\partial\phi_{[\imath]}}\frac{\partial\mathbf{q}_{[\imath]}}{\partial\varphi_{[\imath]}}\right)&\Re\left(\frac{\partial\mathbf{q}_{[\imath]}^{H}}{\partial\phi_{[\imath]}}\frac{\partial\mathbf{q}_{[\imath]}}{\partial\phi_{[\imath]}}\right)\end{bmatrix},$
(A-1)

where
$\frac{\partial\mathbf{q}_{[\imath]}}{\partial\bm{\Psi}_{[\imath]}[h]}\\!=\\!\text{vec}\\!\left(\\!\alpha_{[\imath]}\left[\frac{\partial\mathbf{b}(\varphi_{[\imath]},\phi_{[\imath]})}{\partial\bm{\Psi}_{[\imath]}[h]}\mathbf{a}^{T}(\varphi_{[\imath]},\phi_{[\imath]})\\!+\\!\mathbf{b}(\varphi_{[\imath]},\phi_{[\imath]})\frac{\partial\mathbf{a}^{T}(\varphi_{[\imath]},\phi_{[\imath]})}{\partial\bm{\Psi}_{[\imath]}[h]}\right]\bm{\Theta}_{\text{r}/\text{t}}\mathbf{X}_{[\imath]}\right)$
($1\leq h\leq 2$). With the derivative chain rule, we have

$\displaystyle\frac{\partial\bm{\epsilon}(\varphi_{[\imath]},\phi_{[\imath]})}{\partial\bm{\Psi}_{[\imath]}[h]}=\bm{\epsilon}(\varphi_{[\imath]},\phi_{[\imath]})\odot\bm{\dot{\epsilon}}_{\bm{\Psi}_{[\imath]}[h]},\quad\bm{\epsilon}(\varphi_{[\imath]},\phi_{[\imath]})\in\\{\mathbf{a}(\varphi_{[\imath]},\phi_{[\imath]}),\mathbf{b}(\varphi_{[\imath]},\phi_{[\imath]})\\},$
(A-2)

where the $n$-th elements of $\bm{\dot{\epsilon}}_{\bm{\Psi}_{[\imath]}[h]}$
are given by

$\displaystyle\bm{\dot{\epsilon}}_{\bm{\Psi}_{[\imath]}[h]}[n]=\begin{cases}\jmath\bar{n}\pi\cos\phi_{[\imath]}\cos\varphi_{[\imath]},\quad&\text{if}\
h=1,\\\
\jmath(-\bar{n}\pi\sin\phi_{[\imath]}\sin\varphi_{[\imath]}+(n-1-N_{\text{h}}\bar{n})\pi\cos\phi_{[\imath]}),\quad&\text{if}\
h=2,\end{cases}$

Let
$\mathbf{\dot{Q}}_{\bm{\Psi}_{[\imath]}[h]}=\frac{\partial\mathbf{b}(\varphi_{[\imath]},\phi_{[\imath]})}{\partial\bm{\Psi}_{[\imath]}[h]}\mathbf{a}^{T}(\varphi_{[\imath]},\phi_{[\imath]})\\!+\\!\mathbf{b}(\varphi_{[\imath]},\phi_{[\imath]})\frac{\partial\mathbf{a}^{T}(\varphi_{[\imath]},\phi_{[\imath]})}{\partial\bm{\Psi}_{[\imath]}[h]}$,
we can rewrite $\mathbf{J}_{\bm{\Psi}_{[\imath]}\bm{\Psi}_{[\imath]}}$ as

$\displaystyle\mathbf{J}_{\bm{\Psi}_{[\imath]}\bm{\Psi}_{[\imath]}}=\frac{2T|\alpha_{[\imath]}|^{2}}{\sigma^{2}}\Re\left(\begin{bmatrix}\text{Tr}(\mathbf{\dot{Q}}_{\varphi_{[\imath]}}\bm{\Theta}_{\text{r}/\text{t}}\mathbf{R}_{\mathbf{x}_{[\imath]}}\bm{\Theta}_{\text{r}/\text{t}}^{H}\mathbf{\dot{Q}}_{\varphi_{[\imath]}}^{H})&\text{Tr}(\mathbf{\dot{Q}}_{\varphi_{[\imath]}}\bm{\Theta}_{\text{r}/\text{t}}\mathbf{R}_{\mathbf{x}_{[\imath]}}\bm{\Theta}_{\text{r}/\text{t}}^{H}\mathbf{\dot{Q}}_{\phi_{[\imath]}}^{H})\\\
\text{Tr}(\mathbf{\dot{Q}}_{\phi_{[\imath]}}\bm{\Theta}_{\text{r}/\text{t}}\mathbf{R}_{\mathbf{x}_{[\imath]}}\bm{\Theta}_{\text{r}/\text{t}}^{H}\mathbf{\dot{Q}}_{\varphi_{[\imath]}}^{H})&\text{Tr}(\mathbf{\dot{Q}}_{\phi_{[\imath]}}\bm{\Theta}_{\text{r}/\text{t}}\mathbf{R}_{\mathbf{x}_{[\imath]}}\bm{\Theta}_{\text{r}/\text{t}}^{H}\mathbf{\dot{Q}}_{\phi_{[\imath]}}^{H})\end{bmatrix}\right),$
(A-4)

where
$\mathbf{R}_{\mathbf{X}_{[\imath]}}\approx\frac{1}{T}\mathbf{X}_{[\imath]}\mathbf{X}_{[\imath]}^{H}$.
Similarly, let
$\mathbf{Q}_{[\imath]}=\mathbf{b}(\varphi_{[\imath]},\phi_{[\imath]})\mathbf{a}^{T}(\varphi_{[\imath]},\phi_{[\imath]})$,
we can obtain

$\displaystyle\mathbf{J}_{\bm{\Psi}_{[\imath]}\bm{\alpha}_{[\imath]}}=\frac{2T}{\sigma^{2}}\Re\left(\begin{bmatrix}\tilde{\alpha}_{[\imath]}\text{Tr}(\mathbf{Q}_{[\imath]}\bm{\Theta}_{\text{r}/\text{t}}\mathbf{R}_{\mathbf{x}_{[\imath]}}\bm{\Theta}_{\text{r}/\text{t}}^{H}\mathbf{\dot{Q}}_{\varphi_{[\imath]}}^{H})&\jmath\tilde{\alpha}_{[\imath]}\text{Tr}(\mathbf{Q}_{[\imath]}\bm{\Theta}_{\text{r}/\text{t}}\mathbf{R}_{\mathbf{x}_{[\imath]}}\bm{\Theta}_{\text{r}/\text{t}}^{H}\mathbf{\dot{Q}}_{\varphi_{[\imath]}}^{H})\\\
\tilde{\alpha}_{[\imath]}\text{Tr}(\mathbf{Q}_{[\imath]}\bm{\Theta}_{\text{r}/\text{t}}\mathbf{R}_{\mathbf{x}_{[\imath]}}\bm{\Theta}_{\text{r}/\text{t}}^{H}\mathbf{\dot{Q}}_{\varphi_{[\imath]}}^{H})&\jmath\tilde{\alpha}_{[\imath]}\text{Tr}(\mathbf{Q}_{[\imath]}\bm{\Theta}_{\text{r}/\text{t}}\mathbf{R}_{\mathbf{x}_{[\imath]}}\bm{\Theta}_{\text{r}/\text{t}}^{H}\mathbf{\dot{Q}}_{\varphi_{[\imath]}}^{H})\end{bmatrix}\right),$
(A-5)
$\displaystyle\mathbf{J}_{\bm{\alpha}_{[\imath]}\bm{\alpha}_{[\imath]}}=\frac{2T}{\sigma^{2}}\text{Tr}(\mathbf{Q}_{[\imath]}\bm{\Theta}_{\text{r}/\text{t}}\mathbf{R}_{\mathbf{x}_{[\imath]}}\bm{\Theta}_{\text{r}/\text{t}}^{H}\mathbf{Q}_{[\imath]}^{H})\mathbf{I}_{2}.$
(A-6)

This completes the derivation.

## Appendix B: Derivation of Ergodic Rate

With the results in [33, Lemma 1], the ergodic rate is approximated as

$\displaystyle\mathbb{E}\\{R_{[\imath],k}\\}\approx\frac{1}{2}\log_{2}\left(1+\frac{P_{k}\mathbb{E}\\{\|\mathbf{h}_{k,\text{S}}^{H}\bm{\Theta}_{\text{r}/\text{t}}\mathbf{G}_{\text{r}}\|^{2}\\}}{\sigma^{2}}\right).$
(B-1)

Substituting (1) into (B-1), we can obatin

$\displaystyle\mathbb{E}\\{\|\mathbf{h}_{k,\text{S}}^{H}\bm{\Theta}_{\text{r}/\text{t}}\mathbf{G}_{\text{r}}\|^{2}\\}\\!$
$\displaystyle=\\!\mathbb{E}\\!\left\\{\left\|\Bigg{(}\sqrt{\frac{\kappa
L_{k,\text{S}}^{2}}{1+\kappa}}\mathbf{\hat{h}}_{k,\text{S}}^{H}\\!+\\!\sqrt{\frac{L_{k,\text{S}}^{2}}{1+\kappa}}\mathbf{\tilde{h}}_{k,\text{S}}^{H}\Bigg{)}\bm{\Theta}_{\text{r}/\text{t}}\Bigg{(}\sqrt{\frac{\kappa
L_{\text{r}}^{2}}{1+\kappa}}\mathbf{\hat{G}}_{\text{r}}\\!+\\!\sqrt{\frac{L_{\text{r}}^{2}}{1+\kappa}}\mathbf{\tilde{G}}_{\text{r}}\Bigg{)}\right\|^{2}\right\\},$
$\displaystyle\overset{(a)}{=}\frac{L_{k,\text{S}}^{2}L_{\text{r}}^{2}}{(1+\kappa)^{2}}\Big{(}\kappa^{2}\mathbb{E}\\{\|\mathbf{\hat{h}}_{k,\text{S}}^{H}\bm{\Theta}_{\text{r}/\text{t}}\mathbf{\hat{G}}_{\text{r}}\|^{2}\\}+\kappa\mathbb{E}\\{\|\mathbf{\hat{h}}_{k,\text{S}}^{H}\bm{\Theta}_{\text{r}/\text{t}}\mathbf{\tilde{G}}_{\text{r}}\|^{2}\\}+$
$\displaystyle\qquad\qquad\qquad\kappa\mathbb{E}\\{\|\mathbf{\tilde{h}}_{k,\text{S}}^{H}\bm{\Theta}_{\text{r}/\text{t}}\mathbf{\hat{G}}_{\text{r}}\|^{2}\\}+\mathbb{E}\\{\|\mathbf{\tilde{h}}_{k,\text{S}}^{H}\bm{\Theta}_{\text{r}/\text{t}}\mathbf{\tilde{G}}_{\text{r}}\|^{2}\\}\Big{)},$
$\displaystyle\overset{(b)}{=}\frac{\Big{(}\kappa^{2}\|\mathbf{\hat{h}}_{k,\text{S}}^{H}\bm{\Theta}_{\text{r}/\text{t}}\mathbf{\hat{G}}_{\text{r}}\|^{2}\\!+\\!\kappa
M_{\text{r}}\|\mathbf{\hat{h}}_{k,\text{S}}^{H}\bm{\Theta}_{\text{r}/\text{t}}\|^{2}\\!+\\!\kappa\|\bm{\Theta}_{\text{r}/\text{t}}\mathbf{\hat{G}}_{\text{r}}\|^{2}_{\text{F}}\\!+\\!M_{\text{r}}\|\bm{\Theta}_{\text{r}/\text{t}}\|^{2}_{\text{F}}\Big{)}}{\nicefrac{{(1+\kappa)^{2}}}{{L_{k,\text{S}}^{2}L_{\text{r}}^{2}}}},$
(B-2)

where equality (a) holds because the $\mathbf{\tilde{h}}_{k,\text{S}}$ and
$\mathbf{\tilde{G}}_{\text{r}}$ are independent of each other, while equality
(b) holds since all the elements in $\mathbf{\tilde{h}}_{k,\text{S}}$ and
$\mathbf{\tilde{G}}_{\text{r}}$ follow the complex Gaussian distribution with
zero mean and unit variance. With the result of (B-2), we can easily obtain
the approximated ergodic rate expression in Lemma 1. This completes the proof.

## Appendix C: Proof of Corollary 1

For the considered problem (16), we can readily know that achieving the
maximum-number sensor deployment is tantamount to search for the minimum-
dimensional reflection/transmission coefficients and the feasible transmit
power that satisfy the QoS constraint, i.e.,

$\displaystyle\mathop{{\rm{find}}}\quad\\{\bm{\Theta}_{\text{r}/\text{t}}^{\text{min}},\mathbf{P}\\}$
(C-1a)
$\displaystyle\quad\text{s.t.}\quad\eqref{16d},\eqref{16f},\eqref{16g},$
(C-2b)

where $\bm{\Theta}_{\text{r}/\text{t}}^{\text{min}}$ denotes the minimum-
dimensional coefficient matrix. By substituting $M_{\text{r}}=1$ to the
ergodic rate expression in Lemma 1, it is readily to show that when the
reflection/transmission coefficients of PEs are aligned to the cascaded
channels
$\mathbf{\hat{h}}_{k,\text{S}}^{H}\bm{\Theta}_{\text{r}/\text{t}}\mathbf{\hat{g}}_{\text{r}}$,
i.e., the reflection/transmission coefficients derived in (24), and
$P_{k}=P_{\text{U},\text{max}}$ holds, it achieves the best communication
performance with the least $N_{1}$. As such, constraint (19) can be
transformed into

$\frac{\kappa^{2}}{(1+\kappa)^{2}}N_{1}^{2}+\frac{2\kappa+1}{(1+\kappa)^{2}}N_{1}-\frac{(2^{2R_{\text{er},\text{t}}}-1)\sigma^{2}}{P_{\text{U},\text{max}}L_{k,\text{S}}^{2}L_{\text{r}}^{2}}\geq
0.$ (C-3)

Resorting the standard quadratic-root formula and the non-negativity of
$N_{1}$, the minimum $N_{1}^{\text{min}}$ can be determined. Thus, the maximum
$N_{2}^{\text{max}}$ can be derived as shown in (25) based on
$N_{1}^{\text{min}}+N_{2}^{\text{max}}=N$. This completes the proof.

## Appendix D: Derivation of Extended FIM Matrix

Firstly, we can rewrite (11) as

$\displaystyle\mathbf{y}_{[\imath],\text{s}}=\underbrace{\text{vec}\big{(}\alpha_{[\imath]}\mathbf{B}\bm{\varepsilon}_{[\imath]}\bm{\varepsilon}_{[\imath]}^{T}\mathbf{A}\bm{\Theta}_{\text{r}/\text{t}}\mathbf{X}_{[\imath]}}_{\mathbf{q}_{[\imath]}}\big{)}+\mathbf{n}_{[\imath]},$
(D-1)

where $\mathbf{X}_{[\imath]}\in\mathbb{C}^{N\times T}$ is the equivalent
signal matrix with regarding the whole STARS as PEs. Similar to Appendix A, we
have

$\displaystyle\frac{\partial\mathbf{q}_{[\imath]}}{\partial\bm{\Psi}_{[\imath]}[h]}=\text{vec}\left(\alpha_{[\imath]}\mathbf{B}\left[\frac{\partial\bm{\varepsilon}_{[\imath]}}{\partial\bm{\Psi}_{[\imath]}[h]}\bm{\varepsilon}_{[\imath]}^{T}+\bm{\varepsilon}_{[\imath]}\frac{\partial\bm{\varepsilon}_{[\imath]}^{T}}{\partial\bm{\Psi}_{[\imath]}[h]}\right]\mathbf{A}\bm{\Theta}_{\text{r}/\text{t}}\mathbf{X}_{[\imath]}\right),\quad
1\leq h\leq 2,$ (D-2)

where
$\frac{\partial\bm{\varepsilon}_{[\imath]}}{\partial\bm{\Psi}_{[\imath]}[h]}$
is given in (A-2) and (Appendix A: Derivation of FIM Matrix) with $1\leq n\leq
N$. Hence, the $h$-th row and $v$-th column element of
$\mathbf{J}_{\bm{\Psi}_{[\imath]}\bm{\Psi}_{[\imath]}}$ is given by

$\displaystyle\frac{\partial\mathbf{q}_{[\imath]}^{H}}{\partial\bm{\Psi}_{[\imath]}[h]}\frac{\partial\mathbf{q}_{[\imath]}}{\partial\bm{\Psi}_{[\imath]}[v]}$
$\displaystyle=\text{vec}\big{(}\alpha_{[\imath]}\mathbf{B}\mathbf{\dot{C}}_{\bm{\Psi}_{[\imath]}[h]}\mathbf{A}\bm{\Theta}_{\text{r}/\text{t}}\mathbf{X}_{[\imath]}\big{)}^{H}\text{vec}\big{(}\alpha_{[\imath]}\mathbf{B}\mathbf{\dot{C}}_{\bm{\Psi}_{[\imath]}[v]}\mathbf{A}\bm{\Theta}_{\text{r}/\text{t}}\mathbf{X}_{[\imath]}\big{)},$
$\displaystyle=T|\alpha_{[\imath]}|^{2}\text{Tr}\left(\mathbf{B}\mathbf{\dot{C}}_{\bm{\Psi}_{[\imath]}[v]}\mathbf{A}\bm{\Theta}^{\text{r}/\text{t}}\mathbf{R}_{\mathbf{X}_{[\imath]}}\bm{\Theta}_{\text{r}/\text{t}}^{H}\mathbf{A}\mathbf{\dot{C}}_{\bm{\Psi}_{[\imath]}[h]}^{H}\mathbf{B}\right),\
1\leq h,v\leq 2,$ (D-3)

where
$\mathbf{\dot{C}}_{\bm{\Psi}_{[\imath]}[h]}=\frac{\partial\bm{\varepsilon}_{[\imath]}}{\partial\bm{\Psi}_{[\imath]}[h]}\bm{\varepsilon}_{[\imath]}^{T}+\bm{\varepsilon}_{[\imath]}\frac{\partial\bm{\varepsilon}_{[\imath]}^{T}}{\partial\bm{\Psi}_{[\imath]}[h]}$.
In the same way, the $h$-th row and $v$-th column element of
$\mathbf{J}_{\bm{\Psi}_{[\imath]}\bm{\alpha}_{[\imath]}}$ and the $h$-th
element on the diagonal of
$\mathbf{J}_{\bm{\alpha}_{[\imath]}\bm{\alpha}_{[\imath]}}$ can be rewritten
as

$\displaystyle\frac{\partial\mathbf{q}_{[\imath]}^{H}}{\partial\bm{\Psi}_{[\imath]}[h]}\frac{\partial\mathbf{q}_{[\imath]}}{\partial\bm{\alpha}_{[\imath]}[v]}$
$\displaystyle=T(\jmath)^{v-1}\tilde{\alpha}_{[\imath]}\text{Tr}\left(\mathbf{B}\mathbf{C}_{[\imath]}\mathbf{A}\bm{\Theta}^{\text{r}/\text{t}}\mathbf{R}_{\mathbf{X}_{[\imath]}}\bm{\Theta}_{\text{r}/\text{t}}^{H}\mathbf{A}\mathbf{\dot{C}}_{\bm{\Psi}_{[\imath]}[h]}^{H}\mathbf{B}\right),1\leq
h,v\leq 2,$ (D-4)
$\displaystyle\frac{\partial\mathbf{q}_{[\imath]}^{H}}{\partial\bm{\alpha}_{[\imath]}[h]}\frac{\partial\mathbf{q}_{[\imath]}}{\partial\bm{\alpha}_{[\imath]}[h]}$
$\displaystyle=T\text{Tr}\left(\mathbf{B}\mathbf{C}_{[\imath]}\mathbf{A}\bm{\Theta}^{\text{r}/\text{t}}\mathbf{R}_{\mathbf{X}_{[\imath]}}\bm{\Theta}_{\text{r}/\text{t}}^{H}\mathbf{A}\mathbf{C}_{[\imath]}^{H}\mathbf{B}\right),1\leq
h\leq 2,$ (D-5)

where
$\mathbf{C}_{[\imath]}=\bm{\varepsilon}_{[\imath]}\bm{\varepsilon}_{[\imath]}^{T}$.
Substituting (D-3)–(D-5) into (A-4)–(A-6), we can obtain the extended FIM
matrix in Proposition 1. Then, we prove the equivalence between the extended
FIM matrix $\mathbf{F}_{[\imath]}$ and the original FIM matrix
$\mathbf{F}_{[\imath]}^{\text{o}}$ under any given $\mathbf{A}$ and
$\mathbf{B}$. To elaborate, let
$\mathbf{b}^{\text{p}}\in\mathbb{C}^{N_{2}\times 1}$ and
$\mathbf{a}^{\text{p}}\in\mathbb{C}^{N_{1}\times 1}$ denote the practical
steering vectors at the sensors and PEs, the received echo signal can be
expressed as
$\mathbf{E}_{[\imath]}^{\text{p}}=\alpha_{[\imath]}\mathbf{b}^{\text{p}}(\mathbf{a}^{\text{p}})^{T}\bm{\Theta}_{\text{r}/\text{t}}\mathbf{X}_{[\imath]}$.
With this in hand, it is easy to obtain the following identity.

$\displaystyle\left\|\frac{\partial\mathbf{q}_{[\imath]}}{\bm{\varsigma}_{[\imath]}[i]}\right\|=\left\|\frac{\partial\text{vec}\left(\left[\mathbf{0},\mathbf{0};\mathbf{E}_{[\imath]}^{\text{p}},\mathbf{0}\right]\right)}{\bm{\varsigma}_{[\imath]}[i]}\right\|=\left\|\frac{\partial\mathbf{q}_{[\imath]}^{\text{p}}}{\bm{\varsigma}_{[\imath]}[i]}\right\|,\quad
1\leq i\leq 4,$ (D-6)

where
$\mathbf{q}_{[\imath]}^{\text{p}}=\text{vec}(\mathbf{E}_{[\imath]}^{\text{p}})$.
Therefore, the $h$-th row and $v$-th column element of the extended FIM matrix
is exactly equivalent to that of the original FIM matrix, i.e.,

$\displaystyle\mathbf{F}_{[\imath]}[h,v]=\frac{\partial\mathbf{q}_{[\imath]}^{H}}{\bm{\varsigma}_{[\imath]}[h]}\frac{\partial\mathbf{q}_{[\imath]}}{\partial\bm{\varsigma}_{[\imath]}[v]}=\frac{\partial(\mathbf{q}_{[\imath]}^{\text{p}})^{H}}{\bm{\varsigma}_{[\imath]}[h]}\frac{\partial\mathbf{q}_{[\imath]}^{\text{p}}}{\partial\bm{\varsigma}_{[\imath]}[v]}=\mathbf{F}_{[\imath]}^{\text{o}}[h,v],\quad
1\leq h,v\leq 4.$ (D-7)

This completes the proof.

## References

  * [1] K. B. Letaief, W. Chen, Y. Shi, J. Zhang, and Y. -J. A. Zhang, “The roadmap to 6G: AI empowered wireless networks,” IEEE Commun. Mag., vol. 57, no. 8, pp. 84–-90, Aug. 2019.
  * [2] HUAWEI, “6G: The Next Horizon White Paper,” Huawei, While Paper, Jan. 2022. [Online]. Available: https://www.huawei.com/uk/huaweitech/future-technologies/6g-white-paper
  * [3] Samsung Research, “6G: The next hyper connected experience for all,” Samsung, While Paper, 2020. [Online]. Available: https://research.samsung.com/next-generation-communications
  * [4] F. Liu, Y. Cui, et al. “Integrated sensing and communications: Towards dual-functional wireless networks for 6G and beyond,” IEEE J. Sel. Areas Commun., vol. 40, no. 6, pp. 1728–1767, Jun. 2022.
  * [5] F. Liu, C. Masouros, A. P. Petropulu, H. Griffiths, and L. Hanzo, “Joint radar and communication design: Applications, state-of-the-art, and the road ahead,” IEEE Trans. Commun., vol. 68, no. 6, pp. 3834–3862, Jun. 2020.
  * [6] Z. Zhang, Y. Xiao, Z. Ma, M. Xiao, Z. Ding, X. Lei, G. K. Karagiannidis, and P. Fan, “6G wireless networks: Vision, requirements, architecture, and key technologies,” IEEE Trans. Veh. Mag., vol. 14, no. 3, pp. 28–-41, Sep. 2019.
  * [7] M. Di Renzo, A. Zappone, et al. “Smart radio environments empowered by reconfigurable intelligent surfaces: How it works, state of research, and road ahead,” IEEE J. Sel. Areas Commun., vol. 38, no. 11, pp. 2450–2525, Nov. 2020.
  * [8] Y. Liu, X. Liu, X. Mu, T. Hou, J. Xu, M. Di Renzo, and N. Al-Dhahir, “Reconfigurable intelligent surfaces: Principles and opportunities,” IEEE Commun. Surv. Tut., vol. 23, no. 3, pp. 1546–1577, 3rd Quart. 2021.
  * [9] X. Mu, Y. Liu, L. Guo, J. Lin, and R. Schober, “Simultaneously transmitting and reflecting (STAR) RIS aided wireless communications,” IEEE Trans. Wireless Commun., vol. 21, no. 5, pp. 3083–3098, May. 2022.
  * [10] Y. Liu, X. Mu, J. Xu, R. Schober, Y. Hao, H. V. Poor, and L. Hanzo, “STAR: Simultaneous transmission and reflection for 360∘ coverage by intelligent surfaces,” IEEE Wireless Commun., vol. 28, no. 6, pp. 102–109, Dec. 2021.
  * [11] J. Xu, Y. Liu, et al. “Simultaneously transmitting and reflecting (STAR) intelligent omni-surfaces, their modeling and implementation,” IEEE Veh. Technol. Mag., vol. 17, no. 2, pp. 46–54, Jun. 2022.
  * [12] F. Liu, C. Masouros, A. Li, H. Sun, and L. Hanzo, “MU-MIMO communications with MIMO radar: From co-existence to joint transmission,” IEEE Trans. Wireless Commun., vol. 17, no. 4, pp. 2755–-2770, Apr. 2018.
  * [13] F. Liu, L. Zhou, C. Masouros, A. Li, W. Luo, and A. Petropulu, “Toward dual-functional radar-communication systems: Optimal waveform design,” IEEE Trans. Signal Process., vol. 66, no. 16, pp. 4264–4279, Aug. 2018.
  * [14] X. Liu, T. Huang, N. Shlezinger, Y. Liu, J. Zhou, and Y. C. Eldar, “Joint transmit beamforming for multiuser MIMO communications and MIMO radar,” IEEE Trans. Signal Process., vol. 68, pp. 3929–3944, Jun. 2020.
  * [15] F. Liu, Y. -F. Liu, A. Li, C. Masouros, and Y. C. Eldar, “Cram$\acute{\text{e}}$r-Rao bound optimization for joint radar-communication beamforming,” IEEE Trans. Signal Process., vol. 70, pp. 240–253, 2022.
  * [16] F. Dong, F. Liu, Y. Cui, W. Wang, K. Han, and Z. Wang, “Sensing as a service in 6G perceptive networks: A unified framework for ISAC resource allocation,” IEEE Trans. Wireless Commun., to be published, doi: 10.1109/TWC.2022.3219463.
  * [17] Y. Wang, W. Zhang, C. Liu, J. Sun, and C. -X. Wang, “Reconfigurable intelligent surface for NLOS integrated sensing and communications,” in Proc. IEEE/CIC Int. Conf. Commun. China (ICCC), Foshan, China, Aug. 2022, pp. 708-712.
  * [18] H. Luo, R. Liu, M. Li, Y. Liu, and Q. Liu, “Joint beamforming design for RIS-assisted integrated sensing and communication systems,” IEEE Trans. Veh. Technol., vol. 71, no. 12, pp. 13393–13397, Dec. 2022.
  * [19] H. Zhang, “Joint waveform and phase shift design for RIS-assisted integrated sensing and communication based on mutual information,” IEEE Commun. Lett., vol. 26, no. 10, pp. 2317–2321, Oct. 2022.
  * [20] X. Wang, Z. Fei, et al. “Joint waveform and discrete phase shift design for RIS-assisted integrated sensing and communication system under Cram$\acute{\text{e}}$r-Rao bound constraint,” IEEE Trans. Veh. Technol., vol. 71, no. 1, pp. 1004–1009, Jan. 2022.
  * [21] X. Song, J. Xu, F. Liu, T. X. Han, and Y. C. Eldar, “Intelligent reflecting surface enabled sensing: Cram$\acute{\text{e}}$r-Rao bound optimization,” [Online]. Available: https://arxiv.org/abs/2207.05611v1
  * [22] X. Shao, C. You, W. Ma, X. Chen, and R. Zhang, “Target sensing with intelligent reflecting surface: Architecture and performance,” IEEE J. Sel. Areas Commun., vol. 40, no. 7, pp. 2070–-2084, Mar. 2022.
  * [23] Z. Yu, X. Hu, C. Liu, M. Peng, and C. Zhong, “Location sensing and beamforming design for IRS-enabled multi-user ISAC systems,” IEEE Trans. Signal Process., vol. 70, pp. 5178–5193, 2022.
  * [24] X. Hu, C. Liu, M. Peng, and C. Zhong, “IRS-based integrated location sensing and communication for mmWave SIMO systems,” IEEE Trans. Wireless Commun., to be published, doi: 10.1109/TWC.2022.3223428.
  * [25] Z. Wang, X. Mu, and Y. Liu, “STARS enabled integrated sensing and communications,” [Online]. Available: https://arxiv.org/abs/2207.10748
  * [26] J. Xu, X. Mu, J. T. Zhou, and Y. Liu “Simultaneously transmitting and reflecting (STAR)-RISs: Are they applicable to dual-sided incidence?” IEEE Wireless Commun. Lett., to be published, doi: 10.1109/LWC.2022.3219017.
  * [27] V. Arun and H. Balakrishnan, “RFocus: Beamforming using thousands of passive antennas,” in USENIX Symp. Networked Syst. Design Implement., Feb. 2020, pp. 1047–1061.
  * [28] S. M. Kay, Fundamentals of statistical signal processing: estimation theory. Englewood Cliffs, NJ: Prentice–Hall, 1993.
  * [29] I. Bekkerman and J. Tabrikian, “Target detection and localization using MIMO radars and sonars,,” IEEE Trans. Signal Process., vol. 54, no. 10, pp. 3873–3883, Oct. 2006.
  * [30] S. Boyd, S. P. Boyd, and L. Vandenberghe, Convex optimization. Cambridge, U.K.: Cambridge university press, 2004.
  * [31] X. Yu, D. Xu, Y. Sun, D. W. K. Ng, and R. Schober, “Robust and secure wireless communications via intelligent reflecting surfaces,” IEEE J. Sel. Areas Commun., vol. 38, no. 11, pp. 2637–2652, Nov. 2020.
  * [32] Z. Luo, W. Ma, A. M. So, Y. Ye, and S. Zhang, “Semidefinite relaxation of quadratic optimization problems,” IEEE Signal Process. Mag., vol. 27, no. 3, pp. 20–34, May. 2010.
  * [33] Q. Zhang, S. Jin, K.-K. Wong, H. Zhu, and M. Matthaiou, “Power scaling of uplink massive MIMO systems with arbitraryrank channel means,” IEEE J. Sel. Top. Signal Process., vol. 8, no. 5, pp. 966–981, Oct. 2014.