Share this

Modeling and Simulation of CNC Systems Based on PROFIBUS Bus

2026-04-06 05:59:48 · · #1
Abstract: Considering the characteristics of fieldbus control systems, a basic model of a fieldbus-based CNC system is established. Since the inter-transmission delay of the fieldbus communication links determines the actual performance of the fieldbus-based control system, this paper uses Matlab/Simulink to establish a communication system model of the CNC system based on PRQFIBUS-DP. Through simulation, the impact of fieldbus transmission delay on the performance of the CNC system is evaluated, providing a theoretical basis for the research and development of fieldbus-based CNC systems. Keywords: Fieldbus; PROFIBUS; Communication system; Time delay; CNC Chinese Classification Number: TP391 Document Code: A Article Number: 1 009-01 34 (2005) 09-0042-05 Modeling on the CNC based on fieldbus of PROFIBUS XIE Jing-ming, ZHOU Zu-de, CHEN You-ping, CHEN Bing, KONG Fan-tian (National NC System Engineering Research Center, Huazhong University of Science and Technology, Wuhan 430074, China) Abstract: The basic model of the CNC based on Fieldbus is constituted according to the characteristics of Fieldbus. The real-time of the control system based on Fieldbus depends on the Fieldbus communication delay. Therefore, the communication model of the CNC based on PROFIBUS-DP is constructed by Matlab/Simulink tool in this paper, and the CNC performance about Fieldbus transpo-delay is evaluated. All of this provides the theoretic bases for the research and development of fieldbus-based CNC system. Key words: Fieldbus; PROFIBUS; communication; time delay; CNC 0 Introduction Fieldbus control system breaks the traditional control system structure. Technically, fieldbus has the characteristics of system openness, interoperability and interoperability, intelligent and functional autonomy of field devices, and adaptability to field environment. However, the biggest drawback of fieldbus is the existence of signal transmission delay. Because fieldbus adopts a serial data transmission method, all nodes in the fieldbus control network need to occupy the bus in a time-sharing manner through network scheduling when transmitting messages. This inevitably causes a delay in the transmission of information between field sensors, drive devices and controllers (master stations) or plant management. Moreover, with the changes in communication protocols and network load, this delay is usually random and time-varying, thus affecting the performance and even stability of the control system. Under normal circumstances, the transmission delay of fieldbus control system can be divided into: (1) Fixed delay: generally applicable to the case where the sampling period of the control system is much larger than the network delay. (2) Independently distributed random delay: The delay follows a certain probability distribution, but has independent statistical characteristics. (3) Random delay based on Markov chain. For deterministic fieldbus control networks, the network transmission delay of a certain control system (bus protocol, transmission rate, number of nodes and configuration are determined) is relatively fixed. Therefore, the study in this paper is based on the fixed fieldbus transmission delay. 1 Basic model of fieldbus-based CNC system Different fieldbus control networks have different network delay characteristics. In order to analyze the impact of network delay on the control system, the network delay should be modeled first. The network delay is generally time-varying and affected by factors such as network load and link layer scheduling protocol. The fieldbus-based CNC system connects CNC units, actuators and sensors through the fieldbus to form a distributed control system. Therefore, the fieldbus-based CNC system is a complex system with multiple inputs, multiple outputs and communication transmission delay. Its basic model is shown in Figure 1. The model consists of two parts: CNC machine tool and CNC unit. The dynamic model of the CNC machine tool includes n observable states {x}, m inputs {u}, and r outputs {Y}; the dynamic model of the CNC unit includes q observable states {z}, r inputs {W}, and m outputs {v}. The CNC system includes m actuators, r sensors, and one CNC unit; therefore, n, m, r, and q are all positive integers. Where S[sub]1[/sub], S[sub]2[/sub], ..., S[sub]r[/sub] and a[sub]1[/sub], a[sub]2[/sub], ..., a[sub]m[/sub] represent the signal transmission delay between the sensor and the CNC unit and between the CNC unit and the actuator, respectively. That is, the variables w[sub]r[/sub] and u[sub]m[/sub] represent the delayed signals y[sub]r[/sub] and v[sub]m[/sub] after being transmitted through the fieldbus. In Figure 1, the CNC machine tool can be considered as a linear time-invariant continuous system. Therefore, its dynamic model GP can be described by the following continuous state equation: where x(t)∈Rn, u(t)∈Rm, y(t)∈Rr, and AP, BP, and CP are constant coefficient matrices with variable dimensions. Since the CNC unit collects sensor information from the CNC machine tool at a certain sampling frequency by a digital computer and performs digital processing through a certain algorithm, it sends action commands to the execution components of the CNC machine tool. Therefore, the CNC unit can only be regarded as a discrete system, and its dynamic model G[sub]C[/sub] can be described by the following discrete state equations: z(k+1)=Fz(k)+Gw(k) (3) v(k)=Hz(k)+Jw(k) (4) Where: z(k)=z(kT)∈R[sup]q[/sup], w(k)=w(kT)∈R[sup]r[/sup], v(k)=v(kT)∈R[sup]m[/sup], T is the sampling period, and F, G, H and J are constant coefficient matrices with variable dimensions. The biggest feature of the fieldbus-based CNC system is that there is a delay in the data communication between the CNC unit and the CNC machine tool. As shown in Figure 1, under normal circumstances, u(t)l[sub]t=kT[/sub] ≠ v(k), w(k) ≠ y(t)l[sub]t=kT[/sub], mainly because the fieldbus uses a serial data transmission method, and there is a delay between signals u(t) and v(k), and between w(k) and y(t). Therefore, the magnitude of the time delay in the communication link of the fieldbus determines the real-time performance of the fieldbus-based control system. 2 Establishment of a CNC System Model Based on ProFIBUS Bus To suppress the impact of bus transmission delay on the fieldbus control system, it is of great significance to establish a model of the fieldbus-based CNC system to conduct theoretical analysis and simulation research on the impact of fieldbus transmission delay on system performance. In the basic model shown in Figure 1, due to the complexity of the system and the uncertainty of system parameters, it is difficult to establish an accurate mathematical model. This paper proposes to use Matlab/Simulink tools to establish a model of the fieldbus-based CNC system and to simulate and analyze the impact of fieldbus transmission delay on the CNC system performance. Generally speaking, data communication control networks are complex hybrid systems. If discrete transfer functions (without considering the input/output changes within the sampling period) are used in the simulation process to study the impact of small bus transmission delays on the control system, it will become very difficult. As shown in Figure 2, in order to avoid these problems and to simulate the behavior of fieldbus-based control systems as realistically as possible, we simulate the discrete control system as a continuous control system and use sample/hold units to latch information within a sampling period. In this case, the delay caused by waiting for bus authorization can be simulated by the time delay from the time the field sensor output information is latched to the time the information is latched to the controller. The descriptions of each module in the model are as follows: (1) Fieldbus Media Access Control Module (Ask Token) The media access control method adopted in the data link layer of the Profibus bus is a hybrid media access method, that is, the typical bus token passing method between master stations and the master-slave polling method between master stations and slave stations. This media access control method meets the basic requirements of media access control: communication between master stations ensures that each station has sufficient time to complete its communication task within a defined time interval; and real-time data transmission between master and slave stations is fast and simple. Each master station logically forms a token ring. When a master station on the logical ring obtains a token, it is allowed to communicate with a slave or master station for a certain period. During this time, each master and slave station monitors the bus to respond to requests from the master station holding the token. To control the token cycle time, the Profibus bus media access control MAC protocol sets three token times: ideal token cycle time T<sub>TR</sub>, actual token cycle time T<sub>RR</sub>, and token holding time T<sub>TH</sub>. The time interval between two token receptions by a master station is defined as the actual token cycle time T<sub>RR</sub>; the ideal token cycle time T<sub>TR</sub> is pre-configured based on network conditions and data throughput, determining the length of token holding time for each master station. The token holding time TTH is the difference between TTR and TRR. To calculate these three times, the Profibus MAC protocol also sets up two types of timers: the TRR timer and the TTH timer. When a token arrives at a master station, the TRR timer for that node starts counting. When the token arrives at the same master station again, the difference between the TRR timer value and the ideal token cycle time TTR is assigned to the TTH timer, resulting in the value of TTH: TTH = TTR - TRR. The TTH timer uses this value to control information transmission. If T[sub]TH[/sub] is negative, indicating a token timeout, this node can send at most one high-priority message before passing the token. If T[sub]TH[/sub] is not negative, indicating the token arrived on time, this node can continuously send multiple high-priority messages waiting to be sent. Once all high-priority messages have been sent, if there is still time remaining, low-priority messages can be sent. The token is passed to the next node after all messages have been sent or the timeout period has expired. This token passing method offers good time determinism during network overload, but communication confirmation is crucial in such situations. During high network throughput, to meet system real-time requirements and ensure timely delivery of strictly periodic messages, Profibus categorizes transmitted messages into high-priority and low-priority messages. Low-priority messages are only sent after all high-priority messages have been transmitted or when no high-priority messages are available. Based on this, Profibus further subdivides low-priority messages into three subcategories: polling table, non-cyclic low-priority, and gap table. These three subclasses are used for dynamic optimization of the logic loop, and the execution order of the logic loop is stored in the polling table. After all high priority messages are sent, the polling table message loop is sent. Non-cyclic low priority messages are only sent after the polling table message loop is completed. Since the CNC system based on Profibus bus studied in this paper adopts a pure master-slave structure, and most CNC systems are periodic tasks, the fieldbus media access control module in the simulation model should follow the periodic master-slave polling media access method, and should also consider some non-periodic sudden events (such as emergency stop) that may occur during CNC machining. As shown in Figure 3, the fieldbus media access control module uses the random number generator module in Simulink and can simulate the fieldbus media access process well after certain logic processing. (2) Numerical control unit (NCU) In the servo motion system of CNC machine tool, due to the existence of multiple intermediate links such as worktable, intermediate transmission links, servo motors, etc., it is difficult to obtain an accurate mathematical model, so it is difficult to apply direct digital control. Since PID control is a mature and widely used control method, PID regulators have been widely used in CNC servo motion systems. Although digital PID control is discontinuous, it approximates continuous change compared to servo motion systems with relatively large time constants. Therefore, digital PID can replace analog controllers in most cases. The tuning of PID controller parameters is determined by the machining requirements, specifying the proportional coefficient, integral coefficient, and derivative coefficient. However, for practical control systems, PID parameter tuning is a challenging problem. While various methods for tuning analog PID controller parameters can be used, such as the extended critical proportional gain method, the extended response curve method, and the normalized parameter tuning method, these methods either require testing and calculation of the object's parameters and transient characteristics, or accumulating considerable debugging experience to achieve good results. Furthermore, when the characteristics and parameters of the controlled object change, continuing to control with the original PID parameters will worsen the system's control characteristics. Therefore, in a CNC unit, the PID controller parameters are evaluated based on the control system's response to a unit step function when the control and transmission delays in the model are zero, thus optimizing the system's control performance. (3) Numerical Control Machine Tool (NC Machine) For numerical control machine tools, the main control object is the servo system. The machining speed and accuracy of numerical control machine tools are largely determined by the performance of the servo system. Therefore, the numerical control machine tool module studied in Figure 2 will be described by the mathematical model of the servo system. Figure 4 shows the structural model of the numerical control machine tool. The input is the rotation angle θ of the motor, and the output is the displacement XL of the worktable. In the figure, J1, J2 and K1, K2 are the moment of inertia and torsional stiffness of the motor shaft and the lead screw shaft, respectively; m is the mass of the worktable; f is the viscous damping coefficient of the guide rail motion; K0 is the comprehensive tensile and compressive stiffness of the lead screw and nut pair; i is the gear reduction ratio, i>1. After comprehensively considering the rigidity and damping of the transmission chain, the following differential equations for input and output can be obtained: Where: J[sub]L[/sub]—— Total inertia referred to the lead screw shaft; f[sub]L[/sub]—— Viscous damping coefficient of the guide rail referred to the lead screw shaft; K[sub]L[/sub]—— Total stiffness of the mechanical transmission device referred to the lead screw shaft; S—— Lead of the lead screw. Let the transfer function of the mechanical transmission device be G[sub]L[/sub](s), then: Further simplifying the above equation: It can be seen that the mechanical feed transmission device of the CNC machine tool can be simplified to a second-order link. Therefore, a second-order link is used to simulate the CNC machine tool in the model. (4) Sensor Since the main simulation object of this model is a digital servo based on fieldbus, the sensor mainly simulates the position sensor. Assuming that the sensor itself does not have signal processing delay, the rising edge trigger module is used for simulation, and its trigger signal is the same as the clock signal frequency Ts of the sensor. (5) Control and transmission delay (Transport_Delay_C, Transport_Delay_S) Since the fieldbus usually adopts a serial working mode, the transmission of control signals in the fieldbus control system will have a delay. According to the results studied in the previous section of this chapter, the magnitude of the delay time mainly depends on the bus transmission rate and the medium length. Therefore, the transmission delay modules Transport_Delay_C and Transport_Delay_S are used to simulate the transmission delay of control signals and sampling signals, respectively. The delay time also takes into account the signal processing time in the controller and the sensor. (6) Sample/hold module (S/H) The transmission of control signals and position sensing signals in the bus is controlled by the fieldbus access rights. Therefore, rising edge triggering modules (S/H_C, S/H_S) are used for simulation. The triggering signal is the output signal of the fieldbus medium access control module (Ask Token). (7) Clock cycles (Tc, Ts) of the controller and sensor In the simulation module, Tc and Ts represent the clock cycles of the controller and sensor, respectively. It is assumed that their clock frequencies are the same but not necessarily synchronized. 3 Simulation and experimental results analysis The simulation model parameters are as follows: PID parameters of the numerical control unit (NCU) controller: P=2.9, I=1.18, D=1.5; Simplified mathematical model of the numerical control machine tool: 1/s² + s + 1; The simulation results and analysis are as follows: Figure 5 reflects the impact of fieldbus transmission delay on the numerical control system, where Tc is the clock cycle of the controller and sensor. 4 Summary High speed, high precision, and openness are important development directions for CNC systems in the future. This means that CNC systems, especially open CNC systems based on fieldbus, are required to have high real-time performance. Although fieldbus control systems have many advantages, the limited bus network bandwidth can lead to stability and real-time problems in fieldbus control systems. Therefore, there is a lot of content to be further researched and developed in terms of modeling, simulation, analysis and implementation of fieldbus-based CNC systems. References: [1] VALERA A, SALT J, CASANOVA V. FERRUS S. Control of industrial robot with a fieldbus[J]. IEEE. 1999. 1235. 1241. Emerging Technologies and Factory Automation, 1999. Proceedings. ETFA 9. 1999 7th IEEE International Conference on, Volume: 2. 1999. [2] EZ10 B, FRANCESC0 B, LUCA L, GIUSEPPE SB. Communication protocol for electrical drives[J]. IEEE, 1995. 706. 711. Industrial Electronics, Control and Instrumentation, 1995. , Proceedings of the 1995 IEEE IECON 21st International Conference on. Volume: 1.6-10 Nov 1995 Page(s): 706. 711 vo1.1. [3] LUC H, SERGE W. Fieldbus network simulation using a time extended estelle formalism[J]. IEEE, 2000. 92. 97. Modeling. Analysis and Simulation of Computer and Telecommunication Systems. 2000. Proceedings. 8th International Symposiumon. 2000 Page(s): 92-97 [4] Xie Jingming, Zhou Zude, et al. Research on open numerical control system architecture based on fieldbus[J]. Journal of Huazhong University of Science and Technology, 2002, 4(4): 1-3. [5] RAY A. Output feedback control under randomly varying distributed delays[J]. Journal of guidance, control and dynamics, 1994. 17f4): 701. 711. [6] BRANICKY MS, PHILL1PS SR, WEI Z, Stability of networked control systems: explicit analysis of delay[J]. in American Control Conference, 2000. Proceedings of the 2000. [7] Shu Zhibing, Li Ming, Li Jun, Zhao Yingkai. Steady-state performance analysis of closed-loop servo system[J]. Journal of Nanjing University of Technology, 2002(7): 83-86. Please click to download the original text: Modeling and Simulation of CNC System Based on PROFIBUS Bus.pdf
Read next

CATDOLL CATDOLL 115CM Saki TPE

Height: 115cm Weight: 19.5kg Shoulder Width: 29cm Bust/Waist/Hip: 57/53/64cm Oral Depth: 3-5cm Vaginal Depth: 3-15cm An...

Articles 2026-02-22
CATDOLL Dudu Soft Silicone Head

CATDOLL Dudu Soft Silicone Head

Articles
2026-02-22
CATDOLL Chu Soft Silicone Head

CATDOLL Chu Soft Silicone Head

Articles
2026-02-22
CATDOLL 126CM Laura

CATDOLL 126CM Laura

Articles
2026-02-22