Publication Cover
Applicable Analysis
An International Journal
Volume 101, 2022 - Issue 14
1,279
Views
0
CrossRef citations to date
0
Altmetric
Research Article

Solving a Cauchy problem for the heat equation using cubic smoothing splines

, &
Pages 4882-4897 | Received 25 Jun 2020, Accepted 21 Dec 2020, Published online: 20 Jan 2021

ABSTRACT

The Cauchy problem for the heat equation is a model of situation where one seeks to compute the temperature, or heat-flux, at the surface of a body by using interior measurements. The problem is well-known to be ill-posed, in the sense that measurement errors can be magnified and destroy the solution, and thus regularization is needed. In previous work it has been found that a method based on approximating the time derivative by a Fourier series works well [Berntsson F. A spectral method for solving the sideways heat equation. Inverse Probl. 1999;15:891–906; Eldén L, Berntsson F, Regińska T. Wavelet and Fourier methods for solving the sideways heat equation. SIAM J Sci Comput. 2000;21(6):2187–2205]. However, in our situation it is not resonable to assume that the temperature is periodic which means that additional techniques are needed to reduce the errors introduced by implicitly making the assumption that the solution is periodic in time. Thus, as an alternative approach, we instead approximate the time derivative by using a cubic smoothing spline. This means avoiding a periodicity assumption which leads to slightly smaller errors at the end points of the measurement interval. The spline method is also shown to satisfy similar stability estimates as the Fourier series method. Numerical simulations shows that both methods work well, and provide comparable accuracy, and also that the spline method gives slightly better results at the ends of the measurement interval.

2010 Mathematics Subject Classifications:

1. Introduction

In many industrial applications one wishes to determine the temperature, or heat-flux, on the surface of a body. Often it is the case that the surface itself inaccessible for measurements [Citation1–7]. In such cases one can instead measure the temperature at a location in the interior of the body and compute the surface temperature by solving an ill-posed boundary value problem for the heat equation.

In a one-dimensional setting a mathematical model of the above situation is the following: Determine the temperature u(x,t), satisfying the heat equation (1) (kux)x=ρcput,0<x<a,t0,(1) where k is the thermal conductivity, ρ is the density, and cp is the specific heat capacity of the material, with the Cauchy data [u,ux]=[g,h] is given along the line x = a. In addition we speficy the initial data u(x,0)=0, for 0xa.

Of course, since g and h are measured, there exists measurement errors, and we would actually have functions gm,hmL2, for which (2) gmgL2ϵ,andhmhL2ϵ,(2) where ϵ>0 represents a bound on the measurement error.

Although in this paper we mostly discuss the heat equation in its simplest form, κuxx=ut, our interest is in numerical methods that can be used for more general problems, e.g. non-linear equations (3) (κ(u)ux)x=α(u)ut,(3) which occur in applications since the thermal properties of most materials are dependent on the temperature. For such problems one cannot use methods based on reformulating the problem as a linear operator equation [Citation4,Citation8,Citation9]. Instead, we solve the problem, essentially, as an initial value problem in the space variable [Citation10–12]. This approach works very well if the time-derivative is approximated by a bounded, discrete operator [Citation2].

In this paper, we study two different methods for approximating the time derivative and their numerical implementation. First, the time derivative is approximated by a matrix representing differentiation of a trigonometric interpolant. This is a method that has proved to work very well in practice, see [Citation7,Citation13–15], but that has the drawback that by using the Fourier transform we implicitly assume that the solution is periodic in the time variable. This is generally not the case and thus the method is affected by additional errors at the ends of the time interval. Implicit assumptions of periodicity also occurs in other popular methods, such as those based on Meyer wavelets [Citation16,Citation17].

In order to avoid problems with periodicity we instead use a cubic splines to construct a discrete approximation of the time derivative. In previous work cubic splines have been shown to work well for this purpose, see [Citation18]. In our work we use cubic smoothing splines [Citation19], which includes a parameter λ that controls the smoothness of the result, and construct a matrix approximation of the time derivative. We also derive stability estimates that suggest that the spline method has similar regularizing properties as the Fourier series approach. In addition numerical experiments shows that the method works well.

2. The Cauchy problem for the heat equation

