Solve linear equations vs pseudoinverse memory issues

Hello,
I am trying to solve a Ax
= b system, and have setup my algorithm to use the LU decomposition
followed by the appropriate use of the "Solve Linear Equations" VI. I
then check the error output from this VI, and if there is an error I
try using the "PseudoInverse Matrix" VI.
I am doing this in a loop with a progressively larger matrix for each iteration.
This
works great EXCEPT for when my algorithm gets close to the maximum
memory allowed (i.e. - the iteration BEFORE I get an error message
stating that the VI has run out of memory).Then, although I do NOT get
an error code from my "PseudoInverse Matrix" VI, the values output from
this VI are complete garbage (really really large values).
Has
anyone come across a similar issue before? Is there a way around this?
i.e. - I would like to know when/if the  "PseudoInverse Matrix" VI will
not provide valuable data output so I can stop my algorithm the
iteration beforehand.
Thanks!

Zamjir,
        Can you post the VI and the matrix needed to replicate the issue? I didn't find any other instances of this happening but that doesn't mean that it's not expected. I understand that things ramp up in memory and just before it tops out it shows large (not correct) values but I don't know if this is expected and is just LabVIEW's way of letting us know that it's about to error out (in case you wanted to build in a shut down program you could base it off of these large values) or if it is a bug. If you could post the code so I can take a look at it and also a screenshot of the "out of memory" error you see, I will see what I can find out for you. 
Grant H.
National Instruments
LabVIEW Product Marketing Manager

