# On the Mode of Enhanced VR Virtual Simulation Technology in the Field of Foreign Language Teaching

Authors: Haibo Zhang
Journal: Advances in Multimedia
 (2022)

---

## 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.


---

## Body

## 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](1)I=ax,y+bx,ycos2πpdzh+z.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Δh, and then,(2)Inx,y=ax,y+bx,ycosϕx,y,+nΔx,y,n=0,1,2,where ϕx,y is the phase, and Δx,y is the introduced phase shift, respectively.(3)ϕx,y=2πdzph+z,(4)Δx,y=2πdnΔhph+z.Formula (4) shows that Δx,y is related to height. Since h≫z can be guaranteed in the experiment, the nonlinear effect can be ignored, and the measured phase can be extracted by using the three-step π/2-phase-shift algorithm by designing a reasonable Δh.In the traditional three-stepπ/2-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 π/2, and then, the light intensity expressions can be expressed as [18](5)I1x,y=ax,y+bx,ycosφx,y,(6)I2x,y=ax,y+bx,ycosφx,y+π2,(7)I3x,y=ax,y+bx,ycosφx,y+π.By combining formulas (5)–(7), we can get(8)2I2−I1−I3I3−I1=tanφ.The phase solution formula of the three-step phase-shift method calculated by the formula (8) is(9)φ=arctan2I2−I1−I3I3−I1.It can be seen that when theh≫z 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 π/2 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 90∘. 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 then-th fringe pattern can be expressed as [19](10)Inx,y=ax,y+bx,ycosφx,y+δn.For the convenience of description, the above formula is rewritten as(11)In,kt=An,k+Bn,kcosφk+δn,where k=1,2,…,K;K 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 itemAk and the modulation item Bk have no change in the temporal distribution, and in the spatial distribution, they are only related to the position of the pixel; that is, A1k=A2k=A3k=⋯=ANk,B1k=B2k=B3k=⋯=BNk. At this point, we define ak=An,k,bk=Bn,kcosφk and ck=Bn,ksinφk and rewrite formula (11) as [20].(12)In,kt=ak+bkcosδn+cksinδn.Ifδn is known and N is the total number of fringe patterns, there are 3K last known numbers and N×K equations. These unknown parameters in formula (11) can be obtained by the least-squares error estimation method. The least-squares error Sk can be expressed as(13)sk=∑n=1NIn,kt−In,k2,=∑n=1Nak+bkcosδn+cksinδn−In,k2,where In,k 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(14)∂Sk∂ak=0,∂Sk∂bk=0,∂Sk∂ck=0.It can be obtained from the above formula(15)Xk=A−1Bk.Among them,(16)Xk=akbkckT,(17)AM∑n=1Ncosδn∑n=1Nsinδn∑n=1Ncosδn∑n=1Ncos2δn∑n=1Ncosδnsinδn∑n=1Nsinδn∑n=1Nsinδncosδn∑n=1Nsin2δn,(18)Bk=∑n=1NIn,k∑n=1NIn,kcosδn∑n=1NIn,ksinδnT.In formula (14), [A] is a nonsingular matrix.From formulas (15)–(18), ak,bk and ck can be obtained, and then, the phase to be measured is(19)φk=arctan−ckbk.


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