In this work we are concerned with the following non-standard boundary value problem for the heat-equation: Find the temperature u(x,t), for 0xa, such that (4) {(κux)x=ut,0xa,t0,u(x,0)=0,0xa,u(a,t)=g(t),t0,ux(a,t)=h(t)t0,(4) where the function κ represents the material properties, and g(t), h(t) are the data.

The problem (Equation4) is ill–posed in the sense that the solution, if it exists, does not depend continuously on the data. In the case of constant material properties, i.e. κ is a constant, this can be seen by solving the problem in the Fourier domain. In order to simplify the analysis we define all functions to be zero for t<0. Let u^(x,ξ)=12πu(x,t)eiξtdt,be the Fourier transform of the solution. The heat equation takes the form (5) κu^xx(x,ξ)=iξu^(x,ξ),0<x<a,ξR,(5) and it can be verified that the solution is given by (6) u^(x,ξ)=cosh(σ(ξ)(ax))g^(ξ)sinh(σ(ξ)(ax))σ(ξ)h^(ξ),(6) where σ(ξ)=iξ/κ, and iξ denotes the principal value of the square root. Since the real part of iξ is positive, and the solution u^(x,ξ), is assumed to be in L2, we see that both the data functions [g^,h^], must decay rapidly as |ξ|. Also, small perturbations in g^ and h^, for high frequencies, may blow-up and drastically change the solution. This behavior is typical for ill-posed problems [Citation20].

2.1. Stabilization by discretizing the time variable

In this section we stabilize the heat conduction problem by discretizing the time-variable, see [Citation2,Citation13]. By replacing the time derivative t by a bounded operator, e.g. a matrix, we effectively regularize the problem. For this purpose we rewrite (Equation4) as an initial-value problem (7) (uκux)x=(0κ1It0)(uaux),0xa,(7) with initial-boundary values (8) u(a,t)=gm(t),ux(a,t)=hm(t),for0tb,(8) and (9) u(x,0)=0,for0xa.(9) We discretize (Equation7), on a uniform grid Δ={tj}j=1n, with 0=t1<<tn=b. For simplicity we also introduce a sampling operator such that gΔ=(g(t))Δ=(g(t1),,g(tn))T,i.e. the function is sampled on the time grid. By introducing semi-discrete representations of the solution and its derivative, i.e. U(x)=(u(x,))ΔandUx(x)=(ux(x,))Δ,we obtain the initial value problem, (10) (uκUx)x=(0κ1ID0)(UκUx),0xa,(10) with initial data U(a)=(gm)Δ and Ux(a)=(hm)Δ.

In the initial value problem (Equation10) the matrix D represents a discretization of the time derivative. In [Citation21] it was observed that since, for any matrix, D2 is bounded the system of ODEs (Equation10) is well-posed, and the solution depends in a stable way on the used data. By controlling the accuracy of the approximation Dt the degree of stability can be adjusted to be suitable for a problem with a specific noise level. For solving the problem numerically, we use a standard ODE solver, and usually it is sufficient to use an explicit method, e.g. a Runge–Kutta code.

In the rest of this paper, we will discuss concrete implementations where the matrix D in (Equation10) is approximated by a Fourier method and also a method where the derivative is computed using a smoothing spline. In both cases we will derive stability estimates and also investigate the properties of the methods using numerical examples.

2.2. Differentiation using the trigonometric interpolant

The unique trigonometric polynomial interpolating a function g(t), on the uniform grid {tj}j=1n is [Citation22], (11) g(t)=12πj=n2n21g^jeiξjt,ξj=2πj/b,(11) where the sequence {g^j}j=n2n21 are the discrete Fourier coefficients, with the assumption that n is even. The discrete Fourier coefficients are computed by taking the FFT of the vector gΔ.

It is known that very accurate approximations of the derivative, of periodic functions, can be computed by differentiation of the trigonometric polynomial. This leads us to the following definition:

Definition 2.1

The matrix Dξc:RnRn is defined as Dξc=FHΛξcF, where F is the Fourier matrix, and Λξc is the diagonal matrix (12) (Λξc)j,j={iξj,|ξj|<ξc,0,|ξj|ξc,(12) and ξc is the cut-off frequency.

By keeping only frequencies below the cut-off, i.e. |ξj|ξc, we effectively remove the high frequency content from the solution (Equation6) and thus stability is restored. The stability of the problem (Equation10), will be explored as a sequence of lemmas.

Lemma 2.2.

The matrix Dξc is bounded and Dξc2ξc.

Proof.

The Fourier matrix F is orthogonal and therefore Λξc2=Dξc2. Also, since Λξc is diagonal the norm is bounded by its largest diagonal element.

Next, we prove that the problem (Equation10) is well-posed if the approximation tD=Dξc is used. In the case of constant coefficients, i.e. constant material propertiens κ, we have the following result;

Lemma 2.3.

Let D=Dξc, where ξc>0 is the cut-off frequency, and let U1 and U2 be two different solutions to  (Equation10), corresponding to Cauchy data [(g1)Δ,hΔ] and [(g2)Δ,hΔ], respectively. Then (13) U1(x)U2(x)2cosh(σ(ax))(g1g2)Δ2,σ=ξc2κ.(13)

Proof.

We use the Discrete Fourier Transform and let V=F(U1U2). Then (Equation10) simplifies to (14) κVxx=ΛξcV,0<x<a,(14) with boundary conditions V(a)=F(g1g2)Δ and Vx(a)=F(hh)Δ=0. Since Λξc is a diagonal matrix, the problem can be solved one frequency ξj at a time, and (15) V(x,ξj)=cosh(iξj/κ(ax))V(a,ξj),if|ξj|ξc,(15) and V(x,ξj)=0 othervise. Thus |V(x,ξj)|2|cosh(iξj/κ(ax))|2|V(a,ξj)|2(cosh((ξc/2κ)(ax)))2|V(a,ξj)|2. Since F is orthogonal V2=U1U22 and V(a,ξj)2=(g1g2)Δ)2 and thus the result follows by summation over all the frequencies ξj.

It is easy to see that |coshiξ|cosh(ξc/2), for |ξ|ξc, as was used above. In order to treat the second component of (Equation6) we need a similar property for sinh(iξ)/iξ. This is demonstrated by the following two lemmas.

Lemma 2.4.

It holds that |sinhz|2=sinh2(Re{z})+sin2(Im{z}).

Proof.

Let z=γ+iβ. Then a direct calculation shows that (16) |ezez|2=(eγeγ)2cos2β+(eγ+eγ)2sin2β.(16) Expanding the squares, and using the trigonometric identity cos2β+sin2β=1, yields the desired result.

Lemma 2.5.

The function g(ξ)=ξ2(sinh2ξ+sin2ξ), ξ>0, is monotonically increasing.

Proof.

Let g1(ξ)=sinh2ξ+sin2ξ and g2(ξ)=ξ2. According to L'Hôspital's monotone rule, see [Citation23], the function g(ξ)=g1(ξ)/g2(ξ) is monotonically increasing if the same is true for h(ξ)=g1(ξ)/g2(ξ). The results follows by applying the monotone rule twice since a direct calculation shows that g1(ξ)=2cosh(2ξ)+2cos(2ξ)>0, for ξ>0.

Finally since i=(1±i)/2 the two previous lemmas can be combined into the following result.

Corollary 2.6.

The function |sinhiξ|/|iξ| is monotonically increasing.

Lemma 2.7.

Let D=Dξc, where ξc>0 is the cut-off frequency, and let U1 and U2 be two different solutions to  (Equation10), corresponding to Cauchy data [gΔ,(h1)Δ] and [gΔ,(h2)Δ]. Then (17) U1(x)U2(x)2sinh(ξc/2κ(ax))+1ξc/2κ(h1h2)Δ2.(17)

Proof.

The proof is similar to that of Lemma 2.3. Let V=F(U1U2) and note that V(a)=0 and Vx(a)=F(h1h2)Δ. It can be verified that the solution, for one frequency ξj, is (18) V(x,ξj)=sinh((iξj/κ)(ax))iξj/κV(a,ξj),for|ξj|<ξc,(18) and V(x,ξj)=0 otherwise. Taking absolute values and using the monotononicity of Collorary 2.6 we obtain (19) |V(x,ξj)|2|sinh(iξc/κ(ax))iξc/κ|2|V(a,ξj)|2.(19) Using Lemma 2.4 leads to (20) |V(x,ξj)|2sinh2(ξc/2κ(ax))+sin2(ξc/2κ(ax))(ξc/2κ)2|V(a,ξj)|2.(20) Finally, the result follows by using the orhogonality of F, the fact that sin2α1, and by summation over all the frequencies ξj.

Remark 2.8

Note that when deriving the bounds (Equation13) and (Equation17) we used that the eigenvalues of Dξc, i.e. the frequencies iξj, are located on the imaginary axis. Thus we get a slightly better bound compared to just using Dξc2ξc.

2.3. Periodization using splines

When using the FFT algorithm we implicitly assume that the vector fΔ represents a periodic function. This is not realistic in our application. In order to avoid wrap-around effects, see [Citation2], we extend the data fΔ, from the interval [0,1] to [1,2]. This is done by first computing two first degree polynomials that approximate the first, and last, six points of the vector fΔ in the least squares sense. The two first degree polynomials are then sampled on the original grid creating a total of 12 interpolation points. By moving the six interpolation points located near t=0 to after t=2 we obtain suitable points for creating a cubic spline, defined on the interval [1,2], that can be used to extend the vector fΔ to a periodic vector of double length in such a way that the transitions at t = 0 and t = 1 are as smooth as possible.

The procedure is illustrated in Figure  where a noisy vector fΔ, representing a function f(t) defined on [0,1], has been smoothly extended to double length. By fitting first degree polynomials to six data points, near t = 0 and t = 1, we obtain the interpolation points needed to create the cubic spline defined on the interval [1,2]. We also display the exact derivative f(t) and the approximation DξcfΔ, where the FFT of the extended data vector is used to approximate the derivative. In this particular experiment the noise level was ε=0.5101 and the cut-off frequency ξc=35 was used. We manage to filter out most of the noise from the derivative and a sufficient number of terms in (Equation11) is included so that the computed derivative is resonably accurate. Note that Gibbs phenomena near the end points of the interval [0,1] are avoided and the derivative is reasonably accurate in the whole interval.

Figure 1. We illustrate the periodization process by displaying both a noisy data vector fΔ (left graph) representing a non-periodic function f(t) defined on [0,1]. The cubic spline, defined on [1,2] and that matches the slopes of f(t) at t = 0 and t = 1 is also illustrated (left graph). The combined vector represents a periodic function defined on [0,2]. We also show the exact derivative f(t) (right graph) and the approximate derivative DξcfΔ for ξc=35 (right graph). The approximation is reasonably good both for t = 0 and t = 1.

Figure 1. We illustrate the periodization process by displaying both a noisy data vector fΔ (left graph) representing a non-periodic function f(t) defined on [0,1]. The cubic spline, defined on [1,2] and that matches the slopes of f(t) at t = 0 and t = 1 is also illustrated (left graph). The combined vector represents a periodic function defined on [0,2]. We also show the exact derivative f′(t) (right graph) and the approximate derivative DξcfΔ for ξc=35 (right graph). The approximation is reasonably good both for t = 0 and t = 1.

2.4. Implementation of the Fourier method

The numerical implementation of the Fourier series-based approach consists of implementing the procedure for computing derivatives described in Section 2.2, together with the periodization presented in Section 2.3, i.e. writing a procedure for computing the product of Dξc and a vector. Once such a procedure is available we can solve the initial value problem (Equation10) using a Runge–Kutta method (ode45 in Matlab) with automatic step size control.

In order to create test problems, with a known solution, we select a function f(t)=u(0,t), and set u(a,t)=0, for 0tb, and used the initial data u(x,0)=0, for 0<x<a. We then discretized the heat equation using the the Crank-Nicholson implicit scheme and computed the corresponding temperature gradient h(t)=ux(a,t). For our experiments a grid of size n = 200 in space and m = 500 in time was used. By adding normally distributed noise to the computed Cauchy data [gΔ,hΔ] we obtain the noisy data vectors [(gm)Δ,(hm)Δ], from which we attempt to reconstruct an approximation of the exact surface temperature f(t) by solving the Cauchy problem (Equation10).

The performance of the Fourier method is illustrated by selecting a function f(t) and computing the corresponding Cauchy data [gΔ,hΔ], as described above. Recall that g(t)=0 is used here. The exact surface temperature f(t), and also the thermal gradient h(t), are illustrated in Figure . Note that the function f(t) is not periodic in time and therefore we might expect errors due to wrap-around effects.

Figure 2. We display the functions f(t) and h(t) in the top-left graph. In the top-right graph we show the error fm,ξcf2, as a function of ξc, for the noise level ϵ=102. Note that there is an optimal value for ξc. In addition we display the solution fm,ξc(t), for ξc=6 (middle left), which is close to the optimum, and for ξc=18 (middle right). Also the exact solution f(t) is displayed. In the bottom-left graph we show the optimal ξc as a function of the noise level ϵ and in the bottom-right graph we show the corresponding error, for the optimal ξc, as a function of ϵ. Note that for a larger noise level ϵ, we need a smaller value of ξc, and obtain a larger error in the computed surface temperature fm,ξc(t).

Figure 2. We display the functions f(t) and h(t) in the top-left graph. In the top-right graph we show the error ‖fm,ξc−f‖2, as a function of ξc, for the noise level ϵ=10−2. Note that there is an optimal value for ξc. In addition we display the solution fm,ξc(t), for ξc=6 (middle left), which is close to the optimum, and for ξc=18 (middle right). Also the exact solution f(t) is displayed. In the bottom-left graph we show the optimal ξc as a function of the noise level ϵ and in the bottom-right graph we show the corresponding error, for the optimal ξc, as a function of ϵ. Note that for a larger noise level ϵ, we need a smaller value of ξc, and obtain a larger error in the computed surface temperature fm,ξc(t).

First, we set the noise level to ϵ=102 and compute an approximate surface temperature fm,ξc, for a range of frequencies 1<ξc<20, and compute the error (fm,ξcf)Δ2. The total error can be divided into two parts. First we have the truncation error RT=(ffξc)Δ2, due to the fact that not all frequencies are included in the numerical solution. Second we have the propagated data error RXF=(fξcfm,ξc)Δ2. The stability results, see Lemmas 2.3 and  2.7, says that RXF is increasing as a function of ξc, while the truncation error RT is decreasing as a function of ξc. Thus the error curve has a clear minimum and an optimal ξc representing the appropriate trade-off between RXF and RT. For this case we also plot two solutions fm,ξc(t), for ξc=6 and ξc=18. We see that in the first case the level of regularization is just right but in the latter case there is too much noise magnification.

Next we pick noise levels in the range 105ϵ101. For each level of noise we find the optimal value of ξc, which gives the smallest error. We see that a smaller noise ϵ means that we can use a large cut-off frequency ξc. We also compute the errors, for the optimal value of ξc, and as we expect a larger noise in the used data, leads to a larger error in the computed approximations fm,ξc(t).

3. Regularization by using smoothing splines

In this section we discuss the regularization of the problem (Equation4) using cubic smoothing splines. As previously we will implement a differentiation matrix Dλ using cubic splines and solve the discretized initial value problem (Equation10) numerically. The goal is to reach similar accuracy and stability properties as reported for the Fourier-based derivative Dξc, while avoiding the practical difficulties that occur when the data vectors do not represent periodic functions.

In the following subsections we introduce a differentiation matrix Dλ and also give a bound for its norm. Also we show that the matrix Dλ is skew-symmetric. Thus stability results, similar to Lemmas 2.3 and  2.7, can be derived.

3.1. Differentiation using smoothing splines

In this section we present known facts about splines and introduce the notation needed in our work. For simplicity we restrict ourselves to considering the interval 0t1. Thus we have a uniform grid Δ, such that 0=t1<<tn=1, with grid parameter h. We work in an L2 setting and introduce the Sobolev space (21) W2[0,1]={u:u,uabs.cont.on[0,1]anduL2[0,1]},(21) together with the standard norms and semi-norms defined, see [Citation24].

Let y=(y1,y2,,yn)T be a vector of data values on the grid. The smoothing cubic spline, that approximates yi on the grid, is defined as follows:

Definition 3.1

Let yRn be a vector. The cubic smoothing spline sλ[y] is obtained by solving (22) minuW2[0,1]hyuΔ22+λ|u|22,(22) where λ>0 is the regularization parameter and |u|2 denotes a semi-norm.

It is well known that the solution to (Equation22) is a natural cubic spline. It is also known that the corresponding operator, mapping yRn onto sλ[y]W2([0,1]), is linear, see [Citation24,Citation25]. Thus we can introduce a matrix as follows:

Definition 3.2

The matrix SλRn×n is defined by (23) Sλy=(sλ[y])ΔRn,forallyRn.(23)

The matrix Sλ has many interesting properties. For instance Sλ21. Also, the problem (Equation22) is symmetric in the sense that sλ[y](t)=sλ[y¯](1t), where y¯=(yn,yn1,,y1)T is the vector taken in reverse order. A consequence is the following result:

Lemma 3.3.

The matrix SλRn×n is symmetric.

Proof.

Let yRn. By introducing a basis, e.g. the B-splines {βi(t)}i=0n+1, for the space of cubic splines, and writing the minimizer of (Equation22) as u(t)=c0β0(t)++cn+1βn+1(t), we can derive an expression for Sλ as follows: First Sλy=uΔ=Ac, where (A)ij=βj(ti). Second, the seminorm |u|2 can be written in the form |u|22=cTBc, where (B)ij=(βi,βj)2. Thus the normal equations are (hATA+λB)c=hATy. Thus Sλ=A(hATA+λB)1AT is symmetric. For the case λ=0, i.e. interpolating natural cubic splines, this is a known result [Citation25].

Now we are ready to introduce the differentiation matrix Dλ. More precisely, we make the following definition:

Definition 3.4

The matrix DλRn×n is defined by (24) Dλy=(sλ[y](t))Δ,forallyRn.(24)

The product Dλy is computed by finding the smoothing spline sλ[y](t) and sampling its derivative on the grid.

Lemma 3.5.

The matrix Dλ is skew-symmetric.

Proof.

The matrix Dλ can be written in the form Dλ=DWAT, where the matrix W=h(hATA+λB)1 is symmetric, (A)ij=βj(ti), and (D)ij=βj(ti), see the proof of Lemma 3.3. A direct calculation shows that (25) (Dλ)i,j=l=0n+1k=0n+1βl(ti)wlkβk(tj).(25) Since the B-spline basis function βk(t) is even, with respect to t=tk, and the derivative βl(t) is odd with respect to t=tl, we see that for the product βl(ti)βk(tj)=βl(tj)βk(ti). Thus we can rearrange the indices to show that (Dλ)ij=(Dλ)ji.

A consequence of the fact that Dλ is skew-symmetric is that its eigenvalues are purely imaginary. The fact is used to derive stability estimates when (Equation10) is solved using the smoothing spline method.

3.2. A bound for the matrix Dλ

In this section we derive a bound for Dλ2. Most of the theory presented in this section represent simplifications, with simpler proofs, of more general results found in [Citation24], where an error estimate |usλ[uΔ]|1 was derived. For our work we instead need a bound for Dλ2 which can be obtained using similar techniques. We need a series of Lemmas.

Lemma 3.6.

Let uC(1)([0,1]), Δ={ti}i=1n be a uniform grid, and h=t2t1. Then, if h is chosen so that h|u|10.1|u|0, it holds that (26) c0|u|0huΔ2c1|u|0,(26) where c0 and c1 are constants.

Proof.

We do the proof of one inequality as the other is obtained in a similar way. Let νi=(ti1+ti)/2, with ν1=0 and νn+1=1. For t,ti[νi,νi+1] we have u2(ti)=u2(t)+tti(u2(τ))dτ=u2(t)+tti2u(τ)u(τ)dτu2(t)+2(νiνi+1u2(τ)dτ)1/2(νiνi+1(u(τ))2dτ)1/2Now we can integrate over [νi,νi+1], sum over all the intervals, and then use the discrete Cauchy-Schwarz inequality, to obtain (27) huΔ22|u|02+2h|u|0|u|1.(27) The result follows by using h|u|10.1|u|0. Also note that c1=1.2.

The above Lemma can be used to estimate the discrete norm uΔ2 in terms of the continuous norm |u|0, and also the other way around.

In order to obtain the desired bound for Dλ2 we need a result that follows directly from the fact that the cubic smoothing spline is the minimizer of (Equation22).

Lemma 3.7.

Let yRn be a vector and uW2([0,1]) be corresponding smoothing spline. Then (28) h(yuΔ)TuΔ=λ|u|22.(28)

Proof.

A norm, and scalar product, for (y,v)RnL2([0,1]) is given by (29) (y,v)2=hy22+λ|v|02.(29) The problem defining the cubic smoothing spline, see Lemma 3.1, can then be written as: Find uW2([0,1]) that minimize (y,0)(uΔ,u). The solution of the least squares problem is characterized by the residual (yuΔ,u) being orthogonal to (vΔ,v), for all vW2([0,1]). This means that (30) h(yuΔ)TvΔ+λ(u,v)0=0.(30) Insert v = u and the result follows.

Proposition 3.8.

The matrix Dλ, defined by  (3.4), satisfies (31) Dλc3λ1/4,(31) where c3 is a constant.

Proof.

From the definition of Dλ, and using Lemma 3.6, we obtain (32) Dλy22=(u)Δ22c12h|u|02=c12h|u|12,(32) where u(t)=sλ[y](t) is the smoothing cubic spline corresponding to the vector yRn. Next we use the inequality (33) τ2|u|12c2(|u|02+τ4|u|22),(33) where c2 is a constant, which is valid for 0<τ<1, and all uW2([0,1]), see [Citation24, Lemma 3.9] or, originally, [Citation26]. We obtain (34) Dλy22c12c2hτ2(|u|02+τ4|u|22)c12c2hτ2(hc02uΔ22+τ4|u|22),(34) where we again used Lemma 3.6. For the final step we write y=yuΔ+uΔ and expand y22 into (35) y22=(yuΔ+uΔ)T(yuΔ+uΔ)=yuΔ22+2(yuΔ)TuΔ+uΔ22.(35) By inserting Lemma 3.7 into the above expression we obtain (36) y22=yuΔ22+2λh|u|22+uΔ22.(36) From (Equation36) we obtain the two estimates (37) |u|22h2λy22,anduΔ22y22.(37) Inserting these two inequalities into (Equation34) yields (38) Dλy22c12c2hτ2(hc02+τ4h2λ)y22.(38) The result follows by inserting τ=λ1/4 into (Equation38).

3.3. Stability analysis for cubic splines

In this section we establish stability results, for the initial value problem (Equation10), when the approximation tD=Dλ is used. The proofs are based on the idea that since Dλ is skew-symmetric we have an eigenvalue decomposition (39) Dλ=XΛλXH,(Λλ)j,j=iλj,(39) where the eigenvector matrix X is unitary, the λj are real, and are bounded by |λj|c3λ1/4/b. The factor b is due to the fact that the theory in the previous section was developed under the assumption that the time interval was 0<t<1.

Lemma 3.9.

Let D=Dλ, where λ>0 is the regularization parameter, and let U1 and U2 be two different solutions to  (Equation10), corresponding to Cauchy data [(g1)Δ,hΔ] and [(g2)Δ,hΔ], respectively. Then (40) U1(x)U2(x)2cosh(σ(ax))(g1g2)Δ2,σ=c3λ1/42bκ.(40)

Proof.

Let X be as defined in (Equation39) and introduce a new variable V=XH(U1U2). The system (Equation10) simplifies to (41) κVxx=ΛλV,0<x<a,(41) with boundary conditions V(a)=XH(g1g2)Δ and Vx(a)=XH(hh)Δ=0. This is exactly the same situation as in the proof of Lemma 2.3 and the result follows by repeating the same steps.

Similarily we can repeat the steps for the proof of Lemma 2.7 to obtain the following result:

Lemma 3.10.

Let D=Dξc, where λ>0 is the regularization parameter, and let U1 and U2 be two different solutions to  (Equation10), corresponding to Cauchy data [gΔ,(h1)Δ] and [gΔ,(h2)Δ]. Then (42) U1(x)U2(x)2sinh(σ(ax))+1σ(h1h2)Δ2,σ=c3λ1/42bκ.(42)

The above results means that the problem (Equation10) is well-posed when the approximation tDλ is used. The regularization parameter λ fills the same role as the cut-off frequency ξc for the Fourier method. For this method a small value for λ leads to a more accurate derivative and thus less stability for the inverse problem. If ξcλ1/4 then both methods satisfy similar stability estimates.

4. Simulated numerical examples

In this section we present numerical examples intended to illustrate the properties of the smoothing spline method. The experiments are constructed essentially the same way as in Section 2.4. There are many codes available for solving the minimization problem (Equation22) and for our work we use the Matlab function csaps; which can be used to find the cubic smoothing spline sλ[y](t) for a given vector y, a stepsize h, and regularization parameter λ .Footnote1

Test 1 As a first experiment we solve the same problem, as was used in Section 2.4. Thus we first set the noise level to be ϵ=102 and solve the inverse problem for a wide range of regularization parameters λ. In Figure  we present the results. We note that, as previously, there is an optimal regularization parameter λ, which represents the appropriate trade-off between accuracy and stability. We also display the computed solution for λ=2108 which is close to the optimal value. The accuracy of the numerical solution is comparable to that computed by the Fourier method.

Figure 3. In the top-left graph we show the error fm,λf2, as a function of λ, for the noise level ϵ=102. Note that there is an optimal value for λ. In the top-right graph we display the surface temperature for λ=2108 which is close to the optimal value. In the bottom-left graph we show the optimal λ as a function of the noise level ϵ and in the bottom-right graph we show the corresponding error, for the optimal λ, as a function of ϵ. Note that for a larger noise level ϵ, we need a larger value of λ, and obtain a larger error in the computed surface temperature fm,λ(t).

Figure 3. In the top-left graph we show the error ‖fm,λ−f‖2, as a function of λ, for the noise level ϵ=10−2. Note that there is an optimal value for λ. In the top-right graph we display the surface temperature for λ=2⋅10−8 which is close to the optimal value. In the bottom-left graph we show the optimal λ as a function of the noise level ϵ and in the bottom-right graph we show the corresponding error, for the optimal λ, as a function of ϵ. Note that for a larger noise level ϵ, we need a larger value of λ, and obtain a larger error in the computed surface temperature fm,λ(t).

Next we illustrate the regularization properties of the method by letting the noise level vary in the range 105ϵ101. For each different noise level we find the optimal λ and compute the corresponding error. smallest error. We see that a smaller noise ϵ means that we can use a smaller λ, and thus compute the derivatives more accurately. We also see that a larger noise in the data leads to a larger error in the computed surface temperatures fm,λ(t). The results are comparable to those reported in Section 2.4.

Test 2 In order to further investigate the properties of the two numerical methods we select a variable coefficient (43) κ(u)=1+sin(πu)0.8+4.2exp(27.3(a/3u)2).(43) This choice of κ(u) gives a slightly less ill-posed problem compared to our previous test. Note that since the problem now is non-linear iteration is needed to solve the problem and create numerical test data. The numerical code for the inverse problem (Equation10) remains the same. For this experiment we chose a smoothed out stepfunction f(t) as the exact surface temperature and the time interval is 0<t<b, where b = 5. The size of the time grid is again n = 400. Our objective is to try and verify that the Fourier transform method leads to a larger error, at the beginning of the time interval due to the implicit periodicity assumption. This motivates our choice of f(t) as a step function. The idea is that Gibbs phenomena near the discontinuity causes a larger error in the second half of the interval [0,b], and that this should also cause errors near t = 0 for the Fourier method. We use a smoothed out step function, and not a true discontinuity, to make the test a bit easier for the Fourier method.

First we compute the errors ffm,λ2 and ffm,ξc2 for a range of regularization parameters. For this test we use the noise level ϵ=102. The results are displayed in Figure . We see that for both methods too little regularization leads to a large error due to instability. However, also for both methods, the truncation error is fairly large due to Gibbs phenomena regardless of the choice of the regularization parameter. There is no clear optimal choice for the level of regularization. We also display two approximate solutions for λ=108 and ξc=7, respectively. Both solutions are about as accurate however the spline method clearly leads to a smaller error initially. This is due to a lack of wrap-around effects.

Figure 4. We present tests where the exact solution f(t) is a smoothed step function. The top graphs show the error ffm,λ2 (left) for the spline method and the error ffm,ξc2 (right) for the Fourier method. The middle graphs display the numerical solutions fm,λ(t) (left) obtained using the spline method and λ=108 and the solution fm,ξc(t) computed using the Fourier method and ξc=7. The lower graphs show the errors ffmk,λ2 x markers) and ffmk,ξc2 o markers) for different random noise sequences ϵk. In the left graph the variance of the noise is ϵ=102, λ=108 and ξc=7. In the right graph instead ϵ=103, λ=2109 and ξc=8.3. In both cases 100 different sets of random noise were generated.

