next up previous [pdf]

Next: ADJOINTS AND INVERSES Up: FAMILIAR OPERATORS Previous: Linear interpolation

Causal integration

Causal integration is defined as
\begin{displaymath}
y(t) \eq \int_{-\infty}^t  x(t) dt
\end{displaymath} (9)

Sampling the time axis gives a matrix equation which we should call causal summation, but we often call it causal integration.
\begin{displaymath}
\left[
\begin{array}{c}
y_0 \\
y_1 \\
y_2 \\
y_3 \\...
...5 \\
x_6 \\
x_7 \\
x_8 \\
x_9 \\
\end{array} \right]
\end{displaymath} (10)

(In some applications the 1 on the diagonal is replaced by 1/2.) Causal integration is the simplest prototype of a recursive operator. The coding is trickier than operators we considered earlier. Notice when you compute $y_5$ that it is the sum of 6 terms, but that this sum is more quickly computed as $y_5 = y_4 + x_5$. Thus equation (2.10) is more efficiently thought of as the recursion
\begin{displaymath}
y_t \quad = \quad y_{t-1} + x_t
\quad
\quad
\quad {\rm for increasing } t
\end{displaymath} (11)

(which may also be regarded as a numerical representation of the differential equation $dy/dt=x$.)

When it comes time to think about the adjoint, however, it is easier to think of equation (2.10) than of (2.11). Let the matrix of equation (2.10) be called $\bold C$. Transposing to get $\bold C '$ and applying it to $\bold y$ gives us something back in the space of $\bold x$, namely $\tilde{\bold x} = \bold C' \bold y$. From it we see that the adjoint calculation, if done recursively, needs to be done backwards like

\begin{displaymath}
\tilde x_{t-1} \quad = \quad \tilde x_{t} + y_{t-1}
\quad
\quad
\quad {\rm for decreasing } t
\end{displaymath} (12)

We can sum up by saying that the adjoint of causal integration is anticausal integration.

A subroutine to do these jobs is causint() [*]. The code for anticausal integration is not obvious from the code for integration and the adjoint coding tricks we learned earlier. To understand the adjoint, you need to inspect the detailed form of the expression $\tilde{\bold x} = \bold C' \bold y$ and take care to get the ends correct.

api/c/causint.c
    t = 0.;
    if (adj) {
	for (i=nx-1; i >= 0; i-) {
	    t += yy[i];
	    xx[i] += t;
	}
    } else {
	for (i=0; i <= nx-1; i++) {
	    t += xx[i];
	    yy[i] += t;
	}
    }

causint
Figure 2.
in1 is an input pulse. C in1 is its causal integral. C' in1 is the anticausal integral of the pulse. in2 is a separated doublet. Its causal integration is a box and its anticausal integration is the negative. CC in2 is the double causal integral of in2. How can an equilateral triangle be built?
causint
[pdf] [png] [scons]

Later we will consider equations to march wavefields up towards the earth's surface, a layer at a time, an operator for each layer. Then the adjoint will start from the earth's surface and march down, a layer at a time, into the earth.

EXERCISES:

  1. Modify the calculation in Figure 2.2 to make a triangle waveform on the bottom row.


next up previous [pdf]

Next: ADJOINTS AND INVERSES Up: FAMILIAR OPERATORS Previous: Linear interpolation

2009-03-16