Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6231755
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T09:59:25+00:00 2026-05-24T09:59:25+00:00

Could someone explain how one arrives at the equation below for high pass filtering

  • 0

Could someone explain how one arrives at the equation below for high pass filtering of the accelerometer values? I don’t need mathematical derivation, just an intuitive interpretation of it is enough.

    #define kFilteringFactor 0.1
    UIAccelerationValue rollingX, rollingY, rollingZ;

    - (void)accelerometer:(UIAccelerometer *)accelerometer didAccelerate:(UIAcceleration *)acceleration {

        // Subtract the low-pass value from the current value to get a simplified high-pass filter

        rollingX = (acceleration.x * kFilteringFactor) + (rollingX * (1.0 - kFilteringFactor));

        rollingY = (acceleration.y * kFilteringFactor) + (rollingY * (1.0 - kFilteringFactor));

        rollingZ = (acceleration.z * kFilteringFactor) + (rollingZ * (1.0 - kFilteringFactor));

         float accelX = acceleration.x - rollingX;
         float accelY = acceleration.y - rollingY;
         float accelZ = acceleration.z - rollingZ;

       // Use the acceleration data.

    }
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T09:59:25+00:00Added an answer on May 24, 2026 at 9:59 am

    The rollingX, rollingY, rollingZ values are persistent across calls to the function. They should be initialised at some point prior to use. These “rolling” values are just low pass filtered versions of the input values (aka “moving averages”) which are subtracted from the instantaneous values to give you a high pass filtered output, i.e. you are getting the current deviation from the moving average.

    ADDITIONAL EXPLANATION

    A moving average is just a crude low pass filter. In this case it’s what is known as ARMA (auto-regressive moving average) rather than just a simple MA (moving average). In DSP terms this is a recursive (IIR) filter rather than a non-recursive (FIR) filter. Regardless of all the terminology though, yes, you can think of it as a smoothing function” – it’s “smoothing out” all the high frequency energy and leaving you with a slowly varying estimate of the mean value of the signal. If you then subtract this smoothed signal from the instantaneous signal then the difference will be the content that you have filtered out, i.e. the high frequency stuff, hence you get a high pass filter. In other words: high_pass_filtered_signal = signal - smoothed_signal.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Could someone please explain to me on when should one use the include and
Could someone explain the steps that one must do to show an Azure application
Could someone explain why I would use one of these endpoint annotations over the
Could someone explain the main benefits for choosing one over the other and the
I'm rather confused at the moment, could someone explain this one to me? Maybe
With jQuery latest one: <script src=http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js></script> <script src=http://ajax.googleapis.com/ajax/libs/jqueryui/1/jquery-ui.js></script> Could someone explain what are the
Could someone explain to me in simple terms the easiest way to change the
Could someone explain? I understand the basic concepts behind them but I often see
Could someone explain why this works in C#.NET 2.0: Nullable<DateTime> foo; if (true) foo
Could someone explain why both tests using the latest versions of Moq and Rhino.Mocks

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.