Waveform and Complex Numbers

Great; in LV 7.0 Complex Numbers were included as an allowed subtype of Waveform data.
Bad; the vis supporting Complex numbers in Waveforms have a large number of errors. Many Vis does not handle complex numbers and therefore strip off the complex part at the output of the vi. I spent a lot of time to discover and correct the errors in the vis that I used.
Are NI or anybody else working on a patch for these VIs (part of vi.lib)?

You can let R&D directly know of these problems by going to www.ni.com >> contact NI >> feedback (bottom left). These reports go directly to the R&D managers. You can also contact tech support and have them file a report of the bad behavior. Be sure to provide example program and specific information.

Similar Messages

  • 3-Phase Voltage Waveform to Complex Numbers

    I read this topic and and I do not think it worksfor my case. http://forums.ni.com/t5/LabVIEW/How-to-convert-waveform-into-complex-number/m-p/808360/highlight/true#M368430
    I would like to simulate 3-Phase voltage Waveform at the sample rate of 1000 sample/s and get their numberic values as complex numbers. I could only get the Y-value but not the phase.
    Could someone points out how to get the complex values (1000 values) in the attched example for VA, VB, and VC?
     

    Hi muahang1234,
    You could try something like the image I've attached. Basically, you generate the waveform and create another waveform that is 90 degrees out of phase. That way, you can track the Y position of each of the waveforms. The first waveform will be the real position while the other waveform's Y will be the imaginary position, or phase, of the waveform. You may have to convert this into polar form if you want it in that format, but that shouldn't be too hard.
    It may be a little inconvenient to do this for 3 waveforms, but that should at least give you an idea of what to do about the issue.
    Regards,
    Andy F.
    Applications Engineering
    National Instruments

  • Regex and complex numbers

    Hi community ,
    I made a small program using simple regex.
    I can't figure out why I cannot input a complex number
    in a format like (     Re{z},Im{z}     ) i.e. I don't know why
    the brackets can't be separated with the white spaces?
    Thnx in advance,
    Nikola
    Here is the code :
    * @author Nikola Radakovic
    import java.util.*;
    import java.util.regex.Pattern;
    // complexni number
    class ComplexNo {
         private float x,y;
         public float getX() {
              return x;
         public void setX(float x) {
              this.x = x;
         public float getY() {
              return y;
         public void setY(float y) {
              this.y = y;
         public ComplexNo sumarize(ComplexNo drugi){
              this.x = this.x + drugi.getX();
              this.y = this.y + drugi.getY();
              return this;
    public class Complex {
         public static void main(String [] args){
              ComplexNo no1;
                 ComplexNo result = new ComplexNo();
              Scanner sc = new Scanner(System.in);
              boolean flag = true;
              Pattern pattern = Pattern.compile("\\(\\s*\\d*\\.?\\d*,\\d*\\.?\\d*\\s*\\)");
              while(flag){
              System.out.println("Input a complex number in format (Re{z},Im{z}) : ");
              while(sc.hasNext(pattern))
                   String str = sc.next().replaceAll("\\(|\\)","");
                   Scanner float_scan = new Scanner(str);
                   float_scan.useDelimiter(",");
                   // get a float number
                   while(float_scan.hasNextFloat()){
                        no1 = new ComplexNo();
                        no1.setX(float_scan.nextFloat());
                        no1.setY(float_scan.nextFloat());
                        System.out.println("Inputed number "+no1.getX()+","+no1.getY());
                        result.sumarize(no1);
              flag = false;
              System.out.println("The result is  "+result.getX()+","+result.getY());
    }Edited by: EqAfrica on Jan 8, 2008 7:29 PM
    Edited by: EqAfrica on Jan 8, 2008 7:30 PM

    EqAfrica wrote:
    It works perfect :)
    even if I don't know what's the difference
    between sc.findWitihHorizon(pattern,0).
    and sc.hasNext(pattern)The pattern remains the same.
    thnx a lotI believe the key is (from the API) "This method searches through the input up to the specified search horizon, *ignoring delimiters*. "

  • In range and coerce with complex numbers?

    I have an array of complex numbers with these numbers I need to set to 0 all numbers whose real parts are negative. With "in range and coerce" I can split the array into real and imaginary then set all negative numbers to 0 then recombine the complex part but that still leaves me with 0+ai numbers that should be 0. How can I also set the complex part to zero for the negative numbers?

    Hello,
    You can use the following fonction in a for loop with your array.
    Michel

  • Complex waveform and FFT

    Hello everyone!!
    I'm using the MT RFSG Generate PSK.vi that you can find in the examples menu of LabVIEW. I get a good singnal because I see it in an Spectrum Analyzer, but now I want to see the same signal but in the LabVIEW. The problem is that the vi has an output which name is "complex waveform" and I don't know how get the graph from that output. I know that I must use the FFT to obtain the spectrum but isn't directly so I don't know how to do it. Have I to use some vi between the generate PSK. vi and the FFT.vi?? How could I do it?? What FFT.vi is the best for my problem? I need help.
    Thank you.

    OK, it's because the output of this vi is a typdef (ComplexDataWaveform.ctl), not a waveform. You can try something like that:
    You can extract your data from the typedef cluster and build a waveform.
    Cordialement,
    Simon D.
    CLA | Certified LabVIEW Architect
    CTA | Certified TestStand Architect

  • How to convert a waveform signal into array of complex numbers

    How to convert a waveform signal into array of complex numbers.

    Hi Chaks,
    try this:
    (Get Waveform components, convert to complex DBL)
    Message Edited by GerdW on 01-28-2008 09:23 AM
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome
    Attachments:
    ToCDB.png ‏1 KB

  • Having trouble converting array to spreadsheet string, storing the file and coverting back to array with complex numbers

    I am working with a network analyzer. I have arrays made of 5 columns the first consisting of an integer and the next four consisting of complex numbers. I am converting the array into a spreadsheet string and then saving the file using the write characters to a file VI. That seems to work well as when I open the file in Excel all the data is there. However when I try to reverse the process, open file and convert back to array, I loose some of the data. Specifically the imaginary parts of my complex numbers are all going to zero. I have narrowed down the problem to be in the conversion from spreadsheet string to array and vice versa. I
    think the problem may be with the 'format' input to the VI. I do not have an adequate resource for this so I am not sure what to put in to accomplish my task. Any takers?

    Hi Biz
    I don't think there is a direct way of converting a complex number to a
    string, so when you convert the array to a spreadsheet string, the
    numbers would be converted to real data.
    However, you could try separating the real and imaginary parts using the
    "Numeric: Complex to Re/Im" function, and then store these - either in
    separate files or in adjacent columns/rows in the same file. Then, when
    you read in the data again, use the "Numeric: Re/Im to Complex" function
    to put the two "halves" together.
    If you actually want Excel to interpret the numbers as imaginary, then
    you'll probably want to create a string for each complex number of the
    form "Re + Im*i" (after separating the Re and Im parts), by using
    "String:Format into String" with 2 numeric inputs and the format string
    "%f+%fi".
    Reading the data back into Labview then would require splitting the
    string into the 2 pieces by using "Stringcan from String" with 2
    numeric outputs (smae precision as original numbers specified by the 2
    Default Value inputs) and the same format string "%f+%fi", and then using
    the above-mentioned "Numeric: Re/Im to Complex" function. It worked for
    me, so if you can't follow what I am describing, send me an email and I
    can email you what I did (LV 5.1.1).
    Paul
    Biz wrote:
    > Having trouble converting array to spreadsheet string, storing the
    > file and coverting back to array with complex numbers
    >
    > I am working with a network analyzer. I have arrays made of 5 columns
    > the first consisting of an integer and the next four consisting of
    > complex numbers. I am converting the array into a spreadsheet string
    > and then saving the file using the write characters to a file VI. That
    > seems to work well as when I open the file in Excel all the data is
    > there. However when I try to reverse the process, open file and
    > convert back to array, I loose some of the data. Specifically the
    > imaginary parts of my complex numbers are all going to zero. I have
    > narrowed down the problem to be in the conversion from spreadsheet
    > string to array and vice versa. I think the problem may be with the
    > 'format' input to the VI. I do not have an adequate resource for this
    > so I am not sure what to put in to accomplish my task. Any takers?
    Research Assistant
    School of Physiotherapy, Curtin University of Technology
    Selby Street, Shenton Park, Western Australia, Australia. 6008
    email: [email protected]
    Tel. +61 8 9266 4657 Fax. +61 8 9266 3699
    "Everyone who calls on the name of the Lord will be saved." Romans 10:12
    "For all have sinned and fall short of the glory of God, and are
    justified freely by his grace through the redemption that came by Christ
    Jesus." Romans 3:23-4

  • Does java handle complex numbers and operations?

    can i perform arithmetic operations in java with complex numbers, like
    (a+b*i)+(c+d*i), where "i" is the imaginary variable.

    There's no support in Java for complex numbers, but there's a proposed API,
    http://www.vni.com/corner/garage/grande/index.html

  • How to convert waveform into complex number

    Hi,
    I need to convert the acquired voltage and current waveform through DAQ card into complex numbers in order to find the phase relationship
    between the waveform.Can u tell me is there any method to convert the acquired waveform into complex number array
    or is there any other method to find the phase??
    please help me in this
    Regards
    Meenatchi

    Dear Meenatchi,
    I am attaching two sample VI s for the issue you are facing. Hope this helps.
    The waveform in array format.vi gives you the values of the waveform obtained from your DAQ card in an array directly. You can choose this mode by selecting it from the options available on the DAQmx read vi. But if you still want to extract the array from the waveform data type please navigate to programming >> waveform >> get waveform components and extract the array component.
    The phase of the complex number created.vi gives you and array of the phases. Please specify the number of iterations of the for loop that determines the size of the array.
    If you need any further assistance, please feel free to contact us.
    Regards,
    Pavan Ramesh
    Applications Engineer
    NI India
    Attachments:
    Waveform array issue.zip ‏10 KB

  • Tdms does not support complex numbers?

    I can see that I can create and manipulate complex waveforms in Labview, but when I try to save such a waveform in a TDMS file, I get a run-time error that data format is not supported, forcing me to split the complex waveform into two separate waveforms for saving.
    Also, when I send a complex waveform to a Waveform Graph indicator, it truncates the imaginary part.
    Are there any plans to add native support for complex numbers in TDMS and graphing?

    Fedor wrote:
    I can see that I can create and manipulate complex waveforms in Labview, but when I try to save such a waveform in a TDMS file, I get a run-time error that data format is not supported, forcing me to split the complex waveform into two separate waveforms for saving.
    That's correct. TDMS does not support complex values.
    Also, when I send a complex waveform to a Waveform Graph indicator, it truncates the imaginary part.
    That's also correct. Think about it. What would you plot on a waveform graph? You could use something like an XY graph, with X being the real values and Y being the imaginary values. Or, you could use a polar plot (available as a picture indicator plot).
    Are there any plans to add native support for complex numbers in TDMS and graphing?
    If you wish to make a suggestion regarding this, then you can post in the LabVIEW Idea Exchange, where people can vote on the idea. You may need to submit this as two different ideas since it's covering two different components.

  • How to use RLS with complex numbers as the input?

    I import a file which have complex numbers, and I want to filter it using complex RLS adaptive filter, but it always freeze at the filtering and update then it returns one value in the matrix and all the other numbers are NaN, so how can I fix this.
    The second thing is when I use FBLMS, it always return error 42020 unless I specify the filter length= number of the input which is huge number, so how do I specify normal filter length.

    Hi engomar,
    There is a detailed description of how to choose filter length in the Adaptive Filter Tollkit Help file. 
    http://zone.ni.com/reference/en-XX/help/372357B-01/lvaftconcepts/aft_choose_filterlength/
    This page has several links to other important factors of what filter to choose. Under Computational Resource Requirements, it lists the memory usage for different filter types. RLS is the most memory intensive, which could be causing the freeze. Maybe try a LMS to see if this helps.
    Robert R. | Applications Engineer | National Instruments

  • Using complex numbers in Fletcher Reeves optimization method

    Hello,
    I would like to minimize a function of 4 complex variables with the Fletcher Reeves optimization method (Conjugate Gradient VI).
    Is it possible to do it with this VI or with HiQ4.5 ?
    (for S-parameters specialists) The purpose is to de-embed using optimization method.
    Thanks,
    Dze

    I believe that the "Conjugate Gradient nD.vi" and the optimize function in HiQ only work with real vectors. Most of the solve functions in HiQ work with complex numbers, and you may be able to create your own algorithm for the purpose, but I don't think that there is already a function that will do quite what you want.

  • Complex Numbers problem

    I am having problems getting this Complex Numbers program to work correctly. i want to display using format a+bi the addition, subtraction and multiplication of 2 complex numbers.Can anyone reply today?
    class Complex
         private double realPart, imaginaryPart;
         public Complex()
              realPart = 0.0;
              imaginaryPart = 0.0;
         public static void main(String [] args)
              Complex c;
              double res;
              c = new Complex();
              Screen.message("-------------------MENU----------------------------");
              Screen.newline(2);
              Screen.message("Please enter a number: ");
              Keyboard.readDouble();
              res = c.get_realPart();
              Screen.newline();
              Screen.message("Please enter a second number: ");
              Keyboard.readDouble();
              res = c.get_imaginaryPart();
              Screen.newline(2);
              Screen.message("--------------------------------------------------");
              Screen.newline();
              Screen.message("     Designed by Niall Magner               ");
              Screen.newline();
              Screen.message("--------------------------------------------------");
              Screen.newline(2);
              Screen.writedouble(res);
              Screen.newline();
              Screen.writedouble(res);
              Screen.newline();
              Screen.writedouble(res);
              Screen.newline(2);
         public double get_realPart()
              return realPart;     
         public double get_imaginaryPart()
              return imaginaryPart;
         public void addComplexNum(Complex n1, Complex n2)
              realPart = n1.get_realPart() + n2.get_realPart();
              imaginaryPart = n1.get_imaginaryPart() + n2.get_imaginaryPart();
              Screen.message("-----------------------------------------------");
              Screen.newline(2);
              Screen.message("Number 1 is: " + realPart);
              Screen.message(" + " + imaginaryPart + "i");
              Screen.newline();          
              Screen.message("Number 2 is: " + realPart);
              Screen.message(" + " + imaginaryPart + "i");
              Screen.newline();          
              Screen.message("-----------------------------------------------");
              Screen.newline(2);
         public void subtractComplexNum(Complex n1, Complex n2)
              realPart = n1.get_realPart() - n2.get_realPart();
              imaginaryPart = n1.get_imaginaryPart() - n2.get_imaginaryPart();
              Screen.message("-----------------------------------------------");
              Screen.newline(2);
              Screen.message("Number 1 is: " + realPart);
              Screen.message(" - " + imaginaryPart + "i");
              Screen.newline();
              Screen.message("Number 2 is: " + realPart);
              Screen.message(" - " + imaginaryPart + "i");
              Screen.newline();          
              Screen.message("-----------------------------------------------");
              Screen.newline(2);
         public void multiplyComplexNum(Complex n1, Complex n2)
              realPart = n1.get_realPart() * n2.get_realPart();
              imaginaryPart = n1.get_imaginaryPart() * n2.get_imaginaryPart();
              Screen.message("-----------------------------------------------");
              Screen.newline(2);
              Screen.message("Number 1 is: " + realPart);
              Screen.message(" * " + imaginaryPart + "i");
              Screen.newline();          
              Screen.message("Number 2 is: " + realPart);
              Screen.message(" * " + imaginaryPart + "i");
              Screen.newline();
              Screen.message("-----------------------------------------------");
              Screen.newline(2);
    Any help greatly appreciated.
    Niall Magner

    There are several problems with this code. You never call the add method, so the numbers are never going to be added. You never load up a complex number to add either.
    Try doing something a bit more like this:
      read a float from the keyboard
      read another float from the keyboard
      Create a complex number from this float
      Complex complex1 = new Complex();
      complex1.realPart = first number from above;
      complex1.imaginaryPart = second number from above;
      do this again to get the second complex number
      then add the numbers together
      Complex complexSum = new Complex
      complexSum.addComplexNum(complex1, complex2)
      print complexSum.realPart + "+i" + complexSum.imaginaryPart;
      then do the other operations you wantI would also advise that you take a course in Java Programming, cos the code you have posted is truely awful.

  • How do I write complex numbers to an excel or text spreadsheet file.

    I am performing an FFT on 3 channels of simultaneous analog input. I want to write the resultant 3 complex numbered arrays to a spreadsheet. Do I have to seperate the a and b*i components into r and theta and write two columns per array or is there a better way?

    Perhaps you can write it as a String..?
    Khalid

  • SVD with complex numbers

    I'm working on creating a SVD class using complex numbers. I have an adaptation of the Jama ( http://math.nist.gov/javanumerics/jama/ ) implementation coded which works great with complex numbers with only a real part, but fails when the imaginary is present. I also coded up a port of numerical recipes' ( http://www.nr.com ) implementation, but am unable to get it to converge. I'm 99.9% sure that the problem does not exist in my complex number class as it has worked fine up until now.
    Anyhow, what I'm wondering is if anyone has a Java SVD for complex matrices that I could look at and/or use?
    Thanks in advance,
    m

    It wasn't working when I tried it a few months ago. I found the bug in the database - it's been long-standing. Given that Sun doesn't appear to be supporting Java3D very well, I doubt it'll ever be fixed.
    Besides, that SVD algorithm is only for real matricies, I believe. - MOD

Maybe you are looking for

  • Newbuild with FTTP, BT site only showing ADSL avai...

    Hello, I am moving into a new build at the end of August. It has been built (as has the entire estate) with FTTP. However, when I go on the BT website for the home move, it only shows ADSL with a max of 3.5mbs. Other homes under the same postcode hav

  • Must start FF in safe mode.get parsing error

    Except for safe mode.I can't open Firefox. See message below. In safe mode,if I check the box #4,default to Firefox settings.I can get in. This started in the spring,happened after update.From then to now,I've been using FLOCK.It's a good browser,for

  • My raisins are confusing me

    I just opened a box of raisins, and on the inside lid it has the following quote "Happiness is an inside job." What does that mean, and what does that have to do with raisins?

  • Details on Force Folder Security

    When I create a folder in UCM, there is a boolean field called "Force Folder Security". How does this folder metadata get used?

  • Has anyone encountered this before?

    Hello everyone! I keep getting this nagging message whenever I am trying to run a planning layout or execute a planning sequence:  "This is a sample." What does "This is a sample" imply?  Is this a an indicator that there are some settings that need