text:
\section{Introduction}
Finite-dimensional observer-based control for PDEs is attractive for applications and theoretically challenging.
Such controllers for parabolic systems were designed by the modal decomposition approach in \cite{balas1988finite, christofides2001, curtain1982finite,harkort2011finite}.
The existing results are mostly restricted to bounded control and observation operators, whereas efficient bounds on the observer and controller dimensions are missing.
Thus, the bound suggested in \cite{harkort2011finite} appeared to be highly conservative and difficult to compute.

In our recent paper \cite{RamiContructiveFiniteDim}, the first constructive LMI-based method for finite-dimensional observer-based controller for the 1D heat equation was suggested,
where the controller dimension and the resulting exponential decay rate were found from simple LMI conditions. Robustness of the finite-dimensional controller with respect to input and output delays was studied in \cite{katz2020constructiveDelay}. However, the results
of \cite{RamiContructiveFiniteDim,katz2020constructiveDelay} were confined to cases where at least
one of the observation or control operators is bounded. Sampled-data and delayed boundary control of 1D heat equation under boundary measurement was studied in \cite{katz2020boundary} by using an infinite-dimensional PDE observer. However, finite-dimensional observer-based control of the heat equation in the challenging case where both operators are unbounded remained open. Note that finite-dimensional observer-based control of the 1D linear Kuramoto-Sivashinsky equation (KSE) with both observation and control operators unbounded was studied in \cite{Rami_CDC20}.

In the present paper, for the first time, we manage with finite-dimensional observer-based controllers for the 1D heat equation with both operators unbounded. We consider
Dirichlet actuation and point measurement and employ a modal decomposition approach via dynamic extension.
We suggest a direct Lyapunov approach to the full-order closed-loop system, where the finite-dimensional state is coupled with the infinite-dimensional tail of the state Fourier expansion, and provide LMIs for finding the controller dimension and resulting exponential decay rate. In order to manage with point measurement, we consider $H^1$-stability and apply the Cauchy-Schwarz inequality in a novel form (with fractional powers of the eigenvalues of a Sturm-Liouville operator). Note that for KSE, studied in \cite{Rami_CDC20}, the use of fractional powers of the eigenvalues was not required. We further study sampled-data implementation of the controller under sampled-data measurement, where we consider independent variable samplings of the output and input.
Sampled-data finite-dimensional controllers implemented by zero-order hold devices were suggested in \cite{Aut12,NetzerAut14,kang2018distributed,selivanov2019delayed} for distributed static output-feedback control, \cite{karafyllis2018sampled,karafyllis2017sampledTransport} for boundary state-feeback and in
\cite{katz2020boundary,katz2020constructiveDelay} for observer-based control. Event-triggered sampled-data control of parabolic and hyperbolic PDEs has been studied in \cite{kang2020event,espitia2020event,espitia2020observer}. Due to dynamic extension, in the present paper we suggest sampled-data implementation via a generalized hold device (see e.g. \cite{mirkin2016intermittent} and references therein).
We use Wirtinger-based discontinuous in time Lyapunov functionals which compensate
sampling in the finite-dimensional state and lead to the simplest efficient stability conditions for ODEs \cite{Wir_Aut12,selivanov2016observer}. To compensate sampling in the infinite-dimensional tail, we use a novel form of Halanay's inequality, which is appropriate
for Lyapunov functions with jump discontinuities that do not grow in the jumps. Numerical examples show the efficiency of the proposed method.
\subsection{Notations and mathematical preliminaries}
We denote by $ L^2(0,1)$ the Hilbert space of Lebesgue measurable and square integrable functions $f:[0,1]\to \mathbb{R} $  with the inner product $\left< f,g\right>:=\scriptsize{\int_0^1 f(x)g(x)dx}$ and induced norm $\left\|f \right\|^2:=\left<f,f \right>$.
$H^{k}(0,1)$ is the Sobolev space of  functions  $f:[0,1]\to \mathbb{R} $ having $k$ square integrable weak derivatives, with the norm $\left\|f \right\|^2_{H^k}:=\sum_{j=0}^{k} \left\|f^{(j)} \right\|^2$. The Euclidean norm on $\mathbb{R}^n$ will be denoted by $\left|\cdot \right|$. We denote $f\in H^1_0(0,1)$ if $f\in H^1(0,1)$ and $f(0)=f(1)=0$. For  $P \in \mathbb{R}^{n \times n}$, the notation $P>0$ means that $P$ is symmetric and positive definite. The norm of a matrix $A$ is denoted by $\left|A\right|$. The sub-diagonal elements of a symmetric matrix will be denoted by $*.$ For $U\in \mathbb{R}^{n\times n}, \ U>0$ and $x\in \mathbb{R}^n$ we denote $\left|x\right|^2_U=x^TUx$.

Consider the Sturm-Liouville eigenvalue problem
\begin{equation}\label{eq:SL}
	\begin{aligned}
		\phi''+\lambda \phi = 0,\ \ x\in [0,1]
	\end{aligned}
\end{equation}
with the following boundary conditions:
\begin{equation}\label{eq:2BCs}
	\begin{array}{lll}
		& \phi(0) = \phi(1) = 0.
	\end{array}
\end{equation}
This problem induces a sequence of eigenvalues with corresponding eigenfunctions. The eigenfunctions form a complete orthonormal system in $L^2(0,1)$. The eigenvalues and corresponding eigenfunctions are given by
\begin{equation}\label{eq:SLBCs}
	\begin{array}{lll}
		& \phi_n(x)=\sqrt{2}\sin\left(\sqrt{\lambda_n} x\right),\  \lambda_n = n^2\pi^2, \ n\geq 1.
	\end{array}
\end{equation}

The following lemma will be used:
\begin{lemma}[\cite{RamiContructiveFiniteDim}]\label{lem:H1Equiv}
Let $h\in L^2(0,1)$ satisfy $h \overset{L^2(0,1)}{=} \sum_{n=1}^{\infty}h_n\phi_n$. Then $h\in H^1_0(0,1)$ if and only if $\sum_{n=1}^{\infty}\lambda_nh_n^2< \infty$. Moreover,
\begin{equation}\label{lem22}
\left\|h' \right\|^2=\sum_{n=1}^{\infty}\lambda_nh_n^2.
\end{equation}
\end{lemma}
\section{Continuous-time control of a heat equation}
In this section we consider stabilization of the linear 1D heat equation
\begin{equation}\label{eq:LinearHeat}
	\begin{array}{lll}
		&z_t(x,t) = z_{xx}(x,t) +az(x,t), \ t\geq 0
	\end{array}
\end{equation}
where $x\in [0,1]$, $z(x,t)\in \mathbb{R}$ and $a\in \mathbb{R}$ is the reaction coefficient. We consider Dirichlet actuation given by
\begin{equation}\label{eq:BCsHeatDir}
	 z(0,t)=u(t), \quad z(1,t) = 0
\end{equation}
where $u(t)$ is a control input to be designed and in-domain point measurement given by
\begin{equation}\label{eq:InDomPointMeasHeat}
y(t) = z(x_*,t), \ x_*\in (0,1).
\end{equation}
Following \cite{prieur2018feedback}, we introduce the change of variables
\begin{equation}\label{eq:ChangeVarsHeatDir}
w(x,t)=z(x,t)-r(x)u(t), \quad r(x):=1-x
\end{equation}
to obtain the following equivalent ODE-PDE system
\begin{equation}\label{eq:PDE1HeatDir}
\begin{aligned}
& w_t(x,t)=w_{xx}(x,t)+aw(x,t)+ar(x)u(t)-r(x)v(t),\\
& \dot{u}(t)=v(t), \quad t\geq 0
\end{aligned}
\end{equation}
with boundary conditions
\begin{equation}\label{eq:PDE1HeatDirBCs}
\begin{array}{lll}
&w(0,t)=0, \quad w(1,t)=0.
\end{array}
\end{equation}
and measurement
\begin{equation}\label{eq:InDomPointMeas1HeatDir}
y(t) = w(x_*,t)+r(x_*)u(t).
\end{equation}
Henceforth we will treat $u(t)$ as an additional state variable and $v(t)$ as the control input. Given $v(t)$, $u(t)$ can be computed by integrating $\dot{u}(t)=v(t)$, where we choose $u(0)=0$. Note that this choice implies $z(\cdot,0)=w(\cdot,0)$.

We present the solution to \eqref{eq:PDE1HeatDir} as
\begin{equation}\label{eq:WseriesHeatDir}
\begin{array}{lll}
w(x,t) &= \sum_{n=1}^{\infty}w_n(t)\phi_n(x), \ w_n(t) =\left<w(\cdot,t),\phi_n\right>,
\end{array}
\end{equation}
with $\phi_n(x), \ n\geq 1$ defined in \eqref{eq:SLBCs}. By differentiating under the integral sign, integrating by parts and using \eqref{eq:SL} and \eqref{eq:2BCs} we obtain
\begin{equation}\label{eq:WOdesHeatDir}
\begin{array}{lll}
&\dot{w}_n(t) = (-\lambda_n+a)w_n(t) + ab_nu(t) -b_nv(t),\quad t\geq 0  \\
& b_n=\left<r,\phi_n\right>= \sqrt{\frac{2}{\lambda_n}}, \ w_n(0) = \left<w(\cdot,0),\phi_n\right>, \ n\geq 1.
\end{array}
\end{equation}
In particular note that
\begin{equation}\label{eq:AssbnNonDelayedHeatDir}
\begin{array}{lll}
&b_n \neq 0 , \quad n\geq 1
\end{array}
\end{equation}
and
\begin{equation}\label{eq:AssbnNonDelayed1HeatDir}
\sum_{n=N+1}^{\infty}b_n^2 \leq \frac{2}{\pi^2}\int_N^{\infty}\frac{dx}{x^2}=\frac{2}{\pi^2N}, \ N\geq 1.
\end{equation}
\begin{remark}
State-feedback boundary control of $1$D parabolic PDEs, without dynamic extension, has been suggested in \cite{karafyllis2018sampled}. Without dynamic extension, modal decomposition of \eqref{eq:LinearHeat} with boundary conditions \eqref{eq:BCsHeatDir} results in ODEs similar to \eqref{eq:WOdesHeatDir}, without $v(t)$, where $|b_n|\approx \lambda_n^{\frac{3}{2}}$. The growth of $\left\{b_n\right\}_{n=1}^{\infty}$ poses a problem in compensating cross terms which arise in the Lyapunov stability analysis (see \eqref{eq:WCrosTermNonDelayedHeatDir} below). As can be seen in \eqref{eq:AssbnNonDelayed1HeatDir}, the use of dynamic extension leads to $\left\{b_n\right\}_{n=1}^{\infty}\in l^2(\mathbb{N})$.
\end{remark}

Let $\delta>0$ be a desired decay rate and let $N_0 \in \mathbb{N}$ satisfy
\begin{equation}\label{eq:N0HeatDir}
-\lambda_n+a<-\delta, \quad n>N_0.
\end{equation}
Let $N\in \mathbb{N}, \ N_0\leq N$. $N_0$ will define the dimension of the controller and $N$ will define the dimension of the observer.

We construct a finite-dimensional observer of the form
\begin{equation}\label{eq:WhatSeriesHeatDir}
\hat{w}(x,t): = \sum_{n=1}^{N}\hat{w}_n(t)\phi_n(x)
\end{equation}
where $\hat{w}_n(t)$ satisfy the ODEs for $t\geq 0$:
\begin{equation}\label{eq:WobsODENonDelayedHeatDir1}
\begin{array}{lll}
&\dot{\hat{w}}_n(t) = (-\lambda_n+a)\hat{w}_n(t) +ab_nu(t)- b_nv(t)\\
&\hspace{13mm}-l_n\left[\hat{w}(x_*,t)+r(x_*)u(t)- y(t)\right],\ n\geq 1,\\
&\hat{w}_n(0)=0, \quad 1\leq n\leq N.
\end{array}
\end{equation}
with $y(t)$ in \eqref{eq:InDomPointMeas1HeatDir} and saclar observer gains $l_n,\ 1\leq n\leq N$.

