Intelligent nursing bed system combining vital sign monitoring and gesture recognition control and control method

By integrating RK3588 edge computing and GD32F103C8T6 controller in the nursing bed system, combined with improved YOLOv8n gesture recognition and fuzzy PID control, high-precision gesture recognition and contactless bed control are achieved, solving the problem of single functions of traditional nursing beds and improving nursing safety and user experience.

CN120381373APending Publication Date: 2025-07-29XUZHOU NORMAL UNIVERSITY
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202510333594.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-20
Publication Date
2025-07-29

AI Technical Summary

Technical Problem

Traditional nursing beds have single functions and are difficult to meet modern nursing needs. Embedded platforms need to take into account high computing power and low power consumption. Gesture recognition algorithms need to optimize the model structure based on high accuracy, and the system needs to ensure real-time, stability and data security.

Method used

The intelligent nursing bed system combining vital sign monitoring and gesture recognition control is adopted to deploy the improved YOLOv8n gesture recognition model using the RK3588 edge computing end, integrating the ECA channel attention mechanism and the PANet multi-scale feature fusion algorithm. The GD32F103C8T6 controller adopts a fuzzy PID control algorithm to dynamically adjust the driving parameters of the electro-hydraulic rod, and forms an adaptive adjustment mechanism through fuzzy logic and classic PID control.

Benefits of technology

It realizes high-precision gesture recognition and contactless bed control, real-time health data collection and cloud-based collaborative management, significantly improves nursing safety and user experience, ensures smooth and accurate mechanical movements, reduces the probability of bedsore occurrence, and improves the comfort of bedridden patients.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120381373A_ABST
    Figure CN120381373A_ABST
Patent Text Reader

Abstract

The invention discloses an intelligent nursing bed system combining vital sign monitoring and gesture recognition control and a control method, high-precision gesture recognition is realized through an improved YOLOv8n algorithm, and a multi-modal man-machine interaction scheme is constructed by combining RK3588 NPU acceleration and millimeter wave radar physiological monitoring; the system supports non-contact bed body control, real-time health data acquisition and cloud collaborative management, and the nursing safety and the user experience are remarkably improved. A fuzzy PID control algorithm is introduced, and fuzzy logic and classical PID control are fused to form a self-adaptive adjustment mechanism, so that precise control of mechanical actions of the nursing bed is realized; the fuzzy PID controller dynamically adjusts PID parameters according to the included angle e between the hydraulic rod and the bed body and the deviation change rate ec, and it is ensured that mechanical actions of the nursing bed are stable and accurate. The method is particularly suitable for a multi-sensor data fusion scene, the body movement requirement of the patient is responded in real time, the bed surface is optimized, and the comfort level of the bedridden patient is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to an intelligent nursing bed system and a control method combining vital sign monitoring and gesture recognition control. Background Art

[0002] As the global population ages, the need for care for the elderly and disabled continues to increase. Traditional nursing beds, with their limited functionality, are unable to meet modern care needs. In recent years, the development of embedded technology, artificial intelligence, and the Internet of Things has provided new opportunities for the development of intelligent nursing devices. For example, the RK3588 embedded platform boasts powerful computing capabilities and a rich set of interfaces, supporting complex AI and image processing tasks. Furthermore, advanced object detection algorithms such as YOLOv8 demonstrate high efficiency and accuracy in gesture recognition, providing technical support for human-computer interaction.

[0003] The widespread adoption of IoT technology has enabled interoperability between devices, making it possible for smart nursing beds to support remote monitoring and management, improving care efficiency and user experience. However, integrating these technologies into nursing bed systems to provide safer, more comfortable, and personalized care for the elderly and disabled still faces numerous challenges. These challenges include the need for embedded platforms to balance high computing power with low power consumption; gesture recognition algorithms to optimize their model structure while maintaining high accuracy to accommodate embedded devices; and the need for systems to ensure real-time performance, stability, and data security and privacy. Summary of the Invention

[0004] In response to the problems existing in the above-mentioned prior art, the present invention provides an intelligent nursing bed system and control method that combines vital signs monitoring and gesture recognition control. The system and method can integrate Internet of Things technology into the nursing bed system to provide nursing services that meet the needs of the elderly and disabled people.

[0005] To achieve the above objectives, the present invention provides an intelligent nursing bed system that combines vital sign monitoring and gesture recognition control, including a nursing bed body, a multimodal data acquisition module, an edge computing and control module, a communication module, a ThingsCloud cloud, and an execution and feedback module;

[0006] The multimodal data acquisition module includes an angle sensor, a visual sensor, and an R24BBD1 millimeter-wave radar; the angle sensor is used to collect hydraulic rod inclination data, the visual sensor is deployed at the head of the bed to collect gesture images, and the R24BBD1 millimeter-wave radar is used to obtain physiological indicators such as heart rate and respiratory rate in a non-contact manner;

[0007] The described edge computing and control module includes an RK3588 edge computing terminal and a GD32F103C8T6 controller; an improved YOLOv8n gesture recognition model is deployed on the RK3588 edge computing terminal, integrating the ECA channel attention mechanism, PANet multi-scale feature fusion, and ASFF adaptive spatial feature fusion algorithm; the GD32F103C8T6 controller uses a fuzzy PID control algorithm to dynamically adjust the driving parameters of the electro-hydraulic rod.

[0008] The described communication module includes a Bluetooth module and an ESP32 microcontroller; the Bluetooth module is used to support the transmission of mobile app instructions, and the ESP32 microcontroller is used to upload physiological data to the ThingsCloud cloud.

[0009] The ThingsCloud cloud is used to analyze physiological data in real time and trigger mobile alerts when abnormal.

[0010] The execution and feedback module includes an electro-hydraulic rod, a voice module, and a mobile app; the electro-hydraulic rod is used to perform back-lifting and side-turning actions and supports limit protection, the voice module is used to provide voice feedback on the operation status, and the mobile app is used to synchronize cloud data in real time, receive abnormal alerts, and perform remote control.

[0011] Furthermore, the inference speed of the RK3588 edge computing terminal is ≥25FPS; the control period of the GD32F103C8T6 controller is ≤200ms.

[0012] An intelligent nursing bed control method combining vital sign monitoring and gesture recognition control includes the following steps:

[0013] Step 1: The visual sensor collects the gestures of the patient on the nursing bed at a resolution of 416×416 and transmits them to the RK3588 edge computing terminal via USB; the R24BBD1 millimeter-wave radar collects physiological data in the 24GHz band and uploads it to the cloud via the ESP32 microcontroller.

[0014] Step 2: The RK3588 edge computing terminal performs gesture recognition, maps corresponding instructions through the improved YOLOv8n gesture recognition model, dynamically adjusts the PID parameters through fuzzy PID control, and outputs a PWM signal to drive the hydraulic rod to act.

[0015] Step 3: The ThingsCloud cloud analyzes the received physiological data and pushes a warning to the mobile app when abnormal; instructions can be sent to the Bluetooth module through the mobile end, and after the Bluetooth module receives the instructions, it transmits them to the GD32F103C8T6 control end, and the GD32F103C8T6 controls the hydraulic rod to execute the instructions.

[0016] Step 4: The electro-hydraulic rod adjusts the bed posture according to the PWM duty cycle, and the angle sensor provides real-time feedback on the position; the voice module broadcasts the prompt.

[0017] Further, the improved YOLOv8n gesture recognition model in step 2 includes an ECA network, a PANet multi-scale feature fusion algorithm, and an ASFF adaptive spatial feature fusion algorithm, which are specifically as follows;

[0018] 2-1. The ECA network directly learns the features of global average pooling (GAP) through one-dimensional convolution. In the structure of the ECA attention mechanism, C represents the number of channels, GAP represents global average pooling, and k = ψ(C) represents the calculation of the adaptive one-dimensional convolution kernel size; the adaptive function is as follows:

[0019]

[0020] where k represents the convolution kernel size, γ and b are used to adjust the ratio between the number of channels C and the convolution kernel size k; |*|odd represents the nearest odd number of *;

[0021] 2-2. The specific process of the PANet multi-scale feature fusion algorithm is as follows:

[0022] 2-2-1. Perform Backbone processing and ECA enhancement:

[0023] Backbone processing: Input image size: length × width × (red, green, and blue three dimensions); gradually reduce the spatial dimension and increase the number of channels through the convolutional layer CBL and the pooling layer to obtain the feature map X1: length1 × width1 × number of channels1, and the feature map X2: length2 × width2 × number of channels2;

[0024] ECA enhancement: Apply the ECA module to enhance the feature expression ability, and output the enhanced feature maps X1' and X2', with the image size remaining unchanged;

[0025] 2-2-2. CBL processing: X1' is processed through the CBL layer (convolution kernel size 3×3, stride 1, padding 0, output channels 256) to obtain X1″:

[0026] X2' is processed through the CBL layer (convolution kernel size 4×4, stride 2, padding 1, output channels 128) to obtain X2″:

[0027] 2-2-3. Upsampling and feature map stitching:

[0028] Upsampling: X1″ is upsampled through the transposed convolutional layer to obtain X1″′:

[0029] Feature map concatenation Concat:

[0030] Concatenate X1″′ and X2′ to get P1:

