An averaging filter that tightens depending on slope??

Hello all,
I have an application where a variable (DBL scalar) is shown in a graph to be bouncing above and below the target setpoint @ approx 1-5sec intervals.  In other words, if the setpoint is 1500lbs, the variable bounces between 1250 and 1750lbs, which is +/-250lbs and it does this bouncing @ approx 0.2 to 1 Hz.  The customer wants me to show the average instead of the real-time.... so the graph would show a horizontal line @ 1500lbs in the above example.  They dont want to see the ripple.  So, I pulled out the "Mean PtbyPt.vi" function and as long as I increase the sample length adequately it does exactly what my customer wants.  Heres my problem...  When the process starts or ends and the weight returns to zero lbs, the mean is very, very slow to respond.
Is there a way to make it "come into" and "out of" the target zone quickly, but filter the heck out of it when it is in the zone?  I am thinking of making my own function that would look @ the slope.  If the slope is less than a certain threshold, then the "Mean PtbyPt" sample length is long, but if the slope is greater than a certain threshold, then the "Mean PtbyPt" sample length is short.  Since I am just learning labview now and I have never used any of the filters or signal processing functions before, I feel like I might be recreating something that already exists?  Would any of these help me?  FIR, IIR, Chebyshev, Butterworth?  I am glad to learn all of these things, but to accomplish my task efficiently without chasing my tail, can anyone point me in a helpful direction?
Thank you very much for any input.
respectfully,
frenchy

Hai,
For the task like reducing jitter moving average serves good.  It's takes "number of points" to average.  A simple example is if you had a data set with 100 data points, the first value of the moving average might be the arithmetic mean (one simple type of average) of data points 1 through 25. The next value would be this simple average of data points 2 through 26, and so forth, until the final value, which would be the same simple average of data points 76 through 100.
The VI can be found in the following link: http://zone.ni.com/devzone/cda/epd/p/id/82
Hope this helps.
With regards,
JK
(Certified LabVIEW Developer)
Give Kudos for Good Answers, and Mark it a solution if your problem is solved.