\textbf{Assumption 1:} The point $x_*\in (0,1)$ satisfies
\begin{equation}\label{eq:AsscnNonDelayed}
c_n=\phi_n(x_*)=\sqrt{2}\sin\left(\sqrt{\lambda_n} x_*\right)\neq 0 , \ 1\leq n \leq N_0.
\end{equation}
Note that this assumption is satisfied if $x_*$ is irrational number.
In this case $\phi_n(x_*)\neq 0$ for all $n\in \mathbb{N}$.\\[0.1cm]
Let
\begin{equation}\label{eq:C0A0HeatDir}
\begin{array}{lll}
&A_0 = \operatorname{diag}\left\{-\lambda_1+a,\dots,-\lambda_{N_0}+a \right\},\\
&B_0 = \left[b_1,\dots,b_{N_0} \right],\ L_0 = \left[l_1,\dots,l_{N_0} \right]^T,\\
&C_0=\left[c_1,\dots,c_{N_0} \right],\ \tilde{B}_0= \left[1,-b_1,\dots,-b_{N_0} \right],\\
&\tilde{A}_0 =\begin{bmatrix}0& 0\\ aB_0&A_0 \end{bmatrix}\in \mathbb{R}^{(N_0+1)\times(N_0+1)}.\\
\end{array}
\end{equation}
Under Assumption 1 it can be verified that the pair $(A_0,C_0)$ is observable by the Hautus lemma. We choose $L_0 = \left[l_1,\dots,l_{N_0} \right]^T\in \mathbb{R}^{N_0}$ which
satisfies the Lyapunov inequality
\begin{equation}\label{eq:GainsDesignLHeatDir}
P_{\text{o}}(A_0-L_0C_0)+(A_0-L_0C_0)^TP_{\text{o}} < -2\delta P_{\text{o}},
\end{equation}
with $0<P_{\text{o}}\in \mathbb{R}^{N_0\times N_0}$. We choose $l_n=0, \ n>N_0$.\\[0.2cm]
Since $b_n \neq 0 , \ n\geq 1$ the pair $(\tilde{A}_0,\tilde{B}_0)$ is controllable. Let $K_0\in \mathbb{R}^{1\times (N_0+1)}$ satisfy
\begin{equation}\label{eq:GainsDesignKHeatDir}
\begin{aligned}
&P_{\text{c}}(\tilde{A}_0+\tilde{B}_0K_0)+(\tilde{A}_0+\tilde{B}_0K_0)^TP_{\text{c}} < -2\delta P_{\text{c}},
\end{aligned}
\end{equation}
with $0<P_{\text{c}}\in \mathbb{R}^{(N_0+1)\times (N_0+1)}$. We propose a $(N_0+1)$-dimensional controller of the form
\begin{equation}\label{eq:WContDefHeatDir}
\begin{aligned}
& v(t)= K_0\hat{w}^{N_0}(t),\\
& \hat{w}^{N_0}(t) = \left[u(t),\hat{w}_1(t),\dots,\hat{w}_{N_0}(t) \right]^T
\end{aligned}
\end{equation}
which is based on the $N$-dimensional observer \eqref{eq:WhatSeriesHeatDir}. \\[0.2cm]
For well-posedness of the closed-loop system \eqref{eq:PDE1HeatDir} and \eqref{eq:WobsODENonDelayedHeatDir1} subject to the control input \eqref{eq:WContDefHeatDir} we consider the operator
\begin{equation}\label{eq:CalADef}
\begin{array}{lll}
&\mathcal{A}_1:\mathcal{D}(\mathcal{A}_1)\subseteq L^2(0,1)\to L^2(0,1), \ \ \mathcal{A}_1w = -w_{xx},\vspace{0.1cm}\\
&\mathcal{D}(\mathcal{A}_1) = \left\{w\in H^2(0,1)| w(0)=w(1)=0\right\}.
\end{array}
\end{equation}
Since $\mathcal{A}_1$ is positive, it has a unique positive square root with domain
\begin{equation}\label{eq:CalARootDef}
\mathcal{D}\left(\mathcal{A}_1^{\frac{1}{2}}\right) \overset{\eqref{lem22}}{=} H^1_0(0,1).
\end{equation}
Let $\mathcal{H}=L^2(0,1)\times \mathbb{R}^{N+1}$ be a Hilbert space with the norm $\left\|\cdot\right\|_{\mathcal{H}}=\sqrt{\left\|\cdot\right\|+\left|\cdot\right|}$.
Defining the state $\xi(t)$ as
\begin{equation*}
\begin{array}{lll}
&\xi(t)=\text{col}\left\{w(\cdot,t),\hat{w}^N(t)\right\}, \vspace{0.1cm}\\ &\hat{w}^{N}(t)=\text{col}\left\{u(t),\hat{w}_1(t),\dots,\hat{w}_N(t)\right\}
\end{array}
\end{equation*}
by arguments of \cite{RamiContructiveFiniteDim},  it can be shown that the closed-loop system \eqref{eq:PDE1HeatDir} and \eqref{eq:WobsODENonDelayedHeatDir1} with control input \eqref{eq:WContDefHeatDir} and initial condition $w(\cdot,0)\in \mathcal{D}\left(\mathcal{A}_1^{\frac{1}{2}}\right)$ has a unique classical solution
\begin{equation}\label{eq:Classical1}
\xi \in C\left([0,\infty);\mathcal{H}\right)\cap C^1\left((0,\infty);\mathcal{H}\right)
\end{equation}
such that
\begin{equation}\label{eq:Classical2}
\xi(t) \in \mathcal{D}\left(\mathcal{A}_1\right)\times \mathbb{R}^{N+1}, \quad t>0.
\end{equation}
Let $e_n(t)$ be the estimation error defined by
\begin{equation}\label{eq:WEstErrorNonDelayed}
e_n(t) = w_n(t)-\hat{w}_n(t), \ 1\leq n \leq N.
\end{equation}
By using \eqref{eq:InDomPointMeas1HeatDir}, \eqref{eq:WseriesHeatDir} and \eqref{eq:WhatSeriesHeatDir}, the last term on the right-hand side of \eqref{eq:WobsODENonDelayedHeatDir1} can be written as
\begin{equation}\label{eq:WIntroZetaNonDelayedHeatDir}
\begin{array}{ll}
&\hat{w}(x_*,t)+r(x_*)u(t) - y(t) =-\sum_{n=1}^{N} c_ne_n(t)-\zeta(t),
\end{array}
\end{equation}
where
\begin{equation}\label{eq:zetaintegralHeatDir}
\begin{array}{ll}
&\zeta(t) = w(x_*,t)-\sum_{n=1}^N w_n(t)\phi_n(x_*)\\
&\overset{\eqref{eq:2BCs},\eqref{eq:PDE1HeatDirBCs}}{=}\int_0^{x_*}\left[w_x(x,t)-\sum_{n=1}^Nw_n(t)\phi_n'(x) \right]dx.
\end{array}
\end{equation}
Then the error equations have the form
\begin{equation}\label{eq:WenHeatDir}
\begin{array}{ll}
&\dot e_n(t)=(-\lambda_n+a)e_n(t)\\
&\hspace{8mm}-l_n\left(\sum_{n=1}^{N} c_ne_n(t)+\zeta(t)\right), \quad t\geq 0.
\end{array}
\end{equation}
Note that $\zeta(t)$ satisfies the following estimate:
\begin{equation}\label{eq:zetaestHeatDir}
\begin{array}{lll}
&\zeta^2(t)\overset{\eqref{eq:zetaintegralHeatDir}}{\leq} \left\|w_x(\cdot,t)-\sum_{n=1}^Nw_n(t)\phi_n'(\cdot) \right\|^2 \\
&\hspace{9mm}\overset{\eqref{lem22}}{\leq} \sum_{n=N+1}^{\infty}\lambda_nw_n^2(t).
\end{array}
\end{equation}
Let
\begin{equation}\label{eq:ErrDefNonDelayedHeatDir}
\begin{array}{lllllll}
&e^{N_0}(t)=\left[e_1(t),\dots,e_{N_0}(t) \right],\\
&e^{N-N_0}(t)=\left[e_{N_0+1}(t),\dots,e_{N}(t) \right]^T,\\
&\hat{w}^{N-N_0}(t)=\left[\hat{w}_{N_0+1}(t),\dots,\hat{w}_{N}(t) \right]^T,\\
& X(t) = \text{col}\left\{\hat{w}^{N_0}(t),e^{N_0}(t),\hat{w}^{N-N_0}(t), e^{N-N_0}(t) \right\},
\end{array}
\end{equation}
and
\begin{equation}\label{eq:ErrDefNonDelayedHeatDir1}
\begin{array}{lllllll}
& A_1 = \operatorname{diag}\left\{-\lambda_{N_0+1}+a,\dots,-\lambda_{N}+a \right\},\\
&B_1 =\left[b_{N_0+1},\dots,b_N \right]^T,\ C_1 =\left[c_{N_0+1},\dots, c_N \right],\\
&\mathrm{a}=\begin{bmatrix}-a,0_{1\times N_0} \end{bmatrix},\ \tilde{L}_0 = \text{col}\left\{0_{1\times 1},L_0 \right\}\\
& \tilde{K}_0 = \begin{bmatrix} K_0+\mathrm{a},&0_{1\times (2N-N_0)}\end{bmatrix},\\
&\mathcal{L}=\text{col}\left\{\tilde{L}_0,-L_0,0_{2(N-N_0)\times 1}\right\},\\
& F = \scriptsize\begin{bmatrix}\tilde{A}_0+\tilde{B}_0K_0 & \tilde{L}_0C_0 & 0 &\tilde{L}_0C_1 \\ 0 & A_0-L_0C_0 & 0 & -L_0C_1\\ -B_1\left(K_0+\mathrm{a}\right) & 0 & A_1 & 0\\
0 & 0 & 0 & A_1 \end{bmatrix}.
\end{array}
\end{equation}
From \eqref{eq:WOdesHeatDir}, \eqref{eq:WobsODENonDelayedHeatDir1},  \eqref{eq:WContDefHeatDir} and \eqref{eq:ErrDefNonDelayedHeatDir1} we have the closed-loop system for $t\geq 0$:
\begin{equation}\label{eq:ClosedLoopHeatDir1}
\begin{array}{lll}
&\dot{X}(t) = FX(t)+\mathcal{L}\zeta(t),\\
& \dot{w}_n(t) = (-\lambda_n+a)w_n(t) -b_n\tilde{K}_0X(t), \ n>N.
\end{array}
\end{equation}
For $H^1$-stability analysis of the closed-loop system
\eqref{eq:ClosedLoopHeatDir1} we define the Lyapunov function
\begin{equation}\label{eq:VNonDelayedHeatDir1}
V(t)=\left|X(t)\right|^2_P+\sum_{n=N+1}^{\infty}\lambda_n w_n^2(t),
\end{equation}
where $P\in \mathbb{R}^{(2N+1)\times (2N+1)}$ satisfies $P>0$. This function is chosen to compensate $\zeta(t)$ using the estimate \eqref{eq:zetaestHeatDir}. Differentiating $V(t)$ along the solution to \eqref{eq:ClosedLoopHeatDir1} gives
\begin{equation}\label{eq:WStabAnalysisNonDelayedHeatDir1}
\begin{array}{lll}
&\hspace{-3mm}\dot{V}+2\delta V = X^T(t)\left[PF +F^TP+2\delta P\right]X(t)\\
&\hspace{-3mm}-2X^T(t)P\mathcal{L}\zeta(t)+2\sum_{n=N+1}^{\infty}\left(-\lambda_n^2+(a+\delta)\lambda_n\right)w_n^2(t)\\
 &\hspace{-3mm}-2\sum_{n=N+1}^{\infty}\lambda_n w_n(t)b_n\tilde{K}_0X(t), \quad t\geq 0.
\end{array}
\end{equation}
Note that since $\lambda_n=n^2\pi^2$, similar to \eqref{eq:WOdesHeatDir} we have
 \begin{equation}\label{3over2}
\begin{array}{lll}
\sum_{n=N+1}^{\infty}\lambda_n^{-\frac{3}{4}}
\le  \pi^{-{3\over 2}} \int_N^{\infty}x^{-\frac{3}{2}}dx=\frac{2}{\sqrt{N}\pi^{3\over 2}}.
\end{array}
\end{equation}
Since $b_n=\sqrt{2\over \lambda_n}$, the Cauchy-Schwarz inequality  implies
\begin{equation}\label{eq:WCrosTermNonDelayedHeatDir}
\begin{array}{lllll}
&-2\sum_{n=N+1}^{\infty}\lambda_n w_n(t)b_n\tilde{K}_0X(t)\\
&\leq 2\sum_{n=N+1}^{\infty}\left[\lambda_n^{\frac{7}{8}}\left|w_n(t)\right|\right]\left[\sqrt{2}\lambda_n^{-\frac{3}{8}}\left|\tilde{K}_0X(t)\right|\right]\\
&\leq \frac{1}{\alpha_1} \sum_{n=N+1}^{\infty}\lambda_n^{\frac{7}{4}}w_n^2(t)\\
&+ 2\alpha_1 \left(\sum_{n=N+1}^{\infty}\lambda_n^{-\frac{3}{4}}\right)\left|\tilde{K}_0X(t)\right|^2\\
&\overset{\eqref{3over2}}{\leq} \frac{1}{\alpha_1} \sum_{n=N+1}^{\infty}\lambda_n^{\frac{7}{4}} w_n^2(t)+ \frac{4\alpha_1 }{\sqrt{N}\pi^{\frac{3}{2}}}\left|\tilde{K}_0X(t)\right|^2
\end{array}
\end{equation}
where $\alpha>0$. From monotonicity of $\lambda_n$ we have
\begin{equation}\label{eq:zetaintroducLMIs}
\begin{array}{lll}
&2\sum_{n=N+1}^{\infty}\left(-\lambda_n^2+(a+\delta)\lambda_n\right)w_n^2(t)\\ &+2\sum_{n=N+1}^{\infty}\lambda_n w_n(t)(-b_n)\tilde{K}_0X(t)\\
&\overset{\eqref{eq:WCrosTermNonDelayedHeatDir}}{\leq}2\sum_{n=N+1}^{\infty}\left(-\lambda_n^2+\frac{1}{2\alpha_1}\lambda_n^{\frac{7}{4}}+(a+\delta) \lambda_n \right)w_n^2(t)\\
&\quad + \frac{4\alpha_1 }{\sqrt{N}\pi^{\frac{3}{2}}}\left|\tilde{K}_0X(t)\right|^2\\
&\leq -2\left(\lambda_{N+1}-a-\delta-\frac{1}{2\alpha_1}\lambda_{N+1}^{\frac{3}{4}} \right)\sum_{n=N+1}^{\infty}\lambda_nw_n^2(t)\\
&\quad + \frac{4\alpha_1 }{\sqrt{N}\pi^{\frac{3}{2}}}\left|\tilde{K}_0X(t)\right|^2\\
&\overset{\eqref{eq:zetaestHeatDir}}{\leq}\! -2\!\left(\lambda_{N+1}\!-a\!-\!\delta-\frac{1}{2\alpha_1}\lambda_{N+1}^{\frac{3}{4}} \right)\zeta^2(t)+\! \frac{4\alpha_1 }{\sqrt{N}\pi^{\frac{3}{2}}}\left|\tilde{K}_0X(t)\right|^2
\end{array}
\end{equation}
provided $\lambda_{N+1}-a-\delta-\frac{1}{2\alpha_1}\lambda_{N+1}^{\frac{3}{4}}\geq 0$.\\[0.1cm]
Let $\eta(t) = \text{col}\left\{X(t),\zeta(t) \right\}$. From \eqref{eq:WStabAnalysisNonDelayedHeatDir1}, \eqref{eq:WCrosTermNonDelayedHeatDir} and \eqref{eq:zetaintroducLMIs} we obtain
\begin{equation}\label{eq:WStabResultNonDelayedHeatDir}
\begin{array}{ll}
&\dot{V}+2\delta V\leq \eta^T(t)\Psi^{(1)} \eta(t)\leq 0, \quad t\geq 0
\end{array}
\end{equation}
if
\begin{equation}\label{eq:WStabResultNonDelayedHeatDir1}
\begin{array}{lll}
&\Psi^{(1)} = \begin{bmatrix}
\Phi^1 & P\mathcal{L}\\
* & -2(\lambda_{N+1}-a-\delta)+\frac{1}{\alpha_1}\lambda_{N+1}^{\frac{3}{4}}
\end{bmatrix}<0,\\
&\Phi^{(1)} = PF+F^TP+2\delta P +\frac{4\alpha_1}{\sqrt{N}\pi^{\frac{3}{2}}}\tilde{K}_0^T\tilde{K}_0.
\end{array}
\end{equation}
By Schur complement \eqref{eq:WStabResultNonDelayedHeatDir1} holds if and only if
\begin{equation}\label{eq:WStabResultNonDelayedHeatDir2}
\begin{bmatrix}
\Phi^{(1)} & P\mathcal{L} & 0\\
* & -2(\lambda_{N+1}-a-\delta) & 1\\
* & * & -\alpha_1\lambda_{N+1}^{-\frac{3}{4}}
\end{bmatrix}<0.
\end{equation}
Note that the LMI \eqref{eq:WStabResultNonDelayedHeatDir2} has \emph{$N$-dependent}  coefficients and its dimension depends on $N$. Summarizing, we arrive at:
\begin{theorem}\label{Thm:WdynExtensionHeatDir}
Consider \eqref{eq:PDE1HeatDir} with boundary conditions \eqref{eq:PDE1HeatDirBCs}, in-domain point measurement \eqref{eq:InDomPointMeas1HeatDir}, control law \eqref{eq:WContDefHeatDir} and $w(\cdot,0)\in \mathcal{D}(\mathcal{A}_1^{\frac{1}{2}})$. Let $\delta>0$ be a desired decay rate, $N_0\in \mathbb{N}$ satisfy \eqref{eq:N0HeatDir} and $N\in \mathbb{N}$ satisfy $N_0\leq N$. Let $L_0$ and $K_0$ be obtained using \eqref{eq:GainsDesignLHeatDir}  and \eqref{eq:GainsDesignKHeatDir}, respectively. Let there exist a positive definite matrix $P\in \mathbb{R}^{(2N+1)\times (2N+1)}$ and scalar $\alpha_1>0$ which satisfy \eqref{eq:WStabResultNonDelayedHeatDir2}. Then the solution $w(x,t)$ and $u(t)$ to \eqref{eq:PDE1HeatDir} under the control law \eqref{eq:WContDefHeatDir}, \eqref{eq:WobsODENonDelayedHeatDir1} and the corresponding observer $\hat{w}(x,t)$ defined by \eqref{eq:WhatSeriesHeatDir} satisfy
\begin{equation}\label{eq:WH1StabilityHeatDir}
\begin{array}{ll}
&\left\|w(\cdot,t)\right\|^2_{H^1}+ \left|u(t) \right|^2\leq Me^{-2\delta t}\left\|w(\cdot,0)\right\|^2_{H^1},\\
&\left\|w(\cdot,t)-\hat{w}(\cdot,t)\right\|^2_{H^1}\leq Me^{-2\delta t}\left\|w(\cdot,0)\right\|^2_{H^1},
\end{array}
\end{equation}
for some constant $M>0$. Moreover, \eqref{eq:WStabResultNonDelayedHeatDir2} is always feasible for large enough $N$.
\end{theorem}
\begin{proof}
Feasibility of the LMI \eqref{eq:WStabResultNonDelayedHeatDir2} implies, by the comparison principle,
\begin{equation}\label{eq:ComparisonDirichletHeatDir}
V(t)\leq e^{-2\delta t}V(0), \ t\geq 0.
\end{equation}
Since $u(0)=0$, for some $M_0>0$ we have
\begin{equation}\label{eq:VZeroNonDelayedHeatDir1}
\begin{array}{l}
V(0) \overset{\eqref{lem22}}{\leq} M_0\left\|w_x(\cdot,0) \right\|^2\leq M_0\left\|w(\cdot,0)\right\|^2_{H^1}.
\end{array}
\end{equation}
By Wirtinger's inequality (\cite{Fridman14_TDS}, Section 3.10),
for $t\geq 0$,
\begin{equation}\label{eq:WirtingerHeatDir}
\left\|w_x(\cdot,t) \right\|^2\leq \left\|w(\cdot,t) \right\|^2_{H^1}\leq \pi^{-2}\left\|w_x(\cdot,t) \right\|^2.
\end{equation}
Since $w(\cdot,t)\in \mathcal{D}(\mathcal{A}_1)$ for all $t> 0$ we have $\left\|w_x(\cdot,t) \right\|^2\overset{\eqref{lem22}}{=}\sum_{n=1}^{\infty} \lambda_nw_n^2(t)$.
Parseval's equality, \eqref{eq:WirtingerHeatDir} and monotonicity of $\left\{\lambda_n \right\}_{n=1}^{\infty}$ imply
\begin{equation}\label{eq:VBoundBelowHeatDirichlet}
\begin{array}{ll}
&V(t)\geq \sigma_{min}(P)\left|u(t) \right|^2\\
&+ \operatorname{min}\left( \frac{\sigma_{min}(P)\pi^2}{2\lambda_N},\pi^2 \right)\left\|w(\cdot,t) \right\|^2_{H^1}, \ \ t\geq 0.
\end{array}
\end{equation}
Then \eqref{eq:WH1StabilityHeatDir} follows from \eqref{eq:ComparisonDirichletHeatDir}, \eqref{eq:VZeroNonDelayedHeatDir1}, \eqref{eq:VBoundBelowHeatDirichlet} and the presentation
\begin{equation*}
w(\cdot,t)-\hat{w}(\cdot,t)= \sum_{n=1}^Ne_n(t)\phi_n(\cdot) + \sum_{n=N+1}^{\infty}w_n(t)\phi_n(\cdot).
\end{equation*}
For feasibility of \eqref{eq:WStabResultNonDelayedHeatDir2} with large enough $N$, note that \eqref{eq:AssbnNonDelayed1HeatDir} and \eqref{eq:AsscnNonDelayed} imply $\left|c_n \right|\leq\sqrt{2}, \ n\geq 1$ and $\left\{b_n\right\}_{n=1}^{\infty}\in l^2(\mathbb{N})$. Then, by arguments of Theorem 3.2 in \cite{RamiContructiveFiniteDim}, there exist some $\Lambda,\kappa>0$, independent of $N$, such that
\begin{equation}\label{eq:FEstimateHeatDir}
\left|e^{\left(F+\delta I\right)t} \right|\leq \Lambda \cdot \sqrt{N}\left(1+t+t^2\right)e^{-\kappa t}.
\end{equation}
Therefore, $P\in \mathbb{R}^{(2N+1)\times(2N+1)}$ which solves the Lyapunov equation
\begin{equation}\label{eq:LyapEqHeatDir}
P(F+\delta I)+(F+\delta I)^T=-N^{-\frac{3}{4}}I
\end{equation}
satisfies
\begin{equation}\label{eq:PnormHeatDir}
\left|P\right|\leq \Lambda_1\cdot N^{\frac{1}{4}}
\end{equation}
where $\Lambda_1>0$ is independet of $N$. We substitute \eqref{eq:LyapEqHeatDir}, $\lambda_{N+1}=\pi^2(N+1)^2$ and $\alpha = N^{-\frac{3}{8}}$ into \eqref{eq:WStabResultNonDelayedHeatDir1}. By Schur complement, we find that \eqref{eq:WStabResultNonDelayedHeatDir1} holds if and only if
\begin{equation}\label{eq:EquivLMIsHeatDir}
\begin{array}{lll}
&\hspace{-3mm}-I+ 4\pi^{-\frac{3}{4}}N^{-
\frac{1}{8}}\tilde{K}_0^T\tilde{K}_0\\
&\hspace{-3mm}+\frac{1}{2}\left( \lambda_{N+1}-a-\delta-N^{\frac{3}{8}}\pi^{\frac{3}{2}}(N+1)^{\frac{3}{2}}\right)^{-1}P\mathcal{L}\mathcal{L}^TP<0.
\end{array}
\end{equation}
Since $\lambda_{N+1}-a-\delta\approx (N+1)^2$ and $\left|\tilde{K}_0\right|$, $\left|\mathcal{L}\right|$ are independent of $N$, by taking into account \eqref{eq:PnormHeatDir} we find that \eqref{eq:EquivLMIsHeatDir} holds for large enough $N$.
\end{proof}
\begin{corollary}\label{cor:H1ConvHeatDir}
	Under the conditions of Theorem \ref{Thm:WdynExtensionHeatDir}, the following estimates hold for $z(x,t)$ given in \eqref{eq:ChangeVarsHeatDir}:
	\begin{equation}\label{eq:ZH1StabilityHeatDir}
	\begin{array}{ll}
	&\left\|z(\cdot,t)\right\|^2_{H^1}\leq Me^{-2\delta t}\left\|z(\cdot,0)\right\|^2_{H^1},\\
	&\left\|z(\cdot,t)-\hat{w}(\cdot,t)\right\|^2_{H^1}\leq Me^{-2\delta t}\left\|z(\cdot,0)\right\|^2_{H^1},
	\end{array}
	\end{equation}
	where $M>0$ is some constant.
\end{corollary}
\begin{proof}
	From \eqref{eq:ChangeVarsHeatDir} we have
	\begin{equation}\label{eq:ZEstimateH1HeatDir}
	\begin{array}{lll}
	&\left\|z(\cdot,t) \right\|_{H^1}\leq \left\|w(\cdot,t) \right\|_{H^1}+\left|u(t)\right|\left\|r(\cdot) \right\|_{H^1},\\
	&\left\|z(\cdot,t) -\hat{w}(\cdot,t)\right\|_{H^1}\leq \left\|w(\cdot,t) -\hat{w}(\cdot,t)\right\|_{H^1}\\
	&\hspace{30mm}+\left|u(t)\right|\left\|r(\cdot) \right\|_{H^1}.
	\end{array}
	\end{equation}
	From $u(0)=0$, \eqref{eq:WH1StabilityHeatDir} and \eqref{eq:ZEstimateH1HeatDir},  we obtain \eqref{eq:ZH1StabilityHeatDir}.
\end{proof}
\begin{remark}
Differently from \cite{katz2020constructiveDelay}, where Dirichlet actuation with non-local measurements were considered, we apply the
Cauchy-Schwarz inequality in \eqref{eq:WCrosTermNonDelayedHeatDir} with fractional powers of $\lambda_n$ which allows to compensate $\zeta$
by using \eqref{eq:zetaestHeatDir} in the Lyapunov analysis. Note that for finite-dimensional observer-based control of the 1D linear Kuramoto-Sivashinsky equation (KSE), studied in \cite{Rami_CDC20}, the use of fractional powers of the eigenvalues was not required. This is due to the faster growth rate of the eigenvalues corresponding to the fourth order spatial differential operator appearing in the KSE.
\end{remark}

\section{Sampled-data control of  heat equation}
Consider now sampled-data control of the 1D linear heat equation \eqref{eq:LinearHeat} under Dirichlet actuation \eqref{eq:BCsHeatDir}. We introduce two sequences of sampling instances. For the first sequence, let $0=s_0<s_1<\dots<s_k<\dots$, $\lim_{k\to \infty}s_k=\infty$ be the measurement sampling instances.
We  consider discrete-time in-domain point measurement
\begin{equation}\label{eq:InDomPointMeasHeatDelayed}
y(t) = z(x_*,s_k), \ x_*\in (0,1),\ t\in [s_k, s_{k+1}).
\end{equation}
 We assume that $s_{k+1}-s_k\leq \tau_{M,y}$ for all $k=0,1,\dots$ and some constants $\tau_{M,y}>0$.

  For the second sequence, let $0=t_0<t_1<\dots<t_j<\dots$, $\lim_{j\to \infty}t_j=\infty$ be the controller hold times.
   We assume that $t_{j+1}-t_j\leq \tau_{M,u}$ for all $j=0,1,\dots$ and some constant $\tau_{M,u}>0$.
The control signal $u(t)$ is generated by a \emph{generalized hold} function
\begin{equation}\label{eq:uSampAssump}
\dot{u}(t) =v(t_j), \quad t\in [t_j,t_{j+1})
\end{equation}
where $\left\{v(t_j)\right\}_{j=1}^{\infty}$ are to be determined.  Furthermore, we choose $u(0)=0$. By a generalized hold we mean the following:
given $v(t_j)$, the value of the control signal is computed  as  (see Figure \ref{fig:Network})
\begin{equation}
\label{GH}
u(t)=u(t_j)+v(t_j)(t-t_j),\ \ t\in[t_j,t_{j+1}), \ \ j=0,1,2,...\end{equation}

The considered sampled-data control may correspond also to a networked control system with two independent networks (where network-induced delays are negligible): from sensor to controller with transmission instances $s_k$ and from controller to actuator with transmission instances $t_j$. In this case, $t_j$ are also the
updating times of the generalized hold device on the actuator side.
\begin{figure}
	\centering
	\includegraphics[width=55mm,scale=0.11]{Network.eps}
	\caption{Network-based control with generalized hold.}\label{fig:Network}
\end{figure}

By the time-delay approach to sampled-data control (see \cite{Fridman14_TDS}), the measurement and input delays are presented as
\begin{equation}\label{eq:tau_yu}
\begin{array}{lll}
\tau_y(t) = t-s_k,\quad t\in [s_k,s_{k+1}),\\
\tau_u(t) = t-t_j,\quad t\in [t_j,t_{j+1}).
\end{array}
\end{equation}
Henceforth the dependence of $\tau_y(t), \tau_u(t)$ on $t$ will be suppressed to shorten the notations.

Introducing the change of variables \eqref{eq:ChangeVarsHeatDir} we obtain the following ODE-PDE system
\begin{equation}\label{eq:PDE1HeatDirSamp}
\begin{aligned}
& w_t(x,t)=w_{xx}(x,t)+aw(x,t)\\
&\hspace{12mm}+ar(x)u(t)-r(x)v(t-\tau_u),\\
& \dot{u}(t)=v(t-\tau_u), \quad t\geq 0.
\end{aligned}
\end{equation}
with boundary conditions \eqref{eq:PDE1HeatDirBCs} and measurement
\begin{equation}\label{eq:InDomPointMeas1HeatDirSamp}
y(t) = w(x_*,t-\tau_y)+r(x_*)u(t-\tau_y).
\end{equation}
Recall that we treat $u(t)$ as an additional state variable and $v(t-\tau_u)$ as the control input to be determined.

We present the solution to \eqref{eq:PDE1HeatDirSamp} as \eqref{eq:WseriesHeatDir} with $\left\{\phi_n\right\}_{n=1}^{\infty}$ defined in \eqref{eq:SLBCs}. By differentiating under the integral sign, integrating by parts and using \eqref{eq:SL} and \eqref{eq:2BCs} we obtain
\begin{equation}\label{eq:WOdesHeatDirSamp}
\begin{array}{lll}
&\hspace{-4mm}\dot{w}_n(t) = (-\lambda_n+a)w_n(t) + ab_nu(t) -b_nv(t-\tau_u), \ t\geq 0
\end{array}
\end{equation}
with $\left\{b_n\right\}_{n=1}^{\infty}$ given in \eqref{eq:WOdesHeatDir}. In particular, \eqref{eq:AssbnNonDelayedHeatDir} and \eqref{eq:AssbnNonDelayed1HeatDir} hold.

Given $\delta>0$, let $N_0 \in \mathbb{N}$ satisfy \eqref{eq:N0HeatDir} and $N\in \mathbb{N}, \ N_0\leq N$. $N_0$ will define the dimension of the controller, whereas $N$ will define the dimension of the observer.
We construct a finite-dimensional observer of the form \eqref{eq:WhatSeriesHeatDir} where $\hat{w}_n(t)$ satisfy the ODEs for $t\geq 0$
\begin{equation}\label{eq:WobsODENonDelayedHeatDir1Delay}
\begin{array}{lll}
&\dot{\hat{w}}_n(t) = (-\lambda_n+a)\hat{w}_n(t) +ab_nu(t)- b_nv(t-\tau_u)\\
&\hspace{8mm}-l_n\left[\hat{w}(x_*,t-\tau_y)+r(x_*)u(t-\tau_y)- y(t)\right],\\
&\hat{w}_n(0)=0, \ n\geq 1
\end{array}
\end{equation}
with $y(t)$ in \eqref{eq:InDomPointMeas1HeatDirSamp} and scalar observer gains $l_n,\ 1\leq n\leq N$.

Under Assumption 1 let the observer and controller gains, $L_0$ and $K_0$ , satisfy \eqref{eq:GainsDesignLHeatDir} and \eqref{eq:GainsDesignKHeatDir}, respectively. We choose $l_n=0$ for $N_0+1\leq n \leq N$.
We propose a $(N_0+1)$-dimensional controller of the form
\begin{equation}\label{eq:WContDefHeatDirDelay}
\begin{aligned}
& v(t-\tau_u)= K_0\hat{w}^{N_0}(t-\tau_u)
\end{aligned}
\end{equation}
with $\hat{w}^{N_0}(t)$ defined in \eqref{eq:WContDefHeatDir}. The proposed controller is based on the $N$-dimensional observer \eqref{eq:WhatSeriesHeatDir}.

Well-posedness of the closed-loop system \eqref{eq:PDE1HeatDirSamp} and \eqref{eq:WobsODENonDelayedHeatDir1Delay} with control input \eqref{eq:WContDefHeatDirDelay} follows from arguments of \cite{RamiContructiveFiniteDim}, together with the step method (i.e proving well-posedness step-by-step between consecutive sampling instances). Thus, the closed-loop system \eqref{eq:PDE1HeatDirSamp} and \eqref{eq:WobsODENonDelayedHeatDir1Delay} with control input \eqref{eq:WContDefHeatDirDelay} and initial condition $w(\cdot,0)\in \mathcal{D}\left(\mathcal{A}_1^{\frac{1}{2}}\right)$ has a unique solution
\begin{equation}\label{eq:Classical1Samp}
\begin{array}{lll}
&\xi \in C\left([0,\infty);\mathcal{H}\right)\cap C^1\left((0,\infty)\setminus \mathcal{J};\mathcal{H}\right), \\ &\mathcal{J}=\left\{t_j\right\}_{j=1}^{\infty}\cup\left\{s_k\right\}_{k=1}^{\infty}
\end{array}
\end{equation}
satisfying \eqref{eq:Classical2}.

Recall the estimation error $e_n(t)$ defined in \eqref{eq:WEstErrorNonDelayed}. By using \eqref{eq:WseriesHeatDir}, \eqref{eq:WhatSeriesHeatDir} and arguments similar to \eqref{eq:WIntroZetaNonDelayedHeatDir} the last term on the right-hand side of \eqref{eq:WobsODENonDelayedHeatDir1Delay} can be written as
\begin{equation}\label{eq:WIntroZetaNonDelayedHeatDirDelay}
\begin{array}{ll}
&\hat{w}(x_*,t)+r(x_*)u(t) - y(t) \\
&=-\sum_{n=1}^{N} c_ne_n(t-\tau_y)-\zeta(t-\tau_y)
\end{array}
\end{equation}
where $\zeta(t)$ is defined in \eqref{eq:zetaintegralHeatDir} and satisfies \eqref{eq:zetaestHeatDir}. Then the error equations have the form
\begin{equation}\label{eq:WenHeatDirDelay}
\begin{array}{ll}
&\dot e_n(t)=(-\lambda_n+a)e_n(t)-l_n\left(\sum_{n=1}^{N} c_ne_n(t-\tau_y)\right.\\
&\hspace{8mm}\left.+\zeta(t-\tau_y)\right),\quad t\geq 0.
\end{array}
\end{equation}
Recalling the notations \eqref{eq:ErrDefNonDelayedHeatDir} and \eqref{eq:ErrDefNonDelayedHeatDir1} we define
\begin{equation}\label{eq:ClosedloopMatDelay}
\begin{array}{lll}
& \Upsilon_y(t) = X(t-\tau_y)-X(t),\ \Upsilon_u(t) = X(t-\tau_u)-X(t),\\
&F_1 = \mathcal{L}\cdot [0,C_0,0,C_1]\in \mathbb{R}^{(2N+1)\times (2N+1)}, \\
&\mathcal{B}= \text{col}\left\{-\tilde{B}_0, 0,B_1,0 \right\}\in \mathbb{R}^{2N+1},\\
&\hat{K}_0 = \begin{bmatrix} K_0,&0\end{bmatrix} \in \mathbb{R}^{1\times 2N+1} .
\end{array}
\end{equation}
Then, using the notations \eqref{eq:ErrDefNonDelayedHeatDir}, \eqref{eq:ErrDefNonDelayedHeatDir1}  and  \eqref{eq:WOdesHeatDirSamp}, \eqref{eq:WobsODENonDelayedHeatDir1Delay}, \eqref{eq:WenHeatDirDelay}, \eqref{eq:ClosedloopMatDelay} we arrive at the following closed-loop system:
\begin{equation}\label{eq:ClosedLoopHeatDirDelay}
\begin{array}{lll}
&\dot{X}(t) = FX(t)+F_1\Upsilon_y(t)-\mathcal{B}\hat{K}_0\Upsilon_u(t)+\mathcal{L}\zeta(t-\tau_y),\\
& \dot{w}_n(t) = (-\lambda_n+a)w_n(t) -b_n\tilde{K}_0X(t)\\
&\hspace{10mm}-b_n\hat{K}_0\Upsilon_u(t), \ n>N, \quad t\geq 0.
\end{array}
\end{equation}
For $H^1$-stability analysis of the closed-loop system \eqref{eq:ClosedLoopHeatDirDelay} we fix  $\delta_0>\delta$
and define the Lyapunov functional
\begin{equation}\label{eq:VNonDelayedHeatDirDelay}
W(t)=V(t)+V_y(t)+V_u(t), \quad t\geq 0
\end{equation}
where $V(t)$ is defined in \eqref{eq:VNonDelayedHeatDir1} and
\begin{equation}\label{eq:DelayFunctionals}
\begin{array}{lll}
&V_y(t) = \tau_{M,y}^2\int_{t-\tau_y}^te^{-2\delta_0(t-s)}\dot{X}^T(s)W_1\dot{X}(s)ds\\
&- \frac{\pi^2}{4}\int_{t-\tau_y}^te^{-2\delta_0(t-s)}\Upsilon_y(s)^TW_1\Upsilon_y(s)ds, \ W_1>0,\vspace{0.1cm}\\
&V_u(t) = \tau_{M,u}^2\int_{t-\tau_u}^te^{-2\delta_0(t-s)}\dot{X}^T(s)\hat{K}_0^TW_2\hat{K}_0\dot{X}(s)ds\\
& - \frac{\pi^2}{4}\int_{t-\tau_u}^te^{-2\delta_0(t-s)}\Upsilon_u(s)^T\hat{K}_0^TW_2\hat{K}_0\Upsilon_u(s)ds, \ W_2>0.
\end{array}
\end{equation}
Note that $V_y(t),V_u(t)\geq 0$ due to the exponential Wirtinger inequality (see e.g \cite{selivanov2016observer}). We will employ the following Halanay's inequality for piecewise-continuous Lyapunov functions that do not grow at points of jump-discontinuity:
\begin{lemma}[Halanay's inequality]\label{prop:HalInterval}
	Let $s_0<...<s_k<...$ satisfy $\lim_{k\to\infty}s_k=\infty$ and $s_{k+1}-s_k\le h,\ k=0,1,\dots$.
	For any $k=0,1,\dots$, let there exist $\left\{t^{(k)}_j\right\}_{0\leq j\leq n_k}$ satisfying
	\begin{equation}\label{eq:RefinementSamp}
	s_k=t^{(k)}_0<t^{(k)}_1<\dots<t^{(k)}_{n_k-1}<t^{(k)}_{n_k}=s_{k+1}.
	\end{equation}
	Let $W:[s_0,+\infty)\rightarrow
	\mathbb{R}_+$ be absolutely continuous on $[t^{(k)}_j,t^{(k)}_{j+1})$ for all $k=0,1,\dots$ and $ 0\leq j\leq n_k$. Assume further that $W(t)$ satisfies
	\begin{equation}\label{eq:NojumpSamp2}
	\lim_{t\uparrow t^{(k)}_j}W(t)\geq W\left(t^{(k)}_j\right), \quad k=0,1,\dots, \ 0\leq j\leq n_k.
	\end{equation}
	and for $\delta_0>\delta_1>0$ and all $k=0,1,2,\dots$
	\begin{equation}
	\begin{array}{lll}\label{HalanayRAESamp1}
	\dot{W}(t) &\leq -2\delta_0{W}(t)+2\delta_1\sup_{s_k\leq{\theta}\leq
		t}W(\theta)\vspace{0,1cm}\\
	&{\mbox almost \ for \ all} \ t\in [t^{(k)}_j,t^{(k)}_{j+1}), \  0\leq j\leq n_k-1.
	\end{array}
	\end{equation}
	Then
	\begin{equation}
	\begin{array}{rr}\label{HalanayISSkDPlus}
	W(t) \le e^{-2\delta_{\tau} (t-s_0)} W(s_0), \quad t\geq s_0.
	\end{array}
	\end{equation}
	where  $\delta_{\tau}>0$ is a unique solution of
	\begin{equation}\label{eq:deltatau}
	\delta_{\tau}=\delta_0-\delta_1e^{2\delta_{\tau} h}.
	\end{equation}
\end{lemma}

The proof of Lemma is omitted due to the length limitation.
As the classical Halanay inequality (see \cite{Fridman14_TDS}), the proof of Lemma \ref{prop:HalInterval} is based on a comparison principle, where \eqref{HalanayRAESamp1} is taken into account.

Consider $[s_k,s_{k+1}), \ k=0,1,\dots$, where  $s_k,s_{k+1}$ are consecutive measurement sampling instances. Since the controller update instances satisfy $\lim_{j \to \infty}t_j = \infty$, there exist \emph{finitely many} controller update instances $t^{(k)}_j, \ 0\leq j\leq n_k$ for which \eqref{eq:RefinementSamp} holds. Furthremore, it can be easily verified that $W(t)$ defined by \eqref{eq:VNonDelayedHeatDirDelay},\eqref{eq:DelayFunctionals} is continuously differentiable on $[t^{(k)}_j,t^{(k)}_{j+1}), \ 0\leq j\leq n_k-1$ and satisfies \eqref{eq:NojumpSamp2}. Our goal now is to derive conditions which guarantee that \eqref{HalanayRAESamp1} holds.
Differentiating $V(t)$ on $[t^{(k)}_j,t^{(k)}_{j+1}), \ 0\leq j\leq n_k-1$ along the solution to \eqref{eq:ClosedLoopHeatDirDelay} we obtain
\begin{equation}\label{eq:WStabAnalysisNonDelayedHeatDirDelay}
\begin{array}{lll}
&\dot{V}+2\delta_0 V \leq X^T(t)\left[PF +F^TP+2\delta_0 P\right]X(t)\\
&+2X^T(t)PF_1\Upsilon_y(t)-2X^T(t)P\mathcal{B}\hat{K}_0\Upsilon_u(t)\\
&+2X^T(t)P\mathcal{L}\zeta(t-\tau_y)\\
&+2\sum_{n=N+1}^{\infty}\left(-\lambda_n^2+(a+\delta_0)\lambda_n\right)w_n^2(t)\\ &+2\sum_{n=N+1}^{\infty}\lambda_n w_n(t)b_n\left[-\tilde{K}_0X(t)-\hat{K}_0\Upsilon_u(t)\right].
\end{array}
\end{equation}
By arguments similar to \eqref{eq:WCrosTermNonDelayedHeatDir}
\begin{equation}\label{eq:WCrosTermNonDelayedHeatDirDelay}
\begin{array}{lllll}
&2\sum_{n=N+1}^{\infty}\lambda_n w_n(t)b_n\left[-\tilde{K}_0X(t)-\hat{K}_0\Upsilon_u(t)\right]\\
&\leq \left(\frac{1}{\alpha_1}+\frac{1}{\alpha_2}\right) \sum_{n=N+1}^{\infty}\lambda_n^{\frac{7}{4}} w_n^2(t)+ \frac{4\alpha_1 }{\sqrt{N}\pi^{\frac{3}{2}}}\left|\tilde{K}_0X(t)\right|^2\\
&+ \frac{4\alpha_2 }{\sqrt{N}\pi^{\frac{3}{2}}}\left|\hat{K}_0\Upsilon_u(t)\right|^2
\end{array}
\end{equation}
where $\alpha_i>0, \ i\in \left\{1,2\right\}$. Differentiating $V_y(t)$ and $V_u(t)$ along the solution to \eqref{eq:ClosedLoopHeatDirDelay} we obtain
\begin{equation}\label{eq:VyDot}
\begin{array}{lll}
&\dot{V}_y+2\delta_0V_y = \tau_{M,y}^2e^{2\delta_0\tau_{M,y}}\dot{X}^T(t)W_1\dot{X}(t)\\
&\hspace{17mm} -\frac{\pi^2}{4}\Upsilon_y(t)^TW_1\Upsilon_y(t),\\
&\dot{V}_u+2\delta_0V_u = \tau_{M,u}^2e^{2\delta_0\tau_{M,u}}\dot{X}^T(t)\hat{K}_0^TW_2\hat{K}_0\dot{X}(t)\\
&\hspace{17mm} -\frac{\pi^2}{4}\Upsilon_u(t)^T\hat{K}_0^TW_2\hat{K}_0\Upsilon_u(t).
\end{array}
\end{equation}

To compensate $\zeta(t-\tau_y)$ we use the following estimate:
\begin{equation}\label{eq:zetaintroducLMIsDelay}
\begin{array}{lll}
&\hspace{-4mm}-2\delta_1 \sup_{s_k\leq\theta \leq t}W(\theta)\leq -2\delta_1 V(s_k)\overset{\eqref{eq:tau_yu}}{\leq} -2\delta_1 V(t-\tau_y)\vspace{0.1cm}\\
&\hspace{-4mm}\overset{\eqref{eq:zetaestHeatDir}}{\leq} -2\delta_1X^T(t)PX(t)-2\delta_1\Upsilon_y^T(t)P\Upsilon_y(t)-2\delta_1\zeta^2(t-\tau_y)\vspace{0.1cm}\\
&\hspace{-4mm}-2\delta_1X^T(t)P\Upsilon_y(t)-2\delta_1\Upsilon_y^T(t)PX(t)
\end{array}
\end{equation}
where $\delta_0>\delta_1>0$. Let
\begin{equation*}
\begin{array}{lll}
&\eta(t)= \text{col}\left\{X(t),\zeta(t-\tau_y),\Upsilon_y(t),\hat{K}_0\Upsilon_u(t)\right\},\\
& R = [F, \mathcal{L},F_1,-\mathcal{B}].
\end{array}
\end{equation*}
From \eqref{eq:WStabAnalysisNonDelayedHeatDirDelay}, \eqref{eq:WCrosTermNonDelayedHeatDirDelay}, \eqref{eq:VyDot} and \eqref{eq:zetaintroducLMIsDelay} we have
\begin{equation}\label{eq:WStabResultNonDelayedHeatDirDelay}
\begin{array}{ll}
\mathcal{H}_W &= \dot{W}(t)+2\delta_0 W(t)-2\delta_1 \sup_{s_k\leq \theta \leq t}W(\theta)\\
& \leq \eta^T(t)\Psi^{(2)}\eta(t)+2\sum_{n=N+1}^{\infty}\mu_n\lambda_n w_n^2(t)\leq 0
\end{array}
\end{equation}
provided $\mu_{n} = -\lambda_n+\left[\sum_{i=1}^2 \frac{1}{2\alpha_i}\right]\lambda_n^{\frac{3}{4}}+a+\delta_0< 0$ for $n>N$ and
\begin{equation}\label{eq:PSi2def}
\begin{array}{lll}
\Psi^{(2)}&=\small\left[
\begin{array}{cc|cccc}
\Phi^{(1)}\ & P\mathcal{L}\ & P(F_1-2\delta_1I)\ & -P\mathcal{B} \\
* \ & -2\delta_1 \ & 0 \ & 0 \\ \hline
* \ & * \ & -\overline{W}_1\ & 0 \\
* \ & * \ & * \ & -\overline{W}_2
\end{array}
\right]\\
&+R^T\left(\varepsilon_y W_1+\varepsilon_u \hat{K}_0^TW_2\hat{K}_0\right)R<0
\end{array}
\end{equation}
where $\Phi^{(1)}$ is defined in \eqref{eq:WStabResultNonDelayedHeatDir1} and
\begin{equation*}
\begin{array}{lll}
&\overline{W}_1 = 2\delta_1P+\frac{\pi^2}{4}W_1, \overline{W}_2 = \frac{\pi^2}{4}W_2-\frac{4\alpha_2 }{\sqrt{N}\pi^{\frac{3}{2}}}, \\
& \varepsilon_y=\tau_{M,y}^2e^{2\delta_0 \tau_{M,y}},\ \ \varepsilon_u=\tau_{M,u}^2e^{2\delta_0 \tau_{M,u}}.
\end{array}
\end{equation*}
Furthermore, monotonicity of $\left\{\lambda_n\right\}_{n=1}^{\infty}$ and Schur complement imply that $\mu_n< 0$ for all $n>N$ if and only if
\begin{eqnarray}\label{eq:tailDelay}
\hspace{-2mm}\scriptsize\left[
\begin{array}{c|cc}
-\lambda_{N+1}+a+\delta_0 \ & 1 \ & 1 \\ \hline
* \ & -2\alpha_1\lambda_{N+1}^{-\frac{3}{4}} \ & 0 \\
* \ & * \ & -2\alpha_2\lambda_{N+1}^{-\frac{3}{4}}
\end{array}
\right]<0.
\end{eqnarray}
From \eqref{eq:WStabResultNonDelayedHeatDirDelay}, the LMIS \eqref{eq:PSi2def} and \eqref{eq:tailDelay} result in $\mathcal{H}_W\leq 0$ for $t\in [t^{(k)}_j,t^{(k)}_{j+1}), \ 0\leq j\leq n_k-1$. From \eqref{HalanayISSkDPlus} and \eqref{eq:deltatau} with $h=\tau_{M,y}$ we arrive at
\begin{equation}\label{eq:HalInterval}
W(t) \le e^{-2\delta_{\tau}t}W(0), \quad  t\geq 0,
\end{equation}
Summarizing, we have:
\begin{theorem}\label{Thm:WdynExtensionHeatDirDelay}
Consider \eqref{eq:PDE1HeatDirSamp} with boundary conditions \eqref{eq:PDE1HeatDirBCs}, in-domain point measurement \eqref{eq:InDomPointMeas1HeatDirSamp}, control law \eqref{eq:WContDefHeatDirDelay} and $w(\cdot,0)\in \mathcal{D}(\mathcal{A}_1^{\frac{1}{2}})$. Given $\delta>0$, let $N_0\in \mathbb{N}$ satisfy \eqref{eq:N0HeatDir} and $N\in \mathbb{N}$ satisfy $N_0\leq N$. Let $L_0$ and $K_0$ be obtained using \eqref{eq:GainsDesignLHeatDir}  and \eqref{eq:GainsDesignKHeatDir}, respectively. Given $\tau_{M,y},\tau_{M,u}>0$, $\delta_1>0$ and $\delta_0=\delta_1+\delta$, let there exist positive definite matrices $P,W_1\in \mathbb{R}^{(2N+1)\times (2N+1)}$ and scalars $\alpha_1,\alpha_2,W_2>0$ which satisfy \eqref{eq:PSi2def} and \eqref{eq:tailDelay}. Then the solution $w(x,t)$ and $u(t)$ to \eqref{eq:PDE1HeatDirSamp} under the control law \eqref{eq:WContDefHeatDirDelay}, \eqref{eq:WobsODENonDelayedHeatDir1Delay} and the corresponding observer $\hat{w}(x,t)$ defined by \eqref{eq:WhatSeriesHeatDir} satisfy \eqref{eq:WH1StabilityHeatDir} with $\delta$ replaced by $\delta_{\tau}$, given in \eqref{eq:deltatau}. The LMIS
\eqref{eq:PSi2def} and \eqref{eq:tailDelay} are always feasible for large enough $N$ and small enough $\tau_{M,y},\tau_{M,u}$.
\end{theorem}
\begin{proof}
The proof of \eqref{eq:WH1StabilityHeatDir} follows from arguments identical to Theorem \ref{Thm:WdynExtensionHeatDir}. The feasibility of \eqref{eq:PSi2def} and \eqref{eq:tailDelay} for large enough $N$ and small enough $\tau_{M,y},\tau_{M,u}$ follows from arguments similar to Theorem 3.1 in \cite{katz2020constructiveDelay}.
\end{proof}
\begin{corollary}\label{cor:H1ConvHeatDirDelay}
	Under the conditions of Theorem \ref{Thm:WdynExtensionHeatDirDelay} the estimates \eqref{eq:ZH1StabilityHeatDir} hold for $z(x,t)$ given in \eqref{eq:ChangeVarsHeatDir}.
\end{corollary}

\section{Numerical examples}
We demonstrate our approach to Dirichlet control of a 1D linear heat equation in two cases - non-delayed boundary control and sampled data boundary control. In both cases we choose $a=10$, which results in an unstable open-loop system. Furthermore, the gains $L_0$ and $K_0$ are found from \eqref{eq:GainsDesignLHeatDir} and \eqref{eq:GainsDesignKHeatDir}, respectively and are given by
\begin{equation}\label{eq:Gains}
L_0 = 0.7062, \quad K_0 = \begin{bmatrix}
-4.8237 & -5.2287
\end{bmatrix}.
\end{equation}
The LMIs of Thereoms \ref{Thm:WdynExtensionHeatDir} and \ref{Thm:WdynExtensionHeatDirDelay} were verified using the standard Matlab LMI toolbox. For non-delayed boundary control, we choose $\delta = 0.1$, which leads to $N_0=1$. The LMIs of Theorem \ref{Thm:WdynExtensionHeatDir} were found to be feasible for $N=4$. For sampled data boundary control we consider $\delta_{\tau}<\delta_0-\delta_1=0.1$, which leads to $N_0=1$. For $N\in \left\{6,8,10,12,14\right\}$ and $\delta_0=6$, the LMIs of Theorem \ref{Thm:WdynExtensionHeatDir} were verified in order to find the maximum values of $\tau_{M,y}$ and $\tau_{M,u}$ which result in feasibility. The results are presented in Table \ref{Tab:Sim}. It can be seen from Table \ref{Tab:Sim} that there is a trade-off between $\tau_{M,y}$ and $\tau_{M,u}$. In particular, increasing $\tau_{M,y}$ by $10^{-3}$ decreases $\tau_{M,u}$ by more than this amount. Furthermore, increasing $N$ preserves feasibility of the LMIs while increasing both $\tau_{M,y}$ and $\tau_{M,u}$. Numerical simulations of the closed-loop system for both cases confirm the theoretical results. The details are omitted due to length limitations.
\begin{table}[h]
	\begin{center}
		\footnotesize\begin{tabular}{|l|l|l|l|l|l|}
			\hline
			& N=6 & N=8 & N=10 & N=12& N=14  \\
			\hline
			$\tau_{M,y}$ &
			\multicolumn{5}{c|}{$\tau_{M,u}$}  \\
			\hline
			$0.002$ & 0.048 & 0.051 & 0.052 &0.053& 0.055\\
			\hline
			$0.004$ & 0.044 & 0.047 & 0.05 &0.051& 0.053\\
			\hline
			$0.006$ & 0.036 & 0.041 & 0.044 &0.047& 0.049\\
			\hline
			$0.008$ & 0.029 & 0.035 & 0.038 &0.041& 0.042\\
			\hline
			$0.01$ & 0.021 & 0.028 & 0.031 &0.034& 0.036\\
			\hline
			$0.012$ & 0.008 & 0.019 & 0.024 &0.027& 0.029\\
			\hline
			$0.014$ & - & 0.01 & 0.015 &0.018& 0.021\\
			\hline
			$0.016$ & - & - & 0.005 &0.009& 0.012\\
			\hline
		\end{tabular}
	\end{center}
	\caption{\label{Tab:Sim} Maximum value of $\tau_{M,u}$ for different values of $N$ and $\tau_{M,y}$.}
\end{table}
\section{Conclusions}
This paper presented the first constructive LMI-based method for finite-dimensional boundary controller design under the point in-domain measurement for 1D heat equation.
The method was based
on modal decomposition approach via dynamic extension.
Sampled-data implementation of the controller under sampled-data measurements was presented.
The proposed method can be extended to other PDEs and to input-to-state stabilization.

\bibliographystyle{IEEEtran}

redpajama_set_name: RedPajamaArXiv


If you need to have your gear repaired, all you need to do is take the unit to the Paul Bothner Music branch most convenient for you and ask a sales consultant to book the unit in so that we can send it to our Service Department, for repair.
Our Service Department repairs keyboards, a vast range of amplifier types, acoustic and electric guitars, bass guitars, public address systems and more. We also specialize in repairing valve amps, and doing guitar and bass setups, and mods.
In the event that the aforementioned costs are not acceptable, a handling fee of R250 will be charged.
For example: If an item costs R 180 to repair, the Service Department will repair the unit without contacting you for approval, because the repair costs less than R 1080. However, if the repair costs more than R 1080, a Service Department representative will contact you, to clear the repair for your approval. In this latter context, if you choose not to go ahead with the repair, you will pay R 250 for the minimum assessment fee.
No repairs can be carried out under guarantee, unless the original proof of purchase is given to us.
Please note that the guarantee will be null and void if, on assessment, it has been found that the unit has been tampered with by non-Bothner staff, e.g. the customer has opened the unit and tampered with anything in trying to assess the fault.
All repairs not collected within 3 months will be sold to defray costs.
Repairs not collected within 30 days of notification, will be subject to additional admin fees equal to 10% of the repair cost per month, calculated on a pro-rata basis.
All data must be backed up by the user (where applicable) prior to booking the said item in for repairs, as we are not liable for any loss of data.
All repairs booked into the Service Department are done so at the risk of the individual handing in the repair to Paul Bothner (Pty) Ltd.
Paul Bothner (Pty) Ltd will not accept liability for any damage or loss that might occur during transport, repair, storage, etc.
All labour performed and parts supplied, under the terms of the repair, are guaranteed for a period of 3 months from the date of invoicing.
Example: Solid state/transistor amps, acoustic/electric guitars, basses, keyboards etc.


text:
Q: How do you use "<<-" (scoping assignment) in R? I just finished reading about scoping in the R intro, and am very curious about the <<- assignment.
The manual showed one (very interesting) example for <<-, which I feel I understood. What I am still missing is the context of when this can be useful.
So what I would love to read from you are examples (or links to examples) on when the use of <<- can be interesting/useful.  What might be the dangers of using it (it looks easy to loose track of), and any tips you might feel like sharing.

A: One place where I used <<- was in simple GUIs using tcl/tk.  Some of the initial examples have it -- as you need to make a distinction between local and global variables for statefullness.  See for example
 library(tcltk)
 demo(tkdensity)

which uses <<-.  Otherwise I concur with Marek :) -- a Google search can help.

A: On this subject I'd like to point out that the <<- operator will behave strangely when applied (incorrectly) within a for loop (there may be other cases too). Given the following code:
fortest <- function() {
    mySum <- 0
    for (i in c(1, 2, 3)) {
        mySum <<- mySum + i
    }
    mySum
}

you might expect that the function would return the expected sum, 6, but instead it returns 0, with a global variable mySum being created and assigned the value 3. I can't fully explain what is going on here but certainly the body of a for loop is not a new scope 'level'. Instead, it seems that R looks outside of the fortest function, can't find a mySum variable to assign to, so creates one and assigns the value 1, the first time through the loop. On subsequent iterations, the RHS in the assignment must be referring to the (unchanged) inner mySum variable whereas the LHS refers to the global variable. Therefore each iteration overwrites the value of the global variable to that iteration's value of i, hence it has the value 3 on exit from the function.
Hope this helps someone - this stumped me for a couple of hours today! (BTW, just replace <<- with <- and the function works as expected).

A: It helps to think of <<- as equivalent to assign (if you set the inherits parameter in that function to TRUE).  The benefit of assign is that it allows you to specify more parameters (e.g. the environment), so I prefer to use assign over <<- in most cases.
Using <<- and assign(x, value, inherits=TRUE) means that "enclosing environments of the supplied environment are searched until the variable 'x' is encountered."  In other words, it will keep going through the environments in order until it finds a variable with that name, and it will assign it to that.  This can be within the scope of a function, or in the global environment.
In order to understand what these functions do, you need to also understand R environments (e.g. using search).
I regularly use these functions when I'm running a large simulation and I want to save intermediate results.  This allows you to create the object outside the scope of the given function or apply loop.  That's very helpful, especially if you have any concern about a large loop ending unexpectedly (e.g. a database disconnection), in which case you could lose everything in the process.  This would be equivalent to writing your results out to a database or file during a long running process, except that it's storing the results within the R environment instead.
My primary warning with this: be careful because you're now working with global variables, especially when using <<-.  That means that you can end up with situations where a function is using an object value from the environment, when you expected it to be using one that was supplied as a parameter.  This is one of the main things that functional programming tries to avoid (see side effects).  I avoid this problem by assigning my values to a unique variable names (using paste with a set or unique parameters) that are never used within the function, but just used for caching and in case I need to recover later on (or do some meta-analysis on the intermediate results).

A: f <- function(n, x0) {x <- x0; replicate(n, (function(){x <<- x+rnorm(1)})())}
plot(f(1000,0),typ="l")

A: The <<- operator can also be useful for Reference Classes when writing Reference Methods. For example:
myRFclass <- setRefClass(Class = "RF",
                         fields = list(A = "numeric",
                                       B = "numeric",
                                       C = function() A + B))
myRFclass$methods(show = function() cat("A =", A, "B =", B, "C =",C))
myRFclass$methods(changeA = function() A <<- A*B) # note the <<-
obj1 <- myRFclass(A = 2, B = 3)
obj1
# A = 2 B = 3 C = 5
obj1$changeA()
obj1
# A = 6 B = 3 C = 9

A: <<- is most useful in conjunction with closures to maintain state.  Here's a section from a recent paper of mine:

A closure is a function written by another function. Closures are
so-called because they enclose the environment of the parent
function, and can access all variables and parameters in that
function. This is useful because it allows us to have two levels of
parameters. One level of parameters (the parent) controls how the
function works. The other level (the child) does the work. The
following example shows how can use this idea to generate a family of
power functions. The parent function (power) creates child functions
(square and cube) that actually do the hard work.

power <- function(exponent) {
  function(x) x ^ exponent
}

square <- power(2)
square(2) # -> [1] 4
square(4) # -> [1] 16

cube <- power(3)
cube(2) # -> [1] 8
cube(4) # -> [1] 64

The ability to manage variables at two levels also makes it possible to maintain the state across function invocations by allowing a function to modify variables in the environment of its parent. The key to managing variables at different levels is the double arrow assignment operator  <<-. Unlike the usual single arrow assignment (<-) that always works on the current level, the double arrow operator can modify variables in parent levels.
This makes it possible to maintain a counter that records how many times a function has been called, as the following example shows. Each time new_counter is run, it creates an environment, initialises the counter i in this environment, and then creates a new function.
new_counter <- function() {
  i <- 0
  function() {
    # do something useful, then ...
    i <<- i + 1
    i
  }
}

The new function is a closure, and its environment is the enclosing environment. When the closures counter_one and counter_two are run, each one modifies the counter in its enclosing environment and then returns the current count.
counter_one <- new_counter()
counter_two <- new_counter()

counter_one() # -> [1] 1
counter_one() # -> [1] 2
counter_two() # -> [1] 1

A: I use it in order to change inside map() an object in the global environment.
a = c(1,0,0,1,0,0,0,0)

Say I want to obtain a vector which is c(1,2,3,1,2,3,4,5), that is if there is a 1, let it 1, otherwise add 1 until the next 1.
map(
  .x = seq(1,(length(a))),
  .f = function(x) {
    a[x] <<- ifelse(a[x]==1, a[x], a[x-1]+1)
    })
a
[1] 1 2 3 1 2 3 4 5

redpajama_set_name: RedPajamaStackExchange


text:
Q: Windows 8 + Emacs 24.3 + emacs-for-python: Pymacs helper did not start within 30 seconds I recently installed Emacs 24.3 and try to use it coding for Python (v3.3.2 x86-64 MSI installer). (I'm new to Emacs). Then i try to install emacs-for-python by unpack the zip to
"C:\Users\mmsc\AppData\Roaming\.emacs.d\emacs-for-python"

folder and add
: (load-file "~/.emacs.d/emacs-for-python/epy-init.el")

into C:\Users\mmsc\AppData\Roaming.emacs
after I launch Emacs, I see error

Warning (initialization): An error occurred while loading
  `c:/Users/Klein/AppData/Roaming/.emacs':
error: Pymacs helper did not start within 30 seconds
To ensure normal operation, you should investigate and remove the
  cause of the error in your initialization file.  Start Emacs with the
  `--debug-init' option to view a complete error backtrace.

with the "--debug-init", I saw below information but I have little knowledge about Emacs/Lisp, so I can't locate the problem easily.
Debugger entered--Lisp error: (error "Pymacs helper did not start within 30 seconds")
  signal(error ("Pymacs helper did not start within 30 seconds"))
  pymacs-report-error("Pymacs helper did not start within %d seconds" 30)
  (if (accept-process-output process pymacs-timeout-at-start) nil (pymacs-report-error "Pymacs helper did not start within %d seconds" pymacs-timeout-at-start))
  (while (progn (goto-char (point-min)) (not (re-search-forward "<\\([0-9]+\\)  " nil t))) (if (accept-process-output process pymacs-timeout-at-start) nil (pymacs-report-error "Pymacs helper did not start within %d seconds" pymacs-timeout-at-start)))
  (let ((process (apply (quote start-process) "pymacs" buffer (let ((python (getenv "PYMACS_PYTHON"))) (if (or (null python) (equal python "")) pymacs-python-command python)) "-c" (concat "import sys;" " from Pymacs import main;" " main(*sys.argv[1:])") (append (and (>= emacs-major-version 24) (quote ("-f"))) (mapcar (quote expand-file-name) pymacs-load-path))))) (pymacs-kill-without-query process) (while (progn (goto-char (point-min)) (not (re-search-forward "<\\([0-9]+\\)  " nil t))) (if (accept-process-output process pymacs-timeout-at-start) nil (pymacs-report-error "Pymacs helper did not start within %d seconds" pymacs-timeout-at-start))) (let ((marker (process-mark process)) (limit-position (+ (match-end 0) (string-to-number (match-string 1))))) (while (< (marker-position marker) limit-position) (if (accept-process-output process pymacs-timeout-at-start) nil (pymacs-report-error "Pymacs helper probably was interrupted at start")))))
  (progn (let ((process (apply (quote start-process) "pymacs" buffer (let ((python ...)) (if (or ... ...) pymacs-python-command python)) "-c" (concat "import sys;" " from Pymacs import main;" " main(*sys.argv[1:])") (append (and (>= emacs-major-version 24) (quote ...)) (mapcar (quote expand-file-name) pymacs-load-path))))) (pymacs-kill-without-query process) (while (progn (goto-char (point-min)) (not (re-search-forward "<\\([0-9]+\\)   " nil t))) (if (accept-process-output process pymacs-timeout-at-start) nil (pymacs-report-error "Pymacs helper did not start within %d seconds" pymacs-timeout-at-start))) (let ((marker (process-mark process)) (limit-position (+ (match-end 0) (string-to-number (match-string 1))))) (while (< (marker-position marker) limit-position) (if (accept-process-output process pymacs-timeout-at-start) nil (pymacs-report-error "Pymacs helper probably was interrupted at start"))))) (goto-char (match-end 0)) (let ((reply (read (current-buffer)))) (if (and (pymacs-proper-list-p reply) (= (length reply) 2) (eq (car reply) (quote version))) (if (string-equal (cadr reply) "0.25") nil (pymacs-report-error "Pymacs Lisp version is 0.25, Python is %s" (cadr reply))) (pymacs-report-error "Pymacs got an invalid initial reply"))))
  (unwind-protect (progn (let ((process (apply (quote start-process) "pymacs" buffer (let (...) (if ... pymacs-python-command python)) "-c" (concat "import sys;" " from Pymacs import main;" " main(*sys.argv[1:])") (append (and ... ...) (mapcar ... pymacs-load-path))))) (pymacs-kill-without-query process) (while (progn (goto-char (point-min)) (not (re-search-forward "<\\([0-9]+\\)  " nil t))) (if (accept-process-output process pymacs-timeout-at-start) nil (pymacs-report-error "Pymacs helper did not start within %d seconds" pymacs-timeout-at-start))) (let ((marker (process-mark process)) (limit-position (+ (match-end 0) (string-to-number ...)))) (while (< (marker-position marker) limit-position) (if (accept-process-output process pymacs-timeout-at-start) nil (pymacs-report-error "Pymacs helper probably was interrupted at start"))))) (goto-char (match-end 0)) (let ((reply (read (current-buffer)))) (if (and (pymacs-proper-list-p reply) (= (length reply) 2) (eq (car reply) (quote version))) (if (string-equal (cadr reply) "0.25") nil (pymacs-report-error "Pymacs Lisp version is 0.25, Python is %s" (cadr reply))) (pymacs-report-error "Pymacs got an invalid initial reply")))) (set-match-data save-match-data-internal (quote evaporate)))
  (let ((save-match-data-internal (match-data))) (unwind-protect (progn (let ((process (apply (quote start-process) "pymacs" buffer (let ... ...) "-c" (concat "import sys;" " from Pymacs import main;" " main(*sys.argv[1:])") (append ... ...)))) (pymacs-kill-without-query process) (while (progn (goto-char (point-min)) (not (re-search-forward "<\\([0-9]+\\)   " nil t))) (if (accept-process-output process pymacs-timeout-at-start) nil (pymacs-report-error "Pymacs helper did not start within %d seconds" pymacs-timeout-at-start))) (let ((marker (process-mark process)) (limit-position (+ ... ...))) (while (< (marker-position marker) limit-position) (if (accept-process-output process pymacs-timeout-at-start) nil (pymacs-report-error "Pymacs helper probably was interrupted at start"))))) (goto-char (match-end 0)) (let ((reply (read (current-buffer)))) (if (and (pymacs-proper-list-p reply) (= (length reply) 2) (eq (car reply) (quote version))) (if (string-equal (cadr reply) "0.25") nil (pymacs-report-error "Pymacs Lisp version is 0.25, Python is %s" (cadr reply))) (pymacs-report-error "Pymacs got an invalid initial reply")))) (set-match-data save-match-data-internal (quote evaporate))))
  (save-current-buffer (set-buffer buffer) (erase-buffer) (buffer-disable-undo) (pymacs-set-buffer-multibyte nil) (set-buffer-file-coding-system (quote raw-text)) (let ((save-match-data-internal (match-data))) (unwind-protect (progn (let ((process (apply ... "pymacs" buffer ... "-c" ... ...))) (pymacs-kill-without-query process) (while (progn (goto-char ...) (not ...)) (if (accept-process-output process pymacs-timeout-at-start) nil (pymacs-report-error "Pymacs helper did not start within %d seconds" pymacs-timeout-at-start))) (let ((marker ...) (limit-position ...)) (while (< ... limit-position) (if ... nil ...)))) (goto-char (match-end 0)) (let ((reply (read ...))) (if (and (pymacs-proper-list-p reply) (= ... 2) (eq ... ...)) (if (string-equal ... "0.25") nil (pymacs-report-error "Pymacs Lisp version is 0.25, Python is %s" ...)) (pymacs-report-error "Pymacs got an invalid initial reply")))) (set-match-data save-match-data-internal (quote evaporate)))))
  (let ((buffer (get-buffer-create "*Pymacs*"))) (save-current-buffer (set-buffer buffer) (erase-buffer) (buffer-disable-undo) (pymacs-set-buffer-multibyte nil) (set-buffer-file-coding-system (quote raw-text)) (let ((save-match-data-internal (match-data))) (unwind-protect (progn (let ((process ...)) (pymacs-kill-without-query process) (while (progn ... ...) (if ... nil ...)) (let (... ...) (while ... ...))) (goto-char (match-end 0)) (let ((reply ...)) (if (and ... ... ...) (if ... nil ...) (pymacs-report-error "Pymacs got an invalid initial reply")))) (set-match-data save-match-data-internal (quote evaporate))))) (if (not pymacs-use-hash-tables) (setq pymacs-weak-hash t) (if pymacs-used-ids (progn (let ((pymacs-transit-buffer buffer) (pymacs-forget-mutability t) (pymacs-gc-inhibit t)) (pymacs-call "zombie_python" pymacs-used-ids)) (setq pymacs-used-ids nil))) (setq pymacs-weak-hash (make-hash-table :weakness (quote value))) (if (boundp (quote post-gc-hook)) (add-hook (quote post-gc-hook) (quote pymacs-schedule-gc)) (setq pymacs-gc-timer (run-at-time 20 20 (quote pymacs-schedule-gc))))) (setq pymacs-transit-buffer buffer) (let ((modules pymacs-load-history)) (setq pymacs-load-history nil) (if (and modules (yes-or-no-p "Reload modules in previous session? ")) (progn (mapc (function (lambda (args) (condition-case err ... ...))) modules)))))
  pymacs-start-services()
  (if (and pymacs-transit-buffer (buffer-name pymacs-transit-buffer) (get-buffer-process pymacs-transit-buffer)) nil (if pymacs-weak-hash (progn (if (or (eq pymacs-auto-restart t) (and (eq pymacs-auto-restart (quote ask)) (yes-or-no-p "The Pymacs helper died.  Restart it? "))) nil (pymacs-report-error "There is no Pymacs helper!")))) (pymacs-start-services))
  pymacs-serve-until-reply("eval" (pymacs-print-for-apply (quote "pymacs_load_helper") (quote ("ropemacs" "rope-" nil))))
  pymacs-call("pymacs_load_helper" "ropemacs" "rope-" nil)
  (let ((lisp-code (pymacs-call "pymacs_load_helper" module prefix noerror))) (cond (lisp-code (let ((result (eval lisp-code))) (add-to-list (quote pymacs-load-history) (list module prefix noerror) (quote append)) (message "Pymacs loading %s...done" module) (run-hook-with-args (quote pymacs-after-load-functions) module) result)) (noerror (message "Pymacs loading %s...failed" module) nil)))
  pymacs-load("ropemacs" "rope-")
  setup-ropemacs()
  (progn (setup-ropemacs) (autoload (quote virtualenv-activate) "virtualenv" "Activate a Virtual Environment specified by PATH" t) (autoload (quote virtualenv-workon) "virtualenv" "Activate a Virtual Environment present using virtualenvwrapper" t) (add-hook (quote python-mode-hook) (lambda nil (if (buffer-file-name) (flymake-mode)))) (defun workon-postactivate (virtualenv) (require (quote virtualenv)) (virtualenv-activate virtualenv) (desktop-change-dir virtualenv)))
  (lambda nil (progn (setup-ropemacs) (autoload (quote virtualenv-activate) "virtualenv" "Activate a Virtual Environment specified by PATH" t) (autoload (quote virtualenv-workon) "virtualenv" "Activate a Virtual Environment present using virtualenvwrapper" t) (add-hook (quote python-mode-hook) (lambda nil (if (buffer-file-name) (flymake-mode)))) (defun workon-postactivate (virtualenv) (require (quote virtualenv)) (virtualenv-activate virtualenv) (desktop-change-dir virtualenv))))()
  funcall((lambda nil (progn (setup-ropemacs) (autoload (quote virtualenv-activate) "virtualenv" "Activate a Virtual Environment specified by PATH" t) (autoload (quote virtualenv-workon) "virtualenv" "Activate a Virtual Environment present using virtualenvwrapper" t) (add-hook (quote python-mode-hook) (lambda nil (if (buffer-file-name) (flymake-mode)))) (defun workon-postactivate (virtualenv) (require (quote virtualenv)) (virtualenv-activate virtualenv) (desktop-change-dir virtualenv)))))
  eval((funcall (quote (lambda nil (progn (setup-ropemacs) (autoload (quote virtualenv-activate) "virtualenv" "Activate a Virtual Environment specified by PATH" t) (autoload (quote virtualenv-workon) "virtualenv" "Activate a Virtual Environment present using virtualenvwrapper" t) (add-hook (quote python-mode-hook) (lambda nil (if (buffer-file-name) (flymake-mode)))) (defun workon-postactivate (virtualenv) (require (quote virtualenv)) (virtualenv-activate virtualenv) (desktop-change-dir virtualenv)))))))
  eval-after-load(python (progn (setup-ropemacs) (autoload (quote virtualenv-activate) "virtualenv" "Activate a Virtual Environment specified by PATH" t) (autoload (quote virtualenv-workon) "virtualenv" "Activate a Virtual Environment present using virtualenvwrapper" t) (add-hook (quote python-mode-hook) (lambda nil (if (buffer-file-name) (flymake-mode)))) (defun workon-postactivate (virtualenv) (require (quote virtualenv)) (virtualenv-activate virtualenv) (desktop-change-dir virtualenv))))
  eval-buffer(#<buffer  *load*-819053> nil "c:/Users/mmsc/AppData/Roaming/.emacs.d/emacs-for-python/epy-python.el" nil t)  ; Reading at buffer position 4662
  load-with-code-conversion("c:/Users/mmsc/AppData/Roaming/.emacs.d/emacs-for-python/epy-python.el" "c:/Users/mmsc/AppData/Roaming/.emacs.d/emacs-for-python/epy-python.el" nil t)
  require(epy-python)
  eval-buffer(#<buffer  *load*-283406> nil "c:/Users/mmsc/AppData/Roaming/.emacs.d/emacs-for-python/epy-init.el" nil t)  ; Reading at buffer position 476
  load-with-code-conversion("c:/Users/mmsc/AppData/Roaming/.emacs.d/emacs-for-python/epy-init.el" "c:/Users/mmsc/AppData/Roaming/.emacs.d/emacs-for-python/epy-init.el" nil nil)
  load("c:/Users/mmsc/AppData/Roaming/.emacs.d/emacs-for-python/epy-init.el" nil nil t)
  load-file("C:\\Users\\mmsc\\AppData\\Roaming\\.emacs.d\\emacs-for-python\\epy-init.el")
  eval-buffer(#<buffer  *load*> nil "c:/Users/mmsc/AppData/Roaming/.emacs" nil t)  ; Reading at buffer position 656
  load-with-code-conversion("c:/Users/mmsc/AppData/Roaming/.emacs" "c:/Users/mmsc/AppData/Roaming/.emacs" t t)
  load("~/.emacs" t t)

I have tried to search some help from Internet but most of them are for Linux/Unix env. Is there anyone using Emacs with Python under Windows and know what does this mean and how can I fix it?
Thanks!

A: This was a little too much for a comment:
    (let ((process
           (apply 'start-process "pymacs" buffer
                  (let ((python (getenv "PYMACS_PYTHON")))
                    (if (or (null python) (equal python ""))
                        pymacs-python-command
                      python))
                  "-c" (concat "import sys;"
                               " from Pymacs import main;"
                               " main(*sys.argv[1:])")
                  (append
                   (and (>= emacs-major-version 24) '("-f"))
                   (mapcar 'expand-file-name pymacs-load-path)))))

This is the bit of Pymacs code which starts the process in *Pymacs* buffer. You could infer from this that Pymacs will first search for environment variable $PYMACS_PYTHON and if that doesn't exist or it's value is empty string, then it will try pymacs-python-command, which, by default is "python". So, it will make this call:
$ python -c 'import sys; from Pymacs import main; main(*sys.argv[1:])'

There's a problem with -f - I don't know what version of Python accepts this argument, but then one that I have doesn't. The intention of this code is quite clear - probably it has to load the files on pymacs-load-path, but for me the value of this variable is nil - so I don't think this code ever runs. Anyway, this argument doesn't seem to harm as for me it launches with or without it just the same.
So, if you try running the above command in console, and get something like:
(version "0.25")

Then this code works fine, otherwise, you'd get some error and that would help you identify the problem. Remember that it may not be just python. It is either $PYMACS_PYHON or pymacs-python-command.

A: I had the same symptoms but what my problem turned out to be was an old pymacs.el and a new Pymacs. Evidently Pymacs changed the module interface and I had to go hunt down the stray pymacs.el. So the pymacs.el was installed by apt-get in an odd location. You have to make sure the byte code file is gone too.


text:
Book: "Language and Identity in the Balkans: Serbo-Croatian and Its Disintegration"
Published in 2004, this book is about the tragedies of Bosnia and Kosovo are often explained away as the unchangeable legacy of "centuries-old hatreds." In this richly detailed, expertly balanced chronicle of the Balkans across fifteen centuries, Dennis Hupchick sets a complicated record straight. Organized around the three great civilizations of the region–Western European, Orthodox Christian, and Muslim–this is a much-needed guide to the political, social, cultural, and religious threads of Balkan history–with a clear, convincing account of the reasons for nationalist violence and terror.
previousBook: "The Balkans: From Constantinople to Communism"
nextBook: "The Balkans in Focus: Cultural Boundaries in Europe"

redpajama_set_name: RedPajamaCommonCrawl


The kitchen is run by John McNabb, an Auburn native who attended Le Cordon Bleu in Pennsylvania and worked at The Breakers Resort in Palm Beach, Florida, before making the move back to the Finger Lakes in 2005. Citing proximity to family and refuge from hurricane season, it's a move that McNabb feels good about. He's been cooking at the Vineyard Restaurant since 2007, and estimates that the menu is, at any given time, already comprised of 65-70% local ingredients.
"The locavore movement is real, and it has been critical to the success of restaurants in the Finger Lakes," he says. The menu changes with each season and is sure to cite ingredients that are locally-sourced, like tender greens and lamb.
McNabb is classically trained, but insists that his style of cooking involves "embracing technique and throwing rules out the window" in favor of unique, "eclectic" food.


Personally, my money would be on Morris Day and the Time.
Now these submitters each have their problems. In Roland's case, he likes to link to his personal blog where he writes mediocre summaries of stories that add nothing to the original. In BBs case, he just cuts and pastes paragraphs from linked pages.
Hey, that describes this blog! If I spam Slashdot enough with story ideas, maybe I can be famous like Roland and BB!
The competition for a blogging audience is daunting. Just today I followed a link to a blog entry that begins, "I have this idea that Prince would make an excellent coxswain." How the hell do you match a line like that? She could have ended the entry right there and it'd still be comedy gold.
Morris Day and the muthaf'in TIME, sucka!


text:
SINGLE REVIEWS 23/01/23
Image: Cal Moores
Curated by Adam Wright
Welcome to the latest new music round-up from Our Sound Music. We've compiled the following list of some of the best new tracks released this week. The keen-eyed amongst you will have noticed that we didn't release a round-up last week, but we've added a few more tunes to this week's list to make up for the lost time.
As ever, we're kicking things off with the Single Of The Week. This week it's the indie up-and-comers The Goa Express. After a busy 2022, the Burnley 5-piece kicked off this year with the new track, 'Portrait'. The song examines the trickiness of maintaining relationships, doing so with an insistent rhythm section and gleaming guitar lines. As is the case with the group's previous efforts, 'Portrait' is an undeniably fresh take on guitar music, from a band that is shaping its future.
The Gulps are next up this week with their new tune, 'Mirror Mirror'. The London-based band have ignited dancefloors with previous releases and this one is no different. A carefree attitude is instilled by clean guitars that nod in the direction of The Strokes, before diving into a more chaotic side with heavier and rougher tones. More tunes are promised too, as the band takes to the road this winter…coming up next is 'My Corner' - the latest tune from Irish rockers, Powder House. Inspired by bereavement and loss, the tune embodies a cathartic nature, crafting a dynamic soundscape awash with distorted guitars and rousing choruses. 'My Corner' makes the perfect start for the trio's 2023..more and next on this week's list is the solo artist, Bonneer. The singer/songwriter has released the haunting 'Strangers', which sees eloquent piano and ghostly vocals coming together to carve a captivating sound. Elements of folk and classical music foreground the Irish singer's message to be kinder to one another…The Lottery Winners are next with their new tune, 'Worry'. The track showcases the bright and infectious indie rhythms that fans of the band are familiar with but the subject matter, which examines the problems of overthinking, is less optimistic than the band's previous releases. The track is the first taste of the band's new album. due out later this year…next is 'Living In Shadows'; the uplifting new drop from Shambolics. Soft guitars create a ballad-like body to the tune, before erupting into a euphoric soundscape, complete with soft tones and angelic vocals. Framed around mental health struggles, the track adopts a cathartic ambience throughout and offers a light at the end of the tunnel…'Terrible Fight' is the new drop from Southend-based The Trusted. The four-piece dropped the song earlier this month, kicking off their 2023. The track explores feelings of emotional strain and assesses the emotional toll modern life can take. Its themes are framed by punchy and pop-infused indie instrumentation and vocals that nod in the direction of The 1975 and The Killers…next is a band fast developing their platform in the alternative scene. It's The Sleeping Souls, who've dropped 'Caught Up In The Scrape" - their second release to date. 'Caught Up In The Scape' continues their development and moves away from their slow debut. Featuring a heavy rock core, complete with wailing guitars and pounding choruses, the band have pushed their sound to more abrasive pastures. With an album in the pipeline, we can't wait to hear more…and finally we have the new release from Cub Sport. The Brisbane-based four-piece dropped 'Keep Me Safe' last week and has further whet the appetites of fans ahead of their forthcoming album. The track showcases a soft and cathartic soundscape; an ambient pop gives the song life while carving space for hazy and transient vocals. Their new album, 'Jesus At The Gay Bar' arrives in April.
View our latest news stories here
Browse our Spotify playlist here
Take a look at our live shows here
« Previous DMA'S Release New Single 'Fading Like A Picture' Ahead Of New Album And UK Tour SWEETS Release Glorious Second Single 'Dead Ends' Next »


text:
Students, Parents & Staff
T: 01253 352352 / 504343
E: info@blackpool.ac.uk
Course Enquiries:
info@blackpool.ac.uk
MyView Payslips
Citrix Remote Desktop Services
Android installation instructions
Chromebook installation instructions
iOS installation instructions
Mac installation instructions
PC (Windows) installation instructions
Fleetwood Nautical Campus
Combined Diplomas
Blackpool School of Arts
Moving On programme
Why Choose B&FC
College and School Liaison
Financial Support for 16 to 18s
Catering, Hospitality and Events
Computing and Digital
Hair, Beauty and Related Therapies
Health and Medical Professions
Maritime (Fleetwood)
Media Production, Film and Television
Performing Arts and Music
Sport, Leisure and Recreation
Degree-Level Courses
Degree-Level Programmes Explained
Degree Fees and Funding
Living in Blackpool
Maritime Operations (Fleetwood)
Find a Vacancy
Pre-Apprenticeships and Traineeships
Catering, Hospitality and Events Management
Creative Arts and Digital Industries
Courses starting January to March
Hobby courses
Fees and Funding for Adults
Casino and Gaming
English, Maths, ICT and ESOL
Teaching Assistance and Learning Support
Courses and business services
EnginE Masterclasses
Skills Support for the Workforce (SSW)
Why B&FC for Business
Catering, hospitality and leisure
Teaching and childcare
Teachers (College and School Liaison)
Sector Endorsement
Equality, Diversity and Wellbeing
Level 6 Restaurant
Sports and Holiday Sport Camps
Celebrating 125 Years in Education
Find a course....
In 2018, Blackpool and The Fylde College celebrated serving the Fylde coast for 125 years and is today renowned for providing technical education for students who go on to have rewarding careers in a wide range of industries.
Tracing its roots back to the fishing port of Fleetwood, where it first opened in 1892, the College retains a focus on aspects of education and training needed to drive the economy, deliver a skilled workforce for industry and secure sustainable employment for students.
Currently, around 16,000 students annually choose to study at B&FC, while more than 1,800 businesses - locally, regionally and nationally - choose B&FC to deliver education and training programmes for their staff.
In 2013, B&FC was judged as 'outstanding' by Ofsted while the same year the College's higher education provision received more commendations than any other institution in the UK from the Quality Assurance Agency for higher education.
In 2015, the College received the Queen's Anniversary Prize for Higher and Further Education for technical and professional work in partnership with employers.
B&FC's national standing was confirmed when it was awarded Chartered Institute for Further Education status in July 2016.
In September the same year, B&FC received Foundation Degree Awarding Powers from the Privy Council, following on from a long partnership with Lancaster University to award degrees from one of the top 10 universities in the UK.
In 2017, B&FC was awarded the highest possible gold status in the government's new Teaching Excellence Framework for higher education.
Throughout its distinguished history, B&FC has maintained close ties with the community and built relationships with employers, with many qualifications co-created with industry to best meet their needs.
September 2017 saw the opening of the new Lancashire Energy HQ, the College's newest campus and a fitting achievement in its 125th year.
In 2018, B&FC was ranked in the top 3% of further education colleges in England for the fifth year running and in the top 2% of all colleges in England for school leaver success. The College is also ranked in the top three colleges in England for maths success.
B&FC is proud of its record in supporting students and celebrates its past successes while looking forward to a bright future.
| Celebrating 125 Years
Prospectuses and guides
Choose a guide to start...
School Leaver Prospectus 2020
B&FC Degree Guide September 2020
January Course Guide 2020
Get in touch with an experienced adviser
Let us help you with your enquiry and get you in contact with the right member of our team. If you are looking for information about how B&FC process your personal information please see our GDPR privacy notice
Request an email reply
Our academic standards are judged to be amongst the best in the sector. There has never been a better time to progress your career with B&FC.
Bev Robinson
Principal and Chief Executive
Explore the College
© Copyright Blackpool and The Fylde College, 2020


because it truly is brilliant!
You'll need approximately 25 bands - not the solid "middles" of your mason jar lid set.
All bands should be the same size. Band size will determine the size of your pumpkin.
Run a string through the centers of each band and then tie the ends tightly together to form a ring.
With the string hidden inside the ring, you now have a pumpkin shape.
I used a creamy white from my local hardware store.
While the paint is drying, cut some decorative paper strips for your pumpkin.
After the paint has dried completely, add the paper strips you created.
Starting in the middle of each band, hot glue one end of each paper strip to the middle of each band.
Let the opposite end of each strip hang off the pumpkin for now.
Don't fret over the glue and ends of paper showing right now - there's a step to hide that coming up.
flip your pumpkin over so the bottom is visible.
Continue the process of wrapping the paper strips around each band.
Be sure each paper strip lays flat against each band prior to securing to the bottom of the pumpkin with a dab of hot glue.
Flip your pumpkin back over so it's upright again.
until the glue/ends of paper are no longer visible from the top.
Group together some cinnamon sticks. They should be wide enough to fit snugly in the "hole" of your pumpkin.
Add a generous amount of hot glue to one end of the cluster of cinnamon sticks.
Immediately insert them into the center of your pumpkin. If necessary, add more glue to secure.
In true "party girl" fashion...I cut leaves from some brown baking/cupcake liners and secured with hot glue.
You can use any materials you have on hand: kraft paper, scrapbooking paper, burlap, fabric, etc.
I hope you're inspired to try it out.
I can see these gracing dessert tables, kitchen islands, fireplace mantles and more.
Eliminate adding paper to the pumpkin to save yourself some time.
If you have rusty bands - that's a cute look too.
Or just leave it spray painted.
or add a gold bow for a quick splash of style.
visit Simply Klassic Home...the original source of creativity for this project.
I didn't have to cut my strips of vintage paper.
It was actually recycled "filler" from a cute package I received.
I used it for the Unlock the Spirit of the Holiday Season photo shoot too.
This is by far one of my most favorite craft projects! So cute!!
I DO just love it! So darling - I haven't seen anything like it! LOVE.
P.S. Love the paper spin on your creation too. I'm a sucker for a good book print on anything.
Leslie - I'm a sucker for book print too.
I recently discovered a pumpkin made completely from book pages. Considering trying one of my own.
LOVE this, so cute! Pinning this for sure!!
Thanks so much for being here and commenting! I'm so glad you love the project. And yes, wide mouth jar lids were what I used for this project.
I made one of these with your tutorial! I love it so much! I was a little impatient and did not let my lids dry long enough so they are chipped here and there, but I figure it looks a little more aged and then I used Jute cord for my stem. It looks good, just not quite as good as yours. Thanks for the tutorial!
I am so happy to hear that Wendy!! I was impatient too with the paint and if you look close enough on mine you'll see the "chippy" vibe I've got going on! Watch for an updated version of this pumpkin coming on Thursday!
I am VERY excited to give this a try. Thanksgiving dinner is at my house this year and I'm looking for some unique decorating ideas. I LOVE this idea! Thanks!
I am SO thrilled to hear that Lori!! I hope you'll come back and let me know how it turns out.
I'm getting ready to make some more using ribbon. I'm excited to see how they turn out and hope to post them on the blog!!
This is super cute. I love the cinnamon sticks for the stem. Happy Fall!
Very cute, I love this, thanks for sharing.


Having made the fried version of these Malaysian curry puffs last month, I wondered how they would be baked rather than fried. As I pointed out in the previous post on the fried curry puffs, the dough is the same as that used for flaky char siu pastries, which are baked. I knew these could also be baked therefore, but I didn't know if they would retain the distinctive look of the spiral pastry that the fried version has. Unfortunately, the answer is no. Although you can still discern the spiral pattern if you look carefully, it is much less pronounced than in the fried version. The fried curry puffs are also more delicate than the baked version, with an incredible flakiness. On the other hand, these may be slightly better for you (or not quite as bad for you), and you can bake the whole shebang at once, rather than hassling with heating up the oil to just the right temperature and frying several at a time.
If you are looking to impress for a special occasion, I'd definitely recommend the fried version. If you want a delectable bite without too much work, try the baked puffs.
Combine flour with sugar. Cut in shortening until mixture resembles bread crumbs. Stir in ice water until the dough is moistened and just holds together when pressed. This may require a little more or a little less than 1/4 cup. Turn the dough out on a floured surface and knead just until the dough holds together as a ball. Wrap the dough in plastic wrap and then form the dough into a circular disk. Refrigerate for at least an hour.
Cut the shortening into the flour unit mixture resembles coarse meal. Wrap the dough in plastic wrap and then shape the dough into a ball. Refrigerate for at least 1 hour.
After both doughs have been refrigerated at least an hour, unwrap the the water dough and place it on a lightly floured surface. Unwrap the short dough and center it on top of the water dough. Fold the sides of the water dough over the short dough, with the edges overlapping slightly. Press the overlapping edges and both ends to seal in the short dough completely. Form into a rectangle and roll out to approximately 12 x 8 inches. Like folding a letter, fold the dough in thirds. Roll out again to a 12 x 8 inch rectangle and fold in thirds again. Now roll out to a 12-inch square. Tightly roll the square to form a cylinder with a diameter of about 1 1/2 inches. Slice into 12 equal rounds.
In a bowl, stir the curry paste into the chicken, mixing well to distribute the curry paste evenly.
Heat a frying pan over medium high heat. When the oil is hot, fry the potato until browned on all sides. Add onions and cook until softened. Stir in the chicken and enough coconut milk to keep the curry moist but not wet and cook until the chicken is done, not more than five minutes. Allow the curry to cool before filling the puffs.
Press each round of dough flat, then roll them into circles with at least a 3 1/2-inch diameter. Fill the circles with a generous tablespoon or so of filling, fold in half, and crimp the edges closed. Place the filled pastries on a parchment lined baking sheet and brush with egg wash. Bake in a preheated 375º F oven for 25-30 minutes, until golden brown. Cool on a wire rack at least 5 minutes before eating. May be served warm or at room temperature.
Baja style fish tacos are one of my favorites. They are not something I normally make as I don't really enjoy frying food all that much. Especially when cooking for two, frying is something I prefer to leave to the professionals. As I mentioned in my mini crab taco post, I did, however, agree to take part in the Alaskan sea food promotion and do some posts on fish tacos, so when there was a break in the spring rains and I could fry the fish outdoors, I got to work. I managed to get my hands on some fresh Alaskan cod fillets, had some Anchor steam beer on hand that made a wonderfully crisp and light batter, put a Mexican slant on a Vietnamese papaya salad, and I must say, these were some of the best fish tacos I've ever had. Even better, I discovered the fried fish could be refrigerated/frozen and reheated in the oven and was still as good as you get at most restaurants.
Normally, fish tacos from Ensenada are served with shredded cabbage. I thought goi du du--Vietnamese papaya salad--would be a good substitute, light and crisp with a sweet, tart dressing of nuoc cham. I added thinly sliced red onions and used cilantro rather than rau ram, which is traditionally used in the salad. The assembled taco, with slices of fried fish and avocado along with the papaya salad and a drizzle of mayo mixed with Lingham's Hot Sauce (a sweet chili sauce from Malaysia) was delicious. This is a dish that will certainly be in my summer rotation.
In a large bowl, whisk the beer into the flour, baking powder and salt. The batter will be fairly thick, similar to pancake batter.
Pour oil to the depth of several inches in a wok or some other vessel for frying. Heat the oil to 360º F. Try to maintain this temperature while frying the fish.
To make the papaya slaw, mix together the papaya, onion, carrot and cilantro and dress with the nuoc cham.
Assemble the tacos by slicing the fried fish into pieces that fit nicely in the tortilla. Add the papaya slaw and slices of avocado. Drizzle the spicy mayonnaise mixture on top. Enjoy with margaritas or beer.
As previously mentioned, I have received some gift cards to buy fish and tacos in exchange for doing some posts on fish tacos.
Sambal udang kentang is another typical Indonesian sambal that might be one of several dishes to be served with rice. This is a particularly mild sambal, as one member in our current household has a low tolerance for spicy food despite growing up in Indonesia, but it could be enlivened with some additional chilies. It may seem surprising that potatoes would be featured in an Indonesian dish, but in fact, potatoes are quite popular in the archipelago, especially in Java and Sumatra, and are included in numerous dishes.
I used larger shrimp than the dish really calls for, simply because they were on sale and I had them on hand. I actually think medium large (36--40 per pound) or even smaller are better in a sambal. Whichever size you use, you want to adjust the cooking time so as not to overcook the shrimp. I served this with sambal goreng printil and steamed rice for an easy dinner.
Heat the oil in a skillet over medium heat. Fry the potatoes until softened and cooked through. You don't want to brown them. Remove the potatoes from the oil and set aside. You can do this ahead of time and reserve the potatoes until you are ready to finish the dish and serve it.
Fry the shallots, garlic, chili, and salt in the oil until softened and fragrant. Add the shrimp and fry briefly, being careful not to overcook the shrimp. Stir in the tomatoes and potatoes and fry for two minutes more until heated through and covered with the spices. I prefer to serve and eat this hot, but it may also be eaten at room temperature (as it usually is in Indonesia).
Sambal goreng printil is a nice dish to include when you are serving a variety of Indonesian dishes for a dinner, or to serve on its own with rice. It can be made spicy or mild, a dish that can be adapted easily to different tastes. In Indonesia it would include petai--a bean that resembles the fava bean, and is infamous for its effects when eaten--instead of snow peas, but finding petai in the United States is problematic. The snow peas add a nice splash of color and your acquaintances won't be wondering if something has crawled inside you and died.
This is a relatively quick dish to prepare, taking about twenty minutes to make. Once the meatballs are formed, it requires little more than ten minutes to cook the dish. Slicing the shallots, garlic, and chilies instead of grinding them to a paste, as would normally be done in Indonesia, saves some time and provides a slightly different texture when eating this sambal.
Mix the ground beef with the salt. Form into marble-sized meatballs. Heat a wok or frying pan over medium high heat. Add three tablespoons of the oil. When oil is hot, brown the meatballs quickly; the interiors should still be rare. Drain and set aside.
Pour off the fat from browning the meatballs. Add the remaining tablespoon of oil to the pan and fry the shallots, garlic, and chilies until softened, about two minutes. Add the salam leaves, laos, petis, coconut milk, sugar, and tamarind water together with the browned meatballs. Cook for about five minutes, stirring to coat the meatballs with the liquid.
Add the snow peas and tomatoes. Cook another 3 to five minutes, stirring constantly just until snow peas are cooked. Serve immediately.
A more correct title for this post might be Vietnamese crab salad mini tacos, for that is essentially what these are. The filling is slightly adapted from goi buoi--Vietnamese pomelo and crab salad--with some avocado crema, red cabbage and sliced red onions. The shells are fried sui gow skins, an idea I got from Andrea Nguyen, who writes that she borrowed it from Trader Vic's. Check out her recipe for duck tacos, which includes a helpful video on frying the shells. This is the sort of appetizer that looks elegant and tastes delicious, but can be prepared ahead of time and assembled at the last minute. An even simpler presentation would be not to fold the skins and serve these as mini crab tostadas. However, since I'm submitting this in conjunction with a promotion of Alaskan fish tacos, I went with the taco version.
While I tend to focus more on Southeast Asian food, when the folks behind the Alaska fish taco promotion asked if I would be interested in doing some related posts, I agreed. I don't know why they contacted me. Perhaps it's because I submitted a pepes ikan taco recipe for the contest they had last year. Maybe they've done their research and know there's a photo of me holding a 12 pound Coho salmon that I caught on the Tsiu River in Alaska in the original Rumah Makan Murni in Cepu, Central Java. In any case, I like fish tacos and would love to go back to Alaska to do some fishing, so I agreed. I should point out that the folks behind the promotion also gave me some gift cards to buy some Alaskan fish and fish tacos in exchange for me doing some posts.
In a large bowl, combine the crab, carrot, pomelo, rau ram, and cilantro. Make the nuoc cham by mixing together the ingredients in a jar and shaking well to dissolve the sugar. Dress the salad lightly with several tablespoons of the nuoc cham.
Remove the flesh from the avocado. Mash it up with the lime juice, crema, garlic, and cilantro. Add salt to taste.
When you have fried all the shells, you can assemble the tacos. Rinse the sliced red onion in cold water. Place some cabbage (if using) in each shell. Then spoon in some of the crab salad. Add a little avocado crema and top with several slices of the red onion.