0% found this document useful (0 votes)
2 views

Design_of_a_Virtual_Function_Generator_for_Signal_

The document presents the design of a virtual function generator using LabVIEW, which successfully generates signals comparable to those from a real function generator. Measurements of amplitude, frequency, rise time, fall time, and width were taken from both generators and showed high compatibility in low-frequency applications. The study concludes that the virtual function generator can effectively supply low-frequency signals for measurement purposes.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

Design_of_a_Virtual_Function_Generator_for_Signal_

The document presents the design of a virtual function generator using LabVIEW, which successfully generates signals comparable to those from a real function generator. Measurements of amplitude, frequency, rise time, fall time, and width were taken from both generators and showed high compatibility in low-frequency applications. The study concludes that the virtual function generator can effectively supply low-frequency signals for measurement purposes.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

Advances in Applied Sciences

2017; 2(2): 23-27


http://www.sciencepublishinggroup.com/j/aas
doi: 10.11648/j.aas.20170202.12

Design of a Virtual Function Generator for Signal


Generation
Gozde Tektas*, Cuneyt Celiktas
Department of Physics, Faculty of Science, Ege University, Izmir, Turkey

Email address:
[email protected] (G. Tektas), [email protected] (C. Celiktas)
*
Corresponding author

To cite this article:


Gozde Tektas, Cuneyt Celiktas. Design of a Virtual Function Generator for Signal Generation. Advances in Applied Sciences.
Vol. 2, No. 2, 2017, pp. 23-27. doi: 10.11648/j.aas.20170202.12

Received: May 5, 2017; Accepted: May 15, 2017; Published: July 5, 2017

Abstract: A virtual function generator was designed by developing a code by LabVIEW. Signals with the same amplitude
and frequency supplied from a real function generator and the virtual function generator were sent to a real oscilloscope to
measure the quantities. The signals from the virtual one were generated at analog output channel of a National Instruments
(NI) multifunction data acquisition device. Amplitude and time quantities of the signals from both generators were compared
with each other. The results from the virtual generator were highly in compatible with those of the real one. It was concluded
that the designed virtual function generator could be used to supply the signals especially in low frequencies.

Keywords: Virtual Function Generator, LabVIEW, DAQ Device

unit time. Rise time is the time it takes for the pulse to rise
1. Introduction from 10 to 90% of its full amplitude. Fall time is the time it
Virtual instrumentation combines with a computer, takes for the pulse to fall from 90 to 10% of its full amplitude
software and a wide variety of measurement and control [4]. Width is the width of the signal in terms of second.
hardware. User defined instruments can be created with it Bogdan explained how the signals were generated by a
[1]. Processes in a virtual instrument are performed by DAQ (Data Acquisition) device [5]. The use of data
software functions whereas they are done by microprocessor acquisition device and LabVIEW to implement a signal wave
in a real instrument. generator was presented by the author [6]. Rob et al.
LabVIEW is a software which is used to design the virtual designed a virtual signal generator by LabVIEW [7].
instrument. It has a graphical programming language. A code In this paper, a virtual function generator was designed by
is developed by the software functions (icons) instead of the developing a code. The signals in different frequencies and
lines of text [2]. amplitudes supplied from the real and virtual function
A virtual function generator which is a type of the virtual generators were displayed in the oscilloscope. Measurement
instruments can be designed by using LabVIEW software. quantities obtained from the oscilloscope were compared
The virtual function generator is used to supply signals in with each other.
sinus, triangle, square and sawtooth shape with different
frequencies and amplitudes like a real function generator. 2. Material and Methods
Peak to peak voltage, amplitude, frequency, rise time, fall
time and width quantities of the signals supplied from the LabVIEW has two windows named as front panel and
developed virtual generator can be obtained from an block diagram which are seen in Figure 1. Front panel is an
oscilloscope. Peak to peak voltage is a difference between interface between user and the virtual instrument. Controls
maximum and minimum voltage values of a signal. and indicators of the virtual instrument take part in this panel.
Amplitude is a difference between high and low voltages Block diagram is a window that the code is written for the
(states). The high and low states are the most positive and virtual instrument. The code is formed by making
negative states [3]. Frequency is the number of signals per connections between the functions used in the block diagram.
24 Gozde Tektas and Cuneyt Celiktas: Design of a Virtual Function Generator for Signal Generation

