{
  "aliases": null,
  "backlinks": null,
  "body": "\n## Example\n\nLet $x(t)$ and $s(t)$, $t \\in \\R$, be real, jointly wide-sense [[stationary processes|DT0QXJE705]] with mean $0$.\nWrite $R_{xx}(\\tau) = E[x(u + \\tau)\\, x(u)]$ and $R_{sx}(\\tau) = E[s(u + \\tau)\\, x(u)]$; they do not depend on $u$.\nThe task is to estimate $s(t)$ by a causal linear filter of the observations, $\\hat s(t) = \\int_0^\\infty h(\\tau)\\, x(t - \\tau)\\, d\\tau$, with the smallest mean square error $E\\bigl[(s(t) - \\hat s(t))^2\\bigr]$.\nThe optimal impulse response $h$ satisfies the *Wiener filter equation*\n$$R_{sx}(\\sigma) = \\int_0^\\infty h(\\tau)\\, R_{xx}(\\sigma - \\tau)\\, d\\tau, \\quad \\sigma \\ge 0.$$\nThis is a [[Wiener–Hopf equation|QYY4NMDY5H]] of the first kind with kernel $R_{xx}$.\n\nCheck of the equation.\nThe error $e(t) = s(t) - \\hat s(t)$ of the best filter is orthogonal to every observation $x(t - \\sigma)$ with $\\sigma \\ge 0$.\nOtherwise a small change of $h$ would lower the error.\nSo $E[s(t)\\, x(t - \\sigma)] = \\int_0^\\infty h(\\tau)\\, E[x(t - \\tau)\\, x(t - \\sigma)]\\, d\\tau$.\nThe left side is $R_{sx}(\\sigma)$ and the expectation under the integral is $R_{xx}(\\sigma - \\tau)$, which gives the equation.\nThe condition holds only for $\\sigma \\ge 0$, because the filter may use only the past.\n\n## Remarks\n\nWithout the causality condition, the equation holds for all $\\sigma \\in \\R$, and the Fourier transform solves it: $H = S_{sx} / S_{xx}$, with $S$ the spectral densities given by the [[Wiener–Khinchin theorem|3ZXN26PW4G]].\nWith causality, the [[Wiener–Hopf method|H4NXEY6QTZ]] applies.\nOne factors $S_{xx} = S^+ S^-$ into factors without zeros in the two half-planes.\nThe causal filter is then $H = \\bigl[S_{sx}/S^-\\bigr]_+ / S^+$, where $[\\cdot]_+$ keeps the part that comes from a function supported on $[0, \\infty)$.\nThis step is called spectral factorization.\n\n## Explanations\n\n### L1 human\n\nOne wants to clean up a noisy signal as it arrives, using only what has been seen so far.\nThe best linear way to do it makes the error uncorrelated with all past observations.\nWriting this down gives an integral equation on a half-line, because only the past counts.\nThat half-line is what makes it a Wiener–Hopf equation instead of a plain convolution.\n",
  "commit": "ff8a40749dc16545e3d2fc637f6b0196e81d0bfa",
  "front": {
    "instance_of": [
      "QYY4NMDY5H"
    ],
    "kind": "example",
    "msc": [
      "60G35",
      "93E11",
      "45E10"
    ],
    "name": "Wiener filter equation",
    "sources": [
      {
        "url": "https://en.wikipedia.org/wiki/Wiener_filter"
      }
    ],
    "tag": "BVFGX5JH7X",
    "uses": [
      "DT0QXJE705",
      "3ZXN26PW4G",
      "H4NXEY6QTZ",
      "QYY4NMDY5H"
    ]
  },
  "kind": "example",
  "link": "https://tamnd.github.io/math2/node/BVFGX5JH7X/",
  "links": [
    {
      "field": "instance_of",
      "target": "QYY4NMDY5H"
    },
    {
      "field": "uses",
      "target": "DT0QXJE705"
    },
    {
      "field": "uses",
      "target": "3ZXN26PW4G"
    },
    {
      "field": "uses",
      "target": "H4NXEY6QTZ"
    },
    {
      "field": "uses",
      "target": "QYY4NMDY5H"
    }
  ],
  "markdown": "https://tamnd.github.io/math2/node/BVFGX5JH7X.md",
  "msc": [
    "60G35",
    "93E11",
    "45E10"
  ],
  "name": "Wiener filter equation",
  "prov": null,
  "role": "",
  "source": "https://github.com/tamnd/math2/blob/main/nodes/BVF/BVFGX5JH7X.md",
  "status": null,
  "tag": "BVFGX5JH7X",
  "uri": "m2://BVFGX5JH7X",
  "url": "https://tamnd.github.io/math2/wiki/wiener-filter-equation/",
  "writing": {
    "tag": "BVFGX5JH7X",
    "kind": "example",
    "level": "W0",
    "next": [
      {
        "what": "an inventory row",
        "note": "the row of the inventory that the node accounts for",
        "have": 0,
        "want": 1
      },
      {
        "what": "a source with a locator",
        "have": 0,
        "want": 1
      }
    ]
  }
}
