Wavelet Transforms of Diagnosable Signals from Ship Power Complexes in a MATLAB Environment

The use of digital technologies in the systems of diagnostics and monitoring of units of a ship’s propulsion plant can significantly increase the efficiency and quality of assessing the technical condition of operated objects in the online mode as well as expand the class of practical problems to be solved. Digital processing of signals of complex configuration at a qualitatively new level is an indispensable condition for a critical improvement in the course of processing the current values of diagnosable parameters, increasing the reliability and trouble-free performance of a ship’s technical equipment during operation. A method of approximation has been discussed in the paper. Moreover, the paper provides an algorithm for analyzing the signal of the indicator diagram of a marine diesel engine, the spectrum of which contains high-frequency components and short-term pulses indicating deviations from the normal operating mode, the assessment of which is practically impossible with the traditionally applied methods of spectral analysis of signals. The approximation method is based on the use of wavelet analysis, which makes it possible to deeply explore such modes. Examples of using wavelet analysis to approximate one-dimensional signals of elements and systems of a ship’s power complexes are given.


Introduction
Online monitoring of the technical condition of technical facilities in operation in maritime transport is associated with digital processing of complex signals. The frequency spectrum of the analyzed signals, as a rule, contains the harmonic components of high frequencies, which are estimated on the Fourier basis. Evaluations are performed using hardware, including harmonic analyzers of various designs. Signals of complex configuration include voltages and currents of systems and elements of power complexes containing nonlinear semiconductor converters, sources of noise and vibrations during the operation of the main and auxiliary engines of a ship's power systems, non-stationary vibrations of the ship's hull structures in waves, shallow waterways, etc. They also include resonance vibrations that can occur on ships at certain speed modes of powerful energy converters. Signals of a complex configuration, along with the deterministic component, may contain interference, individual pulses with a weak energy spectrum. A wide variety of monitored signals creates conditions for improving the quality of diagnostics of the ship's operating parameters, using digital technologies -Determination of the technical condition (performance) of the object; -Searching for a defect that has arisen; -Forecasting changes in the technical state of the object.
The theory of technical diagnostics systems in general, and for MDIs in particular, has arisen and developed since the 1970s in the works of world-renowned researchers. However, insufficient attention is paid to the development of technical means for diagnosing MDIs, which can assist a ship's crew in assessing the technical condition of the power plant during autonomous navigation of ships [4][5][6].
Increasing requirements for the accuracy of diagnosing objects when processing signals with local impulses and other features leads to the necessity of improving the theory, methods, and techniques for assessing the technical state of a ship's systems. Traditional methods based on the use of orthogonal series become ineffective for a profound and comprehensive analysis of signals with complex configurations, including cases when they are expanding into an orthogonal series using Fourier approximation. In practical calculations, an infinite number of terms in the Fourier series is not used, and the use of a limited number of harmonics leads to large errors [7]. In such cases, wavelet transform technologies can be considered very promising solutions [6]. A large package of wavelets, presented in modern computing systems, as well as a set of functions designed to process signals coming from information sensors, makes it possible to use them effectively to solve practical problems of monitoring and diagnosing the technical state of objects in steady-state and transient modes.
Wavelet technologies are developed on basic functions that preserve localization properties in the frequency and time domains [4]. They provide the implementation of high-precision algorithms for the approximation of one-dimensional and multidimensional characteristics.

