A multi-protocol closed loop detection device and method based on event efficient sampling
By using a multi-protocol closed-loop detection device based on effective event sampling, the problem of inconsistent timing in multi-channel loading or motion detection is solved, and the accuracy and consistency of the corrected output are achieved.
Patent Information
- Application Number
- CN202611587379.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-10-14
- Publication Date
- 2026-11-20
AI Technical Summary
In multi-channel loading or motion detection, the timing of command reception, device execution, and sensor sampling may be inconsistent, leading to inaccurate correction outputs in closed-loop detection.
A multi-protocol closed-loop detection device based on effective event sampling is adopted. Through a unified timing unit, event association unit, joint sampling unit and closed-loop calculation unit, it ensures that the sampling time of each channel is consistent within the same event, and performs normalized tracking error calculation and correction output.
It effectively eliminates channel deviations caused by time misalignment, ensuring the accuracy and consistency of the corrected output and avoiding misjudgments in cross-channel correction.
Smart Images

Figure CN123137286A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to industrial measurement, industrial communication, and automatic control, and particularly to a closed-loop detection device and method that correlates heterogeneous protocol events, effective sampling, and multi-channel loading or motion correction. Specifically, it relates to a multi-protocol closed-loop detection device and method based on effective event sampling. Background Technology
[0002] Testing multi-channel actuators requires coordinating motion commands, load application, sensor data acquisition, and device communication. Existing solutions utilize PLCs, LabVIEW, human-machine interfaces, and various communication interfaces to achieve test control and result recording. CN107765626A discloses force loading monitoring using a PLC and LabVIEW; CN113687214A discloses a testing process consisting of a controller, relays, motors, and brakes; CN121741560A discloses a multi-bus interface, protocol adapter, multi-channel test sequence, and data acquisition.
[0003] The acceptance of a command, the activation of a device action, and the completion of sensor sampling all correspond to different times. Multiple measurements under the same event identifier may still be taken from different stages of motion; directly using the message arrival time as the sampling time ignores internal device updates, buffering, and transmission delays. If the latest measurement values within each channel window are used directly to calculate inter-channel deviations, sampling time misalignment may cause unnecessary cross-channel corrections.
[0004] Existing multi-channel testing systems can complete test sequence scheduling, device communication, and data recording. CN120012002A discloses a servo drive system status monitoring method for time synchronization and amplitude calibration of multi-source sensor data. For closed-loop testing of heterogeneous protocols, it is also necessary to determine whether the execution status confirmation, sampling time range, and the combination of all data sets meet the correction output conditions, and to handle the missing necessary channels, uncertain sampling times, and data failures before submission. Summary of the Invention
[0005] The technical problem this invention aims to solve is that in multi-channel loading or motion detection with different industrial communication protocols and data acquisition and update mechanisms, the timing of command reception, device execution, and sensor sampling may be inconsistent. Relying solely on message arrival times, event identifiers, or the latest measurements from each channel for closed-loop correction may result in the use of old event data, cross-stage data, data with unclear sampling time ranges, or data lacking necessary channels in the same round of control. This invention correlates event confirmation, joint sampling verification, and overall correction submission, ensuring that the correction output is constrained by both the current event state and the overall sampling conditions.
[0006] This invention discloses a multi-protocol closed-loop detection device based on effective event sampling, comprising a host computer, a real-time controller, a protocol interface, a data acquisition and output unit, a channel interface, a tested actuator, and a safety loop. The protocol interface supports at least two industrial communication protocols. The data acquisition and output unit connects to sensors and load actuators or motion actuators. The real-time controller includes a unified timing unit, an event correlation unit, a joint sampling unit, a closed-loop calculation unit, and an output submission unit. The host computer is used for test configuration, status display, and result recording, while the real-time controller is responsible for maintaining the unified time base, event status, sampling buffer, and output status.
[0007] The unified timing unit provides a uniform monotonic time base for event, confirmation, sampling, and submission records. The event association unit establishes test events containing event identifiers, target values, required channel sets, and validity periods, and associates them with corresponding control commands, acceptance confirmations, and execution status confirmations. The required channel set contains at least two channels and remains unchanged within the current event. Acceptance confirmations indicate that the command has been accepted or processed according to interface rules, and execution status confirmations indicate that the device has entered the state corresponding to the current action. The joint sampling unit establishes effective sampling windows for each channel based on the execution status confirmation time, window offset, and window duration of each required channel, and takes their intersection as the common effective sampling window. Sampling records at least include an event identifier, sampling source time interval, sample sequence number, and quality flag. The sampling data delay is the difference between the verification time and the earliest endpoint of the sampling source time interval, used to estimate the upper bound of the time elapsed from sampling to verification. A joint sampling vector is formed only when all necessary channels are confirmed to be valid, the sample quality is valid and has not been used in previous rounds of this event, all source time intervals are within a common window, the span of the entire group of intervals and the sampling data delay do not exceed the limits, and the upper endpoint of each interval is not later than the verification time and the event has not expired. If a necessary channel is missing or invalid, the joint sampling verification for that round will fail.
[0008] The closed-loop calculation unit calculates the normalized tracking error by dividing the difference between the target value and the measured value by the corresponding positive reference range for each channel of the same measured physical quantity based on the joint sampling vector. After calculating the common-mode mean of the entire group and the differential-mode components of each channel, a candidate correction vector is formed. The candidate correction is limited and synthesized with the local feedback control quantity, and then converted by output limiting, the configured rate of change limit, and interface conversion to form a candidate output. Before release, the output submission unit 25 reviews the current event, confirmation status, feedback quality, interlock status, and sampling data delay; when the verification is successful, it releases the complete output buffer of all necessary channels with the same submission identifier, and the actuator is driven by the corresponding interface. If any condition fails or a joint sampling vector is not formed, the submission of the entire group correction is prohibited. This invention also provides a multi-protocol closed-loop detection method using the above-mentioned device, which sequentially executes event establishment, confirmation association, window intersection, joint sampling judgment, correction calculation, submission review, and result recording.
[0009] When joint sampling is temporarily unavailable, the real-time controller cancels cross-channel correction; local hold control continues only when local feedback is valid, the mechanism permits it, and the hold period has not expired. If the waiting or hold period is exceeded, or if feedback failure, exceeding limits, emergency stop, or interlocking failure occurs, the device switches to a preset safety output state. Safety loop 7 can restrict motion enable through hardware gating independent of the host computer communication, and retain necessary mechanical braking or locking capabilities according to the mechanism's load-bearing requirements.
[0010] This invention distinguishes between acceptance confirmation and execution status confirmation, and performs joint sampling verification on a fixed set of necessary channels. The device calculates cross-channel corrections using only complete sample sets that correspond to the current event, are of valid quality, and have not been reused. Provided that the sampling source time interval and its error boundary are valid, the common valid sampling window, the span of the entire interval, and the sampling data delay limits can exclude sample combinations that do not meet the time conditions, reducing corrections caused by misjudging time misalignment as channel deviation.
[0011] The common-mode mean and differential-mode components of the normalized tracking error of the same measured physical quantity are calculated separately, and correction gains for the group-wide average tracking deviation and the relative deviation between channels can be set separately. Combined with local feedback control and correction limiting, target tracking and inter-channel coordination can be balanced within the set output range, avoiding the direct mixing and averaging of different physical quantities. The actual adjustment effect depends on the controlled object, gain configuration, and feedback conditions.
[0012] Before submission, a second check of event status, confirmation status, feedback quality, interlock status, and sampling data latency can intercept candidate corrections that become invalid after calculation but before output release. All output caches in the group use the same submission identifier for release, ensuring downstream reads of the complete correction vector from the same round, avoiding reading partially updated caches. This measure constrains data consistency within the controller but does not imply physical synchronization of sensor transitions or simultaneous physical activation of heterogeneous actuators.
[0013] When joint sampling is temporarily unavailable, cross-channel corrections are revoked, and local control continues within the validity period of local feedback, institutional permission, and the retention period, avoiding blocking local feedback adjustment while waiting for slower protocols. Timeouts or safety faults trigger preset safety outputs, which, in conjunction with independent hardware gating and safety state latching, can restrict motion enablement and new normal outputs during abnormal periods; confirmation, sampling, rejection reasons, and submission records are saved by event, allowing traceability of the input basis and processing results of each round of corrections. Attached Figure Description
[0014] Figure 1 This is a schematic diagram illustrating the functional structure of the device of the present invention and its communication, data acquisition and output, and secure connection relationships.
[0015] Figure 2This is a schematic diagram of the data flow for event association, protocol confirmation, joint sampling determination, closed-loop calculation, and submission of the entire group output in this invention.
[0016] Figure 3 This diagram illustrates the relationship between the effective sampling windows of each necessary channel, the common effective sampling window, and the sampling source time interval.
[0017] Figure 4 This diagram illustrates the relationship between local feedback control, common-mode and differential-mode correction, and output submission.
[0018] Figure 5 This diagram illustrates the state transitions for test event states, joint sampling control rounds, and exception handling.
[0019] Figure 6 This diagram illustrates the relationship between independent hardware security gating and software security state latching, reset, and re-self-test.
[0020] Figure reference numerals: 1-Host computer; 2-Real-time controller; 3-Protocol interface; 4-Acquisition and output unit; 5-Channel interface; 6-Actuator under test; 7-Safety loop; 21-Unified timing unit; 22-Event association unit; 23-Joint sampling unit; 24-Closed-loop calculation unit; 25-Output submission unit. Detailed Implementation
[0021] The present invention will be described below with reference to the accompanying drawings.
[0022] like Figure 1 As shown, this invention discloses a multi-protocol closed-loop detection device based on effective event sampling, comprising a host computer 1, a real-time controller 2, a protocol interface 3, a data acquisition and output unit 4, a channel interface 5, a tested actuator 6, and a safety loop 7. The protocol interface 3 supports at least two industrial communication protocols. The data acquisition and output unit 4 connects to sensors and load actuators or motion actuators. The real-time controller 2 includes a unified timing unit 21, an event association unit 22, a joint sampling unit 23, a closed-loop calculation unit 24, and an output submission unit 25. The host computer 1 is used for test configuration, status display, and result recording, while the real-time controller 2 is responsible for maintaining the unified time base, event status, sampling buffer, and output status.
[0023] The unified timing unit 21 provides a unified monotonic time base for event, confirmation, sampling, and submission records. The event association unit 22 establishes test events containing event identifiers, target values, required channel sets, and validity periods, and associates them with corresponding control commands, acceptance confirmations, and execution status confirmations. The required channel set contains at least two channels and remains unchanged within the current event. Acceptance confirmation indicates that the command has been accepted or processed according to the interface rules, and execution status confirmation indicates that the device has entered the state corresponding to the current action. The joint sampling unit 23 establishes effective sampling windows for each channel based on the execution status confirmation time, window offset, and window duration of each required channel, and takes their intersection as the common effective sampling window. Sampling records at least include an event identifier, sampling source time interval, sample sequence number, and quality flag. The sampling data delay is the difference between the verification time and the earliest endpoint of the sampling source time interval, used to estimate the upper bound of the time elapsed from sampling to verification. A joint sampling vector is formed only when all necessary channels are confirmed to be valid, the sample quality is valid and has not been used in previous rounds of this event, all source time intervals are within a common window, the span of the entire group of intervals and the sampling data delay do not exceed the limits, and the upper endpoint of each interval is not later than the verification time and the event has not expired. If a necessary channel is missing or invalid, the joint sampling verification for that round will fail.
[0024] The closed-loop calculation unit 24, based on the joint sampling vector, divides the difference between the target value and the measured value by the corresponding positive reference range for each channel of the same measured physical quantity to obtain the normalized tracking error. After calculating the common-mode mean of the entire group and the differential-mode components of each channel, a candidate correction vector is formed. The candidate correction is limited and synthesized with the local feedback control quantity, and then converted by output limiting, the configured rate of change limit, and interface conversion to form a candidate output. Before release, the output submission unit 25 reviews the current event, confirmation status, feedback quality, interlock status, and sampling data delay; when the verification is successful, it releases the complete output buffer of all necessary channels with the same submission identifier, and the actuator is driven by the corresponding interface. If any condition fails or a joint sampling vector is not formed, the submission of the entire group correction in that round is prohibited. This invention also provides a multi-protocol closed-loop detection method using the above-mentioned device, which sequentially executes event establishment, confirmation association, window intersection, joint sampling judgment, correction calculation, submission review, and result recording.
[0025] When joint sampling is temporarily unavailable, the real-time controller cancels cross-channel correction; local hold control continues only when local feedback is valid, the mechanism permits it, and the hold period has not expired. If the waiting or hold period is exceeded, or if feedback failure, exceeding limits, emergency stop, or interlocking failure occurs, the device switches to a preset safety output state. Safety loop 7 can restrict motion enable through hardware gating independent of the host computer communication, and retain necessary mechanical braking or locking capabilities according to the mechanism's load-bearing requirements.
[0026] Hardware connectivity and task allocation, such as Figure 1As shown, the real-time controller 2, analog signal acquisition and output interface, encoder interface, motion drive interface, and host computer 1 are configured according to the test object to form a test platform. The following describes the interface implementation, the stage testing of the delay-based speed stabilization mechanism, and the design implementation methods for dual-channel torque control and four-channel tension control; the physical quantities, control directions, and effective sampling conditions within the same control group are configured separately. Sensors are connected to the acquisition unit via matched signal conditioning or transmitters. Power supply, isolation, overcurrent protection, and grounding are designed according to the device ratings. Unmatched resistance strain gauge bridges or thermocouples are not directly connected to the current input.
[0027] The controller can be selected from the DVP28SV311S or a PLC or real-time controller with equivalent timing, I / O, and communication capabilities; analog modules can be selected from DVP04AD-SL and DVP04DA-SL. Digital input expansion can be selected from the DVP32SM11N, and transistor digital output expansion can be selected from the DVP16SN11TS; the number of expansion points is determined by wiring requirements. Temperature monitoring can use a separate PT100 input module. High-speed pulses should be connected to ports explicitly supported by the controller or dedicated motion modules; ordinary transistor digital output expansions should only be used according to their rated update capacity. The above models are interface connection examples; the actual task cycle and upper limit of time error need to be determined in conjunction with module parameters and program load.
[0028] The host computer can use LabVIEW, and the human-machine interface is used for parameter setting, status display, and test operations. Ethernet is used for configuration, status, and result exchange, and can be configured with EtherNet / IP or equivalent host computer interfaces according to the services supported by the controller; CANopen is used for motion drive, and Modbus RTU is used for serial instrument or encoder converters. When a BiSS-C encoder is connected to the serial acquisition link via a matched BiSS-C to register interface converter, BiSS-C is the sensor-side interface, and the controller side reads the conversion results through Modbus RTU. Protocol tasks are executed on the controller or real-time gateway; the scheduling of ordinary PC processes and message arrival time are not used as deterministic sampling criteria.
[0029] Local control tasks use a period T0, e.g., 4 ms for the design verification model; cross-channel correction tasks use a period Tc, e.g., 20 ms for the model. Communication transmission and reception use non-blocking queues, without waiting for serial responses within the local control tasks. The controller uses a monotonically increasing counter to generate actual timestamps; the product of the period count and the planned period is only used to represent the planned scheduling time, and actual task jitter is recorded as timestamps. The above periods are design example values; the execution time under the corresponding program load should be verified during deployment.
[0030] In a programmable implementation, state records, event tables, sampling circular buffers, and output double buffers are stored separately. Fast tasks first check safe inputs and local feedback, communication tasks write completed records to a queue, and joint sampling tasks only read complete records. Incremental version numbers are stored at the beginning and end of the same record, and read tasks only accept records with the same beginning and end version numbers and that are in a completed state, avoiding the use of data that has not been fully written.
[0031] Device descriptions and event data: The device description for each channel includes channel identifier, protocol interface identifier, device address, register or object dictionary, byte order, data format, physical quantity unit, proportional coefficient and offset, control direction, feedback source, timestamp source and error boundary, acknowledgment conditions, window parameters, delay limit, output amplitude and rate of change limit, and safety configuration. In a dual-channel torque scenario, the two torque channels are grouped into a fixed set G; in a four-channel tension scenario, the four tension channels are grouped into a fixed set G, as shown in Table 1. Auxiliary quantities such as speed, angle, and temperature are not directly mixed into the average value of torque or tension errors.
[0032] Table 1 Command and feedback mapping and sampling constraints of channel and protocol interfaces ; Event logs must include at least the session ID, event sequence number, required channel set, action parameters, target vector, planned start point, event deadline, window offset and window width for each channel, allowed sampling time difference, upper limit for sampling data delay, completion conditions, and fault branches. Each correction is recorded separately as the control round number, and the output log also includes the commit ID. The deadline is an absolute time on a unified time base, not the duration; all old session logs are invalid after session reconstruction.
[0033] Before event configuration, perform dimensionality, resource usage, and time budget checks. The worst-case transaction time for serial protocols on the same physical bus needs to be sequentially accumulated, without assuming parallel communication on the same bus. If samples meeting update and timing conditions cannot be obtained within the timeframe, extend the low-speed task cycle, separate instrument monitoring from fast control, or use a suitable acquisition interface, if test requirements permit. Once the required channel set is loaded, it will not shrink due to downtime within the current event.
[0034] Protocol confirmation and old response isolation: Acceptance confirmation indicates that the request has been accepted or processed according to the interface rules; execution status confirmation indicates that the controlled device is in the state corresponding to the current action. Both are stored and timed separately. Modbus write response or CAN bus link layer confirmation respectively indicate that the corresponding protocol request has been processed or the link layer message has been received, and cannot prove that the motor has reached the target, the valve is in position, or the load has been formed.
[0035] CANopen sends process data PDOs according to its communication mechanism, and does not require slaves to return a response with the same application event number for each PDO. When action feedback is needed, it reads or subscribes to the status data provided by the device, and combines it with status update flags, target acceptance status, or independent DI / encoder feedback to form an execution status confirmation. If the application allows extended sequence numbers, the application sequence number is used; if the device does not allow extension, it is associated by the controller side.
[0036] Modbus RTU does not pre-define event numbers that can carry the device's own information. The controller allows only one incomplete transaction per serial bus, storing the session, event, station number, function code, address, length, transmission time, and timeout period. Responses must pass format, CRC, station number, function code, and expected data structure checks; if a read response does not echo an address, a single in-transit request will complete the address association. Broadcast writes do not expect a response and are not considered mandatory action paths.
[0037] After a transaction times out, its event association should be cancelled first, and late responses should not be allowed to directly confirm the next transaction. Under the condition of a maximum device response time and a transmission upper bound, isolation waiting, emptying the receive buffer, and re-checking readiness can be used before initiating a new transaction; the isolation period covers this upper bound. Simply clearing the current buffer or waiting for a frame interval is insufficient to exclude old responses arriving in the future. When the lateness upper bound cannot be defined and there is no device sequence number or independent execution feedback, the unique correspondence between the channel response and the current request cannot be confirmed; the response should be marked invalid or the current test should be terminated.
[0038] For AO or pulse interfaces, the controller output image update record serves as the local acceptance confirmation, while DI readiness, encoder status, or device operation feedback serves as the execution status confirmation. This confirmation process does not rely on instruction-by-instruction protocol responses. In a constant tension event, the execution status confirmation may be that the driver allows adjustment and the output path is effective, rather than that the tension has reached the target. Subsequently, local feedback control and sampling cycles run, and only when the target tolerance band is reached and the requirements are continuously met is the event completion condition established.
[0039] Common valid window and source time, such as Figure 3 As shown, within the same event, an effective sampling window is established for each necessary channel according to the execution status confirmation time and window parameters, using Equation (1). The window offset is used to avoid the switching invalid area or define the measured stage, and can be zero for dynamic control; whether the sampling window needs to avoid the dynamic process is determined by the measurement target. (1) In formula (1): Number the required channels; This is the moment when the current event execution status of this channel is confirmed; This is a non-negative window offset; The duration of a positive window; The deadline for the event; This is the starting point of the channel window; This is the end point of the channel window; This operation retrieves the minimum value among the listed real numbers. All times use the same monotonic time base, and the time and time difference are uniformly expressed in milliseconds; if the endpoint is earlier than the starting point, the channel window is empty.
[0040] The common effective sampling window is determined by the intersection of all required channel windows. The closed interval shown is used as the common window only when the starting point is not later than the ending point in equation (2); otherwise, the common window is empty and no correction is submitted in the current round. (2) In formula (2): The required set of channels that remain unchanged for the current event and contain at least two channels; The channel number within set G; The starting point of each channel window, in milliseconds; The endpoint of each channel window, in milliseconds; The latest window start time for the entire group, in milliseconds; The earliest window endpoint for the entire group, in milliseconds; For a common effective sampling window; This is an operation that takes the maximum value of all channels in set G; This is the operation to find the minimum value for all channels of set G. Square brackets indicate a closed interval including endpoints; here, E only represents the window endpoint and is not used to represent event records.
[0041] The sampling record saves the sampling source time interval. When the hardware provides a sampling timestamp that has been mapped to the controller time base, the interval is determined according to formula (3). The upper bound of the sampling time error covers the conversion, clock mapping, and drift errors. When the acquisition module only provides update values, the interval is determined according to formula (4). The upper bound of the total delay covers the conversion, update waiting, transmission, and buffering delays. The above upper bound is determined based on the conversion and update rules of the module used and the worst-case time budget for task execution and communication waiting. If the required upper bound cannot be determined based on this, or if the corresponding time boundary is exceeded during operation, the sampling record is not used for joint sampling determination. (3) In formula (3): Number the channel; This refers to the time interval from which the samples were collected. The lower endpoint of the interval; The upper endpoint of the interval; The sampling time is either hardware latched or mapped to the controller's monotonic time base; This represents the non-negative sampling time error bound, including errors from conversion, clock mapping, and drift. All time quantities are expressed in milliseconds (ms); σ is a defined upper bound for the error, not the statistical standard deviation. (4) In equation (4): Number the channel; This represents the conservative sampling time interval for this sample. The lower endpoint of the interval; The upper endpoint of the interval; The moment when the controller receives the complete record; This is the upper bound of the non-negative total delay from sampling at the source to reception of the measurement value. Its value is determined according to the conversion and update rules of the module used and the worst-case time budget for task execution and communication waiting. All time quantities are in milliseconds. The total upper bound covers conversion, update waiting, transmission, and buffering; for observation-type measurements, it must also cover the observation range. This formula cannot be applied when the delay of repeatedly reading old buffers cannot be determined.
[0042] All candidate samples must satisfy equation (5). This equation constrains the time interval of the sampling source; when the measured value depends on the counting, integration or filtering observation process, it constrains the complete observation time range. The PLC reads all values in the same scan cycle, which does not mean that these values are formed at the same time. The time difference caused by the conversion, update and buffering of each channel still needs to be taken into account. (5) In equation (5): The set of necessary channels that remain unchanged within the current event; This holds true for every required channel within a fixed set G; As a common starting point; The common window endpoint; The lower endpoint of the source interval of the i-th channel; The upper endpoint of the source interval of the i-th channel; This represents the total span of all source intervals; The non-negative allowable sampling time difference; To find the maximum value within G; To achieve the minimum value within G. All time quantities are in milliseconds; this condition is a conservative sufficient condition and does not guarantee the physical synchronization of the switching between sensors.
[0043] During the initial joint sampling verification and output submission review, the sampling data delay, the upper endpoint of the sampling source time interval, and the event cutoff condition are checked by substituting the current verification time into equation (6). The sample number is only added after confirming the completion of a new conversion or observation update; samples already used within the same event will not participate in subsequent rounds of correction calculations. After the time conditions are met, the event association, sample quality, confirmation status, and interlocking status also need to be checked. (6) In formula (6): The set of necessary channels that remain unchanged within the current event; The channel numbers within the fixed required channel set G; This is the current verification time; during the pre-submission review, the actual output submission verification time is used. The lower endpoint of the source interval; The upper endpoint of the source interval; A positive upper limit for sampling data delay configured for the channel; This represents the cutoff time for the current event. All time values are in milliseconds (ms); a conservative upper bound is used to calculate the sampling data delay based on the earliest endpoint of the interval.
[0044] The joint sampling unit searches for comparable sample combinations for each channel from the current event cache. A specific algorithm uses the minimum of the latest available source timestamps for each channel as a candidate common reference, searching for unused samples in each channel from near to far, checking the window, interval span, and time delay group by group, and selecting the group that meets the conditions and has the latest reference time. For cases with precise timestamps and the same sampling grid, common historical grid points can be selected; for arbitrary timestamps, interval determination is still required, and the interpolation result is still constrained by the upper bound of the original time error.
[0045] At least one new sample is selected for each channel in each round. When the mean is required, the joint time verification is performed for each corresponding sample group first, and then the channel mean is calculated according to formula (7). The source range of the mean is the envelope of the source interval of the participating samples, and the window, the span of the whole group and the time delay conditions at the time of submission are still satisfied. When there are not enough samples, NO_SAMPLE is recorded, and the original set of required channels is kept. (7) In equation (7): The channel number is fixed within the set; This corresponds to the sample group number; The number of identical positive integer sample groups used in each channel; This is the engineering quantity sample for the i-th channel in the q-th group; This is the arithmetic mean of the channel, in the same units as the sample. This corresponds to the lower endpoint of the original sample source interval; This corresponds to the upper endpoint of the original sample source interval; The earliest possible time from which the mean depends on all original samples; This represents the latest possible time from which the mean depends on all original samples. The range of extreme values is defined for all participating sample groups, with time endpoints in milliseconds (ms); the number of sample groups is 1 in the single-sample case.
[0046] Common-mode and differential-mode correction and output submission: For the joint sampled values of the same physical quantity, first complete the engineering quantity conversion, then calculate the normalized tracking error according to formula (8), and decompose the common-mode and differential-mode according to formula (9). When the targets of each channel are different, calculate the tracking error relative to their respective targets, and then compare their normalization results. Temperature, pressure and speed belong to different control groups unless the physical model has clearly given the conversion relationship; (8) In equation (8): Number the required channels; This represents the target engineering quantity for this passage in the current event; This represents the engineering quantity of this channel in the qualified joint sampling vector for this round; The reference range is positive and has the same unit as the target value and the measured value; This is for dimensionless normalized tracking error. Tension groups can be uniformly represented by N, and torque groups can be uniformly represented by N·m; different physical quantities cannot be directly grouped simply by dividing by range. η and the time error boundary σ use different signs. (9) In equation (9): For a fixed set of necessary channels; The number of channels in set G is at least 2; Let G be the number of elements in set G; For the summation index of G; The current channel number; The normalized tracking error for the j-th channel; The normalized tracking error for the i-th channel; This represents the common modulus mean of the errors across the entire group. The differential mode component of the i-th channel relative to the common mode mean; This is a summation operation over the specified range. The error and its components are dimensionless; the sum of all differential moduli is zero.
[0047] Common mode reflects the overall tracking deviation of the entire group, while differential mode reflects the deviation of each channel relative to the whole. Calculate candidate corrections according to equation (10) and limit amplitude according to equation (11). The following control quantities use a unified normalized output coordinate system, so that increasing the normalized output corresponds to the positive effect of the controlled quantity; the physical output polarity is handled during interface conversion. The control gain should be tuned according to the dynamic characteristics of the controlled object, and the closed-loop stability should be verified. (10) In formula (10): Number the channel; For unlimited normalized candidate corrections; Gain correction for common mode; Gain correction for differential mode; This is the dimensionless common mode mean of this round; This represents the dimensionless differential modulus component in this round. The normalized control output, error, and both gains are dimensionless. (11) In equation (11): Number the channel; This is a normalized candidate correction after amplitude limiting; This is the unlimited correction for equation (10); The upper limit of the positive normalized correction amplitude; The amplitude limiting operation is defined by equation (12). If the output submission is invalid, the current round of correction will not be published, and the correction will be revoked or restricted from being released according to the configuration. (12) In equation (12): The actual number to be limited; This is the lower limit of the amplitude limit; This is the upper limit of the amplitude limit; This is an operation that truncates the input to the closed interval [a, b]. This is an operation to find the minimum value; This is an operation to find the maximum value. x, a, and b must use the same units. The actual arguments in different formulas are defined by the formula in which they are used; here, the three letters are only function parameters.
[0048] Local control can use PID or a special case of PI. The following is a discrete PI implementation corresponding to the software simulation, with the differential gain set to zero; if a non-zero differential term is used, the filtering algorithm and delay should be specified separately. First, calculate the effective local feedback error and integral candidate according to equation (13), and then perform output trial calculation according to equation (14). If the trial calculation exceeds the upper limit and the error is positive, or exceeds the lower limit and the error is negative, retain the integral of the previous cycle; otherwise, accept the integral candidate, and then calculate the actual amplitude-limited output according to equations (15) and (16); (13) In equation (13): Assign a local channel number; Update the sequence number for local control; This represents the current local target workload. The amount of feedback work required to meet local update requirements does not necessarily have to be equal to the measurement in the slower joint vector; This is a positive reference range in the same unit as the quantity of this work. This is a dimensionless local tracking error; This is the actual positive time interval between the current and previous local updates, in seconds (s). The accepted error integral state, in seconds; The units are candidate error integrals to be accepted in this simulation, in seconds. Square brackets indicate discrete update numbers; the initial value of the integral is set to zero in this implementation. The simulation uses a constant update interval of 4ms, i.e., 0.004 s. (14) In equation (14): Number the channel; Update the sequence number for local control; This is the calculated output value without amplitude limiting; This is the normalized feedforward output; This is a dimensionless proportional gain; This is a local dimensionless error; The gain is the non-negative integral gain, expressed in s⁻¹. Candidates for error integral, in seconds; This is the normalization correction that has been approved by the entire group; it is zero when the correction is withdrawn. The trial output is dimensionless. The upper and lower limits of the amplitude in equation (16) are used to determine the anti-saturation. The sign convention for the positive error driving the normalization output to increase is consistent with that in equation (10). (15) In equation (15): Number the channel; Update the serial number locally; To normalize the local PI output; This is the normalized feedforward output; This is a dimensionless proportional gain; This is a dimensionless local error; This is the integral gain, in units of s⁻¹; The integral state of the error after acceptance or maintenance according to the aforementioned anti-saturation rule, in seconds; (16) In equation (16): Number the channel; Update the serial number locally; For normalized output with limited amplitude; For the local PI output of equation (15); For currently allowed cross-channel corrections; To normalize the lower bound of the output; The normalized output upper limit is not less than the lower limit; This is the amplitude limiting operation for equation (12). All outputs are dimensionless. The integral acceptance condition of equation (14) uses the upper and lower limits of this equation; the upper and lower limits for software simulation are 0 and 1.2. When a safety fault occurs, the safe output branch is switched, and the normal output is not maintained according to this equation. (17) In equation (17): Number the channel; Update the serial number locally; This is the normalized output limited by the rate of change. The amplitude-limited output of equation (16); The upper limit of the normalized output rate of change is positive, in units of s⁻¹; This is the actual time interval for this update, in seconds. This is the amplitude limiting operation of equation (12). When the rate of change limit is enabled, this equation is used. The initial output and the previous output must be within the amplitude limit, so the new output is still within the amplitude limit; the initial value is re-verified when the output boundary changes. In this embodiment, the software simulation does not enable the rate of change limit, and the output directly adopts equation (16); (18) In formula (18): Number the channel; The amount of work to be transmitted to the output interface is given; This is the interface bias when the normalized output is zero. For directional polarity, take +1 or −1; A positive interface range conversion factor; Dimensionless limited output; amplitude limited output is used when rate of change limitation is not enabled. The interface setpoint and bias unit are the same, such as V, mA, or r / min; the conversion factor is the interface engineering quantity corresponding to each unit of normalized output. Register encoding is handled according to the device format, and N·m values are not directly written as motion commands.
[0049] like Figure 2 and Figure 4 As shown, after the joint sampling verification passes, the closed-loop calculation unit first generates a complete group of candidate correction buffers. Before publishing, the output submission unit reviews the current session, event, round, confirmation status, interlock, feedback quality, and sampling data latency; if any condition fails, the entire group is invalidated. Double-buffered pointers or version switching are used to ensure that the reading task obtains a complete output buffer with the same submission code; the unified timing unit 21 provides the time base, and the transmitter execution status feedback is recorded according to the submission identifier.
[0050] A full-group cache release indicates data consistency within the controller, but the actual effective times of the outputs from different protocol interfaces may still differ. Protocol interfaces are sent in a queue according to their submission codes, and the actual sending and execution status feedback of each channel is recorded. When there are requirements for the deviation of the action's effective time, monitoring continues according to the set upper limit; if the limit is exceeded, the current round is marked as a failure and enters a hold or safe state. Revoking the software completion flag does not retract the physical actions caused by the sent instructions.
[0051] When no joint vector is formed, the cross-channel correction is set to zero or exits at a pre-configured finite slope; this implementation uses the undo correction. As long as the local feedback is still valid and the hold period has not expired, the local PID can continue to control the original target, preventing the blocking of fast control while waiting for a slower protocol. If the local feedback itself fails or a safety interlock is activated, it will not continue to rely on the original PID for hold.
[0052] Event status and security handling, such as Figure 5 As shown, the states include INIT (Initialization), SELF_CHECK (Self-Check), READY (Ready), ARMED (Event Loading), WAIT_CONFIRM (Waiting for Confirmation), ACTIVE (Running), HOLD (Holding), SAFE (Safety), and DONE (Completion). After passing the self-check, a new session is established and the system enters READY; after loading the event, it enters ARMED, sends the basic stimulus with limited amplitude and rate of change, and enters WAIT_CONFIRM. Once all necessary channels are in an adjustable state and confirmed to be valid, the system enters ACTIVE and repeats the joint sampling and correction rounds. If joint sampling is temporarily unavailable, it enters HOLD within the specified timeframe, provided local feedback is valid, the organization allows it, and the retention period is met; it returns to ACTIVE when the current event is still valid and the joint sampling conditions are restored. The system enters DONE as long as the completion conditions continuously meet the configuration requirements; if there is a next event, the event is reloaded, otherwise the test ends. Round updates and event switching are handled separately.
[0053] WAIT_CONFIRM uses confirmation timeout, ACTIVE uses round wait period for joint sampling, and HOLD uses allowable hold period; each of these should be configured separately. When a real-time task exceeds its runtime budget, experiences a buffer overflow, or exhibits an unexplained jump in time count, the corresponding valid flag should also be revoked. Counter wraparound is handled through extended count or modulo difference; cross-session data is not included in the comparison.
[0054] like Figure 6 As shown, safety inputs are enabled by independent hardware gating; software safety logic freezes events, cancels cross-channel corrections, and initiates new normal commands, leading to safety outputs based on the actuator's pre-configuration. For rope-loaded structures, load locking or mechanical braking should be ensured first, followed by stopping movement, maintaining or gradually reducing tension according to the mechanism's permissible method; for non-load-bearing loaders, unloading can be performed according to the configuration. Protocol shutdown requests are initiated concurrently with local protection; local protection cannot wait for successful communication before implementation.
[0055] like Figure 5 and Figure 6 As shown, the SAFE state remains latched. A delayed protocol success response, an old sample, or a reconnection to the host computer will not automatically release the safety state. After fault clearance and manual reset, recheck the sensor and actuator readiness status, communication, and output configuration; update the session number only after a successful self-test before starting a new event. Record the times of fault occurrence, fault detection, software output disabling, hardware gating feedback, and mechanical stop feedback.
[0056] The platform uses common I / O and protocol services in conjunction with object-specific test tasks for mapping platform interfaces and engineering quantities. Interface descriptions separate logical channels, physical ports, and engineering quantities. When switching test objects, the current event is terminated and corrections are revoked first, wiring, range, direction, and limits are checked, and a new session is established after loading the new description. Channels are not directly replaced within running events. Parameter requests submitted by the HMI and host computer are uniformly applied by the controller at event boundaries; curve plotting and report export do not block control tasks.
[0057] A serial encoder mapping uses station number 2, function code 03, start address 0001H, and nine 16-bit registers of length to write the read results to D100 to D108; the three sets of raw data correspond to D100 to D102, D103 to D105, and D106 to D108, respectively. The converter's data bit depth, single-turn and multi-turn fields, and byte order are configured separately and converted into displacement or rotation angle after bitwise operations. The completion of serial reception only establishes the transmission result of this read transaction; this flag alone cannot be used to determine that all encoders within the converter have been resampled at the same time.
[0058] The original code of the torque input is converted into a floating-point quantity according to formula (19). When using a 4 to 20 mA signal, the module endpoint code, sensor zero-point current, and range endpoint should be clearly defined. For a bidirectional sensor that represents zero torque at 12 mA, the unidirectional setting of 4 mA zero point cannot be used; out-of-range and open-circuit diagnostics are used before closed-loop. (19) In equation (19): The torque is the converted value, in N·m; This is the original code of the current analog quantity; This is the original code corresponding to actual zero torque; This is the original code corresponding to the calibrated endpoint; This is the signed torque relative to zero torque at the calibration endpoint, in N·m. The three original codes use the same encoding scale. This formula is applicable to the confirmed linear interval; for nonlinearity or when the slopes on both sides are different, a separately calibrated piecewise conversion is used, and the conversion range is limited to the calibrated interval.
[0059] The device layer can save the torque engineering quantity and the tare relative torque separately. For example, D258 saves one relative torque, and D328 and D334 save the other two torques. The tare operation is only performed under allowed unloaded or reference states, and the resulting tare value is used as the configuration record for this session; changing the tare value or range will invalidate the original event and the original sample. The above addresses are implementation examples and are not intended as fixed addresses across projects.
[0060] The test design for the delayed speed stabilization mechanism involves a test object consisting of a delayed speed stabilization mechanism with energy storage and deployment processes. The test configuration includes the number of winding rotations, winding speed, deployment speed, interval deployment angle, interval holding time, and torque protection limits. The process is organized into different events: initialization and baseline verification, restricted winding, winding completion check, continuous or interval deployment, termination check, and result recording. Continuous speed testing and low-speed output torque testing are configured separately, and data from different speed conditions are not combined into a single target condition.
[0061] The motion commands and the external encoder use different counting bases and are converted according to Equations (20) and (21) respectively. One configuration of the deceleration end corresponds to 2,000,000 command counts per revolution, and the external incremental encoder corresponds to 5,000 decoded counts per revolution; these values depend on the electronic gear, reduction ratio and decoding method, and cannot be substituted for each other; (20) In equation (20): Count the target commands relative to the reference position; For single-segment incremental command counting; To indicate the command direction polarity, take +1 or −1; This is the command count per revolution at the deceleration end; in this example, it is 2,000,000 counts / revolution. The target number of revolutions in the specified direction, in revolutions; The numerical value of the single-segment unfolding angle in a specified direction, in degrees; This is an operation that truncates an integer to zero. This represents the angle value corresponding to each revolution. Absolute position commands also require adding the defined origin count; before conversion, check the target direction convention to avoid repeated inversion, and check if the result exceeds the signed range of the target register; (twenty one) In equation (21): This is the rotation angle relative to the encoder zero point, in degrees. This is the signed cumulative decoding count after direction, wraparound, and zeroing processing; This is the actual decoding count per revolution; in this example, it is 5000 counts / revolution. This represents the angle value corresponding to each revolution. The decoding count per revolution is positive; it should be determined according to the actual frequency multiplication and decoding settings, and the encoder line count without conversion should not be used directly.
[0062] The interval deployment event first issues a restricted displacement command, then sets confirmation conditions according to the measurement target: When measuring static torque, the current equipment status and independent angle feedback confirm the position, and then the holding sampling window that avoids the switching zone is opened; when measuring dynamic processes, the current action entering the running state is used as the execution status confirmation, the window is opened during the motion phase, and the position is only used as a subsequent completion criterion. Position confirmation should be based on the current equipment status and corresponding feedback records; the current normal process is terminated when the torque exceeds the limit, the execution confirmation times out, or the angle exceeds the limit.
[0063] The rotational speed and rotational angle of the same mechanism correspond to different measurement processes. The rotational speed of the incremental counting method is obtained according to formula (22), which represents an observation interval, while the rotational angle is the cumulative position value. The counting window, integration window and filter output with memory length must record the sampling source time interval covering its observation range, and take into account update waiting, transmission and buffering errors; the report refresh frequency is not used as the basis for the sampling update frequency; (twenty two) In equation (22): The average rotational speed within the observation interval, in r / min; Signed cumulative decoding count at the starting point of observation; The signed cumulative decoding count at the observation endpoint; A positive decoding count per revolution, in units of count / revolution; The starting time of the observation is in seconds (s). The time at the end of the observation period, in seconds; This is the coefficient for converting revolutions per second to revolutions per minute, in seconds per minute. If the counter wraps around, expand the cumulative count first and then subtract. The sampling source time interval must at least cover the entire observation interval and the corresponding time error; if a finite observation range or time boundary cannot be given, it is only for monitoring.
[0064] The time, speed, angle, and torque records of individual mechanisms are used for phase testing and quality inspection. When using common-mode and differential-mode correction, the necessary channel set G is composed of the same controlled physical quantities from multiple similar mechanisms, or the following dual-channel torque and four-way tension implementation methods are used. Different physical quantities are recorded separately and are not directly mixed for cross-channel correction calculation.
[0065] The dual-channel torque and four-path tension control design, in the dual-channel torque implementation, each of the two test transmission chains is equipped with a CANopen drive node, a reduction gear, a torque sensor, and position feedback, which can be node 2 and node 3 respectively. The torque engineering quantities of the third and fourth AI channels form two measurement components in a fixed set G. The two channels can have different target torques and reference ranges; the two path positions or deployment heights are used as stroke limits and completion criteria, and do not participate in the torque error averaging. This structure can be used for torque tracking and deviation constraint in dual-station transmission mechanisms.
[0066] For example, D328 and D334 store two torque paths, and D478 and D476 store the corresponding node's unfolded height. The transmission image can be copied sequentially to the double-word areas starting at D1016, D1018, D1020, and D1022, with additional status fields. Continuously copying multiple double words does not guarantee that the receiving end will read the same version of the record; therefore, the extended record includes the session, event, round, original update sequence number, respective time interval, and record version. During the write process, the version is in an incomplete state; after all fields are completed, a complete version is published. The receiver only receives complete records with identical beginning and end versions. Status bits indicate running or command execution and are not automatically interpreted as mechanical positioning.
[0067] Dual-channel torque regulation allows an external torque feedback controller to generate a limited motion increment or speed setpoint, which is then executed by the drive's internal position or speed loop. The device description clearly specifies whether increasing the setpoint will increase or decrease the torque, ensuring the control direction matches the load response; both basic control and cross-channel corrections are subject to output saturation and rate-of-change limits. For drive modes that do not inherently support torque setting, torque engineering values are not directly written to the position command register; conversion is first performed using the controller's output units and the motion interface units. If the measured object does not allow continuous torque regulation, a phased measurement mode is used, and coupled output is disabled in this mode.
[0068] Each node checks readiness, travel limit, and torque limit separately; if any protection condition is met, the entire wheel assembly is prohibited from modification. The emergency stop software bit can simultaneously trigger stop or disable enable requests for both nodes, but serial or CAN commands are not a substitute for independent hardware safety gating. The load-bearing T-hing or energy storage mechanism should first establish a load-bearing braking or locking state according to safety configuration before canceling motion enable; if locking feedback fails, new motion should remain prohibited and a fault should be reported.
[0069] Dual-channel calculation example: The target torque is 10 N·m, the qualified joint sampling values are 9.2 and 9.8 N·m, and the reference range is 20 N·m. From equations (8) and (9), the normalization errors are 0.04 and 0.01, respectively, the common-mode mean is 0.025, and the differential-mode components are 0.015 and −0.015. When the common-mode gain is 0.4 and the differential-mode gain is 0.2, and the amplitude limit is not reached, the correction amounts are 0.013 and 0.007 from equations (10) and (11). The above values are all calculation conditions, not object tuning values or prototype performance data; if the sampling data delay of any channel exceeds the limit when submitting, neither correction will be published.
[0070] Another design implementation configures a four-channel rope winding and unwinding loading system. Each channel is equipped with a tension sensor, a rope winding motion actuator, and a magnetic powder brake controlled by a driver. The common-mode and differential-mode corrections are calculated after the tension in the four channels is normalized according to the same physical meaning. The polarity of the brake output is configured according to the actual load relationship. The four analog inputs are respectively connected to four tension sensors, and the range, direction, and sampling conditions are configured for each channel; their channel configuration is determined separately from the dual-channel torque implementation.
[0071] For acquisition modules that cannot provide a conversion sequence number, the adaptation task determines whether a new sampling has been completed based on hardware update flags, controlled trigger completion signals, or a confirmed upper bound of the conversion completion time, and updates the sample sequence number upon confirmation. Whether the measured value has changed cannot be used alone as evidence of conversion completion, and repeatedly reading the same cached value will not generate a new sample sequence number. If the update completion status or sampling time range cannot be confirmed, the record is marked as not meeting the joint sampling conditions.
[0072] The time boundary parameters are derived from the conversion and update rules of the modules used, as well as the worst-case time budget for task execution and communication waiting. If necessary, latchable timestamps or equivalent acquisition modules with conversion completion feedback are employed. The maximum value obtained from a single oscilloscope test or the historical report refresh interval cannot be used alone as the worst-case time upper bound; the test is used to check established boundary conditions, and samples exceeding the configured boundaries during operation are invalidated. Serial measurement data that cannot meet the requirements for fast control timing are only used for slower events or independent monitoring.
[0073] Example of two-channel time boundary calculation: The common window is [100, 130] ms, the source intervals are [108, 112] and [110, 114] ms, and the total group span is 6 ms. The time verification conditions are met when the allowed time difference is 8 ms, the submission time is 120 ms, the maximum delay is 20 ms, and the event has not yet ended. When setting up a separate group of rotational speeds with the same dimensions, if one rotational speed record depends on the counting observation interval of [60, 114] ms, then the inclusion condition of the common window is not met, and it cannot be used as a new instantaneous sample; the rotational speed itself is also not mixed with the torque error for averaging.
[0074] The records are divided into original sampling records, verification result records, and submitted control records. Original sampling records include the sampling source time interval, quality flag, and sample sequence number; verification results include confirmation of missing data (NO_CONFIRM), sample missing data (NO_SAMPLE), window non-intersection (EMPTY_WINDOW), source interval span exceeding limit (TIME_SPAN), sampling data delay or event period exceeding limit (EXPIRED), sample reuse (REUSED), and interlock trigger (INTERLOCK); submitted control records include the submission code, actual sending time, and execution status feedback. These records are associated by event identifier and are used to verify the sampling basis and execution results of each round of corrections.
[0075] Reproducible timing design example, Figure 3 Use the following timing example. Figure 3 In the diagram, hollow boxes represent valid sampling windows, and black bars represent sampling time intervals. The milliseconds below are design and algorithm calculation examples, not device measurements. Assume the execution status confirmations for the four channels are at 2, 5, 7, and 4 ms respectively, with a window offset of 3 ms, window durations of 25, 21, 18, and 25 ms respectively, and an event duration of 40 ms. Then the four windows are [5,30], [8,29], [10,28], and [7,32] ms respectively, with a common window of [10,28] ms.
[0076] The four sample source intervals are [15.8, 16.2], [16.0, 16.4], [16.2, 16.6], and [16.1, 16.5] ms, with a total interval span of 0.8 ms. If the allowed time difference is 2 ms, the time condition is met. With a submission time of 20 ms and a maximum delay of 15 ms, the maximum sampling data delay for the entire group is 4.2 ms. If the same interval is submitted with a delay of up to 40 ms, the sampling data delay exceeds the limit, and the entire group is prohibited from being corrected and submitted in that round.
[0077] If the source interval of the third channel is changed to [21.0, 21.4] ms, the sample will still be within its own window and the common window, but the overall span will become 5.6 ms, which is greater than 2 ms. Therefore, it cannot form a joint vector with the other three channels in the same control round. If the fourth channel is missing, it cannot be submitted again after replacing the average of the original four channels with the average of the first three channels.
[0078] In this software simulation verification example, to verify the above algorithm, an independent software model was used to conduct event logic simulation and four-channel dynamic simulation. The following data are all numerical simulation results, not actual test results from the PLC, communication bus, or prototype. The time uncertainty, delay, and object parameters in the model are explicitly given modeling assumptions and were not obtained from equipment identification.
[0079] The event simulation includes 13 scenarios, each repeated 300 times: normal, missing acceptance confirmation, acceptance only without execution, old event, old session, invalid quality, out-of-window sample, source time difference exceeding the limit, time interval too wide, pre-submission latency exceeding the limit, no window overlap, missing required channel, and sample reuse. The seed ranges from 20260910 to 20261209. The confirmation time for each channel is independently and uniformly set between 1 and 7 ms. The window starts 3 ms after confirmation and ends 25 ms after confirmation, meaning the window duration is 22 ms. The baseline sample fluctuates by 0.3 ms around 7 ms after the latest window start, the source interval half-width is 0.2 ms, the allowed time difference is 2 ms, and the latency limit is 15 ms.
[0080] The complete joint decision-making process accepted 300 normal sample groups out of 3900 constructed cases; the remaining cases were rejected. Independent checks were performed based on the model's actual sampling time and event validity; the accepted groups did not violate the model's actual sampling time or event validity conditions. 300 cases with excessively wide time intervals were conservatively rejected even if the actual sampling time met the conditions. This result reflects the decision-making behavior under the constructed cases and is applicable only to the listed fault and time models.
[0081] The four-channel dynamic model adopts the first-order load equation of Equation (23) to represent the object response in normalized real state. The nominal time constants are 0.16, 0.20, 0.25, and 0.30 s, and the nominal gains are 0.94, 1.00, 1.06, and 0.98, respectively; each test is multiplied by uniformly distributed coefficients of 0.9 to 1.1 and 0.97 to 1.03, respectively. The standard deviation of the observation noise is a normalized amount of 0.001; numerical integration is performed according to Equation (24), with an integration step size of 2 ms, a simulation duration of 12 s, local PI updated every 4 ms, and network correction updated every 20 ms; (twenty three) In equation (23): Number the model channels; For continuous model time, in seconds; The i-th channel represents the normalized state of the real object, excluding observation noise; This is for normalized control input; The gain is a dimensionless static input gain. For normalized additive load perturbations of the same scale as the real state; The object's time constant is positive, expressed in seconds (s). The coupling rate between objects is taken as 0.2 s⁻¹ in this model; This is the arithmetic mean of the actual states of all model channels. The mean is calculated for all four channels. The units on both sides are s⁻¹; 0.2 is a model coefficient with reciprocal units of time, not a dimensionless constant. The equations and parameters are simulation assumptions, not the identified prototype model. (twenty four) In equation (24): Number the model channels; This is the numerical integration step number, not the event number; This refers to the number of channels in the model, which is 4 in this case. This represents the normalized true state of the i-th channel; This represents the actual state of channel 1. This represents the actual state of the Nth channel; This is the current normalized control input; For the current normalized load disturbance; The positive numerical integration step size is 0.002s in this case. The state change rate of the i-th channel calculated on the right side of equation (23) is expressed in s⁻¹. Explicit Euler update is used; the ellipsis indicates all states from the 1st to the Nth channel. The observations are obtained by superimposing the aforementioned noise on the actual state, and the error is evaluated using the noise-free actual state. The integration step size is not the actual PLC measurement cycle; The target value changes from 0 to 0.5 at 1 s, to 0.8 at 4 s, linearly decreases from 0.8 to 0.4 from 7 to 9 s, and to 0.6 at 9 s; the third channel applies a normalized additive load perturbation of −0.14 from 5 to 8 s. The local PI uses equations (13) to (16), with a proportional gain of 0.8, an integral gain of 2 s⁻¹, and the differential term off; the feedforward output equals the normalized target value. The common-mode gain is 0.35, the differential-mode gain is 1.2, the correction limit is −0.25 to 0.25, and the output limit is 0 to 1.2. The reference scale for all normalized quantities is 1. The parameters are only used to define the simulation conditions and are not setpoints for all entities; the additional rate of change limit of equation (17) is not enabled in this set of simulations.
[0082] The sampling-to-reception delay of the four-channel telemetry data is [1, 3, 6, 9] integration steps, each superimposed with a uniform integer jitter of 0 to 4 steps. The normal group uses this model; the mixed group additionally transmits a 120 ms old value back from the third channel between 6.0 and 6.4 s, and inserts the same old value with a 3% probability in other rounds. The sampling timestamp of the dynamic model is considered accurate, and historical samples are cached; the joint scheme selects common grid samples no later than the latest available time of each channel, with a delay limit of 30 ms, and rejects samples from across target stages and samples already used. The impact of sampling time uncertainty on the judgment result is verified by the aforementioned event logic simulation.
[0083] Four groups were set up: C0 local PI, C1 local PI with asynchronous telemetry coupling correction, C2 local PI with joint sampling judgment but coupling off, and C3 complete joint sampling and coupling correction. Seeds of 100 to 129 were used for each working condition, and a total of 30 paired runs were performed. The four groups used the same object parameters, disturbances and random inputs. The tracking RMS and synchronization RMS of each run were calculated according to Equations (25) and (26) respectively, and the average of the 30 runs in the table was calculated according to Equation (27). (25) In equation (25): This represents the root mean square error of tracking for each run as a percentage. To evaluate the number of time grid points; This refers to the number of channels in the model, which is 4 in this case. The time grid index is from 1 to M; Channel indices from 1 to N; For the evaluation time, in seconds, the integration grid is taken within the closed interval from 1 to 12 seconds; Let be the normalization target for the i-th channel at this moment; This represents the normalized true state at the same moment, free from observation noise. This is the coefficient used to convert the normalized error ratio into a percentage value. The square root is taken as the non-negative root; in this example, the 0.002 s grid contains 5501 evaluation times. The statistical unit is %, and does not represent the sensor measurement accuracy. (26) In equation (26): This represents the root mean square percentage of the channel range for each run. To evaluate the number of time grid points; For time grid indexing; This refers to the number of channels in the model, which is 4 in this case. Channel indices from 1 to N; The evaluation time is within the closed interval from 1 to 12 seconds; This represents the normalized true state at that moment; To take the maximum and minimum values of all channels at the same time; This is the coefficient for converting to percentage values. It is only used for comparisons where all channels in this paper have the same target and the normalization scale is consistent; if the targets are different, the comparison should be changed to the normalized tracking error of each channel, and the original measurement range should not be referred to as the synchronization error. (27) In equation (27): This represents the inter-operational arithmetic mean of a certain statistical indicator in the table; This represents the number of runs under the same conditions and strategy, which is 30 in this case. For the operation number; The index obtained by formula (25) or formula (26) for the j-th run, or the number of rejection rounds in that run. The unit of the mean is the same as that of the original index for each run; the RMS is calculated for each run first and then the mean is calculated, instead of mixing all the data from 30 runs and then calculating one RMS.
[0084] Table 2 Comparison of four-channel dynamic simulation results for different control strategies ; Table 2 compares the four-channel dynamic simulation results for different control strategies. Under the above models and parameters, C3 reduces the root mean square error of tracking and synchronization compared to C0; the two errors of C1 are still lower than those of C3. Joint sampling eliminates data with excessive time delay and data that do not meet the joint sampling conditions, but increases the number of rejection rounds and waiting time. The tracking results of C2 and C0 are the same, indicating that simply adding time verification in this model does not improve the performance of local PI control.
[0085] In mixed operation, the 95th percentile of the source span for candidate telemetry group C1 had a mean of 111.507 ms over 30 runs. Each time, the span was first sorted, and the 95th percentile was calculated using linear interpolation of adjacent statistics. The arithmetic mean of the 30 results was then taken; the nearest rank definition with rounding up was not used. The accepted group C3 had a span of 0 in the common grid model; this value does not represent zero hardware synchronization error. C3 rejected an average of 43.80 candidate rounds per run, for a total of 599 evaluation rounds.
[0086] Additionally, 1500 state logic simulations were performed using a 4 ms abstract control task cycle to simulate communication timeout, sampling timeout, quality anomalies, interlocking, and emergency stop inputs. This confirmed that late records from old sessions cannot be resubmitted after entering SAFE mode. Communication and sampling timeouts were configured to be 50 ms and 20 ms, respectively. The simulation only provided model times when the software prohibited submission, and did not simulate safety relay actions, analog discharge, magnetic powder brake setup time, or mechanical stopping distance.
[0087] The above results are used to illustrate the decision behavior and dynamic response under given model parameters. The control gain, upper bound of sampling time error, task cycle, and range of the specific device are configured according to the actual hardware and load, and verified through parameter identification, timing measurement, and deployment testing.
Claims
1. A multi-protocol closed-loop detection device based on effective event sampling, comprising a real-time controller, interfaces for at least two industrial communication protocols, and a data acquisition and output unit connecting sensors and load or motion actuators, characterized in that: Under a unified time base, the real-time controller associates instructions, acceptance confirmations, execution status confirmations, and sampling records with event identifiers, and fixes a necessary set of at least two channels within an event; it establishes channel sampling windows according to the execution status confirmation time and window parameters and takes the intersection; A joint sampling vector is formed only when all necessary channels are confirmed to be valid and have valid samples not used in this event, the source time intervals are all within the intersection, and the span of the entire group interval and the sampling data delay are not exceeded. The common mode mean and differential mode components of the normalized tracking error of the same physical quantity are calculated from this vector to generate a correction vector. Before submission, the validity of the event and the sampling data delay are reviewed. If they pass, the entire group output cache is updated with the same submission identifier. If no vector is obtained or the verification fails, the entire set of corrections cannot be submitted. If a timeout or security failure occurs, the system will switch to the preset safe output state.
2. The multi-protocol closed-loop detection device based on effective event sampling according to claim 1, characterized in that, The device also includes a host computer; the host computer generates test events based on the device description table and test template. The device description table includes protocol address, data format, physical quantity type, engineering quantity conversion factor, output polarity, acceptance confirmation condition, execution status confirmation condition, sampling source time interval determination method, upper limit of time uncertainty, window offset, window duration, upper limit of sampling data delay, and safety output configuration. The set of required channels remains unchanged within the current event. When a required channel fails, a valid joint sampling vector for the event cannot be constructed by deleting that channel. The acceptance confirmation indicates that the instruction has been received by the protocol interface or device and processed according to the protocol. The execution status confirmation indicates that the controlled device has entered a state consistent with the current action. Execution status confirmation is based on device status words, status readbacks that confirm the current event, digital input feedback, or output update feedback. For interfaces that do not provide instruction-by-instruction responses, confirmation is formed by output update records and independent device feedback. Successful transmission or link confirmation is not used as separate device execution status confirmation. In events that require closed-loop adjustment to reach the target value, entering the adjustable state is used as execution status confirmation, and reaching the target value is used as a condition for the completion of subsequent events.
3. The multi-protocol closed-loop detection device based on effective event sampling according to claim 2, characterized in that, The protocol interface includes a Modbus RTU interface; for protocols that do not carry event identifiers, a controller-side request association record is used, and each serial bus maintains only one incomplete request; when a request times out, the original request and its event association are invalidated, and late response isolation is performed based on the upper limit of the device response time before resuming a new request; when a response cannot be uniquely associated with the current request, it is marked as invalid, and it is not considered as confirmation of the current event based on the same response content.
4. The multi-protocol closed-loop detection device based on effective event sampling according to claim 1, characterized in that, The real-time controller also stores a device description table; the sampling source time interval is determined as follows: when the hardware provides a sampling timestamp mapped to the unified time base, the lower endpoint of the interval is the timestamp minus the upper bound of the sampling time error, and the upper endpoint of the interval is the timestamp plus the upper bound of the sampling time error. The upper bound of the sampling time error covers conversion, clock mapping, and drift errors; when the acquisition module only provides update values, the lower endpoint of the interval is the time when the controller receives the complete sampling record minus the upper bound of the total delay, and the upper endpoint of the interval is the receiving time. The upper bound of the total delay covers conversion, update waiting, transmission, and buffering delays; the upper bound of the sampling time error and the upper bound of the total delay are determined based on the conversion and update rules of the module used and the worst-case time budget for task execution and communication waiting; if the required upper bound cannot be determined based on the above parameters, or if the corresponding time is exceeded during operation. At the boundary, the sampling record is not included in the joint sampling vector; the sampling data delay is calculated based on the difference between the earliest endpoint of the interval between the current verification time and the sampling source time, and is recalculated according to the actual submission verification time before output submission; when selecting samples from the cache, sample combinations that satisfy the common effective sampling window and allowable sampling time difference are selected without using future samples; the device description table stores the measurement value type and corresponding observation time range. For measurement values obtained through counting window, integral window, or filtering processing, the sampling source time interval covers the observation time range on which the measurement value is formed; if the observation time range cannot be completely contained by the common effective sampling window or if the total span of the entire group interval exceeds the limit, the measurement value is not used in the current joint sampling vector; repeatedly reading values that have not completed a new transformation or observation update does not increase the sample number.
5. The multi-protocol closed-loop detection device based on effective event sampling according to claim 1, characterized in that, The real-time controller also includes an output submission unit. The output submission unit uses an output cache containing event identifiers, control rounds, and submission codes to complete the publication of the entire cache within the same control task. Local outputs are written through the controller update mechanism, and protocol outputs are sent through the interface queue, with the actual sending and execution status confirmation times recorded respectively. If all necessary channels do not receive valid feedback within the preset output effective time deviation range, the normal completion flag for that round is revoked and the system enters a hold or safety state.
6. The multi-protocol closed-loop detection device based on effective event sampling according to claim 1, characterized in that, The normalized tracking error is obtained by dividing the difference between the target value and the sampled value by a positive reference range for the i-th channel. The common mode mean is the average value of the normalized tracking errors in the same set of necessary channels. The differential mode component is the normalized tracking error of the i-th channel minus the common mode mean. The product of the common-mode gain and the common-mode mean, and the product of the differential-mode gain and the differential-mode component are added together and limited to form a correction value. The correction value is synthesized with the local PID control value and applied to the actuator after the output polarity and range are changed. When a correction submission is invalid, the cross-channel correction is revoked. Local control only operates within the validity period of local feedback and the preset retention period. When the output is saturated, the integral is limited to continue accumulating in the direction of saturation.
7. The multi-protocol closed-loop detection device based on effective event sampling according to claim 1, characterized in that, The device also includes a hardware safety gating loop and a safety state latching unit that are independent of the host computer communication. The hardware safety gating loop restricts the actuator's movement enable based on emergency stop or interlocking signals. The real-time controller prohibits new normal excitation and correction submissions in software safety mode, switches analog, digital and pulse outputs according to the mechanism's load requirements and issues a protocol shutdown request. A new session code is established only after fault clearing, manual reset and re-self-test pass. The confirmation and sampling records of the old session cannot be restored to normal output.
8. The multi-protocol closed-loop detection device based on effective event sampling according to claim 6, characterized in that, The required channel set adopts one of the following two configurations: The first configuration consists of two torque detection channels, each equipped with a torque sensor and a CANopen motion drive node. The torque measurement value is converted into a joint sampling vector through engineering calculation. The displacement or rotation angle provided by the encoder is used as a travel limit or event completion judgment. When any required channel exceeds the limit or fails, the correction submission of the two channels of that wheel is prohibited. The second configuration consists of four take-up and release loading channels. Each channel is equipped with a tension sensor, a rope winding motion actuator, and a magnetic powder brake. The motion actuator is controlled through a port with high-speed pulse output capability or a motion protocol interface. The magnetic powder brake is controlled through analog output or its driver interface. The four tension channels form a joint sampling vector. In both configurations, only the same measured physical quantity within the group is used in the calculation of normalized tracking error, common mode mean, and differential mode component. Other different physical quantities are used as independent monitoring quantities or separate control groups with the same dimensions.
9. A multi-protocol closed-loop detection method based on effective event sampling, used for closed-loop detection of multiple loading actuators or motion actuators, characterized in that, include: Under the unified time base of the real-time controller, a set of necessary channels with event identifiers, fixed and at least two channels, and a validity period are established for test events. Control commands, acceptance confirmations, and execution status confirmations of different protocols are associated with the event identifiers. Effective sampling windows for each necessary channel are established based on the execution status confirmation time and window parameters, and their intersection is used as a common effective sampling window. Sampling records with event identifiers, sampling source time intervals, sample numbers, and quality indicators are collected. A joint sampling vector is formed only when all necessary channels are confirmed to be valid, the samples are complete and not used in previous control rounds, all time intervals are within the common effective sampling window, the total interval span is not greater than the allowable sampling time difference, and the sampling data delay does not exceed the limit value. The common-mode mean and differential-mode components of the normalized tracking error of the same measured physical quantity are calculated using the joint sampling vector to generate candidate correction vectors. Before output, the validity status of the event and the sampling data delay are checked again. If they pass, the entire group is updated with the same submission identifier. If they fail, the correction submission for that round is prohibited. When the waiting period expires or a safety fault occurs, the system switches to the preset safety output state and saves the confirmation, sampling, and output records corresponding to the event identifier.
10. A multi-protocol closed-loop detection method based on effective event sampling according to claim 9, characterized in that, Set the starting point of the effective sampling window of the channel to the sum of the execution status confirmation time and the window offset, and set the ending point to the sum of the starting point and the window duration, subject to the validity period of the event; record the reasons for the following: the common effective sampling window is empty, the uncertainty of the sampling source time interval is too large, the necessary channels are missing, the sample quality is invalid, and the sampling data delay exceeds the limit when the sample is reused or submitted, and do not convert any of these states to test qualified; keep the set of necessary channels unchanged within the current event; The local feedback control cycle is scheduled separately from the joint sampling and correction control cycles. After issuing the basic excitation that meets the amplitude and rate of change limits, the sampling cycle begins when the equipment enters the adjustable state. After the qualified joint sampling vector is generated, the cross-channel correction is updated. The next event begins after the current event meets the set completion conditions. After entering a safe state, old session records are invalidated. After the fault is cleared and manually reset, a self-test is performed again and a new session is established.
Citation Information
Patent Citations
Force loading monitoring control system based on Labview
CN107765626A
Assembled printed circuit board detection device based on LabVIEW and detection method of assembled printed circuit board detection device
CN113687214A
Servo driving system state monitoring method and system based on multi-sensor fusion
CN120012002A
Multi-channel AC-DC module power supply automatic test system based on LabVIEW
CN121741560A
