The aim of this paper is to present an analytical method of calculating forces acting on the thumb, index, middle finger, and metacarpal part of a hand prosthesis in a cylindrical grip. This prehension pattern represents a common operation of grabbing and manipulating everyday life objects. The design process assumed that such a prosthesis would have 5 fully operating fingers and 18 total degrees of freedom: three for each finger including the thumb, and another three for the wrist. The assumed load was 1 kg and the diameter equaled 70 mm, representing a water bottle. The method was based on analytical mechanics and as opposed to experiments or numerical methods does not require many resources. The calculations involved solving a system with seven unknown forces using an equilibrium equation for forces and moments in all three axes. The resulting equations were presented in a matrix form and solved using MATLAB software. The validation of the method with an experiment using FSR sensors and comparing it to other reports showed differences in index and middle finger involvement. However, the total sum of forces was similar, therefore it is reasoned that the grip can be performed and the prediction was accurate for the thumb and metacarpal. When using the model, the friction coefficient must be chosen with a safe margin as it influences the grip force. The presented method can be used for other models and designs by inserting their dimensions into the equations and solving them numerically to obtain forces useful in mechatronics design. Its almost unlimited functionality i.e., the ability to grip, manipulate objects, and make gestures is possible due to numerous degrees of freedom and characteristic reverse-oriented thumb. These unique features made it a scope of scientific research with the goal to understand its functionality. It is also known that with aging functionality decreases and what follows—the ability to perform many kinds of labor including everyday tasks such as preparing food cleaning, taking medications, manipulating objects, or making gestures. Even more burdensome in everyday functioning is the case of the lack or loss of the upper limb or its part. Although the surgical removal of a limb is performed only when the patient's health and life are at risk, or when it is not possible to restore the limb's function. In the United States alone there were 1.7 M people with limb loss, which accounted for about 1 in 200 people. Loss of upper extremity is less frequent as it affects about 41,000 persons, which is about 3% of amputees in the US2. Amputation is also a necessity in case of severe infection, a traumatic injury that restricts normal functioning, IV-degree frostbite as well as deep damage of bone tissue because of cancer. The most common disease causing the need to perform amputation is diabetes. In the years 1988–2009 the number of amputations related to this disease has risen by 24%4.As a result of the Afghanistan and Iraq conflicts, there was a need to amputate at least one of the hands in the case of 1558 American soldiers5 and externally powered ones reach $75,0006. Although recently the costs have decreased as Open bionic prosthetics Hero Arm7 became available with a pricing of $3,000 and the True Limb8 device costs $8000 for adults and $4000 for children. There are also worldwide communities such as e-nable that accelerated the availability of 3-D printed prosthetics by gathering volunteers involved with the field9. Also, it is worth to mention one of the first 3d-printed prosthetics from 2012 called, Robohand, which has probably inspired the movement10. The review of upper limb prosthetics from 2017 showed that there are over 50 3D-printable devices, where the cost of materials is below $50011. Application of lightweight materials12 and 3D printing methods to print the skeletal structure13 of a hand15 reduced the cost associated with purchasing a new prosthesis, at the same time adopting it to the individual needs of a patient.The current market offers many kinds of prostheses, which differ in functionality, and thus are priced differently. It is important to underline the fact that the group that is at the highest risk of amputation are patients, that are in the lower social class. This makes it impossible for them to purchase commercial prosthesis, as the cost of body powered prosthesis may cost even be up to $10,00016. All the above indicates how important it is to create fully functional, easy access, and possibly anthropomorphic prosthesis, which will help the amputees to recover independence in everyday tasks as well as grow in other areas.The above data suggest a need for anthropomorphic prosthesis, particularly hand prosthetics, which would enable a return to normal functioning in society. Another important fact is, excluding children born without a limb, the prosthesis process should begin as soon as possible after amputation. It is due to the fact that, there exists a possibility of a patient adapting to the new reality, making it difficult to adapt to the prosthesis. Infants with an inborn flaw should obtain the artificial limb at the age, at which they begin to crawl and walk. Such prosthesis would enable them to move and help with grabbing and holding objects17. Other considerations include the number of digits and the number of electromyography signals that can be obtained. The wrist can also be made functional as opposed to other designs that don’t include such a solution18. The manufacturing technology available to the designer is another factor, historically mostly Fused Deposition Modeling (FDM) printers were used; however, selective laser sintering (SLS) technology is becoming more and more available, as well as multi-material printing techniques, including polyjet19, New methods, and materials are vital as they can lead to new approaches such as bio-inspired ones21. Also, the advantage of soft robotics has recently been reported in non-expert myo-electric users22.The design of such devices was presented in studies that focus on various engineering aspects of the devices. Designers must consider many things, such as using or reusing the existing prosthetic sockets or designing a new one23 through 6 for i-limb24 or VICENTevo325 up to even 8 for TASAKA26. However, this does not translate directly to the number of grips performed can vary from 6 to 2427, although the definition of grip position is sometimes treated differently. Thus, even a slight change of the hand position is treated as a separate position. There is a metric system proposed in a study28 where the performance is benchmarked by fingertip poses. Recently, haptic feedback methods were reported to help obtain more dexterity with a hand29. The low mass of the device is also crucial, as in a survey30, many patients found their devices as heavy. Moreover, limited kinematic or motion possibilities and a lack of adjustability to individual size can result in patients’ dissatisfaction and result in a high abandonment rate32. Therefore, the device must correctly perform the prehension patterns.But most important are patients’ needs, and those include functionality desired for the tasks performed in everyday life, which consists of the number of grips that can be performed. This number is dependent on the degrees of freedom, and those range from 4 for Michelangelo36, but these are general specifications of a device, not for fingers. The calculations of how much force is needed to perform a given grip are less frequent. A study37 developed an advanced hand model that evaluated kinematics, but for a pinching grip. Cylindrical grip evaluations were performed experimentally on subjects grabbing smaller objects38 and with other masses40 and often without the measurement of force on the metacarpal area. One study had similar parameters to ours, but it involved no thumb41. There were also studies on subjects that were performed on multiple grip sizes, but they focused on maximum obtainable forces42(power grips) in cylindrical grips. What was interesting, though, is that with the increasing diameter of the grabbed object, the maximum force decreases43. The downside of experiments is usually the cost of sensors and subject involvement.To design a prosthetic hand that can do those grips or any other grip, the design process should include the steps to make it possible. This can be done by determining the forces needed to perform a given grip by either experiment or analytically and then building a mechanism that can provide such forces on the fingers. The literature and technical documentation for prosthetics usually describes the forces that a device can achieve. These are in ranges of about 70–140 N44. This approach allows the designer to investigate any kind of shape or geometry. Still, those methods usually require commercial numerical software, e.g., ANSYS. There is a need for a methodology that wouldn’t require experiments and be universal. For design purposes, analytical methods are beneficial from a cost perspective. Therefore, it was decided to build a model from scratch and analyze it using the proposed method as well as validate it.Some researchers approached the problem with Finite Element Analysis (FEA), which is a powerful tool, especially for non-linear contacts between fingers and objectsThis study aims to develop an analytical model that could be used for estimating forces necessary to perform any variation of grips, especially the hook and cylindrical grip of hand prosthesis. The main advantage could be the reduced cost of an analytical method compared to the cost of the experiment. The idea was to obtain a method that can be used for different sizes of the hand and various designs. The first Computer Aided Design (CAD) model was developed for testing and computational purposes. Its 3D view is visible in Fig. Prosthetic size must correspond to the size of a handThe Mechanism is to have 18 degrees of freedomThe following assumptions were imposed on a project:1st—for flexion at the distal interphalangeal and proximal interphalangeal joints2nd—allowing flexion in the metacarpophalangeal joint3rd—allowing abduction in the metacarpophalangeal jointThree degrees for each of the II–V fingers for a total of 12 degrees:1st—allowing flexion in the interphalangeal joint of the thumb and the metacarpophalangeal joint of the thumb2nd—enabling the adduction and abduction of the thumb3rd—allows you to oppose the thumbThree degrees of freedom of the thumb.The device must be able to lift 1 kg using a cylindrical grip corresponding to a weight of a 1 L water bottle and 1 kg in hoop grip for easy manipulation of lightweight objects.Anthropomorphism and esthetic designThe mechanism must be enclosed within the prosthesis.Ability to perform 14 types of grips and possibility of performing gestures.Silent workSafety coefficient for the mechanism assumed as n = 1.8.Three degrees of wrist freedom—determining the orientation of the hand in space (the design of the wrist is not included in this work).The first step was to develop a 3D model for calculational purposes. The model would include all the assumptions from the introduction. Next, the analytical mechanics method for calculating forces acting on phalanges in cylindrical grip will be prepared and then solved numerically. The methodology will be based on creating equilibrium equations and determining boundary conditions. To validate the calculations an experiment will be performed on a cylinder with the same dimensions as in the model. To measure the force on phalanges, the force resistive sensors (FSR) will be used similarly to the other experiments found in literature. The results obtained with the method will be later compared to the results obtained in the experiment as well as the reports from the literature. One of the measured outcomes will be the possibility of performing the grip with the forces calculated using proposed methodology and the comparison of load distribution on the fingers.The human hand does not have strictly imposed dimensions. Its size, length of phalanges, and their position are individual traits of every human being. This does not limit the ability to grip, manipulate objects or gesticulate in the case of a fully functioning upper limb. That is why in the design process of a prosthesis a few corrections were made to improve the functionality of the prosthetic hand.The simplified model Fig.  consisteFor the thumb, folding the first two elements from the proximal side, analogous to the remaining fingers, simulated abduction–adduction as well as opposing the thumb. Further two elements modeling the proximal and distal phalanges of the thumb allowed to model the flexion–extension of the interphalangeal and metacarpophalangeal joints of the thumb.45 and 46.The hand orientation was not simulated because it was rigidly assigned to the tested variant. The dimensions of the metacarpals and the arrangement of the fingers were taken from 46.Minor changes have been made to facilitate the design of the prosthesis mechanism, e.g. to reduce the variety of mechanisms and maximize the use of a small design space, the distances between individual phalanges were unified. The metacarpal part has been modeled as one rigid body Fig.  in the sThe axes of rotation were modeled as cylindrical surfaces placed in fixed positions. The axis of rotation for bending was shifted by 12 mm, which enabled to simulate the length of the designed abduction mechanism It was positioned at a distance of 12.5 mm from the inner surface of the metacarpal part, which also corresponds to the mechanical model of the prosthesis. The bending rotation axes were modeled as cylinders with the axis passing through the centers of the frontal phalanges. The whole assembly was mounted on an element enabling the abduction–adduction movement and attached to the metacarpal part , the height of the phalanges was assumed as 12 mm in the calculation model, which allowed for easier modeling of the fingers’ segments. Thanks to this procedure, the correctness of the obtained results was ensured. The height of the segment modeling the metacarpal bone of the thumb was modeled as equal to its width (14 mm). The designed mechanism was considered to be five open kinematic chains, one for each finger and thumb, attached to the casing of the metacarpal part of the hand Fig. .Figure 9i1—corresponding to the flexion in the distal interphalangeal joint, ϴi2—responsible for flexion in the proximal interphalangeal joint, ϴi3—responsible for the flexion in the metacarpophalangeal joint,ϴi4—responsible for abduction in the metacarpophalangeal joint.ϴThe kinematic of the index (i = 2), middle (i = 3), ring (i = 4) and little (i = 4) finger is described by four angles:i1—the bending angle between the distal and proximal phalanges of the thumb,ϴi2—the angle of flexion in the metacarpophalangeal joint of the thumb,ϴi3—angle responsible for the adduction and abduction of the thumb,ϴi4—the angle responsible for opposing the thumb.ϴAdditionally, four angles are defined for the thumb (i = 1):14 = 0° means the position of the thumb parallel to the metacarpal surface of the hand, and the angle ϴ13 = 0° means the position of the thumb is perpendicular to the surface of its fixture.The ranges of all angles are given in Table The mechanism described previously will be used to test the method for calculating the forces in the cylindrical grip, which imitates everyday activities such as holding a water bottle and the second can be used for carrying objects. The model Fig.  was creaA 3D sketch Fig.  was madeIn order to estimate the loads on the model the number of unknowns had to be limited. It was assumed that each of the fingers exerts the same force on the cylinder at each point of contact between the phalanx and the cylinder. The model revealed that for the index finger, contact occurs for two distal and middle phalanges, the same situation excluding the involvement of the proximal phalanx occurred for the middle finger. Two points of contact were also read for the thumb on both of its segments. In the middle of the contact length of the inner part of the metacarpus, the concentrated force transmitted by this segment was assumed. A total of seven touchpoints were obtained. A system of statics equations was developed for the block with four unknowns: the force acting from the thumb, the force acting from the index finger, the force acting from the middle finger, and the force coming from the metacarpal part. The first three of which act from the two phalanges of the corresponding finger, differing in the point of application and direction. It was assumed that the forces selected in this way are to transfer the weight of the modeled water bottle. Here the own weight of the phalanges is not considered as it is analytical model used for calculating forces on fingers in a grip. However, the mechatronics model of the device should contain such calculation and the transferring forces are not negligible.Next the equilibrium Eqs. –6 for thg is the gravitational acceleration, here assumed as 9.81 m is the mass of the cylinder/bottle, in this case 1000 g;n is number on points of contact between the prosthesis and the cylinder, in this case n = 7 since there are 7 contact points;i, Fyi, Fzi are forces in the x,y and z direction respectively on each of the contact points. The force Fz was the result of the friction by which the block was held;Fxxi, yi, zi) are points of force application. They were read from the 3D model.The coordinates  defining the direction of the forces applied to the phalanges. For this purpose, the 2-argument arctangent was used Eq. . It is aThe π shift was made to adjust the sense/direction of the forces acting on the cylinder.Finally, the equations were written in the matrix form M ∙ F = Q.where:M—system dependence matrix Eq. .F—matrix of the forces sought Eq. .Q—system load matrix Eq. .14\documFor parameters X,Y,Z given in Eqs. TH, FID, FMD and FMC). The values are given in the Fig. The problem was solved by implementing the appropriate code in the MATLAB software using the equation: F = M\Q and the resulting modules of forces acting on phalanges and the metacarpal part were obtained  for measurements as they were available, and the range of forces expected in the experiment matched their measurement range. The downside is that they require calibration and offer mediocre repeatability of measurement cycle-to-cycle. Nevertheless, such a solution was used for the cylindrical grip. The 70 mm cylinder used in the analytical model has been 3D printed with space inside for 500 g and 200 g weights (300 g print) to achieve the 1 kg mass Fig. . A small47 were used to gather data from the finger phalanges . They have 20 mm diameter large measurement area to which the pressure can be applied. The downside of such sensors is that the repeatability of force measurements is far from ideal (+ /- 25%), and the sensors must be calibrated, yet even then the repeatability is around 5–10%. Other sensor had to be used for the metacarpal part of the hand, since the contact patch on a real hand consisted of multiple points along a metacarpal joint line. In the experiment it was decided to place the sensor under the heads of metacarpal bones and perform the grip in such a way that the contact with cylinder occurs only through the sensor. The 2730 sensor48 was used, which is a 20 mm wide strip sensor. Other recommendations on how to improve the uncertainty and repeatability made by the manufacturer are stored in the integration guide49. It wasn’t possible to follow all of them due to the experiment setup, but the following was done:The current-to-voltage circuit was used instead of the voltage divider. This allowed to measure the force more precisely, yet calibration and curve fitting was necessary. For the hardware part, the operational amplifier LM-741 was used with 50 KOhm R0 resistors. All electronics were placed on a breadboard, and the power and data gathering were performed on the Arduino prototyping board. Setup is depicted schematically in Fig. Calibration was performed using a digital scale with the cylinder placed on it sideways, with a sensor targeted for calibration on the upper side of the cylinder Fig. . The forThe FSR 402 sensors50.For the initial calibration of the sensors and the final measurement, the same applicators were used (fingers) instead of dead weights, which means the contact patch with a sensor stays similar. The values were read every + /- 100 g and the corresponding FSR reading was stored in the spreadsheet. As mentioned before the resistance was fine-tuned to obtain linear output-to-weight relation between 200 and 400 g (2-4N). This was necessary to limit the uncertainty of the obtained results.The friction coefficient used in the model was assumed to be equal to 0.6 for plastic-to-rubber, as those were the mating surface’s materials. This should be reproduced as faithfully as possible; therefore, a nitrile glove was worn during the validation to simulate the contact. The real coefficient might depend on many other factors such as surface roughness, thus it might not be the same for the experiment in the real world. Also, a barehand grip was performed to see how much it influences the result.This provided the relation between weight measured on the scale (and thus a force) and reference output voltage that could be used later for fitting the data. It was mostly repeatable for the 402 sensors with the same R0 resistor, but different for the metacarpal strip, as it was a 20kOhm. The metacarpal sensor also used the LM324 op-amp and circuit from this open-source projectThe measurement procedure was to grab the cylinder by placing each finger on the sensor and aligning the metacarpal part on the strip sensor. A care was taken not to touch the cylinder in places other than the sensor area. Then the cylinder was lifted until the measurement of the weight was equal to zero Fig. . The outThe gathered data was processed. First, the calibration curves were obtained using points gathered during calibration. Next, the gathered outputs from the measurements were recalculated into the weight on the finger using the linear interpolation Eq. . This waThe resulting weights were recalculated into Newtons and the results have been presented in the graph Fig. . The calThe results were subjected to statistical analysis, and they are presented in Table To compare the method and the results from experiment, outcomes from other studies, with subjects, were used. Although the setups were mostly different in terms of geometry and weight, they can still be used to compare e.g., distributions of the forces on the fingers as percentage of the force sum in cylindrical grip. To do this the forces on phalanges were summed by multiplying them times the number of contact points. Although a resultant force should have been used, this approach was consistent with other experiments Fig .Figure 141 and40 were equal to 9.5N, 15N and 19.1 respectively. Although it is difficult to compare directly, since different loads were used, the force predicted for the thumb was higher than measured and reported in other studies. In case of index finger the prediction falls short of the reported values but is higher than the experiment. This is most likely due to the force acting on middle finger that is applied from the same direction and unloads the index finger in the experiment. Therefore, the middle and index finger should be counted together. The load on metacarpal is similar to experimental value but is higher than the load reported in other study even though it was performed on less weight. The ring and little fingers cannot be compared as they were not included in the analysis. Other compared parameter was percentage distribution of force on fingers in relation to the sum of forces visible in Fig. Obtained results show that the sum of forces predicted with the analytical model is similar to the experiment with equal geometry performed on skin-PET interface and slightly above for nitrile glove to PET interface (16.35N vs. 15.81N and 13.84N respectively). The sum from40, however, where the metacarpal part was involved as well as all fingers, one can notice that the load is lower on the ring and little finger. Since those fingers usually aren’t driven in the device due to the limited number of actuators, they were omitted.The prediction for thumb and middle finger matched the experimental values reasonably, however again it can be noticed that index finger and metacarpal area have different results. Nevertheless, sum of forces suggests that the grip can be performed. The over/underestimation can result from the fact that the angles between phalanges could not be replicated exactly, as there are differences between a real hand and the modeled one. In the model, all phalanges were modeled with equal length and shifted on the metacarpal hand, but in reality, they are obviously not identical. The grip was performed without using all fingers thus forces cannot be directly compared to all of the other studies. In the last case41.The analytical mechanics model developed for cylindrical grip allows for approximation of forces that occur in this grip. As it can be seen in comparison to experiments (both ours and from other studies) the prediction does not match the results exactly, but the obtained forces are enough to lift the cylinder, which was also the objective of the validation. The differences include mostly the index and middle finger since these two act in the same direction and a greater portion of the load could be taken by one of them. It is assumed that the difference comes from the friction coefficients that were assumed and the imperfect reproduction of angles between phalanges. In retrospect, a better idea would be to use elastomer under each finger to reproduce the same contact patch each time instead of putting the fingers directly on the sensors. On the other hand, the real-object element would be lost, and forces applied vertically might be recorded as negativeThe total sum of forces predicted by the method was higher in comparison to a grip with both the glove interface and the barehand grip. From an engineering perspective, a method that overestimates the results increases the safety coefficient of the device, thus it is acceptable. When designing a device using the method, care should be taken to choose materials that have high friction coefficient and can be slightly compliant or deformable to increase the contact area with the given object. Even though the dimensions of the model used in the study might be different from the other projects the method can be reused by inserting other dimensions and angles and solving the equations numerically.To conclude the relatively simple methodology presented in the work allows to calculate the forces acting on fingers in cylindrical and hook grip for a given model of a hand without necessity to perform the costly experiments or using commercial numerical software. Although, the equations were solved with MATLAB, any other free package could be used such as Wolfram alpha or they could be solved on a calculator. It contributes to the field of hand prosthesis design allowing for estimation of forces necessary in dynamics calculations when choosing e.g. the actuators based on required parameters in the mechatronics model.Future research could include analytical modelling of other grips and validating them. There exists a handful of experimental studies on this topic, but the solution is mostly valid for the given experiment setup  and interpolated between data points. This allows for approximation of the forces for design purposes, but it is averaged and not case specific. However, from our perspective the methods based on analytical mechanics is also useful, as it consumes less resources, therefore their development is justified. Also, using the methodology to test other designs and observe whether the results are repeatable is warranted (The presented model files are available in Supplementary information Supplementary Information 1.Supplementary Information 2.


The proton exchange membrane fuel cell (PEMFC) is a promising power source, but the short lifespan and high maintenance cost restrict its development and widespread application. Performance degradation prediction is an effective technique to extend the lifespan and reduce the maintenance cost of PEMFC. This paper proposed a novel hybrid method for the performance degradation prediction of PEMFC. Firstly, considering the randomness of PEMFC degradation, a Wiener process model is established to describe the degradation of the aging factor. Secondly, the unscented Kalman filter algorithm is used to estimate the degradation state of the aging factor from monitoring voltage. Then, in order to predict the degradation state of PEMFC, the transformer structure is used to capture the data characteristics and fluctuations of the aging factor. To quantify the uncertainty of the predicted results, we also add the Monte Carlo dropout technology to the transformer to obtain the confidence interval of the predicted result. Finally, the effectiveness and superiority of the proposed method are verified on the experimental datasets. The proton exchange membrane fuel cell (PEMFC) has many excellent properties: renewable, no pollution, high energy conversion rate, fast start-up speed, and low operating temperature ,2. It isThe performance degradation prediction of PEMFC has yielded many fruitful results. The existing PEMFC prediction methods can be generally divided into three categories: model-based methods, data-driven methods and model and data hybrid-driven methods.The model-based methods considered from the inside of the system usually establish mechanism models or empirical models according to the degradation mechanisms of the equipment or the degradation trends of the monitoring data, and describe the changes in the inside of the systems with specific mathematical expressions in order to predict the failure time. Such mechanism models can complete the degradation prediction task without a large amount of online data, such as the method based on particle filter (PF) in . HoweverDifferent from model-based methods, data-driven methods do not need an in-depth analysis of the mechanism and law of equipment degradation but can directly predict the degradation trend of PEMFC by machine learning methods based on monitoring data, such as relevance vector machine (RVM) ,10, echoTo deal with the aforementioned constraints and integrate the strengths of both model-based and data-driven prediction methods, some scholars have proposed hybrid prediction approaches. Cheng et al.  proposedTransformer  is a recWith regard to the performance degradation prediction problem, as we all known that the aging process of the PEMFC is affected by many uncertain factors due to the comprehensive effect of internal structure and external environment, such as the temporal variability, measurement variability, and unit-to-unit variability. So it is more reasonable to use a stochastic process model to model the degradation of PEMFC. The Wiener process can model the non-monotone degradation process and has a clear physical explanation, which is widely used in bearing, turbofan engine and other fields. Therefore, in order to describe the uncertainty of the whole degradation process, a Wiener process model is built in this paper.Another problem with performance degradation prediction is that although data-driven methods can accurately predict the degradation trend, the uncertainty quantification and reliability of degradation prediction are mostly ignored, and only the point prediction result can be obtained. Point prediction is only a deterministic value, which is difficult to provide sufficient guidance for equipment maintenance in practice. At present, the methods of quantitative uncertainty prediction mainly include Bayesian estimation, Gaussian process and hidden Markov method. The Bayesian neural network introduces the probability distribution to network parameters and trains the model by approximating the posterior distribution based on variational inference technique. Although this method can obtain the uncertainty of the network model, it needs to optimize the mean and standard error of the probability distribution at the same time. Many extra parameters are introduced that increase the training time . Applyin(1)With consideration of the uncertainties in the degradation process, a Wiener process model is established to describe the overall degradation trend of PEMFC and multiple kinds of variability sources are adequately considered in the model.(2)To overcome the disadvantage of LSTM in parallel processing, a degradation prediction model is established by transformer, which is used to predict the degradation trend and capture the local fluctuation information.(3)The MC-dropout is added in transformer network to quantify the uncertainty of the prediction results in order to provide more effective decision support for practical engineering applications.According to the above descriptions, a hybrid driven method for performance degradation prediction of PEMFC is proposed in this paper. Firstly, a linear Wiener process considering multiple variability sources is constructed to adaptively estimate the degradation states based on the UKF algorithm and expectation maximization (EM) algorithm. Secondly, the transformer network is used to learn the degradation characteristics and predict the long-term degradation trend of PEMFC. The MC-dropout technology is added to the network to quantify the uncertainty of the predicted results and obtain a 95% confidence interval. Finally, the proposed method is verified on experimental datasets under both static and dynamic conditions and compared with the classic LSTM method. Experimental results show that the proposed method can achieve satisfactory prediction performance under both scenarios and has fewer prediction errors compared with LSTM, which illustrates the effectiveness and superiority of the proposed method. The main contributions of this paper are summarized as follows:The organization of this paper is as follows. The Wiener process model is established in A is the Tafel constant and B is the concentration constant, respectively. The stack current i and operating temperature T can be measured by sensors during the operation of PEMFC. The open circuit voltage The voltage of PEMFC is one of the quantities that can be easily measured during its long-term operation and a semi-empirical voltage model  of PEMFClgorithm  and Levelgorithm .R and the current density R and R and It is demonstrated in ,31 that ch other . In thisConsidering that the degradation of PEMFC is stochastic, we use a Wiener process to model the degradation trend of aging factor R that can reflect the measurement variability.Based on the above description, the aging state estimation of PEMFC can be expressed as a non-linear system:Algorithm 1 The procedures of the UKF algorithm1. Initialization (k = 0):2. Time update:3. Sigma points and weights calculation:(1) ith column of the square root of the matrix where (2) where 4. Measurement updateUKF is a non-linear filtering algorithm . AccordiR are estimated. Aiming at the problem of unknown parameter estimation in the adaptive state space model based on UKF, the EM algorithm is used to estimate these parameters by using the voltage data from the initial time to the current time. The parameters are denoted by The degradation model is initialized after model parameter eference .The degradation of PEMFC is a long-term time accumulation process, so it is necessary to extract the long-term dependence of degradation data to predict the performance degradation trend of PEMFC. The transformer network solves the problem of long-term RNN dependency and can handle long sequences of inputs. In order to predict the degradation trend of PEMFC, we directly use the aging factor T is the length of f represents the mapping function, and f. In this paper, we use the transformer structure to establish the mapping.The performance degradation prediction problem can be formally defined as follows. The input is The network structure of transformer is composed of the attention mechanism. Instead of the sequential input of RNN, transformer feeds all of a sequence of data into the network at once for calculation, which brings good parallelism to the network model. Therefore, considering this advantage of transformer, we try to realize the performance degradation prediction based on the transformer network. The network structure is shown in Since transformer abandons the RNN structure and cannot adequately capture the sequential information of the feature sequences, position encoding is added before input. Therefore, the relative position information is added to the feature sequence by the position encoding technique and then is sent to an encoder to learn how the data points relate to each other and how important each time step is, resulting in more global characteristics. This paper adopts the most commonly used position encoding methods in transformers, namely sine position encoding and cosine position encoding :(9)P, root mean square error (RMSE), and mean absolute error (MAE) are used:The prediction results of FC2 under dynamic conditions are shown in The LSTM network is a classical method in time series data processing. In order to prove the superiority of the model proposed in this paper, LSTM model is also established to predict degradation trend. LSTM network uses two hidden layers, and the number of neurons in the first layer and the second layer is set to 100. The other parameters are the same as the transformer settings, and the training set size is 60%. The comparison results of FC1 and FC2 are shown in In this work, a hybrid prediction framework is developed for the real-time performance degradation prediction of PEMFC, in which MC-dropout, combined with the transformer network, predicts the long-term degradation trend, and an adaptive Wiener process model with multi kinds of variability sources is established to model the degradation of PEMFC. The effectiveness and advantages of the framework are illustrated by experimental verification. While transformer network have advantages in the parallel processing of input data, the timing characteristics of time series are ignored when dealing with time series problems. Transformer only uses position encoding to determine the order of input data, whereas LSTM regards position information as the sequential input. Transformer does not fully achieve the effect of the sequential structure of LSTM in this respect. In the future, we will further consider combining these two network structures to improve the effectiveness of RUL prediction.


The data in In the last paragraph of the Results section, sentences 4–10 should be removed. The complete paragraph should read:Finally, we can use the fitted model to simulate new data and compare run statistics and inter-target distances with the original empirical data. We do this for n = 100 samples from the fitted posterior probability distributions so that we can quantify the uncertainty in the model’s predictions. The results  show a g


There is a growing interest in minimally invasive surgery as interventional radiology (IVR), which decreases the burden on a patient. However, occupational exposure is a problem because the treatment is performed using X-ray fluoroscopic images. This problem can be solved by the development of a teleoperation system, but rapid force presentation is important to perform safe surgery. The purpose of this study is to develop a new teleoperation system that can be controlled at a high speed and can provide feedback force sensation within 20 ms delay.A master–slave-type remote-control system for catheterization was developed. A compact and high-speed force feedback system is realized using a novel electro-attractive material (EAM) device by which the resistance force is generated by the magnitude of the voltage applied. The linear and rotational movement of master is transferred to the slave device by UDP communication with the LAN cable, and the same movement is performed by two motors. The collision force of catheter or guidewire, detected by the sensor inside the slave device, is also transmitted to the master device. Two voltage-based methods for EAM: the ON/OFF and linear control methods, were implemented.After the collision force is detected by the slave sensor, the voltage is applied to the EAM in the master device for an average of 10.33 ms and 15.64 ms by the ON/OFF and linear control methods, respectively. These delays are less than required 20 ms. The movement of the master was stopped by the resistance force of EAM, and that of the slave was also stopped accordingly.A master–slave-type remote-control system for catheterization that is capable of high-speed force feedback was developed. With a low delay, the developed system achieved the requirements of 20 ms that was aimed for this study. Therefore, this system may facilitate the realization of IVR surgery that is safe for both doctors and patients. In recent years, there has been increasing interest in minimally invasive surgery, which decrease the burden on a patient. Minimally invasive surgery is a treatment method with many advantages for patients, such as faster postoperative recovery, shorter hospitalization, less postoperative pain, and less surgical bleeding. Although these advantages help to improve a patient’s quality of life, minimally invasive surgery imposes a large burden on the physician due to its difficulty. Interventional radiology (IVR) is a minimally invasive procedure in which a catheter or guidewire is inserted into the blood vessel of a patient and advanced to the lesion site under X-ray fluoroscopic imaging. During IVR, angiography is performed using a digital subtraction angiography system, which takes X-rays at 15 to 30 fps to obtain smooth images, but also increases the X-ray dose. The International Commission on Radiological Protection lists three methods of radiation protection: time, distance, and shielding . TherefoIn IVR, physicians rely on X-ray fluoroscopic images and tactile sensations transmitted from the catheter during surgery. Therefore, it is important to reproduce the tactile sensation of the catheter during the procedure. The maximum contact force in the linear direction transmitted to the physician is 2 N and that in the rotational direction is 50 Nm .Hansen Medical SenseiX is a teleoperation system for catheters currently on the market and is used for cardiac ablation. The doctor operates the system using a joystick with three degrees of freedom and control buttons in a workspace apart from the patient. The catheter inside the manipulator also has three degrees of freedom, and the contact of the tip of the catheter can be transmitted to the doctor as vibration. In the workspace, surgical information, such as 3D mapping information and X-ray fluoroscopic images, is displayed. However, this system has disadvantages such as the difference in sensation from a normal surgical procedure due to the use of a joystick and the high cost , 5.In the system developed by Omisore , the phaGuo  developeWe believe that it is important to consider operation delay in the operability of teleoperation systems. Operation delay may cause damage to the blood vessels when contact with the catheter cannot be detected. In addition, humans can sense a delay of approximately 10–20 ms . TherefoA master–slave system consisting of a master device operated by a physician and slave devices that operate catheters and guidewires Fig.  was deveThe master device is illustrated in Fig. The position control mechanism has two degrees of freedom: linear and rotational motion. A ball screw is used as the linear motion control mechanism. Therefore, the operation in the linear direction is converted into rotational movement Fig. . Both liA functional material called an electro-attractive material (EAM) is used to present the sense of force in the master device Figs.  and 5 1. An EAM The internal structure of the force-sensing part of the master device is shown in Fig. The slave device is shown in Fig. The force detection mechanism of the slave device is shown in Fig. A Raspberry Pi4 Model B of Raspberry Pi Foundation is used as the control system. Each system for position and force control was programmed in the C language. As position and force control are performed on the same Raspberry Pi, threads are used for each control program to reduce the possibility of the process becoming slow. The user datagram protocol (UDP) is employed for communication with the LAN cable.The position control system is shown in Fig. Linear motion operationPositional accuracy: within 1 mmOperating speed: 70 mm/s.Rotational motion operationPositional accuracy: within 1°Operating speed: 1°/sControl delay: 20 ms or lessThe requirements for position control are listed below.The results of the delay evaluation experiment of the linear position control are presented in Table The results of the rotational position control delay evaluation experiment are shown in Table These results show that the position control system satisfies the requirements for both linear and rotational motions and can be controlled with high speed and accuracy Table .Table 4Master device presentation forcePresentation force target value: 2 N or morePresentation force resolution: 0.5 NSlave device side detection forceForce detection target value: 0–0.2 NForce detection resolution: 0.01 NControl delay; within 20 msThe configuration of the force control system is shown in Fig. The force control system transmits the collision force detected by the slave device to the master device, which then presents the force sensation to the doctor. As a delay in force presentation may impair the safety of the operation, an experiment to evaluate the system delay was conducted.The target load cell and the manipulated guide wire employed during the experiment are shown in Fig. In the slave system, the value of the operation transmitted from the master device and the actual value of the operation of the slave device are recorded. In addition, the voltage values at positions ①, ②, ③, and ④ are recorded using a data acquisition system . The slave system and data acquisition system are synchronized by the output signal (④) of the Raspberry Pi. Two control methods, ON/OFF and linear control, were tested five times each in the experiment.To evaluate the control delay of the force control system, ON/OFF force presentation by the force sensor was applied. When the internal sensor of the slave device exceeded 0.51 N, 500 V was applied to the EAM of the master device. The delay from the time the target load cell exceeded the threshold until the voltage was applied to the EAM, the delay until the master device operation was stopped, and the delay until the slave device was stopped were measured.The voltage was applied to the EAM in the range of 0.065–0.647 N by the internal sensor of the slave device according to the formula shown in Eq.  1], but, but1], The experimental results are presented in Figs. The delay between when the target load cell force exceeds the threshold of 0.51 N, and the voltage applied to the EAM is defined as the delay of the force control system (applied voltage). The delay until the operation of the master device is stopped by the presented force is defined as the delay of the force control system (movement). The delay until the slave device stops its operation is defined as the delay of the force control system . Table The results of the 5 trials performed confirm that the average delay until the voltage is applied to the EAM is 10.33 ms. Even the maximum value of 18.66 ms is less than 20 ms, which means that the delay meets the requirements. In addition, the average delay until the operation of the master device is stopped is 12.18 ms, which again is less than 20 ms. The total average delay is large, at 104.46 ms. In particular, the delays are larger in the second and fifth trials. One reason for this result is that the position is controlled by PID control in this system. However, if the operation speed of the master device increases, the slave device cannot follow it and deviation remains. Therefore, even if the operator stops operation of the master device after the force is applied, the slave device continues to move until the deviation disappears. However, if the movement stops when the collision is detected even if the deviation remains, the catheter or guide wire can be stopped safely.Another reason is that there will be differences between the forces measured by the sensor in the slave device and in the load cell, even after calibration. If there is an error in the measured force, the threshold measurement may be delayed. On average, the collision force detected by the internal sensor of the slave device is larger than that detected by the target load cell, as shown in Table The experimental results are presented in Figs. The delay from the time at which the collision force detected by the load cell exceeds the threshold value of 0.065 N until the voltage is applied to the EAM is defined as the (voltage) delay of the force control system. The delay and maximum collision force detected by the external load cell and internal sensor of the slave device in each trial are listed in Table We attempted to evaluate the relationship between the applied voltage and generated feedback force. Using the table driven by the motor, the master device was pulled by the wire, and the tension force of the wire that represented the feedback force was measured by a tension sensor. Until 300 V is applied, almost no force is detected. However, when 500 V is applied, the feedback force is approximately 5 N. Therefore, when the slave device collides with the target, more than 500 V is applied to the EAM, and more than 5 N feedback force is generated. The feedback force is sufficient to stop the movement of the master device.When the guidewire contacts the target load cell, the values of the target load cell and slave sensor increase rapidly, as shown in Fig. The delay until the voltage is applied to the EAM is smaller with the ON/OFF control method than with the linear control method. However, both methods satisfy the requirements specified. The force sensation is presented to the surgeon to enable not only collision detection, but also reproduction of the actual force felt during an operation, such as the friction inside a vessel. To realize such a feedback force, we believe that the linear control method is effective. To utilize the advantages of both methods investigated, stepwise control should be attempted that can provide force sensation to the doctor, as in the linear control method, and reduce the delay, as in the ON/OFF control method.In this study, a master–slave-type remote-control system for catheterization was developed. The key feature of the system is that the high-speed force feedback system in the linear motion direction is included to present a force sensation to the surgeon. After the collision force was detected by the slave sensor, the voltage was applied to the EAM in the master device for averages of 10.33 ms and 15.64 ms when the ON/OFF and linear control methods were used, respectively. These delays are less than 20 ms and therefore meet the requirements specified. However, it is necessary to stop the movement of the slave device after the collision is detected to construct a system with higher safety.In the future, it will be necessary to examine a stepwise control method to improve the operability of surgeons while maintaining a short reaction delay. The system should be evaluated by doctors, and it should be checked which control method is suitable. It is also necessary to design a mechanism to detect the contact force in the rotational direction, which has not yet been developed. In addition, we would like to evaluate whether it is possible to detect the collision force of the guidewire in a complicated path using a modeled or an actual blood vessel that is close to that in an actual surgical environment. The system may facilitate realization of safe IVR surgery for both doctors and patients.


