Simulation Experiment Teaching Reform of Square Wave Signal Decomposition and Composition

In the Course of Signals and Systems, there are several problems of experimental teaching based on box, such as the constraints of experimental sites, fewer measured parameters and insufficient spectrum analysis. Simulation experiment teaching is adopted in the course. As an example, “Square wave Signal Decomposition and Composition” is given, and the method, content, operation and result analysis are discussed. The practice shows that this way is suitable for students to carry out experiments independently, can stimulate students’ interest in learning, and is a beneficial supplement to practical experiments. Keywords—Simulation Experiment; Signals and Systems; Signal Decomposition and Composition; Teaching Model


INTRODUCTION
"Signal and System" is an important major course for Electronic Engineering and Communication Engineering. Experimental teaching plays a key role in the course [1]. The traditional model based on box has the characteristics of strong practicality and simple operation, but there also exists some obvious shortages including the constraints of experimental sites, fewer measured parameters, insufficient spectrum analysis and lower equipment availability [2]. The virtual simulation experiment based on MATLAB has the advantages of sufficient spectrum analysis, rich simulation signals and high fidelity, and more convenience of experimenting independently for students, which can make up the disadvantages of traditional experimental teaching [3].
"Square wave signal decomposition and composition" is one of most basic experiments in the course, which is helpful for students to understand Fourier series and establish the concept of spectrum [4]. Taking this experiment as an example, the problem-based learning mode is adopted in order to stimulate students' interest in learning, and the contents, steps and characteristics of simulation experiment are discussed in detail.
Three knowledge points are included in this experiment: the composition of square wave signal, the bilateral amplitude spectrum (BAS) of square wave signal, and the decomposition of square wave signal.

A. Square Wave Signal and Its Fourier Series
The waveform of square wave signal is shown in Fig.1, and the expression of its Fourier series is given in formula (1), where T represents signal period and 2π T  means the fundamental angular frequency.

B. Questions on Simulation Experiment
Three questions are discussed in this part as following: Question 1: Theoretically, what is the meaning of square wave Fourier series, as is expressed by formula (1)? Question 2: The simulation program is called to compare the curve of square wave with the composition of the first n harmonics at the right of formula (1). The mean square error e between the two is also calculated. The value of e decreases with n increasing, so what does the change mean? Question 3: If it is a triangular wave, its Fourier series is shown in formula (2). Is there the same pattern?
These questions are designed with the following rules: from easy to difficult conforming to cognitive law of students; relating to knowledge points closely; combining theory with practice.

C. Operation of Simulation Experiment
The former questions should be solved by carrying on simulation experiment. The key step is to run the developed program in the command window of Matlab: e = Fangbo_ p01(N, f, n). The program needs three input parameters: the amount of square wave cycles N, the frequency of square wave f, and the total number of harmonic terms n. The three parameters can be set separately. By changing n while remaining N and f unchanged, a set of graphs can be drawn in Fig.2, in which the six sets of parameters are: fangbo_p01(6, 2, 1), fangbo_p01(6, 2, 2), fangbo_p01(6, 2, 3), fangbo_p01(6, 2, 5), fangbo_p01(6, 2, 10) , fangbo_p01(6, 2, 1000).  Fig.2, it can be deduced that the error e tends to lower with n rising and the two curves also tend to coincide. When n = 1000, the two waveforms are almost identical. It is verified that the square wave signal can be composed of harmonics in the form of trigonometric functions, as given in Formula (1). This can be further extended to the Fourier series theorem that any periodic signal can be composed of trigonometric harmonics. Similarly, for Question 3, the following programs can be called:

Advances in Social Science, Education and Humanities Research, volume 455
The compositions of triangle signal are derived, as described in Fig.3.

A. Bilateral Amplitude Spectrum Formula
The BAS of square wave signal Fn is shown in formula Where bn is the nth harmonics coefficient of trigonometric sines, namely the one of sin( ) nt  in the Formula (1).

B. Questions on Simulation Experiment
Question 4: Can the BAS of square wave signal be drawn according to Formula (1) and formula (3)?
Question 5: The BAS of square wave signal with a finite number of cycles can be calculated and drawn by the program. What is the difference between these and the ones in theory? Question 6: How will the BAS to change when the number of cycles changes?

C. Operation of Simulation Experiment
Students are guided by these three problems and use the knowledge of spectrum to solve them. They should gradually develop a good habit of learning from the signal spectrum. A program, namely fangbopu_p01(N,f), is intended for solving the signal BAS, where N is the amount of square wave cycles and f is its frequency. Fig.4 will be given by calling the following: fangbopu_p01(2.5,2), angbopu_p01(10,2), fangbopu_p01(50,2), fangbopu_p01(100,2).
Diagrams in time and the corresponding ones in frequency are drawn in Fig.4.

D. Analysis of Simulation Results
Some conclusions are derived from the Fig.4. Firstly, the less the number of cycles of square waves signal N is, the more continuous its BAS is and the wider the spectral line width is. Then, the BAS becomes discrete with N→+∞, and the ratios of spectral amplitude conform to formula (3). Lastly, when N=1 the BAS evolves into continuous and Fourier series becomes Fourier transform.

A. Questions on Simulation Experiment
Question 7: According to the formula (1), square wave signal contains fundamental wave and its harmonics. How to extract them from square wave?
Question 8: Can the finite impulse response filter be applied to extract a component signal from square wave with the developed programs?

Advances in Social Science, Education and Humanities Research, volume 455
Question 9: How do the wave and spectrum of the filter output signal develop as its cutoff frequency is modified? A program, fangbolvbo_p01(N, f, K), has been developed to deal with these issues, where N means the amount of cycles, f is frequency and K presents the order of harmonics. Run the following procedures: fangbolvbo_p01(10, 1, 1), fangbolvbo_p01(10, 1, 3), fangbolvbo_p01(10, 1, 13), and fangbolvbo_p01(10, 1, 135). Attention, K=13 presents that the 1st and 3rd harmonic are filtered from square wave, and K=135 means that the 1st, 3rd and 5th harmonic are filtered. The program gives the frequency-domain plots, as shown in Figure  5, and its corresponding time-domain ones in Figure 6.

C. Analysis of Simulation Results
The square wave signal contains the fundamental wave and its harmonic components. If a proper finite impulse response filter is designed, any harmonic can be extracted, and two or more harmonics can be extracted at the same time according to Fig.5 and Fig.6.

V. CONCLUSION
The whole process from problem to result is closely around "student-centered". Students are the main body of simulation experiment and teachers are the organizers of simulation experiment [5]. Students can carry out simulation experiments independently in the laboratory, classroom, dormitory or library according to the experimental instruction, and the students' participation is very high, which can effectively make up for the shortcomings of practical experiments. Practice shows that this teaching method effective In a word, this teaching of simulation experiment has the following advantages. Firstly, the questions designed are not only a summary of knowledge points, but also an embodiment of teaching guidance, and a handhold of students to carry out independent experiments [6]. Secondly, the teaching model can provide a seamless connection between in and after class. It's more helpful for students to carry out experiments independently. Thirdly, it is convenient to realize the flexible transformation from time domain analysis to frequency domain analysis, which is of great practical significance to cultivate students' ability of observing and analyzing problems in frequency domain.