signal={1,4,2,6};
Ν=Length[signal];
ListPlot[signal]

FED cycle

Pad the border with 0.

(Subscript[Δ, s_])[j_]:=({{\[Piecewise], ({{-1*s[[j]]+s[[j+1]], j==1}, {s[[j-1]]-1*s[[j]], j==Ν}, {s[[j-1]]-2*s[[j]]+s[[j+1]], True}})}});

Function which is responsible for the varying step size depending on the current iteration i and the length of the box filter n (the total length is 2n+1).

τ[i_,n_]:=(1/(4*((Cos[π*((2*i+1)/(4*n+2))])^2)));

The first theorem states a similarity between the box filter and one FED cycle. Apply a box filter with n=1:

signalBox=ListConvolve[{(1/3),(1/3),(1/3)},
ArrayPad[signal,1,"Reversed"]
]//N

Now calculate one FED cycle by hand. The result is indeed the same.

τ[0,1]

sDiv=Table[(Subscript[Δ, signal])[j],{j,1,Ν}]
signal+τ[0,1]*sDiv//N

Test also with a box filter of length n=2. The cyclic FED seems to be identical to a reversed convolution

ArrayPad[signal,2,"Reversed"]

signalBox2=ListConvolve[{(1/5),(1/5),(1/5),(1/5),(1/5)},ArrayPad[signal,2,"Reversed"]]//N

signal+τ[0,2]*sDiv+τ[1,2]*Table[(Subscript[Δ, (signal+τ[0,2]*sDiv)])[j],{j,1,Ν}]//N

In this case two iterations are needed and the derivative of the derivative needs to be calculated (expansion is done by hand). But, the result is still identical.

signal+τ[0,2]*sDiv+τ[1,2]*sDiv+τ[0,2]*τ[1,2]*Table[(Subscript[Δ, sDiv])[j],{j,1,Ν}]//N

Matrix notation

It is also possible to write the problem in matrix-vector notation. In this case the vector is the input signal and the matrix is built in such a ways that it also encodes the second order derivative.

A=Table[({{\[Piecewise], ({{-1, i==1&&j==1||i==Ν&&j==Ν}, {-2, i==j}, {1, i==j+1||j==i+1}, {0, True}})}}),{i,1,Ν},{j,1,Ν}];
A//MatrixForm

(IdentityMatrix[Ν]+τ[0,1]*A).signal//N

(IdentityMatrix[Ν]+τ[1,2]*A).(IdentityMatrix[Ν]+τ[0,2]*A).signal//N

Ordering doesn’t matter.

(IdentityMatrix[Ν]+τ[0,2]*A).(IdentityMatrix[Ν]+τ[1,2]*A).signal//N

Multiple iterations:

FED[n_]:=Module[{iter},
iter=ConstantArray[0,n+1];
iter[[1]]=signal;

Do[
iter[[i+2]]=(IdentityMatrix[Ν]+τ[i,n]*A).iter[[i+1]]
,{i,0,n-1}];

iter
]

N[FED[10]]

boxLength=10;
signalBox10=ListConvolve[ConstantArray[(1/(2*boxLength+1)),2*boxLength+1],ArrayPad[signal,⌊((2*boxLength+1)/2)⌋,"Reversed"]]//N

Table[{i,i},{i,1,Length[signal]}]

FEDPlot[i_]:=Show[
ListLinePlot[FED[10][[i+2]]//N,
PlotRange->{{0.9,4.1},{0,6.1}},
PlotLegends->{({{\[Piecewise], ({{None, i==-1}, {"FED: (Subscript[B, 21])·(OverVector[u]) (i = "<>IntegerString[i,10]<>")", True}})}})},
AxesLabel->{"(Subscript[u, j])","*"},
PlotStyle->({{\[Piecewise], ({{Directive[,Opacity[0]], i==-1}, {, True}})}}),
PlotMarkers->{Graphics@{,Disk[]},0.03},
ImageSize->500,
BaseStyle->{FontSize->14},
Ticks->{Table[{j,j},{j,1,Length[signal]}],Automatic},
LabelStyle->Directive[FontSize->14]
],
ListLinePlot[signalBox10,
PlotStyle->,
PlotLegends->{"Box: (Subscript[(OverTilde[B]), 2·n + 1])*(OverVector[u]) = (Subscript[(OverTilde[B]), 21])*(OverVector[u])"},
PlotMarkers->{Graphics@{,Disk[]},0.03},
LabelStyle->Directive[FontSize->14]
],
ListLinePlot[signal,
PlotStyle->Directive[Gray,Opacity[0.4]],
PlotLegends->{"Signal (OverVector[u])"},
PlotMarkers->{Graphics@{Gray,Rectangle[]},0.03},
LabelStyle->Directive[FontSize->14]
]
];

Manipulate[
FEDPlot[i]
,{i,-1,boxLength-1,1}]

