SCADA-based medicine multi-specification flexible sub-packaging control method and system
By combining the SCADA system with CADE algorithms and Lyapunov functions to optimize the drug dispensing process, the problem of insufficient channel allocation was solved, achieving efficient and accurate drug dispensing control, and improving production efficiency and equipment stability.
Patent Information
- Application Number
- CN202511596002.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-04
- Publication Date
- 2026-02-03
- Estimated Expiration
- 2045-11-04
AI Technical Summary
In existing technologies, the channel allocation during drug packaging lacks dynamism and adaptability, making it difficult to adjust resource allocation according to real-time production needs. This results in low production efficiency and resource utilization. Furthermore, the lack of precise control over the motion and vibration errors of the flexible robotic arm affects packaging accuracy and equipment stability.
The system obtains drug dispensing parameters through SCADA, calculates the initial dispensing cycle and channel allocation weights, optimizes channel allocation using CADE algorithm, calculates vibration and angle errors, updates control torque using Lyapunov function, generates local and global maps, dynamically allocates AGV tasks, and adjusts feeder flow rate to achieve precise control.
It has improved the accuracy, efficiency, and stability of drug packaging, optimized resource allocation and logistics efficiency, and enhanced production flexibility and equipment stability.
Smart Images

Figure CN121069937B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of industrial automation control technology, and in particular to a method and system for flexible multi-specification dispensing control of pharmaceuticals based on SCADA. Background Technology
[0002] With the rapid development of industrial automation technology, the pharmaceutical packaging field has gradually introduced SCADA-based control systems to achieve intelligent and efficient production processes. By integrating sensors, actuators, and human-machine interfaces, these systems enable real-time monitoring and data acquisition of the production line. Especially in the multi-specification pharmaceutical packaging process, the SCADA system communicates with the production line equipment through API interfaces, dynamically adjusting production parameters to adapt to different drug types, specifications, and batch requirements. At the same time, advancements in flexible manufacturing technology allow the production line to quickly switch between different specification pharmaceutical packaging tasks. Combined with intelligent optimization algorithms, this significantly improves production efficiency and resource utilization. The introduction of automated guided vehicles further optimizes logistics scheduling in the production workshop. By generating environmental maps and performing path planning using LiDAR and RGB-D cameras, efficient material transportation is achieved.
[0003] However, existing technologies still have shortcomings. The existing channel allocation lacks dynamism and adaptability, making it difficult to adjust resource allocation according to real-time production needs, resulting in low production efficiency and resource utilization. Furthermore, there is a lack of precise control over the motion and vibration errors of the flexible robotic arm, affecting the packing accuracy and equipment stability. Summary of the Invention
[0004] In view of the aforementioned existing problems, the present invention is proposed.
[0005] Therefore, this invention provides a SCADA-based method and system for flexible dispensing control of pharmaceuticals in multiple specifications, which solves the problems of existing channel allocation lacking dynamism and adaptability, making it difficult to adjust resource allocation according to real-time production needs, resulting in low production efficiency and resource utilization, and lacking precise control over the motion and vibration errors of the flexible robotic arm, affecting dispensing accuracy and equipment stability.
[0006] To solve the above-mentioned technical problems, the present invention provides the following technical solution:
[0007] In a first aspect, the present invention provides a SCADA-based method for flexible multi-specification dispensing control of pharmaceuticals, comprising,
[0008] The human-machine interface of the SCADA system is used to obtain the drug's dispensing parameters, calculate the initial dispensing cycle of the specifications, allocate production channels to the drugs, and calculate the initial channel allocation weight based on the batch score and target dose.
[0009] The initial dispensing parameters are set as the population individuals input into the CADE algorithm. After iterative optimization, the final individuals are obtained. Based on the final individuals, the target feeder flow rate and the initial angle of the flexible robotic arm are calculated. The end state data of the robotic arm are collected, and the vibration error and angle error are calculated.
[0010] By combining the packaging progress and channel weights to allocate AGV tasks, path planning is performed, material transportation is executed based on the optimal path, dosage error is calculated, and feeder flow is adjusted according to the dosage error threshold.
[0011] As a preferred embodiment of the SCADA-based flexible dispensing control method for pharmaceuticals of various specifications described in this invention, the step of calculating the initial channel allocation weight based on batch fraction and target dose includes:
[0012] The human-machine interface of the SCADA system is used to obtain the dispensing parameters of various drug specifications, calculate the initial dispensing cycle, allocate production line channels for each drug type, and calculate the initial channel allocation weight.
[0013] As a preferred embodiment of the SCADA-based flexible multi-specification dispensing control method for pharmaceuticals described in this invention, the step of setting the initial dispensing parameters as inputs to the CADE algorithm for individual populations and obtaining the final individual through iterative optimization includes:
[0014] The initial channel allocation and initial channel allocation weight are set to the population individuals, the CADE algorithm is initialized, and an optimization objective function is constructed to output the final individuals and the final allocation period.
[0015] As a preferred embodiment of the SCADA-based flexible dispensing control method for pharmaceuticals of various specifications described in this invention, the calculation of vibration error and angle error includes:
[0016] Based on the final individual, the target feeder flow rate and the initial angle of the flexible robotic arm are calculated. The state data of the flexible robotic arm are collected using a SCADA system, and the vibration error and angle error are calculated.
[0017] As a preferred embodiment of the SCADA-based flexible dispensing control method for pharmaceuticals of various specifications described in this invention, the calculation of the control torque, which updates the control torque through a Lyapunov function, includes:
[0018] Based on the actual angle, vibration error, and angle error, the control torque is calculated, and a Lyapunov function is constructed for verification to obtain the updated control torque.
[0019] As a preferred embodiment of the SCADA-based flexible multi-specification drug dispensing control method of the present invention, the step of generating a local grid map and merging it into an initial global map, and allocating AGV tasks based on dispensing progress and channel weights, includes:
[0020] The AGV is equipped with an updated control torque for disassembly and a LiDAR and RGB-D camera to collect 2D and 3D point cloud data. These data are then denoised using Voxel Grid filtering to generate an initial global 2D raster map.
[0021] As a preferred embodiment of the SCADA-based flexible multi-specification drug dispensing control method described in this invention, the SCADA system integrates key data through Grafana to generate batch reports and uploads them to the cloud, including:
[0022] The A* algorithm is used to plan the path on the initial global two-dimensional grid map. The AGV picks up the goods along the optimal path and transports them to the smart packaging box.
[0023] The SCADA system integrates the collected or calculated data into batch reports using Grafana and stores them in a cloud database.
[0024] Secondly, this invention provides a SCADA-based flexible dispensing control system for pharmaceuticals of various specifications, including:
[0025] The parameter collection and analysis module is used to acquire drug specification parameters through the SCADA system, calculate the dispensing cycle, and allocate production line channels;
[0026] The channel allocation optimization module is used to optimize channel allocation based on the packaging parameters using the CADE algorithm, and to calculate the optimal individual and allocation cycle;
[0027] The adaptive control module is used to dynamically update the control torque using Lyapunov functions;
[0028] The AGV perception and map building module is used to fuse point cloud data to generate a global raster map and assign AGV tasks.
[0029] The path planning and task allocation module is used to plan AGV paths using the A* algorithm and perform collision detection and optimization.
[0030] The metering control and feedback adjustment module is used to monitor the actual dosage and adjust the feeder flow rate to ensure dispensing accuracy;
[0031] The data integration module is used to integrate data through Grafana to generate batch reports and upload them to the cloud.
[0032] Thirdly, the present invention provides a computer device, including a memory and a processor, wherein the memory stores a computer program, wherein: when the computer program is executed by the processor, it implements any step of the SCADA-based flexible dispensing control method for pharmaceuticals of multiple specifications as described in the first aspect of the present invention.
[0033] Fourthly, the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein: when the computer program is executed by a processor, it implements any step of the SCADA-based flexible dispensing control method for pharmaceuticals of multiple specifications as described in the first aspect of the present invention.
[0034] The beneficial effects of this invention are as follows: This invention calculates the initial channel allocation weight by batch score and target dose, optimizes it by combining CADE algorithm, uses real-time correction of vibration and angle error of flexible robotic arm, updates control torque based on Lyapunov function, generates local grid map by LiDAR and RGB-D camera and merges it into global map, and dynamically allocates AGV tasks in combination with the packaging progress; it improves packaging accuracy, efficiency and stability, and optimizes resource allocation and logistics efficiency. Attached Figure Description
[0035] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the following description of the embodiments will be briefly introduced. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0036] Figure 1 This is a flowchart of the SCADA-based flexible dispensing control method for pharmaceuticals of multiple specifications in Example 1.
[0037] Figure 2 This is a schematic diagram of the SCADA-based flexible dispensing control system for pharmaceuticals of various specifications in Example 1. Detailed Implementation
[0038] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings.
[0039] Many specific details are set forth in the following description in order to provide a full understanding of the invention. However, the invention may also be practiced in other ways different from those described herein, and those skilled in the art can make similar extensions without departing from the spirit of the invention. Therefore, the invention is not limited to the specific embodiments disclosed below.
[0040] Secondly, the term "one embodiment" or "embodiment" as used herein refers to a specific feature, structure, or characteristic that may be included in at least one implementation of the present invention. The phrase "in one embodiment" appearing in different places in this specification does not necessarily refer to the same embodiment, nor is it a single or selective embodiment that is mutually exclusive with other embodiments.
[0041] Example 1, referring to Figure 1 and Figure 2 This is the first embodiment of the present invention, which provides a SCADA-based method for flexible multi-specification drug dispensing control, including the following steps:
[0042] S1. Obtain the drug dispensing parameters through the human-machine interface of the SCADA system, calculate the initial dispensing cycle of the specification, allocate production channels for the drug, and calculate the initial channel allocation weight based on the batch score and target dose.
[0043] Specifically, the initial channel allocation weights are calculated based on the batch score and target dose, including:
[0044] The human-machine interface of the SCADA system is used to obtain the dispensing parameters of various drug specifications. The human-machine interface can be such as HMI, touch screen and industrial PC. The dispensing parameters include the target dose of drug specification, batch fraction, drug type and production speed requirements.
[0045] Based on the packaging parameters, the initial packaging cycle is calculated, and a production line channel is allocated for each drug type (obtained via API interface), such as pharmaceuticals. With two channels allocated, the initial packaging cycle is calculated using the following formula:
[0046] ,
[0047] in, For the first The initial packaging cycle for each specification, For the first Batch fractions of various specifications For the first The target dose of this specification, To meet production speed requirements, This is the initial equipment efficiency coefficient;
[0048] The batch score refers to the frequency priority, which is usually manually entered by the operator in the human-machine interface of the SCADA system or obtained from the urgency field of the channel from the MES system and converted into a numerical score.
[0049] The initial channel allocation weights are calculated using the following formula:
[0050] ,
[0051] in, For the first Initial channel weight assignment for each channel. and The first Batch fraction and target dose for each channel, and The first Batch fraction and target dose for each channel.
[0052] The human-machine interface of the SCADA system obtains the dispensing parameters of various drug specifications, ensuring the accuracy and real-time nature of data input, providing a reliable foundation for subsequent calculations. Based on the dispensing parameters, the initial dispensing cycle is calculated, and production line channels are dynamically allocated to optimize resource utilization, improve production flexibility, and calculate the initial channel allocation weight. The process comprehensively considers batch fraction, target dose, and equipment efficiency coefficient to effectively balance the load of each channel, reduce production bottlenecks, and improve overall production efficiency.
[0053] S2. Set the initial dispensing parameters as the population individuals input to the CADE algorithm, and obtain the final individuals through iterative optimization. Based on the final individuals, calculate the target feeder flow rate and the initial angle of the flexible robotic arm, collect the end state data of the robotic arm, and calculate the vibration error and angle error.
[0054] Specifically, the initial packaging parameters are set as the input parameters for the population individuals into the CADE algorithm. After iterative optimization, the final individuals are obtained, including:
[0055] Initialize the CADE algorithm and construct the optimization objective function, as follows:
[0056] ,
[0057] in, To optimize the objective function value, The total energy consumption is calculated by collecting instantaneous power data through smart meters and then using a discrete integral formula. The total dispensing time is the sum of the products of the batch fraction and the target dose across all channels. To obtain the maximum vibration amplitude, ADAMS is used to predict the vibration amplitude, sorted in descending order, and the maximum value is selected; furthermore, for each individual Both have an objective function value that is optimized, and the CADE algorithm uses this value to calculate the fitness value: ,in, This is the fitness value, i.e., the initial channel allocation.
[0058] Calculate the objective function value for each individual in the population, sort them in ascending order, and select the individual with the minimum objective function value to obtain the optimal individual;
[0059] The adaptive variation factor is calculated using the following formula:
[0060] ,
[0061] in, As an adaptive variation factor, The expected value of the mutation probability. This represents the range of variation in the probability of mutation. These are standard normally distributed random numbers, ranging from... , and These are the maximum and minimum fitness values among individuals in the population (fitness is the reciprocal of the objective function value). It is a very small constant. The fitness value of the optimal individual. This represents the sensitivity of channel weights to the probability of mutation. The standard deviation of all channel weights, The baseline value for the hyperentropy term, i.e., the initial hyperentropy coefficient used to control the range of mutation search, is the adaptive mutation factor in the CADE algorithm. The last item To maintain the diversity of algorithms, and by introducing = Forming dynamic hyperentropy, This is hyperentropy, meaning the search range automatically adjusts according to the degree of channel imbalance. This can be viewed as the initial algorithm perturbation weight, similar to the equipment efficiency coefficient E and production speed D initially set in the SCADA system. It belongs to the system parameter benchmark during the algorithm startup phase. When the batch priority distribution is extremely uneven, Increase, overall hyperentropy = As it increases, CADE automatically enhances its exploration range to rebalance channel allocation; The initial expected value of the mutation probability serves as the baseline, representing the average mutation magnitude of the CADE algorithm without weighted perturbations. It determines the basic perturbation strength of each generation of individuals in the search space and is correlated with subsequent... The combination forms a dynamic mutation probability term, which corresponds to the algorithm's "sensitivity" in the initial state of the system, and is determined by the dynamics of the production environment (such as the number of channels and specifications).
[0062] Specifically, Control the "exploration desire" of the CADE algorithm in the initial stage. The larger the population size, the stronger its ability to randomly spread in the search space, which can prevent it from getting trapped in local optima. The smaller the value, the faster the algorithm converges, but it is prone to stabilizing prematurely. It is usually an empirical constant, for example, When the system tasks are complex and the channel weights differ greatly, take a larger value (0.8-1.0); when the system tasks are stable and the distribution is balanced, take a smaller value (0.2-0.5).
[0063] Specifically, Controlling the base search strength, by Dynamic adjustment enables an adaptive linkage mechanism between channel allocation and variation intensity. Similarly, It is usually an empirical constant, for example, When production line tasks fluctuate significantly (frequent specification switching). When batches are stable and specifications are fixed, .
[0064] The term "population individual" refers to the individual in which the initial channel allocation and initial channel allocation weight are set as population individuals.
[0065] The optimal individual is mutated to obtain a new individual, using the following formula:
[0066] ,
[0067] in, As a new individual, For the optimal individual, and Individuals in the population are randomly selected;
[0068] Generate a random number for the new individual. If the random number is less than or equal to the crossover probability, accept the new individual; otherwise, retain the best individual. Calculate the optimization objective function value of the new individual. If the value is greater than or equal to the optimization objective function value of the best individual, retain the best individual; otherwise, accept the new individual.
[0069] Repeat the above steps until the maximum number of iterations is reached, then output the final individual and the final allocation cycle.
[0070] The final individual refers to the final channel allocation and channel allocation weight. The final allocation period is the ratio of the total target dose to the product of the total production rate requirement and the final channel allocation weight.
[0071] By setting initial channel allocation and weights as individuals in the population and using the CADE algorithm to construct the optimization objective function, efficient optimization of resource allocation in complex systems is achieved. The multi-objective optimization design not only improves the overall performance of the system but also significantly reduces the potential impact of energy consumption and vibration on equipment lifespan. By collecting instantaneous power in real time through smart meters and calculating total energy consumption using discrete integral formulas, the dynamic energy consumption during system operation can be accurately captured, providing reliable data support for energy-saving optimization. The ADAMS software is used to predict vibration amplitude and filter the maximum value, ensuring the stability of the system under high load conditions and reducing the risk of mechanical fatigue and failure. The introduction of adaptive mutation factors enhances the algorithm's adaptability to complex nonlinear problems by dynamically adjusting the mutation probability. The combination of mutation and crossover operations further ensures population diversity, avoids the algorithm getting trapped in local optima, and thus efficiently obtains the optimal individuals within a limited number of iterations.
[0072] Furthermore, the vibration error and angular error are calculated, including:
[0073] Based on the final individual sample, the target feeder flow rate is calculated using the following formula:
[0074] ,
[0075] in, For the first The target feeder flow rate for each channel For the first The final allocation cycle for each channel;
[0076] The initial angle of the flexible robotic arm is calculated using the final individual unit, using the following formula:
[0077] ,
[0078] in, For time No. The initial angle of each specification, For the first The first of the specifications Polynomial coefficients of order 1 The order of the polynomial. For the first The final allocation cycle for each specification;
[0079] Based on the initial angle, the SCADA system is used to collect the state data of the flexible robotic arm, including end-effector displacement, velocity, and actual angle, to calculate the vibration error and angle error. The formula is as follows:
[0080] ,
[0081] ,
[0082] in, For time Vibration error, For time The end displacement is time. angular error, For time From the actual perspective, For time The initial angle.
[0083] By accurately calculating the target feeder flow rate, the system can achieve refined control of the dispensing process, ensuring that the material distribution in each channel reaches the expected accuracy, thereby reducing waste and improving production efficiency. The polynomial fitting method for the initial angle of the flexible robotic arm, combined with the dynamic adjustment of the time dimension and polynomial coefficients, fully considers the nonlinear characteristics of the robotic arm's motion. The SCADA system collects multi-dimensional state data such as end displacement, velocity, and actual angle in real time, providing a high-precision data foundation for error calculation. The quantitative analysis of vibration error and angle error can not only detect deviations in system operation in a timely manner, but also provide a key basis for the subsequent optimization of control torque, significantly improving the motion stability and positioning accuracy of the flexible robotic arm.
[0084] Furthermore, the control torque is calculated and updated using the Lyapunov function, including:
[0085] The control torque is calculated based on the actual angle, vibration error, and angle error, using the following formula:
[0086] ,
[0087] in, For time The control torque, For proportional gain, For damping gain, For time speed, For angle gain;
[0088] Construct a Lyapunov function for verification. If the derivative of the Lyapunov function is less than or equal to the product of the Lyapunov function and the convergence rate, calculate the adjustment gain and update the control torque until the derivative of the Lyapunov function is greater than the product of the Lyapunov function and the convergence rate.
[0089] By calculating the control torque based on actual angle, vibration error, and angular error, and verifying and adjusting the gain using the Lyapunov function, dynamic optimization and stability assurance of the motion control of the flexible robotic arm are achieved. By organically combining proportional gain, damping gain, and angular gain, a control torque calculation model adaptable to complex dynamic environments is constructed, effectively suppressing vibration and improving the robotic arm's response speed. The introduction of the Lyapunov function provides rigorous mathematical verification for the stability of the control system. By ensuring that the function derivative satisfies the convergence condition, the system can maintain stable operation under various working conditions, avoiding instability caused by external disturbances or internal errors. The dynamic update mechanism for adjusting the gain further enhances the system's adaptive capability. By introducing a vibration error threshold and adjustment factor, the system can dynamically optimize the gain parameters according to the real-time error level, thereby achieving the optimal balance between accuracy and energy efficiency.
[0090] S3. Combine the dispensing progress and channel weight to allocate AGV tasks, perform path planning, execute material transportation based on the optimal path, calculate the dosage error, and adjust the feeder flow rate according to the dosage error threshold.
[0091] Specifically, local grid maps are generated and merged into an initial global map. AGV tasks are then assigned based on packaging progress and channel weights, including:
[0092] The AGV is equipped with a LiDAR and an RGB-D camera to collect 2D and 3D point cloud data, which are then denoised using Voxel Grid filtering.
[0093] The coordinate system of 2D and 3D point cloud data is transformed (rotation and translation) to unify them to the world coordinate system, generating comprehensive 3D point cloud data. Height filtering is then used for projection to generate a local raster map. The formula is as follows:
[0094] ,
[0095] in, For the first The comprehensive 3D point cloud of the AGV, This is a point cloud fusion function, including coordinate system transformation and weighted averaging. For the first Two-dimensional point cloud data of the AGV, For the first 3D point cloud data of the AGV, For the first The initial pose of the AGV;
[0096] The world coordinate system includes defining a fixed point in the production workshop as the coordinate origin, such as the production line origin, defining the horizontal plane direction as the X-axis and Y-axis, and defining the vertical direction as the z-axis, thus constructing a three-dimensional rectangular coordinate system.
[0097] The local raster maps are fused using Bayesian inference to generate an initial global two-dimensional raster map, as shown in the formula:
[0098] ,
[0099] in, For joint probability, For the first The initial global 2D grid map of the AGV. The normalization constant is Number of AGVs;
[0100] Use OLC to collect the packaging progress, which is the ratio of completed scores to total scores;
[0101] The formula for calculating the AGV task assignment weights is:
[0102] ,
[0103] in, For the first Assign weights to AGV tasks in each channel. For the first The final channel assignment weights for each channel. For the first The final channel assignment weights for each channel. For the number of channels, For the first Packaging progress of each channel, For the first Packaging progress of each channel;
[0104] Select AGVs whose packaging progress is less than the packaging progress threshold and whose AGV task allocation weight is greater than the AGV task allocation weight threshold, mark them as high priority, and broadcast task instructions through ROS. For example, allocate 2 AGVs to the channel where the AGV task allocation weight is greater than the AGV task allocation weight threshold.
[0105] By acquiring 2D and 3D point cloud data using LiDAR and RGB-D cameras, and combining this with Voxel Grid filtering for noise reduction, the interference of environmental noise on map construction can be effectively reduced, improving the accuracy and reliability of point cloud data. Coordinate system transformation and height filtering generate comprehensive 3D point cloud data and local raster maps, which not only unifies the spatial reference of multi-source data, but also optimizes the computational efficiency of the map through height projection, providing high-precision local environmental perception for AGV navigation. Bayesian inference and fusion of local raster maps generate an initial global 2D raster map, which can effectively integrate the perception data of multiple AGVs, significantly improving the integrity and consistency of the global map and reducing errors caused by blind spots in the perception of a single AGV. Based on the task allocation mechanism of packaging progress and channel weight, combined with OLC real-time monitoring and ROS task broadcasting, the task scheduling efficiency of AGVs is optimized, ensuring that high-priority channels receive rapid responses, thereby improving the logistics efficiency and resource utilization of the production workshop.
[0106] Furthermore, the SCADA system integrates key data through Grafana to generate batch reports and uploads them to the cloud, including:
[0107] The A* algorithm is used to plan paths on the initial global 2D grid map, including the path from the current position of the AGV to the target channel or packaging point. The path cost is calculated, and the minimum cost is selected as the optimal path. The formula is:
[0108] ,
[0109] in, For the first The path cost of the AGV is the first one. Segment path distance, in meters (m). For the first Estimated path time in seconds. As the weighting factor, For the number of paths, This is the time weighting coefficient, representing the impact of time cost on path cost in path planning, with units of cost / m. This is the distance weighting coefficient, with units of cost / m;
[0110] In the path cost formula, the distance weight coefficient and time weight coefficient have converted distance and time into cost values, such as the cost per meter of distance and the cost per second of time, thus obtaining the distance cost and time cost.
[0111] The distance between optimal paths is calculated using the Euclidean distance formula. If the distance is less than or equal to the distance threshold, it is considered a collision. The weights of the corresponding AGV tasks are then compared, and the path with the smaller value is selected. A waiting time is set, the path cost is recalculated, and the optimal path is selected.
[0112] The AGV picks up goods along the optimal path in the high-priority channel and transports them to the smart packaging box;
[0113] Deploy weighing sensors to collect actual doses and calculate dose error using the following formula:
[0114] ,
[0115] in, For the first Dosage error of various specifications For the first The actual dosage of each specification For the first The target dose for each specification;
[0116] If the dosage error exceeds the dosage error threshold, adjust the feeder flow rate using the following formula:
[0117] ,
[0118] in, For the first Adjust the feeder flow rate for different specifications. For feedback gain;
[0119] The SCADA system integrates data collected or calculated, such as actual dose, dose error, and robotic arm end-effector displacement, into batch reports via Grafana and stores them in a cloud database.
[0120] By using the A* algorithm for path planning on an initial global 2D grid map and combining it with path cost calculation, the optimal path can be efficiently selected, reducing AGV movement time and energy consumption, and improving the intelligence level of logistics transportation. By using Euclidean distance to determine path collisions and dynamically adjusting task weights and waiting times, path conflicts between AGVs can be effectively avoided, enhancing the safety and stability of multi-AGV collaborative operations. Deploying weighing sensors to monitor dosage errors in real time and adjusting feeder flow through feedback gain significantly improves the accuracy of the packaging process, reduces material waste, and ensures the stability of product quality. The SCADA system integrates multi-dimensional data through Grafana to generate batch reports and uploads them to the cloud, which not only realizes the visualization and centralized management of production data, but also provides reliable data support for subsequent data analysis, process optimization, and remote monitoring, greatly improving the intelligence and transparency of production management.
[0121] This embodiment also provides a SCADA-based flexible dispensing control system for pharmaceuticals of various specifications, including:
[0122] The parameter collection and analysis module is used to acquire drug specification parameters through the SCADA system, calculate the dispensing cycle, and allocate production line channels;
[0123] The channel allocation optimization module is used to optimize channel allocation based on the packaging parameters using the CADE algorithm, and to calculate the optimal individual and allocation cycle;
[0124] The adaptive control module is used to dynamically update the control torque using Lyapunov functions;
[0125] The AGV perception and map building module is used to fuse point cloud data to generate a global raster map and assign AGV tasks.
[0126] The path planning and task allocation module is used to plan AGV paths using the A* algorithm and perform collision detection and optimization.
[0127] The metering control and feedback adjustment module is used to monitor the actual dosage and adjust the feeder flow rate to ensure dispensing accuracy;
[0128] The data integration module is used to integrate packaged data through Grafana to generate batch reports and upload them to the cloud.
[0129] This embodiment also provides a computer device applicable to the SCADA-based flexible dispensing control method for pharmaceuticals of multiple specifications, including: a memory and a processor; the memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions to realize the SCADA-based flexible dispensing control method for pharmaceuticals of multiple specifications as proposed in the above embodiment.
[0130] The computer device can be a terminal, comprising a processor, memory, communication interface, display screen, and input devices connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, carrier networks, NFC (Near Field Communication), or other technologies. The display screen can be an LCD screen or an e-ink screen. The input devices can be a touch layer covering the display screen, buttons, a trackball, or a touchpad on the computer device's casing, or an external keyboard, touchpad, or mouse.
[0131] This embodiment also provides a storage medium storing a computer program. When executed by a processor, the program implements the SCADA-based flexible multi-specification dispensing control method for pharmaceuticals as proposed in the above embodiments. The storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as Static Random Access Memory (SRAM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Erasable Programmable Read Only Memory (EPROM), Programmable Red-Only Memory (PROM), Read-Only Memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk.
[0132] In summary, this invention calculates the initial channel allocation weights based on batch fractions and target doses, optimizes them using the CADE algorithm, corrects vibration and angle errors of the flexible robotic arm in real time, updates the control torque based on the Lyapunov function, generates local grid maps using LiDAR and RGB-D cameras and merges them into a global map, and dynamically allocates AGV tasks based on the packaging progress; thereby improving packaging accuracy, efficiency, and stability, and optimizing resource allocation and logistics efficiency.
[0133] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention, and all such modifications or substitutions should be covered within the scope of the claims of the present invention.
Claims
1. A SCADA-based method for flexible multi-specification drug dispensing control, characterized in that: include, The human-machine interface of the SCADA system is used to obtain the drug's dispensing parameters, calculate the initial dispensing cycle of the specifications, allocate production channels to the drugs, and calculate the initial channel allocation weight based on the batch score and target dose. The initial dispensing parameters are set as the population individuals input into the CADE algorithm. After iterative optimization, the final individuals are obtained. Based on the final individuals, the target feeder flow rate and the initial angle of the flexible robotic arm are calculated. The end state data of the robotic arm is collected, the vibration error and angle error are calculated, and the control torque is calculated. The control torque is updated through the Lyapunov function. Generate a local grid map and merge it into an initial global map. Combine the packaging progress and channel weight to allocate AGV tasks, perform path planning, execute material transportation based on the optimal path, calculate the dosage error, and adjust the feeder flow rate according to the dosage error threshold. The initial channel allocation weights are calculated based on batch scores and target doses. The process includes the following steps: The human-machine interface of the SCADA system is used to obtain the dispensing parameters of various drug specifications. The dispensing parameters include the target dose of the drug specification, batch fraction, drug type and production speed requirements. Based on the packaging parameters, the initial packaging cycle is calculated, and a production line channel is allocated for each drug type. The formula for calculating the initial packaging cycle is as follows: , in, For the first The initial packaging cycle for each specification, For the first Batch fractions of various specifications For the first The target dose of this specification, To meet production speed requirements, This is the initial equipment efficiency coefficient; The batch score refers to the frequency priority, which is usually manually entered by the operator in the human-machine interface of the SCADA system or obtained from the urgency field of the channel from the MES system and converted into a numerical score. The initial channel allocation weights are calculated using the following formula: , in, For the first Initial channel weight assignment for each channel. and The first Batch fraction and target dose for each channel, and The first Batch fraction and target dose for each channel; The process of setting the initial packaging parameters as input to the CADE algorithm for individual populations and obtaining the final individuals through iterative optimization includes: The initial channel allocation and initial channel allocation weight are set to the population individuals, the CADE algorithm is initialized, and an optimization objective function is constructed to output the final individuals and the final allocation period; The calculation of vibration error and angle error includes: Based on the final individual, the target feeder flow rate and the initial angle of the flexible robotic arm are calculated. The state data of the flexible robotic arm are collected using a SCADA system, and the vibration error and angle error are calculated.
2. The SCADA-based flexible dispensing control method for pharmaceuticals of multiple specifications as described in claim 1, characterized in that: The calculation of the control torque, which updates the control torque through the Lyapunov function, includes: Based on the actual angle, vibration error, and angle error, the control torque is calculated, and a Lyapunov function is constructed for verification to obtain the updated control torque.
3. The SCADA-based flexible dispensing control method for pharmaceuticals of multiple specifications as described in claim 2, characterized in that: The process of generating a local grid map and merging it into an initial global map, and allocating AGV tasks based on packaging progress and channel weights, includes: The AGV is equipped with an updated control torque for disassembly and a LiDAR and RGB-D camera to collect 2D and 3D point cloud data. These data are then denoised using Voxel Grid filtering to generate an initial global 2D raster map.
4. The SCADA-based flexible dispensing control method for pharmaceuticals of multiple specifications as described in claim 3, characterized in that: The SCADA system integrates key data using Grafana to generate batch reports and uploads them to the cloud, including: The A* algorithm is used to plan the path on the initial global two-dimensional grid map. The AGV picks up the goods along the optimal path and transports them to the smart packaging box. The SCADA system integrates the collected or calculated data into batch reports using Grafana and stores them in a cloud database.
5. A SCADA-based flexible dispensing control system for pharmaceuticals of multiple specifications, based on the SCADA-based flexible dispensing control method for pharmaceuticals of any one of claims 1 to 4, characterized in that: include, The parameter collection and analysis module is used to acquire drug specification parameters through the SCADA system, calculate the dispensing cycle, and allocate production line channels; The channel allocation optimization module is used to optimize channel allocation based on the packaging parameters using the CADE algorithm, and to calculate the optimal individual and allocation cycle; The adaptive control module is used to dynamically update the control torque using Lyapunov functions; The AGV perception and map building module is used to fuse point cloud data to generate a global raster map and assign AGV tasks. The path planning and task allocation module is used to plan AGV paths using the A* algorithm and perform collision detection and optimization. The metering control and feedback adjustment module is used to monitor the actual dosage and adjust the feeder flow rate to ensure dispensing accuracy; The data integration module is used to integrate data through Grafana to generate batch reports and upload them to the cloud.
6. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that: When the processor executes the computer program, it implements the steps of the SCADA-based flexible dispensing control method for pharmaceuticals of any one of claims 1 to 4.
7. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by the processor, it implements the steps of the SCADA-based flexible dispensing control method for pharmaceuticals of any one of claims 1 to 4.
Citation Information
Patent Citations
Cloud data processing method and device and electronic equipment
CN119271134A
Warehouse sorting real-time control system based on edge calculation
CN119919062A