0% found this document useful (0 votes)
10 views5 pages

Machine-Learning-Based_Design_Automation_for_Optimizing_Analog_RF_Circuit_Applications

This paper presents a machine-learning-based program for optimizing and automating the design of analog/RF circuits, leveraging the computational power of computers and AI algorithms. The program utilizes Python and LTspice to automate circuit simulations, allowing for efficient identification of optimal circuit parameters through the integration of various algorithms such as DQN and DDPG. The results demonstrate significant improvements in design efficiency and circuit performance, highlighting the potential of AI in circuit design automation.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views5 pages

Machine-Learning-Based_Design_Automation_for_Optimizing_Analog_RF_Circuit_Applications

This paper presents a machine-learning-based program for optimizing and automating the design of analog/RF circuits, leveraging the computational power of computers and AI algorithms. The program utilizes Python and LTspice to automate circuit simulations, allowing for efficient identification of optimal circuit parameters through the integration of various algorithms such as DQN and DDPG. The results demonstrate significant improvements in design efficiency and circuit performance, highlighting the potential of AI in circuit design automation.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

Proceedings of IC-NIDC 2023

MACHINE-LEARNING-BASED DESIGN AUTOMATION FOR OPTIMIZING


ANALOG/RF CIRCUIT APPLICATIONS

Weonhyeog Lee and Ickhyun Song


Department of Electronic Engineering, Hanyang University
[email protected]
2023 8th IEEE International Conference on Network Intelligence and Digital Content (IC-NIDC) | 979-8-3503-1792-3/23/$31.00 ©2023 IEEE | DOI: 10.1109/IC-NIDC59918.2023.10390878

ABSTRACT In recent years, the advancements in semiconductor


technology in the field of electronic engineering have led
This paper introduces an artificial-intelligence(AI)-based to exponential growth in the computational capabilities of
program designed to optimize and automate the circuit computers [1]. Consequently, computers have acquired
design process using the computational capabilities of tremendous processing power, enabling them to handle
computers. The program highlights the automation of massive amounts of data in a short period of time. This
optimization processes for various representative basic enhanced computational power has extended the
high-frequency (radio-frequency, RF) circuit blocks, application of computers beyond traditional research fields,
which are commonly used in electronic systems. It allowing them to be utilized in a wide range of diverse
emphasizes the significant potential for the advancement domains. Furthermore, the integration of ML, a rapidly
of circuit design automation through the integration of emerging field, with the computational power of
algorithms, machine learning, and analog circuit design computers has opened up new possibilities for automating
techniques. Multiple algorithms can be employed for research areas that were previously reliant on manual
circuit design automation, enabling highly efficient processes.
identification of the circuit's optimal performance. While conducting research in the field of
Moreover, the paper exhibits the use of the Figure of Merit microelectronics, circuit design has made interest in
(FoM) as an evaluation metric for circuits, which allows developing design optimization program that leverages the
the algorithm to assess circuit performance and determine computational capabilities of computers. For this purpose,
the direction of learning in a highly effective manner. The we developed a design optimization platform, using
overall presentation demonstrates the optimization of LTspice, a user-friendly spice tool, and Python, a versatile
various circuit parameters through an automated program programming language that has been widely applied in
utilizing algorithms and FoM. various engineering fields. Python offers multiple modules
and libraries that allow for control of LTspice within the
Key Words— Analog Circuits; Circuit Design code. Python can manipulate LTspice simulations
Optimization; Artificial Intelligence; Automation; according to specific conditions without the need for
Machine Learning; Radio-Frequency Circuits manual intervention. We can also modify component
parameters within the pre-built LTspice circuit from an
1. INTRODUCTION external source and simulate it accordingly. Additionally,
the program can perform parameter sweeps within the
In a conventional design process, analog-circuit designers
specified range and step count. By reading node voltages,
need to spend a large amount of time, finding optimal
designer can identify the optimal performance of the
parameters through manual and lengthy repetitions. For
circuit within the sweep range and optimize the circuit
high-speed or high-frequency design, a small modification
accordingly. Moreover, by incorporating simulation
or slight tuning significant affect circuit behavior,
commands within loops in the Python code, it can
necessitating the entire optimization process almost from
automate and optimize simulations by linearly varying the
scratch. Since efficient analog design requires designer's
values of specific components to achieve the best results.
rich experience, intuition, and determination, it is
intriguing to explore whether computers can complement
these aspects by learning key ideas via training. The
integration of the immense computational power of
computers and learning capability of artificial-intelligence
(AI) algorithms holds promise for mimicking human
insights and efficiency on circuit design, mitigating some
of the limitations faced by designers. In this regard, it is
anticipated that by incorporating extraordinary
computational capabilities of machines and proper
machine-learning (ML) techniques, human experts gain
benefits by reducing their efforts on lengthy optimization
and focus more on high-level problems to a certain extent. Fig. 1. Overview of the proposed program structure
___________________________________
979-8-3503-1792-3/23/$31.00 ©2023 IEEE

