Application of a digital twin in virtual simulation experiment teaching of the control course
[Objective]As a fundamental course in engineering colleges,the control course is essential in electrical,mechanical,and automation majors.However,the teaching process is not easy.Aiming at the challenges of abstract knowledge and lack of visualization display in control courses,we built a virtual control engineering laboratory with a digital twin as the featured board based on the digital twin theory.[Methods]Through the digital twin experimental module,the simulation animation is synchronized with the kinematics of the solid model,and the hidden control theory is shown.Herein,LabVIEW is employed as the primary program platform to build a virtual laboratory applicable to the teaching of mechanical control engineering;the construction of the digital twin experimental module is achieved using SolidWorks software,STM32 microcontroller,and distance measuring laser module.Through the rich combination of controls,the time and frequency domain models of the adjustable control system are built in LabVIEW,the time and frequency domain characteristic curves are presented,and the modules of time domain,frequency domain,and stability analyses are written.To create the digital twin experimental bench,SolidWorks is used to establish three-dimensional models of the test bench,mass blocks,and springs;further,the three-dimensional model of the experimental bench is imported into the LabVIEW program,and the physical experimental bench was fabricated using metal machining processes.To achieve consistency between the virtual model and the physical motion state,the sensor needs to collect the motion state of the mass block in real time.To avoid the control system from external interference,we adopt a displacement laser sensor with a high sampling frequency to collect the real-time motion of the mass block.Based on the serial communication protocol,the STM 32 microcontroller serves as the slave computer to collect the data uploaded by the sensor and transfer it to the computer for subsequent processing.The data acquisition control driver available in LabVIEW acquires the amount of information from the serial port,processes it,and transfers it to the virtual model as a data stream.The position of the virtual model is updated at a high frequency in the program,achieving correspondence between the digital mirror and the movement of the physical entity,in addition to the digital twin synchronization.[Results]The developed virtual laboratory of mechanical control engineering achieved the following functions:showing the time domain characteristic,frequency domain characteristic curve,and Nyquist diagram of the control system;solving the gain and phase margins to solve the zero and pole;reproducing the two-system stability discrimination methods,i.e.,Nyquist stability and stability margin criteria;showing the trajectory of the system pole with change in parameters;constructing different simulation models to realize the digital twin experimental module.[Conclusions]Through these functions,the organic combination of teaching,simulation,and digital twin is achieved,which boosts the experimental teaching link of the control course to a certain degree and offers guidance for the cultivation of innovative talents and the construction of virtual simulation laboratories.
digital twincontrol engineeringLabVIEWvirtual laboratorysingle chip