Research on Music Wireless Control Based on Motion Tracking Sensor and Internet of Things

With the continuous development of society and rapid economic growth, intelligent music control technology has received more and more attention. At the same time, real-time motion tracking technology has also been developed more and more in the fields of virtual reality and human-machine control. This article is dedicated to developing a wireless music control system based on gesture tracking sensors. First, in the data collection part, an infrared sensor module based on the Internet of Things is used to automatically detect whether someone is approaching. When detecting that someone is approaching, the motion tracking sensor module captures and detects gestures and counts them through a counter. Then, the IoT data transmission module sends the acquired gesture information from the sending end to the receiving end. Finally, the particle swarm algorithm performs algorithmic intelligent processing and judgment on the transmitted data to realize wireless control of background music. After software and hardware debugging, a wireless music control model based on motion tracking was finally successfully established. The system has undergone a complete test, and the test results show that the system has strong stability. Users can easily control music equipment and achieve high accuracy of music control information.


I. INTRODUCTION
In recent years, with the development of lighting technology, control technology, and communication technology, various environmental lighting projects have developed rapidly, and the implementation of outdoor music and light performance projects will become a highlight of the city's night scene [1], [2]. At present, most city night scenes are mainly based on LED lighting [3]. The construction of large-scale outdoor music and light shows will become a jewel in the night scene [4]. The melody of music is more vivid and colorful. In order to further strengthen the construction of urban night scenes, increase the dynamics of lighting and sound effects to match the colorful lights [5], [6].
At present, there are mainly three protocols for data transmission of music and lighting control networks: DMX512 protocol (improved version of DMX512-A protocol), ACN The associate editor coordinating the review of this manuscript and approving it for publication was Yuan Tian . protocol and Art-Net protocol [7], [8]. The ACN protocol organized by the world-famous ESTA (Entertainment Services & Technology Association) is a dimming network protocol that represents the North American industry [9], [10]. The ACN protocol clearly states this: ACN is an advanced control network standard designed to provide next-generation lighting control network data transmission [11], [12]. ACN is going to complete more work including the DMX512 protocol. ACN will unify the lighting control network, allowing a single network to transmit more different types of dimming and other related data, and can connect dimming equipment from different manufacturers [13], [14]. The ACN agreement is not limited to the field of lighting, and is expected to apply to sound control and stage machinery. It can be applied to any network that supports the TCP/IP protocol, and the most common one is usually the Ethernet network [15]. In order to ensure that the music lighting control is foolproof, in addition to choosing mature technology, stable and reliable dimming products, scientific and reasonable control system design is also the key [16], [17]. As the command center of the music lighting system, the reliability of the music lighting control system directly affects the lighting effects of the application [18]. In recent years, major professional lighting manufacturers have designed and implemented several solutions in order to solve control problems. Strand Lighting, headquartered in Los Angeles, is one of the world's largest manufacturers of film and television stage lighting products. It has leading technology and has developed Serve and Show Net Configuration software and Show Net network systems [19].
Human motion capture systems are widely used in fields such as remote sensing control, athlete training, film production, and disease diagnosis. The movements of the human body can be regarded as a series of complex and regular movements. In order to complete a movement, each complete movement can be decomposed into the movements of individual limbs [20]. The movements of each limb are independent and mutually independent. limit. The various movements of the human body are composed of multiple degrees of freedom, and their complexity makes the computer simulation of limb movements still have many difficulties and challenges.
With the continuous development of society and rapid economic growth, intelligent music control technology has received more and more attention. At the same time, real-time motion tracking technology has also been developed more and more in the fields of virtual reality and human-machine control. This article is dedicated to developing a wireless music control system based on gesture tracking sensors. The second part of this article describes an overview of motion tracking sensors and related technologies of the Internet of Things. On this basis, the third section introduces the wireless music control based on motion tracking sensors and the wireless music control architecture based on the Internet of Things. The fourth section provides experimental results to verify the effectiveness of the proposed music wireless control plan.

