Development of Primitive Circuit in a Scalable and Flexible PWM Mechanism Using FPGA

Servomotors are used in various applications such as joints of industrial robots, joints of humanoid robots, and belt mechanisms of conveying equipment. To realize better articulated robots, more complex and high-performance motions using many servomotors will be required in the future. To use many servomotors, many microcontrollers controlling them are required. This approach may increase the scale of the system. This fact will lead to an increase in cost and largen the difficulty to control and manage many servomotors. To solve these problems, we aim to realize a scalable and flexible PWM mechanism using a general-purpose dynamic partial reconfiguration microcontroller that can dynamically reconfigure the circuit. Dynamic Partial Reconfiguration can be applied to control many servo motors with a single platform. Since this is a single platform running, the number of hardware can be physically reduced, which greatly reduces the cost. In addition, it can be expected to save power because only one part of the system operates at a time. The goal of this research is to develop a circuit that generates PWM, which is constructed by dynamic partial reconfiguration. In our experiments, we compare the conventional PWM generation circuit with the servomotor-specific circuit and examine the differences in circuit size and performance. The experiments showed that the proposed system, which specifies only the numerical value of the angle, can be executed in a shorter time than the conventional system, in which the period and pulse width of the servomotor to be used are specified from the CPU to run the PWM generation circuit.


Introduction
Servomotors are used in various applications such as joints of industrial robots, joints of humanoid robots, and belt mechanisms of conveying equipment [1][2][3][4][5]. To realize better articulated robots, more complex and high-performance motions using many servomotors will be required in the future. To use many servomotors, many microcontrollers controlling them are required. This approach may increase the scale of the system. This fact will lead to an increase in cost and largen the difficulty to control and manage many servomotors.
To solve these problems, we aim to realize a scalable and flexible PWM mechanism using a general-purpose dynamic partial reconfiguration microcontroller that can dynamically reconfigure the circuit.
The goal of this research is to develop a circuit that generates PWM, which is constructed by dynamic partial reconfiguration. In addition, the dynamic partial reconfiguration microcontroller has the advantage of being able to freely configure arbitrary circuits. Therefore, it is possible to make a general-purpose PWM generation circuit into a dedicated circuit for servo motors. In our experiments, we compare the conventional PWM generation circuit with the servomotor-specific circuit and examine the differences in circuit size and performance.

Scalable and Flexible PWM Mechanism
Dynamic Partial Reconfiguration (DPR) can be applied to control many servo motors with a single platform. DPR is a method of creating a digital circuit by connecting multiple small processing units at high speed and frequently according to a program as shown in Fig. 1. In other words, the circuit is reconfigured many times to drive many servomotors in turn.
The different circuits can be reconfigured at high speed. So, all the servomotors appear to be running at the same time. Since this is a single platform running, the number of hardware can be physically reduced, which greatly reduces the cost.
In addition, it can be expected to save power because only one part of the system operates at a time.
The ability to control any number of PWM devices with a single device by switching circuits through dynamic reconfiguration makes it highly scalable. In addition, the ability to reconfigure arbitrary circuits makes it possible to use any device for any purpose, making it a very flexible device.

Mechanism of PWM generation circuit
On the DPR system, we can prepare the specified PWM circuit tailored to the servo motor instead of the general purpose PWM generation circuit. By employing this strategy, more efficient servomotor system may be established.
In conventional systems, the CPU must pass the cycle period and pulse width of PWM wave to the PWM generator as shown in the left of Fig. 2. On the other hand, our proposal has only to pass the angle to the tailored PWM generator as shown in Fig. 2. Since the number of data to be sent is reduced, the processing of the CPU can be reduced. If the circuit is created in this way as a dedicated circuit for the servomotor, the burden on the user is reduced because it is only necessary to put in the angle (Fig 4).

Experiment
We evaluated the delay time to pass the parameters to the conventional PWM generator and our PWM generator for servomotor. The table 1 shows experimental result.
In the case of a single processing by software, the proposed system was able to process in 26 clocks while the conventional system took 51 clocks. In other words, this servo-only system reduces the time required for control instructions by about half compared to the conventional version.
Since the internal operating frequency of the FPGA used is 100MHz, the execution times are as follows.
As the number of processes increases, the difference in processing time becomes more pronounced. Fig. 3 shows that the difference in execution time becomes more pronounced as the number of processes increases.Specifically, when the number of processes is 100, the difference in execution time is 25 µs. When the number of processes is 1000, the difference in execution time is 250µs.
From the above results, it can be said that the performance of the servo motor circuit we have developed has been improved. In addition, the dynamic reconfiguration using this circuit is also expected to perform better than the conventional system.

Conclusion
The purpose of this study was to develop a circuit for generating PWMs constructed by dynamic partial reconfiguration. We compared the conventional PWM generation circuit with the proposed circuit dedicated to servomotors and conducted an evaluation study of the differences in circuit size and performance.
The experiments showed that the proposed system, which specifies only the numerical value of the angle, can be executed in a shorter time than the conventional system, in which the period and pulse width of the servomotor to be used are specified from the CPU to run the PWM generation circuit. In addition, this difference in performance increases as the number of PWM mechanisms to control increases and as the number of processes increases.
In addition, the system does not need to calculate the duty ratio, which reduces the burden on the user.
We were able to develop a circuit that generates the PWMs constructed by dynamic partial reconfiguration, which is the goal of this research. Therefore, our future work will be to implement dynamic partial reconfiguration using the system we have developed, and to realize a scalable and flexible PWM mechanism.