Movatterモバイル変換


[0]ホーム

URL:


Jump to content
WikipediaThe Free Encyclopedia
Search

Discretization

From Wikipedia, the free encyclopedia
Conversion of continuous functions into discrete counterparts
A solution to a discretized partial differential equation, obtained with thefinite element method.

Inapplied mathematics,discretization is the process of transferringcontinuous functions, models, variables, and equations intodiscrete 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 abinary variable (creating adichotomy formodeling purposes, as inbinary classification).

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

Whenever continuous data isdiscretized, there is always some amount ofdiscretization error. The goal is to reduce the amount to a level considerednegligible for themodeling purposes at hand.

The termsdiscretization andquantization often have the samedenotation but not always identicalconnotations. (Specifically, the two terms share asemantic field.) The same is true ofdiscretization error andquantization error.

Mathematical methods relating to discretization include theEuler–Maruyama method and thezero-order hold.

Discretization of linear state space models

[edit]

Discretization is also concerned with the transformation of continuousdifferential equations into discretedifference equations, suitable fornumerical computing.

The following continuous-timestate space model

x˙(t)=Ax(t)+Bu(t)+w(t)y(t)=Cx(t)+Du(t)+v(t){\displaystyle {\begin{aligned}{\dot {\mathbf {x} }}(t)&=\mathbf {Ax} (t)+\mathbf {Bu} (t)+\mathbf {w} (t)\\[2pt]\mathbf {y} (t)&=\mathbf {Cx} (t)+\mathbf {Du} (t)+\mathbf {v} (t)\end{aligned}}}

wherev andw are continuous zero-meanwhite noise sources withpower spectral densities

w(t)N(0,Q)v(t)N(0,R){\displaystyle {\begin{aligned}\mathbf {w} (t)&\sim N(0,\mathbf {Q} )\\[2pt]\mathbf {v} (t)&\sim N(0,\mathbf {R} )\end{aligned}}}

can be discretized, assumingzero-order hold for the inputu and continuous integration for the noisev, to

x[k+1]=Adx[k]+Bdu[k]+w[k]y[k]=Cdx[k]+Ddu[k]+v[k]{\displaystyle {\begin{aligned}\mathbf {x} [k+1]&=\mathbf {A_{d}x} [k]+\mathbf {B_{d}u} [k]+\mathbf {w} [k]\\[2pt]\mathbf {y} [k]&=\mathbf {C_{d}x} [k]+\mathbf {D_{d}u} [k]+\mathbf {v} [k]\end{aligned}}}

with covariances

w[k]N(0,Qd)v[k]N(0,Rd){\displaystyle {\begin{aligned}\mathbf {w} [k]&\sim N(0,\mathbf {Q_{d}} )\\[2pt]\mathbf {v} [k]&\sim N(0,\mathbf {R_{d}} )\end{aligned}}}

where

Ad=eAT=L1{(sIA)1}t=TBd=(τ=0TeAτdτ)BCd=CDd=DQd=τ=0TeAτQeAτdτRd=R1T{\displaystyle {\begin{aligned}\mathbf {A_{d}} &=e^{\mathbf {A} T}={\mathcal {L}}^{-1}{\Bigl \{}(s\mathbf {I} -\mathbf {A} )^{-1}{\Bigr \}}_{t=T}\\[4pt]\mathbf {B_{d}} &=\left(\int _{\tau =0}^{T}e^{\mathbf {A} \tau }d\tau \right)\mathbf {B} \\[4pt]\mathbf {C_{d}} &=\mathbf {C} \\[8pt]\mathbf {D_{d}} &=\mathbf {D} \\[2pt]\mathbf {Q_{d}} &=\int _{\tau =0}^{T}e^{\mathbf {A} \tau }\mathbf {Q} e^{\mathbf {A} ^{\top }\tau }d\tau \\[2pt]\mathbf {R_{d}} &=\mathbf {R} {\frac {1}{T}}\end{aligned}}}