II. RELATED WORK A. MOTION TRACKING SENSOR
Human posture recognition usually has two types: visionbased human posture recognition and sensor-based human posture recognition [21], [22]. Vision-based human gesture recognition technology started relatively early and the theory is relatively mature. It mainly uses algorithms such as support vector machines and hidden Marko's, and the recognition success rate or algorithm efficiency is relatively ideal [23]. Compared with vision-based gesture recognition methods, sensor-based gesture recognition has obvious advantages: it is not restricted by external conditions such as light, angle, and obstacles. Vision-based human gesture recognition methods are more dependent on the external environment, and motion data can only be obtained in an environment with sufficient light. If you are in a high temperature, smoke or vibration environment, you cannot use vision-based human gesture recognition methods. Users can do their habitual movements to obtain data; and the sensor used to capture the human  body posture has the characteristics of small size and high sensitivity, and can be placed anywhere on the body for the user to carry [24], [25].
The wireless human posture recognition system is mainly composed of TMX4903 gesture tracking sensor, Arduino UNO R3 hardware development board, MPU6050, NRF24L01, power supply, etc. It mainly completes the recognition of human posture actions and the wireless transmission of recognition results [26], [27]. The hardware design block diagram of the wireless human body gesture recognition system is shown in Figure 1. It mainly includes the following parts. If the single-chip microcomputer does not receive the data, the counting module and the gesture sensing module are closed. If the microcontroller receives the data, it judges the gesture through the algorithm of gesture recognition.
The main functions realized by the program of the wireless human posture recognition system include collecting human posture data, calculating posture angle, human posture recognition, and wireless transmission of recognition results [28], [29]. The system is mainly divided into three parts: data acquisition node, relay node, server, and the software design block diagram of the wireless human body gesture recognition system is shown in Figure 2. Uplink data communication is mainly to send the collected sensor information to the server after filtering the relay node. The process of data communication is divided into two types, uplink data communication and downlink data communication [30]. Downlink data communication is mainly sent by the server to the relay node within a certain period of time.
The relay node forwards it to the data collection node, and the data collection node changes the sampling time according to the data. The data collection node uses the protocol to drive the three-axis accelerometer and the three-axis gyroscope, and sends the collected sensor data information to the relay node through the IoT module [31], [32]. The data collection node asynchronously monitors the synchronization information sent by the relay node at the same time to adjust the sampling time. The relay node is mainly composed of an Internet of Things module and a main control unit. The Internet of Things module is responsible for communicating with the server to form a sensor network, and the Bluetooth module is responsible for communicating with the data collection node [33], [34]. The server first establishes a 3D stick model of the human body, drives the human body model to move by receiving the sensor data information uploaded by the data collection node, and sends synchronization information regularly to correct the sampling time of the data collection node.

B. INTERNET OF THINGS TECHNOLOGY
The Internet of Things is a hot spot that has emerged in recent years. It can be said that it is an extension and derivative of the development of the Internet, and it is revolutionary for the Internet. Its important principle is to use a variety of information sensing equipment [35], [36]. For example, we often see radio frequency identification (RFID) technology, global positioning system, infrared sensors, laser scanners, gas sensors, etc. to effectively collect relevant information and data [37]. That is to say, all related items are connected to the Internet to facilitate people's identification, management and control [38]. At the same time, the collected sound, light, heat, electricity and other related information will be transmitted in the form of data information and interconnected with the Internet, effectively realizing the relationship between things and people, and things and things. The architecture design of the Internet of Things for the music wireless control system is shown in Figure 3.
The music wireless control system in this article consists of two parts: control center and monitoring station.
The hardware part of the monitoring center is relatively simple, requiring only a PC and a server [39], [40]. The PC is mainly used to install and manage the software of the system, and the server is used to store the transmitted data. According to the different functions, the hardware part of the monitoring station can be roughly divided into the following modules: embedded module, wireless sensor network module, wireless communication technology module and gesture tracking sensor module.

III. THE PROPOSED SCHEME
The second part of this article describes an overview of motion tracking sensors and related technologies of the Internet of Things. On this basis, the third section introduces the wireless music control based on motion tracking sensors and the wireless music control architecture based on the Internet of Things.