Figure 4. We present tests where the exact solution f(t) is a smoothed step function. The top graphs show the error ‖f−fm,λ‖2 (left) for the spline method and the error ‖f−fm,ξc‖2 (right) for the Fourier method. The middle graphs display the numerical solutions fm,λ(t) (left) obtained using the spline method and λ=10−8 and the solution fm,ξc(t) computed using the Fourier method and ξc=7. The lower graphs show the errors ‖f−fmk,λ‖2 x markers) and ‖f−fmk,ξc‖2 o markers) for different random noise sequences ϵk. In the left graph the variance of the noise is ϵ=10−2, λ=10−8 and ξc=7. In the right graph instead ϵ=10−3, λ=2⋅10−9 and ξc=8.3. In both cases 100 different sets of random noise were generated.

The noise level ϵ=102 represents the variance of the normally distributed random noise added to the data [gΔ,hΔ] at individual grid points. However an observation is that different random sequences can give quite different errors in the computed solutions. Thus we perform 100 different experiments, with the same parameters b = 5, ϵ=102 and κ(x) as specified above. For each experiment we compute the error using the Euclidea norm 2,I, where only grid points ti inside the interval I=[0,1] counts towards the sum. This means that we only look at the errors at the beginning of the time interval.

To select the appropriate levels of regularization is difficult since the methods behave differently. In this case we did the following: We use the exact solution f(t)=0, and thus gΔ=hΔ=0. This means we only have noise. We picked λ=108 and adjusted ξc until both methods give the same mean error, over 100 tests. In this case that happens for ξc7. Thus the parameters are chosen so that random noise is magnified equally by both methods. The results are shown in Figure . We see that for the step function f(t) the error, measured using 2,[0,1], is on average significantly larger for the Fourier method which shows that the method suffers from problems with wrap-around effects.

