Decision Problem on Imperfect Inspections Combined under Two-Stage Inspection Policy

Although one can presently observe great development in the methods for diagnosing conditions of technical systems, inspections which are not 100% accurate are still common in industry. If there are multiple available inspection methods which differ in accuracy of diagnosis, cost, or testing time, the answer for the question: which inspection method should be chosen is not a simple task. This paper addresses the problem and proposes a two-stage inspection policy model whose aim is to combine inspection methods that differ in their accuracy and cost features. The two-stage policy models that have been used so far in the literature assume that the second stage of an inspection is perfect, which is not always possible or profitable. For this reason, the mathematical model of the two-stage inspection policy with not-necessarily-perfect second stage is developed here, and its results are presented for the case study of diagnosing sealing in a hydraulic cylinder. The example proved that the application of mixed imperfect inspections could decrease maintenance cost, compared to the one-stage perfect inspection policy, by up to 35%. The paper also formulates a set of rules that support decision making while searching for cost-effective parameters of the two-stage policy. Their application is confirmed by a numerical example, which shows their potential in suboptimization of the proposed policy.


Introduction
Deterioration in time is an inevitable characteristic of many technical systems. A suitable preventive or predictive maintenance policy, when applied in a system, increases system safety due to the elimination of unexpected failures, facilitates scheduling of maintenance operations and resource usage, as well as increases the system's availability. Most technical systems do not fail suddenly, and symptoms of a future failure may be observed some time before the failure will occur [1]. If the symptom is known and discovered when it exists, maintenance decisions and actions can be taken to protect a system from a future failure. This assumption is the basis for the condition-based maintenance strategy. The delay-time concept introduced by Christer [2] can be considered as a simplified condition-based maintenance model with only binary states space [1]. It reflects the twostage character of a failure process and is extensively used in the literature to model and optimize condition-based maintenance policies. The delay-time concept considers that there are two subperiods in the course of system operation: from the new to an initial point when a defect can be first observed, and then from that point to a failure. The time from the initial point of an identifiable defect to a failure is called the delay-time [1][2][3]. Reviews of the delay-time models may be found, e.g., in [1,4,5].
The condition-based maintenance (CBM) strategy has gained a lot of attention from practitioners and scientists over the last few decades. Potential savings resulting from the predictive maintenance application in comparison to the preventive maintenance applied alone in industrial systems are significant. They are estimated to be about 25-35% of maintenance costs, 70-75% of the number of unexpected failures in a system, and 35-45% of the maintenance operations time [6]. The application of CBM in a system requires correct system state identification to learn whether a failure is imminent or if the system can still operate. However, such identification requires additional expenditures on inspection (i.e., device, labour, logistic, and system unavailability costs), apart from typically considered costs of failure (i.e., system unavailability and restoring costs, safety consequences cost) and maintenance (i.e., system restoration and unavailability cost as well as maintenance equipment and labour costs) [7]. This trade-off between CBM costs makes the maintenance policy optimization a complex task and requires the right identification of optimization criteria (e.g., a cost ratio or system availability) and problem constraints (e.g., limited budget, limited time or labour resources, availability of inspection and rehabilitation methods, etc.) [8]. The most advanced form of system diagnosis is continuous monitoring, but it often happens that it is more profitable to use periodic inspections to reveal an actual condition of a system [9]. Despite the existence of advanced testing methods, there are also cases of technical systems where unerring inspection methods are unavailable or application of a perfect method is very expensive and thus, it is unprofitable. The term of a perfect inspection means the inspection method which always allows one to correctly diagnose a real system condition. Examples of complex technical systems where only imperfect inspections are often applied are critical facilities [8,[10][11][12] (e.g., buildings, bridges, power lines, transportation infrastructure, etc.) where perfect methods cannot be used due to scale of the facility, a budget-limiting (e.g., a large bridge) or defect phenomenon (e.g., internal structural abnormalities of a building). Nevertheless, the potential failure cost of such an object can be huge and for this reason the system condition must be diagnosed. Inspection methods that can be used in such cases are, e.g., visual inspections made physically by specially trained staff or remotely by less accurate but cheaper unmanned aerial vehicles [10][11][12], dimension, shape, or other non-destructive measurement of all (highly expensive) or only critical components (cheaper solution) of an object [13,14]. The lower scale examples of elements subjected to imperfect inspections are blades of a pump whose perfect inspection usually requires pomp disassembly, steel rope suspending an elevator which can be perfectly diagnosed only by expensive non-destructive methods, or machine internal sealings whose perfect diagnosis may be impossible without cost-and time-consuming disassembly of the machine. In practise such defects, if not monitored continuously, may be periodically diagnosed by visual, sound, thermic, vibration, or other signals with different methods. The methods are not always precise and may indicate a system condition with some limited accuracy but often with much lower cost and inspection time than available perfect methods. These practical examples show that sometimes it is impossible or unprofitable to use perfect inspection methods when cheaper, but less accurate ones are available. Their advantages may be used jointly to obtain satisfying cost and reliability results. It leads to the conclusion that the inspection accuracy can be treated as a decision variable in the condition-based maintenance optimization problem.
The purposeful management of inspection accuracy applied in a technical system which is periodically inspected is not very extensively explored in the literature. However, Wang in his review on the delay-time modelling [1] points out that modelling the inspection level is one of the topics that deserves further research. The management of periodic inspection accuracy is met in the literature in the form of three basic approaches. The first is just a simple comparison of the results of the available inspection methods and deciding which is the best for the sake of a chosen optimization criterion [7,15]. The second is the combination of two inspection methods with different accuracies and different frequencies in a common inspection policy [16][17][18]. The third approach, which is the point of preoccupation of this paper, is the application of the two-stage inspection policy. In such a policy, an imperfect or initial inspection is executed and after discovering defect, a perfect inspection is applied to confirm the system state [19][20][21][22][23][24][25]. The detailed analysis of literature on this issue is presented in the next section of the paper. It has shown that there is an insufficient number of models and methods that may support decision makers in their optimization dilemmas if available inspection methods differ in costs and accuracies. Most literature models consider the usage of a single imperfect method or two methods jointly, an imperfect and a perfect, under the same inspection policy. They never assume that all inspection methods applied under one policy are imperfect, nor evaluate results that a such solution can have on inspected system results. This shortages in the inspection accuracy planning and managing have been the premise for defining the goal of this paper. The objective is to develop the mathematical model of the two-stage inspection policy in which the second stage can be imperfect and present the results of the research study and its economic potential. The results enable the definition of relations which can support decision process concerning the selection of periodic inspection policy if perfect methods are unavailable or economically unjustified. Following this goal, the main contributions of this paper are presented below: • the paper proposes a new alternative two-stage inspection policy in which the second inspection stage can be imperfect; • the mathematical model of the proposed policy is developed here and compared with the one-stage inspection policy; • the application of the proposed policy is presented for the case study of a hydraulic cylinder seal; • the range of decision variables deciding on predominance of the two-stage policy over the one-stage inspection policy is defined on the basis of the research; • the rules are formulated; they may support decision-making when the cost-effective parameters of the two-stage policy are researched.
Following the defined goal and contributions, the structure of the paper is as fol-lows. In the second section, the literature review is presented. In the third, the methodology, assumptions, and the mathematical model of the two-stage policy with a not-necessarilyperfect second stage of inspection are exhibited. In the fourth part, the results of the case study are shown. In the fifth section, the cost difference is demonstrated for the case study when the one-or two-stage inspection policies are applied. Based on the analysis of the cost difference and case study results, the set of rules supporting decision making concerning the parameters of the two stage policy is formulated. The article ends with conclusions and directions for future research.

Literature Review
Although a great development in diagnosing methods of system conditions can presently be observed, imperfect inspections are still common in industry [1]. The accuracy of an inspection may be influenced by, among others, kind of a measured signal, measurement errors, measurer experience, limited knowledge about the relations between technical parameters measured in a failure process, and the reliability or functional state of an inspected system [19]. The accuracy is quantified by the probability of false positive or false negative inspection error [21,[26][27][28][29]. Most literature models deal with the impact of false negative and false positive mistakes on the maintenance process results by the optimization of various process parameters: time between inspections [15,[30][31][32][33], time to the first inspection [15], the number of inspections in various phases of a system operation [34], the number of inspections before a planned replacement [16,24,28], or the length of replacement delay after defect recognition [32].
Very few papers consider the fact that the accuracy of periodic inspection can be intentionally shaped or chosen, even though in the literature it is pointed out that the cost of inspection is usually an increasing function of its accuracy [35]. Such a dependency between inspection accuracy and its cost causes that a decision maker has a choice and can optimize inspection policy by choosing the best inspection method or methods in systems which may be diagnosed with different methods. Such a decision should be taken after identifying optimization constraints important in the maintained system and after definition of the optimization criteria, which is usually expressed by system cost or availability. In this way, the inspection accuracy becomes one of the decision variables of a maintenance policy. However, there is still a lack of optimization algorithms that might be used to support the optimization process. Models that are typically developed in the literature allow one to estimate inspection and maintenance policy results for a given inspection method. They, however, do not define optimization (or rationalization) algorithms that could support the decision process.
The approaches that are used to manage and optimize methods of periodic inspections may be divided into three groups, which were briefly presented in the previous section of the paper. The first approach assumes that if there is more than one inspection method available in a system, the results of each method for various values of decision variables (mainly inspection interval length) are evaluated, and then the best solution is chosen. Such an approach is presented in [15]. Cai et al. consider a one-element system in which three levels of inspections may be applied for detection of crack initiation. They differ with costs and the probability of false negative mistake. The probability of the error decreases over time as the crack propagates. The authors develop the mathematical cost model of the maintenance process and propose a procedure to optimize its cost with respect to the period between inspections, their level, and the time to the first inspection. In [7] Kuboki et al. consider the problem of various inspections methods applied in maintenance of warehouse infrastructure. They model the degradation in time of multiple components such as belts and pulleys and use the genetic algorithms method to find the best combination of three available inspection methods in the system. The literature models found which present this approach are limited to the positions [7,15]. Other models available in the literature focus on the results modelling of imperfect inspection application in a system with given assumptions and treat inspection accuracy as a given parameter of the maintenance policy (e.g., [28,31,[36][37][38][39]). Such models may be easily applied to evaluate results of available inspection methods varying due to their accuracy. Only authors in [7,15] present the choice of inspection method explicitly as a decision problem and make the effort to develop the optimization algorithm for the inspection level picking.
The second method of inspection accuracy management is the combining of two inspection methods with different possibilities of revealing defects in a common inspection policy. They are carried out in a system in different inspection intervals [16][17][18]40]. The number of publications modelling this issue is not sufficient, but higher than in the first group. In [16] Wang considers a system in which two kinds of inspection are applied. The minor inspection, carried out every T period, may reveal a minor defect with a limited probability, but it is perfect when there is a severe defect in the system. The major inspection, applied every iT, perfectly detects minor and severe defects. Wang compares the policy of minor and major inspections with the policy that uses only one of these types. He concludes that the policy with two kinds of inspections is better for the tested case; however, its profitability strongly depends on system characteristics. The decision variables considered in the model are the periods between minor and major inspections, and the time of the delay since the severe defect was discovered until the following replacement. In [17,40] Wang uses the delay-time concept to consider multiple nested inspections in a multicomponent production system. The inspections are perfect; however, every higher level of inspection tests a wider part of the system. This is, in a way, an imperfect inspection with different accuracy when looking from the point of view of the whole system. Inspections of different levels are executed in different intervals, and the cost-optimal intervals for them are searched in the paper. In this paragraph the group of papers which deal with imperfect inspections applied in a system with different frequency [21,22,26,41] should also be mentioned. In fact, they consider the application of the same inspection method during the lifetime of a system but optimize inspection intervals dividing the lifetime into phases resulting, for example, from 'weak' and 'strong' elements working in a system [21] or system aging [26]. Even though neither of these models treats inspection accuracy as a decision variable like the papers [16][17][18]40], they all confirm the fact that the right management of imperfect inspection frequency is 'generally better than the one-phase inspection' [41] (p. 1) policy.
The third way of inspection accuracy management, which is the point of interest in this paper, is the two-stage inspection policy. In this concept an imperfect or initial inspection is executed and after discovering defect a perfect inspection is applied to confirm the system state [19][20][21][22][23][24][25]. There are few works on the matter and none of them considers application of two imperfect inspections in a common inspection policy. Berrade et al. [21] model a protection system composed of weak and strong elements, which is inspected periodically with methods that can be false negative and false positive. They consider one-stage and two-stage policies and search the best inspection intervals to reveal defects of weak and strong elements, and the moment of a planned, preventive maintenance. The two-stage policy appears to be about 25% more expensive than the one-stage policy in their case study. In contrast, in [22] Berrade et al. consider the same system operating in a finite time horizon. This time, the authors confirm the cost-predominance of the two-stage inspection policy over the one-stage. The two-stage inspection policy for a two-state system is also examined in [25]. Parmigiani develops the analytical model of operating and maintenance costs in a system with a one-stage failure process, and the conclusion from his research is that the two-stage inspection policy can be better than the one-stage policy, but the decision should be made after a careful comparison of both policies. The two-stage inspection policy is also analysed in [23]. Wang et al. assume there that a degradation signal of a system in consideration is continuously monitored by an imperfect testing method, which makes up the first stage of inspection. If a measured signal value exceeds a threshold level, perfect manual inspections start to be executed in the system. The authors' goal is to optimize inspection intervals and the threshold level with respect to the cost of the inspection and maintenance process. Similar assumptions are taken in [20]. In the result, the authors conclude that the two-stage policy with imperfect inspection of the first level 'always leads to the minimum long-run maintenance cost rate' [20] (p. 311).
The literature findings prove that the two-stage inspection policy with an imperfect first stage of an inspection can be costly but fruitful when there is more than one testing method available. However, none of models assume that the second stage of the two-stage inspection policy can also be imperfect, but such a solution may be even more economical than the policies presented above. This gap was the basis to define assumptions and the goal of the developed mathematical model of the policy which considers the possibility of applying an imperfect method as the second stage of an inspection. In addition to the first shortage, there is still insufficient number of results that examine the effect of applying various periodic, imperfect inspections under a common maintenance policy and support decision process in such cases. Even the models presented above, apart from [7,15], do not define any optimization rules or algorithms that could facilitate decision-making on the best inspection methods combination. The shortage of the results that could be supportive when deciding whether it is better to use perfect inspections (if they are available) or to combine a few imperfect methods under a common policy is fulfilled by the conclusions drawn from this research. The rules defined in the paper may be used when one searches the economic parameters of the two-stage inspection policy in a system, where imperfect inspections can (or must) be used.

Two-Stage Inspection Policy with Imperfect Second Stage-Methodology
To complete the aim of the paper, at the beginning, the mathematical model of the two-stage inspection policy with imperfect second stage is developed. The model evaluates the long-term cost of the system per unit of its operation time. In the next stage of the study, the model is used to analyse its economic potential in the case study of the piston seal inspection policy applied to a hydraulic cylinder. Based on the results of the analysis, the set of dependencies between reliability parameters of a system, decision variables of the policy, and its resulting profitability is identified. They are used to define relations between policy decision variables, such as: the precision of applied inspections and the inspection interval length, which simplify the optimization process of the two-stage policy.
To check the correctness of the identified searching rules, they are tested and con-firmed by between policy decision variables, such as: the precision of applied inspections and the inspection interval length, which simplify the optimization process of the two-stage policy. To check the correctness of the identified searching rules, they are tested and confirmed by an additional numerical example. The stages of the methodology applied in the research study are presented in Figure 1.

Assumptions and Notation
At first, basic assumptions and nomenclature taken while modelling are presented.
1. The system in consideration is a one-unit system that may be in one of the three states: normal functioning, functioning with a defect that shows approaching failure and failed; 2. To reveal a defect in the system, an inspection must be carried out, whilst the transition of the system to its failure state is observed instantaneously without any testing; 3. There is more than one inspection method available in the system. They are called inspection methods/levels. These methods differ in cost and accuracy. The application of a lower-level inspection is cheaper and more prone to an incorrect positive diagnosis than a higher-level inspection. The methods are independent of each other; 4. The system is inspected every T period with an imperfect testing method chosen from the available ones, and that constitutes the first stage of inspection. If the first-stage

Assumptions and Notation
At first, basic assumptions and nomenclature taken while modelling are presented.

1.
The system in consideration is a one-unit system that may be in one of the three states: normal functioning, functioning with a defect that shows approaching failure and failed; 2.
To reveal a defect in the system, an inspection must be carried out, whilst the transition of the system to its failure state is observed instantaneously without any testing; 3.
There is more than one inspection method available in the system. They are called inspection methods/levels. These methods differ in cost and accuracy. The application of a lower-level inspection is cheaper and more prone to an incorrect positive diagnosis than a higher-level inspection. The methods are independent of each other; 4.
The system is inspected every T period with an imperfect testing method chosen from the available ones, and that constitutes the first stage of inspection. If the first-stage inspection diagnoses a defect in the system, additional confirmation (the second stage of inspection) of this result with a higher-level method is carried out. If the defect really exists, the second-stage inspection cannot neglect it, but it can reveal a false positive diagnosis; 5.
The accuracy of a level/testing method is defined by the probability of a false positive and a false negative mistake. The probabilities are constant in time; 6.
If a defect is confirmed in the system, the system is perfectly renewed (replaced), and its new renewal cycle begins; 7.
Inspection and replacement times are negligible compared to the inspection interval and are not considered in the model; 8.
The inspection and maintenance process generates the cost of a system replacement, the cost of a system failure, and the inspection cost (dependent on an applied inspection level).
The main notations used when modelling are presented below: • Uβ-the random variable representing the duration of the normal functioning period; • H-the random variable representing the delay time length; n_II_k-the number of n-th inspection method (level) applied in the k-th stage of an inspection, n = 1, 2, 3, . . . ,N, k = 1, 2 if the two-stage policy is applied in the system; • n_I_k-the number of n-th inspection method (level) applied in the k-th stage of an inspection, n = 1, 2, 3, . . . ,N, k = 1 if the one-stage policy is applied in the system; • α n_I_k , α n_II_k -respectively, the probability of a false positive diagnosis if the n-th level of inspection is applied in the k-th inspection stage of the one-stage or the two-stage inspection policy, α n_II_1 ≥ α n_II_2 , α N_II_2 = 0; • β n_I_k , β n_II_k -respectively, the probability of a false negative diagnosis if the n-th level of inspection is applied in the k-th inspection stage of the one-stage or the two-stage inspection policy. The dependency between the probability of errors and the real state of the system, for the example when the n-th inspection level is applied in the first inspection stage, is presented in Table 1; • c F -the unit cost of a system failure; Table 1. The probability of 1st stage inspection results dependent on a real state of the system.

Real state of the System Probability that the System Is Diagnosed as
Good Defected • c In_k -the unit cost of the n-th level inspection level used in the k-th stage of an inspection; • c D -the unit cost of a system replacement; • max{x, y}-maximum value of x and y.

Mathematical Model of Two-Stage Inspection Policy
To develop the model, at first, all the necessary probabilities of events in the system must be considered: of a system failure, its preventive replacement, and inspection. To estimate the probability of a system failure in time, one needs to consider possible scenarios that may lead to a system failure in the i-th inspection interval: the defect appeared in the system during a previous inspection interval; however, it became undiscovered due to false negative inspections until the failure moment; 2. the defect appeared after the (i-1)-th inspection, and the system failed during the same inspection interval. 1. the defect appeared in the system during a previous inspection interval; how became undiscovered due to false negative inspections until the failure mom 2. the defect appeared after the (i-1)-th inspection, and the system failed dur same inspection interval.  The first possible scenario in Figure 2a assumes that a defect appears in the terval period and becomes unrevealed by the two following inspections in t1 and t false negative mistakes, but the system works with the defect until a failure, whi pens during the third inspection interval. The scenario in Figure 2b assumes that appears in the second inspection interval, becomes undiscovered in t2, and system the third interval. Figure  Based on the analysis of underlying assumptions and scenarios, the probabi system failure in the i-th inspection interval: t ∈ <ti-1, ti), for the two-stage imperfect tion policy, if the n_II_1 inspection level is used for the first stage of an inspection n_II_2 level for the second stage, may be expressed: The first possible scenario in Figure 2a assumes that a defect appears in the first interval period and becomes unrevealed by the two following inspections in t 1 and t 2 due to false negative mistakes, but the system works with the defect until a failure, which happens during the third inspection interval. The scenario in Figure 2b assumes that a defect appears in the second inspection interval, becomes undiscovered in t 2 , and system fails in the third interval. Figure 2c presents the third possible scenario leading to a failure in the third inspection interval. The defect arises in the third inspection interval and a failure happens in the same interval. In Figure 2b,c there are also indicated the inspections in t 1 (Figure 2b) and in t 1 and t 2 (Figure 2c) which could have diagnosed an unreal defect during normal operation due to a false positive error. In such scenarios the inspected system would be replaced without a real need and a part of its potential lifetime would be lost. However, it could happen in other possible scenarios of a failure process.
Based on the analysis of underlying assumptions and scenarios, the probability of a system failure in the i-th inspection interval: t ∈ <t i-1 , t i ), for the two-stage imperfect inspection policy, if the n _II_1 inspection level is used for the first stage of an inspection and the n _II_2 level for the second stage, may be expressed: The above formula incorporates the facts that a false negative mistake may occur during every inspection after defect coming with the probability β n_II_1 (the false mistake probability of the first stage of an inspection), whilst a false positive error is limited by the joint accuracy of the first-stage inspection and the second-stage confirmation. Formula 1 is valid only for the cases where β n_II_1 > 0. If the probability of a false negative mistake is equal to 0, to avoid the expression 0 0 , Equation (1) changes into: The probability that the system is in the defective state when the i-th inspection takes place should be estimated like in the previous case. The probability results from the following scenarios: 1.
a defect appeared in the system during a previous inspection interval, however, it became undiscovered due to false negative inspections, and the system is still in the defective state at the moment t i ; 2.
the defect came after the (i-1)-th inspection, and the system still operates at the moment t i .
Thus, the defective state probability is: If β n_II_1 = 0, Expression 3 changes into: The probability of system being in the good state at the moment of i-th inspection is independent of the probability of the false negative mistake, and can be calculated: Based on Probabilities 1-5, one can formulate the expected number of events that can take place during a renewal cycle of the system. The expected number of failures in a renewal cycle is equal: The considered system may end its renewal cycle as the result of two exclusive possibilities-it may fail or may be preventively renewed if a defect is recognised. Thus, the expected number of preventive replacements of the system is: The expected number of inspections is the sum of inspections carried out in the first and the second stages of an inspection. Their numbers, respectively, can be calculated according to the Formulas 8-9. The number of the first-stage inspections is: The expected number of the second-stage inspections is equal: Based on the Equations (6)-(9), the total cost of the maintenance and failure process in a renewal cycle of the system can be formulated: To evaluate the long-run cost per unit time of the two-stage inspection policy with imperfect inspections, the formula for estimation of the expected length of a renewal cycle is developed below.
As previously, Formula 11 is valid only for the cases if β n_II_1 > 0. For the case β n_II_1 = 0, the expected renewal cycle length should be calculated as follows: Using Equations (10) and (11), one can express the cost per unit time resulting from the application of the two-stage inspection policy with an imperfect second stage: CC I I (T, n_I I_1, n_I I_2) = C I I (T, n_I I_1, n_I I_2) The cost model presented above can be used to evaluate the cost effectiveness of the two-stage inspection policy for various inspection levels and inspection intervals. However, when one wants to choose the best policy, if more than a single testing method of a system state is available, one should check if the two-stage policy with imperfect inspections is better than the one-stage policy. To show comparison of the cost results of both policies, the cost model of the one-stage inspection policy is presented below, and later on some results of sensitivity analysis of both policies are shown for a practical case.
The expected number of system failures if the one-stage policy with imperfect inspection is applied in the system is given by the formula: The expected number of preventive replacements in the system, when the one-stage policy is used, may be calculated based on the Equations (16)- (18). It is important to remember that if β n_I_1 = 0, Formula 16 should be modified in a similar way as in Equations (2), (4) and (12). The probability that the system is in the defective state when the i-th inspection takes place: The probability that the system is in the good state at the time of i-th inspection is: The expected number of preventive replacements at the time of i-th inspection is: Finally, the number of the one-stage inspections may be calculated: To compare both policies, in the next section a practical example of the one-and twostage policies is presented.