A. MOTION TRACKING SENSOR STRUCTURE DESIGN
The wireless music control system based on gesture tracking sensor includes three modules: information collection, data transmission, and data processing. The data acquisition module uses the infrared sensor module to periodically detect whether someone is approaching. When someone approaches the infrared sensor, the sensor senses the human body and transmits the signal to the Arduino UNOR3 microcontroller. It also starts counting at the same time. When the count reaches 30 seconds, if the TMx4903 sensor module senses a gesture, it will transmit data to the microcontroller. If the single-chip microcomputer does not receive the data, the counting module and the gesture sensing module are closed. If the microcontroller receives the data, it judges the gesture through the algorithm of gesture recognition. And according to the program's setting of the music control command represented by the gesture, different data is generated. Flow chart of music wireless control system is shown in Figure 4.
When the gesture is a command for music playback, the IoT signal transmitter will send playback data. When the gesture is a command for music pause, the IoT signal transmitter will send pause data. When the gesture is a command for music switching and upward switching, the IoT signal transmitter will send switching data. When the gesture is a command to switch music and switch down, the IoT signal sending end will send data. When the gesture is a volume adjustment and volume reduction command, the IoT signal sending end will send volume data. After receiving the 8bit data sent by the sending end, the signal receiving end of the Internet of Things sends the data to the single-chip computer on the music player side, and the single-chip computer at the music player side realizes the control of music playback.

B. SENSOR NETWORK OPTIMIZATION BASED ON PARTICLE SWARM ALGORITHM
In industrial production and scientific research, the problem of NP difficulty is often encountered. Intelligent algorithms can effectively solve high-dimensional, non-linear, VOLUME 9, 2021  and discontinuous problems. Traditional methods may have astronomical calculation times when solving NP-hard problems. In fact, the sensor network positioning problem is also NP-hard. Therefore, intelligent algorithms used in sensor network positioning can improve the accuracy of network processes. Particle swarm optimization algorithm is an optimization algorithm that simulates birds looking for food. The mark definition in the formula is shown in Table 1.
In biological populations, individuals and groups are closely connected, and individuals often cooperate with each other and exchange information to achieve their goals.
The particle swarm optimization algorithm is inspired by the predation behavior of birds, and it is found that the algorithm can be used to solve complex nonlinear problems in industrial production and research and to perform multi-objective optimization problems. All solutions to an optimization problem are all potential solutions in the feasible region.
First initialize random coordinates in the feasibility area.
The fitness value of each particle (estimated coordinate) can be calculated by the fitness function. According to the size of the fitness value, it can be judged whether the particle (estimated coordinate) meets the accuracy requirement.
Initialize the parameters and randomly generate a certain number of particles (estimated coordinates) in the feasible region.
Calculate the fitness value (precision value) of each particle (estimated coordinate) according to the fitness value function, and record the optimal value pets and the global optimal value.
Compare the current value of the estimated particle (estimated coordinate) l with the current optimal value of the particle (estimated coordinate) l.
Update each particle (estimated coordinates) according to formulas (3) and (4), and then return to the previous step.
Until the conditions are met, output the global extreme value (the highest precision value of all estimated coordinates) and the corresponding particles (estimated coordinates) and exit the loop.
The state estimation in target tracking is actually to estimate the current and future motion state of the target, including position, velocity, acceleration, etc., through a certain estimation method from a series of received measurement values. According to different application environments, the selected tracking algorithm is different, and the tracking accuracy obtained is also different.

IV. PERFORMANCE TEST A. MUSIC WIRELESS CONTROL TEST ENVIRONMENT
Through the motion tracking sensor node energy consumption model in the above chapter, we can know that the clustering structure has a great influence on the communication energy of wireless sensor networks. The energy consumption of communication nodes will directly determine the survival and applicability of wireless sensor networks. Therefore, in this chapter, we will carry out environmental testing of music wireless control system based on motion tracking and the Internet of Things.

