1、ECE 210 Laboratory Experiments in LabVIEW University of IllinoisECE 210 Laboratory Experiments in LabVIEWbyJesse ChenandYang ZhengECE 345 Section H, Spring 2000Supervised by Professor David MunsonandT.A. Shao Hsia5/1/2000Project 9AbstractThe purpose of the ECE 210 laboratory experiments is to visual
2、ly represent linear system concepts taught in class. Simulating laboratory experiments in LabVIEW instead of using a real-life setup provides several advantages. The use of computer simulations reduces the possibility of miswirings, improper equipment use or equipment failure. Using a GUI based simu
3、lation package allows instructors to design circuits that behave similar to real circuits while providing controls and displays similar to those used in real instruments. Also, simulations may be an excellent alternative to universities that do not have sufficient funding or staffing to provide a co
4、mprehensive lab environment to its students. Similarly, students taking the course remotely from the university may use simulations as an added learning tool. However, simulations cant replace the experience gained by seeing the differences between theoretical calculations and real results produced
5、in lab; or experience gained by using laboratory instruments. TABLE OF CONTENTS1. PROJECT OVERVIEW 11.1 Introduction 11.2 Design Specifications 21.3 General Design Procedures 21.4 The Advantages and Disadvantages of Using LabVIEW 21.5 Cost Analysis 32. Laboratory Experiment 1 42.1 Lab 1 Overview 42.
6、2 Lab 1 Design Details 42.3 Lab 1 Design Verification 53. Laboratory Experiment 2 63.1 Lab 2 Overview 63.2 Lab 2 Design Details 73.3 Lab 2 Design Verification 94. Laboratory Experiment 3 104.1 Lab 3 Overview 104.2 Lab 3 Design Details 104.3 Lab 3 Design Verification 105. Laboratory Experiment 4 115.
7、1 Lab 4 Overview 115.2 Lab 4 Design Details 115.3 Lab 4 Design Verification 126. CONCLUSIONS 137. REFERENCES 14APPENDIX I. Laboratory 1 Figures 15APPENDIX II. Laboratory 2 Figures 19APPENDIX III. Laboratory 3 Figures 22APPENDIX IV. Laboratory 4 Figures 241. PROJECT OVERVIEW1.1 IntroductionThe ECE 21
8、0 laboratory teaches basic linear system concepts, which can be learned through LabVIEW simulation instead of circuitry. LabVIEW is a GUI based simulation environment that allows an instructor to quickly create a simulation that accurately approximates the behavior of a circuit. The built in control
9、s and displays in LabVIEW allow the student to see the results of a given input into a linear system almost instantaneously. Also, the student can vary the input conditions into the system to observe changes at the output. The simulation can also be constructed such that the student is able to modif
10、y parameters of the system; for example, the resistance and capacitance of a simple low pass filter to change the time constant. The following block diagram illustrates how the project functions along with other requirements in the ECE 210 laboratory.Figure 1As shown by the blue arrow, our project d
11、eals mainly with the simulation and user interface aspects of the ECE 210 laboratory.1.2 Design SpecificationsOur project focuses on designing the LabVIEW interface for the laboratory experiments in ECE 210. The final design includes four of the five laboratory experiments simulated under the assump
12、tion of an ideal system. The fifth lab experiment, the superheterodyne receiver, was not implemented. Time constraints as well as the feasibility of accurately receiving and demodulating a radio signal were reasons for this decision. Each laboratory experiment consists of separate “Visual Instrument
13、” or VI files that simulate a particular section of the experiment. Students can switch freely between the sections to simulate “wired” circuits. The student is not allowed alter the circuits, but the student is able to change certain parameters of the circuit, such as resistance, capacitance, or in
14、put signal. If the “Continuous Run” option is used in LabVIEW, the simulation will continuously update the output display.1.3 General Design ProceduresInitial calculations were done according to the theory presented in the ECE 210 class notes. Next, PSpice simulations were used to check the calculat
15、ions and provide a reasonable expectation for the performance of our system. The calculations were then modified so that they could be input into the design schematic of a LabVIEW VI file. After testing and verifying that the simulation was performing satisfactorily, the GUI front panel would be bui
16、lt.1.4 The Advantages and Disadvantages of Using LabVIEWAlthough we were approached with the idea of implementing the ECE 210 laboratory experiments in LabVIEW by both Professor Munson and National Instruments, we considered other software packages. A circuit simulation package such as PSpice would
17、have been an alternate choice. The PSpice already contains the necessary components and tools for simulating analog circuits. LabVIEW on the other hand, cant even simulate a resistor without calculations and formulas from the instructor. However, PSpice lacks the friendly graphical user interface th
18、at LabVIEW provides. Also, LabVIEW simulations can be changed in real-time, unlike PSpice simulations that have to be painstakingly adjusted and re-run before the new results appear. PSpice simulations may be more accurate than our LabVIEW simulations, but this isnt as important to us because the La
19、bVIEW simulations already sufficiently improve clarity of the results. We chose to develop in LabVIEW after concluding that there was no product that was clearly better.However, the main disadvantage of using LabVIEW is that all analog signal processing must be implemented digitally. All signals and
20、 transfer functions must be calculated, sampled, and checked for validity. Sampling rates and processor speed considerations limit the accuracy of the simulations. LabVIEW does provide important components, such as signal generators and digital convolution functions. All other necessary functions mu
21、st be implemented by the instructor as a mathematical formula, for LabVIEW to calculate. Forcing all signals to be digitally sampled limits some of the potential of the simulation package, but it does provide some interesting shortcuts and solutions for the simulation designer.1.5 Cost AnalysisDescr
22、iptionCostReference Books$75Software LabVIEW Software (2)$200Labor (14 weeks)7 hrs/week/person * 13 weeks * 2 persons * $33/hr * 2.5$15,015Project Total$15,290 2. Laboratory Experiment 12.6 Lab 1 OverviewThe first lab gives an introduction to R-C circuits and capacitor time constants as studied in t
23、he course. Part 1 of the original lab asks the student to observe different signals generated by a signal generator on the oscilloscope. This section has been omitted from the LabVIEW simulations because all simulations display the input waveform.Part 2 asks the student to build the circuit shown in
24、 Figure 2. The lab asks the student to observe the output when a 40 kHz sine wave with amplitude 10 V peak-peak is applied to the system. The student is asked about the phase of the output voltage and current.Figure 2Part 3 of the original lab asks the student to investigate the RC time constant of
25、the circuit shown in Figure 2, exchanging the 330pF capacitor with a 0.01 F capacitor.Part 4 of the original lab asks the student to investigate the frequency response of the circuit. The student is to plot the observed magnitude, and compare it with the expected magnitude response.2.7 Lab 1 Design
26、DetailsThe circuit presented in lab 1 is a single-pole, analog low-pass filter. As given in the ECE 210 class notes 1, the transfer responses of the filter in the time and frequency domains are given as: (1.1) (1.2)From (2), we can derive the phase response to be: (1.3)Part 2 of lab 1 was implemente
27、d in LabVIEW by taking advantage of (1.2) and (1.3). A LabVIEW VI displays one cycle of a sine wave, and appropriately scales the time axis to indicate the chosen frequency. LabVIEW then calculates the phase difference and magnitude difference due to a sine wave of the given frequency. The new magni
28、tude and phase are then used as input values into a new LabVIEW signal generator that displays a magnitude and phase shifted sine wave, corresponding to the ideal output. Parts 3 and 4 of lab 1 use equation (1.1) to convolve the input signal, producing a time domain output.2.8 Lab 1 Design Verificat
29、ionDesign Verification was accomplished by simulating the circuits in lab 1 in PSpice and comparing the PSpice simulations with our calculated values and simulations in LabVIEW. As specified in the lab notes, the student will observe the phase and magnitude response of a 40 kHz sine wave input. Figu
30、re 8 shows the PSpice simulation. Our Matlab simulation based on equation (1.2) had similar results. Figure 9 shows the front panel display of our LabVIEW design, with results identical to our Matlab simulations. As indicated, the student is able to adjust the input frequency of the frequency genera
31、tor, as well as resistance and capacitance values. This section was implemented in LabVIEW by outputting a sine wave corresponding in the “input” window of the VI. Next, the frequency transfer function (1.2) was used to calculate the magnitude and phase response due to the input sine wave. Finally,
32、magnitude and phase data was used to generate a new sine wave at the input frequency, and outputted to the “output” window.The next part of the laboratory investigates R-C time constants. Our calculated time constant from (1.1) is RC = 1x10-4 seconds. Our PSpice results, shown in Figure 10, indicate that the RC time constant is 10-4 seconds as we calculated. The LabVIEW simulation reflects the ideal calculations, as shown in Figure 11. This front panel allows the student to adjust t
copyright@ 2008-2022 冰豆网网站版权所有
经营许可证编号:鄂ICP备2022015515号-1