Control of Additive Manufacturing for Radio Frequency Devices With Spatially Varying Dielectric Properties

Additive manufacturing (AM) is increasingly being used to fabricate end-use and high-value-added parts in a range of industries. AM’s ability to create complex geometries and vary the internal composition of a part has enabled the design of many novel devices, including radio frequency (RF) devices that rely on the spatial variation of electromagnetic (EM) properties. However, current AM processes for fabricating complex parts are typically run without any part monitoring or online feedback control, and as a result, the printed parts may be compromised by defects or have poor tolerances. Manufacturing parts in this way also requires extra quality testing since there is no knowledge of their interior quality. For these reasons, introducing process monitoring and corrective action to the AM process has become an important area of research as AM is being used to create safety-critical parts. This work proposes a control algorithm to enable closed-loop control of an EM property, specifically dielectric permittivity, within a print using a fused filament fabrication (FFF) printer. The control system used a split-ring resonator (SRR) to measure the permittivity of printed thermoplastic, and the control action was applied by updating the printed infill density layer to layer. This control system was tested by printing a proof-of-concept graded-index (GRIN) lens with spatially varying permittivity through the lens’ length. The results demonstrate the ability of the controller to follow a constantly varying reference signal, indicating the potential of closed-loop control for improved fabrication of functional RF devices that depend on precise variations in relative permittivity.