[0031] 2-2-4. Downsampling and feature map splicing:

[0032] Downsampling: X2′ is downsampled through the pooling layer to obtain X2″: length 1× width 1× (number of channels 2×2);

[0033] Feature map concatenation Concat:

[0034] Concatenate P″ and X1 to get P2: length 1× width 1×(number of channels 1 + 2 number of channels 2);

[0035] 2-2-5. CBL processing and output characteristics:

[0036] CBL treatment: P1 was treated with CBL three times to obtain P1′:

[0037] P2 is processed by three CBL processes to obtain P2′: length 1× width 1× (channel number 1 + 2 channel number 2);

[0038] The specific steps are as follows:

[0039] 2-2-5-1. Use the convolution kernel to slide on the input feature map, calculate the dot product between the convolution kernel and the input feature map, and generate a new feature map. The formula is as follows:

[0040] Conv(x)=E*X+b;

[0041] Among them, E is the convolution kernel, b is the bias term, and * represents the convolution operation;

[0042] 2-2-5-2. Normalize the output of the convolutional layer so that the data of each batch obeys the same distribution and accelerates the convergence of the network. The formula is as follows:

[0043]

[0044] in, and are the mean and variance of the current batch, δ and ε are learnable parameters, and ∈ is a small constant used to prevent the denominator from being zero;

[0045] 2-2-5-3. After the Leaky ReLU function, the gradient disappearance is alleviated. The formula is expressed as:

[0046]

[0047] Among them, g is a small constant (usually 0.01 or 0.2) used to control the gradient of the negative value part;

[0048] 2-3. The specific process of the ASFF adaptive spatial feature fusion algorithm is as follows:

[0049] 2-3-1. Pool P′ through a pooling kernel with a window size and a stride of 2 to obtain P″, and convolve P″ through a transposed convolutional kernel with a size of 2×2 (stride of 2; padding of 1; number of output channels of 512) to obtain P″′, so that P″′ matches the spatial dimension of X1;

[0050] 2-3-2. Convolve the upsampled feature maps X1 and X2′ through a 1×1 convolutional block to generate two spatial weight vectors of 13×13×8, and normalize the generated 13×13×2 weight information through the Softmax function to obtain the normalized weight information. The Softmax function is defined as:

[0051]

[0052] where xi and xj are the elements of the weight vector, and N is the dimension of the weight vector;

[0053] 2-3-3. Multiply the normalized weight information by the X1 and X2 feature maps and fuse them to obtain an effective feature layer for large-scale target prediction. Specifically:

[0054]

[0055] where, and ω are the weight coefficients obtained by Softmax normalization and are used to balance the contributions of different feature maps;

[0056] 2-3-4. Finally, output the feature map P1, where the number of channels is the sum of the number of channels of the two input feature maps.

[0057] Furthermore, the specific process of the fuzzy PID control in step 2 is as follows:

[0058] 2-1. Define the fuzzy sets of the input variables e and e c as {Negative Big (NB), Negative Medium (NM), Negative Small (NS), Zero (ZO), Positive Small (PS), Positive Medium (PM), Positive Big (PB)}; define the fuzzy sets of the output variables ΔK p 、ΔK i 、ΔK d ; use the normal distribution function to convert the input exact values into fuzzy values;

[0059] 2-2. Establish the following fuzzy rule base:

[0060] 2-2-1. For controller parameter K p , according to the input quantities e and e c The fuzzy value of , its output rule is expressed as:

[0061] When e c =NB:

[0062] e∈{NB,NM,NS}, then K p =PB;

[0063] e=ZO, then K p =PM;

[0064] e∈{PS,PM,PB}, then K p =PS;

[0065] When e c =NM:

[0066] e∈{NB,NM}, then K p =PB;

[0067] e=NS, then K p =PM;

[0068] e∈{ZO,PS}, then K p =PS;

[0069] e∈{PM,PB}, then K p =NS;

[0070] When e c =NS:

[0071] e∈{NB,NM,NS}, then K p =PM;

[0072] e=ZO, then K p =PS,

[0073] e∈{PS,PM}, then K p =NS;

[0074] e=PB, then K p =NM;

[0075] When e c = ZO: e∈{NB,NM,NS}, then K p =PM; e = ZO, then K p =PS;

[0076] e∈{PS,PM}, then K p =NS,;

[0077] e=PB, then Kp = NM;

[0078] When e c = PS:

[0079] e ∈ {NB, NM, NS}, then K p = PS;

[0080] e = ZO, then K p = ZO;

[0081] e ∈ {PS, PM}, then K p = NS;

[0082] e = PB, then K p = NM;

[0083] When e c = PM:

[0084] e ∈ {NB, NM}, then K p = PS;

[0085] e ∈ {NS, ZO}, then K p = ZO;

[0086] e ∈ {PS, PM}, then K p = NS;

[0087] e = PB, then K p = NM;

[0088] When e c = PB:

[0089] e ∈ {NB, NM}, then K p = ZO;

[0090] e ∈ {NS, ZO, PS, PM}, then K p = NM;

[0091] e = PB, then K p = NB;

[0092] 2-2-2. For the controller parameter K i , according to the fuzzy values of the input quantity e and e c , its output rule is expressed as: When e c = NB:

[0093] e ∈ {NB, NM, NS}, then K i = NB;

[0094] e = ZO, then K i = NM;

[0095] e∈{PS,PM,PB}, then K i =NM;

[0096] When e c =NM:

[0097] e∈{NB,NM}, then K i =NB;

[0098] e∈{NS,ZO}, then K i =NM;

[0099] e∈{PS,PM}, then K i =NS;

[0100] e=PB, then K i =PS;

[0101] When e c =NS:

[0102] e∈{NB,NM}, then Ki=NB;

[0103] e=NS, then Ki=NM;

[0104] e=ZO, then Ki=NS;

[0105] e∈{PS,PM,PB}, then Ki=PS; when e c =ZO: e∈{NB,NM,NS}, then Ki=NM; e=ZO, then K i =ZO;

[0106] e∈{PS,PM}, then K i =PS;

[0107] e=PB, then K i =PM;

[0108] When e c =PS:

[0109] e∈{NB,NM}, then K i =NM,;

[0110] e=NS, then K i =NS;

[0111] e=ZO, then K i =ZO;

[0112] e∈{PS,PM,PB}, then K i =PM;

[0113] When e c =PM:

[0114] If \(e\in\{NB, NM\}\), then \(K\) i \(=ZO\);

[0115] If \(e\in\{NS, ZO, PS\}\), then \(K\) i \(=PS\);

[0116] If \(e\in\{PM, PB\}\), then \(K\) i \(=PM\);

[0117] When \(e\) c \(=PB\): If \(e\in\{NB, NM\}\), then \(K\) i \(=ZO\);

[0118] If \(e\in\{NS, ZO, PS, PM\}\), then \(K\) i \(=PS\);

[0119] If \(e = PB\), then \(K\) i \(=PB\);

[0120] 2 - 2 - 3. For the controller parameter \(K\) d , according to the fuzzy values of the input quantities \(e\) and \(\dot{e}\) c , its output rule is expressed as: When \(e\) c \(=NB\):

[0121] If \(e\in\{NB, NM\}\), then \(K\) d \(=PS\);

[0122] If \(e\in\{NS, ZO\}\), then \(K\) d \(=NS\);

[0123] If \(e\in\{PS, PM, PB\}\), then \(K\) d \(=NM\);

[0124] When \(e\) c \(=NM\):

[0125] If \(e\in\{NB, NM\}\), then \(K\) d \(=PS\);

[0126] If \(e\in\{NS, ZO\}\), then \(K\) d \(=NS\);

[0127] If \(e\in\{PS, PM\}\), then \(K\) d \(=NM\);

[0128] If \(e = PB\), then \(K\) d \(=ZO\);

[0129] When \(e\) c \(=NS\):

[0130] If \(e\in\{NB, NM, NS\}\), then \(K\) d \(=ZO\);

[0131] If \(e\in\{ZO,PS\}\), then \(K\) d \(=NS\);

[0132] If \(e\in\{PM,PB\}\), then \(K\) d \(=ZO\);

[0133] When \(e\) c \(=ZO\):

[0134] If \(e\in\{NB,NM,NS,ZO,PS,PM,PB\}\), then \(K\) d \(=ZO\);

[0135] When \(e\) c \(=PS\):

[0136] If \(e\in\{NB,NM,NS,ZO\}\), then \(K\) d \(=ZO\);

[0137] If \(e\in\{PS,PM\}\), then \(K\) d \(=PS\);

[0138] If \(e = PB\), then \(K\) d \(=PB\);

[0139] When \(e\) c \(=PM\):

[0140] If \(e\in\{NB,NM\}\), then \(K\) d \(=PB\);

[0141] If \(e\in\{NS,ZO,PS\}\), then \(K\) d \(=PS\);

[0142] If \(e\in\{PM,PB\}\), then \(K\) d \(=PS\);

[0143] When \(e\) c \(=PB\):

[0144] If \(e\in\{NB,NM,NS,ZO,PS,PM,PB\}\), then \(K\) d \(=PB\);

[0145] Where:

[0146] NB:Negative Big, indicating that the deviation \(e\) or the deviation change rate \(\dot{e}\) c is a large negative value;