Figure 1. (a) Front panel and (b) block diagram [8].

A GW Instek 2204 model digital oscilloscope, a Thurlby Circuit scheme for the measurements is shown in Figure 2.
Thandar TG230 function generator (real function generator), As can be seen in the scheme, sinus, square and triangle
a NI USB-6008 multifunction data acquisition device, an NI signals supplied from the virtual function generator were
GPIB-USB-HS [GPIB (General Purpose Interface) generated at analog output (AO) channel of the 6008 since
Controller for Hi-Speed USB] and developed virtual function the signals were continuous with changing amplitude. Same
generator were used in this study. type signal shapes were supplied from the real and virtual
In the virtual function generator, controls were developed function generators. The signals supplied from both
for selecting signal type, amplitude, frequency and offset generators were sent to the CH 1 (Channel 1) and CH 2
values. The 6008 was utilized as hardware of the designed (Channel 2) inputs of the oscilloscope. In this way, both
virtual instrument. In order to stop and start the oscilloscope signals were displayed simultaneously.
by the developed code, the GPIB connection was used.

Figure 2. Circuit scheme for the measurements.

Amplitude and frequency values of the signals were set via peak voltage, amplitude, frequency, rise time, fall time and
amplitude and frequency knob of both generators. The real width quantities were obtained from the oscilloscope. Each
function generator has a display to show amplitude and measurement was repeated five times for each amplitude and
frequency quantities. Two methods were employed in this frequency values. All results were recorded after the
study. The first one was constant amplitude and different oscilloscope was stopped. In the following tables, averages of
frequency. In this method, amplitudes of the signals were the measurements are given with their errors.
kept constant to 2 V. Signal frequencies of 10 and 50 Hz
were supplied. The second method was constant frequency 3. Results
and different amplitude. Frequency of the signals was kept
steady on 20 Hz. Amplitudes were adjusted to 1 and 5 V 3.1. Sinus Signal
respectively because analog output voltage range of the 6008
is from 0 to 5 V. The 6008 is unable to generate analog Sinus signal images obtained from the oscilloscope are
signals with high frequency due to the fact that it has shown in Figure 3 for the voltage/division and time/division
maximum update rate of 150 Hz [9]. For this reason, of 2 V/div. and 25 ms/div. settings, respectively. Results
maximum signal frequency was increased to 50 Hz. Peak to using first and second methods are given in Tables 1 and 2.
Advances in Applied Sciences 2017; 2(2): 23-27 25

Table 1. Sinus signal with 2 V amplitude, 10 and 50 Hz frequencies.

10 Hz Frequency 50 Hz Frequency
Measurement Quantities
Real Generator Virtual Generator Real Generator Virtual Generator
Peak to Peak (V) 1.852 2.036±0.0904 1.928 2.016±0.0437
Amplitude (V) 1.788 1.976±0.0951 1.844 1.892±0.0254
Frequency (Hz) 9.872 9.688±0.0190 49.422 48.748±0.0138
Rise Time (ms) 31.38 29.79±0.0532 6.270 5.737±0.0929
Fall Time (ms) 30.98 28.95±0.0702 6.310 5.763±0.095
Width (ms) 51.07 50.37±0.0139 10.24 10.19±0.0045

Table 2. Sinus signal with 20 Hz frequency, 1 and 5 V amplitudes.

1 V Amplitude 5 V Amplitude
Measurement Quantities
Real Generator Virtual Generator Real Generator Virtual Generator
Peak to Peak (V) 0.936 0.998±0.0625 4.664 5.064±0.0790
Amplitude (V) 0.898 0.964±0.0697 4.456 4.936±0.0972
Frequency (Hz) 19.820 20.044±0.0112 19.786 19.698±0.0045
Rise Time (ms) 14.83 14.19±0.0451 14.97 14.78±0.0134
Fall Time (ms) 15.09 14.10±0.0704 15.35 14.91±0.0295
Width (ms) 25.22 25.15±0.0025 25.47 25.38±0.0036

