#### Abstract

This paper combines virtual simulation technology to improve the traditional foreign language teaching mode. Aiming at the problems of traditional phase-shift shadow Moiré profiler, a three-step quadrature-phase demodulation technique using unknown phase shift was developed. Then, the paper compares the proposed method with the GS method using MATLAB simulation. It can be seen from the simulation and demodulation results that the two methods obtain similar results, thus proving the equivalence of the two methods.

#### 1. Introduction

Virtual simulation experiment foreign language teaching is an important part of higher education informatization construction and experimental foreign language teaching demonstration center construction. It aims to solve many problems of “cannot do it, cannot do it well, cannot do it at all, and it’s difficult to do it” through the deep integration of information technology, intelligent technology, and experimental foreign language teaching. Therefore, it is a new form of “intelligence + education” following “Internet + education”. Since the identification of the first batch of foreign language teaching projects of the first demonstration virtual simulation experiments in 2017, under the guidance of the relevant documents of the Ministry of Education, colleges and universities across the country highlighted the student-centered foreign language teaching concept, select accurate and appropriate foreign language teaching content, and continuously promote the integration of modern information technology into experimental foreign language teaching. Moreover, a series of high-quality virtual simulation experiment foreign language teaching projects have been successfully developed, providing important support for the cultivation of high-level innovative talents. By the end of 2020, colleges and universities have launched 2,079 virtual simulation experiment foreign language teaching projects on the “iLAB” virtual simulation experiment foreign language teaching sharing platform. Among them, 728 items have been recognized by the state, and the foreign language teaching of virtual simulation experiments has achieved good stage results. In particular, it should be pointed out that during the epidemic prevention and control period in 2020, colleges and universities will give full play to the online learning advantages of virtual simulation experiment foreign language teaching projects and provide online experimental learning resources for college students who cannot return to school. Moreover, through online teaching, learning, and other online foreign language teaching activities, the progress and quality of foreign language teaching in the special period of the new crown epidemic are guaranteed. In a broad sense, virtual simulation experiments mainly refer to various simulation experiments that use computer and Internet technology to replace traditional real experimental instruments and equipment with virtual instruments and equipment.

Scholars and institutions at home and abroad have discussed which foreign language teaching goals should be established in the era of artificial intelligence and what kind of abilities should be cultivated for students. At the same time, some scholars believe that education in the era of artificial intelligence should shift from simple knowledge transfer to the development of multiple abilities, including creative spirit, humanistic quality, and critical thinking. In addition, some scholars have proposed that the 4C capabilities should be cultivated in the intelligent era, namely critical thinking, communication ability, collaboration ability, and innovation and creativity ability. Constructivist learning theory believes that the ability to select knowledge and to “ deposit and withdraw in lump sum” knowledge is the most critical ability in the age of intelligence. The ability to make connections in the age of intelligence is critical. Many scholars and institutions in the field of deep learning research believe that the intelligent era should focus on cultivating knowledge ability, that is, using previously learned knowledge to support the ability to learn new knowledge or solve problems in relevant cultural contexts.

Based on the actual needs of foreign language teaching, this paper applies virtual simulation technology to foreign language teaching and combines virtual simulation technology to improve the traditional foreign language teaching mode to enhance the effect of foreign language teaching.

#### 2. Related Work

In terms of platform construction of virtual learning communities, some foreign universities have designed virtual learning communities based on online foreign language teaching and adopted a hybrid foreign language teaching method to combine online foreign language teaching with offline foreign language teaching to create an open and personalized learning experience has attracted the attention of many learners [1]. Literature [2] builds a virtual learning community for computer students, so that students can use different information technology means to learn and train in the community, and they can communicate and exchange learning experiences through interactive platforms and reflect on foreign language teaching. Literature [3] builds a virtual learning community and has achieved varying degrees of success. Literature [4] conducted a review and research on the relevant literature of the platform to build a virtual learning community and found that students can gain more knowledge by discussing through Wikis and can break through the boundaries of time and space, so that students can learn more freely. Although specialized social software and website programming software can enhance the interactive function of teachers and students in virtual learning communities, the lack of foreign language teaching is caused by the lack of foreign language teaching factors because the software designers did not take foreign language teaching into consideration when developing such software. With the functions of management and data statistics, teachers do not supervise the online foreign language teaching in place, and there are disadvantages such as low self-awareness of students’ preclass preview and inactive speech in class [5]. Reference [6] selects a specialized foreign language teaching management platform, Zhidao foreign language teaching platform, which can provide teachers with a one-stop service that integrates the creation of flipped classrooms, foreign language teaching management, data statistics, and learning situation analysis. Teaching provides strong technical guarantees and platform support.

