A multi-channel relay interlocking method
By injecting high-frequency detection signals into the multi-channel relay control system, magnetic field and ripple data are collected in real time to determine whether the contacts are completely open. This solves the short-circuit risk caused by inconsistent mechanical action delays and improves the system's reliability and safety.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SHANGHAI YIDING INTELLIGENT TECH CO LTD
- Filing Date
- 2026-03-20
- Publication Date
- 2026-06-09
Smart Images

Figure CN122177689A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of relay control technology, and more specifically to a method for interlocking multiple relays. Background Technology
[0002] In multi-channel relay control systems, interlocking is a key safety technology used to ensure logical mutual exclusion between multiple outputs and prevent power short circuits or equipment conflicts. It is widely used in industrial motor forward and reverse rotation control, automated production lines, smart grid power distribution, and home appliances. Traditional relay interlocking methods mainly rely on two implementation approaches: hardware circuit interlocking and software logic interlocking.
[0003] This invention addresses the technical problem in existing relay interlocking methods that rely solely on preset dead time for open-loop control due to the inability to perceive the actual physical state of the contacts in real time. This makes it difficult to eliminate the risk of simultaneous conduction of two circuits caused by inconsistent mechanical action delays of the relays during commutation. By injecting a high-frequency detection signal into the current conducting circuit and simultaneously acquiring magnetic field changes and high-frequency ripple data, the invention extracts the residual magnetism attenuation gradient characteristic value and the arc characteristic frequency energy characteristic value as the basis for determining whether the contacts are completely disconnected. This achieves a leap from logic interlocking to physical state interlocking, avoiding the occurrence of phase-to-phase short circuit faults in the power supply. Summary of the Invention
[0004] The purpose of this invention is to provide a multi-channel relay interlocking method to solve the problems mentioned above.
[0005] The objective of this invention can be achieved through the following technical solutions: A method for interlocking multiple relays includes the following steps: S1: Receive external switching commands, perform logical interlocking judgment based on the current conduction status of each relay, and generate a physical status confirmation trigger signal if there is a switching requirement. S2: In response to the physical state confirmation trigger signal, a high-frequency detection signal is injected into the relay circuit in the current conduction state, and the magnetic field change data of the relay contact area and the high-frequency ripple data of the power supply circuit are collected simultaneously. S3: Perform trend analysis on magnetic field change data to obtain residual magnetism attenuation gradient characteristic value, perform frequency component analysis on high frequency ripple data to obtain arc characteristic frequency point energy characteristic value, compare the residual magnetism attenuation gradient characteristic value and arc characteristic frequency point energy characteristic value with the threshold in the preset contact disconnection characteristic database, and determine whether the physical contact of the current relay has been completely disconnected based on the comparison result. S4: When it is determined that the physical contact has been completely disconnected, release the interlock block on other relays and output a drive command that allows another relay to be turned on; S5: After outputting the drive command, record and feed back the contact disconnection time and disconnection quality data during this switching process.
[0006] As a further aspect of the present invention: S1 specifically includes: The received external commutation command is pulse width discriminated to filter out interference pulses smaller than the preset width, thus obtaining a valid commutation command; Read the on-state codes of each relay and compare the valid commutation command with the on-state codes to confirm whether there is a commutation requirement that needs to switch the on / off path. When a commutation requirement is confirmed, a physical state confirmation trigger signal carrying a timestamp is generated based on the phase characteristics of the valid commutation command.
[0007] As a further aspect of the present invention: S2 specifically includes: Based on the timestamp carried by the trigger signal to confirm the physical state, select a time window during the contact action interval, and inject a high-frequency detection signal composed of multiple different frequency components into the relay circuit in the current conduction state within the time window; While injecting a high-frequency detection signal, the magnetic field sensing unit arranged around the relay contacts is activated to continuously collect the magnetic field distortion waveform caused by the movement of the armature during the contact opening and closing process. Synchronously, a high-frequency sampling front-end coupled to the power supply circuit is used to capture the ripple current variation curve in the same frequency band as the high-frequency detection signal. The magnetic field distortion waveform and the ripple current variation curve are aligned and packaged according to a unified time reference to form the original dataset to be analyzed.
[0008] As a further aspect of the present invention: the process for obtaining the remanence decay gradient characteristic value is as follows: Extract the magnetic field distortion waveform from the original dataset and locate the magnetic field abrupt change inflection point that occurs at the moment the contacts completely separate in the magnetic field distortion waveform; Starting from the inflection point of magnetic field abrupt change, extract a segment of the magnetic field decay curve within a preset time period thereafter. A point-by-point difference operation is performed on the magnetic field decay curve segment to obtain the instantaneous decay rate of the magnetic field strength as a function of time, and the peak value in the instantaneous decay rate sequence is marked as the characteristic value of the remanent decay gradient.
[0009] As a further aspect of the present invention: the process for obtaining the energy characteristic values of the arc characteristic frequency points is as follows: The ripple current variation curve is extracted from the original dataset. A digital bandpass filter is applied to the ripple current variation curve to retain the frequency band components corresponding to the frequency components in the high-frequency detection signal. Perform time-frequency energy integration on the filtered curve to calculate the power contribution value of the signal amplitude accumulated over time within the frequency band; The power contribution value is compared with the preset arc combustion feature template for waveform similarity, and the instantaneous energy amplitude corresponding to the moment with the highest similarity is extracted as the energy feature value of the arc feature frequency point.
[0010] As a further aspect of the present invention: the determination of whether the physical contacts of the current relay have been completely disconnected specifically includes: Simultaneously, obtain the characteristic values of the remanence attenuation gradient and the energy characteristic values of the arc characteristic frequency points obtained from the current calculation; The residual magnetism attenuation gradient characteristic value is compared with the minimum disconnection residual magnetism gradient threshold stored in the database, and the arc characteristic frequency energy characteristic value is compared with the maximum allowable arc energy threshold stored in the database. When the residual magnetism attenuation gradient characteristic value is greater than the minimum disconnection residual magnetism gradient threshold and the arc characteristic frequency energy characteristic value is less than the maximum allowable arc energy threshold, an output confirmation signal indicating that the physical contact has been completely disconnected is output.
[0011] As a further aspect of the present invention: S4 specifically includes: Upon receiving a confirmation signal indicating that the physical contacts have been completely disconnected, the interlock release logic is triggered based on the confirmation signal to cut off the hardware-level interlock blocking path of the currently conducting relay to other relays. Read the electromagnetic coil characteristic parameters of the other relay that is currently allowed to be turned on, and generate a drive waveform with the leading edge of the pre-excitation pulse based on the electromagnetic coil characteristic parameters; The driving waveform is applied to the driving terminal of another relay, and the rising rate of its coil current is monitored in real time during the application process. When the current rising rate reaches the preset pull-in threshold, the driving waveform is switched to the continuous pull-in sustaining level to complete the output of the driving command.
[0012] As a further aspect of the present invention: the generation of a driving waveform with a leading edge of a pre-excitation pulse based on the characteristic parameters of the electromagnetic coil specifically includes: A low-amplitude probe pulse is applied to the electromagnetic coil of another relay to measure the inductance and equivalent resistance of the electromagnetic coil, which are used as characteristic parameters of the electromagnetic coil. Based on the inductance and equivalent resistance, calculate the electromagnetic energy accumulation time required for the electromagnetic coil to start operating from the applied voltage to the contact, and set the pulse width and pulse amplitude of the pre-excitation pulse leading edge according to the time. The preset pulse width and pulse amplitude parameters are applied to the beginning segment of the drive waveform to form a pre-excitation pulse waveform with a steep leading edge and an amplitude higher than the sustain level, while the subsequent part of the waveform remains at a smooth sustain level.
[0013] The beneficial effects of this invention are: (1) By introducing a dual physical state detection mechanism based on magnetic field changes and high-frequency ripple, a leap from traditional logic interlocking to physical state interlocking is achieved. During the commutation process, this invention no longer relies on a preset fixed dead time, but instead collects the residual magnetic decay gradient characteristic value and the arc characteristic frequency energy characteristic value at the instant the contact is disconnected in real time, compares them with a preset threshold, and accurately determines whether the physical contact is truly completely disconnected. Only when it is confirmed that the contact has completely separated is the interlocking blockade of other relays released, thereby fundamentally avoiding the risk of two circuits being simultaneously turned on due to inconsistent mechanical action delays of the relays, effectively preventing phase-to-phase short circuits and contactor burnout, and significantly improving the reliability and safety of industrial motor control.
[0014] (2) By reading the characteristic parameters of the electromagnetic coil of the relay to be activated and generating an adaptive drive waveform with a leading edge of the pre-excitation magnetic pulse, fine control of the relay's activation process is achieved. Based on the measured inductance and equivalent resistance, this invention calculates the electromagnetic energy accumulation time and sets the width and amplitude of the pre-excitation magnetic pulse accordingly, ensuring precise matching between the drive waveform and the coil's individual electrical characteristics. Simultaneously, the coil current rise rate is monitored in real time during the drive process, and automatically switches to a low-power sustaining level when the activation threshold is reached. This reduces coil power consumption and temperature rise, and also reduces mechanical impact during contact activation, effectively extending the relay's electrical life and improving the overall efficiency of the multi-channel relay system. Attached Figure Description
[0015] The invention will now be further described with reference to the accompanying drawings.
[0016] Figure 1 This is a flowchart of a multi-channel relay interlocking method according to the present invention; Figure 2 This is a flowchart illustrating the process of obtaining the remanent magnetization attenuation gradient characteristic value in this invention. Figure 3 This is a flowchart illustrating the process of obtaining the energy characteristic values of the characteristic frequency points of the electric arc in this invention. Detailed Implementation
[0017] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0018] Please see Figure 1 As shown, the present invention is a method for interlocking multiple relays, comprising the following steps: S1: Receive external switching commands, perform logical interlocking judgment based on the current conduction status of each relay, and generate a physical status confirmation trigger signal if there is a switching requirement. S2: In response to the physical state confirmation trigger signal, a high-frequency detection signal is injected into the relay circuit in the current conduction state, and the magnetic field change data of the relay contact area and the high-frequency ripple data of the power supply circuit are collected simultaneously. S3: Perform trend analysis on magnetic field change data to obtain residual magnetism attenuation gradient characteristic value, perform frequency component analysis on high frequency ripple data to obtain arc characteristic frequency point energy characteristic value, compare the residual magnetism attenuation gradient characteristic value and arc characteristic frequency point energy characteristic value with the threshold in the preset contact disconnection characteristic database, and determine whether the physical contact of the current relay has been completely disconnected based on the comparison result. S4: When it is determined that the physical contact has been completely disconnected, release the interlock block on other relays and output a drive command that allows another relay to be turned on; S5: After outputting the drive command, record and feed back the contact disconnection time and disconnection quality data during this switching process.
[0019] In S1, an external switching command is received, and a logic interlocking judgment is performed based on the current conduction state of each relay. If a switching requirement exists, a physical state confirmation trigger signal is generated, specifically including: First, the microcontroller receives the external commutation command signal via its input capture port. This signal is in the form of level transitions, such as a DC level signal from a button, host computer, or PLC. Due to electromagnetic interference in industrial environments, this signal may contain superimposed spikes. To eliminate this interference, a timer is set inside the microcontroller. When the rising or falling edge of the command signal is detected, the timer starts counting. Simultaneously, a pulse width threshold pre-stored in non-volatile memory is read. This threshold is set according to the intensity of the interference in the environment, with a value between 5 and 20 milliseconds, for example, set to 10 milliseconds. When the duration of the command signal (i.e., the holding time of the high or low level) is greater than or equal to 10 milliseconds, the command is determined to be a valid command and latched into the buffer register; if the duration is less than 10 milliseconds, it is determined to be an interference pulse and discarded without further processing. The output of this step is a filtered, stable, and reliable valid commutation command.
[0020] The on / off status of each relay is read from the microcontroller's output register. This status is stored in binary code. For example, assuming there are four relays, if the first relay is on, the status code is 0001; if the second relay is on, it is 0010. This code is then compared with a valid commutation instruction using a mutual exclusion check. The specific method for this mutual exclusion check is as follows: the valid commutation instruction is parsed into the code of the target on / off path (e.g., if the instruction requests a switch to the second relay, the target code is 0010), and then the current status code and the target code are logically XORed. In the binary result, if only one bit is 1, it indicates a unique and valid commutation request; if multiple bits are 1 or all bits are 0, it indicates the instruction is invalid or no commutation is needed. For example, the XOR of the current code 0001 with the target code 0010 results in 0011, but this result contains two 1s, which does not meet the requirements and requires further evaluation. The correct logic should be to determine whether the target code is the same as the current code. If they are the same, there is no requirement; if they are different, the validity of the target code should be further checked (i.e., whether only one path is 1). When it is confirmed that there is a need to switch the on / off path, a trigger flag is generated, which becomes the input condition for subsequent steps.
[0021] After confirming the existence of a commutation requirement, the phase characteristics of the valid commutation command are further extracted. Here, phase characteristics refer to the precise arrival time of the rising or falling edge of the command signal. When the current command edge triggers, the microcontroller's internal timer module records the current count value, which serves as the timestamp. This timestamp is then bound to the obtained valid commutation command and the obtained commutation requirement flag, and packaged together into a single data structure: the physical state confirmation trigger signal. This signal is then sent to the subsequent data acquisition and processing flow. The purpose of this timestamp is to provide a unified time reference for subsequent steps, ensuring strict alignment between the magnetic field change data and the high-frequency ripple data, facilitating correlation analysis.
[0022] In S2, in response to the physical state confirmation trigger signal, a high-frequency detection signal is injected into the relay circuit in the current conduction state, and the magnetic field change data of the relay contact area and the high-frequency ripple data of the power supply circuit are collected simultaneously. First, the timestamp carried in the physical state confirmation trigger signal is analyzed. This timestamp records the precise moment when the edge of the external commutation command arrives. Based on this moment, a time interval is calculated forward or backward. This interval corresponds to the intermittent period when the relay contacts in the current conducting state are stably engaged and have not yet begun to disconnect. For example, through pre-test statistics, the inherent delay time range from receiving the disconnect command to the contact starting to operate is determined; this range is 2 to 5 milliseconds. Starting from the moment corresponding to the timestamp, a 1-millisecond delay is added to avoid electrical interference at the moment the command is received. Then, a 3-millisecond time window is extracted as the contact operation intermittent period. Within this time window, a high-frequency detection signal composed of multiple different frequency components is injected into the relay circuit in the current conducting state. This high-frequency detection signal is generated by a programmable waveform generator inside the microcontroller, with its frequency components selected as 50 kHz, 100 kHz, and 200 kHz. These three frequencies are all higher than the power frequency and mechanical resonant frequency of the relay coil, and will not affect the normal operation of the relay. The amplitude of each frequency component is set to 5% of the coil's rated voltage to ensure that the signal is weak and does not interfere with the relay maintaining its energized state. This composite high-frequency signal is coupled to the power supply terminal of the relay coil through a DC blocking capacitor, thereby superimposing it on the original DC drive level.
[0023] Secondly, simultaneously with the injection of the high-frequency detection signal, the magnetic field sensing unit arranged around the relay contacts is activated. This magnetic field sensing unit uses three mutually orthogonal miniature coils as magnetic field sensors to detect the magnetic field strength components in the three-dimensional space of the contact area. These three sensors are attached to the surface of the relay housing, located approximately 2 millimeters directly above the contacts. When the relay armature moves, causing the contacts to open, the change in the contact gap distorts the surrounding magnetic field. The magnetic field sensing unit continuously acquires the instantaneous values of the magnetic field strength in three directions at a sampling rate of 1 trillion times per second, converting these analog quantities into digital quantities to form waveform data reflecting the change of the magnetic field over time. The acquisition duration is 10 milliseconds, covering the entire process from the start of contact action to complete stable disconnection.
[0024] Simultaneously, a high-frequency ripple current signal is extracted from the power supply circuit via a capacitively coupled high-frequency sampling front-end. This front-end includes a current transformer connected in series in the power supply circuit, with a transformation ratio of 1000:1, capable of converting the high-frequency current component in the circuit into a voltage signal. This voltage signal is processed by a bandpass filter with a passband set to 40 kHz to 250 kHz to retain components in the same frequency band as the injected high-frequency detection signal. The filtered signal is digitized by an analog-to-digital converter at the same sampling rate (1 megahertz per second) as the magnetic field sensing unit, thereby obtaining a ripple current variation curve. This curve reflects the transmission and attenuation of the high-frequency detection signal in the relay circuit, especially when the contacts open and generate an arc, the arc impedance modulates the amplitude and phase of the high-frequency signal, thus leaving characteristic changes on the ripple current curve.
[0025] Finally, the three magnetic field distortion waveforms acquired by the magnetic field sensing unit and the ripple current change curve captured by the high-frequency sampling front-end are aligned and packaged according to a unified time reference. Specifically, at the start of the high-frequency detection signal injection, the microcontroller simultaneously sends a hardware synchronization pulse to both the magnetic field sensing unit and the high-frequency sampling front-end; this pulse serves as the starting trigger signal for sampling. All acquisition channels use this pulse as the reference zero point for timing, ensuring that each sampling point is accompanied by the same timestamp. After acquisition, the microcontroller arranges the three magnetic field data and one ripple current data in chronological order and merges them into a single data file, which is the original dataset to be analyzed. This dataset contains both mechanical motion information (magnetic field changes) and electrical transient information (high-frequency ripple), providing a foundation for subsequent feature extraction.
[0026] In S3, trend analysis is performed on the magnetic field change data to obtain the remanent magnetization attenuation gradient characteristic value, and frequency component analysis is performed on the high-frequency ripple data to obtain the arc characteristic frequency energy characteristic value. The remanent magnetization attenuation gradient characteristic value and the arc characteristic frequency energy characteristic value are compared with the threshold in the preset contact disconnection characteristic database, and the comparison result is used to determine whether the physical contacts of the current relay have been completely disconnected. Specifically, this includes: Please see Figure 2 As shown, step S301: Extract the magnetic field distortion waveform from the original dataset and locate the magnetic field abrupt change inflection point generated at the moment when the contacts are completely separated in the magnetic field distortion waveform.
[0027] Specifically, firstly, magnetic field distortion waveform data is read from the raw dataset to be analyzed output in step S2. This waveform data consists of magnetic field strength sampling points in three orthogonal directions (X-axis, Y-axis, and Z-axis). Each sampling point contains a timestamp and a corresponding magnetic field strength value in millitalas. To simplify processing, the magnetic field strength vectors in the three directions are vector-synthesized into a scalar magnetic field strength. The synthesis method is to take the square root of the sum of the squares of the three directional components. This calculation process is completed point by point by the arithmetic logic unit built into the microcontroller, thereby obtaining a curve showing the change of the synthesized magnetic field strength over time. Then, a first-order difference operation is performed on the synthesized curve, that is, the difference in magnetic field strength between two adjacent sampling points is calculated and divided by the sampling time interval (1 microsecond) to obtain the rate of change curve of magnetic field strength. At the instant when the relay contacts are completely separated, due to the cessation of armature movement and the sudden increase in contact gap, the magnetic field strength will exhibit a sharp turning point, which is represented as a local extremum on the rate of change curve. By searching for the maximum value (positive jump) or minimum value (negative jump) on the rate of change curve and tracing back to the time position corresponding to the extreme point, the inflection point of the magnetic field change on the synthetic magnetic field intensity curve can be located. The time corresponding to this inflection point is marked as the time T0 when the contacts are completely separated.
[0028] Step S302: Starting from the inflection point of magnetic field abrupt change, extract a segment of the magnetic field attenuation curve within a preset time period.
[0029] After locating the inflection point T0 of the magnetic field abrupt change, a fixed time window length is set. This length is determined based on the typical duration of residual magnetism decay after the relay contacts open, for example, 2 milliseconds. Starting from T0, the synthetic magnetic field strength data within a 2-millisecond timeframe is extracted to form a segment of the magnetic field decay curve. This segment includes the entire process of the magnetic field strength gradually decaying to a stable value after the contacts separate. During extraction, the integrity of the data points must be ensured. If the data length after T0 in the original dataset is less than 2 milliseconds, the analysis is abandoned and a data acquisition anomaly is reported.
[0030] Step S303: Perform point-by-point difference operation on the magnetic field decay curve segment to obtain the instantaneous decay rate of the magnetic field strength changing with time, and mark the peak value in the instantaneous decay rate sequence as the characteristic value of the remanent magnetization decay gradient.
[0031] The magnetic field decay curve segment obtained in step S302 is subjected to point-by-point difference calculation again to calculate the instantaneous decay rate. Assume the decay curve segment contains... There are 1 sampling point, and each sampling point corresponds to a time. and magnetic field strength ,in From 1 to ,and Corresponding to time T0. The time interval between two adjacent points. Fixed at 1 microsecond. Then the first... Instantaneous decay rate at each sampling point Calculated using the following formula: ;in, and The first The and the first The magnetic field strength values at each sampling point The sampling time interval is 1 microsecond, and the calculation result is... The unit is millitalas per second. This formula represents the change in magnetic field strength per unit time, reflecting the rate of remanence decay. Since the magnetic field strength continuously decreases during decay, therefore... It is a negative value, but its absolute value represents the decay rate. Calculate the decay rate between all adjacent points. This yields an instantaneous decay rate sequence. , ,..., In this sequence, the magnetic field changes most drastically at the moment of contact separation, and then gradually levels off, resulting in a peak with the largest absolute value (i.e., the most negative value). The absolute value of this peak is taken as the characteristic value of the remanent magnetization decay gradient, denoted as Grad_mag. This characteristic value quantifies the rate at which the remanent magnetization disappears after the contact breaks; the more decisively the contact breaks, the larger this value.
[0032] Please see Figure 3 As shown, step S304: Extract the ripple current variation curve from the original dataset, apply digital bandpass filtering to the ripple current variation curve, and retain the frequency band components corresponding to the frequency components in the high-frequency detection signal.
[0033] Simultaneously, the ripple current variation curve captured by the high-frequency sampling front-end is extracted from the original dataset. This curve records the instantaneous amplitude of the high-frequency current in the power supply circuit, with a sampling rate of 1 MHz, and the time axis is strictly aligned with the magnetic field data. This curve contains three injected high-frequency components (50 kHz, 100 kHz, and 200 kHz) as well as broadband noise that may be generated by the electric arc. To extract features related to the contact state, the ripple current curve is first digitally bandpass filtered. Specifically, a set of finite-length unit impulse response filter coefficients is preset in the microcontroller, corresponding to the three center frequencies (50 kHz, 100 kHz, and 200 kHz), with each filter's passband bandwidth set to ±5 kHz. The original ripple current data is passed through these three filters to obtain three sets of filtered curves, each retaining only the signal component at the corresponding frequency. This step aims to remove low-frequency interference and irrelevant noise, highlighting the component changes within the same frequency band as the detected signal.
[0034] Step S305: Perform time-frequency energy integration on the filtered curve to calculate the power contribution value of the signal amplitude accumulated over time within the frequency band.
[0035] For each set of filtered curves, the instantaneous energy contribution near each time point is calculated. Since the signal consists of discrete sampling points, a short-time energy integration method is used. A sliding time window is set, with a window width of 0.2 milliseconds (i.e., 200 sampling points) and a window sliding step size of 1 sampling point. For each window position, the sum of the squares of the amplitudes of all sampling points within the window is calculated, and then divided by the number of sampling points within the window to obtain the average power at the center of the window. This average power reflects the energy intensity of the signal in that frequency band near that time point. Taking a 50 kHz filtered curve as an example, let the first... The amplitude of each sampling point is Window width is Then the window center time Corresponding power contribution value Calculated using the following cumulative method: ; This formula represents the average of the summations of the squared amplitudes of 200 sampling points within the window, expressed in amperes squared. Applying the above sliding energy integral to the filter curves of the three frequency bands yields three curves showing the power contribution value changing over time, denoted as P50(t), P100(t), and P200(t). These curves reflect the dynamic evolution of signal energy in different frequency bands during the contact disconnection process.
[0036] Step S306: Compare the power contribution value with the preset arc combustion feature template for waveform similarity, and extract the instantaneous energy amplitude corresponding to the moment with the highest similarity as the energy feature value of the arc feature frequency point.
[0037] An arc combustion characteristic template library is pre-constructed. The construction method is as follows: In a laboratory environment, using relays of the same model, a typical contact disconnection arc is artificially created. Power contribution curves for multiple frequency bands are collected and calculated using the methods described in steps S304 and S305. These curves are stored as standard templates in non-volatile memory. Each template corresponds to a frequency band, and the template data is a continuous sequence of power contribution values with a length of 1 millisecond (i.e., 1000 points), recording the typical energy change pattern of that frequency band during arc combustion.
[0038] During real-time analysis, the P50(t), P100(t), and P200(t) curves obtained in step S305 are compared with the corresponding frequency band templates for waveform similarity. The similarity calculation method uses normalized cross-correlation, which involves calculating the sum of the products of the actual curve and the template curve point by point, then dividing by the square root of the sum of their squares to obtain a correlation coefficient between -1 and 1. This calculation is performed by the microcontroller through iterative accumulation. The entire time axis is traversed to find the time position with the highest correlation coefficient; this position represents the moment when the actual arc waveform best matches the template. The power contribution value corresponding to this moment (e.g., the value of P50 at that moment) is taken as the characteristic value of that frequency band. Since all three frequency bands may contain arc information, the final arc characteristic frequency point energy characteristic value is taken as the maximum value among the three frequency band characteristic values, denoted as . This value represents the amplitude of high-frequency energy released at the moment of most intense arc combustion during the contact disconnection process.
[0039] Step S307: Simultaneously obtain the currently calculated remanence decay gradient characteristic value. and the characteristic frequency energy characteristic value of the electric arc .
[0040] After completing the above calculations, the microcontroller reads from the register. and These two values are to be used for threshold comparison.
[0041] Step S308: Compare the residual magnetism attenuation gradient characteristic value with the minimum disconnection residual magnetism gradient threshold stored in the database, and compare the arc characteristic frequency energy characteristic value with the maximum allowable arc energy threshold stored in the database.
[0042] The database pre-stores two key thresholds: the minimum disconnection remanent magnetization gradient threshold Th_mag and the maximum allowable arc energy threshold. These two thresholds were derived through extensive life and destructive testing of the same batch of relays. Specifically, 100 relays of the same model were randomly selected and subjected to 100,000 switching operations under rated load, while the performance during each disconnection process was recorded. and The value is then analyzed to select a critical value that can reliably distinguish between "complete disconnection" and "incomplete disconnection" (such as contact adhesion or welding). Simultaneously, an upper limit value is selected to ensure that the arc has been extinguished after the contacts are opened. These two thresholds are stored in the microcontroller's non-volatile memory and can be adjusted according to the actual application scenario.
[0043] Step S309: When the characteristic value of the residual magnetism attenuation gradient is greater than the minimum disconnection residual magnetism gradient threshold and the characteristic value of the arc characteristic frequency point energy is less than the maximum allowable arc energy threshold, output a confirmation signal indicating that the physical contact has been completely disconnected.
[0044] microcontroller will and Compare, and at the same time and Compare. If and If the condition is met, it indicates that the physical contacts of the current relay have been completely disconnected, and no continuous destructive arc was generated during the disconnection process. At this time, the microcontroller outputs a high-level pulse as a confirmation signal that the physical contacts are completely disconnected. This signal will be used to trigger the subsequent interlock release and the connection operation of another relay. If the above conditions are not met, steps S301 to S308 are repeated until the maximum waiting time (e.g., 50 milliseconds) is reached and the conditions are still not met. If this still does not meet the conditions, it is determined to be a fault, all outputs are blocked, and an anomaly is reported.
[0045] In S4, when it is determined that the physical contacts have been completely disconnected, the interlocking block on other relays is released, and a drive command allowing another relay to be turned on is output, specifically including: First, a confirmation signal indicating that the physical contact has been completely disconnected is received. This confirmation signal is a high-level pulse with a pulse width of 10 microseconds. When the microcontroller detects the rising edge of this pulse, it immediately triggers the internal interlock release logic. The specific implementation of the interlock release logic is as follows: the microcontroller controls a hardware interlock circuit through its general purpose input / output port. This circuit consists of multiple AND and OR gates, and the drive enable signal of each relay is controlled by a set of normally closed contact feedback signals from other relays. The normally closed contact of the relay currently in the conducting state is in the open state. This open state is fed back to the interlock circuit through optocoupler isolation, forming a blockade on other relays. Upon receiving the confirmation signal, the microcontroller outputs a high-level signal to the unlock control terminal in the interlock circuit, forcibly cutting off the feedback path corresponding to the currently conducting relay, thereby releasing the hardware-level blockade path on other relays. At this time, the other relays are ready to be driven in hardware.
[0046] Next, the characteristic parameters of the electromagnetic coil of the other relay currently allowed to be activated are read. To acquire these parameters, the microcontroller first applies a low-amplitude probe pulse to the electromagnetic coil of that relay. The amplitude of this probe pulse is set to 1 / 10 of the coil's rated voltage; for example, if the coil's rated voltage is 24 volts, the probe pulse amplitude is 2.4 volts. The pulse width is set to 100 microseconds, which is sufficient to excite the coil to produce a measurable current response but insufficient to actuate the armature. During the application of the probe pulse, the current waveform is acquired through a precision sampling resistor (1 ohm) connected in series in the coil circuit, and the voltage waveform across the coil is acquired simultaneously through a voltage divider circuit. The sampling rate is 10 mega-sampling times per second, for a total duration of 200 microseconds, covering the entire pulse cycle and the decay process after the pulse ends. Based on the acquired voltage and current data, the equivalent resistance and inductance of the electromagnetic coil are calculated. The equivalent resistance is calculated by dividing the average voltage during the pulse stabilization phase (e.g., the interval from 50 to 80 microseconds after the pulse begins) by the average current. The inductance is calculated as follows: The time difference during the pulse rise phase (from 10% to 90% of the final current value) and the corresponding current change are taken, combined with the equivalent resistance value, and derived from the transient response characteristics of the inductor coil. Specifically, according to the current rise formula for an inductor under DC voltage excitation, the time required for the current to rise from 10% to 90% is directly proportional to the inductance and inversely proportional to the equivalent resistance. The microcontroller pre-stores an empirical value for this proportionality coefficient (e.g., 0.35). Multiplying the measured time difference by the equivalent resistance and then dividing by this empirical coefficient yields the inductance value. These two parameters (equivalent resistance and inductance) are stored in a register as characteristic parameters of the electromagnetic coil.
[0047] Then, based on the aforementioned inductance and equivalent resistance, the electromagnetic energy accumulation time required for the electromagnetic coil to start operating from the applied voltage to the contact activation is calculated. This time calculation is based on the electrical time constant of the electromagnetic coil, which is the quotient obtained by dividing the inductance by the equivalent resistance. Since contact operation requires the coil current to reach a specific pull-in current threshold, this threshold is determined by the mechanical characteristics of the relay itself, typically 70% to 80% of the coil's rated current. According to the exponential law of current rise in the inductor coil, the time required for the current to rise from 0 to the pull-in current threshold corresponds to the electrical time constant. The microcontroller obtains this correspondence through a lookup table: a table is pre-stored in the internal memory; the input of the table is the percentage of the pull-in current threshold to the rated current, and the output is the electrical time constant multiple corresponding to that percentage. Multiplying the electrical time constant (the quotient of inductance divided by the equivalent resistance) by this multiple yields the electromagnetic energy accumulation time. This time is the delay time required for the contact to start operating, denoted as Tact. The pulse width and pulse amplitude of the pre-excitation pulse leading edge are set according to Tact. The pulse width is set to 80% of Tact to ensure that pre-excitation is completed when the contact is about to actuate but has not yet actuated; the pulse amplitude is set to 1.5 times the rated voltage of the coil to provide sufficient over-excitation energy to accelerate contact closing, and the amplitude is experimentally verified to prevent coil overheating or contact overshoot.
[0048] Next, the pre-defined pulse width and amplitude parameters are applied to the initial segment of the drive waveform. The microcontroller's internal pulse width modulation module generates a pulse waveform with a steep leading edge based on these parameters. At the start of the pulse, the voltage jumps instantaneously from zero to the set amplitude, maintaining this amplitude until the pulse width ends, after which the voltage momentarily drops to a lower sustaining level. The sustaining level amplitude is set to 50% of the coil's rated voltage, sufficient to maintain reliable contact engagement while significantly reducing coil power consumption and temperature rise. The timing of the entire drive waveform is precisely controlled by the microcontroller's timer, ensuring a smooth transition between the leading edge of the pre-excitation pulse and the subsequent sustaining level, without glitches or abnormal jumps.
[0049] Finally, the generated drive waveform is applied to the drive terminal of the other relay. During the application process, the rate of increase of the coil current is monitored in real time through a series sampling resistor. The current rate of increase is monitored by acquiring the instantaneous current value every 10 microseconds and calculating the difference between two adjacent samples divided by the time interval to obtain the rate of change of the current at the current moment. When this rate of change exceeds the preset pull-in threshold, it indicates that the armature has started to move and the contacts are about to close. This pull-in threshold is obtained through experimental calibration: during the relay's factory test, the maximum rate of increase of the current during its normal pull-in process is measured, and 50% of this value is taken as the threshold and stored in memory. After the microcontroller detects that the current rate of increase has reached the threshold, it immediately switches the drive waveform from the leading edge of the pre-excitation magnetic pulse to the sustained pull-in level. After the switch is completed, the drive command output process ends, and the relay enters a stable conducting state, waiting for subsequent commutation commands.
[0050] In S5, after outputting the drive command, the contact disconnection time and disconnection quality data during this switching process are recorded and fed back, specifically including: First, record the contact disconnection time during this switching process. When the physical state confirmation trigger signal is generated in step S1, the timestamp carried by this signal is saved as the arrival time of the reversing command. In step S301, when locating the inflection point of the magnetic field abrupt change, the time corresponding to this inflection point is saved as the moment T0 when the contacts are completely separated. The microcontroller calculates T0 and... The time difference between the two values is the contact disconnection time, measured in milliseconds. The specific calculation method is: subtract the counter value corresponding to T0 from the counter value of T0. The corresponding count value is then multiplied by the timer's counting period to obtain the actual elapsed time. This value reflects the relay's response speed from receiving a command to the contacts completely opening, and is an important parameter for evaluating relay performance.
[0051] Secondly, record the disconnection quality data during this switching process. The disconnection quality data includes two dimensions: one is the remanent magnetization attenuation gradient characteristic value calculated in step S303. This value characterizes the speed at which residual magnetism disappears when the contact is disconnected; a larger value indicates a more decisive disconnection. Secondly, it represents the energy characteristic value of the arc characteristic frequency point calculated in step S306. This value characterizes the intensity of the arc burning during the contact disconnection process; the smaller the value, the better the arc suppression effect. The microcontroller writes these two values, along with the contact disconnection time, into a designated sector of its internal non-volatile memory. Each record occupies 8 bytes and contains a timestamp, disconnection time, gradient feature value, and arc energy value.
[0052] Finally, the recorded data is fed back to the host computer or programmable logic controller (PLC) via the communication interface. The microcontroller's built-in universal asynchronous transceiver automatically encapsulates the latest record in the storage area into a data frame and sends it after each commutation operation. The data frame format is: start byte, data length, four data bytes (high and low bits of disconnection time, high and low bits of gradient feature value, and high and low bits of arc energy value), and a check byte. After receiving the data, the host computer can analyze the relay's health status, predict its remaining lifespan, and issue warnings when the disconnection time is too long or the arc energy remains excessively high, thus achieving predictive maintenance.
[0053] The working principle of this invention is as follows: Upon receiving an external commutation command, logical interlocking is performed based on the current conduction state of each relay. If a switching requirement exists, a physical state confirmation trigger signal with a timestamp is generated. In response to this trigger signal, a high-frequency detection signal is injected into the relay circuit currently in conduction, and magnetic field change data of the relay contact area and high-frequency ripple data of the power supply circuit are simultaneously collected. Trend analysis of the magnetic field change data yields the residual magnetism attenuation gradient characteristic value, and frequency component analysis of the high-frequency ripple data yields the arc characteristic frequency energy characteristic value. These two characteristic values are then compared with a preset contact disconnection characteristic number. The system compares the data with the threshold values in the database and determines whether the physical contacts of the current relay are completely open. When it is determined that the physical contacts are completely open, the interlocking blockade of other relays is released, and the electromagnetic coil characteristic parameters of the other relay that is allowed to be connected are read. Based on this, a drive waveform with the leading edge of the pre-excitation magnetic pulse is generated. This drive waveform is applied to the drive terminal of the other relay, and the coil current rise rate is monitored during the application process. When the current rise rate reaches the preset pull-in threshold, the system switches to a holding level. Finally, the contact opening time and opening quality data during this switching process are recorded and fed back.
[0054] The foregoing has provided a detailed description of one embodiment of the present invention, but this description is merely a preferred embodiment and should not be construed as limiting the scope of the invention. All equivalent variations and modifications made within the scope of the claims of this invention should still fall within the patent coverage of this invention.
Claims
1. A method for interlocking multiple relays, characterized in that, Includes the following steps: S1: Receive external switching commands, perform logical interlocking judgment based on the current conduction status of each relay, and generate a physical status confirmation trigger signal if there is a switching requirement. S2: In response to the physical state confirmation trigger signal, a high-frequency detection signal is injected into the relay circuit in the current conduction state, and the magnetic field change data of the relay contact area and the high-frequency ripple data of the power supply circuit are collected simultaneously. S3: Perform trend analysis on magnetic field change data to obtain residual magnetism attenuation gradient characteristic value, perform frequency component analysis on high frequency ripple data to obtain arc characteristic frequency point energy characteristic value, compare the residual magnetism attenuation gradient characteristic value and arc characteristic frequency point energy characteristic value with the threshold in the preset contact disconnection characteristic database, and determine whether the physical contact of the current relay has been completely disconnected based on the comparison result. S4: When it is determined that the physical contact has been completely disconnected, release the interlock block on other relays and output a drive command that allows another relay to be turned on. S5: After outputting the drive command, record and feed back the contact disconnection time and disconnection quality data during this switching process.
2. The multi-channel relay interlocking method according to claim 1, characterized in that, S1 specifically includes: The received external commutation command is pulse width discriminated to filter out interference pulses smaller than the preset width, thus obtaining a valid commutation command; Read the on-state codes of each relay and compare the valid commutation command with the on-state codes to confirm whether there is a commutation requirement that needs to switch the on / off path. When a commutation requirement is confirmed, a physical state confirmation trigger signal carrying a timestamp is generated based on the phase characteristics of the valid commutation command.
3. The multi-channel relay interlocking method according to claim 1, characterized in that, S2 specifically includes: Based on the timestamp carried by the trigger signal to confirm the physical state, select a time window during the contact action interval, and inject a high-frequency detection signal composed of multiple different frequency components into the relay circuit in the current conduction state within the time window; While injecting a high-frequency detection signal, the magnetic field sensing unit arranged around the relay contacts is activated to continuously collect the magnetic field distortion waveform caused by the movement of the armature during the contact opening and closing process. Synchronously, a high-frequency sampling front-end coupled to the power supply circuit is used to capture the ripple current variation curve in the same frequency band as the high-frequency detection signal. The magnetic field distortion waveform and the ripple current variation curve are aligned and packaged according to a unified time reference to form the original dataset to be analyzed.
4. The multi-channel relay interlocking method according to claim 1, characterized in that, The process for obtaining the remanence decay gradient characteristic value is as follows: Extract the magnetic field distortion waveform from the original dataset and locate the magnetic field abrupt change inflection point that occurs at the moment the contacts completely separate in the magnetic field distortion waveform; Starting from the inflection point of magnetic field abrupt change, extract a segment of the magnetic field decay curve within a preset time period thereafter. A point-by-point difference operation is performed on the magnetic field decay curve segment to obtain the instantaneous decay rate of the magnetic field strength as a function of time, and the peak value in the instantaneous decay rate sequence is marked as the characteristic value of the remanent decay gradient.
5. A multi-channel relay interlocking method according to claim 1, characterized in that, The process for obtaining the energy characteristic value of the characteristic frequency point of the electric arc is as follows: The ripple current variation curve is extracted from the original dataset. A digital bandpass filter is applied to the ripple current variation curve to retain the frequency band components corresponding to the frequency components in the high-frequency detection signal. Perform time-frequency energy integration on the filtered curve to calculate the power contribution value of the signal amplitude accumulated over time within the frequency band; The power contribution value is compared with the preset arc combustion feature template for waveform similarity, and the instantaneous energy amplitude corresponding to the moment with the highest similarity is extracted as the energy feature value of the arc feature frequency point.
6. A multi-channel relay interlocking method according to claim 1, characterized in that, The determination of whether the physical contacts of the current relay are completely open specifically includes: Simultaneously, obtain the characteristic values of the remanence attenuation gradient and the energy characteristic values of the arc characteristic frequency points obtained from the current calculation; The residual magnetism attenuation gradient characteristic value is compared with the minimum disconnection residual magnetism gradient threshold stored in the database, and the arc characteristic frequency energy characteristic value is compared with the maximum allowable arc energy threshold stored in the database. When the residual magnetism attenuation gradient characteristic value is greater than the minimum disconnection residual magnetism gradient threshold and the arc characteristic frequency energy characteristic value is less than the maximum allowable arc energy threshold, an output confirmation signal indicating that the physical contact has been completely disconnected is output.
7. A multi-channel relay interlocking method according to claim 1, characterized in that, S4 specifically includes: Upon receiving a confirmation signal indicating that the physical contacts have been completely disconnected, the interlock release logic is triggered based on the confirmation signal to cut off the hardware-level interlock blocking path of the currently conducting relay to other relays. Read the electromagnetic coil characteristic parameters of the other relay that is currently allowed to be connected, and generate a drive waveform with the leading edge of the pre-excitation pulse based on the electromagnetic coil characteristic parameters; The driving waveform is applied to the driving terminal of another relay, and the rising rate of its coil current is monitored in real time during the application process. When the current rising rate reaches the preset pull-in threshold, the driving waveform is switched to the continuous pull-in sustaining level to complete the output of the driving command.
8. A multi-channel relay interlocking method according to claim 7, characterized in that, The generation of a drive waveform with a leading edge of a pre-excitation pulse based on the characteristic parameters of the electromagnetic coil specifically includes: A low-amplitude probe pulse is applied to the electromagnetic coil of another relay to measure the inductance and equivalent resistance of the electromagnetic coil, which are used as characteristic parameters of the electromagnetic coil. Based on the inductance and equivalent resistance, calculate the electromagnetic energy accumulation time required for the electromagnetic coil to start operating from the applied voltage to the contact, and set the pulse width and pulse amplitude of the pre-excitation pulse leading edge according to the time. The preset pulse width and pulse amplitude parameters are applied to the beginning segment of the drive waveform to form a pre-excitation pulse waveform with a steep leading edge and an amplitude higher than the sustain level, while the subsequent part of the waveform remains at a smooth sustain level.