for the signals with 20 Hz frequency and different amplitudes


are given in Table 4 as well.
3.3. Triangle Signal

For 2 V/div. and 25 ms/div., triangle signal images are seen


in Figure 5. Results through both methods are given in Tables
5 and 6.

Figure 3. Comparison of the sinus signal shapes obtained from the real and
the virtual generators.

3.2. Square Signal

Signal images are compared in Figure 4 for 2 V/div. and


25 ms/div. settings. Results, which were obtained for the
square signal with 2 V amplitude and different frequencies,
were compared with each other in Table 3. Obtained results Figure 4. Comparison of the square signal shapes obtained from the real
and the virtual generators.

Table 3. Square signal with 2 V amplitude, 10 and 50 Hz frequencies.

10 Hz Frequency 50 Hz Frequency
Measurement Quantities
Real Generator Virtual Generator Real Generator Virtual Generator
Peak to Peak (V) 2.052 2.060±0.0039 2.048 2.052±0.0019
Amplitude (V) 1.940 1.96±0.0102 1.940 1.964±0.0122
Frequency (Hz) 9.840 9.938±0.0099 49.506 49.078±0.0087
Rise Time (µs) 795.2 798.4±0.0040 792.0 798.4±0.0080
Fall Time (µs) 796.8 805.3±0.0105 795.3 800.1±0.0060
Width (ms) 50.59 49.99±0.0120 10.00 10.20±0.0200
26 Gozde Tektas and Cuneyt Celiktas: Design of a Virtual Function Generator for Signal Generation

Table 4. Square signal with 20 Hz frequency, 1 and 5 V amplitudes.

1 V Amplitude 5 V Amplitude
Measurement Quantities
Real Generator Virtual Generator Real Generator Virtual Generator
Peak to Peak (V) 1.014 1.004±0.0100 4.928 5.120±0.0375
Amplitude (V) 0.992 0.984±0.0081 4.800 4.992±0.0385
Frequency (Hz) 19.688 19.766±0.0039 19.608 19.614±0.0003
Rise Time (µs) 800.0 805.3±0.0067 802.7 802.5±0.0002
Fall Time (µs) 792.4 803.9±0.0144 800.1 805.1±0.0062
Width (ms) 25.59 25.00±0.0238 25.19 25.59±0.0155

However the signals from the virtual one were forwarded to


4. Discussion the oscilloscope through the 6008 in order to reconstruct
them by its digital to analog converter (DAC, 12 bit) for
The authors were examined how virtual signal generator generating analog signals at its analog output (AO) [10]. In
was designed by LabVIEW in References 6-8. In this study, the DAC, each binary number is converted to analog voltage
differently from these works, the signals from the virtual by multiplying its resolution (step size). The AO signals are
function generator were displayed in the oscilloscope. continuous in time with quantized amplitude [11]. The
Additionally, voltage, frequency and time quantities of the resolution of the DAC is an important feature that affects the
signals from the virtual generator were compared with those voltage values of the signals. In addition, AO update rate of
of the signals from the real one. The signals in sinus, square the 6008 is software-timed [12]. The software controls the
and triangle shapes were analyzed in this study. Cosine and rate at which data were generated [13]. The time between
sawtooth signal shapes could also be supplied from the consecutive samples in the signals are determined by the
designed function generator. As can be seen in Figures 3-5, software time which affects the time quantities (such as
the signal shapes from both function generators were highly frequency, rise time) of the signals. Since the real function
in compatible with each other. generator didn’t have these properties, small differences have
It was seen in Tables 1-6 that measurement quantities of been acquired in the results.
the signals had small differences from each other. One of the
primary reasons was that the signals from the real function 5. Conclusion
generator were supplied by integrated circuits whereas the
signals from virtual one were generated via software It was concluded from the all results above that designed
function. In the experiment, analog signals supplied from the virtual function generator can be used properly to supply the
real function generator were directly sent to the oscilloscope. low frequency signals in a measurement platform.
Table 5. Triangle signal with 2 V amplitude, 10 and 50 Hz frequencies.