In view of the shortcomings of the existing university virtual learning community evaluation system, literature [7] proposes a virtual learning community user satisfaction evaluation system and conducts exploratory and confirmatory analysis. It is determined by interactive emotion and utility value. Secondly, building a virtual learning community with high user satisfaction has also become an important topic in the study of learner satisfaction. [8] constructed a user satisfaction model of virtual learning community from the perspective of ecological learning and verified the effectiveness and feasibility of virtual learning community in foreign language teaching [J].

The traditional virtual foreign language teaching system mainly exists as the supplementary content of classroom theoretical study, which is often called “experimental class”. These systems usually have a small number of users who are learning online at the same time, the foreign language teaching method is relatively simple, and the number of foreign language teaching resources is also very limited, which cannot meet the basic requirements of multiperson interactive foreign language teaching [9]. Nowadays, on the one hand, with the continuous development of online foreign language teaching, the problem that the number of users increases exponentially with the complexity of foreign language teaching resources needs to be solved urgently; on the other hand, for different user groups, these systems cannot analyze the learning situation and provide personalized learning guidance programs, resulting in poor user experience [10].

Another focus of research on the application of virtual reality technology in higher education is the design and development of foreign language teaching resources. One of the biggest problems with virtual reality using it in foreign language teaching is content creation [11]. Through data analysis, it can be seen that the design and development of the virtual training platform is a shortcoming of current related research. In the past ten years, there has been a lack of innovation and in-depth research on the application of virtual reality technology in vocational foreign language teaching, and many teachers in secondary vocational schools and vocational colleges say that it is difficult to integrate the virtual reality platform with the foreign language teaching content of the course. The fundamental reason is that there is a big difference between the functional orientation of the virtual training platform developed by professional companies and the foreign language teaching needs of higher education, so that teachers cannot use the virtual training platform to carry out effective foreign language teaching design and then play a role in assisting foreign language teaching [12]. To effectively apply virtual reality technology to foreign language teaching in higher education courses, we first need a virtual experimental training platform suitable for various foreign language teaching forms in courses. Therefore, the development of relevant training platforms and the research on practical application effects will become a trend in future research [13].

The extensive application of virtual reality technology to classroom foreign language teaching will inevitably become the direction of future higher education development. As an indispensable educational application technology, the in-depth integration of virtual reality with foreign language teaching in education will further promote the process of foreign language teaching reform and improve the foreign language teaching environment, enrich foreign language teaching resources, optimize the foreign language teaching process, and cultivate personalized innovative talents play an important role [14]. In the educational application of virtual reality, technology should serve the educational foreign language teaching process. The virtual training platform itself is only a tool. Only when the tool is applied under the guidance of relevant foreign language teaching theories and systematic foreign language teaching design models, can the virtual training platform effectively promote foreign language teaching [15]. Although some virtual training platforms are interactive and interesting at present, from the perspective of foreign language teaching design, this is not enough to become a platform condition for completing foreign language teaching goals and tasks. In addition, the virtual training platform should focus on the comprehensive demonstration of practical skills for the purpose of foreign language teaching.

The application of virtual training system in the field of higher education is not rare. However, from the perspective of foreign language teaching system design, these interactive and interesting virtual training platforms do not fully consider the actual needs of teachers and students in the process of foreign language teaching, and the equipment functions are difficult to meet the needs of actual operation. In the process of using it, there is no systematic foreign language teaching strategy to guide, there is no specific evaluation index for evaluation, and it does not have the platform conditions to complete the foreign language teaching goal [16].

#### 3. Phase Shift Shadow Moiré Fringe Pattern by Orthonormalizing Method

The fixed-step phase-shift method requires that the amount of phase shift to be changed each time is a known fixed value (such as *π*/2, *π*/3, and 3*π*/2rad). Therefore, in order for this algorithm to accurately obtain the phase information of the object, it is necessary to collect multiple frames of fringe images with known phase shifts for calculation. Typical fixed-step phase-shifting algorithms include three-step phase-shifting, four-step phase-shifting, and five-step phase-shifting. Now, we briefly introduce the three-step phase-shift method.

Generally, the intensity of the fringe pattern observed by the camera can be expressed as [17]

The meaning of each parameter in expression (1) is the same as the formula. The grating is moved twice by the vertical grating surface, and the distance of each movement is , and then,where is the phase, and is the introduced phase shift, respectively.