andT is thesample time. IfA isnonsingular,Bd=A1(AdI)B.{\displaystyle \mathbf {B_{d}} =\mathbf {A} ^{-1}(\mathbf {A_{d}} -\mathbf {I} )\mathbf {B} .}

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 computeAd andBd in one step is by utilizing the following property:[2]: p. 215 

e[AB00]T=[AdBd0I]{\displaystyle e^{{\begin{bmatrix}\mathbf {A} &\mathbf {B} \\\mathbf {0} &\mathbf {0} \end{bmatrix}}T}={\begin{bmatrix}\mathbf {A_{d}} &\mathbf {B_{d}} \\\mathbf {0} &\mathbf {I} \end{bmatrix}}}

WhereAd andBd are the discretized state-space matrices.

Discretization of process noise

[edit]

Numerical evaluation ofQd 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]F=[AQ0A]TG=eF=[Ad1Qd0Ad]{\displaystyle {\begin{aligned}\mathbf {F} &={\begin{bmatrix}-\mathbf {A} &\mathbf {Q} \\\mathbf {0} &\mathbf {A} ^{\top }\end{bmatrix}}T\\[2pt]\mathbf {G} &=e^{\mathbf {F} }={\begin{bmatrix}\dots &\mathbf {A_{d}} ^{-1}\mathbf {Q_{d}} \\\mathbf {0} &\mathbf {A_{d}} ^{\top }\end{bmatrix}}\end{aligned}}}The discretized process noise is then evaluated by multiplying the transpose of the lower-right partition ofG with the upper-right partition ofG:Qd=(Ad)(Ad1Qd)=Ad(Ad1Qd).{\displaystyle \mathbf {Q_{d}} =(\mathbf {A_{d}} ^{\top })^{\top }(\mathbf {A_{d}} ^{-1}\mathbf {Q_{d}} )=\mathbf {A_{d}} (\mathbf {A_{d}} ^{-1}\mathbf {Q_{d}} ).}

Derivation

[edit]

Starting with the continuous modelx˙(t)=Ax(t)+Bu(t){\displaystyle \mathbf {\dot {x}} (t)=\mathbf {Ax} (t)+\mathbf {Bu} (t)}we know that thematrix exponential isddteAt=AeAt=eAtA{\displaystyle {\frac {d}{dt}}e^{\mathbf {A} t}=\mathbf {A} e^{\mathbf {A} t}=e^{\mathbf {A} t}\mathbf {A} }and by premultiplying the model we geteAtx˙(t)=eAtAx(t)+eAtBu(t){\displaystyle e^{-\mathbf {A} t}\mathbf {\dot {x}} (t)=e^{-\mathbf {A} t}\mathbf {Ax} (t)+e^{-\mathbf {A} t}\mathbf {Bu} (t)}which we recognize asddt[eAtx(t)]=eAtBu(t){\displaystyle {\frac {d}{dt}}{\Bigl [}e^{-\mathbf {A} t}\mathbf {x} (t){\Bigr ]}=e^{-\mathbf {A} t}\mathbf {Bu} (t)}and by integrating,eAtx(t)e0x(0)=0teAτBu(τ)dτx(t)=eAtx(0)+0teA(tτ)Bu(τ)dτ{\displaystyle {\begin{aligned}e^{-\mathbf {A} t}\mathbf {x} (t)-e^{0}\mathbf {x} (0)&=\int _{0}^{t}e^{-\mathbf {A} \tau }\mathbf {Bu} (\tau )d\tau \\[2pt]\mathbf {x} (t)&=e^{\mathbf {A} t}\mathbf {x} (0)+\int _{0}^{t}e^{\mathbf {A} (t-\tau )}\mathbf {Bu} (\tau )d\tau \end{aligned}}}which is an analytical solution to the continuous model.

