LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to enter the phase of a signal and get in return its corresponding voltage?

Solved!
Go to solution
HI !
I am a beginner in LabView and i am developping this application where by entering the phase of the signal it must give me the corresponding voltage. Then i will send the cooresponding voltage to an elctronic board.The voltages goes from 0 to 15 V and the phase from 0 to 180 degrees with 5 degrees accuracy. I need a lead to start. I was thinking of using array but the data are not from the same type.
Thank you in advance for the light.!!
0 Kudos
Message 1 of 38
(4,691 Views)
What do you mean by "the data are not from the same type"? You have numbers: 0 to 15 and 0 to 180. Looks like a simple line equation V = (15/180) * phase.
0 Kudos
Message 2 of 38
(4,684 Views)

I already have all my voltages as Vin and their corresponding phase in degrees as i simulate it in matlab.

Vin=[0 2 4 6 8 10 12 13 14 15]

Phase= [0.00 11.21 30.16 89.61 134.12 155.54]

The equation does not give me the same answer. I want to be able to send via a parallel port, by inputting the phase, the correspondant voltage.

Thanx for giving me a lead.

0 Kudos
Message 3 of 38
(4,654 Views)
Well, for one thing your array max is 155.54, not 180 as you initially said. Also, you have more voltage values than phase values. So, does 11.21 correspond to a voltage of 2, or 4, or both, or neither?
0 Kudos
Message 4 of 38
(4,641 Views)
Are you simulating a known waveform such as a sine wave?. If you are and you know the frequency and amplitude, you can calculate the voltages directly.

Lynn
0 Kudos
Message 5 of 38
(4,637 Views)
My mistake because i did not wrote the arrays entirely:
 

v=[0 2 4 6 8 10 12 13 14 15]

phase=[0.00 11.21 30.16 89.61 134.12 155.54 168.05 172.58 176.43 179.67]

0 Kudos
Message 6 of 38
(4,634 Views)
The voltages i have got come from the phase shifters of an antenna. I want to steer the main beam electronically so by sending these voltages to the phase shifters via an electronic board.
0 Kudos
Message 7 of 38
(4,631 Views)
Solution
Accepted by topic author marylydie
When you plot Voltage vs Phase it looks like this:



This is clearly not linear. Thus, in order to get the required voltage for a specific phase you will either need to generate a curve fit for the graph and use the curve fit function to get the required voltage for a phase, or use the Threshold 1D Array and Interpolate 1D Array functions. The latter is shown by this example:





Message Edited by smercurio_fc on 06-18-2008 09:29 AM
Download All
0 Kudos
Message 8 of 38
(4,627 Views)
Thanx for your help. will get back to you when i`ll succeed!!
0 Kudos
Message 9 of 38
(4,600 Views)
If you want to try one of the curve fit functions, there's a number of curve fit functions that ship with LabVIEW. Unfortunately, I don't have time right now to whip up an example. Gotta get back to work. Smiley Sad
0 Kudos
Message 10 of 38
(4,591 Views)