\documentclass[12pt,a4paper]{article}

\usepackage{amstext}
\usepackage{graphicx}
\usepackage{amssymb}
\usepackage{amsmath}
\usepackage{stmaryrd}
\usepackage{enumerate}
\usepackage{alltt}
\usepackage[latin1]{inputenc}
\usepackage{cancel}
\usepackage{fancyhdr}
\usepackage{listings}
%\usepackage{gastex}
\usepackage{pstricks}
\usepackage{pst-node}
%\usepackage{ngerman}

\title{\textsc{Embedded Systems \\ \large Assignment 6}}
\author{\shortstack[c]{Jan Hendrik Dithmar\\ \scriptsize 2031259} \and \shortstack[c]{Pascal Gwosdek\\ \scriptsize 2505221}}
\date{}

\pagestyle{fancy}

\lhead{Assignment 6}
\chead{}
\rhead{Dithmar (2031259), Gwosdek (2505221)}
\lfoot{Embedded Systems}
\cfoot{Page \thepage}
\rfoot{SS 2007}

\begin{document}

\renewcommand{\headrulewidth}{0.4pt}
\renewcommand{\footrulewidth}{0.4pt}

\newcommand{\exercise}[1]{\subsection{#1}}
\renewcommand{\theenumi}{\textbf{\alph{enumi}}}

\newcommand{\AND}{\ensuremath{\wedge}}
\newcommand{\OR}{\ensuremath{\vee}}
\newcommand{\SetR}{\ensuremath{\mathbb{R}}}
\newcommand{\SetN}{\ensuremath{\mathbb{N}}}
\newcommand{\SetC}{\ensuremath{\mathbb{C}}}
\newcommand{\SetZ}{\ensuremath{\mathbb{Z}}}
\newcommand{\SetQ}{\ensuremath{\mathbb{Q}}}
\newcommand{\SetB}{\ensuremath{\mathbb{B}}}
\newcommand{\QED}{\ensuremath{\hspace*{\fill}\square}}
\newcommand{\FLASH}{\ensuremath{\hspace*{\fill}\lightning}}
\newcommand{\OnotO}{\ensuremath{\mathcal{O}}}
\newcommand{\bild}[2]{
	\begin{figure}[htpb]
		\centering
			\includegraphics[#1]{#2}\\[0.2cm]
	\end{figure}
	}

\newcommand{\m}[1]{\begin{pmatrix}#1\end{pmatrix}}
\newcommand{\+}{\phantom{-}}
\newcommand{\f}{\frac}

\maketitle

\thispagestyle{empty}

\newpage
\setcounter{page}{1}
\setcounter{section}{6}

\exercise{Reliability}
\begin{enumerate}
\item Let $R(t) = e^{-\lambda t^\alpha}$, $\alpha > 1$. \\
With this, we can calculate the first derivative of $R(t)$:
$$R'(t) = \left(e^{-\lambda t^\alpha}\right) \cdot \left(-\lambda \cdot \alpha \cdot t^{\alpha-1}\right)$$
Having this, the calculation of the failure rate $r(t)$ is easy:
\begin{eqnarray*}
r(t) & = & \frac{-R'(t)}{R(t)} \\
& = & \frac{-\left(e^{-\lambda t^\alpha}\right) \cdot \left(-\lambda \cdot \alpha \cdot t^{\alpha-1}\right)}{e^{-\lambda t^\alpha}} \\
& = & \alpha \cdot \lambda \cdot t^{\alpha-1} \quad \mbox{for } \alpha > 1
\end{eqnarray*}
\item The system should function at least for one year, so \\ $t = 1a = 24 \cdot 365 \; hour$.
\begin{eqnarray*}
R(1a) & = & e^{-\lambda t} \\
& = & e^{-10^{-6} \frac{1}{hour} \cdot 24 \cdot 365 \; hour} \\
& = & e^{-10^{-6} \cdot 24 \cdot 365} \\
& = & 0.99128
\end{eqnarray*}
\item
\begin{eqnarray*}
R(1a) & = & e^{-\lambda t^\alpha} \\
& = & e^{-5 \cdot 10^{-6} \frac{1}{hour^2} \cdot (24 \cdot 365 \; hour)^2} \\
& = & e^{-5 \cdot 10^{-6} \cdot 8760^2} \\
& = & 0
\end{eqnarray*}
\end{enumerate}

\newpage
\exercise{Reliability Analysis}
\begin{enumerate}
\item
\begin{itemize}
\item $R_P = 1 - \prod_{i=5}^7 (1 - R_i) = (1 - (1-0.7)^3) = 0.973$
\begin{center}
\includegraphics[width=0.65\textwidth]{problem2a1.eps}
\end{center}
\item $R_S = 0.9 \cdot 0.973 = 0.8757$
\begin{center}
\includegraphics[width=0.5\textwidth]{problem2a2.eps}
\end{center}
\item $R_P = 1 - ((1-0.8757) \cdot (1-0.8)) = 0.97514$
\begin{center}
\includegraphics[width=0.5\textwidth]{problem2a3.eps}
\end{center}
\item $R_S = 0.95 \cdot 0.97514 = 0.926383$
\begin{center}
\includegraphics[width=0.35\textwidth]{problem2a4.eps}
\end{center}
\item $R_P = 1-((1-0.926383) \cdot (1-0.85)) = 0.988957$
\begin{center}
\includegraphics[width=0.3\textwidth]{problem2a5.eps}
\end{center}
\end{itemize}
\item Minimal Cut Sets: $$\{1,4\}, \{2,3,4\}, \{3,4,5,6,7\}$$
\item Using the given formula, we're getting:
\begin{eqnarray*}
R(t) & > & 1 - \big((1-R_1(t)) \cdot (1-R_4(t)) + (1-R_2(t)) \cdot (1-R_3(t)) \cdot (1-R_4(t)) \\
& & \quad \quad + (1-R_3(t)) \cdot (1-R_4(t)) \cdot (1-R_5(t)) \cdot (1-R_6(t)) \cdot (1-R_7(t))\big) \\
R(t) & > & 1 - \big((1-0.95) \cdot (1-0.85) + (1-0.9) \cdot (1-0.8) \cdot (1-0.85) \\
& & \quad \quad + (1-0.8) \cdot (1-0.85) \cdot (1-0.7) \cdot (1-0.7) \cdot (1-0.7)\big) \\
R(t) & > & 1 - (0.05 \cdot 0.15 + 0.1 \cdot 0.2 \cdot 0.15 + 0.2 \cdot 0.15 \cdot 0.3^3) \\
R(t) & > & 1 - 0.0075 - 0.003 - 0.00081 \\
R(t) & > & 0.98869
\end{eqnarray*}
The exact bound computed in part (a) was $R(t) = 0.988957 > 0.98869$. The result of the approximation (lower bound) is very close to the actual value. Furthermore the actual reliability $R(t)$ is greater than the result of the approximation, which means that the approximation is indeed a lower bound.
\end{enumerate}

\newpage
\exercise{Static Redundancy}
\begin{enumerate}
\item
\begin{itemize}
\item Let's consider the voter first. It is said that the voter is absolutely reliable, which results in the reliability $R_v = 1$.
\item For the whole system, there are two main cases:
\begin{enumerate}[1.]
\item all the modules work well: $R^3(t)$
\item one of the modules doesn't work (with three permutations): $3 \cdot R^2(t) \cdot (1-R(t))$
\end{enumerate}
\end{itemize}
Let's put all the things together:
\begin{eqnarray*}
R_{TMR}(t) &=& R_v \cdot (R^3(t) + 3 \cdot R^2(t) \cdot (1-R(t)) \\
&\stackrel{R_v=1}{=}& R^3(t) + 3 \cdot (R^2(t) - R^3(t)) \\
&=& 3R^2(t) - 2R^3(t)
\end{eqnarray*}
\item To get a concrete example where the reliability of the TMR-arrangement is not higher than that of single module, we do some calculation in form of a comparation:
\begin{eqnarray*}
3R^2(t) - 2R^3(t) & > & R(t) \\
-2R^3(t) + 3R^2(t) - R(t) & > & 0 \\
-2R(t) \cdot \left(R^2(t) - \frac{3}{2}R(t) + \frac{1}{2}\right) & > & 0 \\
\stackrel{R(t) > 0}{\Longrightarrow} R^2(t) - \frac{3}{2}R(t) + \frac{1}{2} & > & 0 \\
R^2(t) - \frac{3}{2}R(t) + \frac{9}{16} & > & \frac{1}{16} \\
\left(R(t) - \frac{3}{4}\right)^2 & > & \frac{1}{16} \\
\left|R(t) - \frac{3}{4}\right| & > & \frac{1}{4} \\
R(t) - \frac{3}{4} > \frac{1}{4} & \OR & R(t) - \frac{3}{4} < - \frac{1}{4} \\
R(t) > 1 & \OR & R(t) < \frac{1}{2}
\end{eqnarray*}
Since $R(t) > 1$ makes no sense for a reliability, the calculation gives us, that if the reliability $R(t) < \frac{1}{2}$, the reliability of the TMR-arrangement is not higher than that of a single module. To finally state a concrete example (as expected) we choose
$$R(t) = \frac{1}{8}$$
\item Let $R(t) = e^{-\lambda t}$ and let $\lambda$ be constant. Let's calculate $R_{TMR}(t)$:
\begin{eqnarray*}
R_{TMR}(t) & = & 3 \cdot \left(e^{-\lambda t}\right)^2 - 2 \cdot \left(e^{-\lambda t}\right)^3 \\
& = & 3 \cdot e^{-2\lambda t} - 2 \cdot e^{-3\lambda t} \\
& = & e^{-2\lambda t} \left(3 - 2 \cdot e^{-\lambda t}\right)
\end{eqnarray*}
Now we want to have a look at the time $t$ where the deployment of the TMR versus one single module is no more justified.
\begin{eqnarray*}
R_{TMR}(t) & = & R(t) \\
e^{-2\lambda t} \cdot \left(3 - 2 \cdot e^{-\lambda t}\right) & = & e^{-\lambda t} \\
3 - 2 \cdot e^{-\lambda t} & = & e^{\lambda t} \\
3 & = & e^{\lambda t} + 2 \cdot e^{-\lambda t} \\
3 \cdot e^{\lambda t} & = & \left(e^{\lambda t}\right)^2 + 2 \\
\mbox{Substitution: } z = e^{\lambda t} \\
3z & = & z^2 + 2 \\
z^2 - 3z + 2 & = & 0 \\
z^2 - 3z + \frac{9}{4} & = & \frac{1}{4} \\
\left(z - \frac{3}{2}\right)^2 & = & \frac{1}{4} \\
\left|z - \frac{3}{2}\right| & = & \frac{1}{2} \\
z - \frac{3}{2} = \frac{1}{2} & \OR & z - \frac{3}{2} = - \frac{1}{2} \\
z = 2 & \OR & z = 1 \\
\mbox{Substituting back:} \\
e^{\lambda t} = 2 & \OR & e^{\lambda t} = 1 \\
\lambda t = \ln(2) & \OR & \underbrace{\lambda t = \ln(1)}_{\Rightarrow t = 0} \; (*) \\[0.3cm]
\lambda t & = & \ln(2) \\
\Rightarrow t & = & \frac{\ln(2)}{\lambda}
\end{eqnarray*}
Since $t=0$ in the case $(*)$ doesn't make sense, we only used the other result.
\item Because we think that there is an ambiguity in the text of this part, we offer multiple solutions:
\begin{itemize}
\item $R_{TMR'}(t) = R^3(t)$. This is due to the fact that if one module per line fails, the whole line cannot be used. Furthermore, another line is also useless because each module is located in two parallel computations. \\
\item Obviously, we have a parallel arrangement. In each of the parallel lines we have two serial blocks. For the two serial blocks, we get: $R_1(t) \cdot R_2(t)$ for the first line, $R_1(t) \cdot R_3(t)$ for the second line and $R_2(t) \cdot R_3(t)$ for the third line. For the parallel arrangement, this means that:
\begin{eqnarray*}
R_P & = & 1 - ((1 - R_1(t) \cdot R_2(t)) \cdot (1 - R_1(t) \cdot R_3(t)) \cdot (1 - R_2(t) \cdot R_3(t))) \\
& = & 1 - ((1 - R_1(t)R_2(t) - R_1(t)R_3(t) + R_1^2(t)R_2(t)R_3(t)) \cdot (1 - R_2(t)R_3(t))) \\
& = & 1 - (1 - R_1(t)R_2(t) - R_1(t)R_3(t) + R_1^2(t)R_2(t)R_3(t) - R_2(t)R_3(t) \\
& & \quad \quad + R_1(t)R_2^2(t)R_3(t) + R_1(t)R_2(t)R_3^2(t) - R_1^2(t)R_2^2(t)R_3^2(t)) \\
& = & R_1(t)R_2(t) + R_1(t)R_3(t) - R_1^2(t)R_2(t)R_3(t) + R_2(t)R_3(t) \\
& & \quad \quad - R_1(t)R_2^2(t)R_3(t) - R_1(t)R_2(t)R_3^2(t) + R_1^2(t)R_2^2(t)R_3^2(t))
\end{eqnarray*}
\item If we furthermore assume that the reliability of $R_1(t)$, $R_2(t)$ and $R_3(t)$ are equal, i.e. $R_1(t) = R_2(t) = R_3(t) = R(t)$, we yield
\begin{eqnarray*}
R_P & = & R^2(t) + R^2(t) - R^4(t) + R^2(t) - R^4(t) - R^4(t) + R^6(t) \\
& = & R^6(t) - 3R^4(t) + 3R^2(t)
\end{eqnarray*}
\end{itemize}
%\item Obviously, we have a parallel arrangement. In each of the parallel lines we have two serial blocks. For the two serial blocks of each line, we get a reliability of $R^2(t)$. Now we have to look at the parallel arrangement which consists of three parallel blocks; each block has a reliability of $R^2(t)$:
%\begin{eqnarray*}
%R_P & = & 1 - ((1-R^2(t))^3) \\
%& = & 1 - (1 - 2R^2(t) + R^4(t) - R^2(t) + 2R^4(t) - R^6(t)) \\
%& = & 1 - (1 - 3R^2(t) + 3R^4(t) - R^6(t)) \\
%& = & 1 - 1 + 3R^2(t) - 3R^4(t) + R^6(t) \\
%& = & R^6(t) - 3R^4(t) + 3R^2(t)
%\end{eqnarray*}
%For the $R_{TMR'}(t)$ we have to consider the voter which has a reliability of $R_v = 1$. So now, we can state the value for the $R_{TMR'}(t)$:
%$$R_{TMR'}(t) = R_v \cdot R_P = 1 \cdot R_P = R^6(t) - 3R^4(t) + 3R^2(t)$$
%It is obvious that this equation differs from the given equation in Problem 3a. This is due to the fact that we have for each parallel line in the TMR in Figure 3 two serial blocks. This results in a reliability of $R^2(t) = R(t) \cdot R(t)$ for each line instead of $R(t)$ like in Problem 3a.
\end{enumerate}

\end{document}