Formula (4) shows that is related to height. Since can be guaranteed in the experiment, the nonlinear effect can be ignored, and the measured phase can be extracted by using the three-step -phase-shift algorithm by designing a reasonable .

In the traditional three-step -phase shift method, it is necessary to collect three frames of fringe images and move the measured object twice, and the relative phase shift of two adjacent frames is , and then, the light intensity expressions can be expressed as [18]

By combining formulas (5)–(7), we can get

The phase solution formula of the three-step phase-shift method calculated by the formula (8) is

It can be seen that when the condition is applied, the phase shift introduced by the shadow Moiré can be considered as uniform in the whole field, and the nonlinear error can be considered negligible at this time, so the three-step phase-shift method can be applied. However, the phase-shift shadow Moiré has a principle error, and the three-step phase-shift algorithm is sensitive to the phase-shift error and has no compensation ability, and the phase shift introduced here is required to be . Such harsh conditions cannot be guaranteed in actual measurement, so the error of applying this algorithm is large.

The nonfixed-step phase-shift method has no special requirements on the phase-shift value, and it can also be calculated without knowing the phase-shift value. The commonly used nonfixed-step phase-shift algorithms include the improved iterative method and principal component analysis method.

##### 3.1. Improved Iterative Algorithm

The first step of the improved iterative algorithm is to determine the initial iterative value; that is, on the basis of assuming that the phase-shift amount is known, a set of phase-shift values are set as the initial value of the iterative operation phase-shift amount. Then, it performs repeated iterative operations on the phase shift and the phase to be measured according to the principle of least-squares error estimation until the convergence conditions are met. This method can obtain both the value of the phase to be measured and the value of the phase shift. The following is the principle analysis of the algorithm.

The light intensity expression of the *n*-th fringe pattern can be expressed as [19]

For the convenience of description, the above formula is rewritten aswhere is the total number of pixels in the fringe image per frame. The superscript *t* indicates the theoretical value of the light intensity.

The first step of the algorithm iteratively solves the value of the phase to be measured pixel by pixel.

We assume that the background item and the modulation item have no change in the temporal distribution, and in the spatial distribution, they are only related to the position of the pixel; that is, . At this point, we define and and rewrite formula (11) as [20].

If is known and *N* is the total number of fringe patterns, there are 3K last known numbers and equations. These unknown parameters in formula (11) can be obtained by the least-squares error estimation method. The least-squares error can be expressed aswhere is the light intensity of the kth pixel in the nth frame fringe image. If *n* is known, then, according to the least-squares rule, there are

It can be obtained from the above formula

Among them,

In formula (14), [A] is a nonsingular matrix.

From formulas (15)–(18), and can be obtained, and then, the phase to be measured is

###### 3.1.1. Step 2: The Algorithm Iteratively Solves the Phase-Shift Amount Frame by Frame

In this step, it is assumed that and are invariant in the spatial domain distribution and change in the time-domain distribution. At this time, these two parameters become time-domain variables related to the number of fringe image frames; that is, . At this time, can be defined, and the theoretical value of the light intensity of the fringe pattern can be expressed as

In the first step, the phase to be measured has been obtained, and its value has become a known quantity at this time. There are equations in formula (20). By the least-squares method, the three unknown parameters in formula (20) can be obtained. The least-squares error can be expressed as

According to the least-squares rule, there are

It can be obtained from the above formula

Among them,

From formulas (23)–(26), can be solved, and then, the phase shift is

###### 3.1.2. Step 3: Convergence Conditions

*Iterative Calculation*. The algorithm selects a certain value for the phase shift as the initial iterative value and substitutes the phase value obtained in the first step into the second step to obtain the value of the phase shift. Then, the algorithm takes the phase shift obtained in the second step as the new initial value of the iteration, repeats the first and second steps, and repeats the cycle until the value of the phase shift reaches the convergence condition, at which point the iteration stops. Its convergence condition iswhere *j* is the number of iteration, and is a small preset value, such as , which reflects the precision requirement of the iteration. When the convergence condition is satisfied, the iteration stops, and the phase to be measured and the phase-shift amount obtained at this time are the values obtained in the first and second steps of the last iteration, respectively.

##### 3.2. Principal Component Analysis

The method of transforming a plurality of related variables into a small number of mutually unrelated variables through orthogonalization is called principal component analysis (PCA), which is a multivariate analysis method. The algorithm principle is as follows.

The light intensity of the nth phase-shift fringe pattern is

