# Design and Implementation of a Digital Twin System for Log Rotary Cutting Optimization
## 2 Materials and Methods
### Five-Dimensional Model
#### 2.1.5 Service System
\begin{aligned} \frac{\partial}{\partial u}\left[\sum\limits_{i=1}^{n} \left(2x_{i}^{2}-4 ax_{i}+2y_{i}^{2}-4 by_{i}+a^{2}+b^{2}\right)r^{2}-2r\sum \limits_{i=1}^{n}\left(x_{i}-a\right)(y_{i}-b)+n\left(a^{2}+b^{2}\right) \right]=0\\ \frac{\partial}{\partial b}\left[\sum\limits_{i=1}^{n}\left(2x_{i} ^{2}-4 ax_{i}+2y_{i}^{2}-4 by_{i}+a^{2}+b^{2}\right)r^{2}-2r\sum\limits_{i=1}^{ n}\left(x_{i}-a\right)(y_{i}-b)+n\left(a^{2}+b^{2}\right)\right]=0\\ \frac{\partial}{\partial r}\left[\sum\limits_{i=1}^{n}\left(2x_{i} ^{2}-4 ax_{i}+2y_{i}^{2}-4 by_{i}+a^{2}+b^{2}\right)r^{2}-2r\sum\limits_{i=1}^{ n}\left(x_{i}-a\right)(y_{i}-b)+n\left(a^{2}+b^{2}\right)\right]=0\\ \triangleright\text{solve for the unknown}\end{aligned} \right.\]
17:endfor
18:return\(a,b,r\)
19:endfunction
```  
**Algorithm 1** Finding the largest inscribed cylinder of a log  
As the rotary cutter blade moves toward the xo direction, we have:  
\[\text{x}=\text{Vt} \tag{6}\]  
Assuming the log speed is n, the angular speed of the log is:  
\[\omega=\frac{2\pi\text{n}}{60} \tag{7}\]  
Thus, the time, t, can be expressed in terms of the rotation angle of the log:  
\[\varphi=\omega\text{t} \tag{8}\]  
The parameter x can be represented in terms of R and h using the Pythagorean theorem. Since the rotary cutting curve is an Archimedean spiral, the instantaneous radius of the log can be expressed as:  
\[\text{R}^{2}=\alpha^{2}\varphi^{2}+\text{h}^{2} \tag{9}\]Where \(\alpha\) is the Archimedean spiral's level distance:  
\[\alpha=\frac{\mathrm{s}}{2\pi} \tag{10}\]  
By substituting the above formula into (6) and simplifying, we obtain:  
\[\mathrm{V}=\frac{\mathrm{sn}}{60} \tag{11}\]  
Therefore, when processing with the log debarker, the feeding speed of the rotary cutter is related to the preset veneer thickness and the speed of the cardan shaft. The feeding speed of the rotary cutter can be determined by the preset veneer thickness and the initial motor speed. On the other hand, the rotary cutting machine uses a cardan-free processing model. The machine uses a squeezing friction roller (presser roller) that both applies pressure and feeds the log and two main friction rollers (drive rollers) with surface patterns that press against the log and drive it through friction. A rotary blade contacts the log below the presser roller to generate a cutting force and begin the rotary cutting production, as shown in Figure 7.  
Establish a coordinate system with the center of the connecting line of the two drive rollers as the origin. Assuming the distance between the two drive rollers is L, the distance between the rotary cutter and the horizontal line is h, the diameter of the three rollers is D\({}_{1}\), the instantaneous diameter of the log is D\({}_{2}\), the veneer thickness is S, the rotational speed of the drive roller is n, and the rotational speed of the log is N, then the horizontal coordinate of the rotary cutter edge during the log rotary cutting process can be expressed as:  
\[\mathrm{x}=\sqrt{\left(\frac{\mathrm{D}_{2}}{2}\right)^{2}-\mathrm{h}^{2}}+ \sqrt{\left(\frac{\mathrm{D}_{1}}{2}+\frac{\mathrm{D}_{2}}{2}\right)^{2}- \left(\frac{\mathrm{L}}{2}\right)^{2}} \tag{12}\]  
Figure 6: Rotary cutting curve.