Similar Messages

  • Is there a limit on the size of the input for the Solve Linear Equations block?

    Hello,
    I'm trying to figure out why the Solve Linear Equations block will properly function with some sets of data and why it won't with others. What my program is doing is taking a signal and comparing it with a batch of sine and cosine waves to try and pick out patterns in the data. I have different sample sizes and it seems to work when I throw 3900 points at it. However, I have another set with 4550 points and it gives me incorrect amplitudes for my sinusoids.  Is there some limit to the size of the matrices that I can give this block? Or is there some other workaround that still allows me to keep all of my data?
    Thanks,
    David Joseph

    Well, the best way to show what I expect is to see the entire program. It's pretty evident that when looking at the graphs, something isn't right. What is supposed to happen is that the runout amplitudes are found, and then those sinusoids are subtracted from the initial data, leaving tooth to tooth data and noise. When I use the larger arrays, it seems as though not all of the data gets through (count the peaks on the product gear runout graph vs. initial) and the amplitudes are much to small, such that nothing is really taken out and the tooth to tooth data looks like the initial data.
    Also, we will also be using an FFT, but it will be limited to only determining the frequencies we should check. I've fought with the fft blocks quite a bit and I just prefer to not use them. Plus, the guy I'm writing this for wants exact answers and does not want to pad or resample the data or use windows.
    The exact number of data points isn't important (ie. 4550 vs 4551) since I use the array size block to index the for loop.
    As for typical values, they can change a lot based on materials. But, the original 3900 data point sets and the 4550 data point sets used practically identical gears. So, use the original 3900 sets I've included as references (check the RO array block numbers to compare).
    I've included 3 3900 samples, 3 4550 samples, and 3 4550 samples that have been truncated to 3900 or so as constants on the block diagram.
    Also, the check for additional runouts (like 3 per rev, 4 per rev, etc..) is optional, but if you choose to use it, use positive integers only.
    I don't know how much of this program will make sense and I have wires running everywhere.. so good luck. Keep in mind I'm only a student and I hadn't touched Labview until about 2 or 3 months ago.
    Thanks,
    David Joseph
    Attachments:
    Full example.vi ‏139 KB

  • Solve Linear Equations NaN return

    I've implemented a modified Linear Levenberg Marquardt function for gauss fitting of spectral data, but have problems from time to time where I simply can't fit a specific data set.
    I've traced the problem to the function "Solve Linear Equations" outputting NaN for one or more solution vectors (Not all) which then plays havok with my function.
    I've located a data set which is initially OK, but which after solving the linear equations has NaN as the second element of the solution vector array. Changing the matrix type to something other than "generic" gets rid of the NaN for this particular data set, but gives problems with others which work with the "generic" matrix type.
    Since my mathematics lectures in college are a few years away now, I'm asking someone out there if they can help me with my problem. I can supply a "corrupting" data set if this would help, or maybe someone knows this problem and has a work-around?
    I've thought of leaving the matrix type to "generic" and checking the output to see if there's a NaN present, and if so, then re-calculate with another matrix type until there's no NaN. This is most likely not very sound mathematically, but it might reduce the number of rogue data sets.
    Thanks in advance
    Shane.
    Using LV 6.1 and 8.2.1 on W2k (SP4) and WXP (SP2)

    Hi Altenbach,
    The data can have a significant amount of overlap. Typically three to four groups of peaks fully resolved, but each group can have up to 4-5 peaks in them, partially visible only as shoulders.
    The start value "problem" is more or less solved (but as usual, not yet finished).
    I've got an approximate first-guess peak find running which does a pretty good job of finding the peaks I need, and I then fit the height and FWHM first before doing a full optimisation (The Sub-VI approach allows much more flexible fitting models).
    The fitting works well on almost all data sets. There are simply some spectra which (although visibly hardly different to others which work perfectly) do not fit, i.e. generate the NaN response from the "solve linear equations" function. It's a numeric problem (bug?), I'm sure, and not strictly a peak location or resolution problem. then again, I may be wrong.
    I refer to the standard "LevMar" VI as being linear, because it assumes a linear relationship between the variable variation and the end mse used for optimisation. This is where the "Solve linear Equations" comes in. Since the relationship is almost certainly not linear (foe example when peaks overlap), I thought maybe the non-linear coefficient guess may yield better results. I've had a quick look through the non-linear LEV-MAR function, but don't understand it yet ot the extent I understand the linear one. It does indeed seem to take a slightly different approach (once you look past the whole parsing code of the "linear" function.
    I'll need some time to get some understanding of the non-linear code.
    Attached are some example spectra (One which works, and one which doesn't).
    Thanks again
    Shane
    Using LV 6.1 and 8.2.1 on W2k (SP4) and WXP (SP2)
    Attachments:
    Spectra.zip ‏3 KB

  • How can I solve a system of linear equations for the non trivial solution?

    I want to solve the equation A Q =0 where A is a 1xn matrix and Q is an nxn matrix for A. I tried using the Solve Linear Equations sub.vi but it just gave me the trivial solution. What can I do to solve this?

    Larry of KochLab,
    Have you looked at the MathScript Node? Would it be possible to post a simple example of what you are trying to do?
    Ben Sisney
    FlexRIO V&V Engineer
    National Instruments

  • How do I solve simultaneous equation with 3 unknowns ?

    I need to solve simultaneous equations with 3 unknowns . Can any body help out on how to go about this? Thanx.

    You did not specify what kind of equations you have....
    Are your equations linear? Check the linear algebra palette and a look at "solve linear equations:.
    LabVIEW Champion . Do more with less code and in less time .

  • Simultaneous linear equation solving

    I'm trying to solve some ill-conditioned simultaneous linear equations for a graphics application. Gaussian elimination using total pivoting on doubles isn't accurate enough. Does anyone know any better techniques?

    yeah, that's pretty good. you might also try some numerical algorithms though if your system is sparse or you want a better performance if your system is large. nist website has a list i think.

  • Solving Coefficien​ts for Non-Linear Equation

    I have the following equation that I need to solve a, b and c. y = a+bexp(-x/c). Is there a VI that is written to help me?

    i don't understand what do you suppose to mean?
    you have not a,b and c values and you wanna solve 3 unknown variables with just one equation?
    do you think is that possible?
    even you had x and y values!
    but if you have 4 values and you just want to find another variables value it's so easy
    you can easily use a formula node.
    i have write a simple program for you to solve this equation and i attached it to this answer.
    it's with LabVIEW 5.
    Attachments:
    formula_node_example.vi ‏25 KB

  • Out of memory issues with PSE 8

    I am using PSE 8 64 bit on a Dell desktop computer with Intel (R) Core (TM) i7 CPU 920 at 2.67 GHz. with 8 GB of ram. My operating system is Windows 7, 64 bit.
    My problem is that I get out of memory or insufficient ram messages in PSE Editor with some PSE tools when my CPU resource utilization reaches 37 to 38%. In other words, even though my computer is telling me I have almost 4 GB of memory left, PSE is saying it does not have enough memory to complete the operation. It looks to me as if PSE is only using 4GB of my 8 GB of Ram. Is this true and what do I need to do to allow PSE to utilize all of my available ram.

    Thanks, that does answer what the problem is, but not necessarily a solution. I like working with 8 to 10 pictures (files) in the editor tray at a time. I make whatever changes needed to each and then group 4 or 5 into an 8.5 X 11 collage. Each picture in the collage is a separate layer and each separate picture may multiple layers of its own. I print the collage on 8.5 x 11 photo paper and then put the page in a photo album. I like the pictures in different sizes, orientations and sometimes shapes, so the album and multiple picture options offered in PSE are not much help. My process eats a lot of memory, which I mistakenly thought, my 8 gb of ram would solve.
    Anyway, now that I know the limitations, I can adjust the process to avoid the memory issue and hopefully, a future version of Elements will accommodate 64 bit.
    Maybe, I am wondering, do I need to look at other programs or am I missing a PSE function that would make my chore easier.

  • FrameMaker 8 Memory Issues

    Hi,
          Working with FrameMaker 8, I've been finding that after opening and closing structured files, (either through the UI or through the FDK) the memory usage of Frame seems to noticable increase. This doesnt seem to happen with unstructured documents. Is this a known memory issue in FrameMaker? Is there any way around it?
    Cheers

    Haem,
    Yes, your observations are correct. The memory leak effect seems to depend a little bit on the type of structure of the documents, but it is there. I had an automated process opening XML files for full books which crashed FrameMaker 8 with every third or fourth book. The good news: FrameMaker 9 solved that problem.
    - Michael

  • Is there a linear equations VI thatI can use for inputting the coefficients with variables attached to them? Thank you.

    Is there a linear equation VI that I can use for inputting the coefficients with variables attached to them? I am currently studying elec engineering and am in the thick of transient analysis. It is very time consuming figuring the mesh and nodal analysis in the transform domain. With 3 branches in a mesh analysis the resistors, inductors and capacitors are represented with variable s in them. I need to determine in the transform domain then convert to the time domain. One equation goes like this: (3+2s+1/4s)i1s - (2s)i2s - (1/4s)i3s = 6/s -6. The other equations are similar. I must keep the variable s in the equation and solve it with s in the result. I made several VIs for determining simultaneous linear equations some for complex numbers and they work great. This one has me a little stumped. I thinking that maybe Labview doesn't have a VI for this. The other VIs were fine because you just plugged in the numbers and ran the VI and got your result. Any VIs that do LaPlace transform operations?
    Thank you.
    Tom

    Hello Tom,
    You can find a VI for doing Laplace transforms in Functions->Analyze->Signal Processing->Frequency Domain (this VI is only available in the Full and Professional versions).
    You may also find the following tutorial of help in working with linear systems in LabVIEW.
    Linear Systems in LabVIEW
    Keep up to date on the latest PXI news at twitter.com/pxi

  • Linear Equation in SAP

    Hi Gurus,
    I got a requirement to develop Simulator Process in which we are using Linear Equation for solving.
    Linear Equation is wat we studied in School days...
    3x + 2y + 7z = 20.  (meaning: 20 is my target.. i want to know how much of x, y, z is added to achieve my target)
    5x + 6y + 6z = 50.
    6x + 2y + 2z = 10.
    i want to know the values of x, y, z(this variable will be up to 10 also).
    I know to solve manually.
    Can you tell me is ther any function module to acheive this...
    Or any easy way to develop in SAP?????
    Thanks n Regards
    Aravindh Mani

    Hi,
    I dont think there is a standard FM for this. You can better try to code the logic manually for this.
    Regards,
    Vik

  • Solving Differential Equation - getting strange results.

    Hi, i am using LabView to model the mathematic pendulum which comes down to solving the quation numericaly:
    where w is constant and 0 is an angle between the pendulum's cord and the vertical which i want to plot against time. I built this very simple model to solve this equation (this is what our teacher showed us) [x is the angle]
    and this is what i get:
    "fi" is the starting angle. The result is a cosine , as it is to be expected, with the right period, but why the amplitude is so low? Am i missing something here? No matter how i change the initial value, the amplitude is always 5 oders of magnitude lower. It wouldnt be a problem, since what we are required is to solve the equation, but when i want to factor that in the equation above 0 should be sin0 , the problem arises - sinx for so low x , is...x. So my questions are:
    - am i setting the initial conditions wrong?
    - has the value of dt anything to do with it?
    - is the method correct?
    - am i clueless? 
    A week ago i had no idea what LabView is. We were all thrown into the deep water, we were shown the method, but were not teached how the LabView works,so please, be kind.
    Thank You in advance .
    Attachments:
    pendulum.vi ‏14 KB

    Hello;
    Noise is a difficult issue to advise about.
    There are some things you can try, but the result will depend on different factors, such as, environment, lenght of cables, equipment on vicinity, etc.
    Anyways, you can try to hook up a BIAS resistor in between the ch- and AIGND on your BNC device. That resistor will bleed out the common voltage current and help on noise balancing. Another thing you can try is to hook up a simple RC low pass filter at the analog input. That might help to get rid of that noise.
    I'm also attaching an App Note that talks about Noise and some ways to get around it.
    Hope this helps.
    Filipe A.
    Applications Engineer
    National Instruments
    Attachments:
    Field_Wiring_and_Noise_Considerations.zip ‏196 KB

  • 24 bit histogramming (memory issues)

    Hi All,
              I'm attempting to create a 24 bit histogram of code for a 24 bit ADC. For later processing of this data I require all the bins to be stored, i.e. I have found that the Histogram VI in the functions pallette will not work for 24 bit data, I'm on LV 2010 but on 32bit WinXP, (with ~4G of RAM)
        The histogram vi runs into memory issues with my data.
      Even at a more basic level if I try init a blank array with 2^24 elements of U32 (and so 16M elements in the array) each index of the array represents an adc code and is incremented each time it is aquired. when I initialise and begin using such an array I get "out of Memory" errors. I would have thought that 16M elements was not a huge dataset and it would not be problematic to find 16M of contiguous memory with the application's 2G allocation by the OS.
        I was wondering if anyone had a suitable explaination of this or could suggest a way around this issue.
        Thanks,
         dsone1
    Solved!
    Go to Solution.

    I would change a couple of things:
    Since the shift register is uninitialized, memory use will be low until the first time the VI is run in init mode, at which time the memory needs to be allocated at runtime. It is better to allocate at compile time as in my modification.
    I would recommend a globally initialized feedback node, eliminating the while loop. It also ensures an initialized array if the user forgets to run init first. (implementing the same with a shift register would also need the "first run?" primitive).
    I would move the init code before the histogram code, allowing to init and compute a new histogram concurrently.
    Here is a rough draft
    LabVIEW Champion . Do more with less code and in less time .
    Attachments:
    build_histogram_CA.vi ‏21 KB
    histogrammer.png ‏5 KB

  • TO NOKIA SUPPORT: Application Manager Memory issue...

    There is a STRANGE memory issue with Application Manager and Nokia N80 device. It's present in both N80 and N80IE and tried with Firmware versions from v3.x to lastest v4.x one.
    When you have installed many programs, tested with more than 150 counting SIS plus JAVA, Application Manager gets unusuable reporting continuosly "Memory Full - Please close apps..." and you can't do anything with it...
    This issue happens even after starting device without any resident app loaded and 14 Mbytes of free RAM so I think this is a limited memory issue available for Application Manager
    A curious thing is that you can Run and Enter Application Manager and installed App list is showed but not complete, it list all the SIS files installed (I think it start to list that type) and then the JAVA ones is cutted and dont appear the full list of installed apps of this type.
    Another curious thing is that if you uninstall a SIS app and Run again Application Manager the list is filled with one more app of JAVA type so this sound like a MEMORY ISSUE or deliberating restricting number of app listed?
    Perhaps app listing could be stored in a temp file and partially loaded in pages so memory don't get overheaded... :-?
    Today with 1 or 2 GB memory cards, this is a SERIOUS ISSUE.
    Please, could you confirm this and point me where to report this issue so it can be solved in future firmware updates?
    Many thanks in advance.

    So hope i.I'm preparing a bug report to post here.Maybe with our reports the new firmwares will be even better...if some Nokia guy is looking at what we're speaking
    Ever dreamed of earning money online without wasting a single cent?Now you can:
    http:// tinyurl.com/2pfgv2

  • Itunes not running properly - memory issue? - NEED HELP!

    I just bought a new ipod to work with my new PC. This PC is running a dual core @ 3.8ghz, w/ 3 ghz RAM. Itunes runs slow, tangling my PC and sometimes i get an error message pointing me to memory issues. The memory is properly installed, but itunes takes up to 80% of my processor when ripping and 50% when idle. This DEFINATLEY should not b the case. What should i do?
    I have reinstalled and repaired itunes several times with no improved results.

    What you need to do is goto the PC amkers site and see if they offer any patches/updates to solve this issue, or better yet just install all updates they offer.
    When you uninstall iTUnes you need to uninstall quicktime too. iTUnes uses quicktimes engine to play audio and video. Quicktime can be the root of issues in iTUnes, try opening quicktime, playing something in it and see if you get any error messages or it hogs system resoruces. Try uninstalling iTUnes AND quicktime, disable antivirus and reinstall iTUnes (Which Will reinstall quicktime too)
    Some malware "Piggybacks" on iTUnes or causes it to go haywire so might scan for malware with your adware program or Ewido http://www.ewido.net/en/download/

Maybe you are looking for

  • My iCloud password is not working on my ipad, my iCloud password is not working on my ipad

    says sign into icloud enter password. i enter password and it does not work i try again it has the option for reset and still will not let me reset password although password is correct beacuse it is used on my computer and iphone

  • How to create a String with comma ?

    Hi All, I have a table with 10 records(employee name) and i have to make a string with comma delimiter and at the end with "." Can anybody tell me how to write a Java program for this ? Thanks in advance.

  • 8703e can't file messages in folders

    I have had my 8703e for a year and love the ability to access my business email from anywhere and access my email folders to organize emails.  Last week I suddenly could not file any emails in the folders.  I can see the folders but when I hit file,

  • CSS: background is missing on live site

    I've just relaunched a new version of www.modbury-heritage.co.uk and the background image is missing in my masthead in IE and FF. However when I preview in either browser locally, it shows up fine! Please could someone cast their eye over the site an

  • Backup disk contents wiped and name changed

    I have a LaCie Starck which I use - and have happily used for several years - as my Time Machine backup disk.  Recently it has mysteriously had all its contents wiped and has changed its name to "My Book".  What has happened?  How do I restore its pr