Difference between revisions of "Singularity Functions"
(→Relationships Between Singularity Functions) |
|||
(23 intermediate revisions by 2 users not shown) | |||
Line 6: | Line 6: | ||
\begin{array}{cc} | \begin{array}{cc} | ||
0, & x\leq x_0\\ | 0, & x\leq x_0\\ | ||
− | (x- | + | (x-x_0)^n, & x>x_0 |
\end{array} | \end{array} | ||
\right. | \right. | ||
\end{align} | \end{align} | ||
</math></center> | </math></center> | ||
− | where <math>x</math>is the independent variable and <math>n</math> and <math>x_0</math> are constants. | + | where <math>x</math> is the independent variable and <math>n</math> and <math>x_0</math> are constants. |
Note that this definition is only useful when <math>n\geq 0</math>. Negative values of <math>n</math> are used to denote the ''impulse function'' (when <math>n=-1</math>) or its derivatives. Also note that it is common to leave the singularity undefined when <math>n=0</math> and <math>x=x_0</math>. That is to say, a fuller definition of the singularity function might be: | Note that this definition is only useful when <math>n\geq 0</math>. Negative values of <math>n</math> are used to denote the ''impulse function'' (when <math>n=-1</math>) or its derivatives. Also note that it is common to leave the singularity undefined when <math>n=0</math> and <math>x=x_0</math>. That is to say, a fuller definition of the singularity function might be: | ||
<center><math> | <center><math> | ||
Line 31: | Line 31: | ||
=== Alternate Names for <math>n\geq 0</math> === | === Alternate Names for <math>n\geq 0</math> === | ||
[[File:SingularitySamples.png|thumb|Graph of Unit Singularity Functions]] | [[File:SingularitySamples.png|thumb|Graph of Unit Singularity Functions]] | ||
− | In courses such as [[ECE | + | In courses such as [[ECE 280]] and [[EGR 224]], alternate names are given to different non-negative powers of the singularity function. Furthermore, singularity functions are generally written as functions of time rather than space, so: |
<center><math> | <center><math> | ||
\begin{align} | \begin{align} | ||
\begin{array}{|c|c|c|}\hline | \begin{array}{|c|c|c|}\hline | ||
\mbox{Singularity Function} & \mbox{Name} & \mbox{Alternate Symbol} \\ \hline \hline | \mbox{Singularity Function} & \mbox{Name} & \mbox{Alternate Symbol} \\ \hline \hline | ||
− | <t- | + | <t-t_0>^0 & \mbox{unit step function} & u(t-t_0) \\ \hline |
− | <t- | + | <t-t_0>^1 & \mbox{unit ramp function} & r(t-t_0)=(t-t_0)~u(t-t_0) \\ \hline |
− | \frac{1}{2}<t- | + | \frac{1}{2}<t-t_0>^2 & \mbox{unit parabola function} & p(t-t_0)=\frac{1}{2}(t-t_0)^2~u(t-t_0) \\ \hline |
\end{array} | \end{array} | ||
\end{align} | \end{align} | ||
Line 106: | Line 106: | ||
u(at)&=u(t)\\ | u(at)&=u(t)\\ | ||
u(-t)&=1-u(t)\\ | u(-t)&=1-u(t)\\ | ||
− | u(t-t_0)&=1-u(t_0-t) | + | u(t-t_0)&=1-u(t_0-t)\\ |
+ | u(a(t-t_0))&=u(t-t_0)\\ | ||
+ | u(-a(t-t_0))&=u(a(t_0-t))=u(t_0-t)=1-u(t-t_0) | ||
\end{align} | \end{align} | ||
</math></center> | </math></center> | ||
+ | Note that a ''positive'' time scaling does not have an effect on the unit step function. Also note in the final two cases above that the independent variable is first shifted, then scaled or scaled and reversed. | ||
+ | For the unit impulse function, time scaling is a bit more complex. Fortunately, time reversal is much simpler: | ||
+ | <center><math> | ||
+ | \begin{align} | ||
+ | \delta(at)&=\frac{1}{a}\delta(t)\\ | ||
+ | \delta(-t)&=\delta(t)\\ | ||
+ | \delta(t-t_0)&=\delta(t_0-t)\\ | ||
+ | \delta(a(t-t_0))&=\frac{1}{a}\delta(t-t_0)\\ | ||
+ | \delta(-a(t-t_0))&=\delta(a(t-t_0))=\frac{1}{a}\delta(t-t_0)\\ | ||
+ | \end{align} | ||
+ | </math></center> | ||
+ | |||
+ | <!-- | ||
+ | === Proof of Scaling Transformation of Unit Impulse === | ||
+ | Start with: | ||
+ | <center><math>\begin{align} | ||
+ | u(t)&= | ||
+ | \int_{-\infty}^{t}\delta(\tau)~d\tau | ||
+ | \end{align} | ||
+ | </math></center> | ||
+ | then calculate | ||
+ | <center><math> | ||
+ | \begin{align} | ||
+ | \int_{-\infty}^{t}\delta(a\tau)~d\tau | ||
+ | \end{align} | ||
+ | </math></center> | ||
+ | Use a transformation of variables: | ||
+ | <center><math> | ||
+ | \begin{align} | ||
+ | \gamma&=a\tau & d\gamma&=a~d\tau\\ | ||
+ | \tau &=\frac{1}{a}\gamma & d\tau&=\frac{1}{a}d\gamma | ||
+ | \end{align} | ||
+ | </math></center> | ||
+ | to get: | ||
+ | <center><math> | ||
+ | \begin{align} | ||
+ | \int_{-\infty}^{\frac{1}{a}t}\delta(\gamma)~\frac{1}{a}d\gamma&=\frac{1}{a}\int_{-\infty}^{\frac{1}{a}t}\delta(\gamma)~d\gamma | ||
+ | \end{align} | ||
+ | </math></center> | ||
+ | The integral will have a value of 1 when | ||
+ | <center><math> | ||
+ | \frac{1}{a}t>0\,\! | ||
+ | </math> </center> | ||
+ | since the integrand only has an area when <math>\gamma=0</math>. This means | ||
+ | <center><math> | ||
+ | \begin{align} | ||
+ | \int_{-\infty}^{t}\delta(a\tau)~d\tau | ||
+ | &= | ||
+ | \left\{ | ||
+ | \begin{array}{cc} | ||
+ | 0, & t< 0\\ | ||
+ | \frac{1}{a}, & t>0 | ||
+ | \end{array} | ||
+ | \right.\\ | ||
+ | \end{align} | ||
+ | </math></center> | ||
+ | thus the magnitude of <math>\delta(at)</math> is <math>1/a</math> the magnitude of <math>\delta(t)</math>. | ||
+ | --> | ||
+ | ==Building a <del>Mystery</del> Signal== | ||
+ | Often, singularity functions will be used to build piecewise signals. There are two fundamentally different methods for this. | ||
+ | ===Logical Masks=== | ||
+ | ====Piecewise Constants==== | ||
+ | [[image:GPAPlot.png|thumb|GPA as a function of letter grade]] | ||
+ | First, singularity functions can be used to create "windows" for each piece of the signal. This method effectively uses step functions to create [[MATLAB:Logical Masks|Logical Masks]]. For example, the GPA function at right could be defined in terms of Grade <math>G</math> as: | ||
+ | <center> | ||
+ | <math> | ||
+ | \mbox{GPA}(G)=\left\{ | ||
+ | \begin{array}{rl} | ||
+ | 4.0, & G\geq 90~~~\\ | ||
+ | 3.0, & 80\leq G ~\And~ G<90~~~\\ | ||
+ | 2.0, & 70\leq G ~\And~ G<80~~~\\ | ||
+ | 1.0, & 60\leq G ~\And~ G<70~~~\\ | ||
+ | 0.0, & G<60~~~ | ||
+ | \end{array} | ||
+ | \right. | ||
+ | </math> | ||
+ | </center> | ||
+ | Each window can be created by taking the difference between two step functions - one that turns "on" at the low end of the grade and one that turns "on" at the high end. For example, the "B" window would be defined, using step functions, as: | ||
+ | <center><math>\begin{align} | ||
+ | \mbox{BWindow}(G)&=u(G-80)-u(G-90) | ||
+ | \end{align}</math></center> | ||
+ | This window is 1 when the grade is between 80 and 90 and 0 otherwise (note: using the formal definition of the step function given above, this does cause a bit of uncertainty for people who have grades of exactly 80 or 90.) To get the correct GPA for those grades, simply multiply each window by the appropriate GPA value. The full function would thus be: | ||
+ | <center><math>\begin{align} | ||
+ | \mbox{GPA}(G)=&(u(G-90)-u(G-100))*4.0+...\\ | ||
+ | ~&(u(G-80)-u(G-90))*3.0+...\\ | ||
+ | ~&(u(G-70)-u(G-80))*2.0+...\\ | ||
+ | ~&(u(G-60)-u(G-70))*1.0+...\\ | ||
+ | ~&(u(G-0)-u(G-60))*0.0+...\\ | ||
+ | \end{align}</math></center> | ||
+ | |||
+ | ====Piecewise Functions==== | ||
+ | [[File:PiecewiseExample.png|thumb|Non-constant piecewise function]] | ||
+ | The case above simply had constant values in each window. You can also have piecewise function where the windows have values that are ''functions'' of the independent variable - such as the one given at right. The "window" based definition of this signal is: | ||
+ | <center> | ||
+ | <math> | ||
+ | x(t)=\left\{ | ||
+ | \begin{array}{rl} | ||
+ | 0, & t< -4\\ | ||
+ | 2, & -4\leq t < -3\\ | ||
+ | 1, & -3\leq t < -2\\ | ||
+ | t+3, & -2\leq t < 0\\ | ||
+ | t+1, & 0\leq t < 2\\ | ||
+ | -4t+11, & 2\leq t < 3\\ | ||
+ | 1, & 3\leq t < 5\\ | ||
+ | -t+7, & 5\leq t < 7\\ | ||
+ | 0, & t\geq 7\\ | ||
+ | \end{array} | ||
+ | \right. | ||
+ | </math> | ||
+ | </center> | ||
+ | and the signal could therefore be written using nine pieces, each comprised of a produce of a step function or difference of step functions followed by a formula. In this particular case, the number of pieces could be reduced to seven since the signal has no values for times before -4 sec or after 7 sec. This gets a bit messy, however: | ||
+ | <center> | ||
+ | <math>\begin{align} | ||
+ | x(t)=&(u(t+4)-u(t+3))*(2)+...\\ | ||
+ | ~&(u(t+3)-u(t+2))*(1)+...\\ | ||
+ | ~&(u(t+2)-u(t))*(t+3)+...\mbox{etc}...\mbox{etc}...\\ | ||
+ | \end{align}</math></center> | ||
+ | |||
+ | ===Accumulated Differences=== | ||
+ | Another method for building a signal is to look at how the signal changes at a particular point and multiplying that ''change'' by the appropriate step function. This is most useful when the changes are limited to jumps or drops in value and/or changes in slope; more complicated piecewise functions are best done using the logical mask method above. | ||
+ | ====GPA==== | ||
+ | To being, revisit the GPA function above. For the accumulated difference method, there must be some point in time before which the signal is 0 - in this case, that point is when the grade is 60. From that point forward, you will accumulate differences by writing the appropriate step function for changes in value or ramp function for changes in slope. The first change is a jump of height 1 when the grade hits 60: | ||
+ | <center><math>\begin{align} | ||
+ | \mbox{GPA}(\mbox{G})&=\color{blue}(1.0)*u(G-60)\color{black}+... | ||
+ | \end{align}</math></center> | ||
+ | The next change is a jump of height 1 when the grade passes 70. To add this, simply have a unit step function turn on, with the appropriate jump height, at G=70: | ||
+ | <center><math>\begin{align} | ||
+ | \mbox{GPA}(\mbox{G})&=(1.0)*u(G-60)+\color{blue}(1.0)*u(G-70)\color{black}+... | ||
+ | \end{align}</math></center> | ||
+ | The next jumps are at 80 and 90, and each jump has a value of 1, so the final function can be written as: | ||
+ | <center><math>\begin{align} | ||
+ | \mbox{GPA}(\mbox{G})&=(1.0)*u(G-60)+(1.0)*u(G-70)+(1.0)*u(G-80)+(1.0)*u(G-90) | ||
+ | \end{align}</math></center> | ||
+ | or, simplifying the fact that the heights are always 1 in this particular case: | ||
+ | <center><math>\begin{align} | ||
+ | \mbox{GPA}(\mbox{G})&=u(G-60)+u(G-70)+u(G-80)+u(G-90) | ||
+ | \end{align}</math></center> | ||
+ | Though it is not as clear to a viewer what this means in terms of the function's value at each location, it is certainly simpler than the [[Singularity_Functions#Piecewise_Constants|Piecewise Constants]] version. | ||
+ | |||
+ | ====Piecewise Function==== | ||
+ | [[File:PiecewiseExample.png|thumb|Non-constant piecewise function]] | ||
+ | For the piece-wise function | ||
+ | <center> | ||
+ | <math>\begin{align} | ||
+ | x(t)=&~(2)*u(t+4)+... ~&\mbox{Change value by +2 at t=-4}\\ | ||
+ | ~&~ (-1)*u(t+3)+... ~&\mbox{Change value by -1 at t=-3}\\ | ||
+ | ~&~ (1)*r(t+2)+... ~&\mbox{Change slope by +1 at t=-2}\\ | ||
+ | ~&~ (-2)*u(t)+... ~&\mbox{Change value by -2 at t=0}\\ | ||
+ | ~&~ (-5)*r(t-2)+... ~&\mbox{Change slope by -5 at t=2}\\ | ||
+ | ~&~ (4)*r(t-3)+... ~&\mbox{Change slope by +4 at t=3}\\ | ||
+ | ~&~ (2)*u(t-3)+... ~&\mbox{Change value by +2 at t=3}\\ | ||
+ | ~&~ (-1)*r(t-5)+... ~&\mbox{Change slope by -1 at t=5}\\ | ||
+ | ~&~ (1)*u(t-5)+... ~&\mbox{Change value by +1 at t=5}\\ | ||
+ | ~&~ (1)*r(t-7)~&\mbox{Change slope by +1 at t=7}\\ | ||
+ | \end{align} | ||
+ | </math> | ||
+ | </center> | ||
+ | Note that this version is much easier to convert to a Laplace Transform than the logical masks, specifically because there are no differently-shifted terms. | ||
+ | |||
+ | == Relationships Between Singularity Functions == | ||
+ | Given the definitions for the unit impulse $$\delta(t)$$, step $$u(t)$$, ramp $$r(t)$$, and quadratic $$q(t)$$: | ||
+ | <center>$$\begin{align*} | ||
+ | \delta(t)&= | ||
+ | \begin{cases}0,&t\neq 0\\\mbox{Area of 1},&t=0\end{cases}& | ||
+ | u(t)&= \begin{cases}0,&t<0\\1,&t>0\end{cases} & | ||
+ | r(t)&= \begin{cases}0,&t<0\\t,&t\geq 0\end{cases}& | ||
+ | q(t)&= \begin{cases}0,&t<0\\\frac{1}{2}t^2,&t\geq 0\end{cases} | ||
+ | \end{align*}$$</center> | ||
+ | they have the following relationships to each other: | ||
+ | <center>$$\begin{align*} | ||
+ | \delta(t)&=\frac{du(t)}{dt} & | ||
+ | u(t)&=\frac{dr(t)}{dt} & | ||
+ | r(t)&=\frac{dq(t)}{dt} & ~&~\\ | ||
+ | ~&~ & u(t)&=\int_{-\infty}^t\delta(\tau)\,d\tau & | ||
+ | r(t)&=\int_{-\infty}^tu(\tau)\,d\tau & | ||
+ | q(t)&=\int_{-\infty}^tr(\tau)\,d\tau | ||
+ | \end{align*}$$</center> | ||
+ | which are all linear and time-invariant such that: | ||
+ | <center>$$\begin{align*} | ||
+ | k\,\delta(t-t_0)&=\frac{d(k\,u(t-t_0))}{dt} & | ||
+ | k\,u(t-t_0)&=\frac{d(k\,r(t-t_0))}{dt} & | ||
+ | k\,r(t-t_0)&=\frac{d(k\,q(t-t_0))}{dt} | ||
+ | \end{align*}$$</center> | ||
+ | and | ||
+ | <center>$$\begin{align*} | ||
+ | k\,u(t-t_0)&=\int_{-\infty}^tk\,\delta(\tau-t_0)\,d\tau & | ||
+ | k\,r(t-t_0)&=\int_{-\infty}^tk\,u(\tau-t_0)\,d\tau & | ||
+ | k\,q(t-t_0)&=\int_{-\infty}^tk\,r(\tau-t_0)\,d\tau | ||
+ | \end{align*}$$</center> | ||
+ | where $$k$$ is some scaling factor and $$t_0$$ is some shift. | ||
+ | |||
+ | This generally means that the integral of a function of scaled and shifted steps and ramps can be written as a combination of similarly scaled and shifted ramps and quadratics; conversely, the derivative of a function of scaled and shifted steps and ramps can be written as a combination of similarly scaled and shifted impulses and steps. For instance, if $$x(t)=2u(t)-r(t-1)+r(t-3)$$, then: | ||
+ | <center>$$\begin{align*} | ||
+ | x(t)&=2u(t)-r(t-1)+r(t-3)\\ | ||
+ | \int_{-\infty}^tx(\tau)\,d\tau&=2r(t)-q(t-1)+q(t-3)\\ | ||
+ | \frac{dx(t)}{dt}&=2\delta(t)-u(t-1)+u(t-3) | ||
+ | \end{align*}$$</center> | ||
+ | |||
+ | ==General Simplification of Integrals== | ||
+ | The impulse function and step function, as part of an integrand, may make analysis of the integral simpler through a variety of ways. The following simplifications are broken up into four categories depending on which singularity function is used and whether it is the sole integrand or part of a more complex expression. | ||
+ | ===Integrand with Impulse Functions Only=== | ||
+ | As should be clear about, the impulse function, as an integrand, is only non-zero when its argument is exactly zero and that that point, it has an area of 1. These properties help simplify integrals involving only impulse functions: | ||
+ | <center><math> | ||
+ | \begin{align} | ||
+ | \int_{-\infty}^{\infty}\delta(\tau)~d\tau&=1\\ | ||
+ | \int_{-\infty}^{t}\delta(\tau)~d\tau&=u(t)\\ | ||
+ | \int_{t}^{\infty}\delta(\tau)~d\tau&=u(-t)\\ | ||
+ | \int_{-\infty}^{t}\delta(\tau-t_0)~d\tau= | ||
+ | \int_{-\infty}^{t}\delta(t_0-\tau)~d\tau&=u(t-t_0)\\ | ||
+ | \int_{t}^{\infty}\delta(\tau-t_0)~d\tau= | ||
+ | \int_{t}^{\infty}\delta(t_0-\tau)~d\tau&=u(t_0-t)\\ | ||
+ | \int_{t_i}^{t_f}\delta(\tau-t_0)~d\tau= | ||
+ | \int_{t_i}^{t_f}\delta(t_0-\tau)~d\tau&= | ||
+ | u(t_f-t_0)-u(t_i-t_0)= | ||
+ | u(t_0-t_i)-u(t_0-t_f) | ||
+ | \end{align} | ||
+ | </math></center> | ||
+ | ===Impulse Functions as Part of Integrand=== | ||
+ | Impulse functions as ''part'' of an integrand can also lead to simplifications involving more than just impulse functions in the integrand: | ||
+ | <center><math> | ||
+ | \begin{align} | ||
+ | \int_{-\infty}^{\infty}f(g(\tau))~\delta(\tau)~d\tau&=f(g(0))\\ | ||
+ | \int_{-\infty}^{t}f(g(\tau))~\delta(\tau)~d\tau&=f(g(0))~u(t)\\ | ||
+ | \int_{t}^{\infty}f(g(\tau))~\delta(\tau)~d\tau&=f(g(0))~u(-t)\\ | ||
+ | \int_{-\infty}^{t}f(g(\tau))~\delta(\tau-t_0)~d\tau= | ||
+ | \int_{-\infty}^{t}f(g(\tau))~\delta(t_0-\tau)~d\tau&= | ||
+ | f(g(t_0))~u(t-t_0)\\ | ||
+ | \int_{t}^{\infty}f(g(\tau))~\delta(\tau-t_0)~d\tau= | ||
+ | \int_{t}^{\infty}f(g(\tau))~\delta(t_0-\tau)~d\tau&= | ||
+ | f(g(t_0))~u(t_0-t)\\ | ||
+ | \int_{t_i}^{t_f}f(g(\tau))~\delta(\tau-t_0)~d\tau= | ||
+ | \int_{t_i}^{t_f}f(g(\tau))~\delta(t_0-\tau)~d\tau&=~\\ | ||
+ | f(g(t_0))~(u(t_f-t_0)-u(t_i-t_0))&= | ||
+ | f(g(t_0))~(u(t_0-t_i)-u(t_0-t_f))\\ | ||
+ | \end{align} | ||
+ | </math></center> | ||
+ | ===Integrand with Step Functions Only=== | ||
+ | <center><math> | ||
+ | \begin{align} | ||
+ | \int_{-\infty}^{t}u(\tau)~d\tau= | ||
+ | u(t)\int_0^td\tau&=t~u(t)\\ | ||
+ | \int_{t}^{\infty}u(-\tau)~d\tau= | ||
+ | u(-t)\int_t^0d\tau&=-t~u(-t)\\ | ||
+ | \int_{-\infty}^{t}u(\tau-t_0)~d\tau= | ||
+ | u(t-t_0)\int_{t_0}^td\tau&=(t-t_0)~u(t-t_0)\\ | ||
+ | \int_{t}^{\infty}u(t_0-\tau)~d\tau= | ||
+ | u(t_0-t)\int_t^{t_0}d\tau&=(t_0-t)~u(t_0-t)\\ | ||
+ | \int_{t_i}^{t_f}u(\tau-t_0)~d\tau= | ||
+ | \int_{-\infty}^{t_f}u(\tau-t_0)~d\tau- | ||
+ | \int_{-\infty}^{t_i}u(\tau-t_0)~d\tau&= | ||
+ | (t_f-t_0)~u(t_f-t_0)-(t_i-t_0)~u(t_i-t_0)\\ | ||
+ | \int_{t_i}^{t_f}u(t_0-\tau)~d\tau= | ||
+ | \int_{t_i}^{\infty}u(t_0-\tau)~d\tau- | ||
+ | \int_{t_f}^{\infty}u(t_0-\tau)~d\tau&= | ||
+ | (t_0-t_i)~u(t_0-t_i) - (t_0-t_f)~u(t_0-t_f) | ||
+ | \end{align} | ||
+ | </math></center> | ||
+ | |||
+ | ===Step Functions as Part of Integrand=== | ||
+ | <center><math> | ||
+ | \begin{align} | ||
+ | \int_{-\infty}^{t}f(g(\tau))~u(\tau)~d\tau&= | ||
+ | u(t)\int_0^tf(g(\tau))~d\tau&\\ | ||
+ | \int_{t}^{\infty}f(g(\tau))~u(-\tau)~d\tau&= | ||
+ | u(-t)\int_t^0f(g(\tau))~d\tau\\ | ||
+ | \int_{-\infty}^{t}f(g(\tau))~u(\tau-t_0)~d\tau&= | ||
+ | u(t-t_0)\int_{t_0}^tf(g(\tau))~d\tau\\ | ||
+ | \int_{t}^{\infty}f(g(\tau))~u(t_0-\tau)~d\tau&= | ||
+ | u(t_0-t)\int_t^{t_0}f(g(\tau))~d\tau\\ | ||
+ | \int_{t_i}^{t_f}f(g(\tau))~u(\tau-t_0)~d\tau&= | ||
+ | \int_{-\infty}^{t_f}f(g(\tau))~u(\tau-t_0)~d\tau- | ||
+ | \int_{-\infty}^{t_i}f(g(\tau))~u(\tau-t_0)~d\tau \\ | ||
+ | ~&= | ||
+ | u(t_f-t_0)\int_{t_0}^{t_f}f(g(\tau))~d\tau- | ||
+ | u(t_i-t_0)\int_{t_0}^{t_i}f(g(\tau))~d\tau\\ | ||
+ | \int_{t_i}^{t_f}f(g(\tau))~u(t_0-\tau)~d\tau&= | ||
+ | \int_{t_i}^{\infty}f(g(\tau))~u(t_0-\tau)~d\tau- | ||
+ | \int_{t_f}^{\infty}f(g(\tau))~u(t_0-\tau)~d\tau \\ | ||
+ | ~ | ||
+ | &= | ||
+ | u(t_0-t_i)\int_{t_i}^{t_0}f(g(\tau))~d\tau- | ||
+ | u(t_0-t_f)\int_{t_f}^{t_0}f(g(\tau))~d\tau | ||
+ | \end{align} | ||
+ | </math></center> | ||
+ | |||
+ | ==Convolution Integral Simplification with Step Function Product as Part of Integrand== | ||
+ | The convolution integral | ||
+ | <center><math> | ||
+ | \begin{align} | ||
+ | y(t)=\int_{-\infty}^{\infty}x(\tau)h(t-\tau)~d\tau&= | ||
+ | \int_{-\infty}^{\infty}x(t-\tau)h(\tau)~d\tau | ||
+ | \end{align} | ||
+ | </math></center> | ||
+ | will generate products of step functions in the integrand if both <math>x(t)</math> and <math>h(t)</math> are defined using step functions. There are two main ways to get a product of step functions as an integrand - either they are both "pointing" in the same direction or they are pointing in opposite directions. | ||
+ | ===Same Directions in Integrand=== | ||
+ | If the step functions are "pointing" in the same direction in <math>\tau</math> space - that is | ||
+ | <center><math> | ||
+ | \begin{align} | ||
+ | \int_{-\infty}^{\infty} u(\tau-a)~u(b-t+\tau)~f(g(\tau))d\tau | ||
+ | \end{align} | ||
+ | </math></center> | ||
+ | the key is to recognize that, for the integrand to be non-zero, you must satisfy the inequalities | ||
+ | <center><math> | ||
+ | \begin{align} | ||
+ | \tau-a&>0 & b-t+\tau&>0,\mbox{ or}\\ | ||
+ | a&<\tau & t-b&<\tau | ||
+ | \end{align} | ||
+ | </math></center> | ||
+ | You will thus need to determine which of these presents the stricter condition. Then: | ||
+ | <center><math> | ||
+ | \begin{align} | ||
+ | \int_{-\infty}^{\infty} u(\tau-a)~u(b-t+\tau)~f(g(\tau))d\tau&= | ||
+ | \begin{cases} | ||
+ | a<t-b & \int_{t-b}^{\infty} f(g(\tau))d\tau\\ | ||
+ | a>t-b & \int_{a}^{\infty} f(g(\tau))d\tau | ||
+ | \end{cases} | ||
+ | \end{align} | ||
+ | </math></center> | ||
+ | which can be re-written using unit step functions as: | ||
+ | <center><math> | ||
+ | \begin{align} | ||
+ | \left(u(t-b-a) \int_{t-b}^{\infty} f(g(\tau))d\tau\right) &+ | ||
+ | \left(u(a+b-t) \int_{a}^{\infty} f(g(\tau))d\tau\right) & | ||
+ | \end{align} | ||
+ | </math></center> | ||
+ | |||
+ | ===Opposite Directions in Integrand=== | ||
+ | This is the case that most often comes into play during convolution: | ||
+ | <center><math> | ||
+ | \begin{align} | ||
+ | \int_{-\infty}^{\infty} \color{Red}{u(\tau-a)}~\color{Blue}{u(t-\tau-b)}~f(g(\tau))d\tau | ||
+ | \end{align} | ||
+ | </math></center> | ||
+ | where the first step function is right-sided in <math>\tau</math> and the second function is left-sided. For the integrand to be nonzero, | ||
+ | <center><math> | ||
+ | \begin{align} | ||
+ | \color{Red}{\tau-a}&\color{Red}{>0} & \color{Blue}{t-\tau-b}&\color{Blue}{>0},\mbox{ or}\\ | ||
+ | \color{Red}{a}&\color{Red}{<\tau} & \color{Blue}{\tau}&\color{Blue}{<t-b} | ||
+ | \end{align} | ||
+ | </math></center> | ||
+ | This clearly indicates the limits on the integral - but it also indicates a restriction on time. That is, for both inequalities to be satisfied, | ||
+ | <center><math> | ||
+ | \begin{align} | ||
+ | \color{Purple}{a}&<\color{Purple}{t-b},\mbox{ or}\\ | ||
+ | \color{Purple}{t}&\color{Purple}{>a+b} | ||
+ | \end{align} | ||
+ | </math></center> | ||
+ | which gives rise to a unit step function that can be written ''outside'' the integral since it is ''not'' a function of <math>\tau</math>. Specifically, | ||
+ | <center><math> | ||
+ | \begin{align} | ||
+ | \int_{-\infty}^{\infty} u(\tau-a)~u(t-\tau-b)~f(g(\tau))d\tau&= | ||
+ | \color{Purple}{u(t-b-a)}\int_{\color{Red}{a}}^{\color{Blue}{t-b}} f(g(\tau))d\tau | ||
+ | \end{align} | ||
+ | </math></center> | ||
== Questions == | == Questions == | ||
Line 120: | Line 476: | ||
− | [[Category:ECE | + | [[Category:ECE 280]] |
+ | [[Category:EGR 224]] |
Latest revision as of 02:11, 12 September 2023
Singularity Functions are a class of functions that - you guessed it - contain singularities. One notation for a singularity function is given as adapted from p. 77 Chapra[1]
where \(x\) is the independent variable and \(n\) and \(x_0\) are constants. Note that this definition is only useful when \(n\geq 0\). Negative values of \(n\) are used to denote the impulse function (when \(n=-1\)) or its derivatives. Also note that it is common to leave the singularity undefined when \(n=0\) and \(x=x_0\). That is to say, a fuller definition of the singularity function might be:
where the delta function \(\delta(x)\) and its derivatives will be defined below.
Contents
- 1 Basic Definitions and Derivations
- 2 Variable Transformations for Unit Step and Unit Impulse
- 3 Building a Mystery Signal
- 4 Relationships Between Singularity Functions
- 5 General Simplification of Integrals
- 6 Convolution Integral Simplification with Step Function Product as Part of Integrand
- 7 Questions
- 8 External Links
- 9 References
Basic Definitions and Derivations
Alternate Names for \(n\geq 0\)
In courses such as ECE 280 and EGR 224, alternate names are given to different non-negative powers of the singularity function. Furthermore, singularity functions are generally written as functions of time rather than space, so:
For the last entry, you may be tempted to ask, "How is that the unit parabola?" The simplest explanation is that the unit ramp is the integral of the unit step, and the unit parabola is the integral of the unit parabola.
Derivation of Unit Impulse Functions
You can also take derivatives of the singularity functions. For \(n>0\), this is quite easy as the unit ramp and above are continuous. The difficulty comes in taking the derivative of the \(<t-a>^0\) case. Mathematically, call the derivative of the unit step function \(\delta(t)\); you can then find
But how large is that infinity? The answer comes in integrating this "delta function" (also known as the "unit impulse function" or just "impulse function"):
and by definition,
meaning
In other words (well...in words) the total area is 0 when integrating between negative infinity and just before 0 and the total area is 1 when integrating between negative infinity and anything positive. That must mean, at exactly \(t=0\), \(\delta(t)\) has an area of 1 while for all other times, it has an area of 0. That is to say,
Variable Transformations for Unit Step and Unit Impulse
Three common transformations of the independent variable (in the examples, \(t\)) are scaling, shifting, and reversing. The following pairs show how scaling (multiplying the independent variable by some positive constant \(a\)), shifting (subtracting some value \(t_0\) from the independent variable), and reversing (multiplying the independent variable by -1) may be written in alternate ways. First, for the unit step function:
Note that a positive time scaling does not have an effect on the unit step function. Also note in the final two cases above that the independent variable is first shifted, then scaled or scaled and reversed.
For the unit impulse function, time scaling is a bit more complex. Fortunately, time reversal is much simpler:
Building a Mystery Signal
Often, singularity functions will be used to build piecewise signals. There are two fundamentally different methods for this.
Logical Masks
Piecewise Constants
First, singularity functions can be used to create "windows" for each piece of the signal. This method effectively uses step functions to create Logical Masks. For example, the GPA function at right could be defined in terms of Grade \(G\) as:
\( \mbox{GPA}(G)=\left\{ \begin{array}{rl} 4.0, & G\geq 90~~~\\ 3.0, & 80\leq G ~\And~ G<90~~~\\ 2.0, & 70\leq G ~\And~ G<80~~~\\ 1.0, & 60\leq G ~\And~ G<70~~~\\ 0.0, & G<60~~~ \end{array} \right. \)
Each window can be created by taking the difference between two step functions - one that turns "on" at the low end of the grade and one that turns "on" at the high end. For example, the "B" window would be defined, using step functions, as:
This window is 1 when the grade is between 80 and 90 and 0 otherwise (note: using the formal definition of the step function given above, this does cause a bit of uncertainty for people who have grades of exactly 80 or 90.) To get the correct GPA for those grades, simply multiply each window by the appropriate GPA value. The full function would thus be:
Piecewise Functions
The case above simply had constant values in each window. You can also have piecewise function where the windows have values that are functions of the independent variable - such as the one given at right. The "window" based definition of this signal is:
\( x(t)=\left\{ \begin{array}{rl} 0, & t< -4\\ 2, & -4\leq t < -3\\ 1, & -3\leq t < -2\\ t+3, & -2\leq t < 0\\ t+1, & 0\leq t < 2\\ -4t+11, & 2\leq t < 3\\ 1, & 3\leq t < 5\\ -t+7, & 5\leq t < 7\\ 0, & t\geq 7\\ \end{array} \right. \)
and the signal could therefore be written using nine pieces, each comprised of a produce of a step function or difference of step functions followed by a formula. In this particular case, the number of pieces could be reduced to seven since the signal has no values for times before -4 sec or after 7 sec. This gets a bit messy, however:
Accumulated Differences
Another method for building a signal is to look at how the signal changes at a particular point and multiplying that change by the appropriate step function. This is most useful when the changes are limited to jumps or drops in value and/or changes in slope; more complicated piecewise functions are best done using the logical mask method above.
GPA
To being, revisit the GPA function above. For the accumulated difference method, there must be some point in time before which the signal is 0 - in this case, that point is when the grade is 60. From that point forward, you will accumulate differences by writing the appropriate step function for changes in value or ramp function for changes in slope. The first change is a jump of height 1 when the grade hits 60:
The next change is a jump of height 1 when the grade passes 70. To add this, simply have a unit step function turn on, with the appropriate jump height, at G=70:
The next jumps are at 80 and 90, and each jump has a value of 1, so the final function can be written as:
or, simplifying the fact that the heights are always 1 in this particular case:
Though it is not as clear to a viewer what this means in terms of the function's value at each location, it is certainly simpler than the Piecewise Constants version.
Piecewise Function
For the piece-wise function
\(\begin{align} x(t)=&~(2)*u(t+4)+... ~&\mbox{Change value by +2 at t=-4}\\ ~&~ (-1)*u(t+3)+... ~&\mbox{Change value by -1 at t=-3}\\ ~&~ (1)*r(t+2)+... ~&\mbox{Change slope by +1 at t=-2}\\ ~&~ (-2)*u(t)+... ~&\mbox{Change value by -2 at t=0}\\ ~&~ (-5)*r(t-2)+... ~&\mbox{Change slope by -5 at t=2}\\ ~&~ (4)*r(t-3)+... ~&\mbox{Change slope by +4 at t=3}\\ ~&~ (2)*u(t-3)+... ~&\mbox{Change value by +2 at t=3}\\ ~&~ (-1)*r(t-5)+... ~&\mbox{Change slope by -1 at t=5}\\ ~&~ (1)*u(t-5)+... ~&\mbox{Change value by +1 at t=5}\\ ~&~ (1)*r(t-7)~&\mbox{Change slope by +1 at t=7}\\ \end{align} \)
Note that this version is much easier to convert to a Laplace Transform than the logical masks, specifically because there are no differently-shifted terms.
Relationships Between Singularity Functions
Given the definitions for the unit impulse $$\delta(t)$$, step $$u(t)$$, ramp $$r(t)$$, and quadratic $$q(t)$$:
they have the following relationships to each other:
which are all linear and time-invariant such that:
and
where $$k$$ is some scaling factor and $$t_0$$ is some shift.
This generally means that the integral of a function of scaled and shifted steps and ramps can be written as a combination of similarly scaled and shifted ramps and quadratics; conversely, the derivative of a function of scaled and shifted steps and ramps can be written as a combination of similarly scaled and shifted impulses and steps. For instance, if $$x(t)=2u(t)-r(t-1)+r(t-3)$$, then:
General Simplification of Integrals
The impulse function and step function, as part of an integrand, may make analysis of the integral simpler through a variety of ways. The following simplifications are broken up into four categories depending on which singularity function is used and whether it is the sole integrand or part of a more complex expression.
Integrand with Impulse Functions Only
As should be clear about, the impulse function, as an integrand, is only non-zero when its argument is exactly zero and that that point, it has an area of 1. These properties help simplify integrals involving only impulse functions:
Impulse Functions as Part of Integrand
Impulse functions as part of an integrand can also lead to simplifications involving more than just impulse functions in the integrand:
Integrand with Step Functions Only
Step Functions as Part of Integrand
Convolution Integral Simplification with Step Function Product as Part of Integrand
The convolution integral
will generate products of step functions in the integrand if both \(x(t)\) and \(h(t)\) are defined using step functions. There are two main ways to get a product of step functions as an integrand - either they are both "pointing" in the same direction or they are pointing in opposite directions.
Same Directions in Integrand
If the step functions are "pointing" in the same direction in \(\tau\) space - that is
the key is to recognize that, for the integrand to be non-zero, you must satisfy the inequalities
You will thus need to determine which of these presents the stricter condition. Then:
which can be re-written using unit step functions as:
Opposite Directions in Integrand
This is the case that most often comes into play during convolution:
where the first step function is right-sided in \(\tau\) and the second function is left-sided. For the integrand to be nonzero,
This clearly indicates the limits on the integral - but it also indicates a restriction on time. That is, for both inequalities to be satisfied,
which gives rise to a unit step function that can be written outside the integral since it is not a function of \(\tau\). Specifically,
Questions
Post your questions by editing the discussion page of this article. Edit the page, then scroll to the bottom and add a question by putting in the characters *{{Q}}, followed by your question and finally your signature (with four tildes, i.e. ~~~~). Using the {{Q}} will automatically put the page in the category of pages with questions - other editors hoping to help out can then go to that category page to see where the questions are. See the page for Template:Q for details and examples.
External Links
References
- ↑ Applied Numerical Methods with MATLAB for Engineers and Scientists, 2/e, Steven C. Chapra