One-dimensional heat equation

Let a one-dimensional heat equation with homogenous Dirichlet boundary conditions and zero initial conditions be subject to spatially and temporally distributed forcing

 begin{array}{rcl} phi_{t}(y,t) & !! = !! & phi_{yy}(y,t) , + , d(y,t), ;;; y in left[ -1, 1 right] [0.15cm] phi(pm 1, t) & !! = !! & 0, ;;; phi(y,0) ; = ; 0. end{array}


The second derivative operator with Dirichlet boundary conditions is self-adjoint with a complete set of orthonormal eigenfunctions, sin left(  (n pi/2) (y + 1) right), n = { 1, 2, ldots }. This information can be used to diagonalize operator D^{(2)} which facilitates straightforward determination of the frequency response. For systems with spatially varying coefficients and non-normal generators the frequency response analysis is typically done numerically using finite dimensional approximations of the differential operators. For example, the pseudospectral method with N collocation points can be used to transform the frequency response operator into an N times N matrix. However, for systems with differential operators of high order, spectral differentiation matrices may be poorly conditioned and implementation of boundary conditions may be challenging. In our method, numerical approximation of differential operators in the evolution equation is avoided by first recasting the system into corresponding two point boundary value problems and then using state-of-the-art techniques for solving the resulting boundary value problems with accuracy comparable to machine precision.

Two point boundary value representations of mathcal{T}, mathcal{T}^{star}, and

mathcal{T} mathcal{T}^{star}

Application of the temporal Fourier transform yields the two point boundary value representation of the frequency response operator mathcal{T},

 begin{array}{rcl} left( D^{(2)} , - , mathrm{i} , omega right) phi(y) & !! = !! & -d(y) [0.15cm] left( left[ begin{array}{c} 1 [0.1cm] 0 end{array} right] E_{-1} , + , left[ begin{array}{c} 0 [0.1cm] 1 end{array} right] E_{+1} right) phi(y) & !! = !! & left[ begin{array}{c} 0 [0.1cm] 0 end{array} right] end{array} hspace{3.0cm} mathrm{(1)}


where

mathrm{i}  —  imaginary unit
omega  —  temporal frequency
D^{(2)}  —  second-order differential operator in y
E_{j}  —  point evaluation functional at the boundary y = j.

We note that svdfr.m only requires the system's coefficients and boundary condition matrices appearing in mathrm{(1)} to compute singular value decomposition of the frequency response operator mathcal{T}. For completeness, we next show how to obtain the two point boundary value representations of the adjoint operator mathcal{T}^{star} and the operator mathcal{T} mathcal{T}^{star}. Furthermore, to illustrate the procedure used in our algorithm for computing singular value decomposition of the operator mathcal{T}, we show how to convert a differential equation into an equivalent integral equation.

The two point boundary value representation for the adjoint of the frequency response operator, mathcal{T}^{star}, is given by

 begin{array}{rcl} left( D^{(2)} , + , mathrm{i} , omega right) psi(y) & !! = !! & f(y) [0.15cm] g(y) & !! = !! & -psi(y)  [0.15cm] left( left[ begin{array}{c} 1 [0.1cm] 0 end{array} right] E_{-1} , + , left[ begin{array}{c} 0 [0.1cm] 1 end{array} right] E_{+1} right) psi(y) & !! = !! & left[ begin{array}{c} 0 [0.1cm] 0 end{array} right]. end{array}


 

Fig. mathrm{1}: Block diagram of mathcal{T} mathcal{T}^{star}.