For the convenience of expression, the two dimension is changed to one dimension, and the light intensity of the reconstructed fringe pattern can be expressed as

At this time, the light intensity of each fringe image is a row vector with dimension , and K represents the total number of pixels in each fringe image.

Any phase-shift fringe pattern can be composed of two orthogonal signals, that is, the linear combination of and , and *k* represents the coordinates of each pixel after reconstruction. The setting of the weight coefficient of the quadrature signal is different, and the phase-shift fringe pattern formed will be different. Therefore, PCA can be used to extract the two quadrature signals in the fringe pattern, and then, the phase to be measured can be recovered by the arctangent function. Its phase recovery principle is as follows.

The light intensity of the collected *N* frames of fringe images is represented by a matrix as

Substituting formula (29) into formula (30), we get

Time-domain averaging is used to extract the background term

The fringe image after filtering out the background items is , where can be expressed as

Among them, , and , . The elements in the matrix can be written as , so the covariance matrix can be written as

By expanding formula (35), we can get

We set , and formula (36) can be rewritten as

If the number of fringes in the fringe pattern is >1, the following approximate conditions exist:

At this time, the covariance matrix can be simplified aswhere . For the fringe pattern of the same sequence, it is usually considered that is a constant. A and F are matrices of .

It is easy to get that the ranks of A and F are both 1, and both A and F have only one eigenvalue and eigenvector. The eigenvalues of the two matrices are

The corresponding eigenvectors are

Therefore, the rank of the covariance matrix C is 2, and there are two eigenvectors. If the phase shift of the fringe pattern is uniformly distributed in , then the following approximation can be made:

Therefore,

From this, the two eigenvalues of the covariance matrix are , and the eigenvectors are . At this time, the covariance matrix C is diagonalized to obtain the diagonal matrix *D*, and the corresponding orthogonal transformation matrix is denoted as U. The first and second principal components of the fringe image can be obtained by performing the Hotelling transform on the matrix U. Combined with the approximation condition (45), we can obtain

From formulas (47) and (48), the phase to be measured is

Through the analysis of the algorithm principle of PCA, it can be seen that the PCA method based on the multiframe fringe pattern has the characteristics of high precision and can determine the measurement phase while obtaining the introduced phase shift. However, this method requires that the introduced phase shift must be strictly distributed in the range, so it lacks flexibility in application. Moreover, the algorithm does not effectively solve the problem of removing the fringe pattern background, so this paper proposes to develop a quadrature-phase demodulation technique using an unknown phase shift.

For the convenience of expression, (*x*, *y*) is removed from the derivation of the formula. We assume that the phase-shift fringe images of different frames have the same background term, and the difference between the fringe images of different frames is obtained by the light intensity.where . According to the knowledge of linear algebra, any phase-shift sequence can be represented by a two-dimensional vector space. Therefore, two orthogonal fringe graphs are constructed by applying the Clem–Smitt orthogonalization; namely,

In formula (51), is the Euclidean distance of the vector; <.> represents the inner product operation of the two vectors. In order to improve the measurement accuracy, it is necessary to ensure that the collected fringe pattern contains more periodically changing fringes (i.e., the number of fringes >1). The approximate relationship can be obtained.

Furthermore, we can get

By combining formula (51), we can get the following formula:

Obviously, to obtain the final measured phase , the phase obtained by formula (56) needs to be further transformed. To get , we first decompose into small pieces of . Then, the phase is marked as , the intensity is marked as , and the phase shift is marked as . Formula (50) can be written as

Rewriting formula (57) into matrix form, we get

In formula (58):

In the sense of least squares, the unknown quantity *X* in formula (58) can be solved, so that it can be seen from formula (59) that, assuming that the introduced phase shifts are equal but unknown, the introduced phase shifts can be extracted according to the fringe pattern data by combining the least-squares method and the Clem orthogonalization method. Therefore, the proposed method has the property of self-calibration. Then, we can get

Finally, the measured height of the three-dimensional object is obtained as

The relevant functions in the simulation analysis are defined as Phase function: peaks0(peaks is a MATLAB function) Modulation factor:

The phase shift between adjacent stripes is a random number between , the coordinate range is , and the signal-to-noise ratio is set to 5%.

Therefore, the two sets of light intensity distributions that can be simulated arewhere is the additive Gaussian noise function generated by MATLAB, and *n* is the signal-to-noise ratio. Figure 1 shows the theoretical phase diagram of the simulation. Figure 2 shows the result of analog demodulation.

**(a)**

**(b)**