bonding to the previous layer.Compared to traditional subtractive manufacturing methods, such as computer numerical control (CNC) milling, AM offers a number of advantages such as saving material waste and energy, lower prototyping costs, and the ability to create otherwise impossible geometries.The layer-by-layer nature of AM provides precision engineering for parts that require complex geometries or spatially varying compositions.While AM has traditionally been used for rapid prototyping [1], [2], it is increasingly being used to manufacture final parts, particularly those with high value-added.Development of novel printing methods and materials has enabled the fabrication of high-value-added parts via AM in a range of industrial applications [3], including lightweight machinery [2], medical devices and implants [1], and aerospace structures [4].
Despite the many advantages of AM, fabricating parts incrementally, layer by layer also has limitations.In particular, producing parts in large numbers remains difficult due to long fabrication times and the lack of online quality control.AM processes are generally implemented as open-loop systems, meaning that no information is collected about the part during printing.By not collecting data during the print process, the printer is unable to provide online disturbance detection and fault rejection.This lack of feedback control can lead to poor-quality parts that have high porosities, poor interlayer bonding, or rough surface finishes.Not only can such blemishes impact the part's appearance, but they can also impact their performance, for example, they may cause unwanted wave reflections in radio frequency (RF) devices.Several aspects of the printing process may introduce errors or defects in a part.Oropallo and Piegl [5] have proposed that the majority of disturbances encountered within AM can be separated into two categories: process errors and material errors.Process errors are caused by mechanical problems (e.g., belts skipping due to low tension around a pulley) or improperly set printing parameters (e.g., temperature set too low/high, printing speed too fast, etc.).Material errors are caused by variations in the feedstock material, for example, due to improper storage [6], which can allow the material to absorb moisture from the air, causing air bubbles or buildup of material in the printed object.Both types of errors have been observed to cause printing imperfections that may propagate through subsequent layers (e.g., millimeter-scale pores) and, in some cases, have the potential to ruin a printed part in its entirety.
As AM parts are increasingly being used for industrial applications where certain properties are necessary, there is a growing need to introduce systems capable of: 1) detecting errors online and 2) applying corrective action to mitigate their effect.This is especially important for safety-critical systems (such as in aerospace applications), as the failure of such parts can have serious consequences.Incorporating feedback control into the printing process may even reduce the need for testing of the printed parts since their quality will have been monitored during the printing process.Enabling in situ detection and correction of errors and disturbances in an AM system has the potential to improve part tolerances; enable consistent, repeatable fabrication; reduce waste of time, resources, and energy; and deliver more reliable parts.
The potential value of feedback-controlled AM has motivated several studies, both for modeling and controller design, including [7], [8], [9], [10], [11], [12], [13], [14].In terms of modeling, designing effective control policies using a classical approach relies upon the existence of good predictive models of the system.Several control-oriented models of various AM processes have been developed, including those that describe the layer-to-layer spatial height evolution of a fused deposition modeling process [15] and of inkjet 3-D printing process [16] and also those describing melt pool dynamics in selective laser sintering [17].These models then allow feedback control systems to be designed to control process variables that improve part quality.Examples of control systems designed for AM include those involving the droplet volume [18], [19] and jet frequency [20] in inkjet printing, the global temperature in powder bed fusion [21], and the spatial flow rate in laser metal deposition [22].Feedback control systems have also been designed to control the mechanical properties within 3-D-printed parts.In [23], model predictive control was used to meet precise stiffness requirements of a printed beam, and [24] demonstrated the use of proportional-integralderivative (PID) control to regulate deposition microstructure.In [25] and [26], control of the related AM process of selective laser melting was considered and an approach that combined model predictive control with iterative learning was used to ensure a uniform temperature profile within the manufactured component.
In contrast to these existing studies focusing on mechanical properties and performance, this work aims to ensure that the printed part satisfies specific requirements of electromagnetic (EM) properties.The ability of AM to control and manipulate EM properties within the interior of a print has enabled the design of devices with applications in transformation optics [27], communications [28], and electronics [29].The EM property of interest in this work is dielectric permittivity ϵ, which is a measure of the electric polarizability of a dielectric (i.e., the ability of a material to hold an electric charge).When an electric field is applied, a material with high permittivity responds with higher polarization than a material with low permittivity, thereby storing more energy in a material [30].In practice, the key property of devices that manipulate EM waves is their relative permittivity ϵ r , which is defined as where ϵ is the permittivity of the medium and ϵ 0 is the absolute permittivity of the surrounding air or vacuum [31].Varying the spatial distribution of relative permittivity in a device can be used to control EM wave propagation [32], and this approach has been used to design several novel optical devices such as invisibility cloaks [33], [34], beam splitters [35], wave field concentrators [36], and flat reflectors [37].Controlling EM wave propagation has also led to innovative alternatives and miniaturization of classical radio frequency (RF) devices including photonic crystals [38], waveguides [39], power splitters [35], and beam collimators [40].The focus of this work is on designing feedback control policies to improve the performance of the AM fabrication process for RF devices.Printing is monitored and controlled to continuously vary permittivity through a 3-D printed part.In this way, the control problem can be considered as a reference tracking problem, with the reference being the desired permittivity at a specific location within the part.To demonstrate the applicability of this closed-loop control system, a proof-of-concept graded-index (GRIN) lens is fabricated.A lens is a common RF antenna component that is designed to transform spherical waves emanating from a focal point into planar waves [41].Refraction occurs through a lens as an EM wave passes from one homogeneous material to another, or from a gradual change in the refractive index η of a material.The refractive index depends upon ϵ r together with the magnetic permeability µ r according to η = (ϵ r µ r ) 1/2 .As shown in Fig. 1, classical lenses are made from a single material with a homogeneous index of refraction, but with a varying cross section that introduces a phase delay in the transmitted wave.However, the curved surfaces of the lens make them undesirable for antenna applications, where they need to be incorporated into other devices such as horns.An alternative approach is to use a GRIN lens, which is a flat lens that generates a phase delay by varying the refractive index in the direction perpendicular to the wave [32], [42].
AM has recently been used to manufacture GRIN lenses; a 3-D printed GRIN lens was formed using two materials with different relative permittivities that were mixed as a function of position [32].Alternatively, in [43], a GRIN lens was fabricated by varying the permittivity of a single material; concentric circles of differing infill density were printed to vary the permittivity from the lens center to the perimeter.Neither lens described in [32] nor in [43] was able to achieve a continuous radial variation in permittivity due to the inability to continuously mix materials within a layer and the resolution of the printer.Instead, the spatial distribution of permittivity in these lenses was discretized into small "zones" of constant permittivity.These discrete zones may, however, reduce device performance.This is because when a wave meets a boundary between two media of different permittivity, a portion of the wave is reflected instead of being transmitted through the boundary [44], and so the discrete changes in permittivity in both lenses may cause unwanted wave reflections within the device.
By contrast, in this article, continuous spatial variation of local permittivity through a part is achieved by using a feedback control system with a design considered as a reference tracking problem.This closed-loop solution allows changes to be made on a layer-by-layer basis, automatically as updated by the designed control system.
Contributions: The idea of using feedback to control the AM of components that have a spatial variation in permittivity has been introduced in [45], but the main results of this article are as follows.
1) The design and construction of a fused filament fabrication (FFF) 3-D printer containing a sensor that measures the permittivity of just-printed polymer and a closed-loop control process.
2) The dielectric characterization of printed polymer components and the development of a model for infill density's effect on dielectric permittivity.
3) The design of a proportional-integral (PI) controller for regulating the printed relative permittivity that includes a feedforward term.4) An assessment of the accuracy of the controller during the fabrication of a proof-of-concept GRIN lens.The results demonstrate the potential for feedback control to improve the quality of 3-D printed RF devices by enabling tighter part tolerances and online fault detection.
Paper structure: The article is structured as follows.Section II details the physical construction of the printer hardware and the sensor.Section III describes the system architecture of the printing workflow and data collection.Section IV describes the sensor's measurements and how they are processed.Section V presents the model identification and controller design process, while Section VI details the controller testing procedure, production of a proof-of-concept GRIN lens, and discussion of the test results.Section VII modifies the control system by adding a feed-forward term that is shown to compensate for the delay seen in the feedback control results of Section VI and improve performance.Section VIII provides concluding remarks and recommendations for future work.

