Home

Meaningful PSpice Simulations via LabVIEW

image

Contents

1. and analysis and sensor technology
2. formatting O Bbw Fig 3 Portion of PSpice ABM formatter VI diagram showing syntax formatting 6 D Litwhiler decimates and formats the data into the proper syntax required by the PSpice ABM table Figure 3 shows the syntax formatting section of the diagram for this LabVIEW VI The 2500 point trace for each channel is smoothed with a moving average filter and decimated to produce a 500 point trace This operation improves the effective resolution to more than nine bits and is similar to the technique performed by the Tektronix TDS400 series DSO when operating in the Hi Res mode 5 Using the 500 point X channel data the indices of the minimum and maximum values are found The range between these extreme values is then divided into the number of intervals requested by the user up to 40 maximum The corresponding X and Y data values at these intervals are then selected from the 500 point data arrays formatted and displayed The X channel data is checked for monotonicity and a warning is displayed if a problem is encountered Figure 4 shows the front panel display for the ABM Data Formatter VI The XY graph in this LabVIEW VI provides the user with a graphical preview of the data The string indicator at the top of the panel contains the XY data in the proper syntax for use in a PSpice ABM table The user simply selects this data and copies it to the Windows clipboard The clip board data can then be pasted into
3. the PSpice ABM table GTABLE in this case as shown in Fig 5 Once saved in PSpice the ABM table data is now part of the schematic file containing the ABM table device Bie git gps oo pee inke Hen Fipa AEP med Daia XY DATA EXAMPLE One example of an application using experimen tal XY data in a PSpice ABM table is the trans conductance characteristic curve of a Junction Field Effect Transistor JFET Figure 6 shows the circuit used to measure the transconductance curve for an N channel JFET Here the input X signal is the gate source voltage and the output signal Y is the drain current A plot of drain current as a function of gate source voltage produces the transconductance curve for the device The drain current is converted to a voltage via the 1000 current sensing resistor The curve displayed in Fig 1 is the actual data for this circuit The origin of this XY plot is located one division from the right edge horizontally and the bottom line of the display vertically The effective scale is 0 5 V div horizontally and 1 mA div vertically due to the 1000 resistor Figure 4 shows the front panel of the PSpice ABM Formatter VI with 40 points of this transconductance curve data displayed The PSpice ABM GTABLE is a four terminal device that accepts a differential voltage as its input and produces a differential current as its output The transfer function is therefore a trans conductance and is defined by the table
4. Int J Engng Ed Vol 21 No 1 pp 3 10 2005 Printed in Great Britain 0949 149X 91 3 00 0 00 2005 TEMPUS Publications More Meaningful PSpice Simulations via LabVIEW DALE H LITWHILER Penn State University Berks Lehigh Valley College Reading PA 19610 USA E mail dhll0 psu edu Electrical engineering technology students at Penn State University are using LabVIEW Virtual Instruments VI to acquire and process laboratory data for use in PSpice simulations Using digital oscilloscopes to acquire laboratory signals VIs have been written to transfer the signal data to a PC and process it according to the intended use For device modeling XY data is acquired and formatted for use in PSpice Analog Behavioral Models Time domain signals can also be acquired formatted and saved as PSpice piecewise linear source input files Students have found their simulation results to be more realistic and meaningful through this process INTRODUCTION AS PART OF the electrical engineering technol ogy EET curriculum at Penn State University students spend a considerable time working in the laboratory to gain a greater understanding of the technology and theory that they are learning in the classroom Part of this experience involves writing detailed reports on the experimental results and comparing them to expected results The expected results are derived from calculations and in many instances computer simulations performe
5. Sonpe FT Display ane Data vi Ee gdt Qperate Jools gme pind Heip 2 584 EDN LAL PRONE LOOSE LE POSITION 2 020 COUPLING DE ANDWIDTH OW THER OFT eE E ewi e Espat Data bo PSpice FAL Files ee Fig 7 Front panel of scope YT display and data VI displayed by the DSO in 10 horizontal divisions Therefore the time between each sample is calcu lated as _ time per division gt 250 f The Scope YT Display and Data VI parses the DSO horizontal setup string to extract the time base setting and then calculates At The relative time for each waveform value is then calculated by multiplying the array index for each data point by At The format of PSpice IPWL_FILE and VPWL_FILE source files is ASCII text containing ordered pairs of numbers where the first number of the pair is the relative time and the second number is the current or voltage value corresponding to that time 6 PSpice accepts a wide variety of delimiter characters in the PWL files For compat ibility the format used here is that of a spreadsheet data file Each ordered pair appears on a separate line with a tab character between the numbers and an end of line character after each pair The numbers are formatted in scientific notation with At three decimal places The user is prompted for a file name and location in which to save the formatted data This file is then called by PSpice at run time YT DATA EXAMPLE As an example of us
6. d using the evaluation version freeware of the circuit simulation tool PSpice from OrCAD Recently our EET laboratories have been upgraded to include LabVIEW software and Tektronix digital storage oscilloscopes DSO with communication ports With continual input from students LabVIEW VI s have been devel oped to transfer the oscilloscope trace data to the PC via the serial COM port and display it as it appears on the oscilloscope From this LabVIEW VI the display can be printed on the laboratory printer or saved as a Portable Network Graphics PNG file which can later be pasted into Micro soft Word as part of the student s report The LabVIEW VI also provides the option of saving the scaled trace data as a spreadsheet formatted ASCII text file for later use The student response to this hardware and software upgrade has been extremely positive and has resulted in reports of professional quality The next step in the ongoing development of these VIs has been to add the capability to format and export oscilloscope data for use in PSpice simulations By incorporating the data from actual laboratory measurements into the PSpice simulations the students obtain a more meaning ful comparison of the performance of their actual Accepted 4 August 2004 and simulated circuits This exercise also presents an entirely new realm of simulation possibilities for even the more experienced student PSpice users The LabVIEW VIs pr
7. en be used in a circuit simulator to predict the performance of circuits containing the device Figure 1 shows the LabVIEW front panel of the XY Display and Data VI used to retrieve and 4 D Litwhiler OTL PROGE 1 AALE SIE POSTON 0 OUP hes DE Ba TTA ONG INVERT OFF OH2FRIORE DO SOA L DEPOSITION 4 0060 COUPLING C BANC DTH OM INVERT OM een roe _sovere seven ee con Eero and Fig 1 Front panel of XY data and display VI process data from the DSO for use in XY mode The data is displayed in an XY graph that is scaled to produce the same display as the DSO The string indicator beneath the graph provides the channel setup information Once running the LabVIEW VI waits for the user to request an action via the buttons The Refresh button is used to retrieve the latest channel data from the DSO The user can also choose to print or save the front panel image the buttons are made invisible prior to actually printing or saving the front panel image The Help button launches a window displaying information about how to set up the signals and the DSO display for proper data processing results Finally the Export XY Data to PSpice ABM button launches the subVI PSpice ABM Format ter in which the user can adjust the data format ting parameters and get a preview of the data that can be used by PSpice in an Analog Behavioral Model ABM lookup table When the DSO is in XY mode t
8. esented here were devel oped to process data from the Tektronix TDS220 and TDS1002 series of DSO LabVIEW VIs to process both XY and YT data formats are discussed The XY data typically represents the input output characteristic of a particular device or circuit to be modeled The YT data could be a unique transient signal that is applied as an input to a laboratory circuit Some of the technical methods employed in these LabVIEW VIs are discussed However the reader is encouraged to view the VI diagrams for further documentation This paper presents just a few examples of the application of these LabVIEW VIs although many circuits and systems could be studied in a similar manner 1 XY CURVE TRACER DATA Using a function generator and an oscilloscope a curve tracer can be formed which then makes it possible to measure device characteristics for use in computer simulations Using LabVIEW the neces sary data acquisition and scaling can be performed by the computer 2 With the oscilloscope in the XY mode the input signal on channel determines the X horizontal position of a given sample while the input signal on channel 2 determines the Y vertical position If the signal on channel 1 is applied to the input of a test device and is swept through a range of values while the output signal of the same device is applied to channel 2 the resulting display represents the transfer character istic for that device 3 This data can th
9. he sample rate is fixed at 1MS s and the acquisitions are untriggered 4 If the channel data is requested while the DSO is in this mode the resulting traces may not be complete Therefore the LabVIEW VI first switches the DSO to the YT mode prior to requesting the trace data For proper results channel 1 X must be adjusted so that when viewed in YT mode only one minimum and one maximum of the signal appear with the signal minimum occurring prior to the maximum so that the signal is primarily increasing positive slope in the display as shown in Fig 2 For best results the excitation signal should be a triangle waveform and both X and Y signals should occupy as much of the vertical range as possible Note that the input range of the DSO digitizer extends one division above and below the displayed window The DSO can be in either XY or YT mode when using the XY Display and Data VI The data to be used in a PSpice ABM table must be properly formatted and meet several require ments There is a maximum of 40 table XY data pairs allowed The X coordinate input variable value must be monotonic and increasing Since the data from the DSO could contain as many as 2500 XY data pairs there is a large amount of data reduction performed by the PSpice ABM Formatter VI The PSpice ABM Formatter VI filters More Meaningful PSpice Simulations via LabVIEW 256 3 SEC ON Fig 2 Input signal setup for proper ABM data
10. ing the transient data captured by the DSO in a PSpice simulation the problem of mechanical switch contact bounce is considered This problem is often discussed in EET courses When a mechanical switch is closed or opened there is a period of time when the contacts of the switch continually engage and disengage very rapidly due to the roughness of the contact material This action produces multiple transitions of the switch voltage from high to low values To mask this phenomenon and generate one transi tion many circuit schemes that de bounce mechanical switches are used in practice In order to simulate the performance of a de bouncing circuit the transient voltage signal created by the More Meaningful PSpice Simulations via LabVIEW 9 RS r pn i min o 01uF Le FILE re searchpspice Switch bounce ON for PWLt Fig 8 PSpice switch de bounce test circuit bouncing switch can be captured with a DSO and used in PSpice as a PWL source Figure 7 shows a typical waveform of the voltage across a SPST mechanical switch during closure One end of the switch is connected to ground while the other end is connected to 5VDC through a 4 7kQ resistor The data from this signal can be used in a PSpice VPWL_FILE source to drive the de bounce circuit as shown in Fig 8 By using this data file the students could experiment with different circuit component values in the simulation and evaluate the performa
11. nce as compared to that of the actual circuit Figure 9 shows some of the circuit simulation results including the input and output signals Because of the unusual nature of the transient signal TNW neui NAI l ren fs O Sims a Uins UCR Rat 1 Gms constructing the waveform using theoretical table values would have been difficult and time consum ing By using the actual signal that is typical of the mechanical switch a more realistic and meaningful simulation was produced SUMMARY AND CONCLUSION The capabilities of LabVIEW have made it easy to develop the tools presented in this paper to help bridge the gap between laboratory and computer simulation results The LabVIEW VIs that have been developed are extremely well received by the students and will continue to be improved and enhanced The use of actual laboratory data in Fa Rl Ae i RRA Sve Sis Pek LA LELEA EV NT O Ei fp frees ae PI Time Fig 9 PSpice probe switch de bounce circuit simulation waveforms 10 D Litwhiler the PSpice simulations has greatly helped to close the loop of understanding for the EET students Comments from the students indicate that they do not feel that the simulations are as foreign idea lized and removed from the actual circuit that they are studying Using PSpice and LabVIEW in this way has also opened up new ways of thinking and approaching the problem of circuit and system modeling The ideas
12. presented here can easily be extended to include simulation of a wide variety of electrical mechanical and electromechanical systems REFERENCES 1 J P Hoffbeck Using real signals with simulated systems Computers in Education Journal 13 1 2003 pp 31 38 2 A B Buckman A course in computer based instrumentation Learning lab VIEW with case studies International Journal of Engineering Education 16 3 2000 pp 228 233 3 S Wolf Guide to Electronic Measurements and Laboratory Practice Prentice Hall Englewood Cliffs 1983 pp 162 164 4 Tektronix Inc TDS1000 and TDS2000 Series Digital Storage Oscilloscope User Manual Tektronix no 071 1064 00 5 Tektronix Inc TDS410A TDS420A amp TDS460A Digitizing Oscilloscopes User Manual Tektronix no 070 9219 00 6 MicroSim Corporation MicroSim PSpice AID amp Basics User s Guide 1996 Dale H Litwhiler is currently Assistant Professor of Engineering Technology at Penn State Berks Lehigh Valley College He has over 17 years of industrial experience with IBM and Lockheed Martin where he designed military power electronics hardware as well as spacecraft test hardware and software He earned his B Sc M Sc and Ph D in electrical engineering from Penn State University Syracuse University and Lehigh University respectively He is a licensed professional electrical engineer in Pennsylvania USA and his research interests include data acquisition
13. t that flows through the device from the drain to source The four terminal GTABLE model can be used to model a three terminal JFET device by connecting the lower input and output terminals together to form a Source terminal as shown in Fig 5 This GTABLE model for the JFET can then be used in PSpice simulations by simply placing it in the proper orientation in place of the JFET on the schematic YT TIME DOMAIN DATA Using the oscilloscope in YT display mode together with the single sequence acquisition Fincan Crete rabor Trungle Waive 25Hz W about 2 pap LIY offset Ta Scope Che Set to Invert To Scope Chil mode transient non repetitive signals can be captured The input signals are digitized to eight bit resolution at a sampling rate determined primarily by the time base setting The Tektronix TDS220 and TDS1002 series of oscilloscopes capture a record length of 2500 points The Scope YT Display and Data VI retrieves the 2500 points for each displayed channel and allows the user to print or save an image of the display save the scaled data in a spreadsheet file or format and save the data for use in PSpice circuit simula tions as a PWL input signal source file Figure 7 shows the front panel of the Scope YT Display and Data VI The 2500 data points for each channel are 100 ohm Mote Rectum is floating Fig 6 Test circuit used to measure JFET transcoductance 8 D Litwhiler i
14. values stored in the model The JFET is a three terminal device gate source drain In the test circuit the input to the JFET is the voltage applied between its gate and source terminals while the output is the Triiki an Thee Che bo Srt A then Cope la Opteardi pe Oe ee aoe ee LEE 1 ee oe E i ee see ee oe Se ee tes te ee en epee en E i PAE DE SS SU E E TE DE g 2 eae seed ee See ee eee Se ee ee ee ee ae See le ee ee ee ee ee ee a ee a ee ee ee es ee eee ees ee ee ee ee ee eer ae TTT ael TEA Tos al Lit bal 75 panta raz Jai 70 ASE koa Fy debe oe LE LE g LEE EARE Teh LE 2 wE a2 Li ora BE e hE 1 SE J FEH ANE ee EH Ded Eir a A Lae T E ET IEN 4 LIE a UE LE TEE DE 24 2 PA e aS AODH LAE EE PEE LS0E 3 SE FE Lone AEH aE SSE AmE Een a AEH 2 i FE AD LTE may liir RIDEI LKE LOE LEH a2 xj AMEH A 2 00640 iisi ere Fig 4 Front panel of PSpice ABM formatter VI More Meaningful PSpice Simulations via LabVIEW 7 A Micrubems tchamustice EET ES uN Er Fy Fie Et De Mangan ies Sneaks Took x ajz algi zj oj jaj a sjaje of 9 ajajajejaj aada das aa A aa yve aaloe ema PART ei TABLE EPA ihe tH THUA DH r PEGREF 6 1 TF baias Rorrchapregeenbbe Anitens fcc Syrians dirar Ainbat 4i6 i FEFE g TEMPLATE A EFOES ADUT SOUT TABLE EHPA Cred basta Fig 5 ABM table entry in PSpice curren

Download Pdf Manuals

image

Related Search

Related Contents

Betriebsanleitung Agria 5900 Taifun  Samsung FG87SSTR Инструкция по использованию    NI 435x User Manual - National Instruments  Epson Stylus Color 980 Ink Jet Printer Start Here Card  Descargar  第19号様式エックス線装置設置届  GUIDE RSC - YT Industries    

Copyright © All rights reserved.
Failed to retrieve file