Master's thesis - Multi-purpose system for measuring electrical power supplied by electric sockets
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
latex-masters-thesis/analytical.tex

96 lines
7.5 KiB

\section{Requirements}
The requirements for the final device are grouped to the three categories. Mandatory requirements are bound to be met at any cost. Some of the high importance requirements can be skipped or slightly modified, if unreasonable obstacles are found. However, they are all assumed to be completed for well being of the project. Optional requirements will be completed only if possible, given the resources will allow it.
They are also divided to a hardware part and software part. Software is easier to change than hardware and requires hardware to be run on. Software is also limited by the resources provided by the hardware. Therefore, hardware needs to be logically completed first and are also highlighted in figures \ref{f:serv_node} and \ref{f:client_node}.
\subsection{Hardware requirements}
\renewcommand{\theenumi}{\Alph{enumi}}
\textbf{Mandatory:}
\begin{enumerate}
\item Measure current, voltage and phase angle simultaneously to calculate the real power and the power factor
\item More measuring devices can be added to the system by user without \gls{hw} or \gls{sw} modifications
\item Devices under test run at nominal 230 V, 50 Hz that use two-way or three-way EU plug
\item Protection against the electrical shock, fire hazard and damage caused by power surges
\end{enumerate}
\textbf{High importance:}
\begin{enumerate}[resume]
\item Store the measured data in local memory for later review
\item Completely shut the device under test off or back on
\item Indicate that the device is active (configured and working) with a \gls{led}
\item Handle maximum of 8 A currents drawn by the device under test
\end{enumerate}
\textbf{Optional:}
\begin{enumerate}[resume]
\item Store the measured data on an \gls{usb} flash disk
\item Provide \gls{hw} support for some crossed support signalisation (i.e. by sound)
\item Internet and Ethernet connection on server node
\end{enumerate}
\subsection{Software requirements}
\textbf{Mandatory:}
\begin{itemize}
\item The \gls{gui} running on the web-server
\item Add, edit (configure) and remove measurement devices to/from the system
\item Present the instantaneous (real) power consumed for each device under test
\end{itemize}
\textbf{High importance:}
\begin{itemize}
\item Graphs of all measured quantities over time
\item Authentication mechanism
\item Automatic configuration of the new connected measurement devices
\end{itemize}
\textbf{Optional:}
\begin{itemize}
\item Access to \gls{gui} outside of local network
\item Control wi-fi repeater mode to strengthen the signal for client nodes
\item Send measured data to the cloud storage
\item Separate administrator (view and change) and user (view only) privileges
\item Ability to set thresholds for measured data and notify user about crossing them via text based message
\end{itemize}
\subsection{System description}
\begin{figure}[ht!]
\centering
\includegraphics[width=.75\textwidth,angle=0]{server_node_diag}
\caption{The block diagram of a \textit{server} node of a proposed system, including hardware requirements}\label{f:serv_node}
\end{figure}
The first mandatory software requirement asks for a web server. It is entirely possible for every measurement device to contain its own web server. However, multiple points are requiring devices to work as a \textbf{system}. Two common system structures are \textit{centralised} and \textit{decentralised}.
Decentralised (peer-to-peer) systems are harder to build but are more fail-proof. Since fail-proofness is not mentioned in the requirements, centralised system might suffice.
Using centralised system means, that the measurement devices will use one separate device, from now called the \textbf{server node}, to do most of the work on the software side. The work includes, but is not limited to, receiving the measured data, storing them, hosting the web server with the \gls{gui} containing all necessary options and information, handling the \gls{usb} or communication with a \gls{cloud} and so on. The block diagram for a server node, depicting required blocks can be seen in the figure \ref{f:serv_node})
Where there are at least two nodes in a system, they have to communicate together in a particular way, known to both of them. The web server naturally operates over \gls{tcpip}. Therefore, same networking stack (the way of comunication), that is used for communication between the server node and user can be used to communicate to client nodes as well. \Gls{tcpip} hardware is ready to be used and is supporting a full-blown networking \gls{stack}, powering communication over today's networks.
\begin{figure}[ht!]
\centering
\includegraphics[width=.75\textwidth,angle=0]{client_node_diag}
\caption{The block diagram of a \textit{client} node of a proposed system, including hardware requirements}\label{f:client_node}
\end{figure}
The measurement devices, from now on called \textbf{client nodes} will consist of blocks of the remaining hardware requirements. The resulting block diagram can be seen in the figure \ref{f:client_node})
%The centralised system proposal appears to be more economical, than a decentralised system, which would require a separate copy of hardware for doing all the things for every client node, plus some clever way for communication between them.
%\item Split the device to the server (separate GL-inet router running a web-server, data processing and data storage) and to measurement nodes (electronics powered by an ESP8266 wi-fi module) to create a unique, replicable and efficient solution
%\item If reasonably accurate, use the inbuilt \gls{adc} of the ESP8266 for the voltage measurement in combination with a linear transformer (the transformer also powers the entire node)
%\item Use hall-effect sensor for a current measurement
%\item If possible, prevent the use of the external \gls{adc} as well as the use of the additional microcontroller to keep the cost down (if needed, use the microcontroller of the 8-bit AVR family produced by Atmel)
%\item Include advanced configuration options (\gls{pwm} for lighting appliances or or periodic turn on/off function)
%\item Make the web-server accessible remotely via \gls{ddsn} service
%\item Make the server automatically discover all nodes and configure them
\subsection{The TCP/IP networking protocol}
\Gls{tcpip} consists of two layers. The higher layer, \gls{tcp}, manages the assembling of a message or file into smaller packets that are transmitted over the Internet and received by a \gls{tcp} layer that reassembles the packets into the original message. The lower layer, \gls{ip}, handles the address part of each packet so that it gets to the right destination. Each gateway computer / device on the network checks this address to see where to forward the message. Even though some packets from the same message are routed differently than others, they'll be reassembled at the destination.
\Gls{tcpip} uses the client/server model of communication in which a computer user (a client) requests and is provided a service (such as sending a Web page) by another computer (a server) in the network. TCP/IP communication is primarily point-to-point, meaning each communication is from one point (or host computer) in the network to another point or host computer. TCP/IP and the higher-level applications that use it are collectively said to be \textit{stateless} because each client request is considered a new request unrelated to any previous one (unlike ordinary phone conversations that require a dedicated connection for the call duration). Being stateless frees network paths so that everyone can use them continuously.