Similar Messages

  • Can I set up a Content Filter that is Time/Date stamp dependent?

    My company would like to add an additional disclaimer text during Holidays where the company is closed.  It will say something like: "In observance of the 'XYZ' holiday, our offices will be closing at 3:00 PM on Friday, December........ and will reopen at 8:30 AM Monday.......".
    I was wondering if there is a way to set up conditions in an Outgoing content filter to only include that text if the email is sent between certain dates.
    This would allow me to set up the filters prior to the holidays and not have to manage them manually.
    I tried to do it via Exchange Transport rule, but I can't find a time/date dependent condition for the rules in Exchange.
    Thanks,
    Rachel    

    Hi Rachel,
    there is no way to archive this directly in content filters, an indirect way would be to use a message filter that adds an additional header (i.e. X-mas: true) during a specific period. For that, message filters provide the 'date' rule, i.e
    HolidayHeader:
    if ((date > '12/20/2012 13:00:00') and
         (date < '12/28/2012 12:00:00'))
    insert-header('X-mas', 'TRUE');
    You'd then create an outbound content filter matching on this header and inserting the specific footer if the header exists. Or, of course, you could have that action in the message filter already, however in that case you need additional conditions to make sure the rule applies on outbound messages only.
    Hope that helps,
    Andreas

  • Calculate Revenue's Percentage per Year, Month or any filter that is applied to the Dashboard in DAX using Excel PowerView.

    Hello folks,
    I am facing an odd issue here with a Dashboard Report in PowerView.
    The task is to display, in a table, a percentage of total (revenue) by any filter that the client wants. For instance, if the client selects the year (to be short) 2013, it should display for each Customer the percentage of total as Participation field.
    If the client select 2014, the data should change dinamically and the same if he selects both years.
    The issue that I am facing is that it calculates correctly (showing total of 100%) for either 2013 or 2014, but when I select both it sums up and shows 200% total, altering all other lines with the same behavior.
    So, basically what I need is to immitate a PARTITION BY analytic function, for instance, PARTITION BY YEAR and calculate the data over the total of the selected year only (if there are many years selected, the should be calculated over it, resulting in a
    100% total).
    Here is the formula that I am using in the column:
    =[Valor NF]/CALCULATE(SUM([Valor NF]);ALLEXCEPT(Faturamento;Faturamento[Ano]))
    Where [Valor NF] is the source column (invoyce total), Faturamento is my table (Revenue) and [Ano] is the year column, (I am calculating only by year to test)
    I'd appreciate any suggestion.
    Thanks in advance
    MCP

    Hi Nick,
      Thanks for your suggestion and it  worked for me   I  added the 'System message' web item and set the visibility to 'Hidden'  .Now I am not getting any message. Thank you for both.
    Thanks & Regards,
    Raja

  • Average filter but the image is gray and not color RGB

    Hi,
    i use this code for an average filter 3x3, the result is the image whit average but gray and not RGB color.... why??
    thanks in advance
        public void Average()
            int values[]=null;
            int input2d[] = new int [image.getWidth()*image.getHeight()];
            int [][] output2d=new int [image.getWidth()][image.getHeight()];
            image.getRaster().getSamples(0, 0, image.getWidth(), image.getHeight(),0,input2d);
            for(int y=0; y < image.getHeight(); y++)
                for(int x=0; x < image.getWidth(); x++)
                    int count = 0;
                    int average=0;
              values = new int[5*5];
                    for(int s = 0; s < 5; s++)
                        for(int r = 0; r < 5; r++)
                            try
                                values[count] = input2d[(y-2+r)*image.getWidth()+(x-2+s)];
                                count++;
                            catch(ArrayIndexOutOfBoundsException e){ }
                    //trovo il valore medio dell'intorno 5x5
                    for (int temp=0; temp<count; temp++)
                        average+=values[temp];
                    int valpixel=average/count;
                    output2d[x][y]=valpixel;
            image2 = new BufferedImage(image.getWidth(),image.getHeight(), BufferedImage.TYPE_INT_RGB);
            image2.getGraphics().drawImage(image,0,0,null);
            for(int y=0; y < image.getHeight(); y++)
                for(int x=0; x < image.getWidth(); x++)
                    image2.getRaster().setSample(x, y, 0, output2d[x][y] );// componente R
                    image2.getRaster().setSample(x, y, 1, output2d[x][y] );// componente G
                    image2.getRaster().setSample(x, y, 2, output2d[x][y] );// componente B
        }

    Can hel me please!!!

  • How do I create a filter that bypasses the in page and goes directly to spam rather to delete?

    How do I create a filter that bypasses the in page and goes directly to spam rather than to delete?

    From your question I'm going to guess you are talking about Mac Mail.
    If you are talking about a RULE then the "Perform the following actions:" would be to select "Move Message" to mailbox "Junk" instead of "Delete Message."
    If you are talking about something else then please give more information.

  • How to create email message filter that will AND multiple keywords in the message body

    Greetings,
    I am using BlackBerry Desktop Manager (version 4.3.0.17) and I need a filter that will match ALL keywords in the body of a note rather than ANY one of a list of keywords. I understand that separating keywords with a semicolon will match on any one of them, but I would like to match on ALL keywords that may be interspersed throughout the body of the email. In other words, I understand that the semicolon works like an OR connector. I need a connector that works like an AND.

    Hi bik,
    >> how to use the F keys to apply the tagging mentioned below and the direction of how to do the tagging and make the tag invisible in a text editor but not the text file. 
    It is unclear to me. Like you mentioned F keys, how does it work for?  And Could you show us some code with a simple sample or a capture? It could be better to help us understand more.
    In addition, I found a related thread
    Tag editing in a WPF TextBox. Not sure if it is useful for you. Thanks.
    Have a nice day!
    Kristin
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • List that is dependent on a checkbox to be put in a row

    Is there a way to make a list that is dependent on a checkbox to be put in a row?
    For example:
    apples
    oranges
    peaches
    If each of these had a checkbox after them what I want to happen is if I click peaches I get in a separate row just the word peaches.
    If I click apples and peaches I get:
    Apples
    Peaches
    and on and on.
    What I want to happen is when an item is selected a separate list is made with information about the item like a price or a quantity.
    Thanks in advance

    You may search for the keyword "VLOOKUP" in existing threads.
    This function was used in numerous examples doing what you ask for.
    Yvan KOENIG (VALLAURIS, France) vendredi 13 novembre 2009 08:35:49

  • Servlet filter that can differentiate between Filter and Servlet Writers

    Hey,
    I'm trying to build a Filter and HttpServletResponseWrapper that, when applied to a generic servlet, can differentiate between the output stream from the Servlet and the one from the Filters.
    So, say I have a servlet:
    PrintWriter pw = response.Writer();
    pw.write( "Output from servlet" );
    pw.close();And a filter that is applied to the servlet:
    PrintWriter pw = response.Writer();
    pw.write( "Output from filter" );
    pw.close();I want to be able to do this in my filter that is able to differentiate between the servlet and filter response:
    System.out.println( "Response from servlet: " + responseWrapper.servlet.toString() );
    System.out.println( "Response from filter: " + responseWrapper.filter.toString() );The responseWrapper.servlet and responseWrapper.filter can contain all filter responses from all the servlet(s) and filter(s), respectively.
    Can anyone give me guidance as to how to start with this - really I just need to know if I can differentiate between servlet and filter responses in a generic way (without having to modify the response specially in the filter or servlet files that write output)
    Thanks for your time.

    first thing's first..if the OutputStream if not closed Either a Filter or a ServletChain can write on to the stream.
    There could be cases where the servletoutputstream would be closed at servlet end itself.Therefore,its a valiant effort by acomplishing a responseheader in the response to indicate that.
    Now once the response/outputstream is not closed or flushed out there is not direct way by which you do this unless we indicate using response Headers as flags when we are implementing FilterChaning.
    Hope that might help :)
    REGARDS,
    RaHuL

  • Building a report filter that excludes non-business hours and weekends

    Hi All,
    I need to know if this can be done in Answers:
    I have built a system in CRM that captures timestamps when SRs are moved into and out of stages in the SR resolution lifecycle. Then I have a report that uses timestampdiff to calculate the time that a SR spends in each SLA metric window (Respond, Diagnose, Resolve). The report currently displays only the hard difference based on a 24 hour clock.
    We need to be able to build a filter that will exclude any non-business hours (say outside of 9:00 to 5:00) and weekends, so that if my Respond window is 2 hours and an issue is recorded with a Response Start timestamp of 4:00pm, the report would show that if the Response Stop timestamp is at 9:30am the next business day, the SR met the required SLA.
    Does anyone know if this can be done? If so, any insight on how to build it? I've seen a document that explains how to exclude weekends from workflow, but can the same thing be done in reporting?
    This is a very urgent request and any help here is greatly appreciated.
    Thanks!

    Exclude weekends you can do but not business hours but perhaps you can create something....if timestampdiff(Days) greater than 1 then take off 16 hours....Mike Lairsons book has the formula for excluding weekends and I think someone may have posted it in this forum if you search for it.
    cheers
    alex

  • Is there a FCP filter that will smooth slow mo video

    My slow motion clips look a tad jerky on my computer monitors, this alo seems to happen when I use motion paths at time.(such starting with a small photo a making it bigger and or moving it around) Does FCP have a filter that will make the video appear smooth when using these effects?
    Thanks
    Gary B

    Or, if you have it, use After Effects. In my work, it does a better job than Motion in generating slo-motion (as well as stabilizing shaky shots).
    You can set AE up as an "external editor" and send clips directly to it from within FCP.
    Good luck,
    x

  • My new iphone was stolen today. I'm trying to track it via icloud but it shows the average ratio that the phone is disconnected. Are there any other way to track the phone. Thanks for your help.

    my new iphone was stolen today. I'm trying to track it via icloud but it shows the average ratio that the phone is disconnected. Are there any other way to track the phone. Thanks for your help.

    If the phone is turned off, doesn't have an internet connection, or has been restored preventing "Find my iPhone" from being able to work, there is no other way to track it.

  • Audio Filter that make your files sound better

    I have recorded all of my audio files with a shotgun mic and they sound pretty good I just wanted to see if there was any icing on the cake filter that you can think of to give it more of a rich sound.

    A.
    There is nothing wrong with learning and we all have this fact in common; once we were all newbies and had to learn. I wish I would have had these resources when I was a kid but all I had was a Kodak Instamatic and and super8 movie camera. Pretty lucky then!
    But, looking at your body of posts, you expect people in a virtual space to know what you're doing, what your video looks like and how it sounds. We don't even know how your rig is configured or what you're using for equipment so how is anyone supposed to answer such ambiguous questions on subjects of rank subjectivity for you?
    There is huge merit is figuring stuff out for yourself as this way leads to better learning than having someone just point out the way. Everyone needs help occasionally -- or frequently in my case -- so when you do, come and ask with specifics in mind. Join Lynda.com for a month, it's cheap at $25.00 and then bookmark and devour everything in kenstone.net, provideocoaltion, adam wilt's website and I'll guarantee you'll learn more than running in here and asking constant generalities. It's my biggest problem with this forum and others; everyone thinks there's a magic filter/plugin, no one wants to figure out anything for themselves and because FCP and Macs are cheap, all this should be easy. Well, whatever.
    So, A., learn up cause I don't understand audio to save my life and when I need help with audio compressor settings, after I've read the manual and Jon Chappell's great audio filter articles and experimented on my own and researched the forums, I'm asking you for help.
    z.

  • How do I remove a filter that I didn't mean to set?

    I blocked an ad that was running and didn't realize that it would block the program/show that I was trying to run/watch. How do I remove the filter that I had set?

    Which ad blocking add-on?

  • IIR Filtering and response .vi: Butterwort​h filter magnitude response depends on sampling rate -why?

    Hi folks,
    I am not expert in filter design, only someone applying them, so please can someone help me with an explanation?
    I need to filter very low-frequent signals using a buttherwoth filter 2. or 3. order as bandpass 0.1 to 10 Hz .
    Very relevant amplitudes are BELOW 1 Hz, often below 0.5 Hz but there will be as well relevant amplitudes above 5 Hz to be observed.
    This is fixed and prescribed for the application.
    However, the sampling rate of the measurement system is not prescribed. It may be between say between 30 and 2000 Hz. This will depend on whether the same data set is used for analysing higher frequencies up to 1000 Hz of the same measurement or this is not done by the user and he chooses a lower sampling rate to reduce the file sizes, especially when measuring for longer periods of several weeks.
    To compare the 2nd and 3rd order's magnitude response of the filter I used the example IIR Filtering and response .vi:
    I was very astonished when I the found that the magnitude response is significantly influenced by the SAMPLING RATE I tell the signal generator in this example vi.
    Can you please tell me why - and especially why the 3rd order filter will be worse for the low frequency parts below 1 Hz of the signal. I was told by people experienced with filters that the 3rd oder will distort less the amplitudes which is not at all true for my relevant frequencies below 1 Hz.  
    In the attached png you see 4 screenshots for 2 or 3 order and sampling rate 300 or 1000 Hz to show you the varying magnitude responses without opening labview.
    THANK YOU for your ANSWERS!!!
    chris
    Solved!
    Go to Solution.
    Attachments:
    butterworth-filter-differences.png ‏285 KB

    Hello Lynn,
    thanks for the answer. You are right that there are few points "behind" the curve in the graph, see png.
    However, this is the filter response which Labview (2009) provides to me directly out of the "IIR Filter for 1 Channel. vi" in the "filter information" output cluster. Where up to now I do not know how to influence it - apart from adjusting the input parameters "IIR filter specifications". OK, I assume I have to gain more knowledge of this. The curve of the magnitude resonse dies not change when I change the number of samples of the input signal of the signal generator, only wehn I change the sampling rate.
    I used directly the example vi from Labview with the name indicated in my first post "IIR Filtering and Response.vi".
    So I assumed that everybody has it in his/her examples shipped with LV and it is not necessary to post it.
    I just adjusted the size of the diagram of magnitude response to see the curves better as you see in the attached vi.
    So I did no changes to the vital parts of signal generation and filter of the example. The screenshots are like they come from the example when using the option "one waveform" where I as user assume that this which is behind is quality-controlled by NI.
    I was also astonished that the filter magnitude response is different to the one I copied out of graphs 1 year ago - but I unfortunately cannot reconstruct which example I used there...
    Thanks for any further comments
    chris
    Attachments:
    IIR Filtering and Response_CH.vi ‏55 KB
    butterworth2nd_order_bandpass_0p1to10Hz_mag_response.PNG ‏18 KB

  • Mandatory filter which value depends on user choice

    I've just start my experience with SAP BO, and I have big problem to solve. Iu2019m using Universe Designer and I need a mandatory filter, which can have one of two values. The value of filter depends on user choice. Filter should have default value. Eg. when user choose "internal view" filter will add expression tabe.column = 'X' to a query, when user choose "external view" filter will add expression table.column = 'Y'. The main problem is that chosen value should be remembered in report. So user cannot be prompted every time to choose a value. Does anyone has any idea how to solve this problem? The best solution would be when one filter could reference to another. Or to use internal report variable, but I think there is no such thing. Thanks for any advice.

    It should be solved by using an @prompt in the mandatory filter.
    eg. table.column = @Prompt('Select internal or external','A',{'internal view','external view'},Mono,Constrained,Persistent)

Maybe you are looking for