Discretization

From Wikipedia, the free encyclopedia
Jump to navigation Jump to search

Template:Short description

File:Finite element solution.svg
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.

Script error: No such module "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 Script error: No such module "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]=A𝐝𝐱[k]+B𝐝𝐮[k]+𝐰[k]𝐲[k]=C𝐝𝐱[k]+D𝐝𝐮[k]+𝐯[k]

with covariances

𝐰[k]N(0,Q𝐝)𝐯[k]N(0,R𝐝)

where

A𝐝=e𝐀T=1{(s𝐈𝐀)1}t=TB𝐝=(τ=0Te𝐀τdτ)𝐁C𝐝=𝐂D𝐝=𝐃Q𝐝=τ=0Te𝐀τ𝐐e𝐀τdτR𝐝=𝐑1T

and Template:Mvar is the sample time. If AScript error: No such module "Check for unknown parameters". is nonsingular, B𝐝=𝐀1(A𝐝𝐈)𝐁.

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 AdScript error: No such module "Check for unknown parameters". and BdScript error: No such module "Check for unknown parameters". in one step is by utilizing the following property:[2]Template:Rp

e[𝐀𝐁𝟎𝟎]T=[A𝐝B𝐝𝟎𝐈]

Where AdScript error: No such module "Check for unknown parameters". and BdScript error: No such module "Check for unknown parameters". are the discretized state-space matrices.

Discretization of process noise

Numerical evaluation of QdScript error: No such module "Check for unknown parameters". 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𝐅=[A𝐝1Q𝐝𝟎A𝐝] The discretized process noise is then evaluated by multiplying the transpose of the lower-right partition of GScript error: No such module "Check for unknown parameters". with the upper-right partition of GScript error: No such module "Check for unknown parameters".: Q𝐝=(A𝐝)(A𝐝1Q𝐝)=A𝐝(A𝐝1Q𝐝).

Derivation

Starting with the continuous model x˙(t)=𝐀𝐱(t)+𝐁𝐮(t) we know that the matrix exponential is ddte𝐀t=𝐀e𝐀t=e𝐀t𝐀 and by premultiplying the model we get e𝐀tx˙(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 uScript error: No such module "Check for unknown parameters". 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 AScript error: No such module "Check for unknown parameters". 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

Script error: No such module "Labelled list hatnote". 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

Script error: No such module "Labelled list hatnote". 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

<templatestyles src="Reflist/styles.css" />

  1. Script error: No such module "citation/CS1".
  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

Script error: No such module "Check for unknown parameters".

Further reading

  • Script error: No such module "citation/CS1".
  • Script error: No such module "citation/CS1".
  • Script error: No such module "Citation/CS1".
  • Script error: No such module "citation/CS1".

External links

Template:Sisterlinks Template:Authority control