II. PRINTING HARDWARE
The printing system hardware used to conduct experiments is shown in Fig. 2. The hardware was designed with three main components: 1) an FFF printer; 2) a sensor to measure the permittivity of each printed layer and enable feedback; and 3) a vector network analyzer (VNA) to generate and measure parameters associated with the dielectric sensor.FFF is a type of material extrusion printing, and it is one of the most commonly used AM processes for its ease of use, relatively low cost, and abundance of available printing materials.Also called fused deposition modeling (FDM), the process involves a continuous filament of a thermoplastic material fed through a heated extruder nozzle that is deposited layer by layer.The thermal energy in the moving filament is partially conducted to the previously printed layer on contact, providing molecular bonding between the heated material and the material printed below it [46].

A. Three-Dimensional Printer
The ToolChanger and motion system (E3D, Oxford, U.K.) was chosen as the printer due to its open frame (allowing for easy modification) and extensive tool-changing ability.The motion system [Fig.2(c)] contained a solid frame surrounding a 200 × 300 × 300 mm build volume.It was controlled by the Duet2 Wi-Fi Controller Board, a 32-bit processor that allowed either network or USB connectivity, and ran on opensource RepRapFirmware.Using a pickup and drop-off action, the ToolChanger allowed for up to four multifunction tools (e.g., print head, laser, or inspection camera) to be utilized during a single print.For the experiments described in this article, the ToolChanger was fit with a Direct Drive Hemera hot-end (V6 0.4 mm Nozzle X, E3D, Oxford, U.K.) as well as a compact dielectric sensor (see Section II-B) that could be moved through the build volume.The Hemera nozzle was chosen for the print head in this study because of its superior direct drive control, which allowed the flow rate of the filament to be precisely adjusted and facilitated the printing of flexible and abrasive materials.The Nozzle X is made from hardened tool steel and nickel plating, making it resistant to wear and allowing for printing temperatures of up to 500 • C.