[0147] NM:Negative Medium, indicating that the deviation \(e\) or the deviation change rate \(\dot{e}\) c is a medium negative value; NS:Negative Small, indicating that the deviation \(e\) or the deviation change rate \(\dot{e}\) c is a small negative value;

[0148] ZO: Zero, which means the deviation e or the deviation change rate e is zero c is close to zero;

[0149] PS: Positive Small, which means the deviation e or the deviation change rate e c is a small positive value;

[0150] PM: Positive Medium, which means the deviation e or the deviation change rate e c is a medium positive value; PB: Positive Big, which means the deviation e or the deviation change rate e c is a large positive value;

[0151] For the output quantities ΔK p 、ΔK i 、ΔK d , the meanings of the letters are as follows:

[0152] PB: Positive Big means increasing the proportional, integral or derivative gain of the PID controller; PM: Positive Medium means moderately increasing the corresponding gain of the PID controller;

[0153] PS: Positive Small means slightly increasing the corresponding gain of the PID controller;

[0154] ZO: Zero means keeping the corresponding gain of the PID controller unchanged;

[0155] NS: Negative Small means slightly decreasing the corresponding gain of the PID controller;

[0156] NM: Negative Medium means moderately decreasing the corresponding gain of the PID controller;

[0157] NB: Negative Big means significantly decreasing the corresponding gain of the PID controller;

[0158] 2-3. Using the Mamdani inference method, perform inference based on the fuzzy rule base to obtain the fuzzy output. The specific steps of the Mamdani inference method are as follows:

[0159] 2-3-1. Convert the input actual values into fuzzy sets. The fuzzy sets of e and e c are {NB, NM, NS, ZO, PS, PM, PB} respectively, and each set has a corresponding membership function;

[0160] 2-3-2. For each output variable, perform inference based on the fuzzy rule base and calculate the firing strength of each rule, which is usually the minimum of the antecedent membership degrees;

[0161] 2-3-3. For each output variable, multiply the firing strength of all rules by their output fuzzy sets and then sum them to obtain the weighted fuzzy set, which is expressed by the formula:

[0162]

[0163] where Ri is the firing strength of the i-th rule, and μi(ΔK) is the membership degree of ΔK under the i-th rule;

[0164] 2-3-4. Convert the fuzzy output set into a specific numerical output. A commonly used method is the centroid method, and the formula is as follows:

[0165]

[0166] where, ΔK p represents the adjustment amount of the proportional gain K p ;

[0167] ΔK p,j represents the specific value of the proportional gain adjustment amount ΔK p in the j-th fuzzy set;

[0168] μ j (ΔK p ) represents the membership degree of the proportional gain adjustment amount ΔK p in the j-th fuzzy set;

[0169] j represents the index of the fuzzy set, that is, different fuzzy intervals;

[0170] 2-4. Adjust the PID parameters according to the defuzzified output:

[0171] K P = K P0 + α·ΔK P ;

[0172] K i = K i0 + β·ΔK i ;

[0173] K d = K d0 + γ·ΔK d ;

[0174] where, K Pis the Proportional Gain, the proportional term in the PID controller, which is used to adjust the response strength of the controller to the current error;

[0175] K P0 is the initial proportional gain, that is, the initial value of the proportional gain before applying fuzzy PID adjustment;

[0176] ΔK P is the adjustment amount of the proportional gain, which is calculated by the fuzzy logic controller according to the current system state and is used to fine-tune the proportional gain to achieve better control effect;

[0177] α is the adaptive adjustment factor of the proportional gain adjustment amount, which is used to determine the influence degree of the fuzzy controller output on the proportional gain adjustment amount;

[0178] K i is the Integral Gain, the integral term in the PID controller, which is used to adjust the response strength of the controller to the accumulation of past errors;

[0179] K i0 is the initial integral gain, that is, the initial value of the integral gain before applying fuzzy PID adjustment;

[0180] ΔK i is the adjustment amount of the integral gain, which is calculated by the fuzzy logic controller and is used to fine-tune the integral gain to improve the steady-state error of the system;

[0181] β is the adaptive adjustment factor of the integral gain adjustment amount, which is used to determine the influence degree of the fuzzy controller output on the integral gain adjustment amount;

[0182] K d is the Derivative Gain, the derivative term in the PID controller, which is used to adjust the response strength of the controller to the rate of change of the error;

[0183] K d0 is the initial derivative gain, that is, the initial value of the derivative gain before applying fuzzy PID adjustment;

[0184] ΔK d is the adjustment amount of the derivative gain, which is calculated by the fuzzy logic controller and is used to fine-tune the derivative gain to improve the dynamic response speed of the system;

[0185] γ is the adaptive adjustment factor of the derivative gain adjustment amount, which is used to determine the influence degree of the fuzzy controller output on the derivative gain adjustment amount;

[0186] 2-5. Calculate the PWM duty cycle according to the output of the PID controller:

[0187]

[0188] Wherein:

[0189] The PWM Duty Cycle is the duty cycle of the Pulse Width Modulation (PWM) signal, which represents the proportion of time the signal is in the high-level state within one cycle and determines the speed and direction of the motor;

[0190] The Max Output is the maximum output value of the PWM signal, usually the maximum duty cycle that the motor driver can accept, depending on the resolution of the PWM signal and the design of the motor driver;

[0191] K p is the proportional gain, the proportional term of the PID controller, which determines the response intensity of the controller to the current error;

[0192] e is the error, that is, the difference between the target value and the actual output value;

[0193] K i is the integral gain, the integral term of the PID controller, which is proportional to the integral of the error and is used to eliminate the steady-state error;

[0194] ∫edt is the integral of the error, which represents the accumulation of the error over time;

[0195] K d is the derivative gain, the derivative term of the PID controller, which is proportional to the rate of change of the error and is used to improve the dynamic response of the system;

[0196] is the rate of change of the error, that is, the derivative of the error with respect to time, which represents the instantaneous change speed of the system output value.

[0197] Furthermore, the processes of training, loss of the detection algorithm, and evaluation of the fitting degree of the improved YOLOv8n gesture recognition model in step 2 are as follows:

[0198] Training process: The parameters of the YOLOv8n gesture recognition model are usually initialized using random initialization or pre-trained weights. Random initialization helps to break symmetry, and pre-trained weights accelerate convergence. The formula is:

[0199] W = G(0, σ 2 );

[0200] where W represents the weights, G represents the normal distribution, and σ is the standard deviation;

[0201] Select the AdamW optimizer. The formula of the AdamW optimizer is:

[0202]

[0203] where Wt is the weight at the current moment, η is the learning rate, is the first moment estimate, is the second moment estimate, λ is the coefficient of the weight decay method, ∈ is a small constant used to prevent division by zero;

[0204] The loss process of the detection algorithm is as follows:

[0205] Select L1 Loss as the loss function, and the formula is as follows:

[0206]

[0207] where y i is the true label, is the predicted value, and n is the number of samples;

[0208] The input data is used to calculate the prediction result through the model, and the forward propagation formula is:

[0209]

[0210] where x is the input data, W is the weight, b is the bias, and f is the activation function;

[0211] Calculate the loss using the loss function L1 based on the prediction result and the true label. The loss calculation formula is:

[0212]

[0213] Calculate the gradient of the loss with respect to the model parameters and update the model parameters. The gradient calculation and parameter update formula are:

[0214]

[0215] where, is the gradient of the loss with respect to the weight, and η is the learning rate;

[0216] The process of evaluating the fitting degree: Combine the loss convergence method and the evaluation index method to determine whether to stop training. The loss convergence method means that during the training process, as the number of iterations increases, both the training loss Loss_train and the validation loss Loss_val gradually decrease and tend to a stable value; when the loss value no longer decreases significantly, it is considered that the model has learned the patterns in the data, and further training is unlikely to bring a significant improvement in performance; if the change in the loss value for 20 consecutive epochs is less than 0.01, it is considered that the loss has stabilized;

[0217] The evaluation index method is calculated through the following formula:

[0218]

[0219] Among them, TP represents the number of correctly recognized positive samples; TN represents the number of correctly recognized negative samples; FP represents the number of negative samples misrecognized as positive samples; FN represents the number of positive samples misrecognized as negative samples.

[0220] Furthermore, the optimization method of the improved YOLOv8n gesture recognition model in step 2 is model pruning, model quantization, and mixed-precision training.

[0221] Model pruning reduces the computational and storage requirements of the model by deleting unimportant weights and connections in the network. The specific steps include pre-training pruning and in-training pruning.

[0222] Among them, pre-training pruning is to perform standard training on the initial model to obtain a baseline model, then sort the weights according to the importance of the weights, set the pruning threshold, delete the connections with weight values lower than the threshold, and finally fine-tune the pruned model to restore the accuracy.

[0223] In-training pruning is to regularly calculate the L1 norm of the weights of each layer during the training process. According to the set pruning ratio, prune the weights with lower L1 norms in each layer, continue training, and repeat the above process until the expected pruning ratio is reached. For the weight matrix D of each layer, the formula for its L1 norm is:

[0224] ∥D∥1=∑ k,l |D k,l |;

[0225] Among them, D represents the weight matrix, and each element D k,l represents the weight from the input layer k to the output layer l;