187
Authorized licensed use limited to: Universidad Autonoma de Baja California. Downloaded on September 25,2024 at 20:24:05 UTC from IEEE Xplore. Restrictions apply.
By integrating algorithms into the circuit design The candidate algorithms for the program are
optimization and training program using ML techniques DQN(Deep Q Network) and DDPG(Deep Deterministic
with appropriate rewards, it can achieve more in-depth and Policy Gradient). These two algorithms are closely related.
systematic optimization, as well as enable automation in DDPG is an extension of DQN [5] that incorporates deep
various directions. [2] learning and reinforcement learning. While DQNs are
In this work, we propose a program developed for the primarily used for discrete action selection problems,
purpose of optimizing and automating the simulation of DDPG is specifically designed to learn deterministic
designed circuits using Python code. Proposed policies in continuous action spaces.
optimization program allows users to perform desired
simulations, retrieve information, and control various
aspects.
2. PROGRAM OVERVIEW
The proposed program utilizes six Python modules and one
library. Among the six Python modules, five are built-in
modules, while the other is a user-defined module called
"ltspice," which is used for parsing LTspice simulation files
and extracting data. The remaining modules, such as
“subprocess” [3], “matplotlib”, “os”, “re”, and “time”, are
responsible for importing the simulation data into Python,
visualizing it, and precisely plotting the graphs using
additional code. The LTspice simulation files are stored in
the “.raw” format, which can be opened and read in Python
using file I/O functions. The data is, then, converted into Fig. 2. Process flow of the proposed algorithm-based
the desired data type using built-in functions in Python. optimization
After appropriate data conversion, the "matplotlib" library DQN does not learn deterministic policies about the
is used to generate graphs and determine the best environment, whereas DDPG learns them directly. In
performance under different conditions. However, linking addition, DQN consists of a single neural network and
the two programs can introduce errors as they operate in learns a value function for the state, whereas DDPG has an
different formats. It is crucial to accurately understand the actor-critic structure. Actor networks output deterministic
characteristics of each program and confirm how the policies for states, and critique networks predict values for
linking functions or modules work. states and actions. Through this interaction, policy
According to recent research, many automation evaluation and improvement are performed at the same
programs are developed by incorporating deep learning, time. The plan is to use the algorithm that produces better
algorithm-based ML, or AI [4]. There have been instances results by looking at each of the two algorithms and
where the program has demonstrated astonishing results in comparing the results. Apart from these two algorithms,
various fields, surprising developers. It can detect errors Artificial Neural Network [6] and Inverse Method
occurring during circuit design, allowing for debugging algorithms, which are widely used in the field of program
and performance improvement. Additionally, it can design automation, are also considered as candidate
implement functions such as comparing expected behavior algorithms.
with actual behavior to detect errors. By designing circuits 𝐺(𝑑𝐵)
through algorithm-based ML training, the following FoM = (1)
(𝑁𝐹(𝑙𝑖𝑛𝑒𝑎𝑟) −1)𝑃(𝑚𝑊)
expected effects can be observed.
By utilizing automated programs, the time invested in The Figure of Merit (FoM) equation is used to guide the
the design process can be significantly reduced. Through algorithm in exploring the circuit's performance by varying
the application of algorithm-based ML, which overcomes the sizes of the circuit components and determining the
repetitive tasks and numerous trial-and-error processes, direction of the component values [7]. In (1), it utilizes
these steps can be automated, enabling the rapid and three parameters: gain (G), noise figure (NF), and power
efficient design of optimized circuits. Furthermore, a wider (P), to define the exploration direction of the algorithm in
design space can be explored, and the parameters of circuit the design of low-noise amplifiers. The user can multiply
components can be optimized to achieve desired desired constants with the variables to adjust the
performance goals. While circuit design relies on the exploration direction. Consequently, the program can
experience and intuition of designers, algorithm-based ML conduct simulations with the objective of increasing gain,
can also identify patterns and circuit characteristics that decreasing noise figure, and reducing power consumption.
might be overlooked by human designers. Consequently, By employing a well-designed FoM equation, the circuit
the performance and reliability of circuits can be greatly can be effectively tested, leading to high-performance
enhanced. As the program strictly adheres to the rules and simulation results.
directions defined by the designer, it is free from the
1
designer's errors and variations, thereby further increasing FoM = (2)
reliability. 𝐹(𝑟𝑒𝑠𝑢𝑙𝑡) − 𝐹(𝑡𝑎𝑟𝑔𝑒𝑡)