The aim of a clinical trial is to compare placebo to one or more treatments. The within-subject design is known to be more efficient than the between-subject design. However, in some trials that implement a within-subject design it is not possible to evaluate the placebo and all treatments within each subject. The design then becomes an incomplete within-subject design. An important question is how many subjects should be allocated to each combination of placebo and treatments. This paper studies optimal allocations of subjects in trials with a placebo and two treatments under heterogenous costs and variances. Two optimality criteria that consider the placebo-treatment contrasts simultaneously are considered, and the design is derived under a budgetary constraint. More subjects are allocated to those combinations with higher variances and lower costs. The optimal allocation is compared to the uniform allocation, which allocates equal number of subjects to each placebo and treatment combination, and to the complete within-subject design, where placebo and all treatments are available in each subject. The methodology is illustrated on the basis of an example on consultation time in primary care. A Shiny app is available to facilitate use of the methodology. The randomized controlled trial is the gold standard for the comparison of multiple experimental conditions , 2. An iThe past twenty years various papers appeared on the optimal allocation of subjects to experimental conditions: for the comparison of two conditions on a quantitative outcome –7 or a cIn the ideal case each of the conditions is available within each subject so that the design is a complete within-subject design. However, in practice this is not always possible to achieve, especially so in trials with a limited study duration, a long onset time of treatment and/or a long wash-out period between subsequent conditions. Other reasons to limit the number of conditions per subject are participation burden and hence attrition, ethical concerns and the need to avoid test-retest effects. The latter occur when the same measurement instrument, such as a cognitive ability test or a behavioral test, is used too often in a limited amount of time. Consider as an example a pharmaceutical trial that compares different drugs to a placebo for children with attention deficit hyper activity disorder. Depending on the onset time of each drug, the number of different drugs than can be evaluated per child will be small in a trial of limited duration, especially so if washout periods are needed to avoid carry-over effects of a drug to the next period(s). In addition to that, too many drug switches per child may not be acceptable from an ethical point of view. Another example is a trial that compares the performance of different types of new and innovative sport shoes for professional marathon runners to a standard type. Runners are advised to limit the number of marathons per year and to take a few weeks or even months to recover before the next marathon. For that reason the number of type of sport shoes that can be evaluated per runner in a study of limited duration is rather small. In both examples the number of conditions per subject is lower than the actual number of conditions that is to be evaluated in the trail, hence the design is an incomplete within-subject design.The aim of this contribution is to further study the optimal allocation of subjects for placebo-treatment comparisons under a budgetary constraint. The outcome is quantitative and the variances and costs are allowed to be heterogeneous. Attention is limited to trials with one placebo and two treatments. The optimal allocation of subjects for the incomplete within-subject design is compared to the uniform allocation. As such, the loss of efficiency that results from assigning equal number of subjects to each combination of experimental conditions can be quantified. Furthermore, the incomplete within-subject design is compared to the complete within-subject design. As such, the loss of efficiency from not having each experimental within each subject is quantified.The optimal allocation of subjects to conditions depends on various factors: a budgetary constraint, the optimality criterion and the covariance matrix between the outcomes per subject. The budgetary constraint limits the number of subjects that can be included in the study because the costs of a study should not exceed its budget. Costs consist of, among others, overhead costs per subject and costs per subject per placebo and treatment. There exist various allocations of subjects for which the costs are less than or equal to the budget. An optimality criterion is therefore needed to select the optimal allocation. In this contribution the focus is on placebo-treatment comparisons. As there are two treatments, there are also two placebo-treatment comparisons. The allocation that is optimal for the comparison of placebo and treatment 1 may be far from optimal for the comparison of placebo to treatment 2. It is therefore necessary to use optimality criteria that consider both placebo-treatment comparisons simultaneously. The optimal allocation further depends on the variances and covariances between the outcomes within a subject. This contribution considers a general covariance matrix with heterogeneous variances and covariances. Once the costs and budget are specified, an a priori estimate of the covariance matrix is provided and the optimality criterion has been chosen, the optimal allocation of subjects can be derived. This paper builds upon previous research on optimal designs for the crossover trial with a budgetary constraint –29. In tThis contribution is organized as follows. The next section formulates the statistical model, shows how the means in the placebo and treatments are estimated along with the associated covariance matrix and introduces the optimal design methodology. Two optimality criteria are specified along with the budgetary constraint and it is explained how the optimal allocation to treatment combinations is derived numerically. The results section gives optimal allocations for the incomplete within-subject design and compares the optimal allocations to the uniform design and to the complete within-subject design on the basis of their efficiencies. An illustrative example on consultation time in primary care illustrates the use of the optimal design methodology. Conclusions, discussion and directions for future research are given in the final section.In the within-subject design the data have a multilevel structure with multiple outcome measures nested within subjects. Such data can be analyzed using the multilevel model , 31, whiyij for experimental condition i  in subject j = 1,…N is given byWe first focus on the model for the complete within-subject design, where each subject receives the placebo and both treatments. Subsequently it is shown how this model can be adjusted to account for the incomplete within-subject design. At the end of each treatment, outcome measurements are taken on each subject. The model for quantitative outcome μi is the mean score for condition i, and eij is the residual. For the latter we assume Here, The model can be written in matrix-vector notation:j isThe vector of outcomes of subject The vector of placebo and treatment means isj is:In the complete within-subject design the design matrix is the identity matrix. The vector of residuals is of subject ej isAgain the design matrix is the identity matrix in the complete within-subject design. The 3×3 covariance matrix of the residuals yj is calculated asThe covariance matrix of the response vector The vector of placebo and treatment means is estimated asj, then the first entry should be removed from the vectors yj and ej and the first row should be removed from the design matrices Xj and Zj. If treatment i is not available within subject j, then entry i+1 should be removed from the vectors yj and ej and row i+1 should be removed from the design matrices Xj and Zj. Eqs  can canj, thTo derive the optimal allocation of subjects to treatment combinations an optimality criterion is needed. The focus is on placebo-treatment comparisons, of which there are two in a trial with two treatments. For both of them a contrast i0. The allocation that is optimal for the first contrast may be far from optimal for the second. For that reason the contrast variances Φi0 should be considered simultaneously. This will be done by implementing a DA-optimal design [The optimal allocation is the one that minimizes the contrast variance Φl design , 34 or al design .DA-optimal design both vectors of contrast coefficients are stacked in one matrix:For the The optimality criterion to be minimized is thenAs such, the optimal allocation minimizes the volume of the confidence ellipsoid of the contrasts.i0 is minimized:λ1≤1. The user-specified weight λ1 reflects the relative importance of the first contrast in the compound optimal design. This criterion was used previously in a between-subject design where costs and variances were equal across placebo and treatments [For the compound optimal design a linear combination of the contrast variances Φeatments .DA-optimal design the relative efficiency of an allocation ξ versus the optimal allocation ξ* isThe optimal design may be compared to other designs that are of interest, for instance the uniform design. This may be done by means of the relative efficiency. For the ξ* and ξ, respectively. Note that both the numerator and denominator are taken to the power ½, since two contrasts are taken into account. For the compound optimal design the relative efficiency is calculated asThe parts in square brackets of the numerator and denominator are the value of the optimality criterion compound as found for the allocations ξ* and ξ, respectively.The numerator and denominator are the value of the optimality criterion Φξ should be replicated to perform as well as the optimal allocation ξ*. A trial with RE = 0.8 need to be replicated 1.25 times and a trail with RE = 0.9 need to be replicated 1.11 times. Stated differently, a trail with RE = 0.8 needs an increase in sample size of RE = 0.9 needs an increase in sample size of The relative efficiency lies between 0 and 1 and its reciprocal quantifies how many times a trial with allocation As is obvious, any design becomes more efficient when sample size increases. In practice, however, sample size cannot increase within bounds due to financial limitations. A budgetary constraint is therefore used to derive the optimal allocation to treatment combinations.Cs and consist of costs such as administrative costs, incentives and insurances. These costs do not depend on the number and order of the conditions that are assigned to a subject. The costs for placebo per subject are denoted C0 and the costs for treatment i per subject are denoted Ci. The budget that is available is denoted B.The overhead costs per subject are denoted Cs01 = Cs+C0+C1 for a subject who receives placebo combined with treatment 1, Cs02 = Cs+C0+C2 for a subject who receives placebo combined with treatment 2 and Cs12 = Cs+C1+C2 for a subject who receives treatment 1 combined with treatment 2. The corresponding numbers of subjects are denoted N01, N02 and N12, respectively. The costs are then Cs01N01+Cs02N02+Cs12N12. The design space is Ω = , with N01, N02 and N12 integers. The optimal allocation ξ* is the one for which the optimality criterion compound is minimized.The costs per subject depend on which condition(s) the subject receives. In the incomplete within-subject design the costs per subject are Cs012 = Cs+C0+C1+C2. The number of subjects that can be included are N012 = B/Cs012. As all subjects receive placebo combined with treatments 1 and 2, it is not necessary to derive the optimal allocation of subjects.In the complete within-subject design the costs per subject are Simple mathematical expressions for the optimal allocation cannot be derived. For that reason the optimal allocation is found numerically. For optimization problems like this it is straightforward to use an optimizer for functions with constraints, such as the optimizer constrOptim.nl in the R  package C0 = 10, C1 = 20, C2 = 20 so that the costs of both treatments are equal to one another and twice as large as those for placebo. The second is C0 = 10, C1 = 20, C2 = 30 so that the costs of treatment 1 are twice as large as those of placebo and those of treatment 2 are one and a half times as large as those of treatment 1. The third is C0 = 10, C1 = 20, C2 = 40 so that the costs of treatment 1 are twice as large as those of placebo and those of treatment 2 are twice as large as those of treatment 1. The overhead costs per subject are CS = 100 and the budget is B = 50000.The following subsections present optimal allocations for three different combinations of costs per subject for placebo and treatments 1 and 2. The first is D of the residuals are considered. For the first we have ρii′ = 0.5, so that they are of large size according to Cohen [Furthermore, three different covariance matrices to Cohen .DA-optimal design and compound optimal design are derived. For the latter three different values of the weight λ1 are used: λ1 = 0.25, 0.5 and 0.75. For the first value of λ1 the main focus is on the comparison of placebo with treatment 2, for the second both placebo-treatment comparisons are of equal importance and for the third the main focus is on the comparison of placebo with treatment 1.For each combination of costs and covariance matrix the For this design there are two conditions per subject. Two different scenarios are considered. In scenario 1 subjects are allocated to receive either placebo with treatment 1 or placebo with treatment 2. In scenario 2 subjects are allocated to receive either placebo with treatment 1, placebo with treatment 2, or treatment 1 with treatment 2. In scenario 1 the combination of both treatments 1 and 2 is not taken into account. This scenario may be chosen when it is considered unethical to allocate both treatments to a subject, for instance when both are expected to have harmful side effects.N* for scenario 1. We first discuss results for the compound optimal designs. For any combination of costs C0, C1, C2 and weight λ1 the optimal sample size C1 = C2 = 20 in treatments 1 and 2, the total sample size remains constant at N* = 384, irrespective of the chosen variances and weight λ1. This can be explained as follows: as both treatment combinations are equally expensive, a decrease of the optimal sample size C1, C2) =  and  this result does not hold: increasing the ratio N*.For those designs with equal costs λ1 the optimal sample size N* decrease if the costs C2 for treatment 2 increase. Fewer subjects are assigned to placebo combined with treatment 2 if the costs for treatment 2 increase and consequently the total sample size decreases as well. The relationship between C2 and For any combination of variance ratio λ1 of the compound optimal design. For any combination of costs C0, C1, C2 and variance ratio λ1 increases. This is also obvious: when more emphasis is put on the comparison of placebo to treatment 1 rather than to treatment 2, more subjects will be allocated to receive placebo combined with treatment 1 than placebo combined with treatment 2.The optimal sample sizes further depend on the weight λ1 = 0.5) the optimal allocation is the uniform allocation. In all other cases the two optimal sample sizes Only when variances and costs are equal for treatments 1 and 2 and when there is equal interest in both placebo-treatment comparisons th and 100(1−β)th percentiles of the standard normal distribution. The variances of the contrasts are var(μ0−μ1) = 2.2 and var(μ0−μ2) = 4.2. The effect sizes are then calculated as 3.7 and 5.1 for the first and second contrast, respectively. This corresponds to standardized effect sizes as expressed by Cohen’s d of 0.35 and 0.46, respectively. So the minimum effects that can be detected in this trial are small (d = 0.2) to medium (d = 0.5) in size.Given the optimal allocation, one can calculate which effects sizes can be detected for both contrasts at the available budget in a one-sided test with power level 0.8 and type I error rate 0.05. The effect size is calculated as One can also calculate the power to detect a user-specified effect size for the optimal allocation. The power to detect a medium effect size is 0.97 for the first contrast and 0.86 for the second. Much lower power levels of 0.41 and 0.29 are achieved when a small effect size is to be detected.λ1. When λ1 increases then there is more interest in the comparison of the placebo with treatment 1 rather than with treatment 2, and hence more subjects are allocated to combinations that include treatment 1.The within-subject design is more efficient than the between-subject design. However, it is not always possible to evaluate the placebo and all treatments in each subject. In such a case the design is an incomplete-within subject design. This contribution studied optimal allocation of subjects to combinations of placebo with two treatments. The costs and variances were allowed to vary across placebo and treatments. Two optimality criteria that simultaneously take into account both placebo-treatment comparisons were considered and the design was sought under a budgetary constraint. In general it can be stated that more subjects are allocated to combinations of treatments that have high variance and low costs. For the compound optimal design the optimal allocation further depends on the weight Tables This contribution restricted to trials with one placebo and two treatments. In the incomplete-within-subject design three combinations could be distinguished: placebo with treatment 1, placebo with treatment 2 and treatment 1 with treatment 2. Of course it is possible to apply the optimal design methodology to trials with more than two treatments. It should be taken into account that more treatments imply more combinations of placebo and treatments and hence deriving the optimal allocation becomes more computationally demanding. Consider a trial with a placebo and three treatments. There are six combinations in the case two experimental conditions can be evaluated in each subject and another four combinations if three experimental conditions can be evaluated in each subject. These numbers reduce to three and three in the case the placebo should be evaluated in every subject. For four and more treatments the number of combinations even further increases. Finding the optimal allocation may then become very time-consuming.The within-subject design is a longitudinal study design in which two or more measures on the same outcome are taken over time on each subject. Longitudinal studies are very often hampered by attrition, meaning that subjects leave the study prematurely. Attrition may occur when subjects lose interest in the study or experience severe side-effects from one treatment and are not willing to continue with the next treatment. Attrition results in a less efficient design by default and it should be avoided at all costs. However, this is often easier said than done in practice. As an alternative, one may derive optimal allocations that take into account anticipated rates of attrition. The number of subjects of such a trial is larger than in a trial without attrition so that the available budget is still efficiently used.Another important direction for future research are optimal allocations in the case the outcome variable is categorical, such as the prevalence of some kind of behavior (i.e. binary outcome) or the severity of such behavior . It may also be of interest to study optimal allocations when subjects are nested within health professionals, such as clinical child psychologists in the first example of the introduction and sport coaches in the second example. Such health professionals may differ with respect to their skills, experience, empathy, motivation and enthusiasm, and such differences should be taken into account in the multilevel model by adding an extra level of nesting so that the between-professional variance can be estimated. In the design phase of such trials not only the number of subjects needs to be derived but also the number of health professionals.In this paper the optimal allocation was found such that an optimality criterion was minimized for a given budget. In other words, the optimal design was based on efficiency. It is also possible to use another operating characteristic to derive the optimal allocation, namely the statistical power. Given user-specified values of the effect sizes and a desired power level, this means finding the optimal allocation such that either the costs or total sample size are minimized. The optimal allocation thus obtained may not necessarily be the same as the one based on efficiency. Future research may focus on optimal allocations based on statistical power, thereby building on existing work for the between-subject design with homogeneous costs and variances . As multThus far the literature on optimal allocations for placebo-treatment comparisons in the incomplete within-subject design was scarce. This contribution provides methodology along with a Shiny app for trials with a placebo and two treatments. I hope applied researchers will benefit from it and be able to derive optimal allocations for their trial so that they can compare placebo to treatments in an efficient way.