- Source: Alpha beta filter
An alpha beta filter (also called alpha-beta filter, f-g filter or g-h filter) is a simplified form of observer for estimation, data smoothing and control applications. It is closely related to Kalman filters and to linear state observers used in control theory. Its principal advantage is that it does not require a detailed system model.
Filter equations
An alpha beta filter presumes that a system is adequately approximated by a model having two internal states, where the first state is obtained by integrating the value of the second state over time. Measured system output values correspond to observations of the first model state, plus disturbances. This very low order approximation is adequate for many simple systems, for example, mechanical systems where position is obtained as the time integral of velocity. Based on a mechanical system analogy, the two states can be called position x and velocity v. Assuming that velocity remains approximately constant over the small time interval ΔT between measurements, the position state is projected forward to predict its value at the next sampling time using equation 1.
(1)
x
^
k
←
x
^
k
−
1
+
Δ
T
v
^
k
−
1
{\displaystyle {\text{(1)}}\quad {\hat {\textbf {x}}}_{k}\leftarrow {\hat {\textbf {x}}}_{k-1}+\Delta {\textrm {T}}\ {\textbf {}}{\hat {\textbf {v}}}_{k-1}}
Since velocity variable v is presumed constant, its projected value at the next sampling time equals the current value.
(2)
v
^
k
←
v
^
k
−
1
{\displaystyle {\text{(2)}}\quad {\hat {\textbf {v}}}_{k}\leftarrow {\hat {\textbf {v}}}_{k-1}}
If additional information is known about how a driving function will change the v state during each time interval, equation 2 can be modified to include it.
The output measurement is expected to deviate from the prediction because of noise and dynamic effects not included in the simplified dynamic model. This prediction error r is also called the residual or innovation, based on statistical or Kalman filtering interpretations
(3)
r
^
k
←
x
k
−
x
^
k
{\displaystyle {\text{(3)}}\quad {\hat {\textbf {r}}}_{k}\leftarrow {\textbf {x}}_{k}-{\hat {\textbf {x}}}_{k}}
Suppose that residual r is positive. This could result because the previous x estimate was low, the previous v was low, or some combination of the two. The alpha beta filter takes selected alpha and beta constants (from which the filter gets its name), uses alpha times the deviation r to correct the position estimate, and uses beta times the deviation r to correct the velocity estimate. An extra ΔT factor conventionally serves to normalize magnitudes of the multipliers.
(4)
x
^
k
←
x
^
k
+
(
α
)
r
^
k
{\displaystyle {\text{(4)}}\quad {\hat {\textbf {x}}}_{k}\leftarrow {\hat {\textbf {x}}}_{k}+(\alpha )\ {\hat {\textbf {r}}}_{k}}
(5)
v
^
k
←
v
^
k
+
(
β
/
[
Δ
T
]
)
r
^
k
{\displaystyle {\text{(5)}}\quad {\hat {\textbf {v}}}_{k}\leftarrow {\hat {\textbf {v}}}_{k}+(\beta /[\Delta {\textrm {T}}])\ {\hat {\textbf {r}}}_{k}}
The corrections can be considered small steps along an estimate of the gradient direction. As these adjustments accumulate, error in the state estimates is reduced. For convergence and stability, the values of the alpha and beta multipliers should be positive and small:
0
<
α
<
1
{\displaystyle \quad 0<\alpha <1}
0
<
β
≤
2
{\displaystyle \quad 0<\beta \leq 2}
Noise is suppressed only if
0
<
β
<
1
{\displaystyle 0<\beta <1}
, otherwise the noise is amplified.
Values of alpha and beta typically are adjusted experimentally. In general, larger alpha and beta gains tend to produce faster response for tracking transient changes, while smaller alpha and beta gains reduce the level of noise in the state estimates. If a good balance between accurate tracking and noise reduction is found, and the algorithm is effective, filtered estimates are more accurate than the direct measurements. This motivates calling the alpha-beta process a filter.
= Algorithm summary
=Initialize.
Set the initial values of state estimates x and v, using prior information or additional measurements; otherwise, set the initial state values to zero.
Select values of the alpha and beta correction gains.
Update. Repeat for each time step ΔT:
Project state estimates x and v using equations 1 and 2
Obtain a current measurement of the output value
Compute the residual r using equation 3
Correct the state estimates using equations 4 and 5
Send updated x and optionally v as the filter outputs
Sample program
Alpha Beta filter can be implemented in C as follows:
= Result
=The following images depict the outcome of the above program in graphical format. In each image, the blue trace is the input signal; the output is red in the first image, yellow in the second, and green in the third. For the first two images, the output signal is visibly smoother than the input signal and lacks extreme spikes seen in the input. Also, the output moves in an estimate of gradient direction of input.
The higher the alpha parameter, the higher is the effect of input x and the less damping is seen. A low value of beta is effective in controlling sudden surges in velocity. Also, as alpha increases beyond unity, the output becomes rougher and more uneven than the input.
Relationship to general state observers
More general state observers, such as the Luenberger observer for linear control systems, use a rigorous system model. Linear observers use a gain matrix to determine state estimate corrections from multiple deviations between measured variables and predicted outputs that are linear combinations of state variables. In the case of alpha beta filters, this gain matrix reduces to two terms. There is no general theory for determining the best observer gain terms, and typically gains are adjusted experimentally for both.
The linear Luenberger observer equations reduce to the alpha beta filter by applying the following specializations and simplifications.
The discrete state transition matrix A is a square matrix of dimension 2, with all main diagonal terms equal to 1, and the first super-diagonal terms equal to ΔT.
The observation equation matrix C has one row that selects the value of the first state variable for output.
The filter correction gain matrix L has one column containing the alpha and beta gain values.
Any known driving signal for the second state term is represented as part of the input signal vector u, otherwise the u vector is set to zero.
Input coupling matrix B has a non-zero gain term as its last element if vector u is non-zero.
Relationship to Kalman filters
A Kalman filter estimates the values of state variables and corrects them in a manner similar to an alpha beta filter or a state observer. However, a Kalman filter does this in a much more formal and rigorous manner. The principal differences between Kalman filters and alpha beta filters are the following.
Like state observers, Kalman filters use a detailed dynamic system model that is not restricted to two state variables.
Like state observers, Kalman filters in general use multiple observed variables to correct state variable estimates, and these do not have to be direct measurements of individual system states.
A Kalman filter uses covariance noise models for states and observations. Using these, a time-dependent estimate of state covariance is updated automatically, and from this the Kalman gain matrix terms are calculated. Alpha beta filter gains are manually selected and static.
For certain classes of problems, a Kalman filter is Wiener optimal, while alpha beta filtering is in general suboptimal.
A Kalman filter designed to track a moving object using a constant-velocity target dynamics (process) model (i.e., constant velocity between measurement updates) with process noise covariance and measurement covariance held constant will converge to the same structure as an alpha-beta filter. However, a Kalman filter's gain is computed recursively at each time step using the assumed process and measurement error statistics, whereas the alpha-beta's gain is computed ad hoc.
= Choice of parameters
=The alpha-beta filter becomes a steady-state Kalman filter if filter parameters are calculated from the sampling interval
T
{\displaystyle T}
, the process variance
σ
w
2
{\displaystyle \sigma _{w}^{2}}
and the noise variance
σ
v
2
{\displaystyle \sigma _{v}^{2}}
like this
λ
=
σ
w
T
2
σ
v
{\displaystyle \lambda ={\frac {\sigma _{w}T^{2}}{\sigma _{v}}}}
r
=
4
+
λ
−
8
λ
+
λ
2
4
{\displaystyle r={\frac {4+\lambda -{\sqrt {8\lambda +\lambda ^{2}}}}{4}}}
α
=
1
−
r
2
{\displaystyle \alpha =1-r^{2}}
β
=
2
(
2
−
α
)
−
4
1
−
α
{\displaystyle \beta =2\left(2-\alpha \right)-4{\sqrt {1-\alpha }}}
This choice of filter parameters minimizes the mean square error.
The steady state innovation variance
s
{\displaystyle s}
can be expressed as:
s
=
σ
v
2
1
−
α
2
{\displaystyle s={\frac {\sigma _{v}^{2}}{1-\alpha ^{2}}}}
Variations
= Alpha filter
=A simpler member of this family of filters is the alpha filter which observes only one state:
x
^
k
←
x
^
k
+
(
α
)
r
^
k
{\displaystyle {\hat {\textbf {x}}}_{k}\leftarrow {\hat {\textbf {x}}}_{k}+(\alpha )\ {\hat {\textbf {r}}}_{k}}
with the optimal parameter calculated like this:
λ
=
σ
w
T
2
σ
v
α
=
−
λ
2
+
λ
4
+
16
λ
2
8
{\displaystyle {\begin{aligned}\lambda &={\frac {\sigma _{w}T^{2}}{\sigma _{v}}}\\\alpha &={\frac {-\lambda ^{2}+{\sqrt {\lambda ^{4}+16\lambda ^{2}}}}{8}}\end{aligned}}}
This calculation is identical for a moving average and a low-pass filter. Exponential smoothing is mathematically identical to the purposed Alpha filter.
= Alpha beta gamma filter
=When the second state variable varies quickly, i.e. when the acceleration of the first state is large, it can be useful to extend the states of the alpha beta filter by one level. In this extension, the second state variable v is obtained from integrating a third acceleration state, analogous to the way that the first state is obtained by integrating the second. An equation for the a state is added to the equation system. A third multiplier, gamma, is selected for applying corrections to the new a state estimates. This yields the alpha beta gamma update equations.
x
^
k
←
x
^
k
+
(
α
)
r
k
{\displaystyle {\hat {\textbf {x}}}_{k}\leftarrow {\hat {\textbf {x}}}_{k}+(\alpha )\ {\textbf {r}}_{k}}
v
^
k
←
v
^
k
+
(
β
/
[
Δ
T
]
)
r
k
{\displaystyle {\hat {\textbf {v}}}_{k}\leftarrow {\hat {\textbf {v}}}_{k}+(\beta /[\Delta {\textrm {T}}])\ {\textbf {r}}_{k}}
a
^
k
←
a
^
k
+
(
2
γ
/
[
Δ
T
]
2
)
r
k
{\displaystyle {\hat {\textbf {a}}}_{k}\leftarrow {\hat {\textbf {a}}}_{k}+(2\gamma /[\Delta {\textrm {T}}]^{\textrm {2}})\ {\textbf {r}}_{k}}
Similar extensions to additional higher orders are possible, but most systems of higher order tend to have significant interactions among the multiple states, so approximating the system dynamics as a simple integrator chain is less likely to prove useful.
Calculating optimal parameters for the alpha-beta-gamma filter is a bit more involved than for the alpha-beta filter:
λ
=
σ
w
T
2
σ
v
b
=
λ
2
−
3
c
=
λ
2
+
3
d
=
−
1
p
=
c
−
b
2
3
q
=
2
b
3
27
−
b
c
3
+
d
v
=
q
2
+
4
p
3
27
z
=
−
q
+
v
2
3
s
=
z
−
p
3
z
−
b
3
α
=
1
−
s
2
β
=
2
(
1
−
s
)
2
γ
=
β
2
2
α
{\displaystyle {\begin{aligned}\lambda &={\frac {\sigma _{w}T^{2}}{\sigma _{v}}}\\[2ex]b&={\frac {\lambda }{2}}-3\\c&={\frac {\lambda }{2}}+3\\d&=-1\\p&=c-{\frac {b^{2}}{3}}\\q&={\frac {2b^{3}}{27}}-{\frac {bc}{3}}+d\\v&={\sqrt {q^{2}+{\frac {4p^{3}}{27}}}}\\z&=-{\sqrt[{3}]{q+{\frac {v}{2}}}}\\s&=z-{\frac {p}{3z}}-{\frac {b}{3}}\\[2ex]\alpha &=1-s^{2}\\\beta &=2(1-s)^{2}\\\gamma &={\frac {\beta ^{2}}{2\alpha }}\end{aligned}}}
See also
Kalman filter
Control theory
State space (controls)
Moving average
References
Sources
"The Alpha-Beta Filter", Penoyer, Robert; C Users Journal, July 1993
"Engine Speed Monitoring: The Alpha-Beta Filter", Microstar Laboratories
"Reconciling steady-state Kalman and alpha-beta filter design", by Painter, J.H.; Kerstetter, D.; Jowers, S. IEEE Transactions on Aerospace and Electronic Systems, Volume 26, Issue 6, Nov. 1990, pp. 986–991
Fixed-lag alpha-beta filter for target trajectory smoothing Ogle, T.L.; Blair, W.D. Aerospace and Electronic Systems, IEEE Transactions on Volume 40, Issue 4, Oct. 2004, pp. 1417–1421
"Description of an alpha-beta Filter in Cartesian Coordinates", by Cantrell, Ben H., NAVAL RESEARCH LAB WASHINGTON DC, March 21, 1973
"Comparison of Four Filtering Options for a Radar Tracking Problem", by Lawton, John A.; Jesionowski, Robert J.; Zarchan, Paul. NAVAL SURFACE WARFARE CENTER DAHLGREN DIV VA, 1979.
Mathematical Techniques in Multisensor Data Fusion, By David Lee Hall, Sonya A. H., Artech House, 2004, ISBN 1-58053-335-3, section 4.4.4
External links
Alpha-Beta C# source code sample
Alpha-Beta C source code sample
Tracking performance of the alpha-beta tracker versus the Kalman filter
The alpha-beta-gamma Filter, A online Tutorial with many numerical examples and intuitive explanations by Alex Becker.
Kata Kunci Pencarian:
- Peluruhan alfa
- Adobe Photoshop
- Transmisi (telekomunikasi)
- Saluran kalium
- Algoritma Lanczos
- Pengembangan Windows Vista
- Steam
- Gelombang Rayleigh
- Astatin
- Opera (peramban web)
- Alpha beta filter
- Hydrogen-alpha
- Club filter
- Kalman filter
- Alphabeta (disambiguation)
- Low-pass filter
- Raised-cosine filter
- Radar tracker
- Astronomical filter
- Chebyshev filter
Call Me Alma (2023)
No More Posts Available.
No more pages to load.