Tampilkan postingan dengan label Labview Tutorial. Tampilkan semua postingan
Tampilkan postingan dengan label Labview Tutorial. Tampilkan semua postingan

Senin, 26 November 2012

Labview Tutorial on Analog Modulation

This Labview tutorial demonstrates AM, FM and PM analog modulation using real audio signal contained in .wav file. An interface is constructed that allows users to choose the different modulation and also allows to vary the amplitude, frequency, phase, frequency modulation index and phase modulation index.

Before we start you might want to visit Labview Student Download and Labview Tutorials.

The complete front panel view and the back progamming panel are shown below-

Modulation Labview Front Panel View
Figure 1: Modulation Labview Front Panel View
Modulation Labview Back Program View
Figure 2: Modulation Labview Back Program View
Basically this program allows us to browse and select an audio file in the .wav format which is then amplitude modulated or frequency modulated or phase modulated according to what users chooses from the modulation selector(see figure 1). If freqency modulation or phase modulation is selected then users can input the freqeuncy modulation index or phase modulation index respectively. There are also three numeric controls for amplitude, frequency and phase. For audio file input control use the file path control which can be found in modern, silver and also in the classic control pallet of the front control panel.

The back programming panel consist mainly of numeric inputs(amplitude,frequency,phase, index constants), the file importing function element, three formula nodes, a case structure, a waveform chart, timer and stop. All these functional elements are embedded inside the while loop.

The carrier and audio signal inputs enters the three AM, FM and PM formula nodes and each outputs the different modulated signals. The case structure allows to select which modulated signal to plot on the waveform chart. 

The figure below shows how the formula for AM, FM and PM is written into the formula node-
AM formula node in Labview
Figure 3: AM formula node in Labview
In the above AM formula, A is the amplitude, f the frequency, t the time, Q the phase and m the audio signal(message). Note that the time t is obtained from the iteration index number of the while loop.

Similarly the FM formula node is-

FM formula node in Labview
Figure 4: FM formula node in Labview

In this case, kf is the frequency modulation index, int(m) is the integration of the audio signal and others are same as for the AM signal formula.

Lastly the PM formula node is-

PM formula node in Labiview
Figure 5: PM formula node in Labiview
Here kf is the phase modulation index.

Rabu, 21 November 2012

An introduction tutorial of Labview

This is an introduction tutorial on Labview which shows how to use enter the input and output controls into the front panel and the functional parts in the block diagram panel. After having placed the required controls and elements we perform simulation to get output.

Readers may acquire Labview download student, visit the blog post.

The Labview can consist of two panel- Front Panel and Block Diagram Panel. The front panel is used to place users input/output controls blocks and the block diagram panel is where you put the the actual algorithm implementation using functional blocks.

The picture below shows these two panels-

Labview front and block diagram panel
Picture: Labview front and block diagram panel
Here we give an simple example on how to set up labview to perform XOR of two sequence of binary data sequence.

To do this right click on the Front panel and select Array,Matrix & Cluster then Array as shown

labview tutorial
Once it is single clicked it is attached automatically attached to the mouse cursor. Place the input array in suitable location in the front panel workspace. As it is placed on the front panel the corresponding functional block is added in the block diagram panel as shown-

labview tutorial
Now place another two such arrays-
labview tutorial
Now to define input and output we have to place numeric input and output(indicator) inside the array. To do this, right click and select Numeric>Numeric Control as shown below and drop it inside the first array box.

labview tutorial
labview tutorial

Now drag the array so that it has 8 rows-
labview tutorial
Repeat the same process for Array2.

For the Array3 we need to insert Numeric Indicator instead of Numeric Control because it is the output . Insert the Numeric Indicator into the Array3 as shown-
labview tutorial

Change the labels Array, Array2 and Array3 by simple double clicking it and editing to Input A, Input B and Output.
labview tutorial
To make more descriptive on what the inputs are doing to get the output, just double click on the space between Input A and Input B and write 'XOR' and write a '=' between the Input B and Output array as shown below. Note that you can increase the Font size using ctrl+=.
labview tutorial
We are finished for now with the input/output interface design. Now we will have to add the function XOR in the block diagram panel.

To do this relocate the array blocks in the block diagram that looks something like the one below-
labview tutorial
Now right click on the block diagram panel and add the XOR by going to Boolean>Exclusive Or as shown below-
labview tutorial
The picture below shows the XOR block in between the input and output-
labview tutorial
Now join them with the wires as shown-
labview tutorial

Now the entry step is complete and we need to run the simulation. But before running the simulation we need to add the binary digits into the Input A and Input B array in the Front Panel. Enter random binary digits. The following shows an example-
labview tutorial

Notice that the output is grayed colored.

Now we are ready for simulation. Click on the 'Run Continuously' icon on the toolbar and we get the output result. This is shown below-
labview tutorial

The XOR outputs 0 when both inputs are 1 or 0 and outputs 1 when the inputs are different. As seen from the output the output is XOR of the inputs.

This completes the introduction tutorial of Labview.