In this step, it is assumed thatAn,k and Bn,k 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, An1=An2=An3=…=AnK,Bn1=Bn2=Bn3=…=BnK. At this time, an′=An,k,bn′=Bn,kcosδn,cn′=−Bn,ksinδn can be defined, and the theoretical value of the light intensity of the fringe pattern can be expressed as(20)In,kt=an′+bn′cosφk+cn′sinφk.In the first step, the phaseφk to be measured has been obtained, and its value has become a known quantity at this time. There are N×K equations in formula (20). By the least-squares method, the three unknown parameters in formula (20) can be obtained. The least-squares error sn′ can be expressed as(21)sn′=∑KIn,kt−In,k2=∑Kan′+bn′cosφk+cksinφk−In,k2.According to the least-squares rule, there are(22)∂Sn′∂an′=0,∂Sn′∂bn′=0,∂Sn′∂cn′=0.It can be obtained from the above formula(23)Xn′=A′−1Bn′.Among them,(24)Xn′=an′bn′cn′T,(25)A′=K∑n=1Ncosφk∑n=1Nsinφk∑n=1Ncosφk∑n=1Ncos2φk∑n=1Ncosφksinφk∑n=1Nsinφk∑n=1Nsinφkcosφk∑n=1Nsin2φk,(26)Bn=∑k=1KIn,k∑k=1KIn,kcosφk∑k=1KIn,ksinφkT.From formulas (23)–(26), an,bn,cn can be solved, and then, the phase shift δn is(27)δn=arctan−cn′bn′.


