Relay-based coil current control method and device, equipment and medium

The pulse width modulation signal is adjusted through the voltage and temperature mapping relationship tables of the high-side and low-side drive modules, and the relay coil current is finely controlled, which solves the problem of current not meeting the requirements under PWM drive, and realizes the safe and reliable operation of the relay.

CN119297033APending Publication Date: 2025-01-10SUNGIANT AUTOMOTIVE ELECTRONICS CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411380121.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-29
Publication Date
2025-01-10

AI Technical Summary

Technical Problem

Relays driven by PWM have strict requirements on coil current. The actual coil current is lower than the requirement, which will cause the relay to be disconnected, and higher than the requirement, which will lead to damage. It is difficult for the prior art to achieve precise control.

Method used

Using the coil current control method based on the high-side drive module and the low-side drive module, by obtaining the high-side and low-side voltage and temperature, using the mapping relationship table to adjust the pulse width modulation signal, and finely control the coil current of the relay module to ensure that the current meets the specifications Require.

Benefits of technology

Accurate control of the current of the relay coil is achieved, damage or disconnection problems caused by excessive or too small current is avoided, and the accuracy and reliability of the control are improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119297033A_ABST
    Figure CN119297033A_ABST
Patent Text Reader

Abstract

The invention provides a coil current control method and device based on a relay, equipment and a medium, and belongs to the technical field of electric automobiles, and the method comprises the steps: controlling a high-side driving module and a low-side driving module to be closed, driving a relay module, obtaining a voltage output by the high-side driving module after a preset time period, obtaining a first high-side voltage, and outputting the first high-side voltage to the low-side driving module; obtaining the temperature of the relay module to obtain a first temperature, querying a pre-obtained first mapping relation table according to the first high-side voltage and the first temperature to obtain a target duty ratio, outputting a pulse width modulation signal according to the target duty ratio, and controlling the coil current of the relay module according to the pulse width modulation signal, the coil current of the relay module can be finely controlled, and the relay module is prevented from being damaged.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of electric vehicles, and in particular to a coil current control method and device, equipment and medium based on a relay. Background Art

[0002] Relays have been used in high-voltage power control devices of various smart electric vehicles and energy storage systems to improve the reliability and safety of the system. In the related art, the power of the relay directly driven by conventional voltage is 7W to 12W, and the power of the relay controlled by pulse width modulation signal (PWM) is 1.5W to 3W. Since the energy consumption of PWM control mode is 25% of that of direct voltage drive mode, in order to reduce the driving energy consumption, PWM control relay is usually adopted. However, PWM-driven relays have strict requirements on coil current. If the actual coil current is lower than the coil current required by the relay, the relay will be disconnected, and if the actual coil current is higher than the coil current required by the relay, the relay will be damaged. Therefore, how to drive the relay based on PWM so that the actual coil current meets the coil current required by the relay has become an urgent problem to be solved. Summary of the invention

[0003] The main purpose of the embodiments of the present application is to propose a coil current control method and device based on a relay, equipment and medium, aiming to accurately control the coil current of the relay to avoid damage to the relay.

[0004] To achieve the above-mentioned purpose, a first aspect of an embodiment of the present application proposes a coil current control method based on a relay, which is applied to a coil current control device based on a relay. The coil current control device based on a relay includes a high-side drive module, a low-side drive module, and a relay module. The coil current control method includes the following steps:

[0005] Step 1: Control the high-side driving module and the low-side driving module to close and drive the relay module;

[0006] Step 2: After a preset time, the voltage output by the high-side driver module is obtained to obtain a first high-side voltage, and the temperature of the relay module is obtained to obtain a first temperature;

[0007] Step 3: querying a pre-acquired first mapping relationship table according to the first high-side voltage and the first temperature to obtain a target duty cycle; the first mapping relationship table is used to characterize a mapping relationship between the voltage of the high-side drive module, the temperature of the relay module and the duty cycle;

[0008] Step 4: Output a pulse width modulation signal according to the target duty cycle, and control the coil current of the relay module according to the pulse width modulation signal.

[0009] In some embodiments, the coil current control method further includes step 5:

[0010] Acquire the current output by the high-side driver module to obtain the high-side current, and acquire the current output by the low-side driver module to obtain the low-side current;

[0011] Comparing the high-side current and the low-side current to obtain a current comparison result, wherein the current comparison result is used to characterize the current magnitude relationship between the high-side current and the low-side current;

[0012] If the current comparison result indicates that the high-side current and the low-side current are equal, acquiring the current temperature of the relay module to obtain a second temperature;

[0013] A second mapping relationship table acquired in advance is queried according to the second temperature to obtain the switching efficiency of the low-side driver module; the second mapping relationship table is used to characterize the mapping relationship between the temperature of the relay module and the switching efficiency of the low-side driver module;

[0014] Using any one of the high-side current and the low-side current as a reference current;

[0015] The current output by the relay module is calculated according to the reference current and the switch efficiency to obtain a candidate current.

[0016] In some embodiments, the coil current control method further includes step 6:

[0017] Obtaining standard current specifications of the relay module;

[0018] If the candidate current meets the standard current specification, the voltage currently output by the high-side driver module is obtained to obtain a second high-side voltage, and the temperature currently output by the relay module is obtained to obtain a third temperature; the target duty cycle is adjusted according to the first high-side voltage, the second high-side voltage, the second temperature and the third temperature;

[0019] If the candidate current does not meet the standard current specification, the high-side current currently output by the high-side driver module is re-acquired, and the low-side current currently output by the low-side driver module is re-acquired; and the target duty cycle is adjusted according to the high-side current and the low-side current.