188
Authorized licensed use limited to: Universidad Autonoma de Baja California. Downloaded on September 25,2024 at 20:24:05 UTC from IEEE Xplore. Restrictions apply.
This (2) is the another FoM for a passive filter circuit as resistance values without the designer directly modifying
shown in the next section. The goal of the DQN algorithm LTspice [10]. After the simulation is completed, the
is to optimize the circuit by iteratively simulating the program reads the simulation results stored in the specified
circuit with the resistance values determined by the file path and plots the results using the "matplotlib" module.
algorithm. The frequency obtained from the simulation is The graph clearly demonstrates the decrease in the sine
subtracted from the target frequency, and the reciprocal of wave's amplitude as the resistance increases. This
this difference is taken. The algorithm aims to minimize simulation results were obtained using the same program.
this value as it progresses.

3. AUTOMATED SIMULATION RESULTS


3.1. First-Order Filter

Fig. 5. Frequency characteristics of a low-pass filter


Fig. 3. Schematic of a low-pass filter
with different resistances
As mentioned earlier, a high-pass filter allows only
high-frequency components to pass through, whereas a
low-pass filter allows only low-frequency components to
pass through. The following Fig. 5 and shows the AC
(frequency) simulation result of each filter and their
frequency domain characteristics. This result was obtained
by importing LTspice simulation data, which was
generated based on the specified resistor size in Python,
and plotted using the Python “matplotlib” module. This
enables the automation of optimizing the size of capacitors
or resistors for the target frequency of the circuit through a
program written in Python.
The circuit described above are simple filters utilizing
only resistors and capacitors. Filters play a crucial role in
various applications in electrical engineering such as audio,
Fig. 4. Time-domain response of a low-pass filter with communication systems, and image processing. Those are
different resistances essential for frequency control and signal processing.

Fig. 3 shows a basic RC low-pass filter, which is used to 3.2. Higher-Order Filter
test the developed program and consists of fundamental
electronic components commonly used in electrical
engineering [8]. The low-pass filter, as depicted in Fig. 3,
allows the passage of signal frequencies below a certain
cutoff frequency while blocking high-frequency signals [9].
It functions to adjust or reduce the frequency components
of the signal. The cutoff frequency, acting as the boundary
for passing signals below a certain frequency, is set to
select the desired frequency range of the input signal. The
low-pass filter blocks high-frequency signals and allows
low-frequency signals to pass through.
Referring to Fig. 4, it can be observed that as the Fig. 6. Schematic of a pi (π) filter
resistance increases, the voltage distribution of the signal
changes, resulting in a decrease in the amplitude of the
input signal's sine wave. The simulation graph in Fig. 4
was generated by a Python program that sweeps through

189
Authorized licensed use limited to: Universidad Autonoma de Baja California. Downloaded on September 25,2024 at 20:24:05 UTC from IEEE Xplore. Restrictions apply.
4. ALGORITHM-BASED OPTIMIZED
SIMULATION

Fig. 7. Simulation result of π filter