#### 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 is(28)δnj−δij−δnj−1−δij−1<ε,where j is the number of iteration, and ε is a small preset value, such as 10−4, 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(29)In,k=ak+bkcosφk+δn.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(30)In=a1+b1cosφ1+δna2+b2cosφ2+δn…aK+bKcosφK+δn.At this time, the light intensity of each fringe image is a row vector with dimension1×K, 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 ofbkcosφk and bksinφk, 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 collectedN frames of fringe images is represented by a matrix as(31)x=I1,k,I2,k,…,IN,kT.Substituting formula (29) into formula (30), we get(32)x=a1+b1cosφ1+δ1a2+b2cosφ2+δ1…aK+bKcosφK+δ1a1+b1cosφ1+δ2a2+b2cosφ2+δ2…aK+bKcosφK+δ2…………a1+b1cosφ1+δNa2+b2cosφ2+δN…aK+bKcosφK+δN.Time-domain averaging is used to extract the background termak(33)ak≈mxk=1N∑n=1NIn,k.The fringe image after filtering out the background items isx˜x˜=x−mx, where x˜ can be expressed as(34)x˜=b1cosφ1+δ1b2cosφ2+δ1…bKcosφK+δ1b1cosφ1+δ2b2cosφ2+δ2…bKcosφK+δ2…………b1cosφ1+δNb2cosφ2+δN…bKcosφK+δN.Among them,x∼n,k=bkcosφksinδn−bksinφksinδn, and cn=cosδn,sn=sinδn, uk=bkcosφk,vk=−bksinφk. The elements in the matrix can be written as x∼n,k=cnuk+snvk, so the covariance matrix can be written as(35)Ci,j=∑k=1Kcluk+sivkcjuk+sjvk.By expanding formula (35), we can get(36)Ci,j=∑k=1Kcicjukuk+sisjvkvk+cisj+cjslukvk.We setAi,j=cicj,Ft,j=sisj,E1,j=cisj+cjsi, and formula (36) can be rewritten as(37)Ci,j=∑k=1KAi,jukuk+Fi,jvkvk+E1,jukvk.If the number of fringes in the fringe pattern is >1, the following approximate conditions exist:(38)∑k=1Kukvk=∑k=1Kbk2cosφksinφk≪∑k=1Kbk2cos2φk=∑k=1Kukuk,(39)∑k=1Kukvk=∑k=1Kbk2cosφksinφk≪∑k=1Kbk2sin2φk=∑k=1Kvkvk.At this time, the covariance matrix can be simplified as(40)C=αA+βF,where α=∑k=1Kukuk,β=∑k=1Kvkvk. For the fringe pattern of the same sequence, it is usually considered that α,β is a constant. A and F are matrices of N×N.(41)A=cosδ1cosδ2…cosδNTcosδ1cosδ2…cosδN,(42)F=sinδ1sinδ2…sinδNTsinδ1sinδ2…sinδN.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(43)λA=∑n=1Ncos2δn,λF=∑n=1Nsin2δn.The corresponding eigenvectors are(44)wk=cosδ1cosδ2…cosδNλkT,wF=sinδ1sinδ2…sinδNλFT.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 in0,2π, then the following approximation can be made:(45)∑n=1Ncosδnsinδn≅0.Therefore,(46)AwF=0,FwA=0.From this, the two eigenvalues of the covariance matrix areλ1=αλA,λ2=βλF, and the eigenvectors are w1=wA,w2=wF. 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(47)y1,k=1λA∑n=1Nbkcosφk+δncosδn≅bkcosφk,(48)y2,k=1λF∑n=1Nbkcosφk+δnsinδn≅−bksinφk.From formulas (47) and (48), the phase to be measured is(49)φk=arctan−y2,ky1,k.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 the0,2π 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.(50)R1=I0−I12=bsinδ/2sinφ+δ/2=b′sinφR2=I1−I22=bsinδ/2sinφ+3δ/2=b′sinφ+δ,where φ=ϕ+δ/2. 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,(51)R1=R1R1=b′sinφb′sinφ,(52)R^2=b′sinφ+δ−∑m∑nb′2sinφ+δsinφ⋅b′sinφb′sinφ2.In formula (51), b′sinφ=b′sinφ,b′sinφ 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.(53)∑m∑nsin2φcosδ2≫∑m∑ncosφsinφsinδ2b′x,ysinφ≈b′x,ycosφ.Furthermore, we can get(54)R^2≈b′cosφsinδ2.By combining formula (51), we can get the following formula:(55)φ=arctanR∼1R∼2.Obviously, to obtain the final measured phaseϕx,y, the phase obtained by formula (56) needs to be further transformed. To get ϕx,y, we first decompose R2 into small pieces of 3×3. Then, the phase is marked as φ1,φ2…φ9, the intensity is marked as R21,R22…R29, and the phase shift is marked as δ. Formula (50) can be written as(56)R2=b′cosδsinφ+b′sinδcosφ=m⋅sinφ+n⋅cosφ.Rewriting formula (57) into matrix form, we get(57)JX=I.In formula (58):(58)J=sinφ1cosφ1sinφ2cosφ2⋮⋮sinφ9cosφ9,X=mn,I=R21R22⋮R29.In the sense of least squares, the unknown quantityX 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(59)ϕx,y=φx,y−δ.Finally, the measured height of the three-dimensional object is obtained as(60)z=phϕ2πd−pϕ.The relevant functions in the simulation analysis are defined asPhase function:ϕx,y=6 peaks0(peaks is a MATLAB function)Modulation factor:b=10−4exp−0⋅5x2+y2The phase shift between adjacent stripes is a random number between0,π, the coordinate range is 0⋅1≤x≤3⋅1mm,0⋅1≤y≤3⋅1mm, and the signal-to-noise ratio is set to 5%.Therefore, the two sets of light intensity distributions that can be simulated are(61)ISn=bsinϕ+δ+nrand.andICn=bcosϕ+δ+nrand.where rand. 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.Figure 1
Theoretical wrapping phase diagram.Figure 2
Simulation demodulation results. (a) The proposed method. (b) GS method.
(a)(b)Figures2(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.


## 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 then-th fringe pattern can be expressed as [19](10)Inx,y=ax,y+bx,ycosφx,y+δn.For the convenience of description, the above formula is rewritten as(11)In,kt=An,k+Bn,kcosφk+δn,where k=1,2,…,K;K 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 itemAk and the modulation item Bk have no change in the temporal distribution, and in the spatial distribution, they are only related to the position of the pixel; that is, A1k=A2k=A3k=⋯=ANk,B1k=B2k=B3k=⋯=BNk. At this point, we define ak=An,k,bk=Bn,kcosφk and ck=Bn,ksinφk and rewrite formula (11) as [20].(12)In,kt=ak+bkcosδn+cksinδn.Ifδn is known and N is the total number of fringe patterns, there are 3K last known numbers and N×K equations. These unknown parameters in formula (11) can be obtained by the least-squares error estimation method. The least-squares error Sk can be expressed as(13)sk=∑n=1NIn,kt−In,k2,=∑n=1Nak+bkcosδn+cksinδn−In,k2,where In,k 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(14)∂Sk∂ak=0,∂Sk∂bk=0,∂Sk∂ck=0.It can be obtained from the above formula(15)Xk=A−1Bk.Among them,(16)Xk=akbkckT,(17)AM∑n=1Ncosδn∑n=1Nsinδn∑n=1Ncosδn∑n=1Ncos2δn∑n=1Ncosδnsinδn∑n=1Nsinδn∑n=1Nsinδncosδn∑n=1Nsin2δn,(18)Bk=∑n=1NIn,k∑n=1NIn,kcosδn∑n=1NIn,ksinδnT.In formula (14), [A] is a nonsingular matrix.From formulas (15)–(18), ak,bk and ck can be obtained, and then, the phase to be measured is(19)φk=arctan−ckbk.


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

In this step, it is assumed thatAn,k and Bn,k 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, An1=An2=An3=…=AnK,Bn1=Bn2=Bn3=…=BnK. At this time, an′=An,k,bn′=Bn,kcosδn,cn′=−Bn,ksinδn can be defined, and the theoretical value of the light intensity of the fringe pattern can be expressed as(20)In,kt=an′+bn′cosφk+cn′sinφk.In the first step, the phaseφk to be measured has been obtained, and its value has become a known quantity at this time. There are N×K equations in formula (20). By the least-squares method, the three unknown parameters in formula (20) can be obtained. The least-squares error sn′ can be expressed as(21)sn′=∑KIn,kt−In,k2=∑Kan′+bn′cosφk+cksinφk−In,k2.According to the least-squares rule, there are(22)∂Sn′∂an′=0,∂Sn′∂bn′=0,∂Sn′∂cn′=0.It can be obtained from the above formula(23)Xn′=A′−1Bn′.Among them,(24)Xn′=an′bn′cn′T,(25)A′=K∑n=1Ncosφk∑n=1Nsinφk∑n=1Ncosφk∑n=1Ncos2φk∑n=1Ncosφksinφk∑n=1Nsinφk∑n=1Nsinφkcosφk∑n=1Nsin2φk,(26)Bn=∑k=1KIn,k∑k=1KIn,kcosφk∑k=1KIn,ksinφkT.From formulas (23)–(26), an,bn,cn can be solved, and then, the phase shift δn is(27)δn=arctan−cn′bn′.


### 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 is(28)δnj−δij−δnj−1−δij−1<ε,where j is the number of iteration, and ε is a small preset value, such as 10−4, 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.1.1. Step 2: The Algorithm Iteratively Solves the Phase-Shift Amount Frame by Frame

In this step, it is assumed thatAn,k and Bn,k 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, An1=An2=An3=…=AnK,Bn1=Bn2=Bn3=…=BnK. At this time, an′=An,k,bn′=Bn,kcosδn,cn′=−Bn,ksinδn can be defined, and the theoretical value of the light intensity of the fringe pattern can be expressed as(20)In,kt=an′+bn′cosφk+cn′sinφk.In the first step, the phaseφk to be measured has been obtained, and its value has become a known quantity at this time. There are N×K equations in formula (20). By the least-squares method, the three unknown parameters in formula (20) can be obtained. The least-squares error sn′ can be expressed as(21)sn′=∑KIn,kt−In,k2=∑Kan′+bn′cosφk+cksinφk−In,k2.According to the least-squares rule, there are(22)∂Sn′∂an′=0,∂Sn′∂bn′=0,∂Sn′∂cn′=0.It can be obtained from the above formula(23)Xn′=A′−1Bn′.Among them,(24)Xn′=an′bn′cn′T,(25)A′=K∑n=1Ncosφk∑n=1Nsinφk∑n=1Ncosφk∑n=1Ncos2φk∑n=1Ncosφksinφk∑n=1Nsinφk∑n=1Nsinφkcosφk∑n=1Nsin2φk,(26)Bn=∑k=1KIn,k∑k=1KIn,kcosφk∑k=1KIn,ksinφkT.From formulas (23)–(26), an,bn,cn can be solved, and then, the phase shift δn is(27)δn=arctan−cn′bn′.


## 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 is(28)δnj−δij−δnj−1−δij−1<ε,where j is the number of iteration, and ε is a small preset value, such as 10−4, 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(29)In,k=ak+bkcosφk+δn.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(30)In=a1+b1cosφ1+δna2+b2cosφ2+δn…aK+bKcosφK+δn.At this time, the light intensity of each fringe image is a row vector with dimension1×K, 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 ofbkcosφk and bksinφk, 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 collectedN frames of fringe images is represented by a matrix as(31)x=I1,k,I2,k,…,IN,kT.Substituting formula (29) into formula (30), we get(32)x=a1+b1cosφ1+δ1a2+b2cosφ2+δ1…aK+bKcosφK+δ1a1+b1cosφ1+δ2a2+b2cosφ2+δ2…aK+bKcosφK+δ2…………a1+b1cosφ1+δNa2+b2cosφ2+δN…aK+bKcosφK+δN.Time-domain averaging is used to extract the background termak(33)ak≈mxk=1N∑n=1NIn,k.The fringe image after filtering out the background items isx˜x˜=x−mx, where x˜ can be expressed as(34)x˜=b1cosφ1+δ1b2cosφ2+δ1…bKcosφK+δ1b1cosφ1+δ2b2cosφ2+δ2…bKcosφK+δ2…………b1cosφ1+δNb2cosφ2+δN…bKcosφK+δN.Among them,x∼n,k=bkcosφksinδn−bksinφksinδn, and cn=cosδn,sn=sinδn, uk=bkcosφk,vk=−bksinφk. The elements in the matrix can be written as x∼n,k=cnuk+snvk, so the covariance matrix can be written as(35)Ci,j=∑k=1Kcluk+sivkcjuk+sjvk.By expanding formula (35), we can get(36)Ci,j=∑k=1Kcicjukuk+sisjvkvk+cisj+cjslukvk.We setAi,j=cicj,Ft,j=sisj,E1,j=cisj+cjsi, and formula (36) can be rewritten as(37)Ci,j=∑k=1KAi,jukuk+Fi,jvkvk+E1,jukvk.If the number of fringes in the fringe pattern is >1, the following approximate conditions exist:(38)∑k=1Kukvk=∑k=1Kbk2cosφksinφk≪∑k=1Kbk2cos2φk=∑k=1Kukuk,(39)∑k=1Kukvk=∑k=1Kbk2cosφksinφk≪∑k=1Kbk2sin2φk=∑k=1Kvkvk.At this time, the covariance matrix can be simplified as(40)C=αA+βF,where α=∑k=1Kukuk,β=∑k=1Kvkvk. For the fringe pattern of the same sequence, it is usually considered that α,β is a constant. A and F are matrices of N×N.(41)A=cosδ1cosδ2…cosδNTcosδ1cosδ2…cosδN,(42)F=sinδ1sinδ2…sinδNTsinδ1sinδ2…sinδN.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(43)λA=∑n=1Ncos2δn,λF=∑n=1Nsin2δn.The corresponding eigenvectors are(44)wk=cosδ1cosδ2…cosδNλkT,wF=sinδ1sinδ2…sinδNλFT.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 in0,2π, then the following approximation can be made:(45)∑n=1Ncosδnsinδn≅0.Therefore,(46)AwF=0,FwA=0.From this, the two eigenvalues of the covariance matrix areλ1=αλA,λ2=βλF, and the eigenvectors are w1=wA,w2=wF. 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(47)y1,k=1λA∑n=1Nbkcosφk+δncosδn≅bkcosφk,(48)y2,k=1λF∑n=1Nbkcosφk+δnsinδn≅−bksinφk.From formulas (47) and (48), the phase to be measured is(49)φk=arctan−y2,ky1,k.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 the0,2π 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.(50)R1=I0−I12=bsinδ/2sinφ+δ/2=b′sinφR2=I1−I22=bsinδ/2sinφ+3δ/2=b′sinφ+δ,where φ=ϕ+δ/2. 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,(51)R1=R1R1=b′sinφb′sinφ,(52)R^2=b′sinφ+δ−∑m∑nb′2sinφ+δsinφ⋅b′sinφb′sinφ2.In formula (51), b′sinφ=b′sinφ,b′sinφ 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.(53)∑m∑nsin2φcosδ2≫∑m∑ncosφsinφsinδ2b′x,ysinφ≈b′x,ycosφ.Furthermore, we can get(54)R^2≈b′cosφsinδ2.By combining formula (51), we can get the following formula:(55)φ=arctanR∼1R∼2.Obviously, to obtain the final measured phaseϕx,y, the phase obtained by formula (56) needs to be further transformed. To get ϕx,y, we first decompose R2 into small pieces of 3×3. Then, the phase is marked as φ1,φ2…φ9, the intensity is marked as R21,R22…R29, and the phase shift is marked as δ. Formula (50) can be written as(56)R2=b′cosδsinφ+b′sinδcosφ=m⋅sinφ+n⋅cosφ.Rewriting formula (57) into matrix form, we get(57)JX=I.In formula (58):(58)J=sinφ1cosφ1sinφ2cosφ2⋮⋮sinφ9cosφ9,X=mn,I=R21R22⋮R29.In the sense of least squares, the unknown quantityX 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(59)ϕx,y=φx,y−δ.Finally, the measured height of the three-dimensional object is obtained as(60)z=phϕ2πd−pϕ.The relevant functions in the simulation analysis are defined asPhase function:ϕx,y=6 peaks0(peaks is a MATLAB function)Modulation factor:b=10−4exp−0⋅5x2+y2The phase shift between adjacent stripes is a random number between0,π, the coordinate range is 0⋅1≤x≤3⋅1mm,0⋅1≤y≤3⋅1mm, and the signal-to-noise ratio is set to 5%.Therefore, the two sets of light intensity distributions that can be simulated are(61)ISn=bsinϕ+δ+nrand.andICn=bcosϕ+δ+nrand.where rand. 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.Figure 1
Theoretical wrapping phase diagram.Figure 2
Simulation demodulation results. (a) The proposed method. (b) GS method.
(a)(b)Figures2(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 Figure3.Figure 3
Architecture diagram of virtual foreign language teaching system.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 Figure4.Figure 4
Virtual machine migration method.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 Figure5.Figure 5
The process of building a virtual machine migration group.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 Figure6(a).Figure 6
Implementation of system function modules. (a) Implementation of the basic architecture of the system. (b) Foreign language teaching module structure (taking the Internet of Things experiment as an example).
(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 Figure6(b).The target server selection process is shown in Figure7.Figure 7
The selection process of the target server.On the basis of the above research, the simulation of foreign language teaching is carried out. Figure8 shows an example of the simulation of foreign language teaching.Figure 8
Example of foreign language teaching simulation. (a) Construction of virtual portraits in foreign language teaching. (b) Construction of foreign language teaching background.
(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 Table1 are obtained.Table 1
The effect of virtual simulation teaching.
NumTeaching simulationNumTeaching simulationNumTeaching simulationNumTeaching simulation180.4541976.0753782.6275585.263279.0812081.7433876.7825685.647377.7562175.5153977.2015782.203481.0352278.4274077.4925879.729585.0712385.0104180.9325982.363675.5652482.9514279.6616079.904781.6422578.4154378.5496184.384878.2562685.8054481.4836282.355976.4392778.5634579.0826379.7161077.3662875.5654685.3706484.6851178.8372985.7174781.6326577.4631280.7783085.6554877.3716677.3821381.1553178.2704985.7486779.3231483.7653280.4795079.5796875.8201583.5013385.0915181.3376979.6641679.0043485.1615275.7287077.2511775.1573580.5455382.5067175.3101885.4353678.6455475.4397276.845From 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.



---

*Source: 5263679-2022-05-30.xml*