## 2 System Setup  
This research was conducted on an in-house-developed laser-based DED system. Figure 1 shows a simplified illustration of the system setup, where the transmissions of energy and signal are represented by solid arrows. A six-axis IRB-4400 industrial robot (ABB, Zurich, Switzerland) carried the optical head and a two-axis IRBP-A positioner (ABB, Zurich, Switzerland) held the substrate. The laser beam with 1070 nm wavelength was supplied by a YLS-6000 Ytterbium laser source (IPG Photonics, Oxford, MA, USA) with the maximum power of 6 kW. A BIMO optical head (HIGHYAG, Kleinmachnow, Germany) received the laser beam via fiber and focused the beam onto the substrate as it melted the metal powders. A powder feeder (GTV, Luckenbach, Germany) was used to deliver the metallic powder to the nozzle installed at the bottom of the optical head. A WAT-902B charged-couple device (CCD) camera (Watec, NY, USA) was mounted on the optical head. Through a series of reflective optics, the melt pool image could be captured by the CCD camera coaxially. The viewing direction was perpendicular to the melt pool that was located at the center of the camera view. The melt pool emits a larger amount of near-infrared (NIR) radiation than its surroundings due to its higher temperature. Therefore, a NIR band-pass filter with a bandwidth of 780-1000 nm was attached to the CCD camera so that the melt pool could be isolated from the surroundings without sensing the diffusively reflected 1070 nm laser.  
A personal computer (PC) running an Ubuntu 18.04 LTS operating system was used as the main controller. It was responsible for sensor data collection, image processing, and control algorithm execution. The output channel of the CCD camera was connected to the controlling PC that received the digital image data via a USB 3.0 port. The raw image in grey-scale pixels was processed by a series of computer vision algorithms using the OpenCV library [17]. The melt pool area was cropped from the raw image by a circular mask that has a diameter slightly smaller than that of the nozzle outlet so that the NIR light reflected by the nozzle's inner surface could be removed. Then, a filter with a prescribed threshold was applied to binarize the melt pool image, after which an ellipse was fit into the binary image, as shown in Figure 1. The melt pool width (MPW) was approximated by the minor axis of the resulting ellipse. The MPW is influenced by the quality of interlayer fusion and heat transfer mode, and it is an indicator of the part integrity and surface roughness of DED-fabricated parts [6]. Therefore, the MPW value was sent to the controller as the feedback data. The proposed data-driven adaptive controller was implemented in an in-house-developed software program running on the PC. The output of the controller was the analog voltage signal supplied to the laser source. The laser voltage ranging from 0 to 10 V determined the actual laser power. The digital on/off signal of the laser emission was sent from the robot's control box to the laser source via hardwiring, which did not interfere with the laser voltage sent from the PC. The computation of the output laser voltage based on the feedback melt pool data using the proposed control strategy is discussed in the next section.