[0020] In some embodiments, adjusting the target duty cycle according to the first high-side voltage, the second high-side voltage, the second temperature, and the third temperature includes:

[0021] comparing the first high-side voltage, the second high-side voltage, the second temperature, and the third temperature;

[0022] If the first high-side voltage and the second high-side voltage are not equal, and / or the second temperature and the third temperature are not equal, query the first mapping relationship table according to the second high-side voltage and the third temperature to obtain a new duty cycle; and use the new duty cycle as the target duty cycle;

[0023] If the first high-side voltage is equal to the second high-side voltage, and the second temperature is equal to the third temperature, then the high-side current currently output by the high-side driving module is reacquired, and the low-side current currently output by the low-side driving module is reacquired; and the target duty cycle is adjusted according to the high-side current and the low-side current.

[0024] In some embodiments, the coil current control method further includes step 7:

[0025] If the current comparison result indicates that the high-side current and the low-side current are not equal, obtaining the cumulative number of times that the high-side current and the low-side current are not equal;

[0026] If the accumulated number of times is less than the preset number threshold, the high-side current currently output by the high-side driver module is re-acquired, and the low-side current currently output by the low-side driver module is re-acquired; and the target duty cycle is adjusted according to the high-side current and the low-side current.

[0027] To achieve the above-mentioned purpose, a second aspect of an embodiment of the present application proposes a coil current control device based on a relay, which is applicable to the coil current control method based on a relay described in the first aspect, and the coil current control device includes:

[0028] A relay module, a control module, a high-side driver module, a low-side driver module, and a temperature module. The control module is connected to the relay module through the high-side driver module, the low-side driver module, and the temperature module respectively.

[0029] In some embodiments, the high-side driving module includes a high-side driver, a high-side voltage detection unit and a high-side current detection unit, the high-side driver is respectively connected to the high-side voltage detection unit, the high-side current detection unit and the first end of the relay module; the control module is connected to the high-side driver;

[0030] The low-side driving module comprises a low-side driver, a low-side voltage detection unit and a low-side current detection unit, wherein the low-side driver is respectively connected to the low-side voltage detection unit, the low-side current detection unit and the second end of the relay module; the control module is connected to the low-side driver;

[0031] In some embodiments, the coil current control device further includes a diode, wherein an anode of the diode is connected to the second end of the relay module, and a cathode of the diode is connected to the first end of the relay module.

[0032] To achieve the above-mentioned purpose, the third aspect of an embodiment of the present application proposes an electronic device, the electronic device comprising a memory and a processor, the memory storing a computer program, and the processor implementing the relay-based coil current control method of the above-mentioned first aspect when executing the computer program.

[0033] To achieve the above objectives, the fourth aspect of an embodiment of the present application proposes a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, it implements the relay-based coil current control method of the first aspect.

[0034] The coil current control method based on relay, the coil current control device based on relay, the electronic device and the computer-readable storage medium proposed in the present application drive the relay module by controlling the high-side drive module and the low-side drive module to close, so as to finely control the coil current of the relay module based on the high-side drive module and the low-side drive module, and ensure the accuracy and reliability of the coil current control. The temperature of the relay module and the voltage output by the high-side drive module to the relay module are very important to ensure the normal operation of the relay module, and the coil current is controlled by considering the voltage output by the high-side drive module and the temperature of the relay module. After a preset time, the voltage output by the high-side drive module is obtained to obtain the first high-side voltage, and the temperature of the relay module is obtained to obtain the first temperature. In order to improve the efficiency and accuracy of the coil current control, the first mapping relationship table obtained in advance is queried according to the first high-side voltage and the first temperature to determine the appropriate duty cycle and obtain the target duty cycle. According to the target duty cycle, a pulse width modulation signal is output, and the coil current of the relay module is controlled according to the pulse width modulation signal, so that the coil current meets the current specification requirements, and the relay module can be guaranteed to operate normally, and the relay is prevented from being damaged due to excessive coil current or the relay cannot operate normally due to too small coil current. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] Figure 1 is a flow chart of a coil current control method based on a relay provided in an embodiment of the present application;

[0036] Figure 2is another flow chart of the coil current control method based on the relay provided in the embodiment of the present application;

[0037] Figure 3 is another flow chart of the coil current control method based on the relay provided in the embodiment of the present application;

[0038] Figure 4 yes Figure 3 Flow chart of step S320 in FIG.

[0039] Figure 5 is another flow chart of the coil current control method based on the relay provided in the embodiment of the present application;

[0040] Figure 6 is another flow chart of the coil current control method based on the relay provided in the embodiment of the present application;

[0041] Figure 7 It is a schematic structural diagram of a coil current control device based on a relay provided in an embodiment of the present application;

[0042] Figure 8 It is a schematic diagram of the hardware structure of the electronic device provided in the embodiment of the present application. DETAILED DESCRIPTION

[0043] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0044] It should be noted that, although the functional modules are divided in the device schematic diagram and the logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than the module division in the device or the order in the flowchart. The terms "first", "second", etc. in the specification, claims and the above drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.

[0045] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.

[0046] With the development of the new energy industry and the energy storage industry, relays are widely used in various intelligent electric vehicles such as electric vehicles, hybrid electric vehicles and high-voltage power control devices of energy storage systems. The power of a relay directly driven by conventional voltage is 7W to 12W, and the power of a relay controlled by a pulse width modulation signal (PWM) is 1.5W to 3W. Since the energy consumption of the PWM control method is 25% of that of the direct voltage drive method, in order to reduce the driving energy consumption, PWM control relays are usually used. However, PWM-driven relays have strict requirements on the coil current. If the actual coil current is lower than the coil current required by the relay, the relay will be disconnected, and if the actual coil current is higher than the coil current required by the relay, the relay will be damaged.