B. Sensor Design
To implement online feedback control that regulates the relative permittivity ϵ r through a 3-D-printed part, a sensor was required that could take measurements of the local permittivity of each printed layer.The sensor was required to be nondestructive and able to operate in situ, that is, during the printing process.To satisfy these criteria, a split-ring resonator (SRR) device was selected as the sensor due to its ability to take measurements layer to layer and map the local relative permittivity within a 3-D-printed part, as demonstrated in [47].The SRR device was formed by placing two magnetic loops equidistant from a split ring (as shown in Fig. 3) to produce an electric field, causing the split ring to resonate at a frequency f 0 .The resonant frequency of the split-ring in air f 0,air can be modeled as an LC circuit with effective inductance L and total capacitance C. The total capacitance is the sum of the capacitance across the split in the ring C gap and the capacitance of the ring surface C ring [48].The parameters C gap , C ring , and L are characterized by the ring geometry (in particular, the width w, height h, outer radius r , and gap width g, as depicted in Fig. 4) and, using relationships from [49], can be calculated by ) where ϵ 0 and µ 0 are the free-space permittivity and permeability, respectively, and R m = r − (w/2) is the mean ring radius.When a material of relative permittivity greater than air, so that ϵ r > 1, is placed close to the SRR gap (<0.5 mm), the induced electric field across the gap is distorted, resulting in a measurable shift in resonant frequency f 0 .It is this distortion that is exploited in this work to measure EM properties online and enable feedback control.Following the modeling and experimental results of [50], the shift in the resonant frequency of the SRR due to the presence of a material, f 0,material , was observed to vary with the gap between the SRR and the material, so that the influence of the material on f 0,material increased as it got closer to the SRR.This led to the following relationship: which depends upon q, the gap between the SRR and the material, together with the fitting parameters n and M q < 0, the dynamic range, DR, which varies with the relative permittivity of the material, ϵ r , according to as plotted in [50], and the best-fit coefficient M e in ( 6) that depends on the geometry of the SRR.An expression relating the local permittivity of the material near the gap to the shifted resonant frequency of the SRR, f 0,air − f 0,material , and the gap distance, can then be obtained as For the results of this article, the values q = 0.2 mm and n = 0.1 were used and the parameters M e and M q were fit during the calibration of the SRR at the beginning of each print.Equation ( 7) maps the measured signal of the SRR, f 0,material , to the relative permittivity ϵ r , the variable of interest for the GRIN lens, which enables online measurements of the quality of the part.

C. Fabrication of the SRR
The SRR probe used in this article was built in-house.The two magnetic loops of the SRR were fabricated by bending the inner conductor of a copper semirigid coaxial cable (RG402, Farnell, Leeds, U.K.) into a loop and soldering the end onto its outer conductor.SMA (SubMiniature version A) 50 male connectors were soldered onto the other end of the RG402 cables.A single split copper ring was used with width w = 5.0 mm, height h = 0.9 mm, outer radius r = 10.9 mm, and gap width g = 0.5 mm (Fig. 4).The two magnetic loops were placed equidistant from the copper split ring and held in place by a 3-D-printed case.The case was designed to be printable and compatible with the ToolChanger, allowing the SRR to be swapped in and out during the printing process [Fig.2(c)].Fig. 3 shows an image of the constructed SRR filter measuring a print.

D. Integrating the VNA
A VNA was used to extract the forward transmission signal between the two magnetic loops in the SRR, which could later be used to calculate ϵ r of a material.Without access to a professional-grade VNA, low frequencies of 1-3 GHz were chosen as the operating frequencies.The NanoVNA-F V2 Portable VNA (SYSJOINT, Hangzhou, China) was selected as Authorized licensed use limited to the terms of the applicable license agreement with IEEE.Restrictions apply.it operated within the range of 1-3 GHz and was interfaced via a serial connection.The VNA was used to generate and receive the EM signals for the SRR's magnetic loops.Both transfer (TX) and receive (RX) ports were connected to the SRR's RG402 cables with straight 50 SMA-female to SMA-female adapters.While the use of a professional-grade VNA would allow higher frequencies to be measured, one of the strengths of the proposed setup is that it demonstrates that the feedback control of AM can be implemented using lowcost hardware, which improves its practicability.The VNA was secured to the ToolChanger's metal frame with a 3-D-printed case, allowing for ease of access to the VNA's power output, power switch, and TX/RX ports [Fig.2(d)].

