## 7 Validations
The considered data, shown in Figure 26, are taken from real-life quantitative experiments reported in the literature [49]. Figure 22: Case 1. Comparison between real-life data and simulation data: (**a**) square flow, (**b**) half-decelerating; (**c**) full decelerating; (**d**) sine waveform; (**e**) ramp pressure. Figure 23: Case 2. Comparison between real-life data and simulation data: (**a**) VC-CMV mode, (**b**) PC-CMV mode. Figure 24: Case 2. Opening degree of the inspiratory and expiratory valves: (**a**) VC-CMV mode; (**b**) PC-CMV mode. The operating and geometrical parameters of the ventilator, shown in Table 4, are the same as those used in the previous simulations, while the independent, dependent, and patient variables are reported in Table 9.  
Figure 25: Case 2. Control system: (**a**) VC-CMV mode; (**b**) PC-CMV mode. Figure 26: Case 3. Real-life trends of pressure (VC-CMV mode, in red) and flow (PC-CMV mode, in blue) concerning the inspiratory/expiratory resistance and lung compliance changes, adapted from [49]. VC-CMV mode ([A] C\({}_{\text{RS}}\) = 0.05 L/cmH\({}_{2}\)O, \(R_{\text{insp}}\) = 5 cmH\({}_{2}\)O/L/s, \(\text{R}_{\text{exp}}\) = 15 cmH\({}_{2}\)O/L/s; [B] C\({}_{\text{RS}}\) = 0.02 L/cmH\({}_{2}\)O, \(R_{\text{insp}}\) = 5 cmH\({}_{2}\)O/L/s, \(\text{R}_{\text{exp}}\) = 15 cmH\({}_{2}\)O/L/s; [C] C\({}_{\text{RS}}\) = 0.05 L/cmH\({}_{2}\)O, \(R_{\text{insp/exp}}\) = 20 cmH\({}_{2}\)O/L/s; [B] C\({}_{\text{RS}}\) = 0.05 L/cmH\({}_{2}\)O, \(R_{\text{insp/exp}}\) = 20 cmH\({}_{2}\)O/L/s). Below we can see the parameters entered into the subroutine \"Patient\" to obtain the values of compliance and the inspiratory/expiratory resistance of the respiratory system, as set out in Table 10. Again, the airway resistance simulation code, which is shown in Appendix A, and the equations presented in Section 4, have been employed for this end. The predicted time history of the pressure upstream of the patient, flow rate inspired (>0) and expired (<0), and tidal volume, as the resistance and compliance changes, are shown in Appendix A. The relative comparison between the real-life data and the simulation data is shown in Figure 27. Again, the comparison shows that the numerical predictions are in almost perfect agreement with the real-life quantitative trend as, once again, the percentage error is less than 10%. However, the percentage error between the real-life and numerical waveforms is higher than 10% in the first phase of expiration in the pressure waveforms of the VC-CMV mode. This is caused by the extremely high accuracy of the PID controller used in the Simulink model. Indeed, the simulation results show that the airway pressure dropped instantaneously in order to the set PEEP value after the inspiration phase. Conversely, the airway pressure required a slight transitional time to reach the set PEEP value in the real-life experiments. Changes in respiratory resistance and compliance are best visualised in the P-V loops, although there are predictable changes that occur in the F-V loops. As presented in Figure 28, during the VC-CMV mode, peak inspiratory pressure increases as compliance decreases or inspiratory resistance increases, inspiratory peak flows and tidal volumes remain similar, and expiratory peak flow decreases as lung compliance or expiratory resistance increases. Indeed, an increase in compliance is associated with a decrease in the elastic recoil of the lungs. The less elastic recoil present, the less stored energy available to be released during expiration. On the other hand, during the PC-CMV mode, tidal volume increases as lung compliance and inspiratory resistance increase, whereas inspiratory and expiratory peak flows are reduced. Furthermore, the time required for flow to reach 0 during inspiration and expiration increases.