[0047] In the related art, two methods are usually used for PWM relay driving. Method 1 uses a dedicated chip to drive the PWM relay, but the cost of the dedicated chip is high, and the design and development workload is large. Method 2 connects a small resistor (current sampling resistor) in series in the drive circuit, uses the current to generate a voltage drop on the small resistor, and uses the operational amplifier to amplify the voltage drop across the current sampling resistor to calculate the coil current. However, Method 2 has high requirements for the current sampling resistor and the operational amplifier (such as rail-to-rail, low zero drift, and high withstand voltage). If the resistance of the current sampling resistor is too large, the actual coil current of the relay will be reduced. The operational amplifier will amplify the voltage drop across the current sampling resistor, and the error of the resistor accuracy will also be amplified. Therefore, the resistance accuracy of the current sampling resistor will also affect the actual coil current of the relay. As the use time increases, the resistance value of the resistor will drift, and the performance of the operational amplifier will also degrade, resulting in a decrease in current control accuracy.

[0048] Based on this, the embodiments of the present application provide a relay-based coil current control method, a relay-based coil current control device, an electronic device and a computer-readable storage medium, which aim to accurately control the coil current based on a pulse width modulation signal.

[0049] The relay-based coil current control method, relay-based coil current control device, electronic device and computer-readable storage medium provided in the embodiments of the present application are specifically illustrated through the following embodiments. First, the relay-based coil current control method in the embodiments of the present application is described.

[0050] The relay-based coil current control method provided in the embodiment of the present application relates to the field of electric vehicle technology. The relay-based coil current control method provided in the embodiment of the present application can be applied to a terminal, can be applied to a server side, or can be software running in a terminal or a server side. In some embodiments, the terminal can be a smart phone, a tablet computer, a laptop computer, a desktop computer, etc.; the server side can be configured as an independent physical server, or a server cluster or a distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms; the software can be an application that implements a relay-based coil current control method, etc., but is not limited to the above forms.

[0051] The present application can be used in many general or special computer system environments or configurations. For example: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, etc. The present application can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The present application can also be practiced in distributed computing environments, in which tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media including storage devices.

[0052] Figure 1 is an optional flow chart of a coil current control method based on a relay provided in an embodiment of the present application. Figure 1 The method is applied to a relay-based coil current control device, the relay-based coil current control device includes a high-side drive module, a low-side drive module and a relay module, and the coil current control method may include but is not limited to steps S110 to S140.

[0053] Step S110, controlling the high-side driving module and the low-side driving module to close, driving the relay module;

[0054] Step S120, after a preset time, obtaining the voltage output by the high-side driver module to obtain a first high-side voltage, and obtaining the temperature of the relay module to obtain a first temperature;

[0055] Step S130, querying a pre-acquired first mapping relationship table according to the first high-side voltage and the first temperature to obtain a target duty cycle; the first mapping relationship table is used to characterize the mapping relationship between the voltage of the high-side driver module, the temperature of the relay module and the duty cycle;

[0056] Step S140: outputting a pulse width modulation signal according to the target duty cycle, and controlling the coil current of the relay module according to the pulse width modulation signal.

[0057] In step S110 of some embodiments, the control module in the coil current control device is connected to a power supply and receives power supply from the power supply to power on the control module. After power-on, the control module performs an initialization operation and performs fault detection on a preset system, which may be an electric vehicle, an energy storage system, or the like. If the preset system does not fail, indicating that the relay closing condition is met and the relay module needs to be closed, the control module sends a closing instruction to the high-side drive module and the low-side drive module respectively, and controls the high-side drive module and the low-side drive module to close according to the closing instruction. If there is a fault in the preset system, the control module stores the fault type and generates early warning information according to the fault type.

[0058] In step S120 of some embodiments, the relay module needs to be closed for 100% duty cycle for 100ms to 500ms. In order to close the relay module, the control module keeps the high-side driver module in a closed state, and obtains the duration of the low-side driver module in the closed state to obtain a preset duration (duration of the activation signal). If the duration of the activation signal is within the preset duration range, the voltage currently output by the high-side driver module is obtained to obtain the first high-side voltage. The voltage at both ends of the coil when the relay module is closed, that is, the voltage at both ends of the temperature sensor, is obtained, and the voltage-temperature relationship is queried based on the voltage to obtain the current temperature of the relay module to obtain the first temperature. The preset duration range is determined according to the relay specification requirements and can be [100ms, 500ms], where ms represents milliseconds. The voltage-temperature relationship is used to characterize the mapping relationship between the voltage at both ends of the coil and the temperature of the relay module.

[0059] The voltage-temperature relationship can be obtained according to the following steps: According to the relay specification requirements or the relay coil internal resistance test, obtain the resistance-temperature change relationship table or resistance-temperature change relationship curve of the temperature sensor's resistance with temperature. According to the relay specification requirements, obtain the minimum current and maximum current allowed when the relay module is closed, and sample the current interval formed by the minimum current and the maximum current (including the minimum current and the maximum current) according to the preset step size to obtain multiple currents. Multiply each current in turn with multiple resistors in the resistance-temperature change relationship table (resistance-temperature change relationship curve) to obtain the voltage change relationship with temperature. The voltage can be spaced in units of 0.5V, and the temperature can be spaced in units of 5℃.

