Distance along an ellipse arc (nD Nonlinear System Solver (VI).vi)

I'm hoping to get some help solving an issue I've come up against. I appreciate that what I'm asking requires some of your time, so I've tried hard to do my due diligence before posting here. I'll really appreciate any help I can get. I'm using LabVIEW 2014 Professional on Windows 7.
I've stripped away all the details of the specific application I'm working on and tried hard to isolate just the issue that is causing me difficulties.
I've posed the problem below and I attached some investigation code (sorry, there is quite a bit) that represents my current solution (with the issue).
Problem: Given an ellipse (with a major and a minor axis and a frame of reference), a distance to travel and any point on the ellipse, calculate the end point on the ellipse where the elliptical arc length between the two points equals the given distance to travel.
I'll restate the problem, but with physical values. Given an ellipse, centered on the origin, with axes of 10mm and 8mm, and a starting point (5mm, 0mm); what is the end point on the ellipse after travelling 1 mm along the ellipse?
This initially seemed like a simple calculation (and it is for a circle), but for an ellipse, the math turns out to be somewhat more complicated and requires numerical computation.
Issue: I was given some python code that solves this problem and embarked on a LabVIEW solution. The python code uses the function optimize.fsolve from the scipy library to solve one aspect of the problem. I'm not too familiar with the LabVIEW VIs available to do the equivalent, but settled on "LabVIEW 2014\vi.lib\gmath\zero.llb\nD Nonlinear System Solver (VI).vi" (my code still has other options disabled in the code). When I use this solver VI, I do not always get the same answer from this VI. Sometimes it finds one root and sometimes two. For points separated by less than half the circumference of the ellipse, there should always be 2 roots (one in the clock-wise and one in the counter clock-wise direction). Any ideas why the solver does not always return 2 roots?
Current Solution: My investigation VI takes two points on an ellipse (defined by a start angle and end angle) and calculates the distance between them along the ellipse. Then, I take the start point and the distance and try to calculate the end angle (which I can use to find the end point). Run once, it usually finds the right answer, but run 100 times it often returns the answer 19. I should mention that I'm not 100% positive there are no issues with the code used to support this calculation and I'm open to any suggested changes or improvements, but the issue currently causing problems is the inconsistent operation of the solver VI.
Again, I appreciate this is long and thank you for reading this far; I hope you find this as fun a problem as I do!
Chris
Solved!
Go to Solution.
Attachments:
NI Forums.zip ‏265 KB

