## 1 Introduction  
Technology is ever more reliant on electricity and distributed power generation is a valid option in this scenario. It can be deployment relatively fast and offers significant advantages for the owner, utility, as well as the end-user [1, 2]. Small size spark ignition (SI) engines are straight forward applications in these situations, as the technology is cost effective, proven, and reliable; they are relatively easy to adapt to H\({}_{2}\) fueling and this is another advantage that may bring significant benefits in a carbon-free future scenario [3]. One of the main characteristics of these small size units is that they feature a reduced number of sensors and actuators [4, 5, 6, 7], mostly due to cost competitiveness aspects. New components are mainly developed for improved volumetric efficiency [8], better fuel atomization [9], use of alternative fuels [10], implementing direct injection [11, 12], and turbocharging [13, 14] for higher engine output. Improved efficiency and reduced emissions are facilitated by augmented control margins; for the specific case of small size engines, application of alternative sensors [15] and simplified variable cam actuation systems [16] contribute to cost effectiveness. This, along with other characteristics of this category of power units, requires careful evaluation when considering straight forward transfer of automotive based solutions [17]. Identification of various unwanted phenomena such as knock [18] and misfire [19] are often implemented as alternative detection methods that comply with the main requirements of reduced cost and contained system complexity. One particular aspect of combustion engines is that the crank angle needs to be evaluated as accurately as possible [20; 21; 22]. For control purposes, it is essential to at least distinguish between the two top dead centers (TDC) during the engine cycle (i.e., the firing TDC at the end of compression and the one between the exhaust and intake strokes). This allows sequential fuel injection to be implemented, with efficiency and emission benefits, as well as compatibility with direct injection [23]. Automotive applications usually employ such TDC identification algorithms through measurement of the instantaneous crankshaft [24] and/or camshaft speed [25], but in the specific case of small engines, this may not be as straight forward (e.g., crankshaft position sensors are not as diffused). Alternative fuels are another important line of research in the field of combustion engines, and additives need to be carefully evaluated for obtaining optimal results [26; 27; 28]. Small size SI engines are often powered by bio-derived blends [29; 30] or zero CO\({}_{2}\) liquid fuels [31]. Natural gas and syngas are also used frequently [32; 33], especially when low grade biomass is available [34]; this provides valuable local power with reduced cost end low emissions. Small SI units can ensure good performance even with energy sources that feature quite different properties such as hydrogen [35; 36]. Providing improved control margins while containing costs can therefore be an essential aspect of using alternative fuels in small engines. The goal of the current study is to implement a novel algorithm capable of identifying the firing TDC on a cycle-to-cycle basis through measurements of spark duration. It can be applied on many small size SI units that feature \"wasted\" spark operation of the ignition system and its main advantage is that there is no need for an additional sensor. Once the method was developed through offline data analysis of the secondary current readings, the algorithm was implemented as a LabVIEW virtual instrument application. It was tested and validated on a 50 cc SI unit that powered a single-phase AC generator; it was also compared to a method based on engine speed measurement. In-cylinder pressure measurements were used as means for verifying the actual TDC sequence.