[0226] D l represents the L1 norm of the weight matrix D, that is, the sum of the absolute values of all elements;

[0227] The pruning threshold is set to θ, and the weights that meet the conditions are deleted:

[0228] ∣D i,j ∣<θ;

[0229] θ represents the pruning threshold, which is a preset threshold used to determine the minimum importance of the weights retained during the pruning process;

[0230] i, j represent the element indices in the weight matrix, where i is the row index and j is the column index;

[0231] Model quantization further reduces the computational and storage requirements by converting the model weights and activation values from high-precision FP32 to low-precision INT8, including post-training quantization and quantization-aware training;

[0232] Among them, for post-training quantization, after training is completed, the model weights and activation values are converted from FP32 to INT8, and the model is run using a calibration dataset to statistically obtain the distribution range of the activation values, and quantization is performed according to the activation value distribution range and mapped to the INT8 range;

[0233] Quantization-aware training simulates quantization operations during the training process. By adding quantization and dequantization steps, the model gradually adapts to low-precision calculations and continues to train to optimize the performance of the quantized model. The floating-point weight W before quantization f and the integer weight W after quantization q have the following relationship:

[0234] W q = round(W f × Q);

[0235] Among them, the scaling factor Q is determined by the maximum value and the minimum value:

[0236]

[0237] n is the number of quantization bits:

[0238] Mixed-precision training improves training efficiency and reduces video memory occupancy by combining low-precision and high-precision calculations during the training process. Specifically, it includes setting up a mixed-precision training environment, defining a mixed-precision training strategy, and performing training; during the training process, forward propagation uses FP16 for calculation, and when calculating gradients in backpropagation, FP16 is used and accumulated to FP32 to prevent loss of precision. Finally, FP32 is used for weight update. For loss scaling, a loss scaling factor is defined

[0239]

[0240] When calculating gradients, the scaled loss is used:

[0241]

[0242] When updating weights, the gradients are reverse-scaled:

[0243]

[0244] Among them, W m represents the model weights; Gradient scaled represents the scaled gradient value; r represents the learning rate.

[0245] The present invention realizes high-precision gesture recognition through an improved YOLOv8n algorithm, combines RK3588 NPU acceleration with millimeter-wave radar physiological monitoring, and constructs a multimodal human-computer interaction solution; the present invention supports non-contact bed control, real-time health data collection and cloud collaborative management, significantly improving nursing safety and user experience. By introducing a fuzzy PID control algorithm, through the fusion of fuzzy logic and classical PID control, an adaptive adjustment mechanism is formed to achieve precise control of the mechanical actions of the nursing bed; the fuzzy PID controller dynamically adjusts the PID parameters according to the angle e between the hydraulic rod and the bed and the deviation change rate e c to ensure the smooth and accurate mechanical actions of the nursing bed. The present invention is particularly suitable for multi-sensor data fusion scenarios, responds to the body movement needs of patients in real time, optimizes the bed surface, reduces the probability of pressure ulcers, and greatly improves the comfort of bedridden patients. BRIEF DESCRIPTION OF THE DRAWINGS

[0246] Figure 1 is a schematic diagram of the system structure of the present invention;

[0247] Figure 2 is a schematic diagram of the structure of the nursing bed according to an embodiment of the present invention;

[0248] Figure 3 is a schematic diagram of eight gestures recognized by the YOLOv8n gesture recognition model according to an embodiment of the present invention;

[0249] Figure 4 is a schematic diagram of the working process of the YOLOv8n gesture recognition model according to an embodiment of the present invention;

[0250] Figure 5 is a schematic diagram of the fuzzy PID control algorithm of the YOLOv8n gesture recognition model according to an embodiment of the present invention;

[0251] Figure 6 is a schematic diagram of the interface of the cloud monitoring platform according to an embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0252] The present invention will be further described below with reference to the accompanying drawings.

[0253] As Figure 1 shown, an intelligent nursing bed system combining vital sign monitoring and gesture recognition control includes a nursing bed body, a multimodal data acquisition module, an edge computing and control module, a communication module, a ThingsCloud cloud, and an execution and feedback module;

[0254] The multimodal data acquisition module includes an angle sensor, a visual sensor, and an R24BBD1 millimeter-wave radar; the angle sensor is used to collect hydraulic rod inclination data, the visual sensor is deployed at the head of the bed to collect gesture images, and the R24BBD1 millimeter-wave radar is used to obtain physiological indicators such as heart rate and respiratory rate in a non-contact manner;

[0255] The edge computing and control module includes an RK3588 edge computing terminal and a GD32F103C8T6 controller. The RK3588 edge computing terminal deploys an improved YOLOv8n gesture recognition model, integrating the ECA channel attention mechanism, PANet multi-scale feature fusion, and ASFF adaptive spatial feature fusion algorithm. The GD32F103C8T6 controller uses a fuzzy PID control algorithm to dynamically adjust the drive parameters of the electric hydraulic rod.

[0256] The communication module includes a Bluetooth module and an ESP32 microcontroller; the Bluetooth module is used to support mobile app command transmission, and the ESP32 microcontroller is used to upload physiological data to the ThingsCloud cloud;

[0257] The ThingsCloud is used to analyze physiological data in real time and trigger mobile alarms when anomalies occur;

[0258] The execution and feedback module includes an electric hydraulic rod, a voice module and a mobile app; the electric hydraulic rod is used to perform back lifting and side rollover actions and supports limit protection; the voice module is used to provide voice feedback on the operating status; and the mobile app is used to synchronize cloud data in real time, receive abnormal alarms and perform remote control.

[0259] The visual sensor in this embodiment is a camera installed at the head of the nursing bed, which is aimed at the patient's hand area, continuously collects real-time images, and transmits them back to the edge computing terminal through a self-organizing network; RK3588 deploys an improved gesture recognition model to quickly and accurately recognize gesture commands; GD32F103C8T6 uses a fuzzy PID control algorithm to ensure the smooth and accurate mechanical movements of the nursing bed; the voice module gives users voice feedback when the command is completed, improving the interactivity of the system; the angle at which the hydraulic rod is lifted is transmitted to the control terminal of GD32F103C8T6 in real time; the Bluetooth module allows the mobile app to send commands to the nursing bed via Bluetooth; the electric hydraulic rod is used to control the lifting of the movable part of the nursing bed body, realizing actions including raising the legs, lowering the legs, raising the back, and lying flat; the R24BBD1 millimeter wave radar is installed above the head of the bed to collect the patient's vital sign information in real time, including respiratory rate, heart rate, etc.; ESP32 receives the sign information from the millimeter wave radar and uploads it to the cloud in real time; the ThingsCloud cloud performs real-time analysis and monitoring on the sign data, and abnormal data triggers an alarm on the mobile terminal (threshold: heart rate > 120 or < 50, respiration > 30 or < 8 times / minute); the mobile terminal synchronizes the cloud data in real time and alarms in time, enabling effective assistance and care for the patient.

[0260] As Figure 2 shown is a schematic diagram of the bed body structure of the nursing bed, including a movable guardrail, a backrest, a side-turning part, a bedpan placement area, a thigh part, and a calf part;

[0261] The system of the present invention can recognize eight different gestures as Figure 3 shown, and the recognition is carried out by annotating the category ID, gesture type, and confidence of the gesture. The improved YOLOv8n model is compared with other models, and the improved YOLOv8n model performs excellently in various indicators such as Precision, Recall, F1-Score, and Accuracy. For example, the Precision of the improved YOLOv8n model reaches 94.96%, the Recall reaches 98.53%, the F1-Score is 96.5%, and the overall Accuracy reaches 97.61%. These results are shown in Table 1. It can be seen that the improved YOLOv8n model of the present invention has high accuracy and robustness in the gesture recognition task and can effectively meet the requirements of the intelligent nursing bed system;

[0262] Table 1 Performance of gesture recognition based on the improved Yolov8n

[0263] Models Precision(%) Recall(%) F-1Score(%) Accuracy(%) VGG16 92.75 88.92 90.14 85.68 SGD 71.56 97.54 83.66 77.57 Yolov5s 91.28 96.08 93.53 95.46 Yolov7-tiny 92.32 95.57 93.71 96.05 Improved Yolov8n 94.96 98.53 96.5 97.61

[0264] Each gesture corresponds to a specific control instruction for the nursing bed. These gestures include: raising the back, flattening the back, raising the legs, lowering the legs, turning left, turning right, pausing, and power-off restart. Among them, the verification test process includes: starting the gesture recognition system based on the RK3588 embedded platform, ensuring that the camera module and other sensors are working properly, calibrating the gesture recognition system to ensure accurate gesture recognition in the current environment; capturing the user's gesture images through the camera module and performing real-time recognition. Mapping the recognized gestures to the corresponding nursing bed control instructions and executing the corresponding actions; recording the action changes of the nursing bed after receiving the control instructions and verifying their consistency with the expected actions. Through repeated tests, ensure the stability and reliability of the system under different conditions.

[0265] Through testing, it is verified that the system can accurately recognize and execute the nursing bed actions controlled by the following eight gestures:

[0266] Raising the back: The gesture is four fingers (four), and the operation result is that the back of the nursing bed slowly rises to the angle required by the user;

