Device for controlling oxygen supply to a patient through the airway
A neural network-based device for oxygen therapy in respiratory failure accurately adjusts oxygen levels using static and dynamic patient variables, addressing the limitations of current methods by ensuring precise and responsive oxygen delivery.
Patent Information
- Application Number
- PCT/ES2026/070237
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2025-05-05
- Filing Date
- 2026-05-04
- Publication Date
- 2026-11-12
AI Technical Summary
Current methods for determining oxygen dosage in oxygen therapy for patients with respiratory failure rely heavily on physician experience and observation, lacking precision and often leading to irreversible damage before corrections are made.
A device with a processor that uses a neural network structure to process static and dynamic patient variables, including autoencoders and neural networks, to determine precise oxygen delivery based on real-time measurements, reducing computational requirements.
The device provides accurate and responsive oxygen dosage adjustments, minimizing computational cost and ensuring appropriate oxygen levels are maintained, reducing the risk of complications.
Smart Images

Figure ES2026070237_12112026_PF_FP_ABST
Abstract
Description
[0001] DEVICE FOR CONTROLLING THE SUPPLY OF OXYGEN VIA THE RESPIRATORY TRACT TO A PATIENT
[0002] DESCRIPTION
[0003] OBJECT OF THE INVENTION
[0004] The present invention is a device for controlling the delivery of oxygen via the respiratory tract to a patient. Specifically, it is a device connected to an oxygen source on one side and equipped with an outlet port that delivers oxygen to the patient, controlled according to various real-time patient measurements.
[0005] The measured parameters are combined with other parameters previously obtained from the patient. The processing of the measured data, combined with the use of the other patient data, is handled efficiently by a processor so that the patient receives the appropriate dosage at all times. This requires minimal computational cost, allowing the device to be small and have very low energy consumption.
[0006] The method establishes a control mode that is very precisely adjusted to the specific requirements of each patient, although these requirements vary considerably from one patient to another. This is especially important for a parameter like the oxygenation level, a critical parameter that can even lead to the patient's death if not properly adjusted.
[0007] BACKGROUND OF THE INVENTION
[0008] One of the areas in medicine that has garnered the most attention is the care of patients with respiratory failure, for example, in the face of COVID-19 infection. However, respiratory failure can have many different causes, and each of these causes requires a different approach.
[0009] The measures taken that work for one patient may lead to the death of another patient.
[0010] Among the measures to be taken is oxygen therapy, where the patient receives supplemental oxygen, for example, through nasal cannulas or masks. Other options include non-invasive mechanical ventilation or invasive mechanical ventilation.
[0011] Respiratory failure can be classified according to various criteria. For example, hypoxemic respiratory failure is characterized by a decrease in the partial pressure of oxygen in arterial blood, for example, below 60 mmHg.
[0012] In these cases, the partial pressure of carbon dioxide is usually normal or low. This type of insufficiency is due to problems that hinder the passage of oxygen to the lungs, such as pneumonia, pulmonary edema, or acute respiratory distress syndrome.
[0013] Another example of respiratory failure is hypercapnic respiratory failure. This type of failure is characterized by an increase in the partial pressure of CO2 above 45 mmHg. In patients with this type of respiratory failure, the partial pressure of oxygen may be normal or decreased.
[0014] The causes of this second type of insufficiency are due to problems that hinder the elimination of carbon dioxide from the lungs, such as chronic obstructive pulmonary disease, neuromuscular diseases, or, for example, drug overdoses.
[0015] When a patient's respiratory failure is treated with oxygen therapy, the dosage is currently determined by a physician based on their experience and the patient's observed response. However, this observation is not always precise, nor does it always depend on objective measurements, and it is often a long-term process where correction is not achieved until often irreversible damage has occurred.
[0016] There is a need for automated oxygen dosing devices that determine in real time the most appropriate oxygen dosage for the patient based on their current requirements and, ideally, with low computational requirements that allow a processor installable in a portable device to perform this management.
[0017] DESCRIPTION OF THE INVENTION
[0018] A first aspect of the invention is a device suitable for controlling the dosage and delivery of oxygen via the respiratory tract to a patient with respiratory failure. The device comprises:
[0019] an oxygen inlet;
[0020] an oxygen outlet;
[0021] a valve actuated by a control signal, which determines the flow of oxygen from the oxygen inlet to the oxygen outlet in response to the value of the control signal;
[0022] at least one input port for the input of a measurement signal of a time-dependent dynamic variable obtained from the patient.
[0023] The device comprises an oxygen inlet configured to establish a fluidic connection with an oxygen source, for example, a pressurized oxygen cylinder. The same device has an outlet configured to establish a fluidic connection with the patient, for example, by connecting a mask or nasal cannula that delivers the oxygen determined by the device to the patient.
[0024] The passage from the oxygen inlet to the oxygen outlet has at least one actuatable valve in place, which is controlled to manage the amount of oxygen that passes from the inlet to the outlet.
[0025] This management and determination of the amount of oxygen to be allowed through is established by a processor that is initially configured to manage oxygen delivery for a specific patient when subsequently put into operational mode. That is, the device comprises a processor adapted to carry out the following configuration steps in any order:
[0026] instantiate a prediction module configured to provide an estimate of the value of the control signal that determines the degree of oxygenation of the patient;
[0027] instantiate a first neural network adapted to process static patient variables and provide a pre-established number of static latent variables;
[0028] instantiate at least one autoencoder where, once trained, it comprises: a) a first encoding stage adapted to obtain dynamic latent variables from the input values and, b) a second decoding stage adapted to recover the input values from the dynamic latent variables;
[0029] instantiate a second adapted neural network to, from the static and dynamic latent variables, provide a control value for the generation of a control signal, representative of said value, for the control of the actuatable valve;
[0030] Additionally, carry out
[0031] train at least one autoencoder to process at least one time-dependent dynamic variable measured in the patient;
[0032] establish a global neural network structure that comprises:
[0033] the first neural network and the first encoding stage of at least one autoencoder arranged to provide the static and dynamic latent variables;
[0034] the second neural network, fed with the static and dynamic latent variables;
[0035] Train the first neural network and the second neural network simultaneously, using static and dynamic patient input data, imposing on the output of the second neural network the control signal value estimated by the prediction module.
[0036] The term "instantiation," commonly associated with object-oriented programming, is used in this document to refer to the allocation of computational resources necessary for the execution of a specific task. This includes, but is not limited to, reserving memory for variables and providing functions or methods that can be activated in response to specific signals.
[0037] The first prediction module is a module capable of establishing an oxygenation value using a primary technique that is not necessarily the technique implemented by the device. For example, modules that respond to patient measurements based on pre-established correlations or that use control techniques such as fuzzy logic controller design, as described in the examples as the preferred technique, will be valid. The terms fuzzy logic and fuzzy logic are considered equivalent.
[0038] This first module can make use of measurement values acquired from the patient and other values, for example fixed values that characterize the patient: age, sex, disease category among a plurality of pre-established categories, etc.
[0039] Based on these values, some measured and others constant, the module is able to establish an estimated oxygenation level for the patient. This oxygenation level could be used to send a signal to the processor to control the oxygen delivery valve. However, in the context of this invention, this module will be used to perform specific training in machine learning modules, as described below.
[0040] Similarly, the processor is adapted to instantiate a first neural network whose function is to process static patient variables and provide a set number of static latent variables.
[0041] Latent variables are interpreted as variables resulting from a process of abstracting input values, whether constants or measured values, in which representative values are provided for those input values. That is, they are variables inferred from other observable variables, serving to establish a relationship with underlying factors in the observed variables.
[0042] In the context of neural networks, latent variables are variables determined in deeper layers after processing the input, preferably in layers where the tensors have reduced dimensions relative to the input, resulting from obtaining representative values of the input information. Ideally, the tensors containing the latent variables are one-dimensional vectors. The processor is further adapted to instantiate an autoencoder. The term autoencoder, which is a common English term, should be interpreted as a specific artificial neural network designed to learn efficient data representations, where a reduction in the dimensionality of the input data is established.
[0043] The autoencoder includes:
[0044] An encoder is adapted to process input data, preferably through one or more convolutional layers, compressing it into latent variables; the code. In this way, the encoder is able to capture the most important features of the input data in a lower-dimensional space.
[0045] A decoder is adapted to process latent variables, the code, generating a version of the original input data. That is, it reconstructs the input data as accurately as possible from the compressed code.
[0046] Preferably, the autoencoder is trained from a sample of commonly processed signals using unsupervised learning, as it does not require labeled data. The sample data consists of dynamic variables, that is, variables measured in the patient. According to the implementation example, each autoencoder corresponds to one of the measured dynamic variables. Examples of measured dynamic variables include pulse rate, respiratory rate, and oxygen saturation.
[0047] For a specific dynamic signal, the encoder training phase involves taking multiple signals from different patients, minimizing the error between the input signal and the reconstructed signal. A representative sample of these patient measurements is used during the training phase, and another representative sample is used in a subsequent testing phase to validate the training. Each signal requires a separate autoencoder, and each autoencoder, if there are multiple dynamic signals, is trained independently.
[0048] Although an autoencoder comprises an encoder and a decoder, the encoding component is not always used in operational mode when the device is managing oxygen dosage for the patient. The decoder is used during the training phase to establish the appropriate weights for the neural network that makes up the autoencoder.
[0049] Finally, the computational structure comprises a second neural network adapted to determine, from static and dynamic latent variables, a control value that generates a signal to actuate the valve and thus provide the patient with the appropriate level of oxygenation. Preferably, this second neural network is a fully connected network.
[0050] This control is carried out when it has been properly trained, for which it is relevant to establish specific training for each of the parts of the computational structure.
[0051] For each of the dynamic signals (again, the respiratory signal, the cardiac signal, and the blood oxygen saturation measured on the patient are used as examples, and there could be others), an autoencoder dedicated specifically to the signal it must process is instantiated. This type of signal is used in the learning phase and is considered operational when, after training, it has passed the test phase, demonstrating that it accurately reconstructs the signal.
[0052] Once one or more autoencoders have been trained, a global neural network structure is built. This global neural network comprises:
[0053] the first neural network configured to, when in operational mode, process the static variables only once, giving rise to the static latent variables,
[0054] an autoencoder for each dynamic signal measured in the patient, the autoencoder trained to process the corresponding dynamic signal, where in this global neural network only the encoding stage (encoder) is used to process at least a portion of the dynamic signal generating latent variables, the variables that are identified as dynamic latent variables.
[0055] The second neural network, configured to receive both static and dynamic latent variables as input, is designed to output a value representing the oxygenation level used to generate the signal that controls the valve. In this overall neural network structure, the encoding stages have pre-set weights because the autoencoder has been trained, but neither the first neural network, which provides the static latent variables, nor the second neural network has been trained.
[0056] Once the weights of the encoding stages of the autoencoders are set, a training phase is carried out for both the first and second neural networks simultaneously, imposing static and dynamic patient data at the input, and imposing the value of the control signal estimated by the instantiated prediction module at the output of the second neural network.
[0057] In this training phase, the weights of the first and second neural networks are set. These two neural networks then undergo a testing phase, processing new patient data to verify with the prediction module that they are properly trained.
[0058] The result is a device correctly configured so that, when it enters operating mode and receives data from the patient, the processor provides the value that commands the controlled valve appropriately to provide the correct level of oxygenation to the patient.
[0059] According to a second aspect of the invention, in the device configured as described, the processor is further configured to, in operating mode, perform the following:
[0060] processing the patient's static variables with the first neural network, obtaining the static latent variables;
[0061] continuously process the measurement signal of the time-dependent dynamic variable measured in the patient according to the following sub-stages:
[0062] establish a time window;
[0063] sample the measurement signal of the time-dependent dynamic variable in the time window;
[0064] process the sampled measurement signal with the encoding stage of at least one autoencoder generating dynamic latent variables; combine the static latent variables and the dynamic latent variables, introduce the union of static and dynamic latent variables into the second neural network providing a control value; generate a control signal from the control value and provide said signal to the actuatable valve;
[0065] shift the time window to a new point in time.
[0066] According to this implementation example, the first neural network processes the static variables, generating static latent variables. This processing is not repeated unless the device requires a new configuration, thus avoiding further processing calculations. Once the static latent variables are generated, they are stored for later use.
[0067] The device receives one or more dynamic signals, such as heart rate, respiratory rate, or blood oxygen level. These signals are digitized over a specific period of time, known as the time window, and processed by the autoencoder's encoding stage, which is configured for this purpose.
[0068] The result is a set of dynamic latent variables associated with the dynamic signal and, if there is a plurality of dynamic signals, there would be as many sets of dynamic latent variables as there are processed signals.
[0069] The combination of static and dynamic latent variables provides information about both the patient and the temporal evolution of the parameters that characterize them. This combination of latent variables serves as the input for the second neural network, which in turn provides a control value at its output.
[0070] This control value is used to generate a control signal that commands the actuated control valve, modifying the oxygen delivery to the patient according to the calculated value. This value varies over time because the processing of the dynamic variable(s) is continuous; that is, once the data is processed, a new window is defined for each dynamic variable, establishing a new sampling of the dynamic variable(s). The result is a specific signal to command the actuated valve, which varies over time.
[0071] In this continuous processing, the values of the static latent variables are neither modified nor recalculated.
[0072] Preferably, the collection of static and dynamic latent variable values is organized into a vector. Additionally, it is worth noting that the collection of latent variables is a significantly smaller set of values than the values sampled in the source signals, drastically reducing the computational requirements of the device.
[0073] According to an exemplary embodiment applicable to a device as described, the device comprises a plurality of input ports for the input of measurement signals of different time-dependent dynamic variables obtained from the patient, the dynamic variables obtained from measurements in the following list:
[0074] patient's cardiac signal;
[0075] patient's oxygenation level;
[0076] patient's respiratory signal;
[0077] where each distinct dynamic signal has its own associated autoencoder, independent of the other autoencoders, trained with that dynamic signal.
[0078] Each dynamic variable is processed independently; that is, it enters through a different port and is directed to an autoencoder specifically configured to process that signal. This allows each signal to generate a set of latent variables representative of its evolution. Using an autoencoder specifically trained for that signal ensures that the values calculated by the autoencoder are optimized to provide the most information possible about a specific input signal. In other words, the autoencoder configured to process the patient's cardiac signal provides latent variables with more information about the patient's cardiac behavior than another autoencoder, even if that other autoencoder is trained to reconstruct input signals, and those signals are also periodic, for example.According to an example embodiment applicable to a device as described, the at least one autoencoder comprises a first encoding stage formed by a convolutional layered structure from the input to the output of latent variables comprising:.
[0079] - a first convolutional layer for extracting features from the input values;
[0080] - a layer for transforming the data into a vector of latent variables.
[0081] The expression "a convolutional layer structure" should be interpreted as a structure comprising either one or two or more convolutional layers.
[0082] Specifically, the encoding stage uses convolutional layers that extract pattern features from the input signal. These features are dimensionally reduced to a vector, allowing a set of scalars representative of the signal's behavior to be obtained in a reduced number of variables.
[0083] According to an example embodiment applicable to a device such as the one described above, the first encoding stage further comprises a pooling layer between the first convolutional layer and the data transformation layer for reducing the dimensionality of the data.
[0084] According to this implementation example, after the input signal is processed by a convolutional layer structure, the values are processed by a pooling layer interposed between the first convolutional layer and the data transformation layer. When it is stated that the pooling layer is interposed, in the presence of more than one convolutional layer, it should be interpreted as meaning that the pooling layer can be located either between two or more convolutional layers or, preferably, following the plurality of convolutional layers.
[0085] In this way, the pooling layer establishes a first reduction of dimensionality by decreasing the size of the features extracted by the convolution layer(s) and therefore the number of subsequent parameters to be processed.
[0086] Additionally, it has been observed that the incorporation of this pooling layer reduces the risk of overfitting by reducing the number of latent variables representing the input signal information.
[0087] Examples of pooling layers are either a "maxpooling" layer or an "average pooling" layer.
[0088] According to an example embodiment applicable to a device such as the one described above, the first encoding stage, after the first convolutional layer, further comprises a second convolutional layer for obtaining more abstract features, and optionally a subsequent pooling layer for reducing the dimensionality of the data.
[0089] According to this specific example, the structure of the encoding stage is very efficient because, with two convolutional layers, a balance is achieved between good latent feature extraction capabilities and low computational cost. Following this second convolutional layer, the use of a pooling layer reduces dimensionality and allows the dynamic latent variables of the associated input signal to be obtained in a single additional layer: the layer that transforms the data into a vector of latent features.
[0090] According to an example embodiment applicable to a device such as the one described above relating to the autoencoder, the at least one autoencoder comprises a second decoding stage formed by a convolutional layered structure from the latent variable input to the output comprising:
[0091] a first layer of expansion of the latent variable vector into a higher dimension tensor;
[0092] at least one convolutional layer for refining the expanded information.
[0093] The second decoding stage has the main function of allowing proper training of the entire autoencoder for the subsequent use of the first encoding stage, the encoder.
[0094] This second decoding stage uses convolutional layers configured to expand the latent variables—in this case, the latent variables identified as dynamic—generating a tensor of higher dimensions. The expansion stage includes a convolutional layer whose output is a signal comparable to the sampled signal used to feed the encoder.
[0095] According to an example embodiment applicable to a device like the one described above, the second decoding stage further comprises at least one upsampling layer between the first expansion layer and at least one convolutional refinement layer for the initial resolution increase.
[0096] This upsampling layer, as it's known in English, increases the time dimension of the signal. Preferred examples of upsampling layers include those based on bilinear or bicubic interpolation methods, nearest neighbor methods, or methods based on deconvolution or transposed convolution. The terms in quotation marks also identify the English term.
[0097] According to an embodiment applicable to a device as described above, the second decoding stage, after at least one convolutional layer, further comprises at least a third convolutional layer, and optionally a subsequent upsampling layer.
[0098] According to an example embodiment applicable to a device such as any of those described above relating to the autoencoder, the second decoding stage comprises a final reconstruction layer that returns the reconstructed function with the same structure as the input of the first encoding stage.
[0099] While it is not strictly necessary that the data structure used in the reconstructed signal be the same as that of the input signal, including this reconstruction stage allows for a very efficient comparison between both signals, for example to determine when the autoencoder is properly trained.
[0100] According to an example of implementation applicable to a device like any of those described above, the second neural network is a fully connected structure network.
[0101] This is a preferred example, where the fully connected structure establishes a structure in which the calculated oxygenation value makes use of all the features extracted in the latent variables, allowing a very reliable response regarding how the patient is and how they are evolving during oxygenation therapy.
[0102] According to an example of embodiment applicable to a device like any of those described above, at least one autoencoder is trained by introducing a plurality of input values and the same output values corresponding to its associated signal, minimizing the error between the output of the second decoding stage and the input.
[0103] The autoencoder's function is to extract the latent characteristics of a signal through its first encoding stage. To achieve this, the first and second encoding stages must be trained together using multiple input signals until the decoding stage is able to reconstruct the input signal.
[0104] Ideally, according to this implementation example, although the autoencoder could reconstruct any signal, each signal is encoded according to its specific behavior. This specific behavior is demonstrated by a plurality of signal samples used as training data, which are then supplied as input and used as the target value at the output. The training process continues until the error between the input data and the value delivered by the second decoding stage is verified to be below a predetermined threshold.
[0105] According to an example embodiment applicable to a device like any of those described above, at least one autoencoder is trained with a plurality of samples of the patient signal associated with said autoencoder in different time windows in such a way as to minimize the error between the plurality of input values obtained from these time windows and the same values obtained at the output.
[0106] According to this implementation example, the signal samples used for training are obtained by shifting the same signal by a specific time window. This allows the autoencoder to be adapted to the signal's behavior under different evolutionary conditions.
[0107] According to an example of embodiment applicable to a device like any of those described above, at least one dynamic variable is the degree of oxygenation of the patient.
[0108] According to this implementation example, one of the variables is the same as the variable that is to be controlled, establishing a closed-loop control loop with greater responsiveness and less transients since the device is aware of the variations in the degree of oxygenation.
[0109] According to an example embodiment applicable to a device such as any of those described above, the prediction module is a fuzzy logic control module comprising a processor adapted to:
[0110] receive one or more static patient variables;
[0111] receive one or more variables from the measurements of the patient's dynamic signals;
[0112] where the prediction module makes use of a cascaded fuzzy logic structure grouped into a first sub-module adapted to process static variables and a second sub-module adapted to process variables from the patient's dynamic measurements, both sub-modules with independent processing and converging into a third sub-module according to a cascade structure, this third sub-module providing the estimated control value.
[0113] This prediction module uses a processor that can either be independent of the processor described so far, or the same processor can perform the described stages of actuating valve control and also the estimation using fuzzy logic stages. The terms fuzzy logic and fuzzy logic are considered equivalent.
[0114] In the training phase described, a prediction module is required to provide the oxygenation value that the device must deliver to assist the patient. This module, instantiated during the device configuration phase, can be based on correlations or another type of closed-loop control technique, such as PID (proportional-integral-derivative) control.
[0115] However, according to this specific example, the use of a fuzzy logic controller with a specific configuration has been considered very effective.
[0116] The module comprises a plurality of inputs, one or more static patient values and one or more dynamic variables, the variables that come from measurements and generate dynamic signals such as those used throughout this description: cardiac signal, respiratory signal and degree of oxygenation of the patient.
[0117] Although these three signs have been cited throughout the description as the most relevant, the examples are not limited to these and can either omit some of them or incorporate others such as surface tension in the skin at a specific point of the body, measurements of blood composition or others.
[0118] Each of the measurements incorporates more complex sensors or devices such as signal level or impedance adapters to adapt them to the device input.
[0119] The fuzzy logic module processes one or more static inputs and one or more dynamic inputs separately. This processing follows a first stage of fuzzification, whereby the input variables are converted into fuzzy sets once appropriate membership functions have been defined for each input variable.
[0120] Once the variables have been fuzzy, pre-established fuzzy rules are applied, which may initially be formulated in linguistic terms. This is the case, for example, when using criteria obtained from the experience of physicians for a plurality of circumstances identified in the initial fuzzy sets. Although these rules may initially be formulated linguistically, they are implemented as perfectly defined rules that establish the output values based on the fuzzy variables.
[0121] Once the fuzzy rules are established, their application, as indicated, leads to the inference phase, resulting in fuzzy sets as well. Finally, the fuzzy output variables are defuzzified, resulting in a single control value from the fuzzy sets.
[0122] This fuzzy controller scheme is replicated in several parts of the fuzzy logic module of this implementation example. Specifically, it is implemented in a submodule that processes static values, a separate submodule that processes dynamic values, and the outputs of both are processed in another fuzzy logic submodule that receives the values returned by the previous fuzzy logic submodules, resulting in the oxygen level control output.
[0123] A more specific example includes additional separate submodules, one for each dynamic signal, where the final module groups the signals from all of them, or, for example, through further intermediate submodules with progressive grouping. All of this follows a cascaded scheme.
[0124] Once these examples of fuzzy logic-based estimation modules have been described, the method uses one of them, for example, the most complex one described, to carry out the device configuration phase where the training of the first and second networks uses the value estimated by this module, establishing values from the input values (static and dynamic).
[0125] The result is a device with very low power consumption requirements, as the computational cost is low due to the method's efficiency. This method can be implemented more efficiently by incorporating hardware units configured to implement neural networks, rather than necessarily manipulating the data structure that represents the network with a main processor. In this case, the term "instantiation," when it involves modules or parts of the network implemented in hardware, remains valid.
[0126] A third aspect of the invention is a method of configuring a device for controlling the delivery of oxygen via the respiratory tract to a patient, wherein the device to be configured comprises:
[0127] an oxygen inlet; an oxygen outlet;
[0128] a valve actuated by a control signal, which determines the passage of oxygen from the oxygen inlet to the oxygen outlet in response to the value of the control signal;
[0129] at least one input port for the input of a measurement signal of a time-dependent dynamic variable obtained from the patient;
[0130] a processor;
[0131] where the method comprises, in any order, the following stages executed by the processor:
[0132] instantiate a prediction module configured to provide an estimate of the control signal value that determines the patient's oxygenation level;
[0133] instantiate a first neural network adapted to process static patient variables and provide a pre-established number of static latent variables;
[0134] instantiate at least one autoencoder where, once trained, it comprises: a) a first encoding stage adapted to obtain dynamic latent variables from the input values and, b) a second decoding stage adapted to recover the input values from the dynamic latent variables;
[0135] instantiate a second neural network adapted to, from the static and dynamic latent variables, provide a control value for the generation of a control signal, representative of said value, for the control of the actuatable valve;
[0136] Additionally, it will carry out
[0137] train at least one autoencoder to process at least one time-dependent dynamic variable measured in the patient;
[0138] establish a global neural network structure comprising:
[0139] the first neural network and the first encoding stage of at least one autoencoder arranged to provide the static and dynamic latent variables;
[0140] the second neural network, fed with the static and dynamic latent variables;
[0141] Train the first neural network and the second neural network simultaneously, using static and dynamic patient input data, imposing on the output of the second neural network the control value of the control signal estimated by the prediction module.
[0142] In this training phase used to configure the system, according to a preferred example, a selection of data obtained in a personalized way from the patient is used.
[0143] According to this implementation example, the configured system is adapted to the patient's response, and the configuration method results in a system also adapted to the patient's response. According to this implementation example, the static and dynamic patient input data used in the training phase are generated according to the following stages:
[0144] select a prediction module tailored to the patient, preferably a fuzzy logic prediction module;
[0145] establish clinical reference values for saturation for the patient;
[0146] to carry out a real-time measurement of the dynamic variables and determination of the static variables of the patient before supplying oxygen to the patient;
[0147] estimate with the prediction module (PM) a recommended oxygenation value for the patient based on the measurement of the previous stage and administer said recommended value to the patient;
[0148] Compare the oxygen saturation value measured in the patient after administration of the oxygen flow with the clinical reference values where at least the following are stored as valid data: a) static and dynamic patient input values as well as b) the estimated recommended value, such that are values that correspond to the recommended oxygenation values that result in a measured saturation that does not deviate from the clinical reference values of saturation for the patient above a pre-established threshold value, discarding the rest.
[0149] Once both the prediction module and the reference values have been established, the static variable values are considered, and the dynamic variable values of the patient are measured without the patient receiving an oxygenation dose. This allows the prediction module to provide a recommended value that is independent of the patient's response to oxygenation administered according to this recommended value and for as long as necessary.
[0150] Based on this response and the recommended value obtained from the prediction module, oxygen is administered to the patient using the values recommended by the prediction module. In this case, the patient's response is determined by measuring their blood oxygen saturation level. If this saturation is sufficiently close to the clinical reference values for the patient, then the input values and their corresponding value obtained from the prediction module are stored for use in the training phase; if they are far from the reference values, they are discarded. The criterion for being sufficiently close or far is a distance measurement compared to a pre-established threshold value.
[0151] According to this implementation example, the training data used in this process are not the data used to train the prediction module.
[0152] Similarly, according to a more preferred example, the prediction module is a fuzzy logic control module defined at least with rules based on criteria established based on the expert knowledge of physicians.
[0153] A fourth aspect of the invention is a method for controlling the oxygen supply in a device as configured by the preceding claim, the method comprising the following steps:
[0154] processing the patient's static variables with the first neural network, obtaining the static latent variables;
[0155] continuously process the measurement signal of the time-dependent dynamic variable measured in the patient according to the following sub-stages:
[0156] establish a time window;
[0157] sample the measurement signal of the time-dependent dynamic variable in the time window;
[0158] Process the sampled measurement signal with the encoding stage of at least one autoencoder, generating dynamic latent variables; combine the static latent variables and the dynamic latent variables, introduce the union of static and dynamic latent variables into the second neural network, providing a control value; generate a control signal from the control value and provide this signal to the actuatable valve;
[0159] shift the time window to a new point in time.
[0160] A fifth aspect of the invention is a computer program product comprising a set of instructions that, when executed by a processor, cause the processor to perform a configuration method according to the third aspect of the invention or a control method according to the fourth aspect of the invention.
[0161] DESCRIPTION OF THE DRAWINGS
[0162] These and other features and advantages of the invention will become clearer from the following detailed description of a preferred embodiment, given only as an illustrative and non-limiting example, with reference to the accompanying figures.
[0163] Figure 1 This figure shows a first diagram where a first part of the data processing carried out by the device is represented according to a specific example.
[0164] Figure 2 This figure shows a second diagram representing a second part of the data processing carried out by the device.
[0165] Figure 3 This figure schematically shows the structure of an autoencoder according to an implementation example.
[0166] Figure 4 This figure schematically shows an oxygen flow estimation module that implements a fuzzy logic control module.
[0167] DETAILED EXPLANATION OF THE INVENTION
[0168] The present invention, according to the first inventive aspect, is a device for controlling the supply of oxygen via the respiratory tract to a patient.
[0169] The device allows managing the amount of oxygen supplied to the patient via respiration from an oxygen source, for example, a pressurized oxygen bottle, and taking into account a plurality of parameters that respond to patient information.
[0170] Patient information includes data that is not modified during a treatment phase, and data that is continuously measured to determine the patient's response to therapy.
[0171] Patient information parameters include age, sex, weight, parameters related to the characterization of the response of their respiratory system, etc.
[0172] These parameters are those that will remain constant in the device. They can be modified, for example, if the patient's weight or lung structure changes, in which case the device is recalibrated to ensure these values remain constant.
[0173] The patient's static data are represented in Figure 1 as a set of n values shown in the form v4, v2> v3, v4, v5, v6, ... , v n This data is manipulated by a first module (MI).
[0174] The parameters identified as dynamic are manipulated by a second module (M2) and are data derived from a time-varying measurement of a signal, such as a cardiac signal. This implementation example uses three measurements: the patient's heart rate, oxygen saturation level, and respiratory rate. In Figure 1, these measured parameters are input through ports P1, P2, and P3 as signals S1, S2, and S3, which are sampled to transform them into values that can be manipulated by the processor.
[0175] According to Figure 1, part of the device structure is shown schematically, according to an example of implementation, mainly the computational structure that it implements, and which is completed with Figure 2.
[0176] Static data can be entered in a variety of ways, including through a communication port that transfers the data to a processor (P). Figure 1 shows a processor (P) configured to perform a first configuration phase and a second phase in which it is in operational mode, managing oxygen delivery to the patient based on the readings.
[0177] The device comprises an oxygen inlet (InO2) from an oxygen source and an oxygen outlet (OutO2) controlled by a valve (v), as shown in Figure 2, at the end of the computational structure that manages said valve. The computational system calculates a control value (Ve) which is transformed into a signal by an interface (Int), the control signal (Se) intended to operate the valve. The interface (Int) adapts the control value (Ve) into a control signal (Se) that depends on the type of valve (V) being controlled. For example, the controlled valve may be operated by a servo that is actuated by a digital PWM (Pulse Width Modulation) signal.
[0178] This oxygen output (OutO2) managed by the controlled valve (V) is the one that is supplied directly to the patient.
[0179] The patient has sensors that monitor dynamic signals (SI, S2, S3) that have a behavior that depends, at least, on the level of oxygenation he is receiving.
[0180] Returning to Figure 1, the first module (MI) processes the static variables using a first neural network (NI), generating a set of m static latent variables, those identified in Figure 1 as Z 1( l2, l3, —, l m .
[0181] According to one implementation, this transformation is performed once at process startup, so the m static latent variables are stored for use in operating mode without being recalculated, since their value does not change. According to another implementation, the storage is in persistent or non-volatile memory, so that upon restarting the device, the values do not need to be recalculated unless the processor (P) receives an instruction that forces their calculation, for example, when some static data has been updated.
[0182] Looking at the right side of Figure 1, the second module (M2) is shown, intended to process the dynamic parameters, that is, the parameters that correspond to measurements that are changing over time.
[0183] At the top of the second module (M2) are shown schematically the three ports (P1, P2, P3) through which three signals (SI, S2, S3) are received which correspond from left to right to: the pulse signal, the respiratory signal and the oxygen saturation signal in the patient respectively.
[0184] The three signals have been represented as a function that depends on time as the independent variable and on which time windows (W1, W2, W3) are defined. That is, each time window (W1, W2, W3) gives rise to a discrete function resulting from sampling the continuous signal received by its corresponding port (P1, P2, P3).
[0185] According to other embodiments, the specific sensor can incorporate these sampling functions. In this embodiment shown in Figure 1, the sampling is carried out in the second module (M2) and as part of the processor's (P) operation.
[0186] Below each signal (SI, S2, S3) is an autoencoder (A1, A2, A3) consisting of a first encoding stage (E1, E2, E3) and a second decoding stage (D1, D2, D3). In operating mode, the data sampled from the signal is encoded by the first encoding stage (E1, E2, E3), resulting in a set of dynamic latent variables. The dynamic latent variables of each of the three signals (SI, S2, S3) are represented as a ít a2, ... , a A , b r , b2, ... , b B , and 1( c2, ...,c c respectively.
[0187] The second decoding stage (DI, D2, and D3) is not used in the signal processing operating mode because the data used consists of dynamic latent variables. The second decoding stage (DI, D2, D3) is involved in the first device configuration stage, where the autoencoder (A1, A2, A3) is configured to encode and decode a signal, specifically the one corresponding to it (SI, S2, S3), reconstructing it in such a way that the error before and after processing is less than a predetermined value. One way to measure the error is by pre-establishing a standard || • || to measure the difference between the vectors containing the sample values of the input and output.
[0188] In this implementation example, the structure of the autoencoders (A1, A2, A3) is as shown schematically in Figure 3 and will be described later. The structure consists of a plurality of layers, primarily convolution layers, whose weights must be determined during a training phase. The training phase uses a plurality of signals similar to those to be processed and under various patient conditions, mainly oxygen saturation levels, employing the difference norm as a measure of the machine learning method's convergence. A subsequent validation phase is performed using a representative subset of signals not used in the training phase.
[0189] When the autoencoder (A1, A2, A3) is configured after the learning phase, the dynamic latent variables are those that result from the autoencoder's encoding phase. These dynamic latent variables contain the information necessary to reconstruct the signal, but with a significantly smaller number of values than the number of samples in the encoded sampled signal.
[0190] Following this process, the first module (MI) provides a set of static latent variables, and the second module (M2) provides three sets of dynamic latent variables, one set for each signal.
[0191] The lower part of Figure 1 shows a process of concatenating all the latent variables in such a way that a single vector with components is constructed: Z 1( l2, l3, ... , l m , to ít a2, ... , a A , b r , b2, ... , b B , c ít c2, ... , c cresult of concatenating the vectors provided by the first neural network (NI) and the first three encoding stages (El, E2, E3).
[0192] This same vector is shown at the top of Figure 2 to indicate that it is the vector that feeds the input to a second neural network (N2), in this case a fully connected network. As shown schematically in Figure 2, the vector constructed by concatenating all the latent variables is introduced as input to the second neural network (N2). The second neural network (N2), in this example, is fully connected and provides a control value (Ve) that is processed by an interface (Int) to provide a control signal (Se) representative of the control value (Ve).
[0193] The control signal (Se) acts on the actuated valve (V), establishing control of the oxygen flow from its inlet (I nO2) to its outlet (OutO2). The degree of opening of the actuated valve (V) is proportional to the value of the actuation signal, the control signal (Se), and therefore to the control value (Ve).
[0194] The device must be configured sequentially. The first components to be configured are the autoencoders (A1, A2, A3), which must be trained using multiple samples of the signal they process—in this case, the cardiac signal, the respiratory signal, and the signal from a patient oxygenation measurement. The autoencoders (A1, A2, A3) are trained by inputting these signal samples and ensuring that the same signal is output.
[0195] The training phase modifies the weights of the layers that make up each autoencoder. Signals not used during the training phase are reserved to establish whether the autoencoders accurately reconstruct the input signal; that is, whether the reconstructed output, when compared to the input, does not differ in norm from a preset value, for a pre-set norm.
[0196] When the test is passed, it is considered that both the encoding stage (El, E2, E3) and the decoding stage (DI, D2, D3) are properly trained.
[0197] Once the autoencoders (A1, A2, A3) are trained, the first network (N1), which encodes the static variables, and the second network (N2), which encodes the vector of latent variables, are trained. Both networks are trained simultaneously, using collections of input samples (static variables and dynamic signal samples). For these samples, the estimated value provided by a prediction module (PM) is imposed on the output, providing an estimate of the control value (Ve).In this case, the procedure was the same as with the autoencoders: a first group of static and dynamic variables was taken to feed the input of both the first neural network (NI) and the input ports (P1, P2, P3), along with the output estimates obtained with the prediction module (MP), to impose it on the output of the second network (N2). A second group of variables was also taken to verify if, when introducing the values of static and dynamic variables, a control value (Ve) is obtained that does not differ from the one estimated by the prediction module (MP) by a difference smaller, in absolute value, than a pre-established value.
[0198] When this last error condition is verified, the first network (NI) and the second network (N2) are considered to be trained and ready to operate.
[0199] Operationally, the first network constructs the static latent values from the patient's static variables. This value is no longer recalculated but is used in each iteration by concatenating these values with those provided each time by the first stage (E1, E2, E3) of the plurality of autoencoders (A1, A2, A3).
[0200] The vector of latent variables is processed by the second network (N2) obtaining the control value (Ve) which serves to provide the control signal (Se) that acts on the actuated valve (V) dynamically supplying oxygen to the patient.
[0201] Figure 3 shows a specific autoencoder structure (A1, A2, A3), where in particular they are convolutional autoencoders.
[0202] The first encoding stage (El, E2, E3), after input, has a first convolutional layer (Ll) for feature extraction, a first pooling layer (Lpl) for dimensionality reduction to highlight only essential features, and a second convolutional layer (L2) that generates more abstract and refined representations of the processed features.
[0203] Finally, the next layer is a second pooling layer (Lp2), which is optional, and which performs a final compression that generates initial latent variables. After the final compression by the second pooling layer (Lp2), a transformation layer (Lt) is incorporated, converting the data into a vector (v¡). This Lt layer performs latent encoding to reduce the data to the latent variables that are ultimately stored in the aforementioned vector (v¡). According to one implementation example, this vector has 10 variables, which define the waveform or temporal signal resulting from the patient measurement. The latent variable vector (v¡) is represented in the figure as the rectangle with the shortest vertical length.
[0204] The second decoding stage (D1, D2, D3) takes the latent variable vector (v1) as input and applies an expansion layer (L1) that expands the latent vector (v1) into a data structure representing a higher-dimensional tensor. The next layer is an upsampling layer (L1) to increase the initial resolution. This is followed by a convolutional layer (L3) for refining the expanded information. The next layer is an upsampling layer (L1) to restore the original structure. Finally, a convolutional layer (L4) generates features similar to the input, and a final refinement or reconstruction layer (Lf) returns the reconstructed function with the same form as the autoencoder input (L1, A2, A3).
[0205] Figure 4 schematically shows a prediction module (PM) controlled by a processor (PP) which could be the processor (P) from Figures 1 and 2, or a second processor (PP) in communication with the first processor (P).
[0206] The predictive module (PM) is a fuzzy logic module capable of operating as a fuzzy logic controller. On the left side of the figure, at the top, is shown a first sub-module (slPM) responsible for processing the static variables it receives as input. The input is represented by a plurality of lines, each representing a static value such as age, patient weight, patient category, etc.
[0207] Below this is shown a second sub-module (s2MP) which has three input ports configured to receive the three dynamic signals: the cardiac signal, the respiratory signal, and the signal corresponding to a measurement of the patient's oxygenation level.
[0208] Each of these modules has a logic controller structure configured using membership functions, providing a signal representing the static and dynamic values, respectively. An alternative scheme has an independent sub-module for each dynamic signal. Referring to Figure 4, the output of the first and second sub-modules (s1MP, s2MP) enters a third sub-module (s3MP), also designed as a fuzzy logic controller. Based on the values from the previous sub-modules (s1MP, s2MP), this third sub-module provides an estimate of the oxygenation level the patient should receive—that is, the control value (Ve). This value is then used by an interface (Int) to generate the control signal (Se) that actuates an actuated control valve (V).
[0209] This predictive module (PM) is a module that, on its own, serves to control the delivery of oxygen via the respiratory tract in a patient. In this implementation example, it has been used as an estimator that has allowed the training of the first network (NI) and the second network (N2).
[0210] Throughout this description, the term "processor" has been used. This term should be interpreted broadly as a processing unit, which may consist of several processing cores or distributed units, for example, for parallel or concurrent processing. That is, the manner in which it carries out the stages for which it is configured is not part of the invention, but can be implemented according to how a person skilled in the art would do it.
Claims
CLAIMS 1. Device for controlling the supply of oxygen via the respiratory tract to a patient, where the device comprises: an oxygen inlet (I nO2); an oxygen outlet (OutO2); a valve (V) actuated by a control signal (Se), which determines the passage of oxygen from the oxygen inlet (I nO2) to the oxygen outlet (OutO2) in response to the value of the control signal (Se); at least one input port (P1, P2, P3) for the input of a measurement signal of a time-dependent dynamic variable obtained from the patient; a processor (P) adapted to carry out the following configuration steps in any order: instantiate a prediction module (PM) configured to provide an estimate of the control signal value (Se) that determines the degree of oxygenation of the patient; instantiate a first neural network (NN) adapted to process static patient variables and provide a pre-established number of static latent variables; instantiate at least one autoencoder (Al, A2, A3) where, once trained, it comprises: a) a first encoding stage (El, E2, E3) adapted to obtain dynamic latent variables from the input values and, b) a second decoding stage (DI, D2, D3) adapted to recover the input values from the dynamic latent variables; instantiate a second neural network (N2) adapted to, from the static and dynamic latent variables, provide a control value for the generation of a control signal (Se), representative of said value, for the control of the actuatable valve (V); Additionally, it will carry out train at least one autoencoder (A1, A2, A3) to process at least one time-dependent dynamic variable measured in the patient; establish a global neural network structure comprising: the first neural network (NI) and the first encoding stage (El, E2, E3) of at least one autoencoder (Al, A2, A3) arranged to provide the static and dynamic latent variables; the second neural network (N 2), fed with the static and dynamic latent variables; Train the first neural network (NI) and the second neural network (N2) simultaneously, using static and dynamic patient input data, imposing on the output of the second neural network the control value (Ve) of the control signal (Se) estimated by the prediction module.
2. Device configured according to claim 1, wherein the processor (P) is further configured to, in operating mode, perform: processing the patient's static variables with the first neural network (NI) obtaining the static latent variables; continuously process the measurement signal (SI, S2, S3) of the time-dependent dynamic variable measured in the patient according to the following sub-stages: set a time window (W1, W2, W3); sample the measurement signal (SI, S2, S3) of the time-dependent dynamic variable in the time window (Wl, W2, W3); process the sampled measurement signal (SI, S2, S3) with the encoder stage (El, E2, E3) of at least one autoencoder (Al, A2, A3) generating dynamic latent variables; combine the static latent variables and the dynamic latent variables, introduce the union of static and dynamic latent variables in the second neural network (N2) providing a control value (Ve); generate a control signal (Sc) from the control value (Ve) and provide this signal to the actuatable valve; move the time window (W1, W2, W3) to a new time instant.
3. Control device according to claim 1 or 2, comprising a plurality of input ports (P1, P2, P3) for the input of measurement signals (S1, S2, S3) of different time-dependent dynamic variables obtained from the patient, the dynamic variables obtained from measurements in the following list: patient's cardiac signal; patient oxygenation level; patient respiratory signal; where each distinct dynamic signal has its own associated autoencoder (A1, A2, A3), independent of the other autoencoders, trained with said dynamic signal (S1, S2, S3).
4. Control device according to any of the preceding claims, wherein the at least one autoencoder (A1, A2, A3) comprises a first encoding stage (E1, E2, E3) formed by a convolutional layered structure from the input to the output of latent variables comprising: a first convolutional layer (Ll) for extracting features from the input values; a transformation layer (Lt) of the data into a vector of latent variables (c¿ ).
5. Control device according to the preceding claim, wherein the first encoding stage (El, E2, E3) further comprises a pooling layer (Lp) between the first convolutional layer (Ll) and the data transformation layer (Lt) for reducing the dimensionality of the data.
6. Control device according to claim 4 or 5, wherein the first encoding stage (El, E2, E3), after the first convolutional layer (Ll), further comprises a second convolutional layer (L2) for obtaining more abstract features, and optionally a subsequent pooling layer (Lp) for reducing the dimensionality of the data.
7. Control device according to any of the preceding claims, wherein the at least one autoencoder (A1, A2, A3) comprises a second decoding stage (D1, D2, D3) formed by a convolutional layered structure (L1, L3, L4, Lr) from the latent variable input (c) to the output, comprising: a first expansion layer (Le) of a vector of latent variables (c¿ ) in a higher dimension tensor; at least one convolutional refinement layer (Lr) of the expanded information.
8. Control device according to the preceding claim, wherein the second decoding stage (DI, D2, D3) further comprises at least one upsampling layer (Lusl, Lus2) between the first expansion layer (Le) and the at least one convolutional refinement layer (Lr) for initial resolution increase.
9. Control device according to claim 7 or 8, wherein the second decoding stage (DI, D2, D3), after at least one convolutional layer (Le, Lr), further comprises at least a third convolutional layer (L3, L4), and optionally a subsequent upsampling layer (Lus2).
10. Control device according to any of claims 6 to 9, wherein the second decoding stage (DI, D2, D3) comprises a final reconstruction layer (Lr) that returns the reconstructed function with the same structure as the input of the first encoding stage (El, E2, E3). 11.- Device according to any of the preceding claims, wherein the second neural network (N2) is a fully connected structure network. 12.- Device according to any of the preceding claims, wherein at least one autoencoder (A1, A2, A3) is trained by introducing a plurality of input values and the same output values corresponding to its associated signal, minimizing the error between the output of the second decoding stage and the input. 13.- Device according to any of claims 3 to 12, wherein the at least one autoencoder (Al, A2, A3) is trained with a plurality of samples of the patient's signal (SI, S2, S3), associated with said autoencoder (Al, A2, A3) in different time windows (Wl, W2, W3) such that the error between the plurality of input values obtained from these time windows (Wl, W2, W3) and the same values obtained at the output is minimized. 14.- Device according to any of the preceding claims, wherein at least one dynamic variable is the degree of oxygenation of the patient.
15. Device according to any of the preceding claims, wherein the prediction module (PM) is a fuzzy logic control module comprising a processor (PP) adapted for: receive one or more static variables from the patient; receive one or more variables from the measurements of the dynamic signals (SI, S2, S3) of the patient; where the prediction module (MP) makes use of a cascaded fuzzy logic structure grouped into a first sub-module (slMP) adapted to process static variables and a second sub-module (s2MP) adapted to process variables from the patient's dynamic measurements, both sub-modules (slMP, S2MP) with independent processing and converging into a third sub-module (s3MP) according to a cascade structure for this third sub-module (s3MP) to provide the estimated control value (Sv).
16. Method for configuring a device for controlling the delivery of oxygen via the respiratory tract to a patient, where the device to be configured comprises: an oxygen inlet (I nO2); an oxygen outlet (OutO2); a valve (V) actuated by a control signal (Se), which determines the passage of oxygen from the oxygen inlet (I nO2) to the oxygen outlet (OutO2) in response to the value of the control signal (Se); at least one input port (P1, P2, P3) for the input of a measurement signal of a time-dependent dynamic variable obtained from the patient; a processor (P); where the method comprises, in any order, the following stages executed by the processor: instantiate a prediction module (PM) configured to provide an estimate of the control signal value (Se) that determines the degree of oxygenation of the patient; instantiate a first neural network (NN) adapted to process static patient variables and provide a pre-established number of static latent variables; instantiate at least one autoencoder (Al, A2, A3) where, once trained, it comprises: a) a first encoding stage (El, E2, E3) adapted to obtain dynamic latent variables from the input values and, b) a second decoding stage (DI, D2, D3) adapted to recover the input values from the dynamic latent variables; instantiate a second neural network (N2) adapted to, from the static and dynamic latent variables, provide a control value for the generation of a control signal (Se), representative of said value, for the control of the actuatable valve (V); Additionally, it will carry out train at least one autoencoder (A1, A2, A3) to process at least one time-dependent dynamic variable measured in the patient; establish a global neural network structure comprising: the first neural network (NI) and the first encoding stage (El, E2, E3) of at least one autoencoder (Al, A2, A3) arranged to provide the static and dynamic latent variables; the second neural network (N2), fed with the static and dynamic latent variables; Train the first neural network (NI) and the second neural network (N2) simultaneously, using static and dynamic patient input data, imposing on the output of the second neural network the control value (Ve) of the control signal (Se) estimated by the prediction module (MP).
17. System according to any of claims 1 to 15 and method according to the preceding claim, wherein the static and dynamic patient input data used in the training phase are generated according to the following stages: select a prediction module (PM) tailored to the patient, preferably a fuzzy logic prediction module (PM); establish clinical reference values for saturation for the patient; to carry out a real-time measurement of the dynamic variables and determination of the static variables of the patient before supplying oxygen to the patient; estimate with the prediction module (PM) a recommended oxygenation value for the patient based on the measurement of the previous stage and administer said recommended value to the patient; Compare the oxygen saturation value measured in the patient after the administration of the oxygen flow with the clinical reference values where at least the following are stored as valid data: a) static and dynamic patient input values as well as b) the estimated recommended value, such that these are values that correspond to the recommended oxygenation values that result in a measured saturation that does not deviate from the clinical reference values of saturation for the patient above a pre-established threshold value, discarding the rest.
18. Method for controlling the oxygen supply in a device as configured by the preceding claim, the method comprising the following steps: processing the patient's static variables with the first neural network (NI) obtaining the static latent variables; continuously process the measurement signal (SI, S2, S3) of the time-dependent dynamic variable measured in the patient according to the following sub-stages: set a time window (W1, W2, W3); sample the measurement signal (SI, S2, S3) of the time-dependent dynamic variable in the time window (Wl, W2, W3); process the sampled measurement signal (SI, S2, S3) with the encoder stage (El, E2, E3) of at least one autoencoder (Al, A2, A3) generating dynamic latent variables; combine the static latent variables and the dynamic latent variables, introduce the union of static and dynamic latent variables in the second neural network (N2) providing a control value (Ve); generate a control signal (Sc) from the control value (Ve) and provide this signal to the actuatable valve; move the time window (W1, W2, W3) to a new time instant.
19. A computer program product comprising a set of instructions that, when executed by a processor, cause the processor to perform a configuration method according to claim 16 or 17, or a control method according to claim 18.