The representation of the operator mathcal{T} mathcal{T}^{star} is obtained by combining the two point boundary value representations of mathcal{T} and mathcal{T}^{star}. As illustrated in Fig. mathrm{1}, this can be achieved by setting d(y) = g(y) in mathrm{(1)},

 mathcal{T} mathcal{T}^{star}!!: ~ left{ begin{array}{rcl} left[ begin{array}{cc} left( D^{(2)} , - , mathrm{i} , omega right) & -I [0.15cm] 0 & left( D^{(2)} , + , mathrm{i} , omega right) end{array} right] left[ begin{array}{c} phi(y) [0.15cm] psi(y) end{array} right] & !! = !! &  left[ begin{array}{c} 0 [0.15cm] I end{array} right] f(y) [0.5cm] phi (y) & !! = !! & left[ begin{array}{cc} I & 0 end{array} right] left[ begin{array}{c} phi (y) [0.1cm] psi (y) end{array} right] [0.5cm] left( left[ begin{array}{c} 1 [0.1cm] 0 end{array} right] E_{-1} , + , left[ begin{array}{c} 0 [0.1cm] 1 end{array} right] E_{+1} right) phi(y) & !! = !! & left[ begin{array}{c} 0 [0.1cm] 0 end{array} right] [0.6cm] left( left[ begin{array}{c} 1 [0.1cm] 0 end{array} right] E_{-1} , + , left[ begin{array}{c} 0 [0.1cm] 1 end{array} right] E_{+1} right) psi(y) & !! = !! & left[ begin{array}{c} 0 [0.1cm] 0 end{array} right]. end{array} right.


Note that svdfr.m utilizes the integral form of a two point boundary value representation of mathcal{T} mathcal{T}^{star}. This procedure yields accurate results even for systems with high order differential operators and poorly-scaled coefficients.

Integral form of a differential equation

We next illustrate the procedure for converting the differential equation mathrm{(1)} into its corresponding integral form. By introducing an auxiliary variable

 nu(y) ; = ; left[ D^{(2)} , phi right] (y)  ; =: ; phi'' (y) hspace{6.0cm} mathrm{(2)}


and by integrating mathrm{(2)} we obtain

 begin{array}{rcl} phi'(y) & = & {displaystyle int_{-1}^{y} nu(eta_{1}) , mathrm{d} eta_{1}} ; + ; k_1 ~ = ~ left[ J^{(1)} , nu right] (y) ; + ; k_1 [0.35cm] phi(y) & = & {displaystyle int_{-1}^{y} left( int_{-1}^{eta_{2}} nu(eta_{1}) , mathrm{d} eta_{1} right) mathrm{d} eta_{2} ; + ; k_{1} left( y , + , 1 right) ; + ; k_{2}} [0.4cm] & = & left[ J^{(2)} , nu right] (y) ; + ; K^{(2)} , mathbf{k}. end{array} hspace{1.5cm} mathrm{(3)}


Here, J^{(1)} and J^{(2)} denote the indefinite integration operators of degrees one and two, the vector   mathbf{k} = left[ begin{array}{cc} k_{2} & k_{1} end{array} right]^T contains the constants of integration which are to be determined from the boundary conditions, and

 K^{(2)} ; = ; left[ begin{array}{cc} 1 & (y + 1) end{array} right].


The integral form of the 1D heat equation is obtained by substituting mathrm{(3)} into mathrm{(1)},

 begin{array}{rcll} left( I - mathrm{i} omega J^{(2)} right) nu(y) , - , mathrm{i} omega , K^{(2)} , mathbf{k} & !! = !! & - d(y) & hspace{0.5cm} mathrm{(4a)} [0.4cm] left[ begin{array}{cc} 1 & 0  1 & 2 end{array} right] left[ begin{array}{c} k_2  k_1 end{array} right] ; + ; left( left[ begin{array}{c} 1  0 end{array} right] E_{-1} , + , left[ begin{array}{c} 0  1 end{array} right] E_{+1} right) left[ J^{(2)} nu right] (y) & !! = !! & left[ begin{array}{c} 0  0 end{array} right]. & hspace{0.5cm} mathrm{(4a)} end{array}


Now, by observing that

 E_{-1} left[ J^{(1)} nu right] (y) ; = ; {displaystyle int_{-1}^{-1} nu(eta) , mathrm{d} eta} ; = ; 0


we can use mathrm{(4b)} to express the constants of integration mathbf{k} in terms of nu,

 begin{array}{rcl} left[ begin{array}{c} k_{2} [0.1cm] k_{1} end{array} right] & !! = !! & - {displaystyle frac{1}{2}} left[ begin{array}{rc} 2 & 0 [0.1cm] -1 & 1 end{array} right] left[ begin{array}{c} 0 [0.1cm] 1 end{array} right] E_{+1} , left[ J^{(2)} , nu right] (y) [0.5cm] & !! = !! & - {displaystyle frac{1}{2}} left[ begin{array}{c} 0 [0.1cm] 1 end{array} right] E_{+1} , left[ J^{(2)} , nu right] (y). hspace{5cm} mathrm{(5)} end{array}


Finally, substitution of mathrm{(5)} into mathrm{(4a)} yields an equation for nu,

 {displaystyle left( I , - , mathrm{i} omega J^{(2)} , + , frac{1}{2} , mathrm{i} omega left( y , + , 1 right) E_{1} J^{(2)} right) nu(y) ; = ; -d(y). }

This equation only contains indefinite integration operators and point evaluation functionals which are known to be well-conditioned.

Matlab codes

% The system parameters:
om = 0; % set temporal frequency to the value of interest

dom = domain(-1,1);     % domain of your function
y = chebfun('y',dom);
fone = chebfun(1,dom);      % one function
fzero = chebfun(0,dom);     % zero function

% The system operators can be constructed as follows:
A0{1} = [-1i*om*fone, fzero, fone];
B0{1} = -fone;
C0{1} = fone;

% The boundary condition matrices are given by:
Wa0{1} = [1, 0];   % 1*phi(-1) + 0*D^{(1)}*phi(-1) = 0
Wb0{1} = [1, 0];   % 1*phi(+1) + 0*D^{(1)}*phi(+1) = 0

% The singular values and the associated singular functions of the
% frequency response operator can be computed using the following code

Nsigs = 25;    % find the largest 25 singular values
LRfuns = 1;    % and associated left singular functions

[Sfun, Sval] = svdfr(A0,B0,C0,Wa0,Wb0,LRfuns,Nsigs);

% Analytical expressions for the singular values and corresponding singular
% functions are given by:
Sa = (4./(([1:Nsigs].*pi).^2)).';    % analytical singular values
Sf1 = sin((1/sqrt(Sa(1))).*(y+1));   % analytical solution of the first singular function
Sf2 = sin((1/sqrt(Sa(2))).*(y+1));   % analytical solution of the second singular function

% The absolute error of the first 25 singular values
norm(Sval - Sa)
ans =

   5.4288e-15

Singular values of the frequency response operator: svdfr versus analytical results.

plot(1:Nsigs,Sval,'bx','LineWidth',1.25,'MarkerSize',10)
hold on
plot(1:Nsigs,Sa,'ro','LineWidth',1.25,'MarkerSize',10);
xlab = xlabel('n', 'interpreter', 'tex');
set(xlab, 'FontName', 'cmmi10', 'FontSize', 20);
h = get(gcf,'CurrentAxes');
set(h, 'FontName', 'cmr10', 'FontSize', 20, 'xscale', 'lin', 'yscale', 'lin');
alt text 

Twenty five largest singular values of the frequency response operator.

The principal singular function: svdfr versus analytical results.

hold off; plot(y,-Sfun(:,1),'bx-','LineWidth',1.25,'MarkerSize',10)
hold on; plot(y,Sf1,'ro-','LineWidth',1.25,'MarkerSize',10);
xlab = xlabel('y', 'interpreter', 'tex');
set(xlab, 'FontName', 'cmmi10', 'FontSize', 20);
h = get(gcf,'CurrentAxes');
set(h, 'FontName', 'cmr10', 'FontSize', 20, 'xscale', 'lin', 'yscale', 'lin');
axis tight
 

The principal singular function of the frequency response operator.

The singular function corresponding to the second largest singular value: svdfr versus analytical results.

hold off; plot(y,Sfun(:,2),'bx-','LineWidth',1.25,'MarkerSize',10)
hold on; plot(y,Sf2,'ro-','LineWidth',1.25,'MarkerSize',10);
xlab = xlabel('y', 'interpreter', 'tex');
set(xlab, 'FontName', 'cmmi10', 'FontSize', 20);
h = get(gcf,'CurrentAxes');
set(h, 'FontName', 'cmr10', 'FontSize', 20, 'xscale', 'lin', 'yscale', 'lin');
axis tight
 

The singular function of the frequency response operator corresponding to the second largest singular value.