Two Channels Signal Generator Designed as Virtual Instrument CAIUS PANOIU, RALUCA ROB, MANUELA PANOIU, ANCA IORDAN Department of Electrical Engineering and Industrial Informatics Politehnica University of Timisoara, Revolutiei street, no. 5, Hunedoara, ROMANIA {caius.panoiu, raluca.rob, manuela.panoiu, anca.iordan}@fih.upt.ro Abstract: - This paper describes a signal generator using two channels designed as a virtual instrument that constitutes a very useful laboratory instrument because the generated signals can be used in real circuits with a data acquisition board. Key-Words: - virtual instrument, signal generator, LabVIEW. 1 Introduction Signal generators are electric devices that are used as time variable voltage sources with a specified waveform and adjustable amplitude and frequency. These instruments are used in electrical laboratory in controlling, adjusting or measuring the electrical signals. 2 Application description The application is realized in LabVIEW because this programming environment offers a very attractive interface with the user. The signal generator is designed with two independent channels. The signals that can be generated are sine, square, triangle, sawtooth or DC signal. For each type of signal there are designed independent signal generators. The parameters of these generators can be adjustable from the buttons placed on the front panel: amplitude, frequency, offset, phase. In figure 1 is presented the algorithm for generating the simulate signal and in figure 2 is presented the control elements for adjusting the electric parameters [1], [2], [3], [4]. Fig. 1. Algorithm for generating the simulate signal. ISBN: 978-960-474-328-5 132
Fig. 2. Control elements for adjusting the electric parameters. The application is able to generate different signals by using elementary operations with the basic signals. The electric scheme can also realize signal reversing operations, half wave and full cycle rectification. Full wave rectification is done using absolute value mathematical block [3]. Half wave rectification is made according with the following principle: signal is reversing, the result is subtracting from the full cycle rectified signal. The obtained signal is a half wave rectified signal and amplified twice. The result is divided by 2, and the final signal represents the half cycle rectified signal. The algorithm is presented in figure 3. The both generated signals can be followed on the same screen. The algorithm of the time base of the screen is presented in figure 4 and it can be adjusted using a few Boolean buttons placed on the front panel. Fig. 3. Algorithm for signal rectification. ISBN: 978-960-474-328-5 133
Fig. 4. Time base algorithm. Each signal can be viewed with noise. The noise level can be adjusted. There were chosen the following noise types: Uniform, Gaussian, Periodic random, Bernoulli, MLS Sequence, Gamma, Poisson, and Binomial. Noise signals are generated using Simulate Signal blocks set with Numeric and Boolean control elements. Uniform White Noise generates a signal that contains a uniformly distributed, pseudorandom pattern whose values are in the range [-a:a], where a is the absolute value of Amplitude. (1) Gaussian White Noise generates a signal that contains a Gaussian-distributed, pseudorandom pattern whose statistical profile is (µ,sigma) = (0,s), where s is the absolute value of the specified Standard deviation. (2) (3) (4) Periodic Random Noise generates a signal that contains periodic random noise (PRN). Gamma Noise generates a signal that contains a pseudorandom pattern of values that are the waiting times to the Order number event of a unit mean Poisson process. Poisson Noise generates a signal that contains a pseudorandom sequence of values that are the number of discrete events occurring in a given interval, specified by Mean, of a unit rate Poisson process. Binomial Noise generates a signal that contains a binomially distributed, pseudorandom pattern whose values are the number of occurrences of an event, given the probability of that event occurring and the number of trials. Bernoulli Noise generates a signal that contains a pseudorandom pattern of ones and zeros. MLS Sequence generates a signal that contains a maximum length sequence of ones and zeros using a modulo2 primitive polynomial of order Polynomial order. Inverse F Noise generates a signal that contains a continuous noise waveform with a power spectral density that is inversely proportional to frequency over a specified frequency range. ISBN: 978-960-474-328-5 134
The signals can be followed on a real oscilloscope display if it is connected to an analog input of data acquisition board, like NI-6221 (figure 5). Fig.5. Data acquisition board PCI-6221. Technical characteristics: -16 analog inputs, 250kS/s, resolution 16 bits -2 analog outputs, 833kS/s, resolution 16 bits -10 digital I/O compatible TTL -2 counter/timers on 32 bits -digital trigger -compatibility with Windows (2000/NT/XP), Linux -integration with software components LabVIEW, CVI, Measurement Studio for Visual Studio NET 3 Simulation results In figure 6 the authors is presented the simulation results using a sine signal on channel 1 and a square signal on channel 2. In figure 7 is presented the simulation results using a sine signal on channel 1 (full cycle rectified) and a triangle signal on channel 2. In figure 7 is presented the simulation results using a sine signal added with a square signal on channel 1. Fig. 6. Simulation results. Channel 1: sine signal, channel 2: square signal. ISBN: 978-960-474-328-5 135
Fig. 7. Simulation results. Channel 1: sine signal (full cycle rectified), channel 2: triangle signal. Fig. 8. Simulation results. Channel 1: sine signal added with square signal at the same frequency. ISBN: 978-960-474-328-5 136
References: [1] Cuntan Corina, Baciu Ioan, Panoiu Caius, Rob Raluca, Programmable Encoder Designed in LabVIEW, WSEAS European Computing Conference Paris, Franta, 2011, pp. 176-181 [2] Iordan Anca, Panoiu Manuela, Muscalagiu Ionel, Rob Raluca, Design of an Educational Informatics System for the Study of the Quadrilateral Using UML Diagrams, Annals of Faculty Engineering Hunedoara, International Journal of Engineering 2011, pp.163-166 [3] Panoiu Caius, Panoiu Manuela, Rob Raluca, Programmable Gain Amplifier Using Parallel Port Controlling, International Symposium on Advanced Engineering & Applied Management, 2010, pp. 1-6 [4] Panoiu Manuela, Panoiu Caius, Iordan Anca, Illes Cosmina, Software Package for Analysis the Performances of Backpropagation Neural Networks Training Algorithm, Annals of Faculty Engineering Hunedoara, International Journal of Engineering, 2011, pp. 163-166 ISBN: 978-960-474-328-5 137