[0060] It should be noted that since the temperature range of automotive products is [-40℃, 125℃], the relay coil internal resistance test can be carried out within this temperature range to obtain a relationship table or curve between the relay coil internal resistance and temperature. The relay coil internal resistance is the resistance value of the temperature sensor.

[0061] In step S130 of some embodiments, the first mapping relationship table is used to characterize the mapping relationship between the voltage of the high-side drive module, the temperature of the relay module and the duty cycle. When the relay module is closed, the first mapping relationship table obtained in advance is queried according to the first high-side voltage and the first temperature to obtain the target duty cycle, so as to select a suitable duty cycle, thereby improving the efficiency of coil current control. The duty cycle is the ratio of the high level duration of the pulse width modulation signal to the signal period.

[0062] The calculation formula of the duty cycle is defined as D=V_ho ld / Vh, where D is the duty cycle, V_ho ld is the voltage across the coil when the relay module is closed, and Vh represents the voltage output by the high-side driver module. According to the voltage-temperature relationship (V_ho ld-temperature) and the duty cycle calculation formula, the relationship between the duty cycle, the voltage Vh output by the high-side driver module, the voltage V_ho ld across the coil when the relay module is closed, and the temperature is obtained, and the relationship between the duty cycle, the voltage output by the high-side driver module, and the temperature is used as the first mapping relationship table.

[0063] In step S140 of some embodiments, the switching frequency of the low-side driver module is determined according to the relay specification requirements, the signal period is determined according to the switching frequency, the pulse width modulation signal is output according to the signal period and the target duty cycle, the control module sends the pulse width modulation signal to the enable pin of the low-side driver module, and the low-side driver controls the coil current of the relay according to the pulse width modulation signal to realize the PWM drive of the relay module. The reciprocal of the signal period is the switching frequency, and the signal period is the sum of the duration of the high level duration and the duration of the low level duration. The high level duration is the duration of the low-side driver in the closed state, and the low level duration is the duration of the low-side driver in the disconnected state. It should be noted that when the pulse width modulation signal is a high level, the relay coil is charged and stored with energy. When the pulse width modulation signal is a low level, the energy stored in the coil continues to provide energy to the coil through the diode.

[0064] See also Figure 2 In some embodiments, the relay-based coil current control method may also include but is not limited to steps S210 to S260:

[0065] Step S210, obtaining the current output by the high-side driving module to obtain the high-side current, and obtaining the current output by the low-side driving module to obtain the low-side current;

[0066] Step S220, comparing the high-side current and the low-side current to obtain a current comparison result, where the current comparison result is used to characterize the current magnitude relationship between the high-side current and the low-side current;

[0067] Step S230, if the current comparison result indicates that the high-side current and the low-side current are equal, then the current temperature of the relay module is acquired to obtain a second temperature;

[0068] Step S240, querying the pre-acquired second mapping relationship table according to the second temperature to obtain the switching efficiency of the low-side driver module; the second mapping relationship table is used to characterize the mapping relationship between the temperature of the relay module and the switching efficiency of the low-side driver module;

[0069] Step S250, taking any one of the high-side current and the low-side current as a reference current;

[0070] Step S260, calculating the current output by the relay module according to the reference current and the switch efficiency to obtain a candidate current.

[0071] In step S210 of some embodiments, method 2 does not diagnose the confidence difference of the current sampling resistor. In order to ensure that the target duty cycle determined based on the first mapping relationship table can make the coil current within the range required by the relay module, the current output by the high-side driver module is obtained to obtain the high-side current, and the current output by the low-side driver module is obtained to obtain the low-side current. The accuracy and reliability of the coil current control are improved by current detection of the high-side current and the low-side current.

[0072] In step S220 of some embodiments, the high-side current is the current on the high-potential side of the relay module, and the low-side current is the current on the low-potential side of the relay module, so the high-side current and the low-side current are usually equal. In order to determine whether the relay module is faulty, the high-side current and the low-side current are compared to obtain a current comparison result, which is used to characterize the current magnitude relationship between the high-side current and the low-side current, and the current magnitude relationship includes that the high-side current and the low-side current are equal, and the high-side current and the low-side current are not equal.

[0073] In step S230 of some embodiments, if the current comparison result indicates that the high-side current and the low-side current are equal, it is determined that the relay module is in a normal state. Under normal conditions, the current voltage across the coil of the relay module is collected through a temperature sensor, and the voltage-temperature relationship is queried based on the current voltage to obtain the current temperature of the relay module and obtain a second temperature.

[0074] In step S240 of some embodiments, the second mapping relationship table acquired in advance is queried according to the second temperature to obtain the switching efficiency of the low-side driver module, and the second mapping relationship table is used to characterize the mapping relationship between the temperature of the relay module and the switching efficiency of the low-side driver module. The switching efficiency of the low-side driver module can be tested under high and low temperature conditions of [-40°C, 125°C] to form a relationship table between temperature and switching efficiency to obtain the second mapping relationship table. The switching efficiency is the energy conversion efficiency, and the switching efficiency is the ratio of the output power and the input power of the low-side driver module when the low-side driver module switches between the closed state and the open state. The input power is the power input from the relay module to the low-side driver module when the low-side driver module is closed, expressed as the product of the voltage output by the low-side driver module and the low-side current. The output power is the power output by the low-side driver module.

[0075] In step S250 of some embodiments, since the high-side current and the low-side current are equal, any one of the high-side current and the low-side current is used as the reference current.

