Discretization

From testwiki
Jump to navigation Jump to search

Template:Short description

A solution to a discretized partial differential equation, obtained with the finite element method.

In applied mathematics, discretization is the process of transferring continuous functions, models, variables, and equations into discrete counterparts. This process is usually carried out as a first step toward making them suitable for numerical evaluation and implementation on digital computers. Dichotomization is the special case of discretization in which the number of discrete classes is 2, which can approximate a continuous variable as a binary variable (creating a dichotomy for modeling purposes, as in binary classification).

Discretization is also related to discrete mathematics, and is an important component of granular computing. In this context, discretization may also refer to modification of variable or category granularity, as when multiple discrete variables are aggregated or multiple discrete categories fused.

Whenever continuous data is discretized, there is always some amount of discretization error. The goal is to reduce the amount to a level considered negligible for the modeling purposes at hand.

Template:Anchor The terms discretization and quantization often have the same denotation but not always identical connotations. (Specifically, the two terms share a semantic field.) The same is true of discretization error and quantization error.

Mathematical methods relating to discretization include the Eulerโ€“Maruyama method and the zero-order hold.

Discretization of linear state space models Template:Anchor

Discretization is also concerned with the transformation of continuous differential equations into discrete difference equations, suitable for numerical computing.

The following continuous-time state space model

๐ฑห™(t)=๐€๐ฑ(t)+๐๐ฎ(t)+๐ฐ(t)๐ฒ(t)=๐‚๐ฑ(t)+๐ƒ๐ฎ(t)+๐ฏ(t)

where Template:Mvar and Template:Mvar are continuous zero-mean white noise sources with power spectral densities

๐ฐ(t)N(0,๐)๐ฏ(t)N(0,๐‘)

can be discretized, assuming zero-order hold for the input Template:Mvar and continuous integration for the noise Template:Mvar, to

๐ฑ[k+1]=๐€๐๐ฑ[k]+๐๐๐ฎ[k]+๐ฐ[k]๐ฒ[k]=๐‚๐๐ฑ[k]+๐ƒ๐๐ฎ[k]+๐ฏ[k]

with covariances

๐ฐ[k]N(0,๐๐)๐ฏ[k]N(0,๐‘๐)

where

๐€๐=e๐€T=โ„’1{(s๐ˆ๐€)1}t=T๐๐=(τ=0Te๐€τdτ)๐๐‚๐=๐‚๐ƒ๐=๐ƒ๐๐=τ=0Te๐€τ๐e๐€τdτ๐‘๐=๐‘1T

and Template:Mvar is the sample time. If Template:Math is nonsingular, ๐๐=๐€1(๐€๐๐ˆ)๐.

The equation for the discretized measurement noise is a consequence of the continuous measurement noise being defined with a power spectral density.[1]

A clever trick to compute Template:Math and Template:Math in one step is by utilizing the following property:[2]Template:Rp

e[๐€๐๐ŸŽ๐ŸŽ]T=[๐€๐๐๐๐ŸŽ๐ˆ]

Where Template:Math and Template:Math are the discretized state-space matrices.

Discretization of process noise

Numerical evaluation of Template:Math is a bit trickier due to the matrix exponential integral. It can, however, be computed by first constructing a matrix, and computing the exponential of it[3] ๐…=[๐€๐๐ŸŽ๐€]T๐†=e๐…=[๐€๐1๐๐๐ŸŽ๐€๐] The discretized process noise is then evaluated by multiplying the transpose of the lower-right partition of Template:Math with the upper-right partition of Template:Math: ๐๐=(๐€๐)(๐€๐1๐๐)=๐€๐(๐€๐1๐๐).

Derivation

Starting with the continuous model ๐ฑห™(t)=๐€๐ฑ(t)+๐๐ฎ(t) we know that the matrix exponential is ddte๐€t=๐€e๐€t=e๐€t๐€ and by premultiplying the model we get e๐€t๐ฑห™(t)=e๐€t๐€๐ฑ(t)+e๐€t๐๐ฎ(t) which we recognize as ddt[e๐€t๐ฑ(t)]=e๐€t๐๐ฎ(t) and by integrating, e๐€t๐ฑ(t)e0๐ฑ(0)=0te๐€τ๐๐ฎ(τ)dτ๐ฑ(t)=e๐€t๐ฑ(0)+0te๐€(tτ)๐๐ฎ(τ)dτ which is an analytical solution to the continuous model.

