Main Page: Difference between revisions

From formulasearchengine
Jump to navigation Jump to search
mNo edit summary
No edit summary
 
(536 intermediate revisions by more than 100 users not shown)
Line 1: Line 1:
[[Image:Finite element solution.svg|right|thumb|A solution to a discretized partial differential equation, obtained with the [[finite element method]].]]
This is a preview for the new '''MathML rendering mode''' (with SVG fallback), which is availble in production for registered users.
In [[mathematics]], '''discretization''' concerns the process of transferring [[continuous function|continuous]] models and equations into [[wiktionary:discrete|discrete]] counterparts.  This process is usually carried out as a first step toward making them suitable for numerical evaluation and implementation on digital computers. Processing on a digital computer requires another process called [[Quantization (signal processing)|quantization]]. '''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 [[conceptual model|modeling]] purposes).  


* [[Euler–Maruyama method]]
If you would like use the '''MathML''' rendering mode, you need a wikipedia user account that can be registered here [[https://en.wikipedia.org/wiki/Special:UserLogin/signup]]
* [[Zero-order hold]]
* Only registered users will be able to execute this rendering mode.
* Note: you need not enter a email address (nor any other private information). Please do not use a password that you use elsewhere.


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 of category ''granularity'', as when multiple discrete variables are aggregated or multiple discrete categories fused.
Registered users will be able to choose between the following three rendering modes:


Whenever continuous data is '''discretized''', there is always some amount of [[discretization error]]. The goal is to reduce the amount to a level considered [[wikt:negligible|negligible]] for the [[conceptual model|modeling]] purposes at hand.
'''MathML'''
:<math forcemathmode="mathml">E=mc^2</math>


== Discretization of linear state space models ==
<!--'''PNG'''  (currently default in production)
Discretization is also concerned with the transformation of continuous [[differential equation]]s into discrete [[difference equations]], suitable for [[Numerical analysis|numerical computing]].
:<math forcemathmode="png">E=mc^2</math>


The following continuous-time [[State space (controls)|state space model]]
'''source'''
:<math forcemathmode="source">E=mc^2</math> -->


:<math>\dot{\mathbf{x}}(t) = \mathbf A \mathbf{x}(t) + \mathbf B \mathbf{u}(t) + \mathbf{w}(t)</math>
<span style="color: red">Follow this [https://en.wikipedia.org/wiki/Special:Preferences#mw-prefsection-rendering link] to change your Math rendering settings.</span> You can also add a [https://en.wikipedia.org/wiki/Special:Preferences#mw-prefsection-rendering-skin Custom CSS] to force the MathML/SVG rendering or select different font families. See [https://www.mediawiki.org/wiki/Extension:Math#CSS_for_the_MathML_with_SVG_fallback_mode these examples].
:<math>\mathbf{y}(t) = \mathbf C \mathbf{x}(t) + \mathbf D \mathbf{u}(t) + \mathbf{v}(t)</math>


where ''v'' and ''w'' are continuous zero-mean [[white noise]] sources with [[covariance]]s
==Demos==


:<math>\mathbf{w}(t) \sim N(0,\mathbf Q)</math>
Here are some [https://commons.wikimedia.org/w/index.php?title=Special:ListFiles/Frederic.wang demos]:
:<math>\mathbf{v}(t) \sim N(0,\mathbf R)</math>


can be discretized, assuming [[zero-order hold]] for the input ''u'' and continuous integration for the noise ''v'', to


:<math>\mathbf{x}[k+1] = \mathbf A_d \mathbf{x}[k] + \mathbf B_d \mathbf{u}[k] + \mathbf{w}[k]</math>
* accessibility:
:<math>\mathbf{y}[k] = \mathbf C_d \mathbf{x}[k] + \mathbf D_d \mathbf{u}[k] +  \mathbf{v}[k]</math>
** Safari + VoiceOver: [https://commons.wikimedia.org/wiki/File:VoiceOver-Mac-Safari.ogv video only], [[File:Voiceover-mathml-example-1.wav|thumb|Voiceover-mathml-example-1]], [[File:Voiceover-mathml-example-2.wav|thumb|Voiceover-mathml-example-2]], [[File:Voiceover-mathml-example-3.wav|thumb|Voiceover-mathml-example-3]], [[File:Voiceover-mathml-example-4.wav|thumb|Voiceover-mathml-example-4]], [[File:Voiceover-mathml-example-5.wav|thumb|Voiceover-mathml-example-5]], [[File:Voiceover-mathml-example-6.wav|thumb|Voiceover-mathml-example-6]], [[File:Voiceover-mathml-example-7.wav|thumb|Voiceover-mathml-example-7]]
** [https://commons.wikimedia.org/wiki/File:MathPlayer-Audio-Windows7-InternetExplorer.ogg Internet Explorer + MathPlayer (audio)]
** [https://commons.wikimedia.org/wiki/File:MathPlayer-SynchronizedHighlighting-WIndows7-InternetExplorer.png Internet Explorer + MathPlayer (synchronized highlighting)]
** [https://commons.wikimedia.org/wiki/File:MathPlayer-Braille-Windows7-InternetExplorer.png Internet Explorer + MathPlayer (braille)]
** NVDA+MathPlayer: [[File:Nvda-mathml-example-1.wav|thumb|Nvda-mathml-example-1]], [[File:Nvda-mathml-example-2.wav|thumb|Nvda-mathml-example-2]], [[File:Nvda-mathml-example-3.wav|thumb|Nvda-mathml-example-3]], [[File:Nvda-mathml-example-4.wav|thumb|Nvda-mathml-example-4]], [[File:Nvda-mathml-example-5.wav|thumb|Nvda-mathml-example-5]], [[File:Nvda-mathml-example-6.wav|thumb|Nvda-mathml-example-6]], [[File:Nvda-mathml-example-7.wav|thumb|Nvda-mathml-example-7]].
** Orca: There is ongoing work, but no support at all at the moment [[File:Orca-mathml-example-1.wav|thumb|Orca-mathml-example-1]], [[File:Orca-mathml-example-2.wav|thumb|Orca-mathml-example-2]], [[File:Orca-mathml-example-3.wav|thumb|Orca-mathml-example-3]], [[File:Orca-mathml-example-4.wav|thumb|Orca-mathml-example-4]], [[File:Orca-mathml-example-5.wav|thumb|Orca-mathml-example-5]], [[File:Orca-mathml-example-6.wav|thumb|Orca-mathml-example-6]], [[File:Orca-mathml-example-7.wav|thumb|Orca-mathml-example-7]].
** From our testing, ChromeVox and JAWS are not able to read the formulas generated by the MathML mode.


with covariances
==Test pages ==


:<math>\mathbf{w}[k] \sim N(0,\mathbf Q_d)</math>
To test the '''MathML''', '''PNG''', and '''source''' rendering modes, please go to one of the following test pages:
:<math>\mathbf{v}[k] \sim N(0,\mathbf R_d)</math>
*[[Displaystyle]]
*[[MathAxisAlignment]]
*[[Styling]]
*[[Linebreaking]]
*[[Unique Ids]]
*[[Help:Formula]]


where
*[[Inputtypes|Inputtypes (private Wikis only)]]
 
*[[Url2Image|Url2Image (private Wikis only)]]
:<math>\mathbf A_d = e^{\mathbf A T} = \mathcal{L}^{-1}\{(s\mathbf I - \mathbf A)^{-1}\}_{t=T} </math>
==Bug reporting==
:<math>\mathbf B_d = \left( \int_{\tau=0}^{T}e^{\mathbf A \tau}d\tau \right) \mathbf B = \mathbf A^{-1}(\mathbf A_d - I)\mathbf B </math>, if <math>\mathbf A</math> is [[Invertible matrix|nonsingular]]
If you find any bugs, please report them at [https://bugzilla.wikimedia.org/enter_bug.cgi?product=MediaWiki%20extensions&component=Math&version=master&short_desc=Math-preview%20rendering%20problem Bugzilla], or write an email to math_bugs (at) ckurs (dot) de .
:<math>\mathbf C_d = \mathbf C </math>
:<math>\mathbf D_d = \mathbf D </math>
:<math>\mathbf Q_d = \int_{\tau=0}^{T} e^{\mathbf A \tau} \mathbf Q e^{\mathbf A^T \tau}  d\tau </math>
:<math>\mathbf R_d = \frac{1}{T} \mathbf R </math>
 
and <math>T</math> is the sample time, although <math>\mathbf A^T</math> is the transposed matrix of <math>\mathbf A</math>.
 
A clever trick to compute ''Ad'' and ''Bd'' in one step is by utilizing the following property, p.&nbsp;215:<ref>Raymond DeCarlo: ''Linear Systems: A State Variable Approach with Numerical Implementation'', Prentice Hall, NJ, 1989</ref>
:<math>e^{\begin{bmatrix} \mathbf{A} & \mathbf{B} \\
                \mathbf{0} & \mathbf{0} \end{bmatrix} T} = \begin{bmatrix} \mathbf{M_{11}} & \mathbf{M_{12}} \\
                                                            \mathbf{0} & \mathbf{I} \end{bmatrix}</math>
 
and then having
:<math>\mathbf A_d = \mathbf M_{11}</math>
:<math>\mathbf B_d = \mathbf M_{12}</math>
 
=== Discretization of process noise ===
Numerical evaluation of <math>\mathbf{Q}_d</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 (Van Loan, 1978):
:<math> \mathbf{F} =
\begin{bmatrix} -\mathbf{A} & \mathbf{Q} \\
                \mathbf{0} & \mathbf{A}^T \end{bmatrix} T</math>
:<math> \mathbf{G} = e^\mathbf{F} =
\begin{bmatrix} \dots & \mathbf{A}_d^{-1}\mathbf{Q}_d \\
          \mathbf{0} & \mathbf{A}_d^T            \end{bmatrix}.</math>
The discretized process noise is then evaluated by multiplying the transpose of the lower-right partition of '''G''' with the  upper-right partition of '''G''':
:<math>\mathbf{Q}_d = (\mathbf{A}_d^T)^T (\mathbf{A}_d^{-1}\mathbf{Q}_d). </math>
 
=== Derivation ===
Starting with the continuous model
:<math>\mathbf{\dot{x}}(t) = \mathbf A\mathbf x(t) + \mathbf B \mathbf u(t)</math>
we know that the [[matrix exponential]] is
:<math>\frac{d}{dt}e^{\mathbf At} = \mathbf A e^{\mathbf At} = e^{\mathbf At} \mathbf A</math>
and by premultiplying the model we get
:<math>e^{-\mathbf At} \mathbf{\dot{x}}(t) = e^{-\mathbf At} \mathbf A\mathbf x(t) + e^{-\mathbf At} \mathbf B\mathbf u(t)</math>
which we recognize as
:<math>\frac{d}{dt}(e^{-\mathbf At}\mathbf x(t)) = e^{-\mathbf At} \mathbf B\mathbf u(t)</math>
and by integrating..
:<math>e^{-\mathbf At}\mathbf x(t) - e^0\mathbf x(0) = \int_0^t e^{-\mathbf A\tau}\mathbf B\mathbf u(\tau) d\tau</math>
:<math>\mathbf x(t) = e^{\mathbf At}\mathbf x(0) + \int_0^t e^{\mathbf A(t-\tau)} \mathbf B\mathbf u(\tau) d \tau</math>
which is an analytical solution to the continuous model.
 
Now we want to discretise the above expression. We assume that u is [[mathematical constant|constant]] during each timestep.
:<math>\mathbf x[k] \ \stackrel{\mathrm{def}}{=}\  \mathbf x(kT)</math>
:<math>\mathbf x[k] = e^{\mathbf AkT}\mathbf x(0) + \int_0^{kT} e^{\mathbf A(kT-\tau)} \mathbf B\mathbf u(\tau) d \tau</math>
:<math>\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 B\mathbf u(\tau) d \tau</math>
:<math>\mathbf x[k+1] = e^{\mathbf AT} \left[  e^{\mathbf AkT}\mathbf x(0) + \int_0^{kT} e^{\mathbf A(kT-\tau)} \mathbf B\mathbf u(\tau) d \tau \right]+ \int_{kT}^{(k+1)T} e^{\mathbf A(kT+T-\tau)} \mathbf B\mathbf u(\tau) d \tau</math>
We recognize the bracketed expression as <math>\mathbf x[k]</math>, and the second term can be simplified by substituting <math>v = kT + T - \tau</math>. We also assume that <math>\mathbf u</math> is constant during the [[integral]], which in turn yields
:<math> \begin{matrix} \mathbf x[k+1]&=& e^{\mathbf AT}\mathbf x[k] + \left( \int_0^T e^{\mathbf Av} dv \right) \mathbf B\mathbf u[k] \\
&=&e^{\mathbf AT}\mathbf x[k] + \mathbf A^{-1}\left(e^{\mathbf AT}-\mathbf I \right) \mathbf B\mathbf u[k] \end{matrix}</math>
which is an exact solution to the discretization problem.
 
=== 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 <math>e^{\mathbf AT} \approx \mathbf I + \mathbf A T</math>. The approximate solution then becomes:
:<math>\mathbf x[k+1] \approx (\mathbf I + \mathbf AT) \mathbf x[k] + T\mathbf B \mathbf u[k] </math>
 
Other possible approximations are <math>e^{\mathbf AT} \approx \left( \mathbf I - \mathbf A T \right)^{-1}</math> and <math>e^{\mathbf AT} \approx \left( \mathbf I +\frac{1}{2}  \mathbf A T \right) \left( \mathbf I - \frac{1}{2} \mathbf A T \right)^{-1}</math>. Each of them have different stability properties. The last one is known as the bilinear transform, or Tustin transform, and preserves the (in)stability of the continuous-time system.
 
== Discretization of continuous features ==
 
{{Main|Discretization of continuous features}}
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.
 
==See also==
*[[Discrete space]]
*[[Time-scale calculus]]
*[[Discrete event simulation]]
*[[Stochastic simulation]]
*[[Finite volume method for unsteady flow]]
*[[Properties of discretization schemes]]
 
== References ==
<references/>
* {{cite book|author=Robert Grover Brown & Patrick Y. C. Hwang|title=Introduction to random signals and applied Kalman filtering|edition=3rd|isbn=978-0471128397}}
* {{cite book|publisher=Saunders College Publishing|location=Philadelphia, PA, USA|year=1984|author=Chi-Tsong Chen|title=Linear System Theory and Design|isbn=0030716918}}
* {{cite journal|author=C. Van Loan|title=Computing integrals involving the matrix exponential|doi=10.1109/TAC.1978.1101743|journal=IEEE Transactions on Automatic
Control|volume=23|issue=3|pages=395–404|date=Jun 1978}}
* {{cite book|author=R.H. Middleton & G.C. Goodwin |title=Digital control and estimation: a unified approach|year=1990|page=33f|isbn=0132116650}}
 
==External links==
{{sisterlinks}}
 
[[Category:Numerical analysis]]
[[Category:Applied mathematics]]
[[Category:Functional analysis]]
[[Category:Iterative methods]]
[[Category:Control theory]]
 
[[de:Diskretisierung]]
[[hr:Diskretizacija]]
[[it:Discretizzazione]]
[[pl:Dyskretyzacja (matematyka)]]
[[zh:离散化]]

Latest revision as of 23:52, 15 September 2019

This is a preview for the new MathML rendering mode (with SVG fallback), which is availble in production for registered users.

If you would like use the MathML rendering mode, you need a wikipedia user account that can be registered here [[1]]

  • Only registered users will be able to execute this rendering mode.
  • Note: you need not enter a email address (nor any other private information). Please do not use a password that you use elsewhere.

Registered users will be able to choose between the following three rendering modes:

MathML


Follow this link to change your Math rendering settings. You can also add a Custom CSS to force the MathML/SVG rendering or select different font families. See these examples.

Demos

Here are some demos:


Test pages

To test the MathML, PNG, and source rendering modes, please go to one of the following test pages:

Bug reporting

If you find any bugs, please report them at Bugzilla, or write an email to math_bugs (at) ckurs (dot) de .