(*Export[FileNameJoin[{NotebookDirectory[],"frames/i=0.png"}],Table[FEDPlot[i],{i,-1,9}],"VideoFrames",Antialiasing->True];*)

Show[
DiscretePlot[τ[i,boxLength],{i,0,boxLength-1},
PlotLabel->"n = "<>ToString[boxLength],
PlotRange->Full,
ImageSize->500,
BaseStyle->{FontSize->14},
AxesLabel->{"i","(Subscript[τ, i])"},
PlotStyle->,
PlotLegends->{"Step size"}
],
Plot[(1/2),{x,0,boxLength-1},PlotStyle->,PlotLegends->{"Stability limit"}]
]

cumTimes=Round[Flatten[{Table[(∑_(i=0)^(n-1))τ[i,boxLength],{n,1,10}],(∑_(i=0)^(10-1))τ[i,boxLength]+Table[(∑_(i=0)^(n-1))τ[i,boxLength],{n,1,10}]}],0.01]//N

Show[
(* Left part *)
NumberLinePlot[{Table[(∑_(i=0)^(n-1))τ[i,boxLength],{n,1,10}],Interval[{0,(∑_(i=0)^(10-1))τ[i,boxLength]}]},Ticks->{{cumTimes[[1]],cumTimes[[8]],cumTimes[[9]],cumTimes[[10]],cumTimes[[18]],cumTimes[[19]],cumTimes[[20]]}},
ImageSize->Large,
PlotRange->{-2,2+2*cumTimes[[10]]},
AxesLabel->{"T"},
BaseStyle->{FontSize->14},
PlotLegends->LineLegend[{None,},{None,"FED cycle"}],
LabelStyle->Directive[FontSize->14],
PlotStyle->{Directive[Opacity[1]],Opacity[0]}
]/.{Point[pos_]:>Rectangle[{pos[[1]],pos[[2]]-0.4},{pos[[1]]+0.07,pos[[2]]+0.4}]},

(* Left yellow part *)
NumberLinePlot[{None,Interval[{0,(∑_(i=0)^(10-1))τ[i,boxLength]}]},
PlotStyle->{Opacity[1],Opacity[1]}
]/.{Point[pos_]:>Rectangle[{pos[[1]],pos[[2]]-0.4},{pos[[1]]+0.07,pos[[2]]+0.4}]},

(* Right blue part *)
NumberLinePlot[{cumTimes[[10]]+Table[(∑_(i=0)^(n-1))τ[i,boxLength],{n,1,10}],None},
PlotStyle->{Opacity[1],Opacity[1]}
]/.{Point[pos_]:>Rectangle[{pos[[1]],pos[[2]]-0.25},{pos[[1]]+0.07,pos[[2]]+0.25}]},

(* Right yellow part *)
NumberLinePlot[{None,Interval[{cumTimes[[10]],cumTimes[[10]]+(∑_(i=0)^(10-1))τ[i,boxLength]}]},
PlotStyle->{Opacity[1],Opacity[1]}
]/.{Point[pos_]:>Rectangle[{pos[[1]],pos[[2]]-0.4},{pos[[1]]+0.07,pos[[2]]+0.4}]},

(* Blue line *)
NumberLinePlot[{Interval[{0,cumTimes[[-1]]}]},
PlotStyle->{Opacity[0.5]},
PlotLegends->{"Inner step"}
]/.{Point[pos_]:>Rectangle[{0,0},{0,0}]}

]

Leja Ordering

To improve numerical stability the step sizes (Subscript[τ, i]) are re-ordered. For how Leja Ordering works, see also section 2.3 from http://www.mia.uni-saarland.de/Publications/breuss-pp273.pdf

steps=Table[τ[i,11],{i,0,10}]//N

stepsI=(1/steps)

stepsIReordered={stepsI[[1]],stepsI[[11]],stepsI[[6]],stepsI[[8]],stepsI[[4]],stepsI[[10]],stepsI[[3]],stepsI[[7]],stepsI[[2]],stepsI[[9]],stepsI[[5]]}

For the default ordering the values do not match.

Do[
Print[(∏_(k=0)^j)Abs[stepsI[[j+1+1]]-stepsI[[k+1]]]]
,{j,0,Length[stepsI]-2}]

Do[
Print[
Max[((∏_(k=0)^j)Abs[#1-stepsI[[k+1]]])&/@stepsI]
]
,{j,0,Length[stepsI]-2}]

But when the Leja Ordering is applied, the values do match

Do[
Print[(∏_(k=0)^j)Abs[stepsIReordered[[j+1+1]]-stepsIReordered[[k+1]]]]
,{j,0,Length[stepsIReordered]-2}]

Do[
Print[
Max[((∏_(k=0)^j)Abs[#1-stepsIReordered[[k+1]]])&/@stepsIReordered]
]
,{j,0,Length[stepsIReordered]-2}]