Now we want to discretise the above expression. We assume that Template:Mvar is constant during each timestep. ๐ฑ[k]=def ๐ฑ(kT)๐ฑ[k]=e๐€kT๐ฑ(0)+0kTe๐€(kTτ)๐๐ฎ(τ)dτ๐ฑ[k+1]=e๐€(k+1)T๐ฑ(0)+0(k+1)Te๐€[(k+1)Tτ]๐๐ฎ(τ)dτ๐ฑ[k+1]=e๐€T[e๐€kT๐ฑ(0)+0kTe๐€(kTτ)๐๐ฎ(τ)dτ]+kT(k+1)Te๐€(kT+Tτ)๐๐ฎ(τ)dτ We recognize the bracketed expression as ๐ฑ[k], and the second term can be simplified by substituting with the function v(τ)=kT+Tτ. Note that dτ=dv. We also assume that Template:Math is constant during the integral, which in turn yields

๐ฑ[k+1]=e๐€T๐ฑ[k](v(kT)v((k+1)T)e๐€vdv)๐๐ฎ[k]=e๐€T๐ฑ[k](T0e๐€vdv)๐๐ฎ[k]=e๐€T๐ฑ[k]+(0Te๐€vdv)๐๐ฎ[k]=e๐€T๐ฑ[k]+๐€1(e๐€T๐ˆ)๐๐ฎ[k]

which is an exact solution to the discretization problem.

When Template:Math is singular, the latter expression can still be used by replacing e๐€T by its Taylor expansion, e๐€T=k=01k!(๐€T)k. This yields ๐ฑ[k+1]=e๐€T๐ฑ[k]+(0Te๐€vdv)๐๐ฎ[k]=(k=01k!(๐€T)k)๐ฑ[k]+(k=11k!๐€k1Tk)๐๐ฎ[k], which is the form used in practice.

Approximations

Exact discretization may sometimes be intractable due to the heavy matrix exponential and integral operations involved. It is much easier to calculate an approximate discrete model, based on that for small timesteps e๐€T๐ˆ+๐€T. The approximate solution then becomes: ๐ฑ[k+1](๐ˆ+๐€T)๐ฑ[k]+T๐๐ฎ[k]

This is also known as the Euler method, which is also known as the forward Euler method. Other possible approximations are e๐€T(๐ˆ๐€T)1, otherwise known as the backward Euler method and e๐€T(๐ˆ+12๐€T)(๐ˆ12๐€T)1, which is known as the bilinear transform, or Tustin transform. Each of these approximations has different stability properties. The bilinear transform preserves the instability of the continuous-time system.

Discretization of continuous features

Template:Main In statistics and machine learning, discretization refers to the process of converting continuous features or variables to discretized or nominal features. This can be useful when creating probability mass functions.

Discretization of smooth functions

Template:Main In generalized functions theory, discretization arises as a particular case of the Convolution Theorem on tempered distributions

โ„ฑ{f*III}=โ„ฑ{f}III
โ„ฑ{αIII}=โ„ฑ{α}*III

where III is the Dirac comb, III is discretization, *III is periodization, f is a rapidly decreasing tempered distribution (e.g. a Dirac delta function δ or any other compactly supported function), α is a smooth, slowly growing ordinary function (e.g. the function that is constantly 1 or any other band-limited function) and โ„ฑ is the (unitary, ordinary frequency) Fourier transform. Functions α which are not smooth can be made smooth using a mollifier prior to discretization.

As an example, discretization of the function that is constantly 1 yields the sequence [..,1,1,1,..] which, interpreted as the coefficients of a linear combination of Dirac delta functions, forms a Dirac comb. If additionally truncation is applied, one obtains finite sequences, e.g. [1,1,1,1]. They are discrete in both, time and frequency.

See also

References

Template:Reflist

Further reading

Template:Sisterlinks Template:Authority control

  1. โ†‘ Template:Cite book
  2. โ†‘ Raymond DeCarlo: Linear Systems: A State Variable Approach with Numerical Implementation, Prentice Hall, NJ, 1989
  3. โ†‘ Charles Van Loan: Computing integrals involving the matrix exponential, IEEE Transactions on Automatic Control. 23 (3): 395โ€“404, 1978