[0076] In step S260 of some embodiments, the reference current is multiplied by the switch efficiency, and the multiplication result is divided by the current duty cycle (target duty cycle) to obtain a candidate current output by the relay module. The candidate current is an average current of the relay coil estimated based on the reference current and the switch efficiency.

[0077] In the above steps S210 to S260, the error of current detection can be reduced by using the high-side and low-side dual currents, so as to improve the accuracy of coil current estimation, so that the relay module can work normally.

[0078] See also Figure 3 In some embodiments, the coil current control method may also include but is not limited to steps S310 to S330:

[0079] Step S310, obtaining the standard current specification of the relay module;

[0080] Step S320, if the candidate current meets the standard current specification, the voltage currently output by the high-side driver module is obtained to obtain the second high-side voltage, and the temperature currently output by the relay module is obtained to obtain the third temperature; the target duty cycle is adjusted according to the first high-side voltage, the second high-side voltage, the second temperature and the third temperature;

[0081] Step S330, if the candidate current does not meet the standard current specification, re-acquire the high-side current currently output by the high-side driver module, and re-acquire the low-side current currently output by the low-side driver module; adjust the target duty cycle according to the high-side current and the low-side current.

[0082] In step S310 of some embodiments, the duty cycle is corrected according to the candidate current so that the coil current of the relay is within the required current range. Specifically, the standard current specification of the relay module is obtained, and the standard current specification is the current range required by the relay module.

[0083] In step S320 of some embodiments, if the candidate current meets the standard current specification, it means that the current duty cycle for controlling the coil current is correct, and the relay module can operate normally. The high-side voltage and the relay temperature change in real time. In order to ensure the correctness of the duty cycle in the entire relay closing stage, it is necessary to adjust the duty cycle in real time according to the high-side voltage and temperature, then continue to obtain the current high-side voltage of the high-side driver module to obtain the second high-side voltage, and continue to obtain the current temperature of the relay module to obtain the third temperature, and correct the target duty cycle in real time according to the first high-side voltage, the second high-side voltage, the second temperature and the third temperature, and perform PWM duty cycle correction by continuously detecting the high-side voltage and the relay temperature to ensure the correctness of the duty cycle in the entire relay closing stage, so that the relay module can operate normally in the entire closing stage. The third temperature is obtained in the same manner as the first temperature and the second temperature, which will not be repeated here.

[0084] In step S330 of some embodiments, if the candidate current does not meet the standard current specification, the control module corrects the target duty cycle, and after the target duty cycle is corrected, re-acquires the high-side current currently output by the high-side driver module, and re-acquires the low-side current currently output by the low-side driver module, referring to steps S210 to S260 and steps S310 to S330, and adjusts the target duty cycle according to the high-side current and the low-side current.

[0085] It should be noted that if the candidate current is greater than the maximum allowable current, the control module reduces the target duty cycle to reduce the candidate current. If the candidate current is less than the minimum allowable current, the control module increases the target duty cycle to increase the candidate current.

[0086] In the above steps S310 to S330, after the relay module is closed, the candidate current of the relay module is estimated based on the high-side current of the high-side driver module, the low-side current of the low-side driver, and the switching efficiency of the low-side driver, so as to perform PWM duty cycle correction based on the candidate current to ensure that the coil current is within the range required by the relay.

[0087] See also Figure 4 In some embodiments, step S320 may include but is not limited to steps S410 to S430:

[0088] Step S410, comparing the first high-side voltage, the second high-side voltage, the second temperature and the third temperature;

[0089] Step S420: if the first high-side voltage and the second high-side voltage are not equal, and / or the second temperature and the third temperature are not equal, query the first mapping relationship table according to the second high-side voltage and the third temperature to obtain a new duty cycle; and use the new duty cycle as the target duty cycle;

[0090] Step S430, if the first high-side voltage and the second high-side voltage are equal, and the second temperature and the third temperature are equal, then re-acquire the high-side current currently output by the high-side driving module, and re-acquire the low-side current currently output by the low-side driving module; adjust the target duty cycle according to the high-side current and the low-side current.

[0091] In step S410 of some embodiments, to determine whether the high-side voltage changes, the first high-side voltage is compared with the second high-side voltage. To determine whether the relay temperature changes, the second temperature is compared with the third temperature.

[0092] In step S420 of some embodiments, if the first high-side voltage and the second high-side voltage are not equal, and / or the second temperature and the third temperature are not equal, it means that the high-side voltage has changed and / or the relay temperature has changed, and the duty cycle needs to be redetermined. Then, the first mapping relationship table is queried according to the second high-side voltage and the third temperature to obtain a new duty cycle, and the new duty cycle is used as the target duty cycle.

[0093] In step S430 of some embodiments, if the first high-side voltage and the second high-side voltage are equal, and the second temperature and the third temperature are equal, the high-side current currently output by the high-side driving module is reacquired, and the low-side current currently output by the low-side driving module is reacquired, and the high-side current and the low-side current are compared, with reference to steps S210 to S260 and steps S310 to S330, and the target duty cycle is adjusted according to the high-side current and the low-side current, so that the coil current meets the relay current requirements, thereby ensuring the normal operation of the relay.

[0094] In the above steps S410 to S430, the duty cycle is adjusted according to the voltage change and the temperature change, so that the duty cycle changes with the voltage change and the temperature change, thereby realizing real-time automatic control of the relay.

[0095] See also Figure 5 In some embodiments, the relay-based coil current control method may also include but is not limited to steps S510 to S520:

[0096] Step S510, if the current comparison result indicates that the high-side current and the low-side current are not equal, then obtaining the cumulative number of times that the high-side current and the low-side current are not equal;

[0097] Step S520, if the accumulated number of times is less than the preset number threshold, re-acquire the high-side current currently output by the high-side driver module, and re-acquire the low-side current currently output by the low-side driver; adjust the target duty cycle according to the high-side current and the low-side current.

[0098] In step S510 of some embodiments, if the high-side current and the low-side current are not equal, it indicates that the relay module may be faulty. Then, the number of times the high-side current and the low-side current obtained consecutively are not equal is counted to obtain a cumulative number of times, so as to further determine whether the relay module is faulty based on the cumulative number of times.

[0099] In step S520 of some embodiments, if the accumulated number of times is less than the preset number threshold, the high-side current currently output by the high-side driver module is reacquired, and the low-side current currently output by the low-side driver is reacquired, referring to steps S210 to S260 and steps S310 to S330, and steps S510 to S520, and the target duty cycle is adjusted according to the high-side current and the low-side current.

[0100] If the cumulative number of times is greater than or equal to the preset number threshold, it is determined that the relay module is in a fault state, and a disconnection instruction is sent to the enable pin of the high-side driver module and the enable pin of the low-side driver module according to the fault state, so that the high-side driver module and the low-side driver are in a disconnected state according to the disconnection instruction. The preset number threshold can be set according to actual conditions, for example, 10 times.

[0101] In the above steps S510 to S520, whether the relay is faulty is determined by the accumulated number of times that the high-side current and the low-side current are not equal, which can avoid misjudgment of faults due to a single current detection error, ensure the accuracy of fault detection, and thus avoid damage to the relay.

[0102] See also Figure 6 The embodiment of the present application further provides a coil current control method based on a relay, the coil current control method comprising:

[0103] Step S6010, the control module performs initialization operation;

[0104] Step S6020, the control module determines whether the conditions for relay closing are met; if the determination result is no, step S6030 is executed; if the determination result is yes, step S6040 is executed;

[0105] Step S6030, the control module stores the fault type;

[0106] Step S6040, the control module sends an instruction to close the high-side driver;

[0107] Step S6050, the control module sends an instruction to close the low-side driver for a period of time;

[0108] Step S6060, the control module detects the high-side voltage output by the high-side driver and the relay temperature;

[0109] Step S6070, the control module reads the voltage-temperature change and duty cycle relationship table according to the high-side voltage and the relay temperature, selects the duty cycle, and outputs a PWM signal;

[0110] Step S6080, the control module starts high-side current detection and low-side current detection to obtain high-side current and low-side current;

[0111] Step S6090, the control module determines whether the high-side current and the low-side current are consistent; if the determination result is yes, step S6100 is executed; if the determination result is no, step S6160 is executed;

[0112] Step S6100, the control module reads the current relay temperature;

[0113] Step S6110, the control module selects the switching efficiency of the low-side driver according to the relationship table between temperature and efficiency;

[0114] Step S6120, calculating the coil current according to the switch efficiency, any one of the high-side current and the low-side current, and the duty cycle;

[0115] Step S6130, the control module determines whether the coil current meets the relay requirements; if the judgment result is yes, step S6140 is executed; if the judgment result is no, step S6150 is executed;

[0116] Step S6140, the control module detects whether the high-side voltage output by the high-side driver and the relay temperature change; if the judgment result is yes, step S6070 is executed; if the judgment result is no, step S6080 is executed;

[0117] Step S6150, the control module corrects the duty cycle;

[0118] Step S6160, the control module determines whether the high-side current and the low-side current are inconsistent for more than 10 times; if the judgment result is yes, step S6170 is executed; if the judgment result is no, step S6080 is executed;

[0119] Step S6170: The control module stores the fault type and issues an instruction to disconnect the high-side driver and the low-side driver.

[0120] Figure 7A relay-based coil current control device is provided in an embodiment of the present application, which is applicable to a relay-based coil current control method. The coil current control device includes a relay module 710, a control module 720, a high-side drive module 730, a low-side drive module 740 and a temperature module 750. The control module 720 is connected to the relay module 710 through the high-side drive module 730, the low-side drive module 740 and the temperature module 750 respectively.

[0121] The high-side driver module 730 includes a high-side driver, a high-side voltage detection unit and a high-side current detection unit. The high-side driver is connected to the high-side voltage detection unit, the high-side current detection unit and the first end of the relay module 710 respectively, and the first end is the high potential side of the relay module 710. The high-side voltage detection unit is used to detect the high-side voltage output by the high-side driver, and the high-side current detection unit is used to detect the high-side current output by the high-side driver. The control module 720 is connected to the high-side driver, and the high-side driver has an enable pin. The control module 720 is used to send an enable signal to the enable pin, and control the high-side driver to be in an open state or a closed state according to the enable signal. When the enable signal is at a high level, the high-side driver is in a closed state; when the enable signal is at a low level, the high-side driver is in an open state. The high-side driver can use a MOSFET, the source of the MOSFET is connected to the high potential side of the relay module 710, the drain of the MOSFET is connected to the positive electrode of the preset power supply, and the gate of the MOSFET is connected to the control module 720. The high-side driver is used to control the current to flow from the preset power supply to the relay module 710.