A pi filter (π) in Fig. 6 performs the same function as the
circuit in Fig. 3a, allowing low-frequency signals to pass Fig. 9. DQN algorithm simulation result
through while blocking high-frequency signals. The
importance of the filter lies in obtaining a passband signal Fig. 9 represents an example where the Candidate
without ripple, ensuring stability. By utilizing two Algorithm, the DQN algorithm, was trained and executed.
capacitors and one inductor, the pi filter effectively filters By adjusting the size of the algorithm's learning space, we
AC ripple, surpassing the effectiveness of the previously identified intervals that yielded higher rewards. [13] Fig. 9
introduced filters. [11] It is mainly used in power supply displays the results of improving episode-wise rewards by
systems to improve the stability of voltage or current, and modifying the algorithm's learning interval. Accurately
also finds applications in automatic control systems for specifying the appropriate learning interval for the
error correction. By adjusting the component values of the algorithm is crucial. As observed in Fig. 9, the graph of
pi filter, desired outputs can be achieved, enhancing the rewards for the algorithm can either improve or, in some
stability and accuracy of the circuit [12]. The presented cases, degrade, depending on the specified learning
results were obtained from simulations where Python was interval. We will incorporate the DQN algorithm, as well
integrated with the circuit, allowing the variations of as other algorithms such as DDPG, Genetic Algorithm, and
resistances and the retrieval of simulation data. Unlike the Inverse Method, into the program to conduct simulations.
circuits depicted in Fig. 3, which consist of a single resistor The algorithm will determine the direction of learning for
and capacitor each, this circuit comprises a single inductor, the circuit's performance based on Equation (2), which
two capacitors, and a load resistor. Fig. 7 demonstrates represents the Figure of Merit (FoM). Subsequently, it will
how the output of this circuit changes as the resistances search for the optimal circuit size in that direction.
vary through LTspice. Research on these algorithms aims to identify the most
suitable, fast, and accurate algorithm to be integrated into
the automated circuit design program.

5. DISCUSSION
We integrated our automated circuit design program into
the DQN algorithm code. [14] The code performs
optimization based on equation (2) during the training
process. We provided rewards to the algorithm based on
whether the FoM value in the current episode is greater or
smaller than that of the previous episode. [7] Additionally,
we adjusted the options to make the algorithm more future-
oriented.
To validate whether the algorithm-based circuit design
automation program correctly retrieves the frequency
values from LTspice, we manually verified the simulation
results obtained through our program. [15] Fig.8 illustrates
the optimization results of the circuit in Fig. 3 towards the
Fig. 8. Optimized simulation result target frequency of 1 kHz. Based on the settings of the code,
we determined that the DQN algorithm performs best for
the circuit when the resistance value is approximately
155Ω, resulting in the output closet to 1kHz [10].