We also tried a lower noise level ϵ=103. In this case the appropriate regularization parameters are λ=2109 and ξc=8.3. Again when we run 100 tests, with different noise sequences, we see that the spline method has a smaller error initially, due to avoidance of wrap-around effects.

5. Concluding remarks

In this paper we have developed a regularization method for solving the inverse heat conduction problem by using smoothing cubic splines. Previously, the same problem has been solved using Fourier transforms [Citation2,Citation7,Citation13]. The Fourier method is working well but makes the implicit assumption that the data vectors represents periodic functions. This is not true for the problem under consideration and this can potentially lead to very large errors in practice. We present one of the standard techniques, called periodization, that is used to deal with non-periodic data vectors and thus avoid wrap-around effects. In our work we show that, while the periodization works reasonably well, there are increased errors in the numerical solution due to the periodicity assumptions needed for the Fourier method. To avoid the need for a periodicity assumption is why we introduce the smoothing spline method as an alternative. Our experiments show that we do indeed avoid an increased error due to wrap-around effects.

The inverse heat conduction problem is ill-posed in the sense that small errors in the data can cause large errors in the numerical solution. Thus regularization is needed. We demonstrate that the Fourier method is a regularization of the problem by providing stability estimates. The stability theory is developed for the discrete problem that is solved numerically. Though a complication is that the periodization procedure is not included in the stability analysis.