III. SYSTEM ARCHITECTURE
The ToolChanger was run with the compatible DuetWe-bControl (DWC), a web-based user interface (UI) for electronics running on Duet boards.Connecting over a network, the DWC allows control of many of the printer's settings, including setting tool temperatures, running macro and print files, homing/moving each axis, and initiating printing.The DWC communicates with the printer using RepRap-style G-code, a programming language used primarily for the control of CNC machines.While the DWC was found to be a comprehensive UI for operating the ToolChanger, difficulties were encountered in using it to communicate with other devices in the hardware, such as the VNA.For this reason, a custom printing host was coded to enable a multidevice printing process capable of taking measurements between layers.
The code for the printing host was written in MATLAB because of its strong capability of interfacing with serial devices and microcontrollers.The G-code, used to set the printing parameters and divide the 3-D model into individual thin layers, was produced using "PrusaSlicer" slicing software.Implementing online feedback control on a layer-by-layer basis required reslicing the model upon each layer.
Another aspect of the printing host was to manage the process workflow by initiating operations, either with the ToolChanger to print a layer and move the SRR or with the VNA to take frequency measurements.Serial connections from a laptop [Fig.2(e)] to both objects allowed simultaneous control and timing through the workflow.A diagram presenting the hardware connectivity and their roles in the closed-loop printing process is shown in Fig. 5.All data collected were stored in a structured array and processed after printing had been completed.

IV. PROCESSING SENSOR DATA
To incorporate feedback control into the 3-D printing process and control the relative permittivity ϵ r , the material first had to be characterized for its dielectric properties.Polylactic acid (PLA; ϵ r ≈ 3) was chosen as the feedstock material for this initial characterization study because of its availability, printability, and low cost.

A. Minimizing Measurement Interference
The SRR's sampling distance was an important consideration when designing the printed part's shape.f 0 of the SRR was not only influenced by the point directly below the SRR gap, but also by an approximate semispherical shape around the point, with this sensitive region of the SRR being a function of the material's ϵ r [50].The width of this sampling volume was characterized by taking measurements from a printed homogeneous square, with dimensions 25 × 25 mm, to determine the distance upon which the change in permittivity of the "edge" between the part and the air could be detected.These measurements were taken in both the xand ydirections over the surface of the part, since the SRR's gap was either parallel or perpendicular to the edge, depending on its orientation.The results, shown in Fig. 6, demonstrate that the edge loses its effect on the SRR's f 0 after ∼6 mm separation from the edge in both the xand y-directions (as defined in Fig. 7).
A similar test was performed to characterize the sample volume depth (in the z-direction) and the print bed's effect on the measured f 0 .Measurements were taken in the center of a homogeneous square for 95 subsequent layers, with a layer height of 0.3 mm.As demonstrated in Fig. 8, the frequency reading remained constant after 80 layers, or beyond 24 mm from the print bed.Therefore, measurements of future prints would be restricted to 6 mm away from the prints' edges and after at least 80 layers; this minimized any interference on the SRR measurements from edges and the print bed.

B. Print Design
For ease of fabrication and rapid printing, a rectangular prism was chosen as the shape of the print to characterize the PLA.The findings from the sampling volume tests were used to design the dimensions of the print: a length and width 25 × 25 mm.Five SRR measurements were taken at each layer, near the center of the print to avoid edge interference, as depicted in Fig. 7. Measurements were taken on ten subsequent layers, but only after the print reached 24 mm in height to avoid interference from the print bed.To process the data, each of the five points was averaged through the ten layers.Next, the mean of the five points' averages was taken to give a single resonant frequency for a given print state.

V. CONTROLLER DESIGN
The first step in the design of the feedback control algorithm was to select an actuator that could correct for perturbations in the local permittivity of each layer.