10 Hz Frequency 50 Hz Frequency
Measurement Quantities
Real Generator Virtual Generator Real Generator Virtual Generator
Peak to Peak (V) 1.980 2.008±0.0139 2.000 2.040±0.0196
Amplitude (V) 1.480 1.520±0.0263 1.528 1.492±0.0241
Frequency (Hz) 9.794 9.824±0.0031 49.400 49.196±0.0041
Rise Time (ms) 31.03 30.76±0.0088 6.271 5.940±0.0558
Fall Time (ms) 30.93 31.29±0.0118 6.234 6.145±0.0145
Width (ms) 51.61 49.59±0.0407 10.110 9.719±0.0407

Table 6. Triangle signal with 20 Hz frequency, 1 and 5 V amplitudes.

1 V Amplitude 5 V Amplitude
Measurement Quantities
Real Generator Virtual Generator Real Generator Virtual Generator
Peak to Peak (V) 0.990 0.969±0.0215 4.808 4.880±0.0148
Amplitude (V) 0.851 0.866±0.0166 4.184 4.150±0.0082
Frequency (Hz) 19.250 19.676±0.0217 19.824 19.766±0.0029
Rise Time (ms) 17.64 17.77±0.0036 17.54 16.62±0.0554
Fall Time (ms) 18.06 18.28±0.0118 17.50 16.95±0.0323
Width (ms) 25.52 26.63±0.0418 25.45 24.05±0.0584
Advances in Applied Sciences 2017; 2(2): 23-27 27

IEEE Transaction on Instrumentation and Measurement,”


2004, 53(4): 1209-1217pp.

[4] R. W. Leo, “Techniques for Nuclear and Particle Physics


Experiments,” Springer–Verlag, Berlin Heidelberg, Germany,
1987.

[5] M. Bogdan, “Virtual Instrument for the Study of the Signals


Generating,” The 10th International Conference on Virtual
Learning, 2015.

[6] M. Bogdan, “Virtual Signal Generator Using The NI-USB


6008 Data Acquisition Devices,” Nonconventional
Technologies Review, Romania, 2013.

[7] R. Rob, C. Panoiu, M. Panoiu and A. Iordan, “Signal


Generator Designed in LabVIEW Program,” Annals of
Faculty Engineering Hunedoara- International Journal of
Engineering, 2011.
Figure 5. Comparison of the triangle signal shapes obtained from the real
and the virtual generators. [8] Virtual Instrumentation with LabVIEW National Instrument
http://www2.isu.edu.tw/upload/103/7/LabVIEW_Introduction
-ThreeHour.ppt. Accessed: 11/05/2017.
Acknowledgements
[9] T. St. Georgiev and G. N. Krastev, “Virtual System for
This work was supported by Scientific Research Generating Analog and Digital Signals,” ICEST, 2010.
Foundation of Ege University under project No. 14 FEN 052.
[10] Http://www.ni.com/pdf/manuals/371303n.pdf. Accessed:
11/05/2017.

References [11] G. Radulov et al., “Smart and Flexible Digital-to-Analog


Converters, Analog Circuits and Signal Processing" Springer,
[1] J. Jerome, “Virtual Instrumentation Using LabVIEW,” PHI 2011.
Learning Private Limited, 2010.
[12] Http://www.ni.com/pdf/manuals/375296a.pdf. Accessed:
[2] Http://www.ni.com/pdf/manuals/374029a.pdf. Accessed: 11/05/2017.
11/05/2017.
[13] Http://www.ni.com/pdf/manuals/374259a.pdf. Accessed:
[3] N. G. Paulter, D. R. Larson and J. J. Blair, “The IEEE standard 11/05/2017.
on transitions, pulses and related waveforms,” Std-181-2003,

You might also like