Results 1 to 8 of 8

Thread: Algorithm to identify the correct weight of a piece.

  1. #1
    Newbie
    Joined
    Mar 2017
    From
    Jaraguá do Sul
    Posts
    4

    Question Algorithm to identify the correct weight of a piece.

    I am studying the best way to identify the real weight of a product that passes over a belt.
    The system receives about 20 weighings, from the moment the scale is empty until the piece leaves the belt.

    I need to discard the weights I receive when the product is entering or leaving the platform, and pick up only the middle weights, which are closer to each other.

    See image please.

    Algorithm to identify the correct weight of a piece.-weigh-curve.png
    Follow Math Help Forum on Facebook and Google+

  2. #2
    MHF Contributor
    Joined
    Nov 2013
    From
    California
    Posts
    5,565
    Thanks
    2348

    Re: Algorithm to identify the correct weight of a piece.

    Let me get this right.

    You are saying that for each object being weighed, 20 readings are made?

    You want to make the best estimate, in some statistical sense, of the object's actual weight.

    Is that correct?
    Follow Math Help Forum on Facebook and Google+

  3. #3
    Newbie
    Joined
    Mar 2017
    From
    Jaraguá do Sul
    Posts
    4

    Re: Algorithm to identify the correct weight of a piece.

    Yes, exactly.
    sorry for my english.
    Follow Math Help Forum on Facebook and Google+

  4. #4
    MHF Contributor
    Joined
    Nov 2013
    From
    California
    Posts
    5,565
    Thanks
    2348

    Re: Algorithm to identify the correct weight of a piece.

    Quote Originally Posted by serjaomendes View Post
    Yes, exactly.
    sorry for my english.
    Your English was fine. I just wanted to make sure I understand the problem before looking hard at it.

    Do you have any information about why the weight measurements below the likely actual weight, the ones at the beginning and end of the sample, are the way they are?

    Is the system warming up and down causing inaccuracy or something like that?

    Looking at your graph we can't really characterize the samples in the middle with the same distribution as the samples at the ends.
    Last edited by romsek; Mar 16th 2017 at 04:03 PM.
    Follow Math Help Forum on Facebook and Google+

  5. #5
    Newbie
    Joined
    Mar 2017
    From
    Jaraguá do Sul
    Posts
    4

    Re: Algorithm to identify the correct weight of a piece.

    Basically I need to find out the approximate weight, but I have an acceptable margin of error (1g up or down)

    I need to eliminate the weights that are distant .... out of the center of the curve in the graph.

    In this case the weight is 76 grams.
    Follow Math Help Forum on Facebook and Google+

  6. #6
    MHF Contributor
    Joined
    Nov 2013
    From
    California
    Posts
    5,565
    Thanks
    2348

    Re: Algorithm to identify the correct weight of a piece.

    Quote Originally Posted by serjaomendes View Post
    Basically I need to find out the approximate weight, but I have an acceptable margin of error (1g up or down)

    I need to eliminate the weights that are distant .... out of the center of the curve in the graph.

    In this case the weight is 76 grams.
    Ok. In the case of this problem, where you know a priori that the weight readings will climb to the approximate actual weight and then drop back to zero, I would do the following.

    1) list the weights in time sequence

    2) apply a slope detection filter. I'd use 2 or 3 data points per slope estimate.

    3) Apply a zero slope threshold detector, i.e. discard points corresponding to the absolute value of slope greater than some threshold. This threshold will have to be varied until the standard deviation of the selected points is small enough.

    4) Find the mean of the selected points as your estimated weight.

    Here's some code in mathematica that does all this.

    Algorithm to identify the correct weight of a piece.-clipboard01.jpg
    Follow Math Help Forum on Facebook and Google+

  7. #7
    Newbie
    Joined
    Mar 2017
    From
    Jaraguá do Sul
    Posts
    4

    Re: Algorithm to identify the correct weight of a piece.

    Thank you very much for the help, it was very helpful.
    I'm installing Wolfram Trial to try to understand the code and translate it to C #
    Follow Math Help Forum on Facebook and Google+

  8. #8
    MHF Contributor
    Joined
    Nov 2013
    From
    California
    Posts
    5,565
    Thanks
    2348

    Re: Algorithm to identify the correct weight of a piece.

    Quote Originally Posted by serjaomendes View Post
    Thank you very much for the help, it was very helpful.
    I'm installing Wolfram Trial to try to understand the code and translate it to C #
    there is an error in the code appearing in the image.

    in the statement that assigns $tt$

    there is a line {k,1, Length[weightData]-2}

    that should be

    {k, 1, Length[weightData]-slopeDetectorWindowLength+1}
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. The weight of H(X) does not exceed the weight of X?
    Posted in the Differential Geometry Forum
    Replies: 0
    Last Post: Oct 13th 2011, 09:59 AM
  2. A Piece of Wire
    Posted in the Calculus Forum
    Replies: 12
    Last Post: Dec 31st 2008, 09:22 AM

Search Tags


/mathhelpforum @mathhelpforum