A. Control Input Selection
Here, the focus was on controlling the relative permittivity of parts formed from printed (PLA, ϵ r ≈ 3), as measured by the change in SRR resonant frequency.Based on the findings in [51], three printing parameters were hypothesized to affect PLA's dielectric permittivity.
1) Layer height-the thickness of a layer in the z-direction.
2) Layer width-the width of the line that is extruded from the nozzle.3) Infill density-the percentage of interior volume that is filled with material, as illustrated in Fig. 9.The capabilities of these three printer properties as actuators in the feedback control system were then evaluated.
1) Layer Height: A set of prints was fabricated with varying layer heights from 0.15 to 0.32 mm following the recommendation that layer height be below 80% of the nozzle diameter.The prints were analyzed to determine how they had shifted f 0 , the resonant frequency of the SRR, compared to the resonant frequency in air, f 0,air .The results, shown in Fig. 10(a), indicate a negative correlation between the layer height and f 0 , the resonant frequency of the SRR due to the increased amount of extruded material per given layer height reducing the sample's overall porosity.Since the error bars overlap, however, the change in f 0 with layer height was not significant.
2) Layer Width: Layer width: Another set of prints was fabricated with layer widths changing from 0.41 to 0.5 mm.The layer width was expected to have a positive correlation Authorized licensed use limited to the terms of the applicable license agreement with IEEE.Restrictions apply.against a change in f 0 because wider paths would decrease the amount of air gaps within a layer.The results in Fig. 10(b) contradicted this hypothesis, probably due to poor path adhesion at certain layer widths.However, similar to layer height, the change in f 0 with layer width was not significant.
3) Infill Density: A final set of prints was fabricated with infill densities varying from 20% to 100%.Below 20%, the infill did not contain enough material to support the subsequent printed layers.The results, plotted in Fig. 10(c), show a clear positive correlation of infill density against the change in f 0 with a range of 77 MHz that is much greater than the 6-MHz range caused by a change in layer height, showing a change in infill can produce a large change in f 0 .The relatively small variance between the measurements at each level of infill indicates that using infill as the control variable is accurate and repeatable.As a result, infill density was selected as the variable to implement the feedback control action.

B. Model Relating Infill Density With SRR Resonant Frequency
The characterization studies of Fig. 10 show that the infill density is the best control input for this printing control problem because the changes to the infill density led to the largest range in achievable shifts in the resonant frequency (and hence the greatest level of control).Moreover, the data of Fig. 10(c) reveals a simple relationship between the change in the infill density and the shift in the SRR's resonant frequency, which is approximated by the affine mapping with g 0 = 0.986 and h 0 = −2.213.

C. Identification of System Dynamics From the Step Response
To design a feedback controller of the 3-D printing process, a model was required to predict how changes in the infill density (the control input) would affect f 0 of the SRR (the state being controlled).From inspecting the experimental data of open-loop step response, as shown in Fig. 11, it was observed that the layer-by-layer dynamics followed a firstorder response, where for layer k, the change in frequency can be described by the following recursion relationship: The corresponding transfer function is where Y (z) is the measured shift in SRR frequency and U (z) is the infill density.By estimating the time constant and steady-state values from the data of Fig. 11, the parameter values of a = b = 0.092 and c = −0.818were obtained for this model.

D. Controller Calibration
A PI controller was used to provide feedback control on the local layer permittivity, which has the form (with E(z) being the difference between the reference and measured f 0 ) and the state-space realization The gain values of k P = 1, k I = 0.25 were calculated after manual tuning to deliver a nonovershooting closed-loop response and a sufficiently fast settling time of approximately 20 layers.

VI. RESULTS AND DISCUSSION FOR FEEDBACK CONTROL
This section presents the experimental results showing the effectiveness of the feedback controller in response to step changes, disturbances, and a continually varying reference signal.The algorithm was implemented on printed rectangular prisms (Fig. 12) with base dimensions of 30 × 30 mm formed from the PLA whose properties were characterized in Section V.No control action was implemented for the first 100 layers of the print, with the system running in an open loop, to remove the influence of the print bed on the SRR measurements.At layer 100, the control action was then turned on, with the SRR taking measurements after each printed layer.