[0122] The low-side driver module 740 includes a low-side driver, a low-side voltage detection unit and a low-side current detection unit. The low-side driver is connected to the low-side voltage detection unit, the low-side current detection unit and the second end of the relay module 710 respectively. The second end is the low potential side of the relay module 710, and the control module 720 is connected to the low-side driver. The low-side driver also has an enable pin, and the control module 720 is used to send an enable signal to the enable pin, and control the low-side driver to be in an open state or a closed state according to the enable signal. When the enable signal is a high level, the low-side driver is in a closed state; when the enable signal is a low level, the low-side driver is in an open state. When the low-side driver is in a closed state, the low-side driver receives the low-side voltage and low-side current input by the relay module 710. The low-side voltage and the low-side current are the voltage and current input by the relay module to the low-side driver, that is, the voltage and current output by the low-side driver. The low-side voltage detection unit is used to detect the low-side voltage, and the low-side current detection unit is used to detect the low-side current. The low-side driver can use MOSFET, the gate of MOSFET is connected to the control module 720, the drain of MOSFET is connected to the low potential side of the relay module 710, the source of MOSFET is grounded, and the low-side driver is used to control the current to flow from the relay module to the ground. The temperature module 750 uses a temperature sensor to obtain the temperature of the relay module 710. The temperature sensor can be integrated in the relay itself or set independently of the relay. The temperature sensor can be set near the relay coil.

[0123] During the normal driving process of the relay module 710, the high-side driver is in a closed state and the low-side driver is in a PWM switching state. The PWM switching state refers to the state in which the low-side driver is closed or disconnected according to a cycle. The control module 720 is used to output a pulse width modulation signal to the low-side driver according to the high-side voltage, high-side current, low-side voltage, low-side current and temperature, and the low-side driver is used to control the coil current of the relay according to the pulse width modulation signal, so as to close or disconnect the relay module based on the coil current, realize the high-voltage power transmission of the electric vehicle or cut off the power transmission path. The coil current is the actual current of the relay coil. The control module 720 is provided with an analog-to-digital conversion module, and the high-side voltage, high-side current, low-side voltage, low-side current and temperature are analog-to-digital converted by the analog-to-digital conversion module. Multiple analog-to-digital conversion modules can be set in parallel to improve the efficiency of analog-to-digital conversion of multiple signals.

[0124] This application uses a high-side driver module and a low-side driver to perform dual-path control of the coil current, and does not use a current sampling resistor and an operational amplifier, thereby avoiding the resistance drift of the current sampling resistor due to long-term current shocks, and also avoiding the decrease in control accuracy caused by the aging of the operational amplifier, thereby improving the accuracy and reliability of the coil current control. In addition, this application also solves the problems of high material cost, long development cycle, and large development workload caused by dedicated chips.

[0125] The coil current control device further includes a diode, the anode of the diode is connected to the second end of the relay module 710, and the cathode of the diode is connected to the first end of the relay module 710. When the pulse width modulation signal is at a low level, the low-side driver is in an open state, and the target current is provided to the relay module 710 through the high-side driver 731 in a closed state and the diode, so that the relay maintains a closed state according to the target current. The target current is the freewheeling current generated when the diode is in a forward bias state.

[0126] See also Figure 8 , Figure 8 The hardware structure of an electronic device of another embodiment is illustrated, and the electronic device includes:

[0127] The processor 810 may be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of the present application;

[0128] The memory 820 can be implemented in the form of a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 820 can store an operating system and other application programs. When the technical solution provided in the embodiment of this specification is implemented by software or firmware, the relevant program code is stored in the memory 820, and the processor 810 calls and executes the coil current control method based on the relay in the embodiment of the present application;

[0129] Input / output interface 830, used to implement information input and output;

[0130] Communication interface 840, used to realize communication interaction between the device and other devices, which can be realized through wired mode (such as USB, network cable, etc.) or wireless mode (such as mobile network, WI FI, Bluetooth, etc.);

[0131] bus 850 , which transmits information between the various components of the device (e.g., processor 810 , memory 820 , input / output interface 830 , and communication interface 840 );

[0132] The processor 810 , the memory 820 , the input / output interface 830 and the communication interface 840 are connected to each other in communication within the device via a bus 850 .

[0133] An embodiment of the present application further provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the above-mentioned relay-based coil current control method is implemented.

[0134] The memory, as a non-transient computer-readable storage medium, can be used to store non-transient software programs and non-transient computer executable programs. In addition, the memory may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some embodiments, the memory may optionally include a memory remotely disposed relative to the processor, and these remote memories may be connected to the processor via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0135] The embodiments described in the embodiments of the present application are intended to more clearly illustrate the technical solutions of the embodiments of the present application and do not constitute a limitation on the technical solutions provided in the embodiments of the present application. Those skilled in the art will appreciate that with the evolution of technology and the emergence of new application scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.

[0136] Those skilled in the art will appreciate that the technical solutions shown in the figures do not constitute a limitation on the embodiments of the present application, and may include more or fewer steps than shown in the figures, or a combination of certain steps, or different steps.

[0137] The device embodiments described above are merely illustrative, and the units described as separate components may or may not be physically separated, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0138] Those skilled in the art will appreciate that all or some of the steps in the methods disclosed above, and the functional modules / units in the systems and devices may be implemented as software, firmware, hardware, or a suitable combination thereof.

[0139] The terms "first", "second", "third", "fourth", etc. (if any) in the specification of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0140] It should be understood that in the present application, "at least one (item)" means one or more, and "plurality" means two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the objects associated before and after are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.

[0141] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the above units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. The mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0142] The units described above as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0143] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0144] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including multiple instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, referred to as ROM), random access memory (Random Access Memory, referred to as RAM), disk or optical disk and other media that can store programs.