Hello Mark,
Thanks for your reply, I was concerned that I had sent up an air ball on this one! And thank you for taking the time to review the code.
You are correct, I am having an issue with the results of the nD Nonlinear System Solver (VI).vi. And that is a good poiint you raise, regarding the choice of the starting points. I'm not intending to use random values, I think I'm using a number very close to the start angle (in this case 20.001 degrees) as a start and 2pi (or 360 degrees) as the end. When I read the description of the start and end from the documentation:
Start is an array describing the left corner of the n-dimension interval. The randomly chosen start points of the zero-finding algorithm can be found in the n-dimensional rectangle spanned by Start and End.
End is an array describing the right corner of the n-dimension interval. The randomly chosen start points of the zero-finding algorithm can be found in the n-dimensional rectangle spanned by Start and End.
I have to admit I don't *understand* what this means and I am currently guessing for the choices of start and end. I will think on this some more and review your links.
As far as my final goal, I'm going to use this code I shared for generating an ellipitical motion profile on the PC to send to a cRIO and have executed on a FPGA.
I'll report back after I work on this some more, but if you have some more insights, please share.
Chris
(BTW, I have an open support item for this #7444649 and it was suggested I also post on the forums)

Similar Messages

  • About the Nonlinear System Solver

    Hi, I am trying to solve a nonlinear system that is a little complicated to get the solution manually:
    B*Sin(P)/(2*sin(B)*b)=0
    B*Sin(W)/(2*sin(A)*b)=0
    A+B+P+W-180=0
    I tried to use the Nonlinear System Solver entering the formulas and
    all I get is an error code -23001 (Error -23001 occurred at an
    unidentified location Possible reason(s):
    Analysis:  Syntax error of parser. "
    I don't know what I am doing wrong, I am doing it similarly to the
    attached VI, with my own equations and controls. I even tried to change
    the equations so I would delete the "sin" (sine), just to make a test
    (about syntax and the solver not understanding that command?), and I
    got the same error.
    Help is much appreciated,
    Thanks

    Also remember that the argument to trigonometric functions must be in radians here.
    Are you sure that A and Beta are not [0<A<π/2], [0<Beta<π/2].
    How about the "180" in the last formula. Shouldn't it be π instead?
    Is b 83 degrees or just a constant of 82?
    LabVIEW Champion . Do more with less code and in less time .

  • How to draw a line(shortest distance)  between two ellipse using SWING

    how to draw a line(should be shortest distance) between two ellipse using SWING
    any help will be appreciated
    regards

    import java.awt.*;
    import java.awt.event.*;
    import java.awt.geom.*;
    import javax.swing.*;
    import javax.swing.event.MouseInputAdapter;
    public class ELine extends JPanel {
        Ellipse2D.Double red = new Ellipse2D.Double(150,110,75,165);
        Ellipse2D.Double blue = new Ellipse2D.Double(150,50,100,50);
        Line2D.Double line = new Line2D.Double();
        protected void paintComponent(Graphics g) {
            super.paintComponent(g);
            Graphics2D g2 = (Graphics2D)g;
            g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
                                RenderingHints.VALUE_ANTIALIAS_ON);
            g2.setPaint(Color.green.darker());
            g2.draw(line);
            g2.setPaint(Color.blue);
            g2.draw(blue);
            g2.setPaint(Color.red);
            g2.draw(red);
        private void connect() {
            double flatness = 0.01;
            PathIterator pit = blue.getPathIterator(null, flatness);
            double[] coords = new double[2];
            double x1 = 0, y1 = 0, x2 = 0, y2 = 0;
            double min = Double.MAX_VALUE;
            while(!pit.isDone()) {
                int type = pit.currentSegment(coords);
                switch(type) {
                    case PathIterator.SEG_MOVETO:
                    case PathIterator.SEG_LINETO:
                        Point2D.Double p = getClosestPoint(coords[0], coords[1]);
                        double dist = p.distance(coords[0], coords[1]);
                        if(dist < min) {
                            min = dist;
                            x1 = coords[0];
                            y1 = coords[1];
                            x2 = p.x;
                            y2 = p.y;
                        break;
                    case PathIterator.SEG_CLOSE:
                        break;
                    default:
                        System.out.println("blue type: " + type);
                pit.next();
            line.setLine(x1, y1, x2, y2);
        private Point2D.Double getClosestPoint(double x, double y) {
            double flatness = 0.01;
            PathIterator pit = red.getPathIterator(null, flatness);
            double[] coords = new double[2];
            Point2D.Double p = new Point2D.Double();
            double min = Double.MAX_VALUE;
            while(!pit.isDone()) {
                int type = pit.currentSegment(coords);
                switch(type) {
                    case PathIterator.SEG_MOVETO:
                    case PathIterator.SEG_LINETO:
                        double dist = Point2D.distance(x, y, coords[0], coords[1]);
                        if(dist < min) {
                            min = dist;
                            p.setLocation(coords[0], coords[1]);
                        break;
                    case PathIterator.SEG_CLOSE:
                        break;
                    default:
                        System.out.println("red type: " + type);
                pit.next();
            return p;
        public static void main(String[] args) {
            final ELine test = new ELine();
            test.addMouseListener(test.mia);
            test.addMouseMotionListener(test.mia);
            JFrame f = new JFrame();
            f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            f.add(test);
            f.setSize(400,400);
            f.setLocation(200,200);
            f.setVisible(true);
            EventQueue.invokeLater(new Runnable() {
                public void run() {
                    Graphics g = test.getGraphics();
                    g.drawString("drag me", 175, 80);
                    g.dispose();
        private MouseInputAdapter mia = new MouseInputAdapter() {
            Point2D.Double offset = new Point2D.Double();
            boolean dragging = false;
            public void mousePressed(MouseEvent e) {
                Point p = e.getPoint();
                if(blue.contains(p)) {
                    offset.x = p.x - blue.x;
                    offset.y = p.y - blue.y;
                    dragging = true;
            public void mouseReleased(MouseEvent e) {
                dragging = false;
            public void mouseDragged(MouseEvent e) {
                if(dragging) {
                    double x = e.getX() - offset.x;
                    double y = e.getY() - offset.y;
                    blue.setFrame(x, y, blue.width, blue.height);
                    connect();
                    repaint();
    }

  • Nonlinear system identifica​tion using neural network (black box model)

     Hello, my thesis work is based on "suface EMG- angular acceleration modeling using different system identification techniques"......can anyone help me in doing nonlinear system identification using neural network...

    Well, look at that.  I actually had this problem before--and SOLVED it before!  [facepalm]  I'd forgotten all about it....
    https://bbs.archlinux.org/viewtopic.php?id=140151
    I just added "vmalloc=256" to my linux line, and X started right up!
    [edit] Well, mythtv had the solution, as well:  http://www.mythtv.org/wiki/Common_Probl … _too_small
    Last edited by wilberfan (2012-11-05 19:38:06)

  • Xperia arc s, no system upgrade..

    no system update on my xperia arc s, my current version is android 2.3, how can i upgrade to android 4.0?

    One way of doing it manually is below
    Guide to create your own generic .ftf firmware file for your country
    The Flashtool link in that guide is old so use the new one here
    Follow this guide to manually flash but use the .ftf you created above and not the one listed - Everything else is the same for all Xperia devices
    For a successful technology, reality must take precedence over public relations, for Nature cannot be fooled.   Richard P. Feynman

  • Finit-ARC: boot your system in 4 seconds

    Hi people! I present the reimplementation of FAST-INIT for Archlinux.
    Fast-init is an original init system written in C from Xandros Linux. I did a reimplementation of fast-init and I called it FINIT-ARC.
    Finit-arc can works with all computers and all filesystem types. With it and static kernel I can boot my system in about 3,5 seconds from grub to console login.
    X for me take only 5 seconds. Then in 8 seconds I'm fully operative on my desktop.
    Installation
    Actually finit-arc it's in BETA version and it is present in AUR.
    1 - http://aur.archlinux.org/packages.php?ID=25159
    FOR TESTERS finit-arc-git is avaiable on AUR
    http://aur.archlinux.org/packages.php?ID=26314
    2 - Insert init=/sbin/finit-arc as kernel parameter in /boot/grub/menu.lst
    3 - After installation you must do a boot with traditional init system of Archlinux, and after you can boot with finit-arc. The first boot could be slow.
    Important!
    Finit-arc doesn't support UUIDs. Then you must replace UUIDs with /dev/sdx devices in /boot/grub/menu.lst and /etc/fstab.
    Known Problems
    1) Error width pcspkr on kernel -ARCH
    do !pcspkr into MODULES of rc.conf
    2) Wrong clock time
    3) DBUS or other daemon don't start
    Before start finit-arc you must do a boot with traditional Archlinux init system
    4) Fam and portmap don't stop
    You can use GAMIN instead fam
    5) Network doesn't work
    Insert into MODULES your ethernet module in the first position. Insert into DAEMONS your network daemon (network or net-profiles) in the latest position.
    Logging finit-arc with bootchart
    Edit /sbin/bootchartd and replace the line init="/sbin/init" with init="/sbin/finit-arc"
    Add on your kernel line init=/sbin/bootchartd as parameter (remove init=/sbin/finit-arc)
    Bug reports and testers are welcome
    Last edited by adriano (2009-05-07 20:19:37)

    ohhhhhhhh yeaah |-.-|
    yet another kernel panic
    Kinit: Mounted root (ext4 filesystem) read only
    Finit-ARC - beta 0.2
    finit-arc[1] general protection ip:7fd5a36c0706 sp: 7fffabbb67e8 error:0 in libc-2.9.50[7fd5a3646000+14a000]
    kernel panic - not syncing: Attempted to kill init!
    I install via yaourt finit-arc, after modified my /boot/grub/menu.lst adding the second entry like this:
    # (0) Arch Linux
    title Arch Linux
    root (hd0,6)
    kernel /vmlinuz26 root=/dev/disk/by-uuid/a20131af-7d82-4b29-b0b8-6d23022659c6 ro vga=795
    initrd /kernel26.img
    # (1) Arch Linux without UUID
    title Arch Linux with FINIT-ARC
    root (hd0,6)
    kernel /vmlinuz26 root=/dev/sda9 ro init=/sbin/finit-arc vga=795
    initrd /kernel26.img
    Entry 0 for my normal boot, and entry 1 for finit-arc.
    Next delete all UUID from menu.lst and fstab:
    # /etc/fstab: static file system information
    # <file system> <dir> <type> <options> <dump> <pass>
    none /dev/pts devpts defaults 0 0
    none /dev/shm tmpfs defaults 0 0
    /dev/sda9 / ext4 defaults 0 1
    /dev/sda10 /home ext4 defaults 0 1
    /dev/sda7 /boot ext2 defaults 0 1
    /dev/sda8 swap swap defaults 0 0
    /dev/sda6 /mnt/data ext4 defaults 0 2
    # USB en virtualbox
    none /proc/bus/usb usbfs auto,busgid=108,busmode=0775,devgid=108,devmode=0664 0 0
    and editing /etc/finittab to start kdm:
    #Command that you want execute after boot
    #uncomment it for X login
    #you must set YOURUSERNAME
    #level:/bin/su YOURUSERNAME -l -c "/bin/bash --login -c xinit >/dev/null 2>&1"
    #level:/usr/sbin/gdm --nodaemon
    #level:/usr/bin/xdm -nodaemon
    level:/usr/bin/kdm -nodaemon
    #level:/usr/bin/slim
    After all, reboot my system with the entry 0 from grub and after reboot with entry 1...
    Sorry to repeat, but excuse my poor English
    Last edited by takedown (2009-05-06 19:04:15)

  • Nonlinear system

    Hi all. I'm trying to solve non-linear equation, but I can't get any result. 
    Can you say where is my mistake?
    Attachments:
    Nonlinear Equation.vi ‏11 KB

    To understand the nature of your problem, it is instructive to consider the "improvements" made to that VI in later versions.  Instead of specifying a starting point, you now specify upper and lower limits for each variable.  The VI then chooses a random starting point in that region.  You can choose how many starting points to try.  In cases like yours where the results are very sensitive to the starting point, this is a big help.
    To get a result on my machine using the old VI I had to:
    1) Change , to ., this depends on the system formatt, there is a subVI which converts the sqrt(2) to a string and then determines the system radix separator.  If you use the comma you should be fine.
    2) Enter [500000, 0.001] into the Start Array for the starting point.
    3) Change accuracy to 8e-4 and h to 1e-7. 
    In general though, the result will be very, very dependent on the starting point, and closer won't always help.
    I would suggest either using the new version, or improvising.  You can achieve similar results by specifying bounds for each variable, choosing random values within each interval for a starting point, then testing for a result. 

  • Compiling Pacman on Debian System [SOLVED]

    Hi,
    I am trying to compile pacman on a Debian system. I get the following error:
    /bin/sh ../../libtool --tag=CC --mode=compile gcc -std=gnu99 -DLOCALEDIR=\"/usr/share/locale\" -DHAVE_CONFIG_H -I. -I../.. -pedantic -D_GNU_SOURCE -fvisibility=internal -g -O2 -Wall -MT package.lo -MD -MP -MF .deps/package.Tpo -c -o package.lo package.c
    gcc -std=gnu99 -DLOCALEDIR=\"/usr/share/locale\" -DHAVE_CONFIG_H -I. -I../.. -pedantic -D_GNU_SOURCE -fvisibility=internal -g -O2 -Wall -MT package.lo -MD -MP -MF .deps/package.Tpo -c package.c -fPIC -DPIC -o .libs/package.o
    package.c: In function 'alpm_pkg_changelog_open':
    package.c:529: warning: implicit declaration of function 'archive_read_open_filename'
    package.c: In function 'alpm_pkg_changelog_close':
    package.c:597: error: void value not ignored as it ought to be
    make[1]: *** [package.lo] Error 1
    make[1]: Leaving directory `/root/pacman-3.1.2/lib/libalpm'
    make: *** [all-recursive] Error 1
    I tried a couple different versions of pacman and I always get this error. What could this be?
    Thanks!
    nagoola
    Last edited by nagoola (2008-05-14 09:55:05)

    It looks like you need libarchive > 2.  See this part of archive.c in v2.4.17
    #if ARCHIVE_API_VERSION > 1
    int archive_read_finish(struct archive *);
    #else
    /* Temporarily allow library to compile with either 1.x or 2.0 API. */
    /* Erroneously declared to return void in libarchive 1.x */
    void archive_read_finish(struct archive *);
    #endif
    So there was a change in the declaration of the function used on the offending line between libarchive versions.

  • Neo2 "Error Loading Operating System" solved

    hi, i've been struggling with this frikkin error for a while now and i've finally figured it out, after reading a gazillion posts and not finding an answer i thought i should post mine here for anyone who gets the same problem
    my setup: msi k8n neo2 platinum, amd 64 3500, some ram and vid card, 200GB SATA drive
    PLUG YOUR SATA DRIVE INTO SATA3or4 if you only have one or two, SATA1and2 are unstable(for ocing) and just dont work for some folks
    now you boot from windows xp cd, everything seems to be goin fine, pc reboots and BHAM! error loading operating system... ?!
    well don't go and enable RAID in your bios (unless you really want to use RAID) just goto the bios --> integrated peripherals --> IDE function setup
    now look for SATA1/SATA2 DMA transfer and SATA3/SATA4 DMA transfer, enable these, or at least the one that you're using
    reboot, boot from windows cd, quick format the partition you want to install windows on, do the windows thing and reboot, viola! your windows installation should now be booting
    if that doesn't solve your problem then i'm a greased weasel!   
    ps. another solution (that i used the first time round but annoyed me cos i'm really really obsessive about these things) is to run partition magic and clear the drive of partitions, then make a primary partition and a logical drive within that partition and set it to active, this worked for me
    xcept i only use 1 HDD with two partitions, a smaller one that gets formatted all the time and off of which i run windows and a larger one that i keep all my stuff on, the trick was the put the booting partition at the end of the disk and not at the beginning like you usually would do, it's got something to do with the 1024 cylinder boundary but i don't understand that tho...

    I had the same problem, easy solution, use Nforce 6.37 beta driver pack. and It will work OK! A way to enter the system is:
    That is a probelm with SATA drivers, you may also install WIN XP making a disk for SATA driver from the Nforce 6.37 drivers in IDE\WINXP
    Press F8,
    Wait about 10 Secs.
    Enter Normally, It may boot.
    Regards
    You may connect the SATA drive in either 1 - 2 or 3 - 4 Sata ports It will work OK, do not use DMA transfer it will make the Disk slower

  • Will re-install of System Solve "Getting "try again" when installing..."

    Have yet to solve "Getting "try again" when installing software..." posted yesterday. Also note inability to perform Safe Boot. Will re-installation of System software (Tiger) restore the functions lost?
    If I'm obliged to do this, any tips on how to: 1) preserve my Internet settings, including Bookmarks; 2)saved (not yet deleted) emails; and (3) my Address book? Where are they? how do I identify these files? Can I do some sort of backup before I go to Install?

    For the convenience of others, here is the list to the other topic:
    http://discussions.apple.com/message.jspa?messageID=9414774#9414774
    The basic problem appears to be disk directory corruption. It is very unlikely reinstalling the OS will cure that since you also appear to want to preserve all your files. In fact, reinstalling the OS might create more damage to your files since the computer has lost track of some of them and might just overwrite them not knowing they are there.
    You either need to try to repair the directory using Diskwarrior (since DU apparently failed), or you need to wipe the drive (and all your files) then reinstall your OS. If doing the second option you should, of course, back up your data files first. However I can't help but feel when people mention backing up a damaged directory that your backups may be incomplete since, again, the computer has lost track of some parts of the files and may not make a complete copy. If I was in your situation, and could afford it, I'd go for getting a copy of Diskwarrior so you can actually repair your drive. If I couldn't afford it I would back up my data files, wipe the drive, then reinstall everything again from scratch, then copy the data files back on and keep my fingers crossed that none of them was part of the corruption.

  • Help with partitions and file systems [SOLVED]

    Hi, i have been using Ubuntu for a while, and now i want to move to Arch. I've probed it in a PC and i like so i want to make que change.
    But, before installing Arch, I have 2 doubts. I red the beginners guide and also the instalation guide. There it says that if better to have diferents partitions for  /, /boot/, /home, /usr, /var, y /tmp
    Usually, i alwayes used something like this:
        * /boot (32megas)
        * /swap (512 megas)
        * /root (6 a 8 gigas)
        * /home (80 gigas aprox)
    It's really better to also have partitions for /var, /usr y /tmp? o some of them? and, in that case, wich size should i give them? because i don't want to make them too small, but i don't want to waste disk space neither.
    Adn that takes me to my second question, wich filesystem is better for each partitionn? in many places, i read taht JFS its good for /var or that XFS if better for /home and big files
    I thinked to use something like this:
        * /boot (ext2)
        * / (JFS)
        * swap
        * /home (XFS)
    Is a good design? or should i use other filesystem like reiserfs, etc... and for /var, /usr and /tmp partition, wich one should i use?
    Thank you
    Ps: This Pc is gonna be a desktop pc
    Ps2: sorry for my bad english. it is not my real lenguage
    Reason of edit: added the swap partition. I forgot it
    Last edited by Thalskarth (2008-12-21 20:11:00)

    thanks everybody for the help,
    kaola_linux wrote:@Thalskarth - it's better to have /var especially if you're using ext3 or other filesystems which was designed for larger files as your partition for /home and /.  Having a seperate partition for /var would be nice (backup purposes and reinstalling without downloading the entire package whole over again). 5gb would be sufficient for your /var, anyway you can always resize it to your needs.
    so, a 5gb partition in reiserfs would be OK for a /var
    Inxsible wrote:
    Lot of people also use XFS which is known to have better performance with huge files. I think EXT3 offers a good balance...because I am never sure whether my home partition will have all huge files or not..same with my external drive...so i just use EXT3
    If you have a specific partition for movies or some video/audio editing that you do..you may wanna consider XFS too. I don't do all that...so I have never used XFS. I wouldn't know the exact performance difference between ext3 and XFS.
    Yes, in many places i red that XFS is better for big files. But i couldn't fine wich is the meaning of "big file". Does it mean a 200 mg file? or a 4.4gb one??
    the same applies to reiserFs, what is a small file? a 1mg one or a 4kb one?
    I have alwayes used ext3, i thinked in XFS and JFS just to give them a try.
    amranu wrote:I have no idea about better filesystems, all my partitions are ext3 (soon to be ext4)
    Inxsible wrote:One thing that makes me wanna keep EXT3 is that EXT4 is coming out (soon?) and you can upgrade from 3 to 4 without having to reformat and having to make backups of your current data.
    really is cominf soon? i didn't think in ext4 beacuse many places said that was in development for many years... meybe they were a bit out-of-date
    Edit: i search in the wiki and it says that since 11 october 2008, ext4 is "stable" and is been included since kernel 2.6.28 as stable realase, is to early to prove it? or it better to wait a while??
    thanks.
    and, does anyone try the JFS one?
    Last edited by Thalskarth (2008-12-03 00:14:56)

  • Time changes falsely on dual boot system[SOLVED]

    Hi, I have installed arch over my xp installation.  Everytime I login to one of them, my time always changes both on arch and xp. If I would change my time on xp, the time on my arch upon booting it changes also to a wrong time either late or advance...:(  Is there any way to stop this?
    Thanks in advance
    Last edited by kaola_linux (2009-03-28 03:08:38)

    fukawi2 wrote:Windows stores time in the hardware as localtime. You've probably got rc.conf to store it as UTC. Change rc.conf to store it as localtime and you should be right
    You were right, it was set to HARDWARECLOCK="UTC"...Changing it to localtime did the trick!!!:D Thank you so much..:)
    Thanks for all the replies
    Last edited by kaola_linux (2009-03-25 07:45:09)

  • Today update broke the system[SOLVED]

    Hello,
    I did my regular update today that went fine, but after reboot I got a black screen. The bootup starts as regular and goes on for a while but somewhere in the middle it stops and that's all, black screen.
    I updated the kernel, xorg, ati and input devices, qt as far as I remember.
    Now, I don't know what to do.
    Would appreciate if any knowledgeable person could give me ideas what to do next.
    Thanks,
    jmak
    Last edited by jmak (2010-09-29 22:16:35)

    The inittab already looked the same as yours. I didn't have to change anything.
    This is the pacman.log update:
    [2010-09-29 15:28] ==> SUCCESS
    [2010-09-29 15:28] upgraded kernel26 (2.6.35.6-1 -> 2.6.35.7-1)
    [2010-09-29 15:28] installed glproto (1.4.12-1)
    [2010-09-29 15:28] upgraded mesa (7.8.2-1 -> 7.8.2-3)
    [2010-09-29 15:28] upgraded nss (3.12.7-1 -> 3.12.8-1)
    [2010-09-29 15:28] upgraded qt (4.6.3-1 -> 4.7.0-2)
    [2010-09-29 15:28] upgraded xf86-input-evdev (2.4.0-2 -> 2.5.0-1)
    [2010-09-29 15:28] upgraded xf86-input-keyboard (1.4.0-2 -> 1.4.0-3)
    [2010-09-29 15:28] upgraded xf86-input-mouse (1.5.0-2 -> 1.6.0-1)
    [2010-09-29 15:28] upgraded xf86-video-ati (6.13.1-1 -> 6.13.2-1)
    [2010-09-29 15:28] upgraded xf86-video-vesa (2.3.0-2 -> 2.3.0-3)
    [2010-09-29 15:28] upgraded xkeyboard-config (1.8-1 -> 1.9-1)
    [2010-09-29 15:28] installed xorg-server-common (1.9.0-1)
    [2010-09-29 15:28] upgraded xorg-server (1.8.1.902-1 -> 1.9.0-1)
    [2010-09-29 15:28] upgraded xterm (261-1 -> 262-1)
    [2010-09-29 15:29] upgraded xulrunner (1.9.2.10-1 -> 1.9.2.10-2)

  • System calibration as a solution of nonlinear equations

    Good day,
    The challenge of the day is to provide a calibration for an accelerometer output, expressed as a binary value.
    I have an accelerometer whose operating range can be set (±2g, ±4g, ±8g).  The accelerometer itself then generates a binary value at 16bit resolution.  Hence, that 2^16 value (0-65535) represents an acceleration whose value depends on the ranges we set.
    So, we make the asumption that the response is linear, allowing us to claim:
    Acceleration = Scale x Binary Value + Offset
    I have three axes worth of data, accelerometer A, B and C.  If I hold the accelerometer stationary, the only thing I should be reading is the accleration due to gravity, g.  This gets me the relationship
    (A)^2 + (B)^2 + (C)^2 = g^2
    since, in any orientation, the magnitude of the combination of all three acceleration readings should be the acceleration due to gravity (and that shouldn't change no matter which way you happen to be pointing the accelerometer).
    What this gives me, then, is a nonlinear relationship of 6 variables (three scale factors and three offsets). I should be able to take six measurements in arbitrary orientations, which will give me six output values of each acclerometer.  I should then be able to pull out the scale factors and offsets for each accelerometer, either in terms of g or relating to what I think g is.
    My question, then, is how can I get Labview to do this?  I'm see that there's a Solve Linear Equations tool, but I'm not seeing one appropriate for the nonlinear case.  I'm also quite comfortable believing I'm just missing it :-)
    Thanks!
    Solved!
    Go to Solution.

    OK, so I've dug a bit deeper and believe that the Nonlinear System Solver is the appropriate starting point, as found in the example file Equation Explorer.vi.
    In that example, I can define a system of nonlinear equations and the vi should spit out the solutions (zeros) of the variables.  I got it to work with some arbitrary test data generated through excel.
    Now, I'm moving on to the next level of complexity in the model, and have derailed m'self again..
    The simulated device:
    a three axis accelerometer, each of which would generate an output of the form Voltage = Scale * Acceleration + Offset. 
    In a perfect world, the only accleration I'll be seeing is gravity (9.8 m/s^2), and I set that gravity in a random direction (indicating the accelerometer is at an arbitrary orientation).  Knowing that orientation, I then calculated what the components of the acceleration would be along all three axes, and then applied values for Scale and Offet to deterine what the equivalent voltage reading off the accelerometers would be.
    So now I start the long way home again.  From a Labview perspective, I know that I have three voltage outputs which would feed into a known relationship
    ((Vx - OffsetX)/ScaleX)^2 + ((Vy - OffsetY)/ScaleY)^2 + ((Vz - OffsetZ)/ScaleZ)^2 - 96.04 = 0
    where the 96.04 comes from g^2.  This is my nonlinear equation with six unknowns in it and three constants.
    Since I have six unknowns, I need six equations, which I can get by rerunning my simulation, right? 
    I put six generated "voltages" (Vx, Vy, Vz) into this form using my expected values for Scale and Offset, and run the vi. However, the vi returns nothing.  I know there should be a solution vecotr, because that's what I used to created the simulated data.  Is there something I'm overlooking?
    Attachments:
    Calibration.png ‏74 KB

  • System Calibration vs Device Calibration

    Hi Guys,
    Looking for some experiences/opinions on an approach we are looking to take on a measurement system.
    We are using compactRIOs which are buit into a system which is installed in a quite restrictive environment and we are concerned will calibration. To retrieve the measurement cards and replace them will be a costly exercise.
    We are considering a concept of using a portable calibration unit to perform a system calibration on site. This would involve putting in known values and notifying the software which can calculate new scaling coefficients to use going foward.
    I believe this should account for everything that calibrating the devices would (and more). Assuming this is done at regular intervals and the devices calibration drift is roughly linear there should be no need to calibrate them seperately.
    Have you had experience of this method? Would you be confident in this for new systems?
    Cheers,
    James

    OK, so I've dug a bit deeper and believe that the Nonlinear System Solver is the appropriate starting point, as found in the example file Equation Explorer.vi.
    In that example, I can define a system of nonlinear equations and the vi should spit out the solutions (zeros) of the variables.  I got it to work with some arbitrary test data generated through excel.
    Now, I'm moving on to the next level of complexity in the model, and have derailed m'self again..
    The simulated device:
    a three axis accelerometer, each of which would generate an output of the form Voltage = Scale * Acceleration + Offset. 
    In a perfect world, the only accleration I'll be seeing is gravity (9.8 m/s^2), and I set that gravity in a random direction (indicating the accelerometer is at an arbitrary orientation).  Knowing that orientation, I then calculated what the components of the acceleration would be along all three axes, and then applied values for Scale and Offet to deterine what the equivalent voltage reading off the accelerometers would be.
    So now I start the long way home again.  From a Labview perspective, I know that I have three voltage outputs which would feed into a known relationship
    ((Vx - OffsetX)/ScaleX)^2 + ((Vy - OffsetY)/ScaleY)^2 + ((Vz - OffsetZ)/ScaleZ)^2 - 96.04 = 0
    where the 96.04 comes from g^2.  This is my nonlinear equation with six unknowns in it and three constants.
    Since I have six unknowns, I need six equations, which I can get by rerunning my simulation, right? 
    I put six generated "voltages" (Vx, Vy, Vz) into this form using my expected values for Scale and Offset, and run the vi. However, the vi returns nothing.  I know there should be a solution vecotr, because that's what I used to created the simulated data.  Is there something I'm overlooking?
    Attachments:
    Calibration.png ‏74 KB

Maybe you are looking for