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.

373 lines
30KB

  1. %&tex
  2. \chapter{Design Plan}
  3. \label{chap:analysis}
  4. The goal of this chapter is to define a concrete design plan that is used in the case study.
  5. All of the steps in the design plan must be specific such that each of these steps can be evaluated after the case study is finished.
  6. The previous chapter introduced how two design methods are combined to form the basis of the design plan.
  7. The design plan consists of two parts:
  8. The first part is the Preliminary System Design and contains the linear set of steps from problem description to feature definition.
  9. The second part is the Development Cycle, which contains the features selection, variable-detail approach and rapid development cycle.
  10. \section{Preliminary Phase}
  11. The goal of the preliminary design phase is to create a set of features for the design solution.
  12. Although these design steps in \ac{se} play a crucial roll in the success of the development, they are, however, very exhaustive.
  13. A major part of this complete design process is the required documentation to ensure agreement about the design between the different stakeholders.
  14. Resulting in a process that can take months or even years, which is not feasible for this thesis.
  15. In this thesis, this design plan is only used for evaluation and has only one stakeholder, the author.
  16. This allows for a simple implementation of the \ac{se} approach, as it not possible to create a false start due to misunderstanding, saving valuable time.
  17. The first three steps of the preliminary phase are based on the \ac{se} approach by \textcite{blanchard_systems_2014}.
  18. As the evaluation of \ac{se} is not in the scope of this thesis, this chapter only covers the minimal description of the design steps in \ac{se}.
  19. These three steps deliver requirements and an initial design.
  20. The last two steps define the set of features and tests based on these deliverables.
  21. \subsection{Problem Description}
  22. Before any design process can start, the "problem" has to be described.
  23. In other words, why is the function of the system needed?
  24. This is described in a \emph{statement of the problem}.
  25. In this statement of the problem it is important to describe "what" has to be solved, not directly "how".
  26. \textcite{blanchard_systems_2014} also note that "defining the problem is often the most difficult part of the process".
  27. It is important to ensure good communication and understanding between the different stakeholders.
  28. Otherwise, it is possible that the designed product is not up to the customers expectations.
  29. It furthermore involves defining the subjects like what are the primary and secondary functions? When must this be accomplished? What is not a function?
  30. For this thesis, however, the problem definition is limited to a short statement of the problem, covering some required functions with corresponding requirements.
  31. \subsection{System Requirements}
  32. The system requirements are derived from the problem definition, and describe the characteristics of the system.
  33. As these characteristics form the foundation of the system, the requirements must be defined without any ambiguity, vagueness or complexity.
  34. The requirements are written according to the \ac{ears} \autocite{mavin_easy_2009}.
  35. \ac{ears} was chosen for this design method due to its simplicity, which fits the scope of this thesis.
  36. Later in the design, these requirements are distributed over the subsystems.
  37. Any issues, like ambiguity, in the requirements, propagate through these subsystems.
  38. This might lead to a redesign of multiple sub-systems when these requirements have to be updated.
  39. \subsection{Initial Design}
  40. \label{sec:se_initial_design}
  41. In the initial design step, the "what has to be solved", is expanded with a solution on "how it is solved".
  42. To find the best solution it is important to explore the different solutions and design space.
  43. Often, there are many possible alternatives but they must be narrowed down to the solutions that fit within the schedule and available resources.
  44. The best alternative is materialized in a design document together with the system requirements.
  45. This design document is used in the next phase of the design.
  46. %\section{Rapid Iterative Design Method}
  47. % From this point, the design plan is based on the \ac{ridm} and not anymore on the waterfall model.
  48. % The first step is the feature definition, which prepares the required features based on the initial design.
  49. % The features are defined by splitting the system in such a way that the results of each implemented feature are testable.
  50. % The definition of the feature contains a description and a set of sub-requirements which is used to implement and test the feature.
  51. % During the feature definition, the dependencies, risks and time resources are determined as well, this establishes the order of implementation in the feature selection step.
  52. %
  53. % Based on the requirements of \ac{ridm} as explained in \autoref{chap:background}, the next step is the feature selection.
  54. % However, it became apparent that the number of tests related to a specific feature is a good metric for the selection step.
  55. % Because, at the point that a feature is implemented, the tests are completed as well, and when the tests of the complete system pass, the system meets the requirements.
  56. % Following the \ac{ridm}, these tests are specified at the start of the rapid development cycle.
  57. % This makes it impossible to use the tests during the feature selections.
  58. % Therefore, a test protocol step is added after the feature definition and before the feature selection step.
  59. %
  60. % The third step is the feature selection, where one of the features is selected.
  61. % This selection is based on the dependencies, tests, risk, and time requirements in the feature definitions.
  62. % The fourth step is the rapid development cycle, which uses the sub-requirements and description of the selected feature to create an initial design and a minimal implementation.
  63. % In the last step, the variable-detail approach is used to add detail to the minimal implementation over the course of multiple iterations.
  64. % The tests are used to determine if the added detail does not introduce any unexpected behavior.
  65. % This cycle of adding detail and testing is repeated till the feature is fully implemented.
  66. % From this point, the \ac{ridm} is repeated from the third step until all features are implemented.
  67. \subsection{Feature Definition}
  68. \label{sec:featuredefinition}
  69. During the feature definition step, the initial design is split into features as preparation for the rapid development cycle and the variable-detail approach.
  70. The \ac{ridm} does not provide a particular approach to define the features of the design.
  71. But, the goal is to have features that can be implemented and tested individually.
  72. The approach in this design plan aims to provide a more guided and structured way to split the features.
  73. \begin{marginfigure}
  74. \centering
  75. \includegraphics[width=21mm]{graphics/robmosys_levels.pdf}
  76. \caption{Hierachical structure of functions and components. Each arrow represents a many-to-many relation.}
  77. \label{fig:robmosys_levels}
  78. \end{marginfigure}
  79. The approach to define features in this design plan is based on the separation of levels principle \autocite{noauthor_robmosys_2017}.
  80. This principle defines different levels of abstraction.
  81. This starts from the top with the \emph{mission}, for example, serving coffee.
  82. Followed by less abstract levels such as: a \emph{task} to fill the coffee mug; a \emph{skill} to hold that mug; and a \emph{service} allows the hand to open or close.
  83. The different levels allow the features to be split multiple times in a structured way.
  84. Take the coffee serving example, to fill the coffee mug, it is not sufficient to only hold the mug.
  85. The system also has to pour coffee into the mug, and maybe add sugar or milk.
  86. This results in a hierarchical tree of functions as shown in \autoref{fig:robmosys_levels}.
  87. Each of the levels have a many-to-many relation with each other.
  88. With this approach, features are defined top-down and are implemented bottom-up.
  89. Thus a \emph{skill} is defined as one or more \emph{services}.
  90. When all the \emph{services} are implemented, they are combined into a \emph{skill}.
  91. The advantage of this is that the \emph{skill} defines a milestone to combine the relevant \emph{services}.
  92. Or looking at the example: the system must at least be able to grab, stir, and pour before it can fill a mug with coffee, milk and sugar.
  93. Another advantages is that multiple \emph{skills} can have a \emph{service} in common.
  94. This would be the case if our system also needs to serve tea. The system can already hold a mug and only needs the ability to add a teabag.
  95. Even though there is no exact level of abstraction required for each of the features, it does create a structure for the developer.
  96. In the end, the developer must rely on its engineering judgement to chose the optimal division between features.
  97. The bottom level of the hierarchy is a special case as it describes hardware instead of functions.
  98. The components are used to execute the functionality of the system with.
  99. For example, having a mobile robot arm near a coffee machine does meet the hardware requirements, it does not have any functionality if that is not yet implemented.
  100. This also creates a clear division for the developer as the functions cannot be mixed with the hardware.
  101. %
  102. %
  103. %
  104. %
  105. %
  106. %
  107. %
  108. %
  109. %
  110. %
  111. %
  112. % As explained in the previous chapter, the goal of the \ac{ridm} is to get feedback on the design as early as possible.
  113. % To achieve this, the design is split into features, and each feature is implemented and tested sequentially.
  114. % Resulting in smaller development cycles that are tested individually.
  115. % If a feature fails its test it occurs directly after its implementation, instead of when the full system is implemented.
  116. % The goal of this step is to apportion the system into features.
  117. % Each feature must be small but independent, meaning that the feature can still be individually implemented and tested.
  118. %
  119. % In some cases it is not possible to define a feature that can be implemented and tested independently.
  120. % This occurs when the feature is dependent on the implementation of other features.
  121. % This dependency can occur in requirements where, for example, strength of one feature limits the mass of another feature.
  122. % Such a dependency can work both ways and can be resolved by strengthening one feature, or reduce the mass of the other feature.
  123. % Another type of dependency is when the implementation influences other features.
  124. % In this case, if the implementation of one feature changes, it requires a change in the other features.
  125. % An example of this is a robot arm, where the type of actuation strongly influences the end-effector.
  126. % When the robot arm approaches an item horizontally, it requires a different end-effector than approaching the item vertically.
  127. %
  128. % \subsubsection{Feature Hierarchy}
  129. %
  130. %
  131. %
  132. %
  133. %
  134. % %%%%%%%% ->
  135. % There are two important responsibilities for the developer when the design encounters feature dependency.
  136. % The first one is that the developer must determine where to split the system.
  137. %
  138. % In case of a dependency, the developer must evaluate the optimal order of implementation.
  139. % The developer must arrange the dependency of the features such that the influence on the dependent feature is as small as possible.
  140. % In other words, if feature A can be easily adapted to the implementation of feature B, but not the other way around, the developer must go for A dependent on B.
  141. % The second responsibility is organizing the feature requirements.
  142. % Due to these dependencies it is possible that the division of requirements changes, because the result of the implemented feature was not as expected.
  143. % This is not directly a problem, but a good administration of the requirements makes an update of these requirements easier.
  144. %
  145. %
  146. %
  147. %
  148. %
  149. %
  150. %
  151. % To achieve these short cycles, the features that are implemented in these cycles, are as small as possible.
  152. % However, the features must still be implemented and tested individually during the implementation and can thus not be split indefinitely.
  153. % Together with the definition of the features, the requirements are divided along the features as well.
  154. % The optimal strategy on splitting features and requirements is strongly dependent on the type of system.
  155. % Therefore, the best engineering judgement of the developer the best tool available.
  156. %
  157. % In some cases it is not possible to define a feature that can be implemented and tested independently.
  158. % This occurs when the feature is dependent on the implementation of other features.
  159. % This dependency can occur in requirements, where strength of one feature dictates the maximum mass of another feature.
  160. % Such a dependency can work both ways and can be resolved by strengthening the one feature, or reduce the weight of the other feature.
  161. % Another type of dependency is when the implementation influences other features.
  162. % In this case, if the implementation of one feature changes, it requires a change in the other features.
  163. % An example of this is a robot arm, where the type of actuation strongly influences the end-effector.
  164. % When the robot arm approaches an item horizontally, it requires a different end-effector than approaching the item vertically.
  165. %
  166. % There are two important responsibilities for the developer when the design encounters feature dependency.
  167. % The first one is during the definition, where the developer has to decide on how to split the system and how the dependency is stacked.
  168. % For the requirement and the implementation dependency the developer must evaluate the optimal order of dependency.
  169. % The developer must arrange the dependency of the features such that the influence on the dependent feature is as small as possible.
  170. % In other words, if feature A can be easily adapted to the implementation of feature B, but not the other way around, the developer must go for A dependent on B.
  171. % The second responsibility is organizing the feature requirements.
  172. % Due to these dependencies it is possible that the division of requirements changes, because the result of the implemented feature was not as expected.
  173. % This is not directly a problem, but a good administration of the requirements makes an update of these requirements easier.
  174. \subsection{Test protocol}
  175. \label{sec:systemtesting}
  176. During the rapid development cycle and the variable-detail approach, the system is tested constantly.
  177. This is to make sure that the design still performs as expected.
  178. The tests are based on the requirements.
  179. Each requirements must be covered with at least one test.
  180. The tests consist of a description which specifies how to perform the test and what the result of the test must of must not be.
  181. Together with the description, there is a list of required features to perform the test and a list of requirements that are met if the test passes.
  182. \section{Development Cycle}
  183. The development cycle consists of three steps, which are repeated for each individual feature.
  184. These three steps form the core of the \ac{ridm}.
  185. This starts with selecting the feature that is to be implemented, which then is implemented with the rapid development and variable-detail approach.
  186. \subsection{Feature Selection}
  187. \label{sec:feature_selection}
  188. The goal of this section is to improve the features selection criteria of the \ac{ridm}
  189. The \ac{ridm} states that critical features, those with a high \emph{\ac{cof}}, must be implemented first.
  190. If a critical feature fails, it is at the start of the design process, thereby invalidating only a portion of the design process.
  191. Features that are (time) expensive to implement, must be implemented as late as possible.
  192. These expensive features have a high \emph{Cost of Change} and placing them at the end of the development avoids making changes to the features.
  193. The \emph{\acl{cof}} and \emph{Cost of Change} are a good starting point for selection criteria.
  194. However, this creates an interesting situation for features with both a high change of failure and a high cost of change.
  195. The rest of this section provides a structured approach for feature selection.
  196. An example that shows the importance of the order of features is the development of a car.
  197. To have a critical damped suspension in a car, the weight distribution of the car must be known.
  198. If the suspension of the car is designed before all the features that determine the weight distribution, it is likely that the suspension design is not up to requirements.
  199. Resulting in a redesign of the suspension feature and thus increasing the overall development cost.
  200. This example is caused by the dependency between different features.
  201. \begin{marginfigure}
  202. \centering
  203. \includegraphics[width=2.9cm]{graphics/feature_dependency.pdf}
  204. \caption{Dependency graph for features.}
  205. \label{fig:feature_dependency}
  206. \end{marginfigure}
  207. \begin{table*}[]
  208. \caption{Comparison of features with their corresponding \ac{cof} and time.
  209. The last column is the \ac{cof} value divided by the number of days.}
  210. \label{tab:feature_selection}
  211. \begin{tabular}{l|r|r|r|r|r|}
  212. \cline{2-6}
  213. & \multicolumn{1}{l|}{Dependees} & \multicolumn{1}{l|}{Tests} & \multicolumn{1}{p{0.13\paperwidth}|}{\acl{cof} (\acs{cof})} & \multicolumn{1}{l|}{Time} & \multicolumn{1}{p{0.13\paperwidth}|}{Change of Failure over time} \\ \hline
  214. \multicolumn{1}{|l|}{Feat. A} & 2 (B, C) & 2 & 15 \% & 3 days & 5 \\ \hline
  215. \multicolumn{1}{|l|}{Feat. B} & 0 & 3 & 40 \% & 5 days & 8 \\ \hline
  216. \multicolumn{1}{|l|}{Feat. C} & 1 (E) & 5 & 25 \% & 2 days & 12.5 \\ \hline
  217. \multicolumn{1}{|l|}{Feat. D} & 0 & 4 & 15 \% & 1 day & 15 \\ \hline
  218. \multicolumn{1}{|l|}{Feat. E} & 0 & 4 & 45 \% & 6 days & 7.5 \\ \hline
  219. \end{tabular}
  220. \end{table*}
  221. To determine the order of implementation of features, a dependency graph and a comparison table is made.
  222. The dependency graph and the comparison table for a theoretic system is shown in \autoref{fig:feature_dependency} and \autoref{tab:feature_selection} respectively.
  223. In general the dependency of the features is inherited from the hierarchical structure that is made in the feature definition step.
  224. The comparison table has a dependees column, that describes the number of features that are depending on that specific feature, and are derived from the dependency graph.
  225. The tests column describes the number of tests that are covered by implementing this feature.
  226. These tests are defined during the initial design and the feature definition, the number represents the amount of tests that pass after implementation of the feature.
  227. The \ac{cof} per time score is calculated by dividing the \ac{cof} score with the time score.
  228. The \ac{cof} score indicates the likeliness of unforeseen difficulties during the implementation of the feature.
  229. The time score is an estimation about the required time for implementation.
  230. This time score is strongly connected with the \emph{Cost of change}, but for readability I chose to refer to time instead.
  231. Due to the limited scope of this thesis, it is not possible to give a good metric for determining \ac{cof} and time.
  232. Nevertheless, it is strongly advised that the developer defines some metric that fits his project best.
  233. It seems logic to always implement the feature with the highest \ac{cof}, but it is possible that the combined \ac{cof} of multiple features is higher for the similar time investment.
  234. This is visible in \autoref{tab:feature_selection}: In a time span of 6 days it is possible to implement feature E or features A, C, and D.
  235. The \ac{cof} for E is 45 \% which is significantly less than the combined 65 \%\footnote{This is not a valid approach to calculate the combined chance, but suffices for the goal of this example.} of A, C and D.
  236. With a completed comparison table, the order of implementation for the features is determined by the following rules:
  237. \begin{enumerate}
  238. \item Features that are dependencies of others must be implemented first.
  239. \item Features that complete more system test than other features when implemented have priority.
  240. \item Features with the higher \emph{\ac{cof} per time} score than other features have priority.
  241. \end{enumerate}
  242. The rules are applied in order.
  243. If one rule reduces the set to a single feature, the rest of the rules are skipped.
  244. The third rule is a sorting rule, and the feature that fits best is implemented.
  245. In case of a draw or in special cases the developer decides what feature to implement next.
  246. Looking at an example of 5 features:
  247. As shown in \autoref{fig:feature_dependency}, features B and C depend on feature A;
  248. feature D does not have any dependency connections;
  249. and feature E is dependent on C.
  250. Together with the information in \autoref{tab:feature_selection}, the order of implementation is:
  251. \begin{description}
  252. \item[Feature A:] has two features that are dependent on this feature, more than any other.
  253. \item[Feature C:] has one feature that is dependent on this feature, most dependees after A is implemented.
  254. \item[Feature D:] has the same number of tests as E, but D has a significant higher \ac{cof} per time score than E
  255. \item[Feature E:] has the most number of tests.
  256. \item[Feature B:] only one left to be implemented.
  257. \end{description}
  258. Note that this example assumes that nothing changes.
  259. In case of a feature not being feasible during the implementation, the design has to be reviewed.
  260. This also means that the dependency graph and comparison table change, possibly resulting in a different order of implementation.
  261. \subsection{Rapid Development}
  262. Each iteration of this rapid development cycle implements one complete feature.
  263. The feature that is implemented is selected in the prior feature selection step.
  264. The goal of this step is to lay the foundation for the development of the feature.
  265. This foundation consists of a basic model, a set of detail elements and a list of tests.
  266. The set of detail elements is a collection of design aspects that are added to increase the detail during the next design step.
  267. These detail elements can represent behavior, parasitic elements, or components.
  268. How these detail elements are implemented and what the basic model consists of is based on the initial design of the selected feature.
  269. The initial design of the feature is similar to the system-wide approach in \autoref{sec:se_initial_design}.
  270. It consists of a design space exploration, but with more detail, which is possible as the feature is significantly smaller than the complete system.
  271. From the design space exploration, the developer selects the optimal design choice for the current feature.
  272. For this design choice, a design document is made that illustrates the rough shape and dynamics of the implementation.
  273. The basic model and the detail elements are based on an initial design of the feature.
  274. The basic model consists of only the most basic elements of the design.
  275. As the basic elements that make the basic model differ strongly per system, there is not a specific approach.
  276. In general, the basic elements should only represent dominant and essential behavior of the system.
  277. A good starting point for the dominant behavior is to identify the interesting energy states of the system.
  278. The energy states of interest can include the energy states that are dominant, but also the states that are chosen by the developer.
  279. These last states could represent the output states or status that have to be measured.
  280. In the end, the developer decides which states are required and implements them in the basic model.
  281. All the elements that are part of the initial design but are not part of the basic model are classified as the detail elements.
  282. Lets take a motorized double inverted pendulum for example, which consists of two arms with motorized joints.
  283. Both pendulum arms are dominant energy states.
  284. The electrical motors have also internal states, but store significantly less energy than the pendulum arms.
  285. An basic model would in this case only consists of the arms, possibly even without any dynamic behavior.
  286. The dynamic behavior, motor characteristics, resistance, or gravitational force are examples of detail elements to be added to increase the detail.
  287. \subsection{Variable-Detail Approach}
  288. With the variable-detail approach the basic model is developed into a refined model of the feature.
  289. This is done by adding the detail elements over the course of multiple iterations.
  290. Each iteration produces a new model with more detail than the previous.
  291. The newly added detail is evaluated by performing the tests that were defined during the rapid development cycle.
  292. \begin{figure}
  293. \centering
  294. \includegraphics[width=8.5cm]{graphics/test_flow_graph.pdf}
  295. \caption{Decision flowchart to follow for failed tests on each detail level.
  296. Decision tree starts at the top left rectangle.
  297. Depending on the questions, the next step of action is to continue with the design or review the design.}
  298. \label{fig:test_flow_graph}
  299. \end{figure}
  300. Not all tests are expected to succeed from the start, as not all details are implemented.
  301. For example, if the internal resistance of a electric motor is not yet implemented in the model, the motor can draw unlimited current, and this would exceed the maximum current draw of the system.
  302. The decision flowchart in \autoref{fig:test_flow_graph} determines whether the design must be reviewed or can continue on a failed test.
  303. The decisions are made with the following questions:
  304. \begin{description}
  305. \item[Passed Before?] The current test of the current design failed, but was there a previous detail level where it passed?
  306. \item[Expected to fail?] Does the test fail as a direct result from the added detail and was that intentional?
  307. \item[Expected to pass?] Should the added detail to the model result in a pass of the test?
  308. \item[Will pass in future?] Is there an element to be implemented that results in a pass of the test?
  309. \end{description}
  310. In the case that the implementation of a detail element fails multiple times, the developer has to investigate if implementing the feature is still feasible.
  311. This could result in a redesign of the feature or system.
  312. When and how this decision has to be made differs per situation and is outside the scope of this thesis.
  313. The developer must evaluate if there are feasible alternatives left for this element, feature or system, and apply these alternatives if possible.
  314. When all detail elements are implemented; all tests pass; and the basic model has evolved into a refined model of the feature, the design cycle moves back to the feature selection.
  315. In the case that this is the last feature to implement, this concludes the development.
  316. \section{Summary of Design Plan}
  317. \begin{marginfigure}
  318. \centering
  319. \includegraphics[width=6cm]{graphics/design_flow_analysis.pdf}
  320. \caption{Combined design plan, based on the \ac{se} and \ac{ridm} approach.}
  321. \label{fig:design_plan_analysis}
  322. \end{marginfigure}
  323. The steps from \ac{se} and the \ac{ridm} are combined to create the design plan as shown in \autoref{fig:design_plan_analysis}.
  324. The first five steps of the design process form the preparation phase: problem description, requirements, initial design, feature definition, and test protocol.
  325. The initial design step creates a holistic design based on the prior problem description and requirements step.
  326. The last step of the preparation is the feature definition, where the initial design is split into different features.
  327. The resulting initial design and its features together form the design proposal for the development steps.
  328. The last step of the preparation phase is the test protocol step, where the tests are defined to monitor the design process and validate that the system meets the requirements.
  329. The development cycle consists of the feature selection, rapid development, and variable-detail steps.
  330. These three steps are applied to each feature in the system individually.
  331. With each iteration of the development cycle a new feature is added to the complete system.
  332. All the tests of the individual features are performed in the complete system as well.
  333. This ensures that the one feature does not break a another feature.
  334. The design is finished when all the features are implemented, tested and combined.
  335. In the optimal situation the preparation phase is only performed once at the start of the design, and the development cycle is performed for each feature.
  336. However, if features prove to be infeasible, some steps have to be revisited.