[0267] Flattening the back: The gesture is the thumb down (dislike), and the back of the nursing bed slowly flattens until it is completely horizontal or the angle required by the user;

[0268] Raising the legs: The gesture is a fist (fist), and the legs of the nursing bed slowly rise until they reach the angle required by the user or the maximum rising angle;

[0269] Lowering the legs: The gesture is the thumb (thumb up, like), and the legs of the nursing bed slowly lower until they reach the angle required by the user or the maximum lowering angle (the angle can be a negative angle);

[0270] Turning left: The gesture is an open palm (palm), and the nursing bed slowly turns to the left to reach the angle required by the user;

[0271] Turning right: The gesture is rock, and the nursing bed slowly turns to the right to reach the angle required by the user;

[0272] Pausing: The gesture is fingers together (stop), and the nursing bed immediately stops the current action and maintains the current position;

[0273] Power-off restart: The gesture is two fingers together (two_up), and the system performs a power-off restart operation, returning to the initial state, the Bluetooth connection is disconnected, and the mobile device needs to reconnect.

[0274] All of the above actions are set with limits to prevent excessive angles. At the same time, the pause gesture can be used at any time during the process to reach the angle that satisfies the user. Through multiple tests, the system can maintain a high recognition accuracy and action execution integrity. The system can quickly respond to the user's gesture commands and accurately complete the corresponding nursing bed actions. In addition, the pause and power-off restart functions further enhance the safety and reliability of the system, ensuring that users can quickly control the nursing bed in case of an emergency.

[0275] To test the completion degree of the physiological monitoring function, physiological information during normal lying in bed is obtained not only through millimeter-wave radar, but also by simulating and monitoring abnormal situations that may occur to the user, such as abnormal heart rate (too fast and too slow heart rate) and abnormal breathing frequency (rapid breathing and apnea). As Figure 6 shown in the cloud monitoring platform interface; through actual simulated apnea, both the mobile end and the cloud can receive warning messages. The R24BBD1 millimeter-wave radar reports the collected physiological sign data to the cloud through ESP32, and the nursing staff can provide assistance after understanding the situation.

[0276] As Figure 4 and Figure 5 shown, the implementation of the fuzzy PID controller in the intelligent nursing bed system is as follows:

[0277] Define the fuzzy sets of the input variables e and e c {Negative Big (NB), Negative Medium (NM), Negative Small (NS), Zero (ZO), Positive Small (PS), Positive Medium (PM), Positive Big (PB)}; define the fuzzy sets of the output variables ΔK p 、ΔK i 、ΔK d ; use the normal distribution function to convert the input exact values into fuzzy values;

[0278] Establish the following fuzzy rule base:

[0279] The rule description of K p For the controller parameter K

[0280] , according to the fuzzy values of the input quantities e and e p ,its output rule can be expressed as: when e c =NB: c When e

[0281] ∈{NB,NM,NS}, then K p =PB;

[0282] When e = ZO, then K p =PM;

[0283] When e∈{PS,PM,PB}, then K p= PS;

[0284] When e c = NM:

[0285] If e ∈ {NB, NM}, then K p = PB;

[0286] If e = NS, then K p = PM;

[0287] If e ∈ {ZO, PS}, then K p = PS;

[0288] If e ∈ {PM, PB}, then K p = NS;

[0289] When e c = NS:

[0290] If e ∈ {NB, NM, NS}, then K p = PM;

[0291] If e = ZO, then K p = PS,

[0292] If e ∈ {PS, PM}, then K p = NS;

[0293] If e = PB, then K p = NM;

[0294] When e c = ZO:

[0295] If e ∈ {NB, NM, NS}, then K p = PM;

[0296] If e = ZO, then K p = PS;

[0297] If e ∈ {PS, PM}, then K p = NS,;

[0298] If e = PB, then K p = NM;

[0299] When e c = PS:

[0300] If e ∈ {NB, NM, NS}, then K p = PS;

[0301] If e = ZO, then K p = ZO;

[0302] If e ∈ {PS, PM}, then K p = NS;

[0303] If e = PB, then K p = NM;

[0304] When e c = PM:

[0305] If e ∈ {NB, NM}, then K p = PS;

[0306] If e ∈ {NS, ZO}, then K p = ZO;

[0307] If e ∈ {PS, PM}, then K p = NS;

[0308] If e = PB, then K p = NM;

[0309] When e c = PB:

[0310] If e ∈ {NB, NM}, then K p = ZO;

[0311] If e ∈ {NS, ZO, PS, PM}, then K p = NM;

[0312] If e = PB, then K p = NB;

[0313] For the controller parameter K i , according to the fuzzy values of the input quantity e and e c , its output rule is expressed as: When e c = NB:

[0314] If e ∈ {NB, NM, NS}, then K i = NB;

[0315] If e = ZO, then K i = NM;

[0316] If e ∈ {PS, PM, PB}, then K i = NM;

[0317] When e c = NM: If e ∈ {NB, NM}, then K i = NB;

[0318] If e ∈ {NS, ZO}, then K i = NM;

[0319] If e ∈ {PS, PM}, then K i = NS;

[0320] If e = PB, then K i = PS;

[0321] When e c = NS: If e ∈ {NB, NM}, then Ki = NB;

[0322] If e = NS, then Ki = NM;

[0323] If e = ZO, then Ki = NS;

[0324] If e ∈ {PS, PM, PB}, then Ki = PS; When e c = ZO: If e ∈ {NB, NM, NS}, then Ki = NM; If e = ZO, then K i = ZO;

[0325] If e ∈ {PS, PM}, then K i = PS;

[0326] If e = PB, then K i = PM;

[0327] When e c = PS:

[0328] If e ∈ {NB, NM}, then K i = NM,;

[0329] If e = NS, then K i = NS;

[0330] If e = ZO, then K i = ZO;

[0331] If e ∈ {PS, PM, PB}, then K i = PM;

[0332] When e c = PM:

[0333] If e ∈ {NB, NM}, then K i = ZO;

[0334] If e ∈ {NS, ZO, PS}, then K i = PS;

[0335] If e ∈ {PM, PB}, then K i = PM;

[0336] When e c = PB:

[0337] If e ∈ {NB, NM}, then K i = ZO;

[0338] If e ∈ {NS, ZO, PS, PM}, then Ki = PS;

[0339] If e = PB, then K i = PB;

[0340] For the controller parameter K d , according to the fuzzy values of the input quantities e and e c , its output rule is expressed as: When e c = NB:

[0341] If e ∈ {NB, NM}, then K d = PS;

[0342] If e ∈ {NS, ZO}, then K d = NS;

[0343] If e ∈ {PS, PM, PB}, then K d = NM;

[0344] When e c = NM:

[0345] If e ∈ {NB, NM}, then K d = PS;

[0346] If e ∈ {NS, ZO}, then K d = NS;

[0347] If e ∈ {PS, PM}, then K d = NM;

[0348] If e = PB, then K d = ZO;

[0349] When e c = NS:

[0350] If e ∈ {NB, NM, NS}, then K d = ZO;

[0351] If e ∈ {ZO, PS}, then K d = NS;

[0352] If e ∈ {PM, PB}, then K d = ZO;

[0353] When e c = ZO:

[0354] If e ∈ {NB, NM, NS, ZO, PS, PM, PB}, then K d = ZO;

[0355] When e c = PS:

[0356] If \(e\in\{NB, NM, NS, ZO\}\), then \(K\) d \(= ZO\);

[0357] If \(e\in\{PS, PM\}\), then \(K\) d \(= PS\);

[0358] If \(e = PB\), then \(K\) d \(= PB\);

[0359] When \(e\) c \(= PM\):

[0360] If \(e\in\{NB, NM\}\), then \(K\) d \(= PB\);

[0361] If \(e\in\{NS, ZO, PS\}\), then \(K\) d \(= PS\);

[0362] If \(e\in\{PM, PB\}\), then \(K\) d \(= PS\);

[0363] When \(e\) c \(= PB\):

[0364] If \(e\in\{NB, NM, NS, ZO, PS, PM, PB\}\), then \(K\) d \(= PB\);

[0365] Among them,

[0366] NB: Negative Big (negative large), indicating that the deviation \(e\) or the deviation change rate \(\dot{e}\) c is a relatively large negative value. NM: Negative Medium (negative medium), indicating that the deviation \(e\) or the deviation change rate \(\dot{e}\) c is a medium negative value.

[0367] NS: Negative Small (negative small), indicating that the deviation \(e\) or the deviation change rate \(\dot{e}\) c is a relatively small negative value.

[0368] ZO: Zero, indicating that the deviation \(e\) or the deviation change rate \(\dot{e}\) c is close to zero.

[0369] PS: Positive Small (positive small), indicating that the deviation \(e\) or the deviation change rate \(\dot{e}\) c is a relatively small positive value.

[0370] PM: Positive Medium (positive medium), indicating that the deviation \(e\) or the deviation change rate \(\dot{e}\) c is a medium positive value.

[0371] PB: Positive Big (positive large), indicating that the deviation \(e\) or the deviation change rate \(\dot{e}\)c Is a relatively large positive value.

[0372] For the output quantities ΔK p 、ΔK i 、ΔK d , the meanings of the letters are as follows:

