06-26-2010 06:02 PM
Creating a waveform by using phase shift and amplitude should work. Its been way too long since I worked with this stuff. I know the current will lag the voltage with an inductive load, but how do you calculate the phase shift?
06-26-2010 06:36 PM
I just found out, phase shift is arctan(3/4), which comes out to be 0.6435. This isn't much of a phase shift.
06-26-2010 10:42 PM
@tbob wrote:
I just found out, phase shift is arctan(3/4), which comes out to be 0.6435. This isn't much of a phase shift.
That's in radians. Which is about 37 degrees. What do you consider to be a "large" phase shift?
06-27-2010 11:45 AM - edited 06-27-2010 11:46 AM
@tbob wrote:
Dividing the sine wave by a complex number in Labview may not be what you want. The way Labview handles it, it treats the waveform as an array of data points. It does not take into account any phase shifting. So without phase shift, and dividing each data point by the complex number, you will get a collection of data points as shown in the graph. At max amplitude of 10, 10+0j divided by 4+3j will give 1.6+1.2j. I would not know how to divide an enitre waveform by one complex number. What does this gain anyway?
It's perfectly reasonable to divide a waveform by a complex number. However, the fundamental issue here is that the waveform generation VIs do not generate complex waveforms (i.e., waveforms in which the Y values are complex numbers). It's true that you can configure the waveform generation VIs to give you a phase shift, but that's not quite the same thing. You'd have to assembly the waveform yourself using an array of Y values that are complex. If you do that, then the math works out fine. So, using your example:
As I noted before, using a waveform graph for complex values won't tell you anything, as it can't plot complex values. You either have to separate the real and imaginary and plot them as separate plots, or you have to use an XY graph (though that won't show you pretty sine waves). Or, if you're dealing with sinusoids you could convert the complex number back into a sine wave with a specific phase shift, like the waveforms that the waveform generation VIs create. That would involve some programming, though.
06-28-2010 11:22 AM
@smercurio_fc wrote:
@tbob wrote:
I just found out, phase shift is arctan(3/4), which comes out to be 0.6435. This isn't much of a phase shift.
That's in radians. Which is about 37 degrees. What do you consider to be a "large" phase shift?
Its been way too long since I dealt with complex numbers. ![]()
Smerc: In your last post, you showed the amplitude to be 1.6. This is the same value I got when I re-created the OP's vi. But he claims the value should be 2. I don't see how.
06-28-2010 12:53 PM
@tbob wrote:Smerc: In your last post, you showed the amplitude to be 1.6. This is the same value I got when I re-created the OP's vi. But he claims the value should be 2. I don't see how.
Neither do I.
06-28-2010 01:03 PM
@smercurio_fc wrote:
@tbob wrote:Smerc: In your last post, you showed the amplitude to be 1.6. This is the same value I got when I re-created the OP's vi. But he claims the value should be 2. I don't see how.
Neither do I.
The Real part is 1.6, the imaginary part is -1.2. The amplitude is sqrt[(1.6)^2+(-1.2)^2]=2. By inspection, the orginal imaginary number (4+3i) forms a 3,4,5 triangle, so the amplitude is 10/5 or 2.
06-28-2010 01:14 PM
I need to read more carefully. I thought he was asking about the real part being 2 instead of 1.6.
Regardless, the bottom line is that LabVIEW is performing the math correctly, which is part of what was being asked.
06-28-2010 01:32 PM
smercurio_fc wrote:
Regardless, the bottom line is that LabVIEW is performing the math correctly, which is part of what was being asked.
My current rule of thumb when LV gives unexpected math* results:
90% Pilot Error
9.999% Floating point shenanigans (been a while....knock on wood)
Remainder is LV bugs.
The top two values change with time, the remainder is fortunately constant, and merely an upper bound.
*Built-in functions on unitless values. Add units and use Evaluation VIs at your own peril.
06-28-2010 01:44 PM
@Darin.K wrote:
The Real part is 1.6, the imaginary part is -1.2. The amplitude is sqrt[(1.6)^2+(-1.2)^2]=2. By inspection, the orginal imaginary number (4+3i) forms a 3,4,5 triangle, so the amplitude is 10/5 or 2.
Its slowly starting to come back to me now. It has been over 20 years since I did complex number math. For some reason I was thinking amplitude and phase angle. Totally off target. Amplitude is gotten from Pythagoreum theory and phase is from arctangent. WOW its been a long time.