Now we want to discretise the above expression. We assume thatu isconstant during each timestep.x[k]=def x(kT)x[k]=eAkTx(0)+0kTeA(kTτ)Bu(τ)dτx[k+1]=eA(k+1)Tx(0)+0(k+1)TeA[(k+1)Tτ]Bu(τ)dτx[k+1]=eAT[eAkTx(0)+0kTeA(kTτ)Bu(τ)dτ]+kT(k+1)TeA(kT+Tτ)Bu(τ)dτ{\displaystyle {\begin{aligned}\mathbf {x} [k]&\,{\stackrel {\mathrm {def} }{=}}\ \mathbf {x} (kT)\\[6pt]\mathbf {x} [k]&=e^{\mathbf {A} kT}\mathbf {x} (0)+\int _{0}^{kT}e^{\mathbf {A} (kT-\tau )}\mathbf {Bu} (\tau )d\tau \\[4pt]\mathbf {x} [k+1]&=e^{\mathbf {A} (k+1)T}\mathbf {x} (0)+\int _{0}^{(k+1)T}e^{\mathbf {A} [(k+1)T-\tau ]}\mathbf {Bu} (\tau )d\tau \\[2pt]\mathbf {x} [k+1]&=e^{\mathbf {A} T}\left[e^{\mathbf {A} kT}\mathbf {x} (0)+\int _{0}^{kT}e^{\mathbf {A} (kT-\tau )}\mathbf {Bu} (\tau )d\tau \right]+\int _{kT}^{(k+1)T}e^{\mathbf {A} (kT+T-\tau )}\mathbf {B} \mathbf {u} (\tau )d\tau \end{aligned}}}We recognize the bracketed expression asx[k]{\displaystyle \mathbf {x} [k]}, and the second term can be simplified by substituting with the functionv(τ)=kT+Tτ{\displaystyle v(\tau )=kT+T-\tau }. Note thatdτ=dv{\displaystyle d\tau =-dv}. We also assume thatu is constant during theintegral, which in turn yields

x[k+1]=eATx[k](v(kT)v((k+1)T)eAvdv)Bu[k]=eATx[k](T0eAvdv)Bu[k]=eATx[k]+(0TeAvdv)Bu[k]=eATx[k]+A1(eATI)Bu[k]{\displaystyle {\begin{aligned}\mathbf {x} [k+1]&=e^{\mathbf {A} T}\mathbf {x} [k]-\left(\int _{v(kT)}^{v((k+1)T)}e^{\mathbf {A} v}dv\right)\mathbf {Bu} [k]\\[2pt]&=e^{\mathbf {A} T}\mathbf {x} [k]-\left(\int _{T}^{0}e^{\mathbf {A} v}dv\right)\mathbf {Bu} [k]\\[2pt]&=e^{\mathbf {A} T}\mathbf {x} [k]+\left(\int _{0}^{T}e^{\mathbf {A} v}dv\right)\mathbf {Bu} [k]\\[4pt]&=e^{\mathbf {A} T}\mathbf {x} [k]+\mathbf {A} ^{-1}\left(e^{\mathbf {A} T}-\mathbf {I} \right)\mathbf {Bu} [k]\end{aligned}}}

which is an exact solution to the discretization problem.

WhenA is singular, the latter expression can still be used by replacingeAT{\displaystyle e^{\mathbf {A} T}} by itsTaylor expansion,eAT=k=01k!(AT)k.{\displaystyle e^{\mathbf {A} T}=\sum _{k=0}^{\infty }{\frac {1}{k!}}(\mathbf {A} T)^{k}.}This yieldsx[k+1]=eATx[k]+(0TeAvdv)Bu[k]=(k=01k!(AT)k)x[k]+(k=11k!Ak1Tk)Bu[k],{\displaystyle {\begin{aligned}\mathbf {x} [k+1]&=e^{\mathbf {A} T}\mathbf {x} [k]+\left(\int _{0}^{T}e^{\mathbf {A} v}dv\right)\mathbf {Bu} [k]\\[2pt]&=\left(\sum _{k=0}^{\infty }{\frac {1}{k!}}(\mathbf {A} T)^{k}\right)\mathbf {x} [k]+\left(\sum _{k=1}^{\infty }{\frac {1}{k!}}\mathbf {A} ^{k-1}T^{k}\right)\mathbf {Bu} [k],\end{aligned}}}which is the form used in practice.