For the smoothing spline method we introduce a matrix Dλ that represents differentiation of the smoothing spline obtained from a vector y consisting of function values on the grid. Our goal is to develop similar stability estimates as for the Fourier method. Thus we derive a bound on the norm Dλ2 and also show that the matrix is skew-symmetric. Our theory is based on a previous paper [Citation24] but since our work concerns only a special case we can obtain simpler proofs. Since no periodicity assumption is needed, as for the Fourier method, one advantage is that the stability theory corresponds more directly to the discrete problem that is actually solved by our codes. From our experiments we also deduce that the smoothing splines method can effectively be used as a regularization method for solving the Cauchy problem.

In this paper we only present a stability analysis that bounds the errors in the solution caused by random errors in the data. In [Citation24] an error estimate usλ[uΔ]L2 is derived. In future work we intend to make use of a similar error estimate for our matrix approximation Dλ and also limit the truncation error for our method. We also intend to apply our method to similar problems and compare with the work of other authors, e.g. [Citation16,Citation18]. We are also looking to apply the method to industrial problems with measured data.

Acknowledgments

The work of Mary Nanfuka is supported by the SIDA bilateral programme (2015–2020) with Makerere University; Project 316: Capacity building in Mathematics. The authors also thank prof. Matti Heiliö for valuable discussions during the work.