A. Step Responses
The first test of the controller explored its potential to mitigate the impact of a step change in the reference signal.The results are shown in Fig. 13 for a positive and negative step change in reference f 0 , with Fig. 13(b) showing the change in the infill printed at each layer and the control signal.A noticeable error between the measured and the desired resonant frequencies was observed when the system was running open-loop, that is, before the control algorithm was initiated at layer 100.After layer 100, f 0 reached the correct steady-state value in ∼15 layers, demonstrating the ability of the algorithm to improve part accuracy and accommodate sudden changes.The changing infill density control action applied by the algorithm [Fig.13(b)] shows the initial open-loop response followed by the corrections implemented to achieve the feedback control.

B. Pulse Disturbance
The ability of the proposed controller to reject a pulse disturbance, manually introduced at a single layer, was then examined.This disturbance was chosen as it mimics a printing error, such as the effect of a temporary blockage in the print head that disrupts the flow of the filament.The results of this test are shown in Fig. 14 for the case of a pulse disturbance of 80% infill density inserted at layer 180.These results again show the ability of the control system to quickly and Authorized licensed use limited to the terms of the applicable license agreement with IEEE.Restrictions apply.automatically detect disturbances and then apply corrective feedback to limit its impact on the printed part, both once the controller is turned on at layer 100 and after the negative step change.It is also observed that the control system detected the disturbance and provided correcting action to remove its influence, returning the f 0 measurements to their desired steady state of 30 MHz.These results highlight the potential of the controller for online rejection of disturbances.

C. GRIN Lens
Building upon the results of the step response and pulse disturbance, the performance of the control algorithm for manufacturing GRIN lenses was then evaluated.For this work, a proof-of-concept GRIN lens made from PLA was designed with a constantly varying relative permittivity.As presented in Section I, the wave phase shift in a flat lens is due to the varying refractive index η or permittivity ϵ along its radius.The exit beam was designed to have the same phase delay as the beam entering the center of the flat lens; to achieve this, the lens was designed to have its maximum permittivity in the center, decreasing permittivity along the radius, and minimum permittivity on either end.For simplicity of demonstrating a proof-of-concept lens, a simple quadratic was selected as the reference f 0 instead of the ideal distribution profile needed for functional lenses.The results, represented in Fig. 15, show the constant corrections made by the controller.The measured values of f 0 were in good agreement with the reference signal, demonstrating that a GRIN lens with specific changes in permittivity could be produced using this method.However, there was a delayed response in SRR measurements of six layers due to the influence of previous layers on the SRR's resonant frequency.

VII. FEEDFORWARD CONTROL
In the control system shown in Fig. 5, the input to the controller was the error between the reference f 0 (referred to as the true reference r t ) and the measured f 0 from the SRR.Using that control system design, it was assumed that the Fig. 16.Diagram of the feedforward loop with true reference r t , filtered reference r f , error e, system input u t , system output y t , and measured output y f .SRR's measurement was an accurate reading of the effect of the most recently deposited layer on the shift in resonant frequency.However, as shown in Fig. 8, the SRR's sampling volume was found to affect the measurement, and failure to account for this effect led to the delay in the response as seen in Fig. 5.To compensate for this delay in the control action, the control system has to be adjusted to preempt the reference being tracked and apply corrective action based on a filtered reference signal, referred to as r f , which accounted for the filtering effect of the SRR's measurement.As shown in Fig. 16, the control system of Fig. 5 was modified to include the feedforward signal, which is the true reference f 0 scaled by (1/g 0 ), the gain from infill density to SRR measurement.The error signal was then calculated as the difference between the filtered reference signal and the measurement from the SRR, where the filter was taken to be of first order with the same dynamics as G(z) in (10), so that The controller then generates the correction that needs to be applied to the infill by adding the error to the scaled feedforward signal to generate the control input.This control action is determined by the following two equations: where the signal v accounts for the control action due to the error between the filtered reference signal and the measurement of the SRR.