[0373] PB: Positive Big (increase), indicating an increase in the proportional, integral, or derivative gain of the PID controller.

[0374] PM: Positive Medium (medium increase), indicating a moderate increase in the corresponding gain of the PID controller.

[0375] PS: Positive Small (small increase), indicating a small increase in the corresponding gain of the PID controller.

[0376] ZO: Zero (unchanged), indicating keeping the corresponding gain of the PID controller unchanged.

[0377] NS: Negative Small (small decrease), indicating a small decrease in the corresponding gain of the PID controller.

[0378] NM: Negative Medium (medium decrease), indicating a moderate decrease in the corresponding gain of the PID controller.

[0379] NB: Negative Big (big decrease), indicating a large decrease in the corresponding gain of the PID controller.

[0380] Using the Mamdani inference method, reasoning is carried out according to the fuzzy rule base to obtain the fuzzy output:

[0381] Convert the input actual values (such as the angle deviation e and the deviation change rate e c ) into fuzzy sets. The fuzzy sets of e and e c are respectively {NB, NM, NS, ZO, PS, PM, PB}, and each set has a corresponding membership function.

[0382] For example, assume that the current angle deviation e = -5 and the deviation change rate e c = 2. Calculate their fuzzy values through the membership function:

[0383] The membership degree of e is: NB = 0.8, NM = 0.2, and the rest are 0.

[0384] e c The membership degree of is: PS = 0.7, ZO = 0.3, and the rest are 0.

[0385] According to the fuzzy rule table, calculate the firing strength of each rule,

[0102] that is, the minimum value of the membership degree of the antecedent of the rule.

[0386] For example, for ΔK p :

[0387] Rule 1: IF e = NB AND e c = NB THEN ΔK p = PB firing strength = min(membership(e = NB), membership(e c = NB)) = min(0.8, 0) = 0 Rule 2: IF e = NB AND e c = NM THEN ΔK p = PB firing strength = min(membership(e = NB), membership(e c = NM)) = min(0.8, 0) = 0 Rule 3: IF e = NB AND e c = NS THEN ΔK p = PM firing strength = min(membership(e = NB), membership(e c = NS)) = min(0.8, 0) = 0 Rule 4: IF e = NB AND e c = ZO THEN ΔK p = PM firing strength = min(membership(e = NB), membership(e c = ZO)) = min(0.8, 0.3) = 0.3 Rule 5: IF e = NB AND e c = PS THEN ΔK p = PS firing strength = min(membership(e = NB), membership(e c = PS)) = min(0.8, 0.7) = 0.7 Rule 6: IF e = NB AND e c = PM THEN ΔK p = ZO firing strength = min(membership(e = NB), membership(e c = PM)) = min(0.8, 0) = 0 Rule 7: IF e = NB AND e c = PB THEN ΔKp = ZOfiring strength = min(membership(e = NB), membership(e c = PB)) = min(0.8, 0) = 0 Similarly, calculate the applicability degrees of other rules.

[0388] S Synthesize the final fuzzy output set according to the applicability degree of each rule and the fuzzy set of the consequent. For example, for ΔK p :

[0389] Output of Rule 4: ΔK p = PM, applicability degree = 0.3

[0390] Output of Rule 5: ΔK p = PS, applicability degree = 0.7

[0391] The synthesized fuzzy output set is:

[0392] μPM(ΔK p ) = 0.3;

[0393] μPS(ΔK p ) = 0.7;

[0394] Convert the fuzzy output set into a specific numerical output. A common method is the Centroid method:

[0395]

[0396] Assume the specific values and membership degrees in the fuzzy output set are as follows:

[0397] ΔK p = -10, membership degree = 0.3

[0398] ΔK p = 0, membership degree = 0.7

[0399] Then the defuzzified output is:

[0400]

[0401] Adjust the PID parameters according to the defuzzified output:

[0402] K P = K P0 + α·ΔK P ;

[0403] K i = K i0 + β·ΔK i ;

[0404] Kd = K d0 + γ·ΔK d ;

[0405] Assume the initial PID parameters are:

[0406] K P0 = 1.0, K i0 = 0.1, K d0 = 0.01;

[0407] Assume the adjustment amount after defuzzification is:

[0408] ΔK p = 1.5, ΔK i = -0.5, ΔK d = 0.2;

[0409] Assume the adaptive adjustment factor is:

[0410] α = 0.5, β = 0.5, γ = 0.5;

[0411] Then the adjusted PID parameters are:

[0412] K P = 1.0 + 0.5×1.5 = 1.75;

[0413] K i = 0.1 + 0.5×(-0.5) = 0.05

[0414] K d = 0.01 + 0.5×0.2 = 0.02

[0415] Calculate the PWM duty cycle according to the output of the PID controller: I

[0416]

[0417] Assume the current error e = -5, the integral error ∫edt = -10, the differential error dtde = 2, and the maximum output is 100: PWM Duty Cycle = 1001.75×(-5) + 0.05×(-10) + 0.02×2 = -0.0921;

[0418] Since the PWM duty cycle cannot be negative, it can be limited between 0 and 1:

[0419] PWM Duty Cycle = 0.

Claims

1. An intelligent nursing bed system integrating vital sign monitoring and gesture recognition control, comprising a nursing bed body, characterized in that, It also includes a multi-modal data acquisition module, an edge computing and control module, a communication module, a ThingsCloud cloud, and an execution and feedback module; The multi-modal data acquisition module includes an angle sensor, a vision sensor, and an R24BBD1 millimeter-wave radar; the angle sensor is used to collect the inclination data of the hydraulic rod, the vision sensor is deployed at the head of the bed to collect gesture images, and the R24BBD1 millimeter-wave radar is used to non-contact obtain physiological indicators such as heart rate and breathing frequency; The edge computing and control module includes an RK3588 edge computing terminal and a GD32F103C8T6 controller; an improved YOLOv8n gesture recognition model is deployed on the RK3588 edge computing terminal, integrating an ECA channel attention mechanism, a PANet multi-scale feature fusion, and an ASFF adaptive spatial feature fusion algorithm; the GD32F103C8T6 controller uses a fuzzy PID control algorithm to dynamically adjust the driving parameters of the electric hydraulic rod; The communication module includes a Bluetooth module and an ESP32 microcontroller; the Bluetooth module is used to support the transmission of mobile app instructions, and the ESP32 microcontroller is used to upload physiological data to the ThingsCloud cloud; The ThingsCloud cloud is used to analyze physiological data in real time and trigger a mobile warning when abnormal; The execution and feedback module includes an electric hydraulic rod, a voice module, and a mobile app; the electric hydraulic rod is used to perform actions such as raising the back and turning over, supporting limit protection, the voice module is used to provide voice feedback on the operation status, and the mobile app is used to synchronize cloud data in real time, receive abnormal warnings, and perform remote control.

2. The intelligent nursing bed system integrating vital sign monitoring and gesture recognition control according to claim 1, characterized in that, The inference speed of the RK3588 edge computing terminal is ≥25FPS; the control period of the GD32F103C8T6 controller is ≤200ms.

3. An intelligent nursing bed control method combining vital sign monitoring and gesture recognition control, characterized in that, It includes the following steps: Step 1: The vision sensor collects the gestures of the patient on the nursing bed and transmits them to the RK3588 edge computing terminal via USB; the R24BBD1 millimeter-wave radar collects physiological data and uploads it to the cloud via the ESP32 microcontroller; Step 2: The RK3588 edge computing terminal performs gesture recognition, maps corresponding instructions through an improved YOLOv8n gesture recognition model, dynamically adjusts the PID parameters through fuzzy PID control, and outputs a PWM signal to drive the hydraulic rod to act; Step 3: The ThingsCloud cloud analyzes the received physiological data, pushes a warning to the mobile app when abnormal, the user sends an instruction to the Bluetooth module through the mobile end, the Bluetooth module receives the instruction and transmits it to the GD32F103C8T6 control end, and the GD32F103C8T6 controls the hydraulic rod to execute the instruction; Step 4: The electric hydraulic rod adjusts the bed body posture according to the PWM duty cycle, and the angle sensor feeds back the position in real time; the voice module broadcasts the prompt.

