{"id":1484,"date":"2019-12-06T20:46:09","date_gmt":"2019-12-07T04:46:09","guid":{"rendered":"https:\/\/linearcontrol.info\/fundamentals\/?p=1484"},"modified":"2019-12-06T20:46:09","modified_gmt":"2019-12-07T04:46:09","slug":"sampling-part-iii","status":"publish","type":"post","link":"https:\/\/linearcontrol.info\/fundamentals\/index.php\/2019\/12\/06\/sampling-part-iii\/","title":{"rendered":"Sampling. Part III"},"content":{"rendered":"\n<p>In previous posts we have explored sampling of continuous-time signals and introduced the Z-transform as a tool to work with discrete-time signals. In this post we address the other end of the process, that is the reconstruction of a signal from its samples.<\/p>\n\n\n\n<!--more-->\n\n\n\n<h2>The signal reconstruction problem<\/h2>\n\n\n\n<p>By signal reconstruction we mean the process of generating a continuous-times signal $u_r(t)$ from periodic samples $u[n]$, $n \\in \\mathbb{Z}$, that is the inverse operation of sampling. As with sampling, one can easily construct a physical device, for example a <em>zero-order holder<\/em> to produce the continuous-time signal <\/p>\n\n\n\n<p>$$<br>u_r(t) = u[n], \\quad n T_s \\leq t \\leq (n+1) T_s<br>$$<\/p>\n\n\n\n<p>from given discrete samples $u[n]$. As with sampling, properly analyzing the behavior of such a device is a much more complicated task.<\/p>\n\n\n\n<p>Note that, in general, if $u[n]$ was obtained by sampling a continuous-time signal $u(t)$, that is $u[n] = u(n T_s)$, that there is no reason to expect that $u_r(t) = u(t)$. Nor that $u_r(t) = u_s(t)$, where $u_s(t)$ is the sample-and-hold version of the signal $u(t)$ as discussed <a href=\"https:\/\/linearcontrol.info\/fundamentals\/index.php\/2019\/12\/03\/sampling-part-i\/\">previously<\/a>. Indeed, the possibility of <em><a href=\"https:\/\/linearcontrol.info\/fundamentals\/index.php\/2019\/05\/30\/aliasing-and-the-brain\/\">aliasing<\/a><\/em> will generally make it impossible to exactly reconstruct the original continuous-time signals from its samples.<\/p>\n\n\n\n<p>Take for example the family of continuous-time sinusoidal signals<\/p>\n\n\n\n<p>$$<br>\\begin{aligned}<br>u_k(t) &amp;= \\cos(\\omega t + k \\omega_s t), &amp;<br>\\omega_s &amp;= \\frac{2 \\pi}{T_s}, &amp;<br>k &amp;\\in \\mathbb{Z}.<br>\\end{aligned}<br>$$   <\/p>\n\n\n\n<p>Because<\/p>\n\n\n\n<p> $$<br>u[n] = u_0(n T_s) = u_1(n T_s) = u_2(n T_s) = \\cdots<br>$$<\/p>\n\n\n\n<p>it should not be possible to distinguish between any of the members of the family exclusively from the samples $u[n]$. These signals are <em>aliases<\/em> of each other.<\/p>\n\n\n\n<p>We have two main reasons for studying signal reconstruction: the first is to characterize the continuous-time signal $u_r(t)$ that can be reconstructed from the samples $u[n]$, the second is to derive conditions under which it would be possible to exactly reconstruct a signal from its samples. We address the first in this post.<\/p>\n\n\n\n<h2>Signal reconstruction and the inverse Z-transform<\/h2>\n\n\n\n<p>Recall the Z-transform of a discrete-time signal $u[n]$, $n\\in\\mathbb{N}$, given by<\/p>\n\n\n\n<p> $$U[z]=\\mathcal{Z} \\{ u[n] \\} = \\sum_{n=0}^{\\infty} u[n] \\, z^{-n}.$$<\/p>\n\n\n\n<p>We have shown earlier that the existence of an exponential bound on $u[n]$ is a sufficient condition for $U[z]$ to exist and converge outside of a disk of radius, say, $\\tilde{\\sigma}_u$.<\/p>\n\n\n\n<p>Our first goal is to calculate the signal $u_r(t)$ from $U[z]$. We have <a href=\"https:\/\/linearcontrol.info\/fundamentals\/index.php\/2019\/12\/04\/sampling-part-ii\/\">shown in this post<\/a> that if $u_t(t)$ is the continuous-time modulated train of impulses obtained from a continuous-time signal $u(t)$ that it is possible to calculate $U_t(s)=\\mathcal{L}\\{u_t(t)\\}$ directly from the corresponding $U[z]$ by evaluating<\/p>\n\n\n\n<p>$$U_t(s)=\\left . U[z] \\right|_{z=e^{s T_s}} = U[e^{s T_s}].$$<\/p>\n\n\n\n<p>Conversely, one would expect that the Laplace inverse formula applied to $U[e^{s T_s}]$, that is<\/p>\n\n\n\n<p> $$<br>u_z(t) =\\mathcal{L}^{-1} \\left \\{ U[e^{s T_s}] \\right \\},<br>$$ <\/p>\n\n\n\n<p> should produce a continuous-time modulated train of impulses. From this train of impulses,$u_z(t)$, a time-invariant filter with impulse response $g_h(t) = 1(t) &#8211; 1(t &#8211; T_s)$, see <a href=\"https:\/\/linearcontrol.info\/fundamentals\/index.php\/2019\/12\/03\/sampling-part-i\/\">this post<\/a> for details, should provide the signal $u_r(t)$!<\/p>\n\n\n\n<p>Moreover, the magnitude of each impulse of the modulated train of impulses, $u_z(t)$, should coincide with the samples used to produce $U[z]$. That is, solving the above signal reconstruction problem actually amounts to inverting the Z-transform!<\/p>\n\n\n\n<h2>The inverse Z-transform<\/h2>\n\n\n\n<p>Start by noticing that <\/p>\n\n\n\n<p>$$U[e^{(s &#8211; j k\\omega_s) T_s}]= U[e^{s T_s}], \\quad k \\in \\mathbb{Z},$$<\/p>\n\n\n\n<p>to define<\/p>\n\n\n\n<p> $$<br>\\hat{U}[z] = \\begin{cases}<br>T_s U[z], &amp; |\\angle z| &lt; \\pi \\\\<br>0, &amp;  |\\angle z| \\geq \\pi <br>\\end{cases}<br>$$<\/p>\n\n\n\n<p>so that<\/p>\n\n\n\n<p>$$U[e^{s T_s}]= \\frac{1}{T_s} \\sum_{k = -\\infty}^{\\infty} \\hat{U}[e^{(s -j k \\omega_s) T_s}].$$<\/p>\n\n\n\n<p>Assume that $U[z]$ converges in $|z|>\\tilde{\\sigma}_u$ and $U[e^{s t}]$ converges in $\\operatorname{Re}\\{s\\} > \\sigma_{u} = \\log(\\tilde{\\sigma}_u)\/T_s$, and proceed by reversing the arguments discussed <a href=\"https:\/\/linearcontrol.info\/fundamentals\/index.php\/2019\/12\/03\/sampling-part-i\/\">in this post<\/a> to rewrite <\/p>\n\n\n\n<p> $$<br>\\begin{aligned}<br>U[e^{s T_s}] &amp;= \\frac{1}{T_s} \\sum_{k = -\\infty}^{\\infty} \\hat{U}[e^{(s -j k \\omega_s) T_s}], \\qquad \\operatorname{Re}\\{s\\} > \\sigma_{u} = \\log(\\tilde{\\sigma}_u)\/T_s \\\\<br>&amp;= \\frac{1}{2 \\pi j} \\lim_{\\rho\\rightarrow \\infty} \\int_{\\alpha &#8211; j \\rho}^{\\alpha + j \\rho} \\frac{\\hat{U}[e^{(s -z) T_s}]}{1 &#8211; e^{-z T_s}} \\, ds, \\qquad \\alpha > 0 \\\\<br>&amp;= \\mathcal{L} \\left \\{ \\hat{u}(t) \\sum_{k=-\\infty}^{\\infty} \\delta(t-n T_s)\\right \\},<br>\\end{aligned}<br>$$ <\/p>\n\n\n\n<p>in which<\/p>\n\n\n\n<p>$$\\hat{u}(t)=\\mathcal{L}^{-1} \\{ \\hat{U}(e^{s T_s}) \\}.$$<\/p>\n\n\n\n<p>Note that the magnitude of the impulses in $u_z(t) = \\mathcal{L}^{-1}\\{U[e^{s T_s}]\\}$ should coincide with<\/p>\n\n\n\n<p>$$u[n]=\\hat{u}(n T_s)=\\mathcal{Z}^{-1}\\{U[z]\\}.$$<\/p>\n\n\n\n<p>All that remains is to evaluate<\/p>\n\n\n\n<p> $$\\hat{u}(t)=\\mathcal{L}^{-1} \\{\\hat{U}(e^{s T_s}) \\}=\\frac{1}{2 \\pi j} \\lim_{\\rho\\rightarrow \\infty} \\int_{\\alpha-j\\rho}^{\\alpha+j\\rho} \\hat{U}[e^{s T_s}] \\, e^{s t} \\, ds.$$<\/p>\n\n\n\n<p>This can be done by using the fact that $\\hat{U}[z] = 0$ for $|\\angle z| \\geq \\pi$ to rewrite <\/p>\n\n\n\n<p>$$<br>\\begin{aligned}<br>\\hat{u}(t)&amp;=\\frac{1}{2 \\pi j} \\lim_{\\rho\\rightarrow \\infty} \\int_{\\alpha-j\\rho}^{\\alpha+j\\rho} \\hat{U}[e^{s T_s}] \\, e^{s t} \\, ds \\\\<br> &amp;=\\frac{T_s}{2 \\pi j} \\int_{\\alpha-j \\pi\/T_s}^{\\alpha+j\\pi\/T_s} U[e^{s T_s}] \\, e^{s t} \\, ds <br>\\end{aligned}<br>$$<\/p>\n\n\n\n<p>Changing variables<\/p>\n\n\n\n<p>$$<br>\\begin{aligned}<br> z &amp;= e^{s T_s} , &amp; s &amp;=\\frac{1}{T_s} \\log(z), &amp; ds &amp;= \\frac{dz}{T_s z},<br>\\end{aligned}<br>$$<\/p>\n\n\n\n<p>one obtains<\/p>\n\n\n\n<p> $$<br>\\begin{aligned}<br>\\hat{u}(t)&amp;=\\frac{1}{2 \\pi j} \\oint_{C} U[z] \\, z^{-1} \\, z^{t\/T_s} \\, dz <br>\\end{aligned}<br>$$ <\/p>\n\n\n\n<p>where $C$ is any circle centered at the origin with radius larger than $\\tilde{\\sigma}_u$. Finally <\/p>\n\n\n\n<p> $$<br>\\begin{aligned}<br>u[n]=\\hat{u}(n T_s)&amp;=\\frac{1}{2 \\pi j} \\oint_{C} U[z] \\, z^{n-1} \\, dz <br>\\end{aligned}<br>$$<\/p>\n\n\n\n<p>which is the inverse Z-transform formula.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In previous posts we have explored sampling of continuous-time signals and introduced the Z-transform as a tool to work with discrete-time signals. In this post we address the other end of the process, that is the reconstruction of a signal from its samples.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false},"categories":[7],"tags":[15,60,38,59],"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/linearcontrol.info\/fundamentals\/index.php\/wp-json\/wp\/v2\/posts\/1484"}],"collection":[{"href":"https:\/\/linearcontrol.info\/fundamentals\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/linearcontrol.info\/fundamentals\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/linearcontrol.info\/fundamentals\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/linearcontrol.info\/fundamentals\/index.php\/wp-json\/wp\/v2\/comments?post=1484"}],"version-history":[{"count":158,"href":"https:\/\/linearcontrol.info\/fundamentals\/index.php\/wp-json\/wp\/v2\/posts\/1484\/revisions"}],"predecessor-version":[{"id":1711,"href":"https:\/\/linearcontrol.info\/fundamentals\/index.php\/wp-json\/wp\/v2\/posts\/1484\/revisions\/1711"}],"wp:attachment":[{"href":"https:\/\/linearcontrol.info\/fundamentals\/index.php\/wp-json\/wp\/v2\/media?parent=1484"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/linearcontrol.info\/fundamentals\/index.php\/wp-json\/wp\/v2\/categories?post=1484"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/linearcontrol.info\/fundamentals\/index.php\/wp-json\/wp\/v2\/tags?post=1484"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}