Approximations

[edit]

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 timestepseATI+AT{\displaystyle e^{\mathbf {A} T}\approx \mathbf {I} +\mathbf {A} T}. The approximate solution then becomes:x[k+1](I+AT)x[k]+TBu[k]{\displaystyle \mathbf {x} [k+1]\approx (\mathbf {I} +\mathbf {A} T)\mathbf {x} [k]+T\mathbf {Bu} [k]}

This is also known as theEuler method, which is also known as the forward Euler method. Other possible approximations areeAT(IAT)1{\displaystyle e^{\mathbf {A} T}\approx (\mathbf {I} -\mathbf {A} T)^{-1}}, otherwise known as the backward Euler method andeAT(I+12AT)(I12AT)1{\displaystyle e^{\mathbf {A} T}\approx (\mathbf {I} +{\tfrac {1}{2}}\mathbf {A} T)(\mathbf {I} -{\tfrac {1}{2}}\mathbf {A} T)^{-1}}, which is known as thebilinear 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

[edit]
Main article:Discretization of continuous features

Instatistics 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

[edit]
Main article:Distribution (mathematics) § Convolution_versus_Multiplication

Ingeneralized functions theory,discretizationarises as a particular case of theConvolution Theoremontempered distributions

F{fIII}=F{f}III{\displaystyle {\mathcal {F}}\{f*\operatorname {III} \}={\mathcal {F}}\{f\}\cdot \operatorname {III} }
F{αIII}=F{α}III{\displaystyle {\mathcal {F}}\{\alpha \cdot \operatorname {III} \}={\mathcal {F}}\{\alpha \}*\operatorname {III} }

whereIII{\displaystyle \operatorname {III} } is theDirac comb,III{\displaystyle \cdot \operatorname {III} } is discretization,III{\displaystyle *\operatorname {III} } isperiodization,f{\displaystyle f} is a rapidly decreasing tempered distribution(e.g. aDirac delta functionδ{\displaystyle \delta } or any othercompactly supported function),α{\displaystyle \alpha } is asmooth,slowly growingordinary function (e.g. the function that is constantly1{\displaystyle 1}or any otherband-limited function)andF{\displaystyle {\mathcal {F}}} is the (unitary, ordinary frequency)Fourier transform.Functionsα{\displaystyle \alpha } which are not smooth can be made smooth using amollifier prior to discretization.

As an example, discretization of the function that is constantly1{\displaystyle 1} yields thesequence[..,1,1,1,..]{\displaystyle [..,1,1,1,..]} which, interpreted as the coefficients of alinear combination ofDirac delta functions, forms aDirac comb. If additionallytruncation is applied, one obtains finite sequences, e.g.[1,1,1,1]{\displaystyle [1,1,1,1]}. They are discrete in both, time and frequency.

See also

[edit]

References

[edit]
  1. ^Analytic Sciences Corporation. Technical Staff. (1974).Applied optimal estimation. Gelb, Arthur, 1937-. Cambridge, Mass.: M.I.T. Press. pp. 121.ISBN 0-262-20027-9.OCLC 960061.
  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

Further reading

[edit]

External links

[edit]
Discretization at Wikipedia'ssister projects
Authority control databases: NationalEdit this at Wikidata
Retrieved from "https://en.wikipedia.org/w/index.php?title=Discretization&oldid=1306715000"
Categories:
Hidden categories:

[8]ページ先頭

©2009-2026 Movatter.jp