Figures 2(a) and 2(b) show that the two methods yield similar wrapped phase diagrams, the RMS error of the errors between the two methods and the reference phase diagram. The simulation comparison shows that the two methods get similar results. The equivalence of the two methods is thus proved.

#### 4. Foreign Teaching System Based on Virtual Simulation Technology

In the virtual foreign language teaching system, after logging in to the virtual foreign language teaching system through web page registration, users can obtain foreign language teaching resources from the cloud and conduct virtual foreign language teaching experiments. Then, the user's personal information, the user's experimental behavior, the interaction behavior of collaborating with others' experiments, and the results of the experiment will be fed back to the cloud for data analysis. Finally, the system formulates a follow-up personalized learning guidance plan according to each user's learning and experimental situation to achieve the basic goal of personalized foreign language teaching, as shown in Figure 3.

For the virtual foreign language teaching system, with the increase of information processed by users and the simultaneous online and offline situations, some servers in the cloud data center will have a load imbalance. In order to ensure cloud computing load balancing, it is necessary to follow certain rules for the overall load set of the server and divide it into multiple parts in a reasonable way for the server to manage. Finally, the reallocation of the server load is completed, which greatly reduces the resource overhead, as shown in Figure 4.

First, the system determines the load requirements to be migrated, finds out the virtual machines with the largest load to form the initial group, and then selects the virtual machines that frequently interact with the members of the group according to the degree of interest and expands the initial group. Thirdly, the system calculates whether the server load after entering the group meets the standard. If it meets the standard, the system will continue to select and add until the standard is met and finally complete the selection of the virtual machine migration group. The specific implementation process is shown in Figure 5.

After data analysis, a multifactor knowledge point correlation matrix can be constructed, and the analysis results of the user's mastery of each knowledge point can be obtained based on the matrix decomposition technology of the improved latent semantic model. According to the analysis results, the system will provide each user with a recommended list of knowledge point priorities to achieve the basic goal of personalized foreign language teaching. The basic architecture of the system is shown in Figure 6(a).

**(a)**

**(b)**

The user's mastery of each knowledge point is obtained by analyzing the behavior data of the user participating in the test function of the virtual foreign language teaching system. After logging in to the virtual foreign language teaching system through registration, users can participate in the virtual foreign language teaching test session. This section takes the Internet of Things foreign language teaching test as an example to introduce the implementation process of this part. The realization of the virtual foreign language teaching part of the Internet of Things simulates the three-tier architecture of the Internet of Things, and the architecture of this part is shown in Figure 6(b).

The target server selection process is shown in Figure 7.

On the basis of the above research, the simulation of foreign language teaching is carried out. Figure 8 shows an example of the simulation of foreign language teaching.

**(a)**

**(b)**

On the basis of the above research, the effect of the foreign language teaching method based on virtual simulation technology proposed in this paper is verified, and the effect of virtual simulation teaching is counted, and the results shown in Table 1 are obtained.

From the above experimental results, it can be seen that virtual simulation technology can play an important role in foreign language teaching, effectively improve the quality of foreign language teaching, and is of great significance to the cultivation of foreign language talents.

#### 5. Conclusion

With the development of the undergraduate foreign language teaching quality project and the advancement of first-class curriculum construction, the construction of virtual simulation experiment foreign language teaching projects is gradually enriched and systematic. This pushes the virtual simulation experiment of foreign language teaching to gradually explore the balanced relationship of the experimental foreign language teaching content system and innovate the online and offline hybrid foreign language teaching mode and other reform and development “deepwater areas”. Timely “review” is an important prerequisite for avoiding detours and scientific development. Macroscopically analyzing and studying the basic situation, research hotspots and development trends of foreign language teaching in virtual simulation experiments in my country in recent years are of great significance for the further development of foreign language teaching in virtual simulation experiments. This paper applies virtual simulation technology to foreign language teaching and combines virtual simulation technology to improve the traditional foreign language teaching mode. The experimental results show that virtual simulation technology can play an important role in foreign language teaching, effectively improve the quality of foreign language teaching, and is of great significance to the cultivation of foreign language talents.

#### Data Availability

The labeled dataset used to support the findings of this study is available from the corresponding author upon request.

#### Conflicts of Interest

The authors declare that they have no conflicts of interest.

#### Acknowledgments

This study was sponsored by The First Batch of 2021 MOE Industry-University Collaborative Education Project: Reform of Teaching Content and Curriculum System of Cross-border e-commerce based on Virtual Simulation Technology (202101377014).