Build derivation operators to regularize temporal derivatives#

Description#

Context#

Lets consider a time-dependent function \(f(t)\) sampled at \(N_t\) discrete time steps with a constant time interval \(\Delta t\). We want to regularize the temporal derivative of \(f(t)\) as :

\[\frac{d^n f}{d t^n} \approx \hat{g}\]

The derivation operator is built to approximate the temporal derivative of \(f(t)\) using finite difference schemes such as central, forward, or backward finite differences.

\[\frac{d^n f}{d t^n} \approx D^n f\]

where \(D^n\) is the temporal derivation operator matrix constructed using finite difference kernels (Stencil coefficients) for the \(n^{th}\) order derivative.

Finite Difference Stencil coefficients \(c_j\)#

The package provides functions to construct finite difference stencil coefficients for central, forward, and backward finite difference schemes.

compute_central_finite_difference_coefficients(order)

Compute the coefficients for the central finite difference approximation of a derivative.

compute_forward_finite_difference_coefficients(order)

Compute the coefficients for the forward finite difference approximation of a derivative.

compute_backward_finite_difference_coefficients(order)

Compute the coefficients for the backward finite difference approximation of a derivative.

The finite difference stencil coefficients are used to approximate the temporal derivative of a function at discrete time steps. To apply the finite difference scheme to a time-dependent function, we can convolve the function with the stencil coefficients.

apply_central_finite_difference(data, order)

Apply the central finite difference operator to a time series data array along a specified axis.

apply_forward_finite_difference(data, order)

Apply the forward finite difference operator to a time series data array along a specified axis.

apply_backward_finite_difference(data, order)

Apply the backward finite difference operator to a time series data array along a specified axis.

Temporal Derivation Matrix \(D^n\)#

The package provides a function to assemble the temporal derivation operator matrix \(D^n\) using finite difference kernels.

assemble_central_finite_difference_matrix(...)

Assemble the temporal derivation operator matrix for finite difference approximation with central scheme.

assemble_forward_finite_difference_matrix(...)

Assemble the temporal derivation operator matrix for finite difference approximation with forward scheme.

assemble_backward_finite_difference_matrix(...)

Assemble the temporal derivation operator matrix for finite difference approximation with backward scheme.

Cost function development#

In pratice, we want to find the function \(dU(t)\) that minimizes the Stereo Digital Image Correlation (SDIC) cost function with an additional regularization term on the temporal derivative of \(U(t)\).

Without regularization, the SDIC cost function can be written as :

\[\Phi_{\text{SDIC}}(dU) = \|J dU - r\|^2\]

where \(J\) is the SDIC Jacobian matrix, \(dU\) is the increment on displacement field, and \(r\) is the residual vector.

The least squares formulation of the SDIC problem can be solved as :

\[J^T J dU = J^T r\]

When adding a regularization term on the temporal derivative of \(dU(t)\), the complete cost function becomes :

\[\Phi(dU) = \Phi_{\text{SDIC}}(dU) + \lambda \| D^n U - \hat{g} \|^2\]

where \(\lambda\) is a regularization parameter, and \(D^n\) is the temporal derivation operator matrix for the \(n^{th}\) order derivative.

The regularization term can be development such as :

\[\min \| D^n U - \hat{g} \|^2 \leftrightarrow (D^n)^T D^n U = (D^n)^T \hat{g} \leftrightarrow (D^n)^T D^n dU = (D^n)^T (\hat{g} - D^n U_{\text{init}})\]