Failure Process and Inspection Methods
To illustrate the results of the potential application of the proposed two-stage inspection policy, an example of inspections of internal sealing condition, placed on a piston in a hydraulic cylinder, is presented. The case study concerns hydraulic cylinders installed in a group of loaders operating in a Polish mine.
The degradation process of a seal can be divided into two phases [42,43]: (1) the phase of normal operation during which the sealing material has its desired features, (2) the defective state starting from the moment when material characteristics worsen rapidly, for example, due to increased fluid temperature, the aging process, excessive system pressure, wear, etc. The defective state is estimated to be rapid and finally ends with the leakage and total degradation of sealing material leading to further contamination of the hydraulic fluid with particles, which increases the 'rate of wear mechanisms such as abrasive wear, scoring of moving parts, adhesive wear, fatigue wear, and corrosion of hydraulic cylinder parts' [43] (p. 1). Finally, such a defect can exclude a cylinder and the entire machine with the cylinder from operation or even cause a danger situation due to the lack of ability to maintain operation parameters of a cylinder. This moment is understood in this study as a failure. Usually, predictive sealing diagnosis is limited in practice to periodic inspections of visible leakages in an actuator. However, if maintenance staff want to diagnose the condition of a piston seal, which is hidden inside a cylinder, it is not possible to observe leakages. There are numerous methods that have been developed to diagnose an internal leakage in an actuator; however, most of them are not available commercially [43] and are not provided to diagnose sealing degradation before the leakage starts. Observations of practice in the mining industry let one to identify a few methods that could be used to conclude whether a state of internal seal of the cylinder is good or defective. There are, among others, operators' 'feeling' of how the machine with a cylinder works, the periodic measurement of the energy consumption by a machine in which a cylinder is installed, the temperature measurement of the cylinder surface, the temperature measurement of hydraulic oil in the system, the measurement of the oil pressure generated when working (if special equipment is provided in a cylinder) or disassembly of a cylinder and detailed visual inspection of its seal. Only the last method is that which directly tests the diagnosed seal, while the rest can only indicate premises of the seal degradation and are imprecise. They can diagnose a defect that actually does not exist as well as not diagnose an existing defect. However, due to the high cost and time loss when disassembling the cylinder, the direct diagnosis method is never used for planned inspections, unless on occasion of other maintenance activities which require disassembly. Instead of the direct method, which is almost perfect, other testing methods can be applied. However, the question is: which methods should be applied and how frequently, if they are imprecise.
For the purposes of this example, only a few of the mentioned methods are chosen for comparison. They are chosen because they are available for every cylinder without any additional equipment provided structurally. Thus, for comparison reasons, the following methods are considered: (1) the measurement of oil temperature after completing 'normal shift', (2) measurement of the periodic energy consumption by a machine where a cylinder is installed, (3) the temperature measurement of the cylinder surface by a temperature sensor mounted on the surface, executed after a standardized procedure of machine operation, (4) the temperature measurement of the cylinder surface by a thermovision camera executed after a standardized procedure of machine operation, (5) the disassembly of the cylinder and detailed visual inspection of the sealing. The probabilities of errors of both types as well as cost estimates are given in Table 2. Table 2. Probability and cost parameters of the available inspection methods. Because of the lack of any objective research on the issue, the data presented in Table 2 were estimated by experts who represent an academic researcher working in the design and testing of hydraulic systems and a manager in a company producing considered hydraulic cylinders.
Methods 3 and 4 are directly dependent because they use the temperature measured after a standardized procedure of machine operation of a hydraulic cylinder as a diagnostic signal. Their joint application is pointless. For this reason, a combination of the 3rd and 4th methods is not considered in the case. Moreover, one can notice that the temperature threshold, above which the piston seal is diagnosed as defective, can be changed by a decision maker. In such a case, the probabilities of false diagnoses would also change.
The probability distributions' parameters of the time to a noticeable seal leakage were calculated based on the database on the time to a leakage of external sealings, obtained from customers' (mines') complaints reported to the manufacturer. The data from the external sealings were adopted for the estimation of the times to a failure of the internal seal. The expected time of the defective stage was approximated by the experts as well as the unit cost of replacement and failure resulting from the machine unavailability time and material costs. The necessary data are presented in Table 3.

Application Results of Two-Stage Inspection Policy
The potential results of the application of the one-and two-stage inspection policies in the condition-based maintenance of the considered hydraulic system are shown in Figures 3-7. Due to the huge number of considered combinations of joined inspections, the amount of data presented in Figures 3, 6 and 7 is high. However, the aim is to illustrate the general trends in the relation between the one-and two-stage inspection policies and the accuracy of used inspection methods. To simplify, the size of symbols in the figures reflects the probability value of the false positive error of an inspection method which is applied as the first stage policy. The larger symbols represent policies in which α n_I_1 and α n_II_1 have higher values. The most accurate testing methods used in the first stage of an inspection are depicted with the smallest symbols.
The relations depicted in Figure 3 prove explicitly that the one-stage policy is never better than the two-stage policy if the inspection period is set correctly and does not exceed the expected time of sealing's defective state, which is T ≈ 100 [mth] in the tested case. Even the perfect policy (α 5_I_1 = 0, β 5_I_1 = 0) used alone gives a worse cost effect than most of the two-stage options. The comparison of the most profitable solutions found for all the tested one-stage policies and the tested variants of the two-stage policies is presented in Figure 4, while the results of all the tested two-stage variants are shown more clearly in Figure 5. Based on the results presented in the Figure 4, one may conclude that the costs savings that may be achieved by the best combination of imperfect testing methods in the considered example may be up to 35% of the total costs that are incurred if the perfect inspection is applied as the one-stage policy. In the considered case, the best combination is to use the periodic measurement of the one-week energy consumption by a machine where the cylinder is installed (2nd inspection method) as the first stage of an inspection and the temperature measurement of the cylinder surface by a temperature sensor mounted on the surface, executed after a standardized procedure of machine operation with the threshold level of 80 • C (3rd inspection method) as the second stage of inspection. The costs shown in Figure 5 prove that the most profitable variants of two-stage policies consist of: a first-stage inspection with a low value of the false negative error probability β n_II_1 and the second stage with the low positive error probability α n_II_2 . Figures 6 and 7 present component effects of applying considered combinations of inspections, such as the expected number of system failures in a renewal cycle and the expected lifetime of the considered piston seal.
Based on Figure 6 it may be observed that the longer inspection interval becomes, the higher the failure probability of the two-stage inspection policy is for a given inspection interval T. This is mainly the effect of defects overlooked due to false negative errors in the inspection first stage and too rare inspections in comparison to the expected delay time. The disadvantage of the low accuracy of the inspection's first stage may be compensated by more frequent controls. If the one-stage imperfect inspection policy is applied, the negative effect of too rare inspections is partially eliminated by unnecessary (not resulting from a real defect) replacements. On the other hand, the low probability of a system failure ( Figure 6) that might be achieved by frequent imperfect inspections may be uneconomic if the one-stage inspection with high probability of a false positive error or the two-stage inspection policy with the high probability of a false positive error of the second stage are used.

cD
The unit cost of preventive maintenance 2000 [$]

Application Results of Two-Stage Inspection Policy
The potential results of the application of the one-and two-stage inspection policies in the condition-based maintenance of the considered hydraulic system are shown in Figures 3-7. Due to the huge number of considered combinations of joined inspections, the amount of data presented in Figures 3, 6, and 7 is high. However, the aim is to illustrate the general trends in the relation between the one-and two-stage inspection policies and the accuracy of used inspection methods. To simplify, the size of symbols in the figures reflects the probability value of the false positive error of an inspection method which is applied as the first stage policy. The larger symbols represent policies in which αn_I_1 and αn_II_1 have higher values. The most accurate testing methods used in the first stage of an inspection are depicted with the smallest symbols.    In such cases ( Figure 7) the expected lifetime of the system is significantly reduced compared to inspection cases with the lower probability of false positive mistake obtained by the introduction of the perfect one-stage inspection or by accurate confirmation of a defect in the second stage of the two-stage policy. This effect is clearly depicted in Figure 7. There may be two series of results observed there. The trend of increasing lifetime of the sealing for longer inspection intervals is the result of the application of inspection policies (regardless of whether it is a one-or two-stage inspection) with the higher probability of false positive mistake. However, if the first or second stage of an inspection has a low probability of false positive error, even very frequent inspections do not reduce the potential lifetime of the considered sealing. Such a tendency is visible as horizontal lines in Figure 7.        The relations depicted in Figure 3 prove explicitly that the one-stage policy is never better than the two-stage policy if the inspection period is set correctly and does not exceed the expected time of sealing's defective state, which is T ≈ 100 [mth] in the tested case. The relations resulting from the case study analysis can serve as advice when researching the economical parameters of the two-stage inspection policy. The set of rules for how to find profitable solutions of the two-stage policy will be defined in the next part of the paper.

Discussion
The analysis of the proposed model of the two-stage inspection policy with an imperfect second stage confirms some findings from the literature shown in the literature review section. It proves that the two-stage inspection policy is always better than the one-stage policy (Figure 3) if decision variables of the two-stage policy are properly chosen. Moreover, Figure 4 proves that in the presented case study the most profitable results are achieved if the second stage of the inspection is imperfect but cheaper than the perfect one. It shows the possible predominance of the two-stage policy with an imperfect second stage in comparison to the policies considered in the literature, which assume perfection of the inspection's second stage. However, when one wants to apply the two-stage inspection policy in a system, a few questions should be answered: (1) whether it is profitable to use the one-or the two-stage policy, (2) which testing methods should be chosen to apply them alone or in combination, and (3) what should be the length of an inspection period for chosen methods. The optimization process of the proposed complex model is not an easy task and is impossible without applying heuristic methods due to the huge number of possible combinations of policy variables. However, one can use the dependencies shown in the previous paragraph of the paper to search for the most economical solutions of the two-stage inspection policy. To extend the conclusions from the case study, the expressions are given below which allow one to estimate change in expected maintenance costs resulting from applying the two-stage inspection policy instead the one-stage policy.
If one compares the one-and two-stage inspection policies, the two-stage policy is more resistant to false positive mistakes than the one-stage policy for a given inspection period if α n_II_1 ·α n_II_2 < α n_I_1 . On one hand, its application prevents a system from unnecessary replacement; on the other hand, however, it is the reason for the probability of a system failure during the i-th inspection period to be higher for the two-stage inspection policy in comparison to the one-stage policy. Assuming n_I_1 = n_II_1, this increase for a given inspection interval T is equal: Thus, the two-stage inspection policy makes an increase in the expected number of system failures within a renewal cycle, which is equal: Because the failure and preventive replacement probabilities are complementary, the expected number of preventive replacements may be estimated by the formula: ∆ND(T, n_I_1, n_I I_1, n_I I_2) = ND I I (T, n_I I_1, n_I I_2) − ND I (T, n_I_1) = −∆NF(T, n_I_1, n_I I_1, n_I I_2) (22) The change in the expected number of the first-stage inspections during a renewal cycle if the two-stage policy is applied in the system may be described by the formula: ∆N I_1st(T, n_I_1, n_I I_1, n_I I_2) = N I_1st I I (T, n_I I_1, n_I I_2) − N I_1st I (T, n_I_1) = The total increase in costs if the two-stage inspection policy is applied in comparison with the one-level policy is the sum of cost components: ∆C(T, n_I_1, n_I I_1, n_I I_2) = c F ·∆NF(T, n_I_1, n_I I_1, n_I I_2) + c D ·∆ND(T, n_I_1, n_I I_1, n_I I_2) + c In_1 ·∆N I_1st(T, n_I_1, n_I I_1, n_I I_2) + c In_2 ·N I_2st I I (T, n_I_1, n_I I_1, n_I I_2) The expected number of the second-stage inspections (included as the last component of Formula (24)), if the two-stage policy is chosen, can be calculated according to Equation (9) and it constitutes a unique component of the two-stage policy.
Formula (24) depends, among others, on the reliability features of the inspected system. However, if we treat reliability features as constant in a given system (independent of any inspection policy), the cost change in Equation (24) depends only on the relation between false positive mistakes of both policies for a given inspection interval T and does not depend on the false negative mistake of the inspection method used in the second stage. Most of the components of Formula (24) have positive values under the condition α n_II_1 ·α n_II_2 ≤ α n_I_1 and the only decrease that is present in Function 24 represents the expected number of preventive replacements. In all cases where c D < c F , the function ∆C(T,n_I_1,n_II_1,n_II_2) is positive. However, one should remember that the expected renewal period must satisfy the following constraint for every T, if α n_II_1 ·α n_II_2 ≤ α n_I_1 : The above constraint results from the fact that the objective of the two-stage policy is to neglect unnecessary preventive replacements. Formula (24) cannot directly imply the condition for the two-stage policy to be more economical than the one-stage policy. Noenetheless, based on the results of the case study presented in the previous section of the paper, one can notice that the two-stage policy is always more profitable than the policy of a one-stage inspection for every inspection period T shorter than the expected length of the system delay time (Figure 3). In this range of T, for which the probability of system failure is low (close to 0) if the two-stage policy is applied, the increase in Formula (21) is also low (close to 0). At the same time, the expected lifetime of a diagnosed system is much longer for the two-stage policy than for the one-stage policy in this range. It implies the fact that within this area of T, the two-stage policy should be the cheaper policy than the one-stage inspection variant.
The conclusions from the practical case and the analysis of Equations (20)-(25) allow one to define the main dependencies between the one-and two-stage policies which can support the research process for a profitable version of the two-stage inspection policy. They are valid if the available imperfect inspection methods are significantly cheaper than the available perfect methods. The dependencies may be summarized in the following way: • the inspection interval of a system cannot be longer than the expected length of its delay-time, and this expected delay-time may be treated as the initial length of the inspection interval for the two-stage policy; • the first stage of an inspection should use an imperfect testing method with low probability of false negative mistake only if its unit cost is lower than the cost of the available perfect method (if a perfect method exists); • the inspection interval should be reduced 'w' times (for 'w' satisfying the condition: (β n_II_1 ) w ≈ 0) if n-th inspection method is applied as the first stage of the inspection; • the necessary (but insufficient) condition for n-th method applied as the first inspection stage of the two-stage inspection policy to be more economic than m-th method is: c In_n /T n < c In_m /T m , where: c In_n , c In_m are unit costs of application of respectively n-th and m-th method, and T n , T m are the reduced inspection intervals respectively for n-th and m-th method; • the second stage of an inspection should utilize the testing method with the low probability of false positive mistake; • the necessary (but insufficient) condition for m-th method applied as the second inspection stage of the two-stage inspection policy to be more economic than p-th method is similar to the first stage condition: c In_m /T n < c In_p /T n . However, this time, the denominator of the expression must represent the inspection interval chosen for the needs of the first stage of the inspection.
The rules presented above are very simplified and they define necessary, but not sufficient conditions, for a given combination of imperfect inspection methods to be most profitable out of all possible combinations. Nevertheless, they may be used to support economical solutions searching in a very easy way, which is their main advantage. To confirm the validity of the rules, an additional numerical case is presented below. The aim of this new, numerical example is to check whether the rules are also valid for a case with quite different system reliability characteristics than in the case study as well as different inspection costs and probability of errors. The assumptions for the example are as follows: 1.
there are three inspection methods that can be used separately as the one-stage inspection policy or jointly as the two-stage policy; 2. the data on system reliability, costs, and accuracies of inspection methods are presented in Table 4. The unit cost of inspection was established as a function: c In = 100·(1 − 2α n )·(1 − 2β n ) to relate the inspection costs and its precision.  To satisfy the rules defined in this paragraph, the initial inspection period should be established first: T ≈ 30 [units of time], which is the value close to the expected delay time. Then, the possible methods for the first stage of inspection should be examined. The methods with the lowest values of β n , preferred in this example, are: n = 3, β 3 = 0 or n = 1, β 1 = 0, 1.

•
If one decides to use the 3rd method, there is no need to reduce the initial inspection period because β 3 = 0 and the near-the-best inspection period is According to the necessary condition regarding the profitability of the application of a given method in the first inspection stage, it seems to be more reasonable to use the 1st method as the first stage with the frequency T 1 ≈ 15 or T 1 ≈ 10 [units of time], because the following condition is met: c In1 /T 1 < c In3 /T 3 for both variants. After choosing the method applied in the first stage, the methods with the lowest α n , should be considered for the need of the second stage of the inspection: n = 3, α 3 = 0,1 or n = 2, α 2 = 0,2.

•
The false positive mistake from the combination of the 1st method applied in the first stage and 2nd method in the second stage is: α 1 ·α 2 = 0,4·0,2 = 0,08 with the additional unit cost It seems reasonable to use the combination of the 1st and 2nd inspection methods. To prove whether the chosen sequence of inspections is cost-effective compared to other possible solutions, the cost results calculated for all combinations of available inspection methods are depicted in Figure 8. To make the figure readable, the data obtained for T < 10 are not shown because the costs are much higher in that range than the depicted. . It seems reasonable to use the combination of the 1st and 2nd inspection methods. To prove whether the chosen sequence of inspections is cost-effective compared to other possible solutions, the cost results calculated for all combinations of available inspection methods are depicted in Figure 8. To make the figure readable, the data obtained for T < 10 are not shown because the costs are much higher in that range than the depicted.   Figure 8. The first represents the application of one-stage inspection policies using methods with a low probability of a false negative mistake (n = 1, n = 3). In these cases, the value of the optimum inspection interval is shifted toward the mean time of delay time of the analysed system. The second trend is observable for one-and two-stage inspections in which the probability of false negative error of the first stage is relatively higher. Then, the cost-optimum interval is significantly reduced, and very frequent inspections are the most profitable. The results of Figure 8 confirm that the chosen combination of testing methods (the purple line) gives one of the best solutions out of all possible. The best solution is found for the shorter out of the considered inspection periods (T = 10 [units of time]); however, both   Figure 8. The first represents the application of one-stage inspection policies using methods with a low probability of a false negative mistake (n = 1, n = 3). In these cases, the value of the optimum inspection interval is shifted toward the mean time of delay time of the analysed system. The second trend is observable for one-and two-stage inspections in which the probability of false negative error of the first stage is relatively higher. Then, the cost-optimum interval is significantly reduced, and very frequent inspections are the most profitable. The results of Figure 8 confirm that the chosen combination of testing methods (the purple line) gives one of the best solutions out of all possible. The best solution is found for the shorter out of the considered inspection periods (T = 10 [units of time]); however, both solutions found on the basis of the defined rules gives close-to-optimal solution but do not require complex and time-consuming calculations. If one needs to obtain the inspection period for which the cost gets its actual minimum, the Formula (13) can be used for the limited range of T ∈ (0,30).
The conclusions presented in this section of the paper meaningfully extend the results regarding the two-stage policy profitability that may be found in the literature. It clearly defines the range of failure process parameters for which the two-stage policy is better than the one-stage policy. The presented rules can be effectively used when one wants to define the most economic parameters of the two-stage inspection policy in a technical system working in accordance with the delay-time model, in which perfect inspection methods are unavailable or very expensive.

Conclusions
The delay-time model of a failure process is very useful for modelling a degradation process of technical systems. It enables necessary maintenance activities to be done only when the need arises from signals of an imminent failure. Signals can only be identified by an inspection, which can be carried out using various testing methods available in a system. The methods usually differ in their costs and accuracy, and that is why choosing the best method is not a simple task. The research presented in this article considers the inspection accuracy as a decision variable of a condition-based maintenance policy. This approach is rare in the literature, and this paper represents a step towards filling this gap. For this reason, the paper presents the two-stage inspection policy model applied to a system whose failure process is in accordance with the delay-time concept. A quite new issue is the development of the model in which the second stage of an inspection is not perfect. The relaxed assumption about the unerring second inspection stage can have a significant meaning in practice, as was shown in the presented case study. The model can be used to support the selection of an inspection policy in the case when all available testing methods are imperfect or when precise methods are expensive and may be unprofitable. The situation is common in practical maintenance applications. The usefulness of the proposed model was shown in the example of a piston seal diagnosis in a hydraulic cylinder. In this case, five inspection methods were considered and only one of them, the most expensive, was perfect. It turned out that in the case in question the most fruitful inspection policy was the two-stage policy with periodic measurement of the energy consumption executed as the first inspection stage and the confirmation of possible sealing defect by the temperature measurement of the cylinder surface with a temperature sensor. The combination proved that the application of this mix can reduce the maintenance cost per unit time by up to 35% compared to the application of the one-stage, perfect inspection. In addition, the presented case study showed the relations, which were confirmed by the additional numerical example, that most two-stage inspection variants are more profitable than one-stage policy solutions if an inspection period is shorter than the expected delay time of a system. The detailed analysis of the influence of false positive error probability on expected costs in a system, together with conclusions drawn from the case study, were the basis for identifying the search rules useful for finding economic parameters of the two-stage inspection policy. The application of the rules was demonstrated in the numerical example. The example confirmed their application potential if there is a need to choose parameters of the two-stage inspection policy and all available testing methods are imperfect. Even though the rules provide a good basis for developing the simple optimization algorithm for selection of the best inspection accuracy, their results must be carefully examined with respect to the sensitivity to all the variables and parameters of the failure and maintenance process of a system. The mathematical model presented in this paper, the identified range of inspection periods for which the two-stage policy is better than the one-stage policy, and the set of defined rules when choosing effective parameters of the two-stage policy constitute the new contribution of this research to the maintenance theory.
Periodic imperfect inspections are still a common practice in the industry. However, if there is more than one inspection method, they can be combined in different ways: in the form of the two-stage inspection policy, in the form of inspections with various precision executed in different inspection intervals, or in the mix of these two approaches. There is still the need to define in which cases which combination is better from the point of view of cost and reliability results of an inspected, single-but also multi-unit system. The approach also should be extended to test other than just maintenance costs key indicators that can have an influence on the profitability of applying combined imperfect inspections in a system, e.g., on system availability ratio or costs of lower quality of goods produced by an inspected production line. Such research should result in the identification of the optimization rules and methods of the inspection mix in a system with given parameters and the identification of the possible influence of the wrong estimation of inspection error probabilities on the optimization process results. Another extension of the proposed model is its consideration of the case where error probabilities depend on the delay-time length or if there exists a dependency between inspection methods applied in a system. These additional assumptions can demonstrate the advantages of multilevel inspection policies, utilize their advantages, and reduce their shortcomings in practice.