[0145] The preferred embodiments of the present invention are described above with reference to the accompanying drawings, but the scope of the rights of the present invention is not limited thereto. Any modification, equivalent substitution and improvement made by a person skilled in the art without departing from the scope and essence of the present invention should be within the scope of the rights of the present invention.

Claims

1. A coil current control method based on a relay, characterized in that: The invention is applied to a coil current control device based on a relay, wherein the coil current control device based on the relay comprises a high-side driving module, a low-side driving module, and a relay module. The coil current control method comprises the following steps: Step 1: Control the high-side driving module and the low-side driving module to close and drive the relay module; Step 2: After a preset time, the voltage output by the high-side driver module is obtained to obtain a first high-side voltage, and the temperature of the relay module is obtained to obtain a first temperature; Step 3: querying a pre-acquired first mapping relationship table according to the first high-side voltage and the first temperature to obtain a target duty cycle; the first mapping relationship table is used to characterize a mapping relationship between the voltage of the high-side drive module, the temperature of the relay module and the duty cycle; Step 4: Output a pulse width modulation signal according to the target duty cycle, and control the coil current of the relay module according to the pulse width modulation signal.

2. The coil current control method based on a relay according to claim 1, characterized in that: The coil current control method further comprises step 5: Acquire the current output by the high-side driver module to obtain the high-side current, and acquire the current output by the low-side driver module to obtain the low-side current; Comparing the high-side current and the low-side current to obtain a current comparison result, wherein the current comparison result is used to characterize the current magnitude relationship between the high-side current and the low-side current; If the current comparison result indicates that the high-side current and the low-side current are equal, acquiring the current temperature of the relay module to obtain a second temperature; A second mapping relationship table acquired in advance is queried according to the second temperature to obtain the switching efficiency of the low-side driver module; the second mapping relationship table is used to characterize the mapping relationship between the temperature of the relay module and the switching efficiency of the low-side driver module; Using any one of the high-side current and the low-side current as a reference current; The current output by the relay module is calculated according to the reference current and the switch efficiency to obtain a candidate current.

3. The coil current control method based on a relay according to claim 2, characterized in that: The coil current control method further comprises step 6: Obtaining standard current specifications of the relay module; If the candidate current meets the standard current specification, the voltage currently output by the high-side driver module is obtained to obtain a second high-side voltage, and the temperature currently output by the relay module is obtained to obtain a third temperature; the target duty cycle is adjusted according to the first high-side voltage, the second high-side voltage, the second temperature and the third temperature; If the candidate current does not meet the standard current specification, the high-side current currently output by the high-side driver module is re-acquired, and the low-side current currently output by the low-side driver module is re-acquired; and the target duty cycle is adjusted according to the high-side current and the low-side current.

4. The coil current control method based on a relay according to claim 3, characterized in that: The step of adjusting the target duty cycle according to the first high-side voltage, the second high-side voltage, the second temperature, and the third temperature includes: comparing the first high-side voltage, the second high-side voltage, the second temperature, and the third temperature; If the first high-side voltage and the second high-side voltage are not equal, and / or the second temperature and the third temperature are not equal, query the first mapping relationship table according to the second high-side voltage and the third temperature to obtain a new duty cycle; and use the new duty cycle as the target duty cycle; If the first high-side voltage is equal to the second high-side voltage, and the second temperature is equal to the third temperature, then the high-side current currently output by the high-side driving module is reacquired, and the low-side current currently output by the low-side driving module is reacquired; and the target duty cycle is adjusted according to the high-side current and the low-side current.

5. The coil current control method based on a relay according to claim 2, characterized in that: The coil current control method further comprises step 7: If the current comparison result indicates that the high-side current and the low-side current are not equal, obtaining the cumulative number of times that the high-side current and the low-side current are not equal; If the accumulated number of times is less than the preset number threshold, the high-side current currently output by the high-side driver module is re-acquired, and the low-side current currently output by the low-side driver module is re-acquired; and the target duty cycle is adjusted according to the high-side current and the low-side current.

6. A coil current control device based on a relay, applicable to the coil current control method based on a relay as described in any one of claims 1 to 5, characterized in that: The coil current control device comprises: A relay module, a control module, a high-side driver module, a low-side driver module, and a temperature module. The control module is connected to the relay module through the high-side driver module, the low-side driver module, and the temperature module respectively.

7. The relay-based coil current control device according to claim 6, characterized in that: The high-side driving module comprises a high-side driver, a high-side voltage detection unit and a high-side current detection unit, wherein the high-side driver is respectively connected to the high-side voltage detection unit, the high-side current detection unit and the first end of the relay module; the control module is connected to the high-side driver; The low-side driving module includes a low-side driver, a low-side voltage detection unit and a low-side current detection unit, wherein the low-side driver is respectively connected to the low-side voltage detection unit, the low-side current detection unit and the second end of the relay module; and the control module is connected to the low-side driver.

8. The relay-based coil current control device according to claim 6, characterized in that: The coil current control device further comprises a diode, wherein the anode of the diode is connected to the second end of the relay module, and the cathode of the diode is connected to the first end of the relay module.

9. An electronic device, characterized in that The electronic device includes a memory and a processor, the memory stores a computer program, and the processor implements the relay-based coil current control method according to any one of claims 1 to 5 when executing the computer program.

10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the relay-based coil current control method according to any one of claims 1 to 5 is implemented.

Citation Information

Cited By

  • Relay-based control method and apparatus for coil current, and device and medium

    WO2026066327A1