Methods and Materials
High-precision approximation procedures in quasi-static modes during the working cycle are required to be used when measuring the pressure, temperature, weight, and composition of exhaust gases in a diesel cylinder. High-precision technologies are required when studying the appearance of local zones while nitrogen oxides are being generated at various speed modes, researching the correlation properties of fuel combustion products by indirect methods, for producing data arrays obtained using indicator diagrams, and creating "reference" characteristics of technological processes. In this case, information can be stored in the form of arrays of wavelet transform coefficients, and cluster models can constitute a tool for invariants. Parameters beyond the boundaries set by the cluster can serve as a sign of deviation of the diagnosable parameter from the standard one.
Studies have shown that the frequency properties of indicator devices can significantly affect the frequency characteristics of the indicator channel, which leads to distortion of signals and increasing the error in assessing the indicators of the working process [8].
The digitalization of processes in the Fourier basis has shown that with Fourier series, it is difficult to detect local signals in the form of short pulses of a small amplitude, which may indicate the development of deviations of controlled signals from the standard ones against the background of measurements [9,10].
Wavelet analysis is a tool for studying signals with local features. Wavelets and wavelet transforms allow for obtaining spectrograms of signals with local features. It is easy to determine their location in the amplitude-time domain, which is practically impossible to perform in the Fourier basis [5]. Wavelet transforms are based on modern digital technologies, the implementation of which requires the use of tools of modern computing systems containing a set of functions with established syntactic rules.
The MATLAB Wavelet Toolbox contains a list of basic wavelets, such as Haar, Morlet, Meyer, Shannon, Daubechies, frequency B-spline, etc. The Haar and Daubechies wavelets are most widely used in practice, having a lot in common in information coding [2]. In this regard, the Haar wavelet in the packet is denoted by the symbol db1, and the Daubechies wavelets can be selected from the db2, db3, . . . , db10 family, represented by nine wavelets. Modification of Daubechies wavelets allows for an increase in the symmetry properties of filters while maintaining the simplicity of working with them [11].
Wavelet transforms are designed to process large amounts of information. At the same time, their technologies and algorithms are suitable for working with simple signals that allow one to observe, step by step, the progress of transformations carried out by the algorithm. Let us consider the following example of this mode.
Suppose that the measurements of the hourly fuel consumption during the progress of a vessel with a displacement of 2000 tons during 8 running hours were (kg/h) as follows: y = (152 154 156 157 156 157 158 156).
By delta coding, we will obtain an approximation of the fuel consumption vector y using the "db1" wavelet. For this purpose, according to the Haar transformation, we split the elements of the vector y into pairs and determine the half-sum and half-difference of values in each of them. We define the half-sums and half-differences using the matrix R of the following form: The vectors Fcp and r can also be obtained using the Haar wavelet transform for one-step signal decomposition using the "db1" wavelet, for which we use the following operators contained in the Wavelet Toolbox: The upcoef operator is used to approximate A1 and refine D1 of the first wavelet transform level by the obtained vectors cA1 and cD1. The identity of the estimates is determined by the fact that A1 = Fcp and D1 = r. According to the syntax of the operator, the following ones are sequentially given in parentheses: the symbols 'a' and 'd', specifying which kind of decomposition should be performed; vector cA1 is introduced for approximation, and vector cD1 for refining; Daubechies wavelet with the corresponding number 'db1' is selected; the number of the operation level is entered-for example, 1; the number of elements of the vector of the processed signal ls is indicated (for the vector y, the value ls = 8).
Now, we will turn our attention to the operator [cA1, cD1] = dwt (y, 'db1'). As applied to the example under consideration, the operator performs a linear transformation of each group of two elements of the vector yc using the rotation matrix M consisting of the following elements: As a result, the elements of vectors cA1 and cD1 are determined. In particular, we have, element by element, for four groups: The Haar transform is normalized using the matrix M, since the determinant of the matrix is det (M) = 1.0000. Therefore, when a pair of numbers rotates, the area of the normalized object does not change, i.e., information is not lost, which makes it possible to process the vector y by the formed pairs of numbers independently of each other. In the MATLAB environment, such a transformation is carried out using a block matrix consisting of blocks M in the main diagonal. Such a matrix can be obtained if the matrix R is multiplied, element by element, by sqrt (2): Note that det(R) = 0.0625 with the determinant of every block 8 × det(R) = 0.5, while det(W) = 1.0000.
The rows of the matrix M have orthogonality properties.
As a result, inv(W) = W T , and the inverse of the matrix can be obtained using the transpose operation.
Thus, vectors A1 and D1, obtained by the Haar transform, are two filters that separate the signal into low-frequency and high-frequency components (Figure 1). Low-frequency resolution Designs 2020, 4, 52 5 of 13 characterizes signal power and high-frequency resolution characterizes its frequency associated with short pulses (bursts).
operational situation (safety of navigation, energy savings, environmental safety, etc.). Another example is the impossibility of a representative of the organization for the classification and survey of ships for a relatively short survey period to completely check the technical condition of a ship and its elements, or at least all elements of the power plant (EPP) of the ship (in reality, the method of selective control, as a result of which the technical condition of a significant part of the EPP facilities turns out to be untested) (Figure 1). It is here that digital technologies based on knowledge in various fields of technology and the experience of specialists-in other words, artificial intelligence-should replace the intelligence of a human operator, which cannot always cover and evaluate a multi-level problem in its entire multidimensional difficulties.