4. The intelligent nursing bed control method combining vital sign monitoring and gesture recognition control according to claim 3, wherein The improved YOLOv8n gesture recognition model in step 2 specifically includes an ECA network, a PANet multi-scale feature fusion algorithm, and an ASFF adaptive spatial feature fusion algorithm; 2-1. The ECA network directly learns the features of global average pooling (GAP) through one-dimensional convolution. In the structure of the ECA attention mechanism, C represents the number of channels, GAP represents global average pooling, and k = ψ(C) represents the calculation of the adaptive one-dimensional convolution kernel size. The adaptive function is as follows: where k represents the convolution kernel size, γ and b are used to adjust the ratio between the number of channels C and the convolution kernel size k; |*|odd represents the nearest odd number of *. 2-2. The specific process of the PANet multi-scale feature fusion algorithm is as follows: 2-2-1. Perform Backbone processing and ECA enhancement: Backbone processing: The input image size is length × width × (the three dimensions of red, green, and blue); through the convolutional layer CBL and the pooling layer, the spatial dimension is gradually reduced and the number of channels is increased to obtain the feature map X1: length1 × width1 × number of channels1, and the feature map X2: length2 × width2 × number of channels2. ECA enhancement: Apply the ECA module to enhance the feature expression ability, and output the enhanced feature maps X1' and X2', with the image size remaining unchanged. 2-2-2. CBL processing: X1' is processed through the CBL layer to obtain X1": X2' is processed through the CBL layer to obtain X2": 2-2-3. Upsampling and feature map concatenation: Upsampling: X1″ is upsampled through a transposed convolutional layer to obtain X1″′: Feature map concatenation Concat: Join X1″′ and X2′ to obtain P1: 2-2-4. Downsampling and feature map concatenation: Downsampling: X2' is downsampled through the pooling layer to obtain X2'': length1 × width1 × (number of channels2 × 2). Feature map concatenation Concat: Concatenate P'' and X1 to obtain P2: length1 × width1 × (number of channels1 + 2 × number of channels2). 2-2-5. CBL processing and output features: CBL processing: P1 undergoes three CBL processes to obtain P1': P2 undergoes three CBL processes to obtain P2': length1 × width1 × (number of channels1 + 2 × number of channels2). The specific steps are as follows: 2-2-5-1. Slide the convolution kernel on the input feature map, calculate the dot product of the convolution kernel and the input feature map, and generate a new feature map. The formula is as follows: Conv(x) = E * X + b; where E is the convolution kernel, b is the bias term, and * represents the convolution operation. 2-2-5-2. Normalize the output of the convolutional layer to make the data in each batch follow the same distribution and accelerate the convergence speed of the network. The formula is as follows: wherein, and are respectively the mean and variance of the current batch, δ and ε are learnable parameters, and ∈ is a small constant used to prevent the denominator from being zero; 2-2-5-3. Pass through the Leaky ReLU function to alleviate the vanishing gradient. The formula is expressed as: where g is a small constant used to control the gradient of the negative value part. 2-3. The specific process of the ASFF adaptive spatial feature fusion algorithm is as follows: 2-3-1. Pool P' through a pooling kernel with a window size and stride of 2 to obtain P'', and then convolve P'' through a transposed convolution kernel of size 2 × 2 to obtain P''', so that P''' matches the spatial dimension of X1. 2-3-2. Convolve the upsampled feature maps X1 and X2' through a 1×1 convolution block to generate two 13×13×8 spatial weight vectors. Normalize the generated 13×13×2 weight information through the Softmax function to obtain the normalized weight information. The Softmax function is defined as: where xi and xj are the elements of the weight vector, and N is the dimension of the weight vector. 2-3-3. Multiply the normalized weight information with the X1 and X2 feature maps and fuse them to obtain an effective feature layer for large-scale target prediction, specifically as follows: Among them, and ω are weight coefficients obtained through Softmax normalization, which are used to balance the contributions of different feature maps; 2-3-4. Finally, output the feature map P1, where the number of channels is the sum of the number of channels of the two input feature maps.

5. The intelligent nursing bed control method combining vital sign monitoring and gesture recognition control according to claim 3, characterized in that, The specific process of the fuzzy PID control in step 2 is as follows: 2-1. Define the fuzzy sets of the input variables e and e c as {Negative Big (NB), Negative Medium (NM), Negative Small (NS), Zero (ZO), Positive Small (PS), Positive Medium (PM), Positive Big (PB)}; Define the output variables ΔK p , ΔK i , ΔK d fuzzy sets. Use the normal distribution function to convert the input exact values into fuzzy values. The form of the normal distribution function is as follows: where s is the mean and H is the standard deviation; 2-2. Establish the following fuzzy rule base: 2-2-1. For the controller parameter K p , according to the fuzzy values of the input quantities e and e c , its output rule is expressed as: When e c = NB: If e ∈ {NB, NM, NS}, then K p = PB; If e = ZO, then K p = PM; If e ∈ {PS, PM, PB}, then K p = PS; When e c = NM: If e ∈ {NB, NM}, then K p = PB; If e = NS, then K p = PM; If e ∈ {ZO, PS}, then K p = PS; If e ∈ {PM, PB}, then K p = NS; When e c = NS: If e ∈ {NB, NM, NS}, then K p = PM; If e = ZO, then K p = PS, If e ∈ {PS, PM}, then K p = NS; If e = PB, then K p = NM; When e c = ZO: If e ∈ {NB, NM, NS}, then K p = PM; If e = ZO, then K p = PS; If e ∈ {PS, PM}, then K p = NS,; If e = PB, then K p = NM; When e c = PS: If e ∈ {NB, NM, NS}, then K p = PS; If e = ZO, then K p = ZO; If e ∈ {PS, PM}, then K p = NS; If e = PB, then K p = NM; When e c = PM: If e ∈ {NB, NM}, then K p = PS; If e ∈ {NS, ZO}, then K p = ZO; If e ∈ {PS, PM}, then K p = NS; e = PB, then K p = NM; When e c = PB: If e ∈ {NB, NM}, then K p = ZO; If e ∈ {NS, ZO, PS, PM}, then K p = NM; If e = PB, then K p = NB; 2-2-2. For the controller parameter K i , according to the fuzzy values of the input quantities e and e c , its output rule is expressed as: when e c = NB: If e ∈ {NB, NM, NS}, then K i = NB; If e = ZO, then K i = NM; If e ∈ {PS, PM, PB}, then K i = NM; When e c = NM: If e ∈ {NB, NM}, then K i = NB; If e ∈ {NS, ZO}, then K i = NM; If e ∈ {PS, PM}, then K i = NS; e = PB, then K i = PS; When e c = NS: If e ∈ {NB, NM}, then Ki = NB; If e = NS, then Ki = NM; If e = ZO, then Ki = NS; If e ∈ {PS, PM, PB}, then Ki = PS; when e c = ZO: If e ∈ {NB, NM, NS}, then Ki = NM; if e = ZO, then K i = ZO; If e ∈ {PS, PM}, then K i = PS; If e = PB, then K i = PM; When e c = PS: If e ∈ {NB, NM}, then K i = NM,; e = NS, then K i = NS; If e = ZO, then K i = ZO; If e ∈ {PS, PM, PB}, then K i = PM; When e c = PM: If e ∈ {NB, NM}, then K i = ZO; If e ∈ {NS, ZO, PS}, then K i = PS; If e ∈ {PM, PB}, then K i = PM; When e c = PB: If e ∈ {NB, NM}, then K i = ZO; If e ∈ {NS, ZO, PS, PM}, then K i = PS; e = PB, then K i = PB; 2-2-3. For the controller parameter K d , according to the fuzzy values of the input quantities e and e c , its output rule is expressed as: when e c = NB: If e ∈ {NB, NM}, then K d = PS; If e ∈ {NS, ZO}, then K d = NS; If e ∈ {PS, PM, PB}, then K d = NM; When e c = NM: If e ∈ {NB, NM}, then K d = PS; If e ∈ {NS, ZO}, then K d = NS; If e ∈ {PS, PM}, then K d = NM; If e = PB, then K d = ZO; When e c = NS: If e ∈ {NB, NM, NS}, then K d = ZO; If e ∈ {ZO, PS}, then K d = NS; If e ∈ {PM, PB}, then K d = ZO; When e c = ZO: If e ∈ {NB, NM, NS, ZO, PS, PM, PB}, then K d = ZO; When e c = PS: If e ∈ {NB, NM, NS, ZO}, then K d = ZO; If e ∈ {PS, PM}, then K d = PS; e = PB, then K d = PB; When e c = PM: If e ∈ {NB, NM}, then K d = PB; If e ∈ {NS, ZO, PS}, then K d = PS; If e ∈ {PM, PB}, then K d = PS; When e c = PB: If e ∈ {NB, NM, NS, ZO, PS, PM, PB}, then K d = PB; where: NB: Negative Big, indicating that the deviation e or the deviation change rate e is a relatively large negative value; c is a relatively large negative value; NM: Negative Medium, indicating deviation e or deviation change rate ec, is a medium negative value; NS: Negative Small, indicating deviation e or deviation change rate ec, is a small negative value; ZO: Zero, indicating deviation e or deviation change rate ec, is close to zero. c is a medium negative value; NS: Negative Small, indicating deviation e or deviation change rate ec c is a small negative value; ZO: Zero, indicating deviation e or deviation change rate ec c is close to zero; PS: Positive Small, indicating that the deviation e or the deviation change rate e is a small positive value. c is a relatively small positive value; PM: Positive Medium, indicating the deviation e or the rate of change of deviation e c is a moderately positive value; PB: Positive Big, indicating that the deviation e or the deviation change rate e c is a relatively large positive value; For the output quantity ΔK p 、ΔK i 、ΔK d , the meanings of the letters are as follows: PB: Positive Big, indicating an increase in the proportional, integral, or derivative gain of the PID controller; PM: Positive Medium, indicating a moderate increase in the corresponding gain of the PID controller; PS: Positive Small, indicating a small increase in the corresponding gain of the PID controller; ZO: Zero, indicating that the corresponding gain of the PID controller remains unchanged; NS: Negative Small, indicating a small decrease in the corresponding gain of the PID controller; NM: Negative Medium, indicating a moderate decrease in the corresponding gain of the PID controller; NB: Negative Big, indicating a large decrease in the corresponding gain of the PID controller; 2-3. Use the Mamdani inference method to perform inference based on the fuzzy rule base to obtain a fuzzy output. The specific steps of the Mamdani inference method are as follows: 2-3-1. Convert the actual input value into a fuzzy set. The fuzzy sets of e and e c are respectively {NB, NM, NS, ZO, PS, PM, PB}, and each set has a corresponding membership function. Use the normal distribution function as the membership function to convert the input exact value into a fuzzy value. The form of the normal distribution function is as follows: where s is the mean and H is the standard deviation; 2-3-2. For each output variable, perform inference according to the fuzzy rule base and calculate the firing strength of each rule, usually the minimum of the antecedent membership degrees; 2-3-3. For each output variable, multiply the firing strengths of all rules with their output fuzzy sets and then sum them to obtain a weighted fuzzy set, which is expressed by the formula: where Ri is the firing strength of the i-th rule and μi(ΔK) is the membership degree of ΔK under the i-th rule; 2-3-4. Convert the fuzzy output set into a specific numerical output. A commonly used method is the centroid method, and the formula is as follows: Among them, ΔK p represents the adjustment amount of the proportional gain K p ; ΔK p,j Indicates the proportional gain adjustment amount ΔK p The specific value in the j-th fuzzy set; μ j (ΔK p ) represents the proportional gain adjustment amount ΔK p in the membership degree of the j-th fuzzy set; j represents the index of the fuzzy set, that is, different fuzzy intervals; 2-4. Adjust the PID parameters according to the defuzzified output: K P = K P0 + α·ΔK P ; K i = K i0 + β·ΔK i ; K d = K d0 + γ·ΔK d ; Among them, K P is the proportional gain ProportionalGain, the proportional term in the PID controller, which is used to adjust the response strength of the controller to the current error; K P0 is the initial proportional gain, i.e., the initial value of the proportional gain before applying fuzzy PID adjustment; ΔK P It is the adjustment amount of the proportional gain, which is calculated by the fuzzy logic controller according to the current system state and is used to finely tune the proportional gain to achieve a better control effect; α is the adaptive adjustment factor for the proportional gain adjustment amount, which is used to determine the influence degree of the fuzzy controller output on the proportional gain adjustment amount; K i It is the Integral Gain, the integral term in the PID controller, which is used to adjust the response strength of the controller to the accumulation of past errors; K i0 is the initial integral gain, i.e., the initial value of the integral gain before applying fuzzy PID adjustment; ΔK i It is the adjustment amount of the integral gain, calculated by the fuzzy logic controller, and is used to finely adjust the integral gain to improve the steady-state error of the system; β is the adaptive adjustment factor for the integral gain adjustment amount, which is used to determine the influence degree of the fuzzy controller output on the integral gain adjustment amount; K d It is the Derivative Gain, the derivative term in the PID controller, which is used to adjust the response intensity of the controller to the rate of change of the error; K d0 is the initial differential gain, i.e., the initial value of the differential gain before applying fuzzy PID adjustment; ΔK d It is the adjustment amount of the differential gain, which is calculated by the fuzzy logic controller and used to finely adjust the differential gain to improve the dynamic response speed of the system; γ is the adaptive adjustment factor for the derivative gain adjustment amount, which is used to determine the influence degree of the fuzzy controller output on the derivative gain adjustment amount; 2-5. Calculate the PWM duty cycle according to the output of the PID controller: where: PWM Duty Cycle is the duty cycle of the pulse width modulation PWM signal, which represents the time ratio of the signal in the high-level state within one cycle and determines the speed and direction of the motor; Max Output is the maximum output value of the PWM signal, usually the maximum duty cycle that the motor driver can accept, depending on the resolution of the PWM signal and the design of the motor driver; K p is the proportional gain, the proportional term of the PID controller, which determines the response intensity of the controller to the current error; e is the error, that is, the difference between the target value and the actual output value; K i It is the integral gain, the integral term of the PID controller, which is proportional to the integral of the error and is used to eliminate the steady-state error; ∫edt is the integral of the error, representing the accumulation of the error over time; K d is the differential gain. The derivative term of the PID controller is proportional to the rate of change of the error and is used to improve the dynamic response of the system. It is the rate of change of the error, that is, the derivative of the error with respect to time, representing the instantaneous change speed of the system output value.