B. MUSIC WIRELESS CONTROL SIMULATION
In practical applications, the motion of the moving target is nonlinear, so its state equation can be simulated as nonlinear. For the filtering of nonlinear models, the three algorithms introduced earlier in this chapter are generally popular, namely, extended Kalman filter, unscented Kalman filter and particle swarm algorithm. In order to study the tracking accuracy and error of the tracking algorithm based on the wireless sensor network, MATLAB is used to simulate these three filtering algorithms, and the results are analyzed. It can be seen that the state value calculated by the extended Kalman filter algorithm is very different from the actual state in the first 15 seconds. Although the tracking effect is better, it is extremely unstable. Of course, this has a lot to do with the selected state equation. The state equation produces frequent peaks, which increases the difficulty of tracking. It can be seen that the tracking effect of the unscented Kalman filter algorithm is acceptable, but the tracking results of part of the time are quite different from the real state, especially when there are a lot of rapid turns, the error value is relatively large.
The particle swarm algorithm has tracked the true state very well most of the time. Although the phenomenon of frequent loss of targets in a short period of time appeared in the early stage, the tracking effect is getting better and better with the increase of prior particles. The state values and real estate values calculated by the three algorithms of extended Kalman filter, unscented Kalman filter and particle swarm algorithm within 50s are shown in Figure 5 and Figure 6. Figure 6 shows the positioning error of each unknown node of the three algorithms when the communication radius is 30m, the number of unknown nodes is 50, and the number  of anchor nodes is 20. It can be seen from Figure 6 that both the extended Kalman filter and the unscented Kalman filter have large error fluctuations and deviation data. The particle swarm algorithm has small fluctuations and the positioning error of 62% of the nodes is within 5m, but the vibration of the early error is stronger, the error situation in the middle and late stages is greatly alleviated, and the tracking process is well completed. If the single-chip microcomputer does not receive the data, the counting module and the gesture sensing module are closed. If the microcontroller receives the data, it judges the gesture through the algorithm of gesture recognition. And according to the program's setting of the music control command represented by the gesture, different data is generated. It can be seen that the improved algorithm in this paper not only reduces the positioning error, but also has better stability.
From the results of the motion tracking sensor node error test in the above chapters, we can know that the particle swarm algorithm proposed in this paper can improve the  accuracy and efficiency of the motion tracking sensor. For the filtering of nonlinear models, the three algorithms introduced earlier in this chapter are generally popular, namely, extended Kalman filter, unscented Kalman filter and particle swarm algorithm. And different simulation environments will also have an impact on the effect of music wireless control, so we will carry out music wireless control simulation based on different environments to verify the applicability of the program in different environments. Figures 7-10 show the command category effects of the music wireless control system in different environments. The particle swarm optimization algorithm is inspired by the predation behavior of birds, and it is found that the algorithm can be used to solve complex nonlinear problems in industrial production and research and to perform multi-objective optimization problems.
Through the simulation test, we found that the system has achieved good simulation test results in different simulation  environments. With the increase of data samples, wireless control commands of different types of music have been improved. The motion tracking signals collected above have been simply thinned and compressed. The state estimation in target tracking is actually to estimate the current and future motion state of the target, including position, velocity, acceleration, etc., through a certain estimation method from a series of received measurement values. The following will reconstruct the motion tracking signal. Since the motion tracking signal is a one-dimensional signal, try to use a more effective algorithm for one-dimensional signal recovery when choosing a reconstruction algorithm. In this study, the OMP signal reconstruction algorithm was selected. The algorithm first determines the position of the non-zero elements in the sparse signal according to the strength of the correlation between the measured value Y and the measurement  matrix R, and then obtains the value of the non-zero elements by solving the least square problem. The music data reconstruction effect based on the test data sets I and II is shown in Figure 11 and Figure 12. The wireless music control system based on gesture tracking sensor includes three modules: information collection, data transmission, and data processing. The data acquisition module uses the infrared sensor module to periodically detect whether someone is approaching.
Through the simulation test, we found that the system has achieved good simulation test results in different ways. The music data reconstruction effects based on test data sets I and II can meet the needs of practical applications. The algorithm first determines the position of the non-zero elements in the sparse signal according to the strength of the correlation between the measured value Y and the measurement matrix R, and then obtains the value of the non-zero elements by solving the least square problem. It's just that the vibration of the error in the early stage is stronger, the error situation in the middle and late stage is greatly alleviated, and the tracking process is completed well. It can be seen that the improved algorithm in this paper not only reduces the positioning error, but also has better stability.

V. CONCLUSION
Real-time motion tracking technology has also been developed more and more in the fields of virtual reality and humanmachine control. This article is dedicated to developing a wireless music control system based on gesture tracking sensors and Internet of Things technology. Up to now, the research on tracking technology of moving targets based on wireless sensor technology is still an active field. Because particle swarm has more prominent advantages in the tracking of non-linear motion of the target, it is very important to study particle swarm algorithm. After debugging the software and hardware, this article successfully realized the music wireless control system based on motion tracking, and the system was tested completely. The test shows that the system is stable and the music control information is accurate, and users can easily control the music equipment. In the future, we will devote ourselves to the further research and development of existing music wireless control technology.