A. Results of Feedforward Control
Using the feed-forward control, another proof-of-concept GRIN lens where the reference f 0 following a parabolic profile was printed, and the experimental results are shown in Fig. 17.While the lens was designed to start and end with a f 0 of 40 MHz, the filtered reference signal instead ended with a f 0 of ∼44 MHz.This was due to the filtered reference being delayed by the filter F(z); the end value of the "true" reading was instead predicted to be at the desired value of 40 MHz, highlighting the importance of correctly designing the error signal.The measured data closely follows the reference signal (Fig. 17), demonstrating that the feedforward control has compensated for the delay observed in Fig. 15.

VIII. CONCLUSION
The successful implementation of feedback control in an FFF 3-D printer has been used to produce a proof-of-concept GRIN lens with a predesigned spatial variation of relative permittivity, in good agreement with the design.The lens was limited to a range of permittivities between air (ϵ r = 1) and PLA (ϵ r ≈ 3), but using a filament with a higher value of ϵ r will increase design flexibility and, in particular, will allow more compact lenses to be produced.Although the PLA lens described here can be manufactured within the limits of allowable infill densities (20%-100%), it is likely that for high-permittivity materials, these limits may constrain the process, in which case, model predictive control could be used to address these constraints.Although the simple PI controller was found to work well, the repetitive nature of the printing process suggests that, as has been found with other processes, iterative control may be a useful approach for manufacturing more complex parts.As a continuation of this research, a functional GRIN lens design will be manufactured in a single, controlled process, and then tested with an RF antenna to quantify and verify the benefits of a GRIN lens fabricated with process control.
Possible extensions to this work include minimizing the print bed and edge effects discussed in Section IV-A.One method to minimize these effects is to redesign the SRR to have a smaller gap g and distance to the printed part q.Alternatively, point-to-point online control, rather than the layer-by-layer control adopted here, could be implemented.Allowing the resonant frequency of the SRR to vary in the (x, y)-plane and implementing the control action as the layer is being deposited will lead to improved part tolerances, but also longer print times (scaling linearly at a rate O(n ms T pr ) with n ms being the number of measurements and T pr the measurement time).Instead of waiting for 80 layers to limit the effect of the print bed on the SRR's measurements (as considered in Section IV-A), the print bed could instead be treated as a known disturbance to be rejected using feed-forward control.With this approach, the time before online feedback control is implemented using the SRR could be significantly reduced.

Fig. 1 .
Fig. 1.Diagram of EM waves originating from a point source, being transformed to plane waves by propagating through (a) classical convex lens and (b) graded refractive index flat lens.

Fig. 2 .
Fig. 2. Photograph of (a) ToolChanger and motion system, (b) ToolHead that moves on the X Y -axes and performs the pickup/dropoff action for each tool, (c) SRR device in a 3-D printed case, (d) VNA attached to the frame, and (e) laptop containing the printing host and running the DuetWebControl UI.

Fig. 4 .
Fig. 4. Model of the SRR dimensions: width w, height h, outer radius r , and gap width g.

Fig. 5 .
Fig. 5. Illustration of the feedback loop used to implement online control of the permittivity of the GRIN lens.

Fig. 10 .
Fig. 10.Impact of changes in resonant frequency measured by the SRR sensor due to changes in (a) layer height, (b) layer width, and (c) infill density on the relative permittivity of the PLA test part.(a) Change in SRR δ f 0 as a function of layer height in PLA.(b) Change in SRR δ f 0 as a function of layer width in PLA.(c) Change in SRR δ f 0 as a function of infill density in PLA.

Fig. 12 .
Fig. 12.Part produced from controller tests.Each test printed the same base dimensions with varying infill densities through the part's height.

Fig. 13 .
Fig. 13.Results of a positive and negative step change introduced using closed-loop control.(a) Measured f 0 shown against the reference signal and simulated controller response.(b) Infill density is adjusted after layer 100 in response to the control action.

Fig. 14 .
Fig. 14. Results of a negative step change, followed by an impulse disturbance.(a) Measured f 0 shown against the reference signal and simulated controller response.(b) Infill density is adjusted after layer 100 in response to the control action.