190
Authorized licensed use limited to: Universidad Autonoma de Baja California. Downloaded on September 25,2024 at 20:24:05 UTC from IEEE Xplore. Restrictions apply.
By further fine-tuning the program's settings, we can 1-10.
obtain more accurate optimization results. [4] Y. Shi, "A Machine Learning Study on the Model
Performance of Human Resources Predictive Algorithms,"
In the simulation depicted in Fig. 8, the algorithm 2022 4th International Conference on Applied Machine
randomly sets the resistance value and performs the Learning (ICAML), Changsha, China, 2022, pp. 405-409.
simulation. Then, it evaluates the obtained result based on [5] Z. Huang, H. Lin and G. Zhang, "The USV Path Planning
the FoM in Equation (2) and decides whether to explore Based on an Improved DQN Algorithm," 2021 International
Conference on Networking, Communications and
higher or lower values. [16] By repeating this action Information Technology (NetCIT), Manchester, United
iteratively, we can achieve highly accurate and efficient Kingdom, 2021, pp. 162-166.
optimization. [6] S. Wei, X. Lin, F. Tu, Y. Wang, L. Liu and S. Yin,
"Reconfigurability, Why It Matters in AI Tasks Processing: A
The proposed program can greatly enhance the Survey of Reconfigurable AI Chips," IEEE Transactions on
efficiency and productivity of circuit designers in terms of Circuits and Systems I: Regular Papers, vol. 70, no. 3, pp.
time and effort. Leveraging the precise and rapid 1228-1241, March 2023.
computational capabilities of computers, it provides [7] I. Song et al., "A Simple Figure of Merit of RF MOSFET for
substantial assistance to designers in terms of cost- Low-Noise Amplifier Design," in IEEE Electron Device
effectiveness and reliability. Furthermore, incorporating Letters, vol. 29, no. 12, pp. 1380-1382, Dec. 2008.
algorithm-based machine learning into the program can be [8] D. Denisenko, N. Prokopenko, Y. Ivanov and I. Pakhomov,
highly beneficial in addressing potential issues that may "Generalized Structure of Active RC Filters with Independent
Tuning of Pole Frequency, Pole Q-Factor and Transfer
arise during the circuit design process. By combining the Ratio," 2021 IEEE East-West Design & Test Symposium
expertise, creativity, and experience of circuit designers (EWDTS), Batumi, Georgia, 2021.
with the integration of the program proposed in this paper, [9] D. Denisenko, N. Prokopenko, Y. Ivanov and I. Pakhomov,
a more economical and innovative circuit design process "Generalized Structure of Active RC Filters with Independent
can be achieved, leading to the creation of highly reliable Tuning of Pole Frequency, Pole Q-Factor and Transfer
circuits. Ratio," 2021 IEEE East-West Design & Test Symposium
(EWDTS), Batumi, Georgia, 2021, pp. 1-5.
6. CONCLUSION [10] Z. -C. Hao and J. -S. Hong, "UWB Bandpass Filter Using
Cascaded Miniature High-Pass and Low-Pass Filters With
This paper presents an AI-based program that automates Multilayer Liquid Crystal Polymer Technology," IEEE
and optimizes the circuit design process using computer Transactions on Microwave Theory and Techniques, vol. 58,
computational power. The program focuses on optimizing no. 4, pp. 941-948, April 2010.
high-frequency circuit blocks commonly used in electronic [11] Q. Xiang, Q. Feng, X. Huang and D. Jia, "Electrical Tunable
Microstrip LC Bandpass Filters With Constant Bandwidth,"
systems. By integrating algorithms, machine learning, and IEEE Transactions on Microwave Theory and Techniques,
analog circuit design techniques, the program vol. 61, no. 3, pp. 1124-1130, March 2013.
demonstrates significant potential for advancing circuit [12] J. Liu and M. Yu, "Computer Aided Design of Microwave
design automation. Various algorithms can be utilized to Circuits Based on BP Neural Networks," 2023 5th
efficiently identify the circuit's optimal performance. International Conference on Communications, Information
Additionally, the use of the Figure of Merit (FoM) as an System and Computer Engineering (CISCE), Guangzhou,
evaluation metric allows the algorithm to effectively assess China, 2023, pp. 282-285
circuit performance and guide the learning process. In [13] S. Šćepanović, "Testing reward function choice influence on
summary, the paper showcases an automated program that training performance of Double DQN," 2022 11th
Mediterranean Conference on Embedded Computing
optimizes circuit parameters through the integration of
(MECO), Budva, Montenegro, 2022, pp. 1-4
algorithms and FoM. [14] M. Ohira, K. Takano and Z. Ma, "A Novel Deep-Q-Network-
Based Fine-Tuning Approach for Planar Bandpass Filter
7. ACKNOWLEDGEMENTS Design," in IEEE Microwave and Wireless Components
Letters, vol. 31, no. 6, pp. 638-641, June 2021
This work was supported by the National Research [15] B. -X. Wang, W. -S. Zhao, D. -W. Wang, J. Wang, W. Li and
Foundation of Korea (NRF) grant funded by the Korea J. Liu, "Optimal Design of Planar Microwave Microfluidic
government (MSIT). (No. RS-2023-00212268, NRF- Sensors Based on Deep Reinforcement Learning," in IEEE
2022M1A3B8076511, and NRF-2022M3I7A1085472) Sensors Journal, vol. 21, no. 24, pp. 27441-27449, 15 Dec.15,
2021
8. REFERENCES [16] Yu, P., Ji, F. (2020). Application of Reinforcement Learning
in the Design of Microwave Circuit Matching Structure.
[1] Behzad Razavi “Fundamentals of Microelectronics” 2nd ed., Proceedings of the Seventh Asia International Symposium on
Wiley, 2012. Mechatronics. Lecture Notes in Electrical Engineering, vol.
[2] A. Abuelnasr, M. Amer, A. Ragab, B. Gosselin and Y. 589. Springer, Singapore
Savaria,"Causal Information Prediction for Analog Circuit [17] Linear Technology, "LTspice Simulator," Analog Devices,
Design Using Variable Selection Methods Based on Machine [Online]. Available: https://www.analog.com/en/design-
Learning," 2021 IEEE International Symposium on Circuits center/design-tools-and-calculators/ltspice-simulator.html.
and Systems (ISCAS), Daegu, Korea, 2021, pp. 1-5. Accessed: 2019.
[3] J. Ruohonen, K. Hjerppe and K. Rindell, "A Large-Scale
Security-Oriented Static Analysis of Python Packages in
PyPI," 2021 18th International Conference on Privacy,
Security and Trust (PST), Auckland, New Zealand, 2021, pp.

191
Authorized licensed use limited to: Universidad Autonoma de Baja California. Downloaded on September 25,2024 at 20:24:05 UTC from IEEE Xplore. Restrictions apply.

You might also like