Development of a Small CNC Machining Center for Physical Implementation and a Digital Twin
Abstract
:Featured Application
Abstract
1. Introduction
2. Literature Review
3. Main Contribution
4. Materials and Methods
4.1. Modeling the Feed Drive Systems
- -
- Voltage applied to the armature) u [V] (the term U(s) represents the Laplace transform of the voltage input);
- -
- Angular speed of the motor shaft ωm [rad/s] (the term Ωm (s) represents the Laplace transform of the angular speed output;
- -
- Armature moment of inertia Jm [kgm2];
- -
- Coefficient of viscous friction Bm [Nms/rad];
- -
- Back electromotive force (emf) voltage constant Kv [V/rad/s];
- -
- Electromagnetic torque constant Kt [Nm/A];
- -
- Armature resistance R [Ω];
- -
- Armature inductance L [H].
- -
- Reduced moment of inertia at the motor shaft Jm [kgm2];
- -
- Coefficient of viscous friction reduced at the motor shaft Bred [Nms/rad];
- -
- Transfer ratio of the transmission between motor and screw i.
4.2. System Dynamics
- -
- It was determined that acceptable behavior was obtained for values of the proportional constant KP of approximately 150;
- -
- The integral constant KI exerted a relatively minor influence on the behavior of the system; that is to say, the smaller the integration constant, the better the system’s behavior;
- -
- Furthermore, it was not possible to draw any useful conclusions about the influence of the derivative constant and the filter coefficient N. The practical implementation of the effect of the derivative in the operation of the experimental system differed from the implementation used in the interactive tuning interface in Simulink.
4.3. Positioning Regime
4.4. Contouring Regime and Circular Interpolation
- -
- The proposed CNC equipment was a development system with open architecture, dedicated to the study of modular control solutions;
- -
- The size and rigidity of the equipment were relatively small, compared to industrial equipment, which, to some extent, explains the significant influence of the technological resistance moments on the contouring accuracy.
4.5. Physical Implementation of the System
- The Y-axis incremental encoder;
- Y-axis DC servo motor (Dunkermotoren);
- X-axis DC servo motor (Dunkermotoren);
- X-axis incremental encoder;
- Z-axis DC servo motor (Pololu);
- Main spindle unit;
- Support structure (frame);
- Z-axis ball screw transmission unit;
- Workpiece fixing system;
- Y-axis ball screw transmission unit;
- X-axis ball screw transmission unit;
- Arduino control boards together with DC motor power supply boards.
- -
- A supporting structure composed of extruded aluminum profiles;
- -
- Kinematic feed kinematic chains on the X-, Y-, and Z-axes, structured as closed-loop motion control systems. The drive equipment was the DC servo motor, and the feedback device was the incremental encoder. For the X- and Y-axes, Dunkermotoren GR63x25 servo motors (Dunkermotoren GmbH, Bonndorf, Germany)were employed, while a Pololu servo motor (Pololu, Las Vegas, USA) was utilized for the Z-axis. THK LM Guide Actuator (THK Co., Ltd., Tokyo, Japan) KR ball screw–nut type THK LM Guide Actuator KR were used as transmission devices on all three axes.
- -
- Main kinematic chain (main spindle drive unit) achieved through the integration of a Proxxon mini drilling machine, comprising a drive system powered by a single-phase AC motor with manual speed adjustment capability and a chuck-type tool clamping system for the cutting tool. This system enabled the manual clamping and replacement of cutting tools, including cylindrical mill, center drill, twist drill, and tapping drill types. The working unit provided the primary cutting motion for the CNC system.
- -
- Command and control module achieved through the implementation of two Arduino MEGA development boards, each equipped with an 8-bit AVR ATMega 2560 microcontroller (Microchip Technology, Chandler, AZ, USA). The Arduino boards were responsible for issuing commands to the drive modules of the three axes (as reference inputs for the automatic motion control systems) and to the main spindle module. The term “control” in this context refers to the implementation of PID-type automatic control algorithms on each motion axis. The utilization of these command-and-control systems guaranteed the system’s open-architecture nature, facilitating the implementation of flexible control algorithms and the straightforward modification of control parameters. The command-and-control module incorporated Pololu Dual VNH5019 boards (drivers, Pololu, Las Vegas, USA), which facilitated the power supply for DC servo motors, with voltages ranging from 5.5–24 V and currents ranging from 12–24 A. Each of these two drivers was capable of powering up to two DC servo motors and was compatible with Arduino MEGA boards (Arduino S.R.L., Monza, Italy).
5. Developing a Digital Twin of the System
5.1. CAE Simulation
5.2. CAM Simulation
5.3. Features of the Integrated CAE/CAM Digital Twin Simulation Environment
- -
- The NC numerical code generated by the CAM component (which describes the trajectories followed for machining a part) can be used to generate kinematic input quantities for the CAE model that are more complex than a simple circular in-plane trajectory;
- -
- The values of voltages, currents, and moments indicated by the CAE model can be used to design and test in the CAM model cutting regimes that do not lead to overstressing the CNC equipment.
6. Experimental Tests
- -
- Resolution: 2048 pulses/rotation (X, Y), 64 pulses per rotation (Z);
- -
- Input voltage: 5–12 V, DC;
- -
- Maximum rotational speed: 6000 rpm;
- -
- Permissible radial load: 5 N;
- -
- Permissible axial load: 3 N;
- -
- Cable length: 50 cm;
- -
- Output shaft diameter: 6 mm.
pin1 = 1;
pin2 = 0;
if speed < 0
pin1 = 0;
pin2 = 1;
end
pwm = abs(sped);
Design of the Experiments
- Settling time (Ts);
- Steady-state error (Ess);
- Maximum trajectory deviation (Emax).
7. Conclusions
- -
- The rigidity of the proposed equipment was relatively low, mainly also due to the small size of the structural elements;
- -
- The possibility of adapting control systems based on Arduino control boards to an equipment of increased size and rigidity (scalability) needs to be confirmed by further research;
- -
- The experimental tests were performed only on soft materials, which somewhat limited practical applications.
- -
- Future research directions to be addressed include:
- -
- Development of digital twins that also include software modules for processing information from sensors and transducers mounted on the physical system;
- -
- Implementation of more advanced control strategies than PID strategies on the developed CNC system (feed-forward controllers, fuzzy controllers, etc.) or even AI-based control strategies;
- -
- Use of more advanced microcontroller control cards (16 or 32 bit) as command-and-control systems for the developed CNC equipment;
- -
- Integration of sensor feedback for real-time correction;
- -
- Considering a wider range of workpiece materials.
Author Contributions
Funding
Informed Consent Statement
Data Availability Statement
Conflicts of Interest
Abbreviations
CNC | Computer Numerical Control |
PID | Proportional Integral Derivative |
CAE | Computer-Aided Engineering |
CAM | Computer-Aided Manufacturing |
References
- Papadopoulos, K.G.; Papastefanaki, E.N.; Margaris, N.I. Explicit analytical PID tuning rules for the design of type-III control loops. IEEE Trans. Ind. Electron. 2012, 60, 4650–4664. [Google Scholar] [CrossRef]
- Borase, R.P.; Maghade, D.K.; Sondkar, S.Y.; Pawar, S.N. A review of PID control, tuning methods and applications. Int. J. Dyn. Control 2021, 9, 818–827. [Google Scholar] [CrossRef]
- Díaz-Rodríguez, I.D.; Sangjin, H.; Bhattacharyya, S.P. Analytical Design of PID Controllers; Springer: Berlin/Heidelberg, Germany, 2019; ISBN 978-3-030-18227-4. [Google Scholar]
- Gai, H.; Li, X.; Jiao, F.; Cheng, X.; Yang, X.; Zheng, G. Application of a New Model Reference Adaptive Control Based on PID Control in CNC Machine Tools. Machines 2021, 9, 274. [Google Scholar] [CrossRef]
- Sun, X.; Liu, N.; Shen, R.; Wang, K.; Zhao, Z.; Sheng, X. Nonlinear PID Controller Parameters Optimization Using Improved Particle Swarm Optimization Algorithm for the CNC System. Appl. Sci. 2022, 12, 10269. [Google Scholar] [CrossRef]
- Yu, Z.; Liu, N.; Wang, K.; Sun, X.; Sheng, X. Design of Fuzzy PID Controller Based on Sparse Fuzzy Rule Base for CNC Machine Tools. Machines 2023, 11, 81. [Google Scholar] [CrossRef]
- Liu, L.; Xu, Z.; Qu, X. A Reconfigurable Architecture for Industrial Control Systems: Overview and Challenges. Machines 2024, 12, 793. [Google Scholar] [CrossRef]
- Latif, K.; Adam, A.; Yusof, Y.; Kadir, A.Z.A. A review of G code, STEP, STEP-NC, and open architecture control technologies based embedded CNC systems. Int. J. Adv. Manuf. Technol. 2021, 114, 2549–2566. [Google Scholar] [CrossRef]
- Zhou, X. An optimized data interaction structure for SERCOS-based open CNC system. Int. J. Adv. Manuf. Technol. 2023, 129, 4643–4661. [Google Scholar] [CrossRef]
- Liu, Q.; Liu, H.; Xiao, J.; Tian, W.; Ma, Y.; Li, B. Open-architecture of CNC system and mirror milling technology for a 5-axis hybrid robot. Robot. Comput.-Integr. Manuf. 2023, 81, 102504. [Google Scholar] [CrossRef]
- Dharmawardhana, M.; Ratnaweera, A.; Oancea, G. STEP-NC Compliant Intelligent CNC Milling Machine with an Open Architecture Controller. Appl. Sci. 2021, 11, 6223. [Google Scholar] [CrossRef]
- Attar, H.; Abu-Jassar, A.T.; Amer, A.; Lyashenko, V.; Yevsieiev, V.; Khosravi, M.R. Control system development and implementation of a CNC laser engraver for environmental use with remote imaging. Comput. Intell. Neurosci. 2022, 1, 9140156. [Google Scholar] [CrossRef]
- Khan, Z.H.; Rahman, T.; Arabi, S.; Mohammad, S.; Khan, M.M.; Dey, R.; Khan, M.M.; Mukherjee, D. Development of a Low-Cost CNC Machine Laser Engraver. In Proceedings of the 2021 IEEE 12th Annual Ubiquitous Computing, Electronics & Mobile Communication Conference (UEMCON), New York, NY, USA, 1–4 December 2021. [Google Scholar] [CrossRef]
- Das, U.C.; Shaik, N.B.; Suanpang, P.; Nath, R.C.; Mantrala, K.M.; Benjapolakul, W.; Gupta, M.; Somthawinpongsai, C.; Nanthaamornphong, A. Development of automatic CNC machine with versatile applications in art, design, and engineering. Array 2024, 24, 100369. [Google Scholar] [CrossRef]
- Cao, X.; Zhao, G.; Xiao, W. Digital Twin–oriented real-time cutting simulation for intelligent computer numerical control machining. Proc. Inst. Mech. Eng. Part B J. Eng. Manuf. 2022, 236, 5–15. [Google Scholar] [CrossRef]
- Yao, K.-C.; Chen, D.-C.; Pan, C.-H.; Lin, C.-L. The Development Trends of Computer Numerical Control (CNC) Machine Tool Technology. Mathematics 2024, 12, 1923. [Google Scholar] [CrossRef]
- Luo, W.; Hu, T.; Zhang, C.; Wei, Y. Digital twin for CNC machine tool: Modeling and using strategy. J. Ambient Intell. Humaniz. Comput. 2019, 10, 1129–1140. [Google Scholar] [CrossRef]
- Luo, W.; Hu, T.; Ye, Y.; Zhang, C.; Wei, Y. A hybrid predictive maintenance approach for CNC machine tool driven by Digital Twin. Robot. Comput.-Integr. Manuf. 2020, 65, 101974. [Google Scholar] [CrossRef]
- Tao, F.; Xiao, B.; Qi, Q.; Cheng, J.; Ji, P. Digital twin modeling. J. Manuf. Syst. 2022, 64, 372–389. [Google Scholar] [CrossRef]
- Heo, E.; Yoo, N. Numerical Control Machine Optimization Technologies through Analysis of Machining History Data Using Digital Twin. Appl. Sci. 2021, 11, 3259. [Google Scholar] [CrossRef]
- Pan, L.; Guo, X.; Luan, Y.; Wang, H. Design and realization of cutting simulation function of digital twin system of CNC machine tool. Procedia Comput. Sci. 2021, 183, 261–266. [Google Scholar] [CrossRef]
- Wei, Y.; Hu, T.; Zhou, T.; Ye, Y.; Luo, W. Consistency retention method for CNC machine tool digital twin model. J. Manuf. Syst. 2021, 58, 313–322. [Google Scholar] [CrossRef]
- Pantelidakis, M.; Mykoniatis, K. Extending the digital twin ecosystem: A real-time digital twin of a LinuxCNC-controlled subtractive manufacturing machine. J. Manuf. Syst. 2024, 74, 1057–1066. [Google Scholar] [CrossRef]
- Vishnu, V.S.; Varghese, K.G.; Gurumoorthy, B.J.P.C. A data-driven digital twin of CNC machining processes for predicting surface roughness. Procedia CIRP 2021, 104, 1065–1070. [Google Scholar] [CrossRef]
- Liu, K.; Song, L.; Han, W.; Cui, Y.; Wang, Y. Time-varying error prediction and compensation for movement axis of CNC machine tool based on digital twin. IEEE Trans. Ind. Inform. 2021, 18, 109–118. [Google Scholar] [CrossRef]
- Xue, R.; Zhang, P.; Huang, Z.; Wang, J. Digital twin-driven fault diagnosis for CNC machine tool. Int. J. Adv. Manuf. Technol. 2024, 131, 5457–5470. [Google Scholar] [CrossRef]
- Yang, X.; Ran, Y.; Zhang, G.; Wang, H.; Mu, Z.; Zhi, S. A digital twin-driven hybrid approach for the prediction of performance degradation in transmission unit of CNC machine tool. Robot. Comput.-Integr. Manuf. 2022, 73, 102230. [Google Scholar] [CrossRef]
- Yu, H.; Yu, D.; Wang, C.; Hu, Y.; Li, Y. Edge intelligence-driven digital twin of CNC system: Architecture and deployment. Robot. Comput.-Integr. Manuf. 2023, 79, 102418. [Google Scholar] [CrossRef]
- Masory, O.; Koren, Y. Reference-Word Circular Interpolators for CNC Systems. J. Eng. Ind. 1981, 104, 400–405. [Google Scholar] [CrossRef]
- Suh, S.-H.; Kang, S.K.; Chung, D.-H.; Stroud, I. Theory and Design of CNC Systems; Springer: London, UK, 2008. [Google Scholar]
Open-Architecture CNC Systems | Literature References | Present Approach |
---|---|---|
Control strategy |
| |
Working regimes studied by means of simulation |
|
|
Working regimes studied by means of experimental tests |
|
|
Simulation approach |
|
|
Motion control platform |
|
|
Parameter | Meaning | Values (for X- and Y-Axes) |
---|---|---|
Mmn | Nominal torque developed by the motor | 0.14 Nm |
Kt | Electromagnetic torque constant | 0.06 Nm/A |
Kv | Back electromotive voltage constant | 0.06 Vs/rad |
Bm | Coefficient of viscous friction of the motor | 0 Nms/rad |
L | Armature inductance | 0.029 H |
R | Armature resistance | 1.33 Ohm |
Jm | Armature moment of inertia | 0.00004 kgm2. |
ps | Pitch of the lead screw | 0.006 m |
d | Ball screw diameter | 0.01 m |
L | Ball screw length | 0.15 m |
ρ | Screw material density (steel) | 7800 kg/m3 |
Js | Lead screw moment of inertia | 1.1486∙10−6 kgm2 |
Jred | Reduced moment of inertia at the motor shaft | 4.1149∙10−5 kgm2 |
m | Overall mass of the system | m = 20 kg |
Step Response | Controller Parameters | System Characteristics |
---|---|---|
Figure 4a | KP = 367.9, KI = 18.73, KD = −20.25, N = 12.12 | Rise time = 0.155 s Settling time = 1.03 s Overshoot = 6.24% |
Figure 4b | KP = 255.6, KI = 8.604, D = −24.94, N = 8.05 | Rise time = 0.334 s Settling time = 1.06 s Overshoot = 4.4% |
Figure 4c | KP = 357.3, KI = 17, KD = −30.36, N = 11.58 | Rise time = 0.16 s Settling time = 0.768 s Overshoot = 12.2% |
Figure 4d | KP = 155.2, KI = 3.294, KD = −17.59, N = 8.717 | Rise time = 0.561 s Settling time = 0.966 s Overshoot = 0.938% |
Parameter | Values |
---|---|
vmax | 0.0083 m/s (500 mm/min) |
ta | 0.0167 s |
tct | 4.8 s |
td | 0.0167 s |
T | 4.8333 s |
KP | 140 |
KI | 0 |
KD | 0.05 |
Ts | 0.0028 s |
Parameter | Meaning | Values (for X- and Y-Axes) |
---|---|---|
R | Circle radius | 0.030 m (30 mm) |
v | Feed velocity | 0.0033 m/s (198 mm/min) |
K1 | Constant | 1 |
K2 | Constant | 3.068 · 10−4 |
C1 | Initial position compensation constant | 0.03 m (R) |
C2 | Initial position compensation constant | 0 |
T | Generation period of a full circle | 56.5487 s |
n | Total number of samples at full-circle generation | 20,480 |
N | Total number of samples during the period of generating a full circle | 20,480 |
Simulation Type | Objective | What Can Be Simulated/Studied | Benefits |
---|---|---|---|
CAE simulation | Study of the behavior of motion control systems in the structure of the CNC equipment |
| Motion control system controllers can be tuned. Positioning accuracy can be improved. Contouring accuracy can be improved. Cutting regime can be designed according to the required machining accuracy. Dynamic overloading of the equipment can be avoided. |
CAM simulation | Study of the movement of mobile elements of CNC equipment during the milling of workpieces |
| Collisions between tool and workpiece blanks can be identified and eliminated. Collisions between tool and fixtures (vice and/or flanges) can be identified and eliminated. Collisions between moving parts of the machine can be identified and eliminated. Overtravel on the axes of motion of the equipment can be identified. NC code for part machining can be generated and verified. |
Block | Block Name | Function |
---|---|---|
Encoder | The Encoder block outputs the number of pulses from a quadrature encoder on a rotary motor connected to an Arduino board. Each increase in the number of encoder pulses indicates that the motor is rotating clockwise. Each decrease in the number of encoder pulses indicates that the motor is rotating counterclockwise. The total number of pulses represents the incremental position of the rotating motor. | |
Digital Output | Sets the logic value of a digital pin on the Arduino board: - Transmitting value 1 to the block input sets the logic value of the HIGH digital pin to 5 V or 3.3 V, depending on the board voltage. - Transmitting value 0 to the block input sets the logic value of the LOW digital pin to 0 V. | |
PWM | The PWM block generates variable duty-cycle rectangular pulses (width modulated) depending on the input value sent to the block on the Arduino board hardware terminal. This block allows a digital output to provide a range of different power levels, similar to that of an analog output. |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2025 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Petru, C.-D.; Morariu, F.; Breaz, R.-E.; Crenganiș, M.; Racz, S.-G.; Gîrjob, C.-E.; Bârsan, A.; Biriș, C.-M. Development of a Small CNC Machining Center for Physical Implementation and a Digital Twin. Appl. Sci. 2025, 15, 5549. https://doi.org/10.3390/app15105549
Petru C-D, Morariu F, Breaz R-E, Crenganiș M, Racz S-G, Gîrjob C-E, Bârsan A, Biriș C-M. Development of a Small CNC Machining Center for Physical Implementation and a Digital Twin. Applied Sciences. 2025; 15(10):5549. https://doi.org/10.3390/app15105549
Chicago/Turabian StylePetru, Claudiu-Damian, Fineas Morariu, Radu-Eugen Breaz, Mihai Crenganiș, Sever-Gabriel Racz, Claudia-Emilia Gîrjob, Alexandru Bârsan, and Cristina-Maria Biriș. 2025. "Development of a Small CNC Machining Center for Physical Implementation and a Digital Twin" Applied Sciences 15, no. 10: 5549. https://doi.org/10.3390/app15105549
APA StylePetru, C.-D., Morariu, F., Breaz, R.-E., Crenganiș, M., Racz, S.-G., Gîrjob, C.-E., Bârsan, A., & Biriș, C.-M. (2025). Development of a Small CNC Machining Center for Physical Implementation and a Digital Twin. Applied Sciences, 15(10), 5549. https://doi.org/10.3390/app15105549