Application areas: Industrial automation
Challenge: To achieve high-speed, precise control of displacement, torsion, temperature, and flow rate using a single real-time controller, while also acquiring and storing the data.
Application Scheme: Using National Instruments' LabVIEW RT software and E-series controllers, high-precision data acquisition cards, executor generators, and LabVIEW, an economical and reliable multi-real-time task control system based on PC and PXI embedded controllers is developed.
Products used: LabVIEW RT; RT series embedded controllers; E series data acquisition cards
Introduction: In control systems, achieving both high-speed closed-loop control and high-speed acquisition and storage of large amounts of data is quite challenging. This is because software capable of real-time control often has limited data processing capabilities. However, in the LabVIEW RT system, through a well-designed overall software architecture, a single real-time controller can handle multiple real-time control tasks while simultaneously acquiring and storing multi-channel data, reducing costs and saving development time.
1. Physical structure of the experimental machine
The multi-task real-time control system is applied in the improved MMS100 multi-functional material testing machine. This testing machine is an experimental device that rapidly simulates the hot continuous rolling process in steel mills. It can be used to study the changes in the microstructure and properties of steel and other non-ferrous metals under different heating rates and deformation amounts. It is widely used in the development and research of new materials in metallurgy, aerospace, military and other fields.
1.1 Working principle of the experimental machine
The working principle of this testing machine is as follows: the sample is installed between two clamps, and a current of tens of thousands of amperes is passed through the sample to rapidly heat it. Simultaneously, circulating cooling water flows through the two clamps. When the heat generated by the increased current exceeds the heat removed by the water cooling, the sample temperature rises; conversely, the sample temperature decreases. When the two are equal, the sample temperature remains constant, thus achieving temperature control. Depending on the experimental requirements, when the sample is heated to the specified temperature, a hydraulic cylinder is controlled to drive a hammer at high speed to strike (compression test), stretch (tensile test), or torsion (torsion test), causing the sample to deform. All parameters of the sample during the deformation process are recorded and stored, such as hydraulic cylinder displacement, lateral displacement, longitudinal displacement, force, and torque. After the experiment, the host PC (main unit) plots the recorded data to generate curves required for the process, such as displacement-force curves, displacement-stress curves, and stress-strain curves. Some experiments require a vacuum environment to prevent oxidation of the sample surface; in this case, the sample heating chamber must be evacuated, and a protective gas (inert gas) can be added as needed. Quenching experiments require the sample to reach a certain temperature before quenching with water, air, or a mixture of air and water to meet different process requirements.
1.2 Composition of the Control System
The hardware structure of the control system is determined based on the specific requirements of the process for the dynamic response speed, accuracy, and other technical indicators of the control system. Since this equipment includes multiple units with complex structures such as a mechanical motion system, hydraulic system, vacuum system, heating system, water cooling system, quenching system, and pneumatic control system, the logic control is separated from the PXI system and controlled by a PLC to improve control accuracy and speed. The two exchange information via communication. All real-time control tasks, data acquisition, and data storage are handled by the PXI-8156B, while the host PC mainly performs functions such as programming, human-machine interface, data analysis, and processing.
2. Real-time tasks of the control system
2.1 Heating Control System
The sample is heated using direct resistance heating, characterized by low voltage, high current, rapid response heating, instantaneous power-off data acquisition, thermal expansion measurement and compensation, and a 10ms control cycle. Specifically, the method involves adjusting the firing angle of the thyristor on the primary side of the transformer to change the voltage across the sample on the secondary side, thereby altering the current flowing through the sample and achieving temperature control. This heating method has the advantage of reducing the internal thermal gradient of the sample, preventing the skin effect, and obtaining a better isothermal region. Its disadvantage is that because the thermocouple is directly welded to the sample, the current flowing through the sample during heating (tens of thousands of amperes) generates a strong magnetic field, severely affecting the accuracy of temperature measurement. However, NI's software and hardware provide a trigger acquisition function that effectively solves this problem. The method involves obtaining the voltage phase on the primary side of the transformer using a small synchronous transformer. Based on the peak value of this voltage signal, the relationship between the trigger acquisition voltage and the firing angle can be calculated. By limiting the trigger voltage value and appropriately selecting the trigger acquisition voltage, a power-off time of 20 to 30 degrees can be allowed for the thyristor firing angle, enabling power-off data acquisition. A rectifier bridge can be used to convert the negative half-cycle of the sinusoidal AC current into the positive half-cycle, enabling control to be performed twice per control cycle, with a control cycle of 10ms.
2.2 Displacement Control System
The main hydraulic cylinder is controlled by a high-speed servo valve, which in turn controls the cylinder to move the hammer. The process requires a short control cycle, so a PID input-triggered-output cyclic control with a 2ms control cycle is achieved using the PFI7 pin. A hardware PID control loop is located on the high-speed servo valve amplifier board, using the valve spool position as the feedback signal (inner loop). The software PID uses the actual position of the displacement sensor as the feedback signal (outer loop), significantly improving the control accuracy of the hydraulic cylinder.
2.3 Torsional Control System
The function of torsion control is to achieve high-speed torsion closed-loop control during torsion experiments, and also to perform deformation positioning control of the specimen after the second pass in multi-pass compression or tensile experiments. The control method utilizes the high-speed counter 1 of the PXI6052E to measure the encoder pulses, and controls the hydraulic motor via a high-speed servo valve to complete the torsion control. Torsion experiments meet the needs of high-performance steel development and research, such as super steel and military steel, by combining shear deformation with compressive deformation, thereby significantly improving the degree and rate of deformation and realizing the academic concept of combined continuous large deformation.
2.4 Flow Control System
Quenching methods include water quenching, gas quenching, and a mixture of water and gas. Different experimental processes require corresponding control of the water flow rate during quenching to meet the experimental requirements. The control method uses the flow meter's detection signal as feedback to control the solenoid ball valve to achieve closed-loop control.
3. Hardware connection issues
3.1 Grounding Issues
The PXI bus chassis has its chassis ground connected to AIGND and DGND, which differs from other control systems. To reduce interference in the control system, system grounding is crucial. Therefore, the shielding of the data lines is grounded separately, and the power ground of the secondary instruments is grounded separately along with the chassis ground. Furthermore, the power input of the secondary instruments is isolated from the power grid via a UPS, further reducing system interference.
3.2 Counter Filtering Issues of E-Series Data Acquisition Cards
The 24-bit counter on the E-series data acquisition card is not very resistant to interference. To compensate for this shortcoming, the NI website's an084QuadratureEncoders section details how to use the LS7084 chip, along with resistors and capacitors, to construct a filter circuit to eliminate interference caused by noise and jitter. This circuit can also divide the encoder's output pulse by 4, thereby greatly improving measurement accuracy.
4. Control system software
The software consists of three parts: the host computer's human-machine interface software, the real-time control software, and the logic control software. The host computer software is developed using LabVIEW on the Windows 2000 platform. The real-time control software is programmed using LabVIEW RT in the Windows 2000 environment and then downloaded to the embedded controller. The logic control software is programmed using Siemens' Step_MicroWin software.
4.1 Functions of each software component
The functions of the host computer software include process parameter input, data display, data storage and processing, and fault alarm display; the functions of the real-time control software include real-time closed-loop control of temperature, displacement, torsion, flow, etc.; and the functions of the logic control software include control cabinet buttons and indicator lights, contactors of hydraulic stations and transformers, and solenoid valves, electrical contacts, and alarms of air, oil and water circuits.
4.2 Software Structure
The overall structure of both the host computer and real-time control software utilizes the state machine structure provided by LabVIEW. This is because many tasks in the program have a certain sequence, and the state machine structure is the most effective method for solving sequential control problems. It consists of a Case structure within the While Loop and a Case selector carried in the shift register. Each frame of this Case structure can transmit control to other frames in the next iteration or directly terminate the While Loop. This allows users to execute any number of operations, each of which can call a subroutine, resulting in very high program efficiency. The real-time control software is divided into three parts: communication, multiple real-time tasks, and instantaneous data recording. The structure between several real-time tasks uses a While Loop plus a sequence structure. The execution cycle size is determined by using the remainder of i, depending on the control cycle of each task. RTFIFO is used to record the deformation process data, and when the deformation ends, i.e., when CPU time is sufficient, the data is written to disk. The control parameters are input via communication from the HostPC to the real-time controller. The real-time data collected during the experiment is also transmitted from the controller to the HostPC via communication, but at a lower rate.
5 System Performance Evaluation
Thanks to the adoption of the PXI real-time controller and RT series software, multiple control tasks are well coordinated and operated. The control accuracy and speed fully meet the design requirements. The maximum dynamic deviation of temperature control is ±1.5℃, the maximum static deviation is ±0.2℃, and the displacement measurement accuracy is 1 micrometer. This allows the overall performance of the experimental machine to reach that of similar foreign products, with increased functionality, while its price is one-quarter to one-third of that of foreign products.
6. Conclusion
The experimental machine's control system requires high precision and speed. By utilizing communication to separate real-time and non-real-time tasks, and employing a real-time control system and a reasonable software structure, the precision and response speed of multiple control tasks largely meet design requirements. Previously, such equipment was imported from a single American company, resulting in high costs. To accelerate the localization of large-scale equipment and encourage the development of high-tech products with independent intellectual property rights, the State Science and Technology Commission provided a funding of 900,000 yuan for this project to support further research and development.