Disclosure statement

No potential conflict of interest was reported by the author(s).

Notes

1 The code used for our experiments is made available upon request by the corresponding author

References

  • Beck JV, Blackwell B, Clair SR. Inverse heat conduction. Ill-posed problems. New York: Wiley; 1985.
  • Eldén L, Berntsson F, Regińska T. Wavelet and Fourier methods for solving the sideways heat equation. SIAM J Sci Comput. 2000;21(6):2187–2205.
  • Gardarein J-L, Gaspar J, Corre Y, et al. Inverse heat conduction problem using thermocouple deconvolution application to the heat flux estimation in a tokamak. Inverse Probl Sci Eng. 2013;21(5):854–864.
  • Jahedi M, Berntsson F, Wren J, et al. Transient inverse heat conduction problem of quenching a hollow cylinder by one row of water jets. Int J Heat Mass Transf. 2018;117(Supplement C):748–756.
  • Li D, Wells MA. Effect of subsurface thermocouple installation on the discrepancy of the measured thermal history and predicted surface heat flux during a quench operation. Metallurg Mater Trans. 2005;36B:343–354.
  • Taler J, Weglowski B, Pilarczyk M. Monitoring of thermal stresses in pressure components using inverse heat conduction methods. Int J Numer Meth Heat Fluid Flow. 2017;27(3):740–756.
  • Wikström P, Blasiak W, Berntsson F. Estimation of the transient surface temperature, heat flux and effective heat transfer coefficient of a slab in an industrial reheating furnace by using an inverse method. Steel Res Int. 2007;78(1):63–70.
  • Berntsson F. An inverse heat conduction problem and improving shielded thermocouple accuracy. Numer Heat Transfer, Part A: Appl. 2012;61(10):754–763.
  • Xiong X-T, Fu C-L. A spectral regularization method for solving surface heat flux on a general sideways parabolic. Appl Math Comput. 2008;197(1):358–365.
  • Carasso AS. Slowly divergent space marching schemes in the inverse heat conduction problem. Numer Heat Transfer, Part B. 1993;23:111–126.
  • Guo L, Murio DA, Roth C. A mollified space marching finite differences algorithm for the inverse heat conduction problem with slab symmetry. Computers Math Appl. 1990;19:75–89.
  • Mejía CE, Murio DA. Numerical solution of generalized IHCP by discrete mollification. Computers Math Appl. 1996;32:33–50.
  • Berntsson F. A spectral method for solving the sideways heat equation. Inverse Probl. 1999;15:891–906.
  • Blevins LG, Pitts WM. Modeling of bare and a spirated thermocouples in compartment fires. Fire Saf J. 1999;33:239–259.
  • Kemp SE, Annaheim S, Rossi RM, et al. Test method for characterising the thermal protective performance of fabrics exposed to flammable liquid fires. Fire Mater. 2016;41:750–767.
  • Karimi M, Rezaee A. Regularization of the Cauchy problem for the Helmholtz equation by using Meyer wavelet. J Comput Appl Math. 2017;320:76–95.
  • Regińska T. Sideways heat equation and wavelets. J Comput Appl Math. 1995;63:209–214.
  • Foadian S, Pourgholi R, Hashem Tabasi S. Cubic b-spline method for the solution of an inverse parabolic system. Appl Anal. 2018;97(3):438–465.
  • Reinsch CH. Smoothing by spline functions. Numer Math. 1971;16(5):451–454.
  • Isakov V. Inverse problems for partial differential equations. New York: Springer; 1998.
  • Eldén L. Solving the sideways heat equation by a ‘method of lines’. J Heat Transfer, Trans ASME. 1997;119:406–412.
  • Gustafsson B, Kreiss H-O, Oliger J. Time dependent problems and difference methods. New York: Wiley Interscience; 1995.
  • Anderson GD, Vamanamurthy MK, Vuorinen MK. Conformal invariants, inequalities, and quasiconformal maps. New York: John Wiley & Sons, Inc.; 1997.
  • Ragozin DL. Error bounds for derivative estimates based on spline smoothing of exact or noisy data. J Approx Theor. 1983;37(4):335–355.
  • Schoenberg IJ. Spline interpolation and the higher derivatives. Proc Nat Acad Sci USA. 1964;51:24–28.
  • Agmon S. Lectures on elliptic boundary value problems. Princeton (NJ): D. Van Nostrand Co.; 1965.