## 1 Introduction  
With the exponential growth of wireless data transmission applications in various scenarios, 5G communications at mmWaves frequency bands provide new valuable radio spectrum for wireless communications [1; 2; 3]. The large available bandwidth of mmWaves communications can greatly increase the speed of wireless data transmission in numerous applications [4; 5; 6]. Notably, not only has the US Federal Communications Commission (FCC) released considerable available spectrum in the 28-73 GHz band but also the bands available in the future are being reviewed [7; 8; 9]. Hence, mmWave has great promise for research and application. However, the high propagation loss and the low signal-to-noise ration (SNR) at mmWave frequencies have limited the rapid expansion of mmWave communications to a considerable extent [10; 11]. In order to overcome the above mentioned drawbacks of mmWave and to increase the range of mmWave radio transmission, directional high gain antennas are widely used as system transmitter (Tx) or receiver (Rx) in communication systems [12; 13; 14]. However, as the gain of the antenna increases, the beam-width of the antenna decreases, which reduces the effective coverage of the antenna. To ensure reliable communication in dynamic scenarios where locations of Tx/Rx and propagation scenarios are time-variant, beam-tracking is of critical importance. Furthermore, electrical beam-steering of phased arrays is essential to support real-time tracking of the dominant propagation paths [15; 16; 17]. Phased array systems are widely used in mmWave systems, where each radio frequency chain consists of an antenna, a phase shifter and an attenuator [18]. The phase and amplitude excitation of each element can be designed with the help of the phase shifters and attenuators so that the phased array beam pattern can be steered to given spatial directions. AiP system combines all the antennas and control circuits of a phased array system into a single package. This allows for low development and maintenance costs, fast product iterations, easy installation and portability, and low operational energy consumption. AiP technology has been widely used in mmWave, for instance, radios, automotive radars, imaging sensors [19; 20; 21]. In this paper, the main hardware and control architecture of an 8 \(\times\) 8 AiP which is extended based on the 4 \(\times\) 4 AiP design architecture presented in [22] are introduced. A series of experiments are conducted to verify the AiP stability and evaluate the accuracy of elemental composite weight control, before the application of the AiP. Further, two application examples of the AiP are presented, where the AiP is used as an experimental platform for phased array calibration and mmWave channel sounding, respectively, as detailed below:  
Beamforming of a phased array system is achieved by properly setting the complex weight for each element. Therefore it is crucial to calibrate out the initial excitations of array elements to guarantee the beamforming performance. Different calibration methods have been proposed in the literature, aminly for sub-6 GHz frequency bands [23; 24; 25; 26]. In this work, we aim to investigate how well the calibration method works in practical mmWave phased arrays. More specifically, we would like to investigate (1) how stable the AiP works (2) how temperature of the AiP affects the array calibration accuracy (3) to which extend the calibration can help improve the beamforming performance and (4) how accurate array calibration the different calibration methods can achieve in practical mmWave AiPs. In addition, it is worth noting that channel measurement and characterization are essential for wireless system development, and much work is actively being done on mmWave channel sounding [27; 28; 29; 30]. The state-of-art channel sounder systems, either mechanically rotating a directional antenna (typically a horn antenna) [31] or an omni-directional antenna to form a virtual array [32], suffer from long measuring time.