6. The intelligent nursing bed control method combining vital sign monitoring and gesture recognition control according to claim 1, characterized in that, The processes of training, detecting algorithm loss, and evaluating the fitting degree of the improved YOLOv8n gesture recognition model in step 2 are as follows: Training process: The parameters of the YOLOv8n gesture recognition model are usually initialized using random initialization or pre-trained weights. Random initialization helps to break symmetry, and pre-trained weights accelerate convergence. The formula is: W = G(0,σ 2 ); Among them, W represents the weight, G represents the normal distribution, and σ is the standard deviation; Select the AdamW optimizer. The formula of the AdamW optimizer is: Among them, W t is the weight at the current moment, η is the learning rate, is the first moment estimate, is the second moment estimate, λ is the coefficient of the weight decay method, ∈ is a small constant used to prevent division by zero; The process of the detecting algorithm loss is as follows: Select L1 Loss as the loss function. The formula is as follows: Among them, y i is the true label, is the predicted value, and n is the number of samples; The input data calculates the prediction result through the model. The forward propagation formula is: Among them, x is the input data, W is the weight, b is the bias, and f is the activation function; Calculate the loss using the loss function L1 based on the prediction result and the true label. The loss calculation formula is: Calculate the gradient of the loss with respect to the model parameters and update the model parameters. The gradient calculation and parameter update formula are: where, is the gradient of the loss with respect to the weights, and η is the learning rate; Fitting degree evaluation process: Combine the loss convergence method and the evaluation index method to determine whether to stop training. The loss convergence method means that during the training process, as the number of iterations increases, both the training loss Loss_train and the validation loss Loss_val gradually decrease and tend to a stable value; when the loss value no longer decreases significantly, it is considered that the model has learned the patterns in the data, and further training is unlikely to bring significant performance improvement; if the change in the loss value for 20 consecutive epochs is less than 0.01, it is considered that the loss has stabilized; The evaluation index method is calculated by the following formula: Among them, TP represents the number of correctly recognized positive samples; TN represents the number of correctly recognized negative samples; FP represents the number of negative samples misrecognized as positive samples; FN represents the number of positive samples misrecognized as negative samples.

7. The intelligent nursing bed control method combining vital sign monitoring and gesture recognition control according to claim 1, characterized in that The optimization methods of the improved YOLOv8n gesture recognition model in step 2 are model pruning, model quantization, and mixed-precision training; The specific steps of model pruning include pre-training pruning and in-training pruning; Among them, pre-training pruning is to perform standard training on the initial model to obtain a baseline model, then sort the weights according to the importance of the weights, set the pruning threshold, delete the connections with weight values lower than the threshold, and finally fine-tune the pruned model to restore the accuracy; In-training pruning is to regularly calculate the L1 norm of the weights of each layer during the training process. According to the set pruning ratio, prune the weights with lower L1 norms in each layer and continue training. Repeat the above process until the expected pruning ratio is reached. For the weight matrix D of each layer, its L1 norm calculation formula is: ∥D∥1 = ∑ k,l |D k,l |; Among them, D represents the weight matrix, where each element D k,l represents the weight from the input layer k to the output layer l; D l Denotes the L1 norm of the weight matrix D, that is, the sum of the absolute values of all elements; Set the pruning threshold to θ and delete the weights that meet the conditions: ∣D i,j ∣<θ; θ represents the pruning threshold, which is a preset threshold used to determine the minimum importance of the weights retained during the pruning process; i and j represent the element indices in the weight matrix, where i is the row index and j is the column index; Model quantization is achieved by converting the model weights and activation values from high-precision FP32 to low-precision INT8, including post-training quantization and quantization-aware training; Among them, in post-training quantization, after the training is completed, the model weights and activation values are converted from FP32 to INT8, and the model is run using a calibration dataset to statistically calculate the distribution range of the activation values, and quantization is performed according to the activation value distribution range and mapped to the INT8 range; Quantization-aware training simulates the quantization operation during the training process. By adding quantization and dequantization steps, the model gradually adapts to low-precision calculations and continues to train to optimize the performance of the quantized model. The floating-point weight W before quantization f and the integer weight W after quantization q are related as follows: W q = round(W f × Q); Among them, the scaling factor Q is determined by the maximum value and the minimum value: n is the number of quantization bits: Mixed-precision training improves training efficiency and reduces GPU memory usage by using a combination of low-precision and high-precision calculations during training, including setting up the mixed-precision training environment, defining the mixed-precision training strategy, and executing the training; during training, forward propagation uses FP16 calculations, FP16 is used for gradient calculation during backpropagation and accumulated to FP32 to prevent precision loss, and finally FP32 is used for weight updates. For loss scaling, a loss scaling factor is defined. When calculating the gradient, the scaled loss is used: When updating the weights, the gradient is scaled back: Among them, W m represents the model weights; Gradient scaled represents the scaled gradient value; r represents the learning rate.

Citation Information

Cited By

  • Hydraulic station for numerical control lathe and control method of hydraulic station

    CN120626564A