## 2 Algorithms for Data Encoding to Minimize the File Size  
Figure 1 shows a schematic of the measurement system that employs the algorithms developed in this study. This measurement system is tasked with simultaneously executing various functions, such as acquiring, analyzing, visualizing, encoding, and writing sensor readings in real time. Each task must be optimized to improve the efficiency of the system. First, data-encoding algorithms should be customized to match the characteristics of the target values, thereby minimizing the required data storage. In typical vibration measurements, sensor reading values are acquired in real time. A common method for storing these values is to use text formats. However, binary formats offer the ability to achieve a smaller file size while maintaining the same amount of information compared with plain text formats. In a binary file, data are stored in the same manner as in the main memory for processing, which provides direct file access. In addition, binary formats allow data processing in large chunks. This significantly improves the read and write performances. Some standard formats represent real numbers in a binary format. For example, the double-precision floating-point (or Double) format is generally applied to represent real numbers with high precision. In this study, we used terms from the C# programming language. They may have different names but have the same functionality in other languages. A Double value can be represented in binary format and requires eight bytes of memory [30]. However, the range covered by this standard format is extensive, \(\pm 5.0\times 10^{-324}\) to \(\pm 1.7\times 10^{308}\), making it inefficient for representing sensor reading values, which typically have limited ranges and specific resolutions. Consequently, specialized encoding algorithms that can optimize the storage of sensor readings based on their specific ranges and resolutions are needed. Every DAQ device has a measurement resolution, typically 12-, 16-, or 24-bit, which generally indicates that these devices have an analog-to-digital converter (ADC) that returns the given bits for an input sample. This implies that the ADCs represent values using binary formats. If a DAQ device allows the reading of raw binary values from its ADC, these data can be stored directly without encoding, leading to efficient storage utilization. However, for user convenience, most DAQ devices typically present reading values in the form of  
Figure 1: Schematic diagram of the measurement system utilizing the algorithms developed in this study. real numbers. Therefore, it is necessary to develop specialized data-encoding algorithms that can efficiently convert these values into binary data. To achieve this, the resolution and analog input range of the DAQ must be considered. The resolution determines the number of levels used to digitize the sensor reading values, which in turn determines the smallest signal change detected by the device. With a 16-bit resolution, an ADC can represent \(2^{16}=65\),536 evenly discrete levels, whereas a 24-bit ADC can represent \(2^{24}=16\),777,216 evenly discrete levels. For example, a typical DAQ device has an analog input range of \(-10\) to 10 V with a 16-bit resolution for each channel. In this case, the smallest signal change that the DAQ can detect is:  
\[\frac{10-(-10)}{2^{16}-1}=\frac{20}{65,535}=3.05\times 10^{-4}\ \ \ (\mathrm{V}) \tag{1}\]  
If the resolution is 24-bit, the smallest signal detectable change will be:  
\[\frac{10-(-10)}{2^{24}-1}=\frac{20}{16,777,215}=1.19\times 10^{-6}\ \ \ ( \mathrm{V}) \tag{2}\]  
For a DAQ device with a 24-bit resolution and a \(\pm 10\) V analog input range, the data storage format used to represent the sensor reading values should satisfy this range and resolution. The 3-byte number format is suitable for this purpose. Thus, each sensor reading value is encoded as a scaled value, consisting of three bytes.