Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

finding local maxima

  • 15-06-2004 11:55am
    #1
    Registered Users, Registered Users 2 Posts: 1,368 ✭✭✭


    Ok,

    I 've got an array holding integers describing a sin wave. The values range from about +30 to -30.

    The problem is, the signal can be noisy enuf, and peak detection (finding the indexes of local maxima within the signal) can be quite difficult.

    I have two algorithms myself (which arent quite good enuf), but I'd be interested if anyone had any other ideas on how to tackle the problem....

    Thanks,

    King


Comments

  • Moderators, Recreation & Hobbies Moderators, Science, Health & Environment Moderators, Technology & Internet Moderators Posts: 93,567 Mod ✭✭✭✭Capt'n Midnight


    you're looking at some sort of moving average,
    using trapeziod or simpsons(SP)
    the number of points to be averaged depends on the noise.


  • Closed Accounts Posts: 47 PhilH


    I may be reading too much into the question, but it sounds more like a curve fitting problem. If you know it is a sin wave, and you know the amplitude (+/-30) then surely all you need to know is the wavelength and the offset from zero (if any).


  • Registered Users, Registered Users 2 Posts: 1,372 ✭✭✭silverside


    If you just want to find the frequency of the signal, use spectral analysis (using FFT) to find the peak frequency.

    If its a strong signal, doing some sort of a linear filter such as a moving average should get you a good idea of the true signal.

    Is the noise random or does it have a pattern, possibly related to the signal? If so you might want to look at Kalman filtering.

    Could you post some sample data? How maths-y are you?


  • Registered Users, Registered Users 2 Posts: 1,368 ✭✭✭king_of_inismac


    Thanks for the replies guys,

    Used an averaging algorithm, and then a DSP algorithm to clean the signal.

    Then I cut off the top off the wave and found the centre point of the arc. This represented the peak position.

    Twas one hell of an algorithm, but it worked :D

    Thanks again,
    King


Advertisement