Mathematical and Software Implementation
With multilevel processing of signals of a complex configuration based on the 'db1' wavelet, it is possible to guarantee an increase in the conversion quality due to a larger volume of digitalization of the process [8]. For definiteness, we perform the decomposition of y at detail level three ( Using the obtained vectors C and L, using the appcoef function, we estimate the coefficient cA3 of the third level of approximation and detail. Observing the syntax, we obtain: cA3 = appcoef(C,L,'db1',3) = 440.5275, Figure 1. Application of the wavelet 'db1' for single-level vector processing y. A person at the modern level of development of technology and its automation, due to the limited psychophysiological capabilities of a human individual in difficult conditions, cannot always find a managerial action adequate for a problematic or other operational situation. This is especially pronounced on modern ships with a high level of automation, when the navigator must almost instantly make decisions aimed at meeting the many requirements put forward by the operational situation (safety of navigation, energy savings, environmental safety, etc.). Another example is the impossibility of a representative of the organization for the classification and survey of ships for a relatively short survey period to completely check the technical condition of a ship and its elements, or at least all elements of the power plant (EPP) of the ship (in reality, the method of selective control, as a result of which the technical condition of a significant part of the EPP facilities turns out to be untested) (Figure 1). It is here that digital technologies based on knowledge in various fields of technology and the experience of specialists-in other words, artificial intelligence-should replace the intelligence of a human operator, which cannot always cover and evaluate a multi-level problem in its entire multidimensional difficulties. Now, let us restore y. We perform signal regeneration using the wavelet transform inversion:

Mathematical and Software Implementation
With multilevel processing of signals of a complex configuration based on the 'db1' wavelet, it is possible to guarantee an increase in the conversion quality due to a larger volume of digitalization of the process [8]. For definiteness, we perform the decomposition of y at detail level three ( Figure 2). Then,  Now, when realizing the low-pass and high-pass filters, each group of four numbers will be replaced by two numbers. Let the values of the elements of the vector y in the group be equal to x, v, z, and t. Then, we write the first filter as follows: The second filter d is represented by a linear model (1) Now, when realizing the low-pass and high-pass filters, each group of four numbers will be replaced by two numbers. Let the values of the elements of the vector y in the group be equal to x, v, z, and t. Then, we write the first filter as follows: The second filter d is represented by a linear model To calculate the numerical values of the elements of the DB matrix, four equations are required. The first equation can be determined by the requirement of orthogonality c1*c3 + c2*c4 = 0. (2) 1.
It must be true for all linear pairs. The other three equations are determined by the requirements of the Daubechies transform.

2.
The sum of the squares of the coefficients must be equal to one since for a single determinant, DB will also be equal to one.

3.
Transform k*c4 − k*c3 + k*c2 − k*c1 = 0 (4) for any equal k-for example, k = 1, it must take zero values. The solution of the system of nonlinear Equations (2)-(5) is possible only by numerical methods. For this purpose, we will use the fsolve function in the Optimization Toolbox of the MATLAB package.
Here is a fragment of the solution, with the account of the function syntax.
For this purpose, we introduce the following notation: Let us compose the file function sah568hh.m with Equations (2) Note that the ultimate goal of solving F is to turn the rows of the matrix equation back to "zero", which creates certain convenience while working with the function. The function is called at each iteration from the main file sah568h.m, a fragment of which contains the initial approximation vector x0, options for displaying the solution on the display, and the fsolve function. Upon completion of the search for a solution, the vector x and the criterion for evaluating fval are displayed (Table 1)   Substituting the numerical values of the elements of the vector x into Equation (1), we obtain the determinant of the Daubechies matrix equal to det (DB) = 1.0000, as well as the condition DB −1 = DB T , which indicates the accuracy of the solutions performed.

Discussion
Wavelet transforms are a modern signal-processing mechanism applicable for diagnosing the characteristics of elements and systems of a ship's power complexes. Wavelets are a special class of functions with orthogonal properties, capable of performing shift and scaling (stretch/shrink) operations. The Haar and Daubechies wavelets are most commonly used in practice. Any wavelet generates a complete orthogonal system of functions. Wavelet analysis of the signal allows one to evaluate the differences in characteristics. Due to the property of completeness of the wavelet transform, it is possible to carry out recovery (reconstruction or synthesis) of the process with an estimate of the error. The "technology" of processing one-dimensional signals using Haar and Daubechies wavelets is considered. Other solutions remain at the discussion stage, in application to diagnostics of the technical condition of ship electrical complexes and ship automation systems based on new effective wavelet transformations, which should be the subject of further research.
The classification of signs and parameters of the technical condition of marine diesel engines has been made. The diagnostic parameters are differentiated by the level of information content. The ways of using information content when choosing the minimum set of diagnostic indicators that provide a given accuracy and reliability of diagnosis are shown [15,16].
The statement about increasing the accuracy of experimental data using the spline interpolation function was worked out in a specialized laboratory of the university on official licensed software.  The graphs of the coefficients for the three-level decomposition are shown in Figure 3. The inverse wavelet transform is implemented using the signal reconstruction functions provided in the file. Figure 4 shows the original and recovered signal characteristics. It can be seen that two "spikes" in the original characteristic are also displayed in the model generated by the inverse wavelet transform.

Discussion
Wavelet transforms are a modern signal-processing mechanism applicable for diagnosing the characteristics of elements and systems of a ship's power complexes. Wavelets are a special class of functions with orthogonal properties, capable of performing shift and scaling (stretch/shrink) operations. The Haar and Daubechies wavelets are most commonly used in practice. Any wavelet generates a complete orthogonal system of functions. Wavelet analysis of the signal allows one to evaluate the differences in characteristics. Due to the property of completeness of the wavelet transform, it is possible to carry out recovery (reconstruction or synthesis) of the process with an estimate of the error. The "technology" of processing one-dimensional signals using Haar and Daubechies wavelets is considered. Other solutions remain at the discussion stage, in application to diagnostics of the technical condition of ship electrical complexes and ship automation systems based on new effective wavelet transformations, which should be the subject of further research.
The classification of signs and parameters of the technical condition of marine diesel engines has been made. The diagnostic parameters are differentiated by the level of information content. The ways of using information content when choosing the minimum set of diagnostic indicators that provide a given accuracy and reliability of diagnosis are shown [15,16].
The statement about increasing the accuracy of experimental data using the spline interpolation function was worked out in a specialized laboratory of the university on official licensed software.

1.
Wavelet transforms of one-dimensional discrete signals based on Haar and Daubechies wavelets consist of determining the parameters of low-pass and high-pass filters for expansion in a basis constructed with a wavelet by means of scale changes and transfers. Each of the basis functions characterizes its spatial (temporal) frequency and localization in physical space (time).

2.
For a simple signal consisting of eight measurements of the hourly fuel consumption, a method of dividing into groups is proposed, making it possible to obtain a Daubechies matrix of dimensions (8 × 8). The determinant of the matrix is equal to one, and the orthogonal properties made it possible to ensure the equality of the transposed and inverse Daubechies matrices.

3.
The elements of the Daubechies matrix were determined by numerically solving a system of nondelinear equations in the MATLAB environment, for which a file function was compiled that allows the "zeroing" of matrix rows containing the conditions of orthogonalization and consistency of the determinant. 4.
In parallel, calculations were performed using the functions of the Wavelet Toolbox package, which confirmed the accuracy of the transforms and solutions during the expansion and synthesis of the original function.

5.
An algorithm was developed for working with one-dimensional discrete signals, i.e., vectors of large dimensions. This algorithm is used for the wavelet transform of pressure in the cylinder of a marine diesel engine. Two "spikes" were introduced into the signal containing the numerical values of the pressure at the points of information retrieval, which, along with the main signal, were reconstructed using the components of the three-level approximation A3 and the details D1, D2, and D3. 6.
It is shown that in order to improve the efficiency of work with wavelet transforms, it is necessary to study the processes in relation to specific objects. 7.
The main objective of wavelet analysis in diagnosing and monitoring a ship's power systems is to establish relevance between the standard evaluation criteria and wavelet coefficients.

Conflicts of Interest:
The authors declare no conflict of interest.