text:
\section{Conclusion}
\label{sec:conclusion}

This manuscript proposes and analyzes a control strategy for partially observed linear-Gaussian systems which switches between an uncertified primary controller and a stabilizing albeit conservative fallback controller in pursuit of both safety and efficiency.
It is guaranteed that the LQ cost is bounded regardless of how the primary controller is chosen.
Furthermore, the extra cost caused by switching is quantified as decaying super-exponentially to zero as the threshold for triggering the switching increases.
An interesting future research topic would be to apply the proposed switching strategy as a ``plug-and-play'' modification to existing adaptive LQG algorithms for end-to-end stability and performance guarantees.

\section{Introduction}

A class of switching strategies has recently been designed to control a system by uniting a primary controller, which is potentially high-performance but uncertified, and a fallback controller, which is guaranteed to be stabilizing but typically conservative ~\citep{cdc,wintz2022global,wang2021exact}. These strategies can be illustrated by Fig.~\ref{fig:block_diagram}. It is desirable that the primary controller is applied most of the time during normal operation, but the switching strategy provides an additional layer of safeguard by falling back to a stabilizing controller on the detection of safety breach.
This can be particularly useful in the context of adaptive and data-driven control, where it is often difficult to guarantee the stability of closed-loop systems under controllers that are learned or designed using identified system models.

\begin{figure}[!htbp]
    \centering
    \input{figures/switching_block_diagram_simplified.tex}
    \caption{Illustration of the switching strategy under discussion. The blocks $\kappa_1, \kappa_0$ stand for primary and fallback controllers respectively. The switching logic chooses whether the control input determined by $\kappa_1$ or $\kappa_0$ is applied to the plant.}
    \label{fig:block_diagram}
\end{figure}

In this paper, we propose and analyze a switching control strategy for \emph{partially observed} linear systems driven by Gaussian noise following the above principle.
The aforementioned existing works make the strong assumption that the system state can be measured directly and the controllers are \emph{static} state feedback controllers.
By contrast, in the setting considered in this paper, the system state can only be inferred from noisy output, and both the primary and fallback controllers are \emph{dynamic}, i.e., they may maintain internal states. This partially observed setting complicates the analysis by introducing the interplay between system and controller states, but is crucial if the control strategy is to be deployed to real systems under limited measurement capabilities.

The proposed switching control strategy is analyzed from both stability and optimality aspects. In particular, we prove the following results:
\begin{enumerate}
    \item The LQ cost under the proposed strategy is always \emph{bounded} for \emph{any} primary controller, which implies that the proposed strategy improves the safety of the uncertified primary controller by preventing the system from being catastrophically destabilized.
    \item Provided that the primary controller is stabilizing, the additional LQ cost compared to using the primary controller alone scales as $\mathcal{O}(t^{1/4}\exp(-\text{constant}\cdot M^2))$, where the dwell time $t$ and the switching threshold $M$ are tunable parameters of the strategy. The super-exponential decay of the above quantity as the threshold $M$ increases implies the proposed strategy is efficient in the sense that the induced performance loss quickly becomes negligible as the strategy is tuned to be less conservative.
\end{enumerate}
The above theoretical results are validated by simulation on the Tennessee Eastman Process example.

\subsection*{Related works}

\paragraph*{Switched control systems}

Switching controllers known as supervisors have long been used to stabilize certain classes of nonlinear systems~\citep{hespanha1996supervision,teel1997uniting,seto1998simplex,prieur2001uniting,el2005output,battistelli2012supervisory}. Most of the above works focus on the stability of closed-loop systems, while the (near-)optimality of the controllers are less discussed.
\cite{wintz2022global} propose the idea of switching between certified and uncertified controllers to improve the control performance for nonlinear state feedback systems, but does not provide a quantitative analysis of the performance under switching.
\cite{cdc} quantify the worst-case cost and performance loss under switching for linear state feedback system, and \cite{wang2021exact} adopts a similar switching strategy for closed-loop identification and adaptive control. However, the above two works assume full observation of the state, which may be impractical.
To our knowledge, the quantitative analysis of switching controller for partially observed linear systems has not been widely studied.

\paragraph*{Adaptive control of partially observed linear systems}

The data-driven and learning-based control of partially observed linear systems, especially the adaptive Linear-Quadratic-Gaussian (LQG) problem, has drawn significant research attention in recent years, in both offline~\citep{mania2019certainty,tsiamis2020sample,zheng2021sample} and online~\citep{lale2020logarithmic,simchowitz2020improper,ziemann2022regret} settings.
These works usually provide high-probability performance bounds rather than strict convergence guarantees, partially due to the always nonzero probability of the system being destabilized by a controller learned from finite noise-corrupted data.
Since the switching control strategy proposed in the current manuscript is agnostic to how the primary controller is obtained, it may potentially serve as a ``plug-and-play'' modification to the existing adaptive LQG algorithms that enhances the safety of learned controllers.

\paragraph*{Nonlinear controller for linear systems} The study of nonlinear controllers for linear systems has mainly focused on engineering aspects such as saturating actuators. The performance of such controllers has been studied in \cite{gokcek2001lqr} using stochastic linearization, a heuristics for replacing nonlinearity with approximately equivalent gain and bias.
By contrast, in the current paper, by introducing a switching control strategy, the nonlinearity of controller is a design choice rather than a physical constraint, and rigorous performance bounds are derived without resorting to heuristics.

\subsection*{Outline}

The remainder of this manuscript is organized as follows: Section~\ref{sec:formulation} describes the problem setting and formalizes the proposed switching control strategy. The properties of the proposed strategy are derived in Section~\ref{sec:thoery}. Section~\ref{sec:simulation} verifies the theoretical results using simulation on an industrial process example. Finally, Section~\ref{sec:conclusion} summarizes the manuscript.

\subsection*{Notations}

The set of real numbers and the set of nonnegative integers are denoted by $\mathbb{R}, \mathbb{N}$ respectively.
For a matrix $M$, the transpose of $M$ is denoted by $M^\top$.
For a square matrix $M$, the spectral radius of $M$ is denoted by $\rho(M)$, and the trace of $M$ is denoted by $\tr(M)$.
For a real symmetric matrix $M$, we say $M \succ 0$ if $M$ is positive definite.
For a vector $v$, the 2-norm of $v$ is denoted by $\| v \|$, and for a matrix $M$, the induced 2-norm of $M$ is denoted by $\| M \|$.
For $P \succ 0$, the $P$-norm of a vector $v$ with the proper dimension is defined by $\| v \|_P = \| P^{1/2} v\|$, and the induced $P$-norm of a square matrix $M$ with proper dimensions is defined by $\| M \|_P = \| P^{-1/2} M P^{-1/2} \|$.
A Gaussian random vector $X$ with mean $\mu$ and covariance $\Sigma$ is denoted by $X \sim \mathcal{N}(\mu, \Sigma)$.
The probability and expectation operators are denoted by $\mathbb{P}(\cdot), \mathbb{E}(\cdot)$ respectively, and $\mathbf{1}_E$ is the indicator function of a random event $E$.
For functions $f(x),g(x)$ with nonnegative values, we say $f(x) = \mathcal{O}(g(x))$ if $\limsup_{x\to\infty} f(x)/g(x) < \infty$.

\section{Problem Formulation and Proposed Control Strategy}
\label{sec:formulation}

Consider the discrete-time Linear-Quadratic-Gaussian\\(LQG) control setting: the system is
\begin{equation}
    \begin{cases}
        x(k+1) = Ax(k) + Bu(k) + w(k), \\
        y(k) = Cx(k) + v(k),
    \end{cases}
\end{equation}
where the time index is denoted by $k\in \mathbb{N}$, the state, input and output vectors are denoted by $x(k) \in \mathbb{R}^n, u(k) \in \mathbb{R}^m, y(k) \in \mathbb{R}^p$ respectively, and the process and measurement noise vectors are denoted by $$w(k) \stackrel{\text { i.i.d. }}{\sim} \mathcal{N}(0, W), v(k) \stackrel{\text { i.i.d. }}{\sim} \mathcal{N}(0, V)$$ respectively, where $W \succ 0, V \succ 0$.
We assume w.l.o.g. that $(A, B)$ is controllable and $(A,C)$ is observable.
The performance of a controller is measured in terms of the infinite-horizon LQ cost defined as:
\begin{equation}
    J=\limsup _{T \rightarrow \infty} \frac{1}{T} \mathbb{E}\left[\sum_{k=0}^{T-1} x(k)^{\top} Q x(k) +u(k)^\top R u(k)\right],
    \label{eq:J}
\end{equation}
where $Q \succ 0, R \succ 0$ are fixed weight matrices. It is well known that a controller for the above system can be designed by combining a Luenberger observer with a feedback controller. In particular, when $K, L$ are matrices of proper dimensions such that both $A+BK$ and $A-LC$ are stable, a stabilizing controller can be specified as follows:
\begin{equation}
    \begin{cases}
        \hat{x}(k+1) = (A - LC) \hat{x}(k) + B u(k) + L y(k), \\
        u(k) = K \hat{x}(k),
    \end{cases}
    \label{eq:oracle}
\end{equation}
where $\hat{x}(k) \in \mathbb{R}^n$ is an estimate of the true state. The controller is optimal when the matrices $K, L$ are the optimal feedback gain and the Kalman gain respectively, both of which can be determined by solving discrete-time algebraic Riccati equations.

When the system model $(A, B, C, W, V)$ is unknown, however, the optimal controller cannot be computed directly. Instead, we assume the availability of the following two controllers, both specified in the general form of linear dynamic controllers:
\begin{itemize}
    \item Primary controller: \begin{equation}
        \begin{cases}
            z_1(k+1) = A_1 z_1(k) + B_1 u(k) + L_1 y(k), \\
            u_1(k) = K_1 z_1(k),
        \end{cases}
        \label{eq:primary}
    \end{equation}
    with internal state $z_1(k) \in \mathbb{R}^{n_1}$. This controller is typically learned from data, which may achieve near-optimal performance, but does not have stability guarantees.

    \item Fallback controller: \begin{equation}
        \begin{cases}
            z_0(k+1) = A_0 z_0(k) + B_{0} u(k) + L_0 y(k), \\
            u_0(k) = K_0 z_0(k),
        \end{cases}
        \label{eq:backup}
    \end{equation}
    with internal state $z_0(k) \in \mathbb{R}^{n_0}$, which is typically conservative but always guaranteed to be stabilizing. In particular, we make the following assumption:

    \begin{assum}
        The matrix
        \begin{equation}
            \mathcal{A}_0 := \begin{bmatrix}
                A & B K_0 \\
                L_0 C & A_0 + B_0 K_0
            \end{bmatrix}
            \label{eq:A0}
        \end{equation}
        is stable, and the matrix $A_0$ is also stable.
        \label{assum:A0}
    \end{assum}

    \begin{rem}
        The matrix $\mathcal{A}_0$ defined in~\eqref{eq:A0} is the system matrix of $[x^\top \; z_0^\top]^\top$, which must be stable if the controller is to stabilize both the system state and its internal state.

        Meanwhile, for the controller~\eqref{eq:oracle} designed with the known system model, it holds $A_0 = A-LC$, which is stable for a properly designed Luenberger observer. Therefore, it is reasonable to assume that $A_0$ is also stable for the fallback controller. Furthermore, whether $A_0$ is stable can be easily verified since it is a known controller parameter.
    \end{rem}

\end{itemize}

A supervisor can be deployed to select the actual input $u(k)$ from the candidate inputs $u_1(k), u_0(k)$ specified by the primary and fallback controllers respectively. Ideally, one may desire to use $u_1(k)$ as often as possible since it usually admits a better performance, but switch to $u_0(k)$ when potential safety breach is detected. Motivated by the above intuition, the proposed control strategy normally applies $u_1(k)$, while falling back to $u_0(k)$ for $t$ consecutive steps when $\left\| u_1(k) - u_0(k) \right\|$ exceeds a threshold $M$. The procedure is formally described in Algorithm~\ref{alg:main}.

\renewcommand{\algorithmicrequire}{\textbf{Input:}}
\renewcommand{\algorithmicensure}{\textbf{Initialize:}}
\begin{algorithm}[!htbp]
    \begin{algorithmic}[1]
        \Require Switching threshold $M$, dwell time $t$
        \Ensure $\xi(0) = 0, z_0(0) = 0, z_1(0) = 0$ \texttt{//$\xi(k) \in \mathbb{N}$ is an internal state of the supervisor which counts how many remaining steps to use the fallback controller}
        \For{$k = 0, 1, \ldots$}
            \State Compute $u_1(k), u_0(k)$ using~\eqref{eq:primary} and~\eqref{eq:backup}
            \If{$\xi(k) > 0$}
                \State $u(k) \gets u_0(k)$
            \Else
                \If{$ \| u_1(k) - u_0(k) \|  \geq M$}
                    \State $\xi(k) \gets t, u(k) \gets u_0(k)$
                \Else
                    \State $u(k) \gets u_1(k)$
                \EndIf
            \EndIf
            \State Apply $u(k)$ to system
            \State Update $z_1(k+1), z_0(k+1)$ using~\eqref{eq:primary} and~\eqref{eq:backup} \texttt{// Updates of both internal states use $u(k)$ instead of the respective $u_1(k), u_0(k)$}
            \State Update $\xi(k+1) \gets \max\{\xi(k) - 1, 0 \}$
        \EndFor
    \end{algorithmic}
    \caption{Proposed switching control strategy}
    \label{alg:main}
\end{algorithm}

The performance of the proposed control strategy can be evaluated in terms of: \begin{itemize}
    \item Safety: the LQ cost should be upper bounded, regardless of the choice of the primary controller;
    \item Efficiency: the increase in LQ cost caused by switching should be small when the primary controller is stabilizing.
\end{itemize}
Therefore, the next section is dedicated to analyzing the safety and efficiency of the proposed strategy.

\section{Numerical Simulation}
\label{sec:simulation}

In this section, the safety and efficiency of the proposed switching control strategy is verified by simulation on the Tennessee Eastman Process (TEP)~\citep{downs1993plant}, a classical process control system.
In particular, we consider a simplified version of TEP, also used in~\cite{liu2020online}, which has state dimension $n = 8$, input dimension $m = 4$ and output dimension $p = 10$. The LQ weight matrices are $Q = I_n, R = I_m$, and the process and measurement noise distributions are $w_k \sim \mathcal{N}(0, I_n), v_k \sim \mathcal{N}(0, I_p)$. The system is open-loop system, and therefore the fallback controller is chosen as $u_0(k) \equiv 0$.

\subsection{Destabilizing primary controller}

In this subsection, the primary controller is chosen as $(A_1, B_1, L_1, K_1) = (A-L^*C + \lambda \mathbf{1}_n \mathbf{1}_n^\top, B + \lambda \mathbf{1}_n \mathbf{1}_m^\top, L+\lambda \mathbf{1}_n \mathbf{1}_p^\top, K^* + \lambda \mathbf{1}_m \mathbf{1}_n^\top)$, where $K^*, L^*$ are the optimal feedback gain and Kalman gain respectively, and $\lambda = 0.05$, such that the matrix $\mathscr{A}_1$ is marginally unstable. The trajectories of state norms with and without switching are compared in Fig.~\ref{fig:unstable_traj_compare}. It can be observed that switching effectively prevents the state from growing unboundedly, which qualitatively verifies Theorem~\ref{thm:safety}.

\begin{figure}[!htbp]
    \begin{subfigure}{\columnwidth}
        \centering
        \input{figures/unstable_traj_compare.tex}
        \caption{Destabilizing primary controller}
        \label{fig:unstable_traj_compare}
    \end{subfigure}
    \begin{subfigure}{\columnwidth}
        \centering
        \input{figures/stable_traj_compare.tex}
        \caption{Stabilizing primary controller}
        \label{fig:stable_traj_compare}
    \end{subfigure}
    \caption{Comparison of trajectories of state norms with and without switching, under the same realization of process noise. Parameters of the switching strategy are set to be $M = 1, t = 10$.}
\end{figure}

\subsection{Stabilizing primary controller}

In this subsection, the primary controller is chosen to be the optimal controller, i.e., $(A_1, B_1, L_1, K_1) = (A - L^*C, B, L^*, K^*)$, where $K^*, L^*$ are the optimal feedback gain and Kalman gain respectively. The state norms with and without switching are compared in Fig.~\ref{fig:stable_traj_compare}, from which it can be observed that switching is activated only occasionally and has a very small effect on the trajectory.
To quantify the performance loss caused by switching and its relationship with the threshold $M$, we fix $t = 10$ and increase $M$ from $0.5$ to $3$. We evaluate the relative performance loss $(J - J_1) / J_1$ for each $M$ using the empirical average of $10^5$ trajectories, each of length $10^3$, and plot the relationship in the double-log graph shown in Fig.~\ref{fig:gap_wrt_M}. It can be observed that the performance loss decays to zero faster than exponential convergence (i.e., a straight line in the double-log plot), which verifies Theorem~\ref{thm:efficiency} and Corollary~\ref{col:superexponential}.

\begin{figure}[!htbp]
    \centering
    \input{figures/gap_wrt_M.tex}
    \caption{Double-log plot of relative performance gap against switching threshold $M$: super-exponential convergence to zero.}
    \label{fig:gap_wrt_M}
\end{figure}

\section{Theoretical Results}
\label{sec:thoery}

\subsection{Upper Bound on the LQ Cost}

By Assumption~\ref{assum:A0}, there exists $P_0 \succ 0$ which is the solution to the discrete-time Lyapunov equation
\begin{equation}
    \mathcal{A}_0^\top P_0 \mathcal{A}_0 - P_0 + \begin{bmatrix}
        Q & 0 \\
        0 & K_0^\top R K_0 + I
    \end{bmatrix} = 0,
    \label{eq:P0}
\end{equation}
and hence there exists $0 < \rho_0 < 1$ such that
\begin{equation}
    \mathcal{A}_0^\top P_0 \mathcal{A}_0 \prec \rho_0 P_0.
    \label{eq:rho0}
\end{equation}

An upper bound on the LQ cost can be derived via the following Lyapunov function:
\begin{equation}
    V_0(k) = \begin{bmatrix}
        x(k) \\
        z_0(k)
    \end{bmatrix}^\top P_0 \begin{bmatrix}
        x(k) \\
        z_0(k)
    \end{bmatrix}.
\end{equation}

\begin{lem}
    It holds for any $k$ that
    \begin{align}
        & \mathbb{E}V_0(k) \leq \frac{4(1+\rho_0)}{(1 - \rho_0)^2}\cdot \nonumber \\
        & \left(  M^2 \left\|\begin{bmatrix} B \\ B_0 \end{bmatrix} \right\|^2 \| P_0 \| + \tr \left( \begin{bmatrix}
            W & 0 \\
            0 & L_0 VL_0^\top
        \end{bmatrix} P_0 \right) \right),
    \end{align}
    where $P_0, \rho_0$ are defined in~\eqref{eq:P0} and~\eqref{eq:rho0}.
    \label{lem:V0}
\end{lem}

\begin{pf}
    From the switching strategy, it holds
    \begin{equation}
        \begin{bmatrix}
            x(k+1) \\
            z_0(k+1)
        \end{bmatrix} = \mathcal{A}_0
        \begin{bmatrix}
            x(k) \\
            z_0(k)
        \end{bmatrix} + \begin{bmatrix}
            w(k) \\
            L_0 v(k)
        \end{bmatrix} + d(k),
    \end{equation}
    where $d(k) = \mathbf{1}_{\{ u(k) = u_1(k) \}} [B^\top B_0^\top]^\top (u_1(k) - u_0(k))$ satisfies $\| d(k) \| \leq M \| [B^\top B_0^\top] \|$, and hence
    \begin{equation}
        \| d(k) \|_{P_0} \leq M \| [B^\top B_0^\top] \| \| P_0 \|^{1/2}.
    \end{equation}
    Therefore, it holds
    \begin{align}
        & V_0(k+1)  =  \left\| \begin{bmatrix}
            x(k+1) \\
            z_0(k+1)
        \end{bmatrix} \right\|_{P_0}^2 \nonumber \\
        & \leq (1+\sigma) \rho_0 V_0(k) +  \left( 1+\frac{1}{\sigma} \right)\left\| d(k) + \begin{bmatrix}
            w(k) \\
            L_0 v(k)
        \end{bmatrix} \right\|_{P_0}^2,
        \label{eq:Vk1}
    \end{align}
    where $\sigma = (\rho_0^{-1} - 1)/2$.
    Notice that
    \begin{align}
        & \mathbb{E}\left\| d(k) + \begin{bmatrix}
            w(k) \\
            L_0 v(k)
        \end{bmatrix} \right\|_{P_0}^2 \leq 2\mathbb{E} \left( \| d_k \|_{P_0}^2 + \left\| \begin{bmatrix}
            w(k) \\
            L_0 v(k)
        \end{bmatrix} \right\|_{P_0}^2 \right) \nonumber \\
        & \leq 2 \left(  M^2 \left\| \begin{bmatrix} B \\ B_0 \end{bmatrix} \right\|^2 \| P_0 \| + \tr \left( \begin{bmatrix}
            W & 0 \\
            0 & L_0 VL_0^\top
        \end{bmatrix} P_0 \right) \right).
    \end{align}
    Therefore, the conclusion follows from~\eqref{eq:Vk1} and the induction on $k$.
\end{pf}

\begin{thm}
    The LQ cost under the proposed control strategy satisfies
    \begin{align}
        & J \leq \left( \frac{8(1+\rho_0)\left\| \begin{bmatrix} B \\ B_0 \end{bmatrix} \right\|^2 \| P_0 \|}{(1 - \rho_0)^2}+ 2\| R \| \right)M^2 + \nonumber \\
        & \frac{8(1+\rho_0)\tr \left( \begin{bmatrix}
            W & 0 \\
            0 & L_0VL_0^\top
        \end{bmatrix} P_0 \right)}{(1 - \rho_0)^2},
        \label{eq:safe}
    \end{align}
    where $P_0, \rho_0$ are defined in~\eqref{eq:P0} and~\eqref{eq:rho0}.
    \label{thm:safety}
\end{thm}

\begin{pf}
    By definition of $J$, we only need to prove $\mathbb{E}(\| x(k) \|_Q^2 + \| u(k) \|_R^2)$ is not greater than the RHS of~\eqref{eq:safe} for any $k$.
    Notice that
    \begin{align}
        & \| x(k) \|_Q^2 + \| u(k) \|_R^2 \nonumber \\
        & \leq \left\| \begin{bmatrix}
            x(k) \\ z_0(k)
        \end{bmatrix} \right\|_{
            \begin{bmatrix}
                Q & 0 \\
                0 & K_0^\top R K_0 + I
            \end{bmatrix}
        }^2 + \| u(k) \|_R^2 - \| K_0 z_0(k) \|_R^2 \nonumber \\
        & \leq \left\| \begin{bmatrix}
            x(k) \\ z_0(k)
        \end{bmatrix} \right\|_{P_0}^2 + \| u(k) \|_R^2 - \| u_0(k) \|_R^2.
        \label{eq:xu}
    \end{align}
    From the switching strategy, it holds $\| u(k) - u_0(k) \| \leq M$, and hence,
    \begin{equation}
        \| u(k) \|_R \leq \| u_0(k) \|_R + M \| R \|^{1/2},
    \end{equation}
    which implies
    \begin{align}
        & \| u(k) \|_R^2 - \| u_0(k) \|_R^2 \leq 2M \| R \|^{1/2} \| u_0(k) \|_R + M^2 \| R \| \nonumber \\
        & \leq 2M \| R \|^{1/2}  \left\| \begin{bmatrix}
            x(k) \\ z_0(k)
        \end{bmatrix} \right\|_{P_0} + M^2 \| R \|.
        \label{eq:udiff}
    \end{align}
    Substituting~\eqref{eq:udiff} into~\eqref{eq:xu}, we get
    \begin{align}
        & \| x(k) \|_Q^2 + \| u(k) \|_R^2 \leq  \left( \left\| \begin{bmatrix}
            x(k) \\ z_0(k)
        \end{bmatrix} \right\|_{P_0} + M \| R \|^{1/2} \right)^2\nonumber  \\
        & \leq 2(V_0(k) + M^2 \| R \|).
    \end{align}
    The conclusion then follows from Lemma~\ref{lem:V0}.
\end{pf}

\subsection{Upper bound on performance loss caused by switching}

In this subsection, we quantify the extra LQ cost caused by the conservativeness of switching, under the following assumption on the stability of primary controller which parallels Assumption~\ref{assum:A0}:

\begin{assum}
    The matrix
    \begin{equation}
        \mathcal{A}_1 := \begin{bmatrix}
            A & B K_1 \\
            L_1 C & A_1 + B_1 K_1
        \end{bmatrix}
        \label{eq:A1}
    \end{equation}
    is stable, and the matrix $A_1$ is also stable.
    \label{assum:A1}
\end{assum}

The behavior of the closed-loop system under switching can be characterized via a common Lyapunov function. However, since both the primary and fallback controllers are \emph{dynamic}, Lyapunov function should be defined on all states of the closed-loop system, instead of the state of the open-loop system. In particular, consider the augmented system whose state $\mathscr{X}(k)$ is stacked from the state of the plant and the internal states of the two controllers, and whose noise $\mathscr{W}(k)$ is stacked from the process noise and the measurement noise magnified by $L_0$ and $L_1$ respectively: denote
\begin{equation}
    \mathscr{X}(k) = \begin{bmatrix}
        x(k) \\ z_0(k) \\ z_1(k)
    \end{bmatrix},
    \mathscr{W}(k) = \begin{bmatrix}
        w(k) \\ L_0 v(k) \\ L_1 v(k)
    \end{bmatrix},
\end{equation}
then the system matrices of $\{ \mathscr{X}(k) \}$ under the primary and fallback controllers respectively are:
\begin{equation}
    \mathscr{A}_1 := \begin{bmatrix}
        A & 0 & BK_1 \\
        L_0C & A_0 & B_1 K_1 \\
        L_1C & 0 & A_1 + B_1K_1
    \end{bmatrix},
    \label{eq:A_aug_1}
\end{equation}
and
\begin{equation}
    \mathscr{A}_0 := \begin{bmatrix}
        A & BK_0 & 0 \\
        L_0C & A_0 + B_0K_0 & 0 \\
        L_1C & B_0K_0 & A_1
    \end{bmatrix}.
    \label{eq:A_aug_0}
\end{equation}
Since $\mathscr{A}_0$ is block lower-diagonal with the diagonal blocks $\mathcal{A}_0, A_0$ being stable by Assumption~\ref{assum:A0}, the matrix $\mathscr{A}_0$ is stable. Similarly, by Assumption~\ref{assum:A1}, the matrix $\mathscr{A}_1$ is also stable.

The above defined augmented system evolves as
\begin{equation}
    \mathscr{X}(k+1) = \begin{cases}
        \mathscr{A}_1 \mathscr{X}(k) + \mathscr{W}(k) & u(k) = u_1(k), \\
        \mathscr{A}_0 \mathscr{X}(k) + \mathscr{W}(k) & u(k) = u_0(k),\\
    \end{cases}
\end{equation}
and $\mathscr{W}(k) \sim \mathcal{N}(0, \Sigma)$, where
\begin{equation}
    \Sigma :=
    \begin{bmatrix}
        W & 0 & 0 \\
        0 & L_0VL_0^\top & L_0 V L_1^\top \\
        0 & L_1 V L_0^\top & L_1 V L_1^\top
    \end{bmatrix}.
    \label{eq:Sigma}
\end{equation}

Since both $\mathscr{A}_0$ and $\mathscr{A}_1$ are stable, for sufficiently large dwell time $t$, the following inequalities hold simultaneously:
\begin{equation}
    \begin{cases}
        \mathscr{A}_1^\top P \mathscr{A}_1 < \rho P, \\
        ( \mathscr{A}_0^t)^\top P \mathscr{A}_0^t < \rho P,
    \end{cases}
    \label{eq:common_lyap}
\end{equation}
where $0 < \rho < 1$ and $P \succ 0$. Notice that $\rho, P$ that satisfy the first inequality always exist due to the stability of $\mathscr{A}_1$, and given $\rho, P$, the quantity $t$ that satisfy the second inequality exists since $\lim_{t\to\infty}( \mathscr{A}_0^t)^\top P \mathscr{A}_0^t = 0$ by the stability of $\mathscr{A}_0$.

Consider a transformed system where the $t$ consecutive steps of applying the fallback control input are combined into one step: denote $\tilde{\mathscr{X}}(j) = \mathscr{X}(i(j))$, where
\begin{equation}
    i(0) = 0, i(j+1) = \begin{cases}
        i(j) + 1 & u(i(j)) = u_1(i(j)), \\
        i(j) + t & \text{otherwise}.
    \end{cases}
\end{equation}
It follows that
\begin{equation}
    \tilde{\mathscr{X}}(j+1) = \tilde{\mathscr{A}}(j)\tilde{\mathscr{X}}(j) + \tilde{\mathscr{W}}(j),
    \label{eq:dyn_tilde}
\end{equation}
where $\tilde{\mathscr{A}}(j), \tilde{\mathscr{W}}(j)$ are defined as:
\begin{equation}
    \tilde{\mathscr{A}}(j) = \begin{cases}
        \mathscr{A}_1 & u(i(j)) = u_1(i(j)), \\
        \mathscr{A}_0^t & \text{otherwise},
    \end{cases}
    \label{eq:At}
\end{equation}
\begin{equation}
    \tilde{\mathscr{W}}(j) = \begin{cases}
        \mathscr{W}(i(j)) \mkern90mu u(i(j)) = u_1(i(j)), \\
        \sum_{\tau = 1}^{t} \mathscr{A}_0^{t - \tau}  \mathscr{W}(i(j) + \tau - 1) \quad \text{otherwise}.
    \end{cases}
    \label{eq:Wt}
\end{equation}

Under the above definitions, we can define the following common Lyapunov function motivated at the beginning of this subsection:
    \begin{equation}
    \tilde{V}(j) = \tilde{\mathscr{X}}_j^\top P \tilde{\mathscr{X}}_j.
\end{equation}
Using the above defined Lyapunov function, Lemma~\ref{lem:moment}, Lemma~\ref{lem:escape} and Theorem~\ref{thm:prop} bound the fourth moment of the state as well as the probability of switching:

\begin{lem}
    It holds for any $j$ that
    \begin{align}
        & \mathbb{E}\tilde{V}(j)^2 \leq \mathcal{Q} := \nonumber \\
        & \quad \frac{6\rho \left( \tr  ( \tilde{\Sigma} P ) \right)^2 + (1 - \rho)(N^2 + 2N) \| P \|^2 \| \tilde{\Sigma} \|^2}{(1 - \rho)(1-\rho^2)},
        \label{eq:Quad}
    \end{align}
    where
    \begin{equation}
        \tilde{\Sigma} := \sum_{\tau = 0}^\infty \mathscr{A}_0^\tau \Sigma \left(\mathscr{A}_0^\tau\right)^\top,
        N = n + n_0 + n_1,
        \label{eq:N}
    \end{equation}
    and $P, \rho$ are defined in~\eqref{eq:common_lyap}.
    \label{lem:moment}
\end{lem}

\begin{pf}
    From~\eqref{eq:common_lyap} and~\eqref{eq:dyn_tilde}, it follows that
    \begin{equation}
        \tilde{V}(j+1) \leq \rho \tilde{V}(j) + \eta(j),
        \label{eq:V_rec}
    \end{equation}
    where
    \begin{equation}
        \eta(j) = 2 \tilde{\mathscr{W}}(j) ^\top P \tilde{\mathscr{A}}(j) \tilde{\mathscr{X}}(j) + \tilde{\mathscr{W}}(j) ^\top P\tilde{\mathscr{W}}(j).
    \end{equation}
    From
    \begin{align}
        & \mathbb{E}\left[ \tilde{\mathscr{W}}(j) ^\top P \tilde{\mathscr{A}}(j) \tilde{\mathscr{X}}(j) \right] =
        0,
    \end{align}
    it follows that
    \begin{equation}
        \mathbb{E}\eta(j) = \tr \left( \mathbb{E} \left[ \tilde{\mathscr{W}}(j)\tilde{\mathscr{W}}(j)^\top \right]P \right) \leq \tr(\tilde\Sigma P),
    \end{equation}
    and hence,
    \begin{equation}
        \mathbb{E}\tilde{V}(j) \leq \tr(\tilde\Sigma P) / (1 - \rho).
        \label{eq:EVt}
    \end{equation}
    Now squaring both sides of~\eqref{eq:V_rec} and taking the expectations, we obtain
    \begin{equation}
        \mathbb{E}\tilde{V}(j+1)^2 \leq \rho^2 \mathbb{E}\tilde{V}(j)^2 + 2\rho \mathbb{E} \left[ \tilde{V}(j)\eta(j) \right] + \mathbb{E}\eta(j)^2.
        \label{eq:EVt2_rec}
    \end{equation}

    \begin{enumerate}
        \item Bound on $\mathbb{E} \left[ \tilde{V}(j)\eta(j) \right]$:
        \begin{align}
            & \mathbb{E} \left[ \tilde{V}(j)\eta(j) \right] =
            \nonumber \\
            &
            2\mathbb{E}  \left[  \underbrace{\mathbb{E}\left[\tilde{\mathscr{W}}(j) \mid \tilde{\mathscr{X}}(j)\right] ^\top}_{=0} P \tilde{\mathscr{A}}(j) \tilde{\mathscr{X}}(j) \tilde{V}(j)\right] + \nonumber \\
            & \quad \tr \left(  \mathbb{E} \tilde{V}(j)  \mathbb{E}\left[ \tilde{\mathscr{W}}(j)\tilde{\mathscr{W}}(j)^\top \right]P\right) \nonumber \\
            & = \tr(\tilde\Sigma P) \mathbb{E}\tilde{V}(j).
            \label{eq:EVeta}
        \end{align}

        \item Bound on $\mathbb{E}\eta(j)^2$:
        \begin{align}
            & \mathbb{E}\eta(j)^2
            = 4 \tr \left( \mathbb{E}\left[ \tilde{\mathscr{W}}(j)\tilde{\mathscr{W}}(j)^\top \right]P \right) \cdot \nonumber \\
            & \qquad \mathbb{E}\left[\tilde{\mathscr{X}}(j)^\top \tilde{\mathscr{A}}(j)^\top  P \tilde{\mathscr{A}}(j) \tilde{\mathscr{X}}(j)\right] + \nonumber \\
            & \quad 4\tr \left( \mathbb{E} \left[ \tilde{\mathscr{A}}(j) \tilde{\mathscr{X}}(j) \cdot \vphantom{\underbrace{\mathbb{E} \left[ \tilde{\mathscr{W}}(j)^\top P\tilde{\mathscr{W}}(j)\tilde{\mathscr{W}}(j)^\top \mid \tilde{\mathscr{A}}(j) \right]}_{=0 \text{ by symmetry}}} \right.\right. \nonumber \\
            & \qquad \left.\left. \underbrace{\mathbb{E} \left[ \tilde{\mathscr{W}}(j)^\top P\tilde{\mathscr{W}}(j)\tilde{\mathscr{W}}(j)^\top \mid \tilde{\mathscr{A}}(j) \right]}_{=0 \text{ by symmetry}} \right] \right) + \nonumber \\
            & \quad \| P \|^2 \| \tilde\Sigma \|^2 \underbrace{\mathbb{E} \nu^2}_{\text{where } \nu \sim \chi^2(N)} \nonumber \\
            & \leq 4\rho \tr(\tilde\Sigma P) \mathbb{E}\tilde{V}(j) + (N^2+2N) \| P \|^2 \| \tilde\Sigma \|^2.
            \label{eq:Eeta2}
        \end{align}
    \end{enumerate}
    Combining~\eqref{eq:EVt}, \eqref{eq:EVt2_rec}, \eqref{eq:EVeta}, \eqref{eq:Eeta2} and applying induction leads to the conclusion.
\end{pf}

\begin{lem}
    For any
    \begin{equation}
        a > a_0 := \frac{8N \| \tilde{\Sigma} \| \| P \| \| P^{-1} \|}{1 - \rho^{1/4}},
        \label{eq:a0}
    \end{equation}
    it holds for any $j$ that
    \begin{align}
        & \mathbb{P}\left( \left\| \tilde{ \mathscr{X}}(j) \right\| \geq a \right) \leq \mathcal{E}(a) := \nonumber \\
        & \quad \frac{4N}{\rho^{-1/2}-1}\exp \left( -\frac{(1 - \rho^{1/4})^2}{2N \| \tilde{\Sigma} \| \| P \| \| P^{-1} \|} a^2 \right),
        \label{eq:Escape}
    \end{align}
    where $P, \rho$ are defined in~\eqref{eq:common_lyap}, and $\tilde{\Sigma}$ and $N$ are defined in
    \eqref{eq:N}.
    \label{lem:escape}
\end{lem}

\begin{pf}
    Notice that
    \begin{equation}
        \tilde{ \mathscr{X}}(j) = \sum_{s=0}^{j-1} \left( \prod_{r=s+1}^{k-1} \tilde{\mathscr{A}}(r) \right) \tilde{\mathscr{W}}(s).
    \end{equation}
    From~\eqref{eq:common_lyap} and~\eqref{eq:At}, it follows that
    \begin{align}
        & \left\| \tilde{ \mathscr{X}}(j) \right\|_P = \left\| \sum_{s=0}^{j-1} P^{1/2} \left( \prod_{r=s+1}^{k-1} \tilde{\mathscr{A}}(r) \right) \tilde{\mathscr{W}}(s)\right\| \nonumber \\
        & \leq \left\| \sum_{s=0}^{j-1} \rho^{(j - s - 1)/2} P^{1/2}  \tilde{\mathscr{W}}(s)\right\|  \leq \sum_{s=0}^{j-1} \rho^{(j - s - 1)/2} \left\|  \tilde{\mathscr{W}}(s)\right\|_P.
    \end{align}
    By~\eqref{eq:Wt}, it holds $\tilde{\mathscr{W}}(s) \mid \mathcal{F}(s - 1) \sim \mathcal{N}(0, \Sigma(s))$, where $\mathcal{F}(s - 1)$ is the $\sigma$-algebra generated by $\tilde{\mathscr{W}}(0), \ldots, \tilde{\mathscr{W}}(s - 1)$, and
    \begin{equation}
        \Sigma(s) \in \left\{ \Sigma, \sum_{\tau = 0}^{t - 1} \mathscr{A}_0^\tau \Sigma \left(\mathscr{A}_0^\tau\right)^\top \right\};
    \end{equation}
    in either case, it holds $\Sigma(s) \preceq \tilde{\Sigma}$.
    Hence, by a concentration bound on Gaussian random vectors~\cite[Lemma 3.1]{ledoux1991probability}, it holds for any $s$ and any $a > 0$ that
    \begin{equation}
        \mathbb{P} \left( \left\|\tilde{\mathscr{W}}(s)\right\|_P \geq a \right) \leq 2n \exp \left( -\frac{(1 - \rho^{1/4})^2}{2N \| \tilde{\Sigma} \| \| P \|} a^2 \right).
    \end{equation}
    Invoking a tail bound on the exponentially weighted sum of Gaussian-like random variables~\cite[Theorem 3]{cdc} with $\varrho = \rho^{1/2}$, and assuming w.l.o.g. that $\rho \in (1/4, 1)$, it follows that
    \begin{equation}
        \mathbb{P} \left( \left\| \tilde{ \mathscr{X}}(j) \right\|_P \geq a \right) \leq \frac{4N}{\rho^{-1/2} - 1} \exp \left( -\frac{(1 - \rho^{1/4})^2}{2N \| \tilde{\Sigma} \| \| P \|} a^2 \right).
    \end{equation}
    Meanwhile, it holds
    \begin{equation}
         \left\{ \left\|\tilde{ \mathscr{X}}(j)\right\| \geq a \right\} \subseteq \left\{ \left\|\tilde{ \mathscr{X}}(j)\right\|_P \geq a \| P^{-1} \|^{1/2}\right\},
    \end{equation}
    from which the conclusion follows.
\end{pf}

\begin{thm}
    The following properties hold:
    \begin{enumerate}
        \item The fourth moment of the state of the augmented system is bounded:
        \begin{equation}
            \mathbb{E}\left\| \mathscr{X}(k) \right\|_{P_0}^4 \leq 8 \left(  \mathcal{Q} \| P_0 \|_P^2 + (N^2 + 2N)\| P_0 \|_{\tilde{\Sigma}^{-1}}^2 \right),
        \end{equation}
        where $\mathcal{Q}$ is defined in~\eqref{eq:Quad}, the matrices $P_0, P$ are defined in~\eqref{eq:P0} and~\eqref{eq:common_lyap} respectively, and $\tilde{\Sigma}$ and $N$ are defined in
        \eqref{eq:N}.
        \item Let
        \begin{equation}
            \mathcal{K} = \left\| \begin{bmatrix}
                K_0 && -K_1
            \end{bmatrix} \right\|,
        \end{equation}
        and $a_0, \mathcal{E}$ be defined in~\eqref{eq:a0},~\eqref{eq:Escape} respectively, then when the threshold $M \geq a_0 \mathcal{K}$ is large enough, the probability of not using the primary control input satisfies:
        \begin{equation}
            \mathbb{P} \left( u(k) \neq u_1(k) \right) \leq t \mathcal{E}(M / \mathcal{K}),
            \label{eq:Kdiff}
        \end{equation}
        which decays \emph{super-exponentially} w.r.t. the threshold $M$.
    \end{enumerate}
    \label{thm:prop}
\end{thm}

\begin{pf}
    The proof is devoted to translating properties of the transformed system $\{ \tilde{ \mathscr{X}}(j) \}$ (Lemma~\ref{lem:moment} and Lemma~\ref{lem:escape}) back into the properties of the original system.
    \begin{enumerate}
        \item Let $j = \sup \{ s \in \mathbb{N} \mid i(s) \leq k \}$, i.e., $\tilde{ \mathscr{X}}(j)$ is the last state in the transformed state sequence that occurs no later than $\mathscr{X}(k)$.
        Consequently,
        \begin{equation}
            \mathscr{X}(k) = \mathscr{A}_0^{k - i(j)} \tilde{ \mathscr{X}}(j) + \tilde{\mathscr{W}}_{jk},
        \end{equation}
        where $\tilde{\mathscr{W}}_{jk}$ is defined as:
        \begin{equation}
            \tilde{\mathscr{W}}_{jk} := \sum_{\tau=1}^{k - i(j)}\mathscr{A}_0^{k - i(j) - \tau} \mathscr{W}(i(j) + \tau - 1).
        \end{equation}
        From~\eqref{eq:P0}, it follows that
        \begin{align}
             \left\| \mathscr{X}(k) \right\|_{P_0} & \leq \rho_0^{(k - i(j)) / 2} \left\| \tilde{ \mathscr{X}}(j) \right\|_{P_0} + \left\| \tilde{\mathscr{W}}_{jk} \right\|_{P_0} \nonumber \\
             & \leq \left\| \tilde{ \mathscr{X}}(j) \right\|_{P_0} + \left\| \tilde{\mathscr{W}}_{jk} \right\|_{P_0}.
             \label{eq:xP0}
        \end{align}
        Hence, by applying the power means inequality $((a+b)/2)^4 \leq (a^4 + b^4) / 2$, and taking the expectations on both sides of~\eqref{eq:xP0}, we have
        \begin{equation}
            \mathbb{E}\left\| \mathscr{X}(k) \right\|_{P_0}^4 \leq 8 \left(  \mathbb{E}\left\| \tilde{ \mathscr{X}}(j) \right\|_{P_0}^4 + \mathbb{E}\left\| \tilde{\mathscr{W}}_{jk} \right\|_{P_0}^4 \right).
            \label{eq:ExP04}
        \end{equation}
        The terms in the RHS of~\eqref{eq:ExP04} can be bounded as follows:
        \begin{itemize}
            \item $\mathbb{E}\left\| \tilde{ \mathscr{X}}(j) \right\|_{P_0}^4 \leq \mathcal{Q} \| P_0 \|_P^2$, which follows from Lemma~\ref{lem:moment}.
            \item $\mathbb{E}\left\| \tilde{\mathscr{W}}_{jk} \right\|_{P_0}^4 \leq \| P_0 \|_{\tilde{\Sigma}^{-1}}^2 \mathbb{E} \left\| \tilde{\mathscr{W}}_{jk} \right\|_{\tilde{\Sigma}^{-1}}^4 \leq \| P_0 \|_{\tilde{\Sigma}^{-1}}^2 \cdot \mathbb{E}\nu^2  = (N^2 + 2N)\| P_0 \|_{\tilde{\Sigma}^{-1}}^2$, where $\nu \sim \chi^2(N)$, since $\tilde{\mathscr{W}}_{jk}$ is Gaussian distributed with zero mean and covariance no greater than $\tilde{\Sigma}$.
        \end{itemize}
        Combining the above two items leads to the conclusion.

        \item Define the index set
        \begin{equation}
            \mathcal{I} = \left\{ k \in \mathbb{N} \mid \exists j \in \mathbb{N}, \text{ s.t. } i(j) = k \right\},
        \end{equation}
        which are the indices of states $\mathscr{X}(k)$ that occur in the transformed state sequence $\{ \tilde{ \mathscr{X}}(j) \}$.
        Since a sufficient and necessary condition of $u(k) \neq u_1(k)$ is that exactly one of $\mathscr{X}(k), \mathscr{X}(k-1), \ldots, \mathscr{X}(k - t+1)$ belongs to the transformed state sequence and triggers the switching rule, it holds
        \begin{align}
            & \left\{ u(k) \neq u_1(k) \right\} \subseteq \bigcup_{\tau = 0}^{t-1} \nonumber \\
            & \quad \left\{ \| u_0(k - \tau) - u_1(k - \tau) \| \geq M, k - \tau \in \mathcal{I} \right\}.
            \label{eq:unequ1}
        \end{align}
        For each event in the RHS of~\eqref{eq:unequ1}, we have
        \begin{align}
            & \mathbb{P} \left( \| u_0(k - \tau) - u_1(k - \tau) \| \geq M, k - \tau \in \mathcal{I} \right) \nonumber \\
            &\leq \mathbb{P} \left( \| u_0(k - \tau) - u_1(k - \tau) \| \geq M| k - \tau \in \mathcal{I} \right),
        \end{align}
        and since $u_0(k) - u_1(k) = \begin{bmatrix}
            0 & K_0 & -K_1
        \end{bmatrix} \mathscr{X}(k)$ for any $k$, we have $\| u_0(k) - u_1(k) \| \leq \mathcal{K} \| \mathscr{X}(k) \|$ for any $k$, which further implies
        \begin{align}
            & \mathbb{P} \left( \| u_0(k - \tau) - u_1(k - \tau) \| \geq M, k - \tau \in \mathcal{I} \right) \nonumber \\
            & \leq  \mathbb{P} \left( \| \mathscr{X}(k - \tau) \| \geq M / \mathcal{K} \mid k - \tau \in \mathcal{I} \right).
            \label{eq:escape_udiff}
        \end{align}
        Since $\mathbb{P}\left( \left\| \tilde{\mathscr{X}}(j) \right\| \geq M / \mathcal{K} \right) \leq \mathcal{E}(M / \mathcal{K})$ for any $j$ according to Lemma~\ref{lem:escape}, and $k - \tau \in \mathcal{I}$ indicates that $\mathscr{X}(k - \tau)$ belongs to $\left\{ \tilde{\mathscr{X}}(j) \right\}$, it follows that the RHS of~\eqref{eq:escape_udiff} is not greater than $\mathcal{E}(M / \mathcal{K})$. The conclusion then follows from~\eqref{eq:unequ1} by taking the union bound over $\tau = 0,1,\ldots, t-1$.
    \end{enumerate}
\end{pf}

We are now ready to state the main theorem of this subsection:

\begin{thm}
    Let $J_1$ be the LQ cost of the primary controller.
    Assuming that the dwell time $t$ satisfies~\eqref{eq:common_lyap} and that the threshold $M \geq a_0 \mathcal{K}$ is large enough, it holds
    \begin{equation}
        J - J_1 \leq 2c_1c_2 \mathcal{G} + \left(c_2^2 + \| \Delta \|_{P_0} \right) \mathcal{G}^2,
        \label{eq:gap}
    \end{equation}
    where
    \begin{align}
        & \mathcal{G} = 2^{3/4} \left(  \mathcal{Q} \| P_0 \|_P^2 + (N^2 + 2N)\| P_0 \|_{\tilde{\Sigma}^{-1}}^2 \right)^{1/4} \cdot \nonumber \\
        & \quad (t \mathcal{E}(M / \mathcal{K}))^{1/4}, \\
        & c_1 = \left\| \mathscr{Q}_1 \right\|_P \sqrt{\tr(\Sigma P) / (1 - \rho)}, \\
        & c_2 = \left\|  \mathscr{A}_0 - \mathscr{A}_1 \right\|_{\mathscr{Q}_1+I} \left\| \mathscr{Q}_1+I \right\|_{P_0} \sum_{s=0}^{\infty}  \left\| \mathscr{A}_1^{s} \right\|_{\mathscr{Q}_1+I}, \\
        & \mathscr{Q}_1 = \begin{bmatrix}
            Q & 0 & 0 \\
            0 & 0 & 0 \\
            0 & 0 & K_1^\top R K_1
        \end{bmatrix},
        \Delta = \begin{bmatrix}
            0 & 0 & 0 \\
            0 & K_0^\top R K_0 & 0 \\
            0 & 0 & -K_1^\top R K_1
        \end{bmatrix},
    \end{align}
    and the symbols $a_0, \mathcal{K}, P_0, P, \mathcal{Q}, N, \tilde{\Sigma}, \mathcal{E}, \Sigma, \rho,  \mathscr{A}_0, \mathscr{A}_1$
    are defined the same as before in this subsection.
    \label{thm:efficiency}
\end{thm}

\begin{pf}
    Let $\check{\mathscr{X}}(0) =  \mathscr{X}(0)$ and $\check{\mathscr{X}}(k+1) = \mathscr{A}_1 \check{\mathscr{X}}(k) + \mathscr{W}(k)$, i.e., the sequence $\left\{ \check{\mathscr{X}}(k) \right\}$ is the state sequence if switching is not applied, then
    \begin{equation}
        J_1 = \lim_{T\to\infty} \frac{1}{T} \sum_{k = 0}^{T - 1} \mathbb{E} \left\|  \mathscr{Q}_1^{1/2} \check{\mathscr{X}}(k) \right\|^2.
    \end{equation}
    On the other hand, we have
    \begin{equation}
        J = \limsup_{T \to \infty} \frac{1}{T} \sum_{k=0}^{T-1} \mathbb{E} \left[ \| x(k) \|_Q^2 + \| u(k) \|_R^2 \right].
    \end{equation}
    Therefore, we only need to prove that $$\mathbb{E} \left[ \| x(k) \|_Q^2 + \| u(k) \|_R^2 -  \left\|  \mathscr{Q}_1^{1/2} \check{\mathscr{X}}(k) \right\|^2\right]$$ is no greater than the RHS of~\eqref{eq:gap} for any $k$.
    Notice that
    \begin{align}
        & \| x(k) \|_Q^2 + \| u(k) \|_R^2 -  \left\|  \mathscr{Q}_1^{1/2} \check{\mathscr{X}}(k) \right\|^2
        = \left\|  \mathscr{Q}_1^{1/2} \mathscr{X}(k) \right\|^2-
        \nonumber \\ &\quad
        \left\|  \mathscr{Q}_1^{1/2} \check{\mathscr{X}}(k) \right\|^2 +
        \left\| \Delta^{1/2} \mathscr{X}(k) \right\|^2 \mathbf{1}_{ \left\{ u(k) \neq u_1(k) \right\}}.
        \label{eq:stage_cost_diff}
    \end{align}
    Next we shall bound $ \mathbb{E} \left[\left\|  \mathscr{Q}_1^{1/2} \mathscr{X}(k) \right\|^2-  \left\|  \mathscr{Q}_1^{1/2} \check{\mathscr{X}}(k) \right\|^2 \right]$ and $ \mathbb{E}\left[\left\| \Delta^{1/2} \mathscr{X}(k) \right\|^2 \mathbf{1}_{ \left\{ u(k) \neq u_1(k) \right\}}\right]$ respectively:

    \begin{enumerate}
        \item Bounding $ \mathbb{E}\left[\left\|  \mathscr{Q}_1^{1/2} \mathscr{X}(k) \right\|^2-  \left\|  \mathscr{Q}_1^{1/2} \check{\mathscr{X}}(k) \right\|^2\right]$: Notice that
        \begin{align}
            & \mathscr{X}(k) = \mathscr{A}_1 \mathscr{X}(k - 1) + \mathscr{W}(k - 1) + \nonumber \\
            & \quad ( \mathscr{A}_0 - \mathscr{A}_1)  \mathscr{X}(k - 1) \mathbf{1}_{ \left\{ u(k) \neq u_1(k) \right\}},
        \end{align}
        and by recursively applying this expansion, we get
        \begin{align}
            & \mathscr{X}(k) = \mathscr{A}_1^k \mathscr{X}(0) + \sum_{s=0}^{k - 1}  \mathscr{A}_1^{k - s - 1} \cdot \nonumber \\
            & \quad  \left( \mathscr{W}(s) + ( \mathscr{A}_0 - \mathscr{A}_1)  \mathscr{X}(s) \mathbf{1}_{ \left\{ u(k) \neq u_1(k) \right\}} \right) \nonumber \\
            & = \check{\mathscr{X}}(k) + \sum_{s=0}^{k - 1}  \mathscr{A}_1^{k - s - 1}( \mathscr{A}_0 - \mathscr{A}_1)  \mathscr{X}(s) \mathbf{1}_{ \left\{ u(k) \neq u_1(k) \right\}}.
        \end{align}
        Hence,
        \begin{align}
            & \left\| \mathscr{Q}_1^{1/2} \mathscr{X}(k) \right\| \leq \left\| \mathscr{Q}_1^{1/2} \check{\mathscr{X}}(k) \right\| + \nonumber \\
            & \quad \left\| \sum_{s=0}^{k - 1}  \mathscr{A}_1^{k - s - 1}( \mathscr{A}_0 - \mathscr{A}_1)  \mathscr{X}(s) \mathbf{1}_{ \left\{ u(k) \neq u_1(k) \right\}} \right\|_{\mathscr{Q}_1+I} \nonumber \\
            &  \leq \left\| \mathscr{Q}_1^{1/2} \check{\mathscr{X}}(k) \right\| + \left\|  \mathscr{A}_0 - \mathscr{A}_1 \right\|_{\mathscr{Q}_1+I} \cdot \nonumber \\
            & \sum_{s=0}^{k-1}  \left\| \mathscr{A}_1^{k - s - 1} \right\|_{\mathscr{Q}_1+I} \| \mathscr{X}(s) \|_{\mathscr{Q}_1+I}\mathbf{1}_{ \left\{ u(k) \neq u_1(k) \right\}}.
        \end{align}
        From the fact that $\mathbb{E}\left(\sum_{i=1}^n X_i\right)^2 \leq\left(\sum_{i=1}^n \sqrt{\mathbb{E} X_i^2}\right)^2$ for any random variables $X_1, \ldots, X_n$, we have
        \begin{align}
             & \mathbb{E}\left\| \mathscr{Q}_1^{1/2} \mathscr{X}(k) \right\| ^2 \leq \left( \sqrt{\mathbb{E}\left\| \mathscr{Q}_1^{1/2} \check{\mathscr{X}}(k) \right\| ^2} + \right. \nonumber \\
             & \quad \left\|  \mathscr{A}_0 - \mathscr{A}_1 \right\|_{\mathscr{Q}_1+I} \left\| \mathscr{Q}_1+I \right\|_{P_0} \sum_{s=0}^{k-1}  \left\| \mathscr{A}_1^{k - s - 1} \right\|_{\mathscr{Q}_1+I} \nonumber \\
             & \quad \left. \vphantom{\sqrt{\mathbb{E}\left\| \mathscr{Q}_1^{1/2} \check{\mathscr{X}}(k) \right\| ^2}} \sqrt{\mathbb{E} \left[  \| \mathscr{X}(s) \|_{P_0}^2 \mathbf{1}_{ \left\{ u(k) \neq u_1(k) \right\}} \right]}\right)^2.
             \label{eq:EQ1X2}
        \end{align}
        By~\eqref{eq:common_lyap}, we have $\mathbb{E} \left\| \check{\mathscr{X}}(k) \right\|_P^2 \leq \tr(\Sigma P) / (1 - \rho)$,
        and hence,
        \begin{equation}
            \mathbb{E} \left\| \mathscr{Q}_1^{1/2} \check{\mathscr{X}}(k) \right\| ^ 2 \leq \frac{\tr(\Sigma P) \left\| \mathscr{Q}_1 \right\|_P^2}{1 - \rho} = c_1^2.
            \label{eq:EQ1Xc2}
        \end{equation}
        Meanwhile, by Cauchy-Schwarz inequality and Theorem~\ref{thm:prop}, it holds
        \begin{align}
            & \mathbb{E} \left[  \| \mathscr{X}(s) \|_{P_0}^2 \mathbf{1}_{ \left\{ u(k) \neq u_1(k) \right\}} \right] \leq \nonumber \\
            & \quad \sqrt{ \mathbb{E}  \| \mathscr{X}(s) \|_{P_0}^4 \mathbb{P}(u(k)\neq u_1(k))} \leq \mathcal{G}^2.
            \label{eq:Ecross}
        \end{align}
        Combining~\eqref{eq:EQ1X2}, \eqref{eq:EQ1Xc2} and~\eqref{eq:Ecross} leads to
        \begin{equation}
            \mathbb{E}\left\| \mathscr{Q}_1^{1/2} \mathscr{X}(k) \right\|^2 - \mathbb{E} \left\| \mathscr{Q}_1^{1/2} \check{\mathscr{X}}(k) \right\| ^ 2 \leq 2c_1c_2 \mathcal{G} + c_2^2 \mathcal{G}^2.
            \label{eq:stage_cost_diff_1}
        \end{equation}

        \item Bounding $ \mathbb{E}\left[\left\| \Delta^{1/2} \mathscr{X}(k) \right\|^2 \mathbf{1}_{ \left\{ u(k) \neq u_1(k) \right\}}\right]$: similarly to~\eqref{eq:Ecross}, by Cauchy-Schwarz inequality and Theorem~\ref{thm:prop}, we have
        \begin{align}
            & \mathbb{E}\left[\left\| \Delta^{1/2} \mathscr{X}(k) \right\|^2 \mathbf{1}_{ \left\{ u(k) \neq u_1(k) \right\}}\right]
            \leq \left\| \Delta \right\|_{P_0}\mathcal{G}^2.
            \label{eq:stage_cost_diff_2}
        \end{align}
    \end{enumerate}

    Substituting~\eqref{eq:stage_cost_diff_1} and~\eqref{eq:stage_cost_diff_2} into~\eqref{eq:stage_cost_diff} leads to the conclusion.
\end{pf}

The following corollary states that under proper choice of dwell time $t$, the performance loss caused by switching can decay super-exponentially as the switching threshold $M$ is enlarged:

\begin{cor}
    When the primary controller~\eqref{eq:primary} is held constant, and $M, t$ are varied, it holds
    \begin{equation}
        J - J_1 = \mathcal{O}(t^{1/4} \exp(-cM^2))
    \end{equation}
    as $M\to\infty, t\to\infty, t^{1/4} \exp(-cM^2) \to 0$, where $c = (1 - \rho^{1/4})^2 / (2N \| \tilde{\Sigma} \| \| P \| \| P^{-1} \| \mathcal{K}^2)$ is a system-dependent constant.
    \label{col:superexponential}
\end{cor}

redpajama_set_name: RedPajamaArXiv


Here is a great deal on replacement head for the Kanger Subtank. These fit the Kanger Subtank (OG), Kanger Subtank Mini, Kanger Subtank Nano, and the New Subtank Plus series. These also come with Free Shipping.


text:
INTA files Amicus Brief on (dis)similarity of non-alcoholic and alcoholic beverages
The International Trademark Association (INTA) recently filed an amicus brief before the Grand Board of Appeal (GBoA) of the European Union Intellectual Property Office (EUIPO) in a case considering the similarity of non-alcoholic and alcoholic beverages to determine likelihood of confusion.
Specifically, in Case R 964/2020-4, Euromadi Iberica, S.A./ Zorka Gerdzhikova, the GBoA is considering the similarity of goods in Class 32 (non-alcoholic beverages, including flavored carbonated beverages, waters and vitamin-enriched sparkling water, as well as beers) and goods in Class 33 (alcoholic beverages except beers, including wines, spirits, liqueurs, and alcoholic preparations for making beverages).
The case concerns an opposition to EU Trade Mark (EUTM) ZORAYA applied for in Class 32. The opposition was filed by the owner of the prior mark VIÑA ZORAYA registered in Class 33.
In its decision on March 25, 2020, the Opposition Division of the EUIPO rejected the opposition, holding that the goods falling, respectively, in Classes 32 and 33 were dissimilar. The opponent appealed and, in an interim decision, the Board of Appeal found that, over the years, there had been differing decisions by the General Court, the GBoA, and the Boards of Appeal (BoA) of the EUIPO on similarity or dissimilarity of alcoholic and non-alcoholic beverages, stating that further clarification was therefore needed.
In Case R 1720/2017-G, Iceberg, dated January 21, 2019, the GBoA ruled that "mineral water and aerated water; non-alcoholic beverages; fruit beverages and fruit juices" were dissimilar to vodka. However, in its decision on January 20, 2020, Case R 2524/2018-4, chic ÁGUA ALCALINA 9,5 PH/Chic Barcelona, the BoA found similarity between alcoholic and non-alcoholic beverages, albeit of a low degree.
The disparity of decisions reflects the varying consumer perception resulting from the changes in market realities—for instance, different strategies to market and promote drinks (notably, placement on supermarket shelves) or a convergence of alcoholic/non-alcoholic drinks in the market—and illustrates that the question about the similarity of the goods at issue remains unsettled. For this reason, the matter was referred, for the second time, to the GBoA.
In its amicus brief, INTA argues that certain considerations from earlier decisions may no longer be consistent with current market practice and the perception of the relevant public and that similarity should not be ruled out simply because of the assumption that alcoholic beverages are generally dissimilar from non-alcoholic beverages.
In addition, the Association asserts in its brief that the examination of the similarity between goods in Class 32 and those in Class 33 should take into account not only the relevant factors, such as the goods' nature, intended purpose, method of use, competitive or complementary character, and distribution channels, but also the current market practice and consumer habits with respect to the goods. The issue of whether the relevant public is generally capable of distinguishing beverages listed in Class 32 from beverages listed in Class 33 should not be relevant, the brief said.
About the International Trademark Association
The International Trademark Association is a global association of brand owners and professionals dedicated to supporting trademarks and related intellectual property (IP) to foster consumer trust, economic growth, and innovation. Members include nearly 6,500 organizations representing more than 34,350 individuals (trademark owners, professionals, and academics) from 185 countries, who benefit from the Association's global trademark resources, policy development, education and training, and international network. Founded in 1878, INTA is headquartered in New York City, with offices in Beijing, Brussels, Santiago, Singapore, and Washington, D.C., and a representative in New Delhi. For more information, visit inta.org.
| WRITE FOR OUR NEWSLETTER |
Forresters appoints Tas Quayum as chief operating officer
MaxVal and Baker McKenzie partner to extend Symphony IP management system into law firms
NFT group left out of pocket over copyright misunderstanding. Wedlake Bell comments
Sign-up to our eNewsletter
Get the latest content first
CTC Legal Media will use your information to provide weekly newsletters, updates and marketing. You can unsubscribe at anytime via the link in the footer of any email, or by contacting us at faye@ctclegalmedia.com to update you preferences. We will treat your information with respect. By clicking 'Subscribe Now' you agree that we may process your information in accordance with these terms.

redpajama_set_name: RedPajamaCommonCrawl


text:
var isGameOver = false;
var self = null;
var soapScoreNum = 0;
var flashSprite = null;
var Game = cc.Layer.extend({
    isMouseDown: false,
    world: null,
    walls:null,
    screenSize: null,
    lazyLayer: null,
    groundSize: null,
    groundArray: null,
    soapArray:null,
    soapScoreSprite:null,
    soapScoreLabel:null,
    birdbody: null,
    tubeArray: null,
    birdSize: null,
    birdSprite:null,
    birdPicName:null,
    space:null,
    init: function () {
        this._super();
        self = this;
        screenSize = cc.Director.getInstance().getWinSize();
        this.setTouchEnabled(true);

        isGameOver = false;
        soapScoreNum = 0;

        lazyLayer = cc.Layer.create();
        this.addChild(lazyLayer);

        tubeArray = Array();
        soapArray = Array();
        groundArray = Array();
        birdSize = cc.Sprite.create(s_Bird1).getContentSize();

        var bgsprite = cc.Sprite.create(s_bg);
        bgsprite.setPosition(screenSize.width / 2, screenSize.height / 2);
        lazyLayer.addChild(bgsprite, 0);

        for (var i = 0; i < 2; i++)
        {
            var groundsprite = cc.Sprite.create(s_Ground);
            groundSize = groundsprite.getContentSize();
            groundsprite.setPosition(screenSize.width / 2 + screenSize.width * i, groundSize.height / 2);
            lazyLayer.addChild(groundsprite, 100);

            var moveToA = cc.MoveTo.create(s_groundSpeed * (i + 1), cc.p(-screenSize.width / 2, groundsprite.getPositionY()));

            var Action = cc.Sequence.create
                (
                    moveToA,
                    cc.CallFunc.create(this.groundCallback, groundsprite,this)
                );
            groundsprite.runAction(Action);
            groundArray.push(groundsprite);

        }

        space = new cp.Space();

        birdPicName = s_Bird1;
        birdSprite =  this.createPhysicsSprite( cc.p(screenSize.width / 2-45, screenSize.height / 2-24) ,this);
        this.addChild( birdSprite );

        var startItem = cc.MenuItemImage.create
        (
            s_tutorial,
            s_tutorial,
            function ()
            {
                this.startGame();
                startItem.removeFromParent(true);
            },
            this
        );

        var menu = cc.Menu.create(startItem);
        menu.setPosition(0,0);
        this.addChild(menu, 1);
        startItem.setPosition(screenSize.width / 2, screenSize.height / 2);

        var soapScoreSprite = cc.Sprite.create(s_soap);
        soapScoreSprite.setPosition(screenSize.width / 10, screenSize.height / 1.1);
        lazyLayer.addChild(soapScoreSprite, 5);

        soapScoreLabel = cc.LabelTTF.create(soapScoreNum.toString(), "Arial", 30);
        soapScoreLabel.setPosition(screenSize.width / 6, screenSize.height / 1.1);
        lazyLayer.addChild(soapScoreLabel, 5);

        return true;
    },
    startGame:function()
    {
        this.initPhysics();
        this.scheduleUpdate();
        this.schedule(this.createTube, s_createTubeTime);

        this.schedule(this.changeSpriteFrame, s_sparkSpeed);
    },
    groundCallback: function (groundsprite,self)
    {
        groundsprite.setPosition(screenSize.width/2+screenSize.width-10, groundSize.height/2);

        var moveToA = cc.MoveTo.create(s_groundSpeed*2,cc.p(-screenSize.width/2,groundsprite.getPositionY()));

        var Action = cc.Sequence.create(
            moveToA,
            cc.CallFunc.create(self.groundCallback, groundsprite,self)
        );
        groundsprite.runAction(Action);
    },
    changeSpriteFrame:function()
    {
        if(birdPicName == s_Bird1)
        {
            birdPicName = s_Bird2;
        }
        else
        {
            birdPicName = s_Bird1;
        }

        var aSprite = cc.Sprite.create(birdPicName);
        birdSprite.setTexture(aSprite.getTexture());
    },
    createTube:function (dt)
    {
        var topSprite = cc.Sprite.create(s_PipeTop);
        topSprite.setAnchorPoint(1.0,1.0);
        lazyLayer.addChild(topSprite, 0);

        var bottomSprite = cc.Sprite.create(s_PipeBottom);
        bottomSprite.setAnchorPoint(1.0,0.0);
        lazyLayer.addChild(bottomSprite, 0);

        var soapSprite = cc.Sprite.create(s_soap);
        this.addChild(soapSprite,100);

        var aNum = Math.floor(Math.random()*3);

        switch(aNum)
        {
            case 0:
                topSprite.setPosition(screenSize.width, screenSize.height+screenSize.height/2);
                bottomSprite.setPosition(screenSize.width, -screenSize.height/1.5);

                soapSprite.setPosition(screenSize.width-20, screenSize.height/2);

                break;
            case 1:
                topSprite.setPosition(screenSize.width, screenSize.height+screenSize.height/1.8);
                bottomSprite.setPosition(screenSize.width, -screenSize.height/1.8);

                soapSprite.setPosition(screenSize.width-20, screenSize.height/1.8);

                break;
            case 2:
                topSprite.setPosition(screenSize.width, screenSize.height+screenSize.height/1.2);
                bottomSprite.setPosition(screenSize.width, -screenSize.height/3);
                soapSprite.setPosition(screenSize.width-20, screenSize.height/1.2);

                break;
            default:

                break;
        }

        var topMoveToA = cc.MoveTo.create(s_tubeSpeed,cc.p(0,topSprite.getPositionY()));

        var topAction = cc.Sequence.create(
            topMoveToA,
            cc.CallFunc.create(this.topCallback, topSprite)
        );
        topSprite.runAction(topAction);
        tubeArray.push(topSprite);

        var bottomMoveToA = cc.MoveTo.create(s_tubeSpeed,cc.p(0,bottomSprite.getPositionY()));
        var bottomAction = cc.Sequence.create(
            bottomMoveToA,
            cc.CallFunc.create(this.bottomCallback, bottomSprite)
        );

        bottomSprite.runAction(bottomAction);
        tubeArray.push(bottomSprite);

        var soapMoveToA = cc.MoveTo.create(s_tubeSpeed,cc.p(0,soapSprite.getPositionY()));
        var soapAction = cc.Sequence.create(
            soapMoveToA,
            cc.CallFunc.create(this.soapCallback, soapSprite)
        );

        soapSprite.runAction(soapAction);
        soapArray.push(soapSprite);

    },

    initPhysics:function()
    {
        var staticBody = space.staticBody;

        // Walls
        walls = [ new cp.SegmentShape( staticBody, cp.v(0,0), cp.v(screenSize.width,25), 0 ),				// bottom
            new cp.SegmentShape( staticBody, cp.v(0,screenSize.height+80), cp.v(screenSize.width,screenSize.height+50), 0),	// top
            new cp.SegmentShape( staticBody, cp.v(0,0), cp.v(0,screenSize.height), 0),				// left
            new cp.SegmentShape( staticBody, cp.v(screenSize.width,0), cp.v(screenSize.width,screenSize.height), 0)	// right
        ];
        for( var i=0; i < walls.length; i++ ) {
            var shape = walls[i];
            if(0 == i)
            {
                shape.setElasticity(0.0);
            }
            else
            {
                shape.setElasticity(0.0);
            }

            shape.setFriction(1);

            space.addStaticShape( shape );
        }

        // Gravity
        space.gravity = cp.v(0, -700);
    },
    createPhysicsSprite:function( pos ,self)
    {
        var body = new cp.Body(1, cp.momentForBox(1, 48, 108) );
        body.setPos( pos );
        birdbody = body;
        space.addBody( body );
        var shape = new cp.BoxShape( body, 48, 108);
        shape.setElasticity( 0.0 );
        shape.setFriction( 0.5 );
        space.addShape( shape );

        var sprite = cc.PhysicsSprite.create(s_Bird1);
        sprite.setBody( body );

        return sprite;
    },
   update:function( delta ,self)
    {
        space.step( delta );

        if(isGameOver)
        return;

        var reduceRect = 5;
         birdBox = cc.rect(birdSprite.getPosition().x-birdSize.width/2+reduceRect,birdSprite.getPosition().y-birdSize.height/2+reduceRect,birdSize.width-reduceRect,birdSize.height-reduceRect);
        for(var i =0;i<tubeArray.length;i++)
        {
            var element = tubeArray[i];
            if(cc.rectIntersectsRect(birdBox,element.getBoundingBox()))
            {

                GameOver();
            }
        }
        for(var i =0;i<soapArray.length;i++)
        {
            var element = soapArray[i];

            if(cc.rectIntersectsRect(birdBox,element.getBoundingBox()))
            {
                /*
                var moveToA = cc.MoveTo.create(1.0, cc.p(screenSize.width / 10-element.getBoundingBox().x, screenSize.height / 1.1-element.getBoundingBox().y));

                var Action = cc.Sequence.create
                (
                    moveToA,
                    cc.CallFunc.create(this.getSoapCallback, element)
                );
                element.runAction(Action);
                  */
                cc.AudioEngine.getInstance().playEffect("res/sfx_point.mp3");
                soapArray.shift();
                this.getSoapCallback(element);
                soapScoreNum++;
                soapScoreLabel.setString(soapScoreNum.toString());

            }
        }

        if(birdSprite.getPosition().y-birdSize.height/2<groundSize.height)
        {
            GameOver();
        }

    },
    topCallback:function(topSprite)
    {
        topSprite.removeFromParent(true);
        tubeArray.shift();
    },
    bottomCallback:function(bottomSprite)
    {
        bottomSprite.removeFromParent(true);
        tubeArray.shift();
    },
    soapCallback:function(soapSprite)
    {
        soapSprite.removeFromParent(true);
        soapArray.shift();
    },
    getSoapCallback:function(element)
    {
       element.removeFromParent(true);
    },
    onTouchesBegan:function (touches, event) {
        this.isMouseDown = true;
        if(isGameOver)
        return;
        cc.AudioEngine.getInstance().playEffect("res/sfx_wing.mp3")
        birdbody.applyImpulse(cp.v(0,400), cp.v(0,0));
    },
    onTouchesMoved:function (touches, event) {
        if (this.isMouseDown) {
            if (touches) {
                //this.circle.setPosition(touches[0].getLocation().x, touches[0].getLocation().y);
            }
        }
    },
    onTouchesEnded:function (touches, event) {
        this.isMouseDown = false;
    },
    onTouchesCancelled:function (touches, event) {
        console.log("onTouchesCancelled");
    }

});

var GameOver = function()
{
    //this.unscheduleAllCallbacks();

    /*
     cc.Director.getInstance().pause();//暂停场景
     cc.Director.getInstance().resume();
     */
    isGameOver =true;
    //cc.ActionManager.getInstance().pauseAllRunningActions();

    cc.AudioEngine.getInstance().playEffect("res/sfx_hit.mp3");

    flashSprite = cc.Sprite.create(s_flash);
    flashSprite.setPosition(screenSize.width / 2, screenSize.height / 2);
    self.addChild(flashSprite, 1000);
    self.schedule(flash,0.1,1,0);

    self.unschedule(self.createTube);
    self.unschedule(self.changeSpriteFrame);

    for(var i =0;i<tubeArray.length;i++)
    {
        tubeArray[i].stopAllActions();
    }
    for(var i =0;i<groundArray.length;i++)
    {
        groundArray[i].stopAllActions();
    }
    for(var i =0;i<soapArray.length;i++)
    {
        soapArray[i].stopAllActions();
    }
    //var shape = walls[0];
    //shape.setElasticity(2.0);

    var bestScore = sys.localStorage.getItem('bestScore');
    var secondScore = sys.localStorage.getItem('secondScore');
    var medalSprite;
    if(soapScoreNum>bestScore-1)
    {
        sys.localStorage.setItem('bestScore',soapScoreNum);

        medalSprite = cc.Sprite.create("res/goldMedal.png");
    }
    else if(soapScoreNum>secondScore-1 && soapScoreNum<bestScore)
    {
        sys.localStorage.setItem('secondScore',soapScoreNum);

        medalSprite = cc.Sprite.create("res/silverMedal.png");
    }
    else
    {
        medalSprite = cc.Sprite.create("res/bronzeMedal.png");
    }
    medalSprite.setPosition(screenSize.width / 3, screenSize.height / 2.4);
    self.addChild(medalSprite,10000);

    var boardSprite = cc.Sprite.create(s_scoreBoard);
    boardSprite.setPosition(screenSize.width / 2, screenSize.height / 2);
    self.addChild(boardSprite, 5);

    var gameOverSprite = cc.Sprite.create(s_gameOver);
    gameOverSprite.setPosition(screenSize.width / 2, screenSize.height / 1.2);
    self.addChild(gameOverSprite, 5);

    var newScoreLabel = cc.LabelTTF.create(soapScoreNum.toString(), "Arial", 30);
    newScoreLabel.setPosition(screenSize.width / 1.4, screenSize.height / 1.8);
    self.addChild(newScoreLabel, 5);

    var bestScore = sys.localStorage.getItem('bestScore');
    var bestScoreLabel = cc.LabelTTF.create(bestScore.toString(), "Arial", 30);
    bestScoreLabel.setPosition(screenSize.width / 1.4, screenSize.height / 2.8);
    self.addChild(bestScoreLabel, 5);

    var replayItem = cc.MenuItemImage.create
    (
        s_replayBtn1,
        s_replayBtn2,
        function ()
        {
             var nextScene = cc.Scene.create();
             var nextLayer = new GameScene;
             nextScene.addChild(nextLayer);
             cc.Director.getInstance().replaceScene(cc.TransitionSlideInT.create(0.0, nextScene));
        },
        this
    );
    //replayItem.setPosition(boardSprite.getBoundingBox().x , boardSprite.getBoundingBox().y - replayItem.getBoundingBox.height);
    replayItem.setPosition(boardSprite.getBoundingBox().x+replayItem.getBoundingBox().width/2+20  , boardSprite.getBoundingBox().y-30);
    var rankingItem = cc.MenuItemImage.create
    (
        s_ranking,
        s_ranking,
        function ()
        {

        },
        this
    );
    //rankingItem.setPosition(boardSprite.getBoundingBox().x+boardSprite.getBoundingBox().width/2 , boardSprite.getBoundingBox().y - replayItem.getBoundingBox.height);
    rankingItem.setPosition(boardSprite.getBoundingBox().x+rankingItem.getBoundingBox().width*2-20 , boardSprite.getBoundingBox().y-30);

    var menu = cc.Menu.create(replayItem,rankingItem);
    menu.setPosition(0,0);
    self.addChild(menu, 1000);
}

var flash = function(dt)
{
    flashSprite.removeFromParent(true);
}
var GameScene = cc.Scene.extend({
    onEnter:function () {
        this._super();
        var layer = new Game();
        layer.init();
        this.addChild(layer);
    }
});

redpajama_set_name: RedPajamaGithub


Home › SPITFIRE, GT6, HERALD AND VITESSE FRONT STANDARD SHOCK ABSORBER.
SPITFIRE, GT6, HERALD AND VITESSE FRONT STANDARD SHOCK ABSORBER.
RE-MANUFACTURED TO A STANDARD SPECIFICATION. SOLD INDIVIDUALLY, PLEASE ORDER 2X AND ONLY CHANGE IN PAIRS.


In late October and early November the dead seem to return and mingle among the living around Switzerland. For the more adventurous, it's a chance to visit the ossuaries of Valais.
In the Catholic parts of the country the dead are traditionally honoured on November 2, All Souls' Day. This is often confused with All Saints' Day on November 1, during which the Catholic Church honours all its saints.
Whatever their reason, many Swiss people visit cemeteries at this time of year to pay their respects to their loved ones, even though this tradition is becoming less popular. The graves are covered in flowers, usually chrysanthemums.
It is perhaps in the German-speaking part of canton Valais that the presence of the dead is the most noticeable. The region is home to 20 or so ossuaries, rooms in which the bones of the dead are placed. One of the most impressiveexternal link is the charnel house at Leuk, where no fewer than 25,000 skulls have been carefully stacked.
But other imported customs are also followed. The most famous is Halloween, but although it was very fashionable in the early 2000s, this Anglo-Saxon tradition has struggled to take root. A little less known, the Mexican Day of the Dead is also sometimes celebrated.
Together, Mexican expats and the Swiss prepare offerings to the deceased in several parts of Switzerland.


text:
VINCENT REED
Individually owned Listed Buildings
Stately Homes & Historic Properties
Original Floorboard Restoration
Reclaimed Wood Flooring
Built in Furniture
Refectory Tables
After Disaster – Can Ancient Timbers be Restored for Posterity?
Last month marked 35 years since fire gutted 7th century York Minster. Over a thousand years of history contained in a single building was devastated overnight, probably by a lightning strike: crafted stonework was discoloured and reduced to rubble by the heat; priceless stained glass windows were miraculously spared, but disfigured by 40,000 cracks; the ancient oak beams of the vaulted ceiling and roof eventually burnt out and caved in. Total cost: £2.2 million. Very next day, 260 privately grown oak trees were generously offered towards the renovation of this grand old lady of ancient buildings. Understandably, the Church authorities hesitated to use timber again, in light of the fact that the intervening centuries have thrown up a range of newer, potentially stronger construction materials. However, following arguments such as the fact that we had no idea how steel performs over so many centuries, it was decided that what was good enough to last since 637AD, was good enough to use again in 1984, albeit coated in fire retardant plaster in places. Thus four years later the restoration was complete, thanks to a big insurance pay-out, public donation, and the work of many modern stone masons, glaziers and carpenters reviving centuries-old skills and using traditional tools and materials.
It certainly received a cheer from me: the repair and renovation of architectural woodwork and joinery is my life's passion and with my early roots in antique furniture restoration, I am committed to using only authentic techniques and materials in my quest to give a feature back its beauty. It is a passion that has taken me into old castles and royal palaces, manor houses, and even remote Ethiopian monasteries. Usually, I am called in to advise on, or rectify, the results of gentle neglect; or sometimes, insensitive 'modernisation': poor finish, missing parts, damp and infestation. Clients are always thrilled at how the wood responds to treatment and reclaims the colour and glow of a good patina. However, when an historic property has suffered a fire, with resultant water damage; or serious flooding, it can be difficult for the uninitiated to imagine anything beautiful might be salvaged at all.
Last year, I was called in to assess a 17th century manor house in Norfolk, which had suffered extensive damage from a burst tank in the attic while the family were away from home. Several rooms had water damaged 17th and 18th century panelling, oak doors, wide planked floors and window frames, plus ornately carved fireplaces, with timbers that had split, cupped and bowed. I must admit to the untrained eye, it looked like a scene of total ruination – but I was able to liaise directly with the insurers and conservation officers – the house was Grade II listed – and as soon as the go ahead was granted, we labelled each piece and transported a large cargo of water saturated, historic timbers to my workshop in East Sussex.
Now, restoring oversized historic rooms full of damaged timber features off site saves the client considerable upheaval and cost. But they are going to want their home habitable again as soon as possible: so waiting half a year for the wood to dry out naturally wasn't an option. Over a period of weeks, I modified the workshop with insulation to maintain a constant temperature and developed a wood drying kiln, specially designed to take large sections of panelling or long floor timbers, which, after a little trial and error, could dry and straighten historic timbers with a water content as high as 80%, within weeks instead of months.
Dismantling features for conservation and restoration is always a journey of discovery, patches of old varnish or paint often revealing the original finish. This job revealed a fascinating history of early recycling: with sections of panelling grafted together from 16th and 17th century panels. Some of it was so thin, we had to get creative again and devise a way of backing the panels with new timbers to keep them intact, whilst maintaining the original surface patina. The real pleasure was to see all our hard work carefully fitted back into position in the manor and given a final finish, recreating their original look. With the sun streaming through reinstated window frames and warming polished oak panelling, it looked fabulous, with no sign of the damage that had been caused: yet still revealing its age and provenance. How sad that many of the old skills are dying out – a disaster needn't mean that historic features are lost to posterity or their value destroyed.
Categories: Fire and flood, Furniture, Joinery, Panelling, Period Properties Listed, Wood Panelling
Back to all press, media & blog articles
PRESS & BLOG CATEGORIES
Palaces & Historic Buildings
SEARCH PRESS & BLOG
Logosol kiln adapted to preserve the past
When it's Fine Furniture's Time to Shine
Keeping History Authentic and Alive
Discovering and dismantling a flood damaged Tudor manor house
Insight: Decoration and Styles of the 17th century
New Lease of Life for Doors of Historic Titanic Offices in Southampton
Insight: Witches Marks: Part Two
Kings Drawing Room Restoration history Period Wood Wooden Panelling Woodwork Kensington Palace Historic Royal Palaces
Office01580 472016
Mobile07815 751005
Emailinfo@vincentreed.com
Vincent Reed, Russet Farm,
Redlands Lane, Robertsbridge,
East Sussex, TN32 5NG
Sign up to our Newsletter Click here


text:
Az óriás schnauzer a schnauzerek családjának legnagyobb képviselője. Bajor paraszt- és mészároskutyáktól származik.

Története
Többféle elnevezéssel illették az évek során: orosz- és müncheni schnauzer, medveschnauzer, valamint a sörfőzdék kocsijainak nagy, durva szőrű őrzőjeként "sörös schnauzer" néven is emlegették.

A feledés homályába vész, hogy pontosan mely fajták is vettek részt a fajta "nemesítésében". A fáma német dog, uszkár, és közép schnauzerről tesz említést.

Az óriás schnauzert már 1925-ben hivatalosan elismerték szolgálati kutyaként.

Külleme
Nagy testű, zömök kutya. Feje hosszú, szeme sötétbarna. Füle lelóg vagy ritkán csonkolják. Háta egyenes, ágyéka rövid, feszes, fara vízszintes, mellkasa mély, hasa kissé felhúzott. Végtagjai oszlopszerűek, párhuzamosak. Farkát általában rövidre kurtítják, függőlegesen viseli. Szőrzete kemény, drótszerű, szálkás, sűrű, felálló. A fején bajuszt, szakállt és szemöldököt alakítanak ki. Megjelenése erős és tekintélyt parancsoló. Várható élettartam: 12-14 év.

Színe: fekete, só-bors

Marmagasság: 60–70 cm

Súly: 35–47 kg

Jelleme, alkalmazása
Temperamentumos, rámenős, ugyanakkor nyugodt és megfontolt, rettenthetetlen kutya jóindulatú karakterrel és megbízható védőösztönnel.

Lágy szívű, érzékeny, ezért sok odafigyelést és következetes irányítást igényel mindenféle keménység nélkül.

Gyerekszerető kutya, így elterjedt családi eb is manapság, ugyanakkor komoly szolgálati kutya is válhat belőle.

A ház, és a család őrzését,védését kitűnően végzi az erre irányuló kiképzés nélkül is.

Nagyszerű, ugyanakkor nem könnyen irányítható sportkutya.

Gondozása
Hipoallergén fajta, ugyanakkor szőrzetét 3-4 havonta trimmelni kell.

Jegyzetek

Források
 Óriás schnauzer a Kutya-Tár-ban
http://kutya.hu/Cikk.aspx?id=5633

Német kutyafajták
FCI II. Pinscherek, schnauzerek, molosszerek, svájci hegyi- és pásztorkutyák

redpajama_set_name: RedPajamaWikipedia


This mini was painted using Americana Scarlett Red washed with Americana Barn Red, Ceramcoat Ocean Reef Blue washed with Americana Primary Blue, and White with Ceramcoat Quaker Gray accents (for shading). The joints were done in Americana Gunmetal Metallic.
The Brigade's insignia is a variation on the Federated Suns' crest, with each RCT adding its own modifications. The Crushers' insignia shows the head of an Atlas set on a stylized version of the Brigade's crest. Per FM:Federated Suns, pages 75 and 76.


Fatal Four Way at The Ultimate Prize!
Four of the very best in New Zealand will collide at The Ultimate Prize on July 11 in a huge Fatal Four Way Match!
Travis Banks, Aaron Henry, Johnny Idol and Marcus Kool will all have their eye on victory as the winner will become the Number One Contender to the New Zealand Heavyweight Championship!
Britenay and Megan Kate clash at The Ultimate Prize!
Street Fight at The Ultimate Prize!


/PFW does nothing. It's just always high. Must of been in Oregon too long. It would be just a straight through connection to the THRU slot on the ProtoCache, and doesn't exist on the CACHE slot.
*On the Macintosh SE/30, this signal name has been referred to as PWROFF, but its function is the same on both theMacintosh IIsi and the Macintosh SE/30.
Did you try grounding the line to see what happens when it goes low? I wonder how it's implemented in the IIsi now. I'll take a look at the three available schematics and docs, maybe I can come up with something crazy.
Offhand, hacking the system shutdown command so it triggers an ADB powerdown event would sidestep the immovable /PFW signal issue. Blipping the switch in the ATX PSU circuit via that generated ADB event would mimic the KBD power key from the Mac side in place of displaying the "it's safe to power down you macintosh" dialog box.. Coupling that kluge with the Power Key event on the other side via an internal ADB signal tap comes to mind. Might need to use diodes or logic to decouple the two ADB event signals of the synthesized soft power down from the Mac dialog side and soft power up from the KBD. That would get around the lack of the "are you sure you want to power down or just restart" dialog from the KBD event. This approach isn't at all kosher, but might it be just good enough if it could be pulled off?
On the original Astec power supply, the PCB and the power switch are connected with a cable. I got the idea to desolder the connector from the old PCB and use it to make a similar plug in cable. First, solder a white (neutral) and a black (power) appropriately gauged wire to the bare leads on the FSP220. (Remember we had desoldered them from the power connector earlier, and didn't mix them up). After soldering, secure and insulate them with heat-shrink. Now take the other ends of the wire, and attach them to the that desoldered power connector, and insulate them with heat-shrink. The green (ground) wire, I was going to attach to the empty pin, but the original power connector is missing the matching terminal inside. I was going find one to order, but in the end just soldered it directly to the ground lead on the power connector.
Normally, this style of power supply is operated by soft-power. A momentary switch on the computer case issues a latch which the motherboard places on the PS-ON pin of the power supply. Our SE/30 does not have the circuitry to do this, so we need to force the power supply to be on when the switch is on. We do this by shorting the PS-ON pin (green wire) to GND (black wire). After placing the small shunt, the power supply will turn on fully as soon as the power switch is flipped on. You can secure the shunt with a dab of hot glue. Also in this picture you see the connector with red, brown, and orange wires. I left this intact for a couple of reasons which I will explain in just a bit.
Now that I have a nice terminal crimper, I wouldn't have removed the terminals from the ATX connector. I would have just lopped it off and put new terminals on the wires I needed. Then, I could have had a shorter cable going from the power supply to the analog board. It's too long for my liking, but not unwieldy .
I wouldn't make the little cable to attach the power switch to the PCB. I'd just solder the power leads directly to the switch.
I left the fan installed for a short while, but ended up clipping it completely out. Don't forget to insulate the ends of the wire after clipping it out.
I did this back in December of 2016, and I haven't had a single issue.
Superbly written and photographed, Joe! A thousand thanks for your time in doing this.
QUESTION No.1: Regarding your "bread tie" bundle of wires, you suggest cutting them off but then you say to use heat shrink and hot glue. I'm not clear on your intentions here. If you don't need wires and potentially won't ever, why not cut them off right at the PCB so there is no chance of shorting and you eliminate all of the wire entire, which means no hot glue or heat shrink would be needed on them at all. Can you explain?
QUESTION No.3: Have you used your SE/30 continuously for more than an hour and then felt the PSU (outside of the stock metal enclosure in which the new power supply is housed) to see how warm it gets relative to the stock PSU? No doubt the new one runs cooler. I'm just curious.
Answer 1: The reason I used heat-shrink and hot glue, is because the huge mass of wires make it very difficult to cut off right at the PCB, especially if the removal target is in the middle of the bundle. It's not as easy as you would think to spread wires and clip at the base with so many in such a small area. Plus, there is the vertical PCB right next to the wire bundle that makes it very difficult to fit in the nippers. I didn't want any chance for different voltage wires to be able to short together. Desoldering can work, but the underside of the PCB is a mess, and if you are not careful, you could definitely cause problems. If you are able to clip off right at the PCB, do it! Just don't leave a stub that the insulation could slip off and cause the bare wire to short against the PCB. There are many voltages in a very small space.
Answer 2: I used a "stepper drill bit" to make the hole larger and larger until the motherboard standoffs self-tapped into the holes. I did this because I didn't know the size of the standoffs I had on hand. If you purchased some, they would probably have a specification for proper hole/tap size. One of the holes I made too big by mistake, but you can use a dab of solder or epoxy to permanently attach the standoff to the casing.
Answer 3: After snipping the fan, I was a bit worried about over heating. I ran Apple Personal Diagnostics in loop mode all day long. The casing to the power supply becomes warm, but not as warm as the flyback shielding, and certainly not anywhere near hot. Coincidentally enough, I just ordered a laser thermometer because I wanted to test the temperature of a Radius Rocket on which I replaced the CPU, so if you give me a week or so, I can take comparison tests with my other SE/30 which houses a recapped Sony PSU.
1. Did you remove the fan due to the noise, or were there other considerations as to why you removed it?
2. Although this will be apparent when I take my power supply apart: I would assume the switch just switches the line? From the description above, it seems like both the line and load leads are connected to the cable that attaches to the power switch.
3. With all of the prior discussion about the importance of an isolated 12V for the Sweep, have you noticed any display issues? After doing some reading, it seems like a lot of these power supplies don't actually have separate rails so I wasn't sure if things like disk access might cause some noise. I guess the SCSI2SD is just 5V so it wouldn't matter, but I'm thinking the floppy would use 12V.
1. Yes, I removed the fan only due to noise. There is no other reason to remove it. If you are fine with noise, go ahead a leave it in. Like JDW, I absolutely hate the sound of a fan. I replaced the fans in all my compacts with a silent model as well.
2. If you look at the 2nd picture of the empty power supply case, you will see that it is a DPST switch, so both the line and load is switched.
I had previously (in that other thread that is now gone) dissected an original Sony PSU for the SE-SE/30 and found the only "isolation" between the 12V Sweep and the Drive outputs were a single diode and filter capacitor.
So if you are concerned with "Apple approved isolation", simply add a diode and a filter capacitor to the yellow/black wire. But I find it is not needed. I can only imagine power supplies have improved just a little over the past 30 years. It would be an interesting experiment to throw the scope on each and see what the differences are.
Answer 3: ...if you give me a week or so, I can take comparison tests with my other SE/30 which houses a recapped Sony PSU.
I look forward to it. Thank you!
Nice! search up tap drill size for whatever the spec might be for whatever standoff. Tap/Drill blister pack is less than ten bucks ($7?) in those sizes.
Now that I have a nice terminal crimper, I wouldn't have removed the terminals from the ATX connector.
Which terminal crimper did you choose? Did you try more than one? I'm in the market for one, but there's a dizzying array. I should probably consult with the hardware guys in the lab upstairs at work... But they have a little different focus than us hobbyist users.
Are you quoting yourself or someone else about dissecting the Sony PSU and finding just a single isolation diode on the 12V rail?
The reason I ask is that I wonder if the rail was 12V before the diode or 12V after the diode. Vf is going to cut .7V - 1.3V off of the voltage. If the rail must be 12V after the diode, that's inconvenient. If the sweep will tolerate the loss, then I see no reason not to add a diode on the wire to the sweep. Covering the amperage will be a little challenging. Was it close to 3A?
Which terminal crimper did you choose? Did you try more than one? I'm in the market for one, but there's a dizzying array.
But even if you have a terminal crimper, you would also need to buy appropriately sized terminals that would be an exact fit for the plastic connector you intend to use.
...I wonder if the rail was 12V before the diode or 12V after the diode. Vf is going to cut .7V - 1.3V off of the voltage. If the rail must be 12V after the diode, that's inconvenient. If the sweep will tolerate the loss, then I see no reason not to add a diode on the wire to the sweep. Covering the amperage will be a little challenging. Was it close to 3A?
When considering the ASTEC version of the SE/30 PSU and the 1.25A SWEEP output, there's actually more to it than a single diode. The single diode being talked about is likely D14, but as you can see below, that diode merely links the SWEEP output to the +12V 2.1A output. I've not had time to do a complete analysis of the entire circuit, but when examining the output portion, it certainly looks like high-going voltage spikes from the +12V 2.1A output are being clamped to the SWEEP line via D14.
Which terminal crimper did you choose? Did you try more than one?
I bought one just like this from ebay. I haven't yet used it enough to really give an opinion. I've crimped some small terminals for an ADB project using digikey WM14852 and WM4561CT-ND, and that's about it, but they did a very neat, professional looking, and (more importantly) well-working job.
Right, but most of the molex terminals are "universal" per se, as the ones from the FSP220 fit and locked into the old SE-SE/30 connector without issue. The same (a guess, I didn't buy one) connector can be found at digikey with WM3704-ND, which also lists compatible terminals.
"Dissecting" is definitely much to strong a word. I should also clarify it wasn't Sony, rather Astec, as referenced in the photos. While musing around looking for a modern replacement, I was curious why I couldn't just use a single 12V supply, so I started sketching out the circuit from the outputs working back to spot the differences. Keep in mind, this was on a non-working unit, so I have no voltage measurements. Anyway, this turned out to be a partial effort-- after finding the FSP220 with two 12V rails, I just went with that and never went back to complete/verify. Apologies my quickly typed sentence had such a strong inference.
When considering the ASTEC version of the SE/30 PSU and the 1.25A SWEEP output, there's actually more to it than a single diode.
Thanks for posting, I remember having a difficult time trying to find the schematics when I searched. I see the complete schematics have now been linked recently.
They're usually Molex connector housings, and once one identifies them on Digi-Key, the product page will yield links to compatible pins and mating housings. So finding the right pins is not usually a problem. Plus, all the Mini-fit Jr. housings use the same pins, and every power cable connector I've seen so far (at last the two row ones) are Molex Mini-fit Jr. line. It could be a problem for some connectors, but I haven't run into a problematical one yet. Of course, I haven't been doing much of that kind of running the last 10 years.
With regard to crimping, isn't it more trouble than it's worth? You need to buy the correct crimper tool, then buy the correct terminals, then make sure you have the means to remove the terminals from your existing connector. And if like me you live outside the US and decide to buy all that from the US, you have international shipping charges with which to contend.
Wouldn't it just be easier to cut off all the wires from a connector on your new PSU, then slip on some heat-shrink tubing on each wire, then cut off the stock SE/30 connector but leave 10cm or so of wire length dangling, then solder the appropriate wires together, then slide over the heatshirink tubing and shrink it? Wire insulation colors will be different, but Steve Jobs won't be looking, so it's okay!
Steve Jobs won't be looking, so it's okay!
Not satisfactory to my OCD impulses. Plus, with practice, crimping the pins isn't that difficult. Crimpers are (or can be) more or less universal. They have different imprints for different diameter "legs". So getting the right one isn't really an issue. It's more a matter of there being a myriad of crimping tools, with varying degrees of comfort and convenience.
I find it easier to just buy new housings rather than try to salvage old housing by removing the pins. They're not pricey.
Being outside the USA puts a different dimension on it though.
I was finally able to finish this mod. I ended up ordering two different power supplies and ended up starting with the easier one to retrofit first.
This time, I used a Seasonic SSP-250SUB. This supply serves up the right power mix and has the added benefit of being modular so that you don't have the rats nest of wires coming out of the supply, but instead a 26 pin molex connector. When I took it apart, the added benefit was that the power plug wasn't soldered in like on the other supply I bought and instead just had to be unplugged from the power board and slipped through the back of the supply on disassembly.
I took out all of the pins from the 26 pin molex connector and just re-wired back in the pins I needed. I bought a crimpling tool and some 10 pin molex plugs to match up with the SE/30's analog board plug. I ended up wiring the power switch on the SE/30 to the Power On/Ground rather than switching the power from the wall. I used brass standoffs to mount power supply PCB, similar to what was done above.
I'm not sure if there is any independance between the "two" 12V rails (There was no resistance between any of the 12V wires) but I sent +12V from the main motherboard connector to one 12V pin on the SE/30 connector and the other 12V from a 4 pin motherboard connector to the other 12V pin on the SE/30.
I tested the power supply with a couple of hard drives before placing into the Mac and then removed the hard disk molex cables from the power supply before finalizing. System booted up the first time and voltages seem rock solid when tested through the floppy port (whether hard disk / floppy etc. are being accessed). I still need to recap the analog board. The system is brighter than it was (still not as bring as it should be) and there is some ghosting of the images where there are window title bars or when menus are pulled down.
Excellent work @superjer2000! That power supply looks 1000x easier to shoehorn into the SE case than the one I used. Very well done.
Most excellent! That vented side panel is pretty interesting, mine (SE/30 & SE) have solid side panels thermal pasted atop the heatsinks in the PSU. Who made that particular PSU and are they common?
Interesting. The Seasonic is an "industrial" power supply. Specs are clearly more than adequate in terms of current capability which makes me wonder about that cause of the ghosting. I assume you did not have any ghosting with your old power supply?
joethezombie, do you have any ghosting with your new power supply?
I did have ghosting before. Based on some research I did I think it's the CRT. I did this mod on this SE/30 rather than my good SE/30 with a perfect screen just in case it started on fire. The screen is brighter than before though.
It's an Astec. My other SE/30 to be worked on next is a Sony PSU.
OK, I am in. I just ordered one of these from NewEgg.com for just under $50 shipped to deal with my leaky PSU. It will arrive early next week and this should be a fun project.
Does anyone have a diagram that maps the colored wires from the original PSU to their needed voltages?