Specification Spreadsheets » History » Version 2

Txinto Vaz, 11/13/2014 04:57 PM

1 1 Txinto Vaz
h1. Specification Spreadsheets
2 1 Txinto Vaz
3 1 Txinto Vaz
{{>toc}}
4 1 Txinto Vaz
5 1 Txinto Vaz
warning. Nomenclature and scope of this text is not aligned with current status of specification spreadsheets, but the information is valuable for later adaptation
6 1 Txinto Vaz
7 1 Txinto Vaz
The Hardware/Software interfaces file is used to describe the interaction of the software algorithms with the rest of the system/environment.  The easiest way to understand all the features included in this document is approaching its description by the historical introduction of each of the features included in it.
8 1 Txinto Vaz
9 1 Txinto Vaz
h2. HwSw_Interfaces document evolution
10 1 Txinto Vaz
11 1 Txinto Vaz
Hystorically, the interaction between the software and the rest of the world is done through hardware (communication stack, sensors & actuators, electric lines...).  This is the main reason why the document's name is HwSw_Interfaces.
12 1 Txinto Vaz
13 1 Txinto Vaz
Another reason is that the main expert domain for this document is the hardware engineer.
14 1 Txinto Vaz
15 1 Txinto Vaz
h3. MCU pinout list
16 1 Txinto Vaz
17 2 Txinto Vaz
Initially, the HwSw_Interfaces file has been a list of microcontroller pins with associated function names and some remarks like the [[active logic]].
18 1 Txinto Vaz
19 1 Txinto Vaz
h3. Transfer functions
20 1 Txinto Vaz
21 1 Txinto Vaz
As some of the magnitudes associated to some pins have a transfer function (directly related with the sensor used for  this acquisition + the adaptation hardware), the hardware engineer used to include these transfer functions as annexes of the document, for software engineer reference.  Some of the simplest transfer functions (like linear ones) were not annexes, but spreadsheet formulas that acted like a calculator tool for the engineers.
22 1 Txinto Vaz
23 2 Txinto Vaz
As we will see later, these annexes looks like a readable version of the [[conversion|conversion rules]].
24 1 Txinto Vaz
25 1 Txinto Vaz
h3. Calibration
26 1 Txinto Vaz
27 2 Txinto Vaz
System specifications usually describe calibrable values to be used as thresholds to activate/deactivate a behaviour on the system.  These values are often related to a physical magnitude (see [[Flow]]).  And this physical magnitude is often read from the outside of the software world through one of the pins in the [[MCU]] pinout.
28 1 Txinto Vaz
29 2 Txinto Vaz
So, the way to obtain the [[raw value]] from the [[physical value]] of these calibrable values is to follow the same transfer function that the engineer used to describe the behaviour of this pin.  This will allow software magnitude to be calibrated directly in the same representation the magnitude is acquired [[raw value]], and avoid overheading calculations with floating points in order to be able to compare the value on the port with the calibration value.
30 1 Txinto Vaz
31 2 Txinto Vaz
As the HwSw_Interfaces already has a way to specify the [[conversion|conversion rules]], it is a good place to specify the [[calibration|calibrable values]].  Calibrations behave exactly as constants that use the same representation than [[flow|flows]] that are being acquired/synthesized through a microcontroller pin.  And we can not forget that for diagnosticating the system, the hardware engineer is the key domain expert of the team, so let's move the microphone to him in order to be able to understand and supervise the calibration specifications in an adequate language (stop debugging to know what is software supposed to do!!).
32 1 Txinto Vaz
33 1 Txinto Vaz
h3. On Board Diagnostics
34 1 Txinto Vaz
35 2 Txinto Vaz
With the arrival of the [[On Board Diagnostic| on-board diagnostics]] engineering requirements, electric magnitudes like battery lines or ignition lines were included in the list of diagnosticable things.  Safety redundancy support functions needed these information.  
36 1 Txinto Vaz
37 2 Txinto Vaz
Hardware engineers provide software with extra lines (normally ADC ports) to know the value of these magnitudes (let's think about diagnosticating the battery line on this example).  As ADC ports can not work with the values (0-24v in our example, where typical ADC is 0-5v or 0-3.3v), hardware engineer designed an adaptation circuit for this line, that is, created the battery diagnosis line. And provided a transfer function for this diagnosis line for the software engineer to correctly infer the [[physical value]] of the battery line from the battery diagnosis line.
38 1 Txinto Vaz
39 1 Txinto Vaz
So, apart from the previously present functional lines (or [[flows]] from the system's engineering point of view), the diagnosis lines and their transfer functions were added to the HwSw_Interfaces document.
40 1 Txinto Vaz
41 1 Txinto Vaz
h4. OBD Calibration
42 1 Txinto Vaz
43 2 Txinto Vaz
[[On Board Diagnostic]] is based in an algorithm that uses some conditions to generate some results.  These conditions are normally magnitude comparison on a calibrable value, and this calibrable value is created just for the OBD.  As the HwSw_Interfaces already has a way to specify calibrations and most OBD diagnostics are hardware based (and ... and ... ;) ), HwSw_Interfaces is a good place to specify the calibrations needed by OBDs.
44 1 Txinto Vaz
45 1 Txinto Vaz
Apart from the calibrations needed by the conditions, usually the OBD algorithm is tuned using specific calibrations that are needed for each OBD.  These are examples of them:
46 1 Txinto Vaz
47 1 Txinto Vaz
* A calibrable flag to activate/deactivate this OBD on engineering time, after-sales service, or EOL (product line strategies).
48 1 Txinto Vaz
* The filtering time a fault condition is present in order to consider that the fault is actually present (known, qualification time of the OBD).
49 1 Txinto Vaz
* The filtering time a fault condition is no more present in order to consider that an existing fault has actually dissapeared (recovery time).
50 1 Txinto Vaz
51 1 Txinto Vaz
Following the same motivation than before, the HwSw_Interfaces is including the definition of this calibration values pattern and its application to OBDs.
52 1 Txinto Vaz
53 1 Txinto Vaz
h2. Feature summary
54 1 Txinto Vaz
55 1 Txinto Vaz
HwSw_Interfaces allow the user to define:
56 1 Txinto Vaz
57 2 Txinto Vaz
* The input/output [[flow|flows]] of each hardware block at [[ECU]] level, including the [[MCU]]'s pinout.
58 2 Txinto Vaz
** The [[flow type]]
59 2 Txinto Vaz
** The [[conversion]] associated to it.
60 2 Txinto Vaz
** The [[flow_direction|flow direction]] (input/output/bidir...).
61 2 Txinto Vaz
* The [[conversion]] (transfer functions) available for being associated to the flows or the calibrable values.
62 1 Txinto Vaz
* The calibrable values (associated or not to the flows) that the system need.
63 1 Txinto Vaz
** Those for functional behaviour support.
64 2 Txinto Vaz
** Those for [[On Board Diagnostic|OBD]] features support.
65 1 Txinto Vaz
** Linked to applicable conversion rules.
66 2 Txinto Vaz
* The [[On Board Diagnostic]]s of the system.
67 1 Txinto Vaz
68 1 Txinto Vaz
To support standarization/universalization, only when it is impossible or very hard to get it working, all categorized values must be selectable, in order to avoid typo errors.  This includes the ability to define dictionaries and automatic nomenclatures:
69 1 Txinto Vaz
70 1 Txinto Vaz
* Define prefixes, suffixes and particles for automatically naming calibration values or OBD mechanisms.
71 1 Txinto Vaz
* Define flow types.
72 2 Txinto Vaz
* Define [[OBD requirement]]s
73 1 Txinto Vaz
* ...
74 1 Txinto Vaz
75 1 Txinto Vaz
{TODO} Continue describing this topic.
76 1 Txinto Vaz
77 1 Txinto Vaz
h2. A tour on the document
78 1 Txinto Vaz
79 1 Txinto Vaz
notice. A version of the document has been attached to this wiki page.  
80 1 Txinto Vaz
81 1 Txinto Vaz
warning. This file is only valid for educational purposes, please do not use it on a project!!!
82 1 Txinto Vaz
83 1 Txinto Vaz
notice. Convention
84 1 Txinto Vaz
* A green area means user selectable/writable field.
85 1 Txinto Vaz
* A grey area means "please don't touch!", as the value shown is automatically calculated using formulas.
86 1 Txinto Vaz
87 1 Txinto Vaz
h3. Tabs
88 1 Txinto Vaz
89 1 Txinto Vaz
Once the document is open, some tabs are found:
90 1 Txinto Vaz
91 1 Txinto Vaz
h4. Project tabs
92 1 Txinto Vaz
93 1 Txinto Vaz
** Cover: Information about the project and the document.
94 1 Txinto Vaz
** Dictionary: Prefixes / Suffixes / Particles needed by the document in order to automatically generate nomenclature for flows/calibrations/etc.
95 1 Txinto Vaz
96 1 Txinto Vaz
h4. Pinout description tabs
97 1 Txinto Vaz
98 1 Txinto Vaz
** MMC: pinout description of the main microcontroller.
99 1 Txinto Vaz
** Blocks: pinout description of the rest of the hardware blocks at the ECU level.
100 1 Txinto Vaz
101 1 Txinto Vaz
h4. OBD related tabs
102 1 Txinto Vaz
103 2 Txinto Vaz
** [[OBD recurrence time|Recurrence times]]: reference table for selecting [[OBD recurrence time]]s for an OBD.
104 2 Txinto Vaz
** [[OBD failsafe command|Failsafe Commands]]: reference table for selecting the [[OBD failsafe command]]s that can be used to degrade the system's behaviour in case a [[OBD fault]] is present.
105 2 Txinto Vaz
** [[OBD Failsafe Times]]: reference table for selecting how much time a failsafe command must be activated once the fault is present.
106 2 Txinto Vaz
** [[OBD Detection moment]]s: reference table for selecting OBD's detection moment.
107 2 Txinto Vaz
** [[OBD Precondition|Preconditions]]: reference table for selecting OBD's precondition.
108 2 Txinto Vaz
** [[OBD Rehabilitation|Rehabilitations]]: reference table for selecting OBD's rehabilitation.
109 2 Txinto Vaz
** [[OBD Requirement|Requirements]]: tab to specify the OBD's requirements (groups of faults).
110 2 Txinto Vaz
** [[On Board Diagnostic|FaultsList]]: tab to specify the OBD's identification properties (name,abbrev,ID) and to check the automatically generated nomenclature (reference for software manual/automated codification).
111 2 Txinto Vaz
** [[On Board Diagnostic|FaultsSpec]]: tab to specify the OBD's behaviour properties.  These properties can be selectable from the reference tables described before, or custom ones (free text).
112 2 Txinto Vaz
** [[OBD failsafe command|FaultFailSafeCommands]]: In this tab you can associate each fault with the desired failsafe commands (and times) to be triggered when the fault occurs.
113 1 Txinto Vaz
114 1 Txinto Vaz
notice. Detection Moments, Preconditions, Failsafe Commands and Failsafe Times are  completely optional, they are present to support some OBD specification strategies.  If not applicable in acting project, software will ignore these values.
115 1 Txinto Vaz
116 1 Txinto Vaz
h4. Conversion related tabs
117 1 Txinto Vaz
118 2 Txinto Vaz
** [[Conversion]]: In this tab the conversion rules are specified.
119 1 Txinto Vaz
** [[FT List]]: A table to describe the tabs that contain the transfer function for look-up table type conversion rules.  Here the user tells the document how to convert a value using a FT table present on a tab.  The name of the tabs listed here will be available as selectable for conversion rules.
120 1 Txinto Vaz
** [[FT Table|XxxxFT]]: In tabs named this way, different function tables can be described, as reference for conversion rules that use look-up methods.
121 1 Txinto Vaz
122 1 Txinto Vaz
h4. Calibration related tabs
123 1 Txinto Vaz
124 1 Txinto Vaz
blabla