Signal machine state detection circuit, signal machine state detection method and electronic equipment
By designing the signal state detection circuit, using current sensors, voltage followers and dual CPU modules to detect the signal current signal, the problem of inaccurate signal state detection in the prior art is solved, and the reliability and adaptation of the signal system are improved sex.
Patent Information
- Application Number
- CN202411007692.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-25
- Publication Date
- 2024-11-15
AI Technical Summary
The prior art is difficult to effectively detect and ensure the status of the signal machine, which affects the reliability and efficiency of the railway signal system.
A signal machine state detection circuit is designed, including a current sensor, voltage follower, amplification circuit and ADC acquisition circuit. The current value of the signal machine current signal is collected and compared through the dual CPU module, and its status is judged. The DC is isolated by a direct blocking capacitor. Signal and amplifier circuit dynamically control the amplification ratio to improve detection accuracy.
It improves the accuracy of signal state detection and system adaptability, ensures the normal working state of signal current signals, reduces the risk of circuit failure, and enhances the reliability of signal system.
Smart Images

Figure CN118962281A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the technical field of rail transit control, and in particular to a signal light state detection circuit, a signal light state detection method and an electronic device. Background Art
[0002] Signals are the basic trackside equipment for railways and rail transit, and are an important part of the railway signal system. In a railway signal system that uses ground signals as the main signal, drivers must operate according to the display of the signal. The reliability of the signal directly affects the effectiveness of the signal system, so it is particularly important to effectively and reliably detect the status of the signal. Summary of the invention
[0003] In view of this, the embodiments of the present disclosure are intended to provide a signal state detection circuit, a signal state detection method and an electronic device.
[0004] The technical solution of the present disclosure is achieved as follows:
[0005] In a first aspect, the present disclosure provides a signal state detection circuit.
[0006] The signal light state detection circuit provided by the embodiment of the present disclosure includes:
[0007] A current sensor connected to the signal machine and used to convert the current signal of the signal machine into a voltage signal;
[0008] A voltage follower connected to the current sensor, used to isolate and stabilize the voltage signal after passing through the DC blocking capacitor; wherein the DC blocking capacitor is used to isolate the DC signal in the voltage signal;
[0009] an amplifier circuit, connected to the voltage follower, and used to amplify the voltage signal output by the voltage follower by a predetermined multiple;
[0010] An ADC acquisition circuit is electrically connected to the current sensor, the voltage follower and the amplifier circuit, and is used to acquire the first reference voltage of the current sensor, the second reference voltage of the voltage follower, the third reference voltage of the amplifier circuit and the voltage signal output by the amplifier circuit, and convert the voltage signal output by the amplifier circuit into a digital voltage value;
[0011] The dual CPU module is connected to the ADC acquisition circuit and is used to determine the current value of the signal machine current signal based on the digital voltage value output by the ADC acquisition circuit, and to determine the state of the signal machine based on the comparison between the current value of the signal machine current signal and a predetermined threshold value.
[0012] In some embodiments, the dual CPU module includes a first CPU and a second CPU;
[0013] The first CPU and the second CPU are both connected to the ADC acquisition circuit, and are used to respectively obtain the digital voltage value output by the ADC acquisition circuit;
[0014] The first CPU is used to determine a first current value of the signal machine current signal based on the digital voltage value output by the ADC acquisition circuit;
[0015] The second CPU is used to determine a second current value of the signal machine current signal based on the digital voltage value output by the ADC acquisition circuit;
[0016] The dual CPU module is used to determine whether there is a circuit fault in the signal state detection circuit based on the comparison between the first current value and the second current value.
[0017] In some embodiments, the dual CPU module is used to determine the mean square error value of the digital voltage value within a predetermined time period based on the digital voltage value output by the ADC acquisition circuit within a predetermined time period;
[0018] Based on the mean square error value of the digital voltage value within the predetermined time period and the linear relationship between the mean square error value and the current value of the signal machine current signal, the current value of the signal machine current signal is determined.
[0019] In some embodiments, the amplification circuit includes a fixed-multiple amplification circuit, a resistor R3, and an amplification control switch;
[0020] The amplification factor control switch is connected in series with the resistor R3 and then connected in parallel with the fixed factor amplification circuit in the signal state detection circuit.
[0021] In some embodiments, including:
[0022] A signal machine power supply; wherein, the power supply line of the signal machine power supply passes through the threading hole of the current sensor and is connected to the signal machine; the signal machine power supply is used to power the signal machine.
[0023] In a second aspect, the present disclosure provides a signal machine state detection method, which is executed based on a signal machine state detection circuit, wherein the signal machine state detection circuit includes a current sensor connected to the signal machine and used to convert the signal machine current signal into a voltage signal; a voltage follower connected to the current sensor and used to isolate and stabilize the voltage signal after passing through a DC blocking capacitor; wherein the DC blocking capacitor is used to isolate the DC signal in the voltage signal; an amplifier circuit connected to the voltage follower and used to amplify the voltage signal output by the voltage follower by a predetermined multiple; an ADC acquisition circuit electrically connected to the current sensor, the voltage follower and the amplifier circuit, and used to collect a first reference voltage of the current sensor, a second reference voltage of the voltage follower, a third reference voltage of the amplifier circuit and a voltage signal output by the amplifier circuit, and convert the voltage signal output by the amplifier circuit into a digital voltage value; a dual CPU module connected to the ADC acquisition circuit;
[0024] The method comprises:
[0025] Based on the dual CPU modules, the digital voltage value output by the ADC acquisition circuit is obtained, and based on the digital voltage value, the current value of the signal machine current signal is determined;
[0026] The signal state is determined based on a comparison of a current value of the signal current signal with a predetermined threshold value.
[0027] In some embodiments, the dual CPU module includes a first CPU and a second CPU;
[0028] The method of obtaining the digital voltage value output by the ADC acquisition circuit based on the dual CPU module and determining the current value of the signal machine current signal based on the digital voltage value comprises:
[0029] Based on the first CPU, the digital voltage value output by the ADC acquisition circuit is acquired, and based on the digital voltage value, a first current value of the signal machine current signal is determined;
[0030] Based on the second CPU, the digital voltage value output by the ADC acquisition circuit is acquired, and based on the digital voltage value, a second current value of the signal machine current signal is determined;
[0031] The determining the state of the signal based on comparing the current value of the signal current signal with a predetermined threshold value includes: determining whether there is a circuit fault in the signal state detection circuit based on comparing the first current value with the second current value;
[0032] If there is no circuit failure in the signal state detection circuit, the signal state is determined based on a comparison between a current value of the signal current signal and a predetermined threshold value.
[0033] In some embodiments, the predetermined threshold value includes an upper current limit value and a lower current limit value;
[0034] The step of comparing the current value of the signal current signal with a predetermined threshold value to determine the state of the signal includes:
[0035] If the current value of the current signal of the signal machine is between the current upper limit value and the current lower limit value, it is determined that the working state of the signal machine is normal;
[0036] If the current value of the signal current signal is greater than the current upper limit value, or less than the current lower limit value, it is determined that the working state of the signal is abnormal.
[0037] In some embodiments, determining the current value of the signal machine current signal based on the digital voltage value includes:
[0038] Determine the mean square error of the digital voltage value within the predetermined time period based on the digital voltage value output by the ADC acquisition circuit within the predetermined time period;
[0039] Based on the mean square error value of the digital voltage value within the predetermined time period and the linear relationship between the mean square error value and the current value of the signal machine current signal, the current value of the signal machine current signal is determined.
[0040] In a third aspect, the present disclosure provides an electronic device, including:
[0041] The signal state detection circuit described in the first aspect above; wherein the signal state detection circuit is connected to the signal;
[0042] The electronic device is used to detect the working state of the signal through the signal state detection circuit.
[0043] The signal machine state detection circuit provided by the embodiment of the present disclosure includes: a current sensor connected to the signal machine and used to convert the signal machine current signal into a voltage signal; a voltage follower connected to the current sensor and used to isolate and stabilize the voltage signal after passing through the DC blocking capacitor; wherein the DC blocking capacitor is used to isolate the DC signal in the voltage signal; an amplifier circuit connected to the voltage follower and used to amplify the voltage signal output by the voltage follower by a predetermined multiple; an ADC acquisition circuit electrically connected to the current sensor, the voltage follower and the amplifier circuit and used to acquire the first reference voltage of the current sensor, the second reference voltage of the voltage follower, the third reference voltage of the amplifier circuit and the voltage signal output by the amplifier circuit, and convert the voltage signal output by the amplifier circuit into a digital voltage value; a dual CPU module connected to the ADC acquisition circuit and used to determine the current value of the signal machine current signal based on the digital voltage value output by the ADC acquisition circuit, and determine the signal machine state based on the comparison of the current value of the signal machine current signal with a predetermined threshold value. In this application, the DC bias component of the AC voltage signal output by the current sensor is isolated by a DC blocking capacitor. The ADC acquisition circuit adopts multi-channel acquisition and sets a self-detection channel to detect the first reference voltage of the current sensor, the second reference voltage of the voltage follower, the third reference voltage of the amplifier circuit, etc., and realizes the detection of the acquisition circuit and the self-detection function of the ADC chip at the same time. When the current sensor, the voltage follower, and the amplifier circuit function normally, the current value of the signal current signal is determined, and the signal state is determined based on the comparison of the current value of the signal current signal with a predetermined threshold. This is conducive to improving the accuracy of determining the state of the signal.
[0044] Additional aspects and advantages of the present disclosure will be given in part in the following description and in part will be obvious from the following description or learned through practice of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] Figure 1 The structure of a signal machine state detection circuit is shown according to an exemplary embodiment. Figure 1 ;
[0046] Figure 2 The structure of a signal machine state detection circuit is shown according to an exemplary embodiment. Figure 2 ;
[0047] Figure 3 The figure is a flow chart of a signal light state detection method according to an exemplary embodiment. DETAILED DESCRIPTION
[0048] Embodiments of the present disclosure are described in detail below, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to be used to explain the present disclosure, and should not be construed as limiting the present disclosure.
[0049] Signals are the basic trackside equipment for railways and rail transit, and are an important part of the railway signal system. In a railway signal system that uses ground signals as the main signal, drivers must operate according to the display of the signal. The reliability of the signal directly affects the effectiveness of the signal system, so it is particularly important to effectively and reliably detect the status of the signal.
[0050] In view of the above situation, the present disclosure provides a signal state detection circuit. Figure 1 The structure of a signal machine state detection circuit is shown according to an exemplary embodiment. Figure 1 .like Figure 1 As shown, the signal machine state detection circuit includes:
[0051] A current sensor 10, connected to the signal machine, for converting the current signal of the signal machine into a voltage signal;
[0052] A voltage follower 11, connected to the current sensor, for isolating and stabilizing the voltage signal after passing through the DC blocking capacitor; wherein the DC blocking capacitor is used to isolate the DC signal in the voltage signal;
[0053] an amplifier circuit 12, connected to the voltage follower, and used to amplify the voltage signal output by the voltage follower by a predetermined multiple;
[0054] An ADC acquisition circuit 13, electrically connected to the current sensor, the voltage follower and the amplifier circuit, for acquiring a first reference voltage of the current sensor, a second reference voltage of the voltage follower, a third reference voltage of the amplifier circuit and a voltage signal output by the amplifier circuit, and converting the voltage signal output by the amplifier circuit into a digital voltage value;
[0055] The dual CPU module 14 is connected to the ADC acquisition circuit, and is used to determine the current value of the signal machine current signal based on the digital voltage value output by the ADC acquisition circuit, and to determine the state of the signal machine based on comparing the current value of the signal machine current signal with a predetermined threshold.
[0056] In this exemplary embodiment, the current sensor has a DC blocking capacitor. The main function of the DC blocking capacitor is to allow AC signals to pass through while blocking DC signals from passing through. In the circuit, the DC blocking capacitor is used to isolate the DC component so that only the AC signal is transmitted. In the present application, the DC bias component of the AC voltage signal output by the current sensor is isolated by the DC blocking capacitor. The voltage signal output by the DC blocking capacitor is transmitted to the voltage follower. The voltage follower acts as an isolation buffer to isolate the current sensor from the amplification circuit, so that the circuit is very little interfered with.
[0057] The amplifier circuit amplifies the voltage signal after the primary isolation so that its voltage range is suitable for the input range of the ADC acquisition chip. The amplifier circuit can dynamically control the amplification factor so that the input voltage signal is flipped and output according to the preset factor.
[0058] The ADC chip of the ADC acquisition circuit adopts multi-channel acquisition and sets a self-detection channel to detect the output reference voltage of the current sensor, the reference voltage of the amplifier circuit, the output voltage of the voltage follower, etc., and realizes the detection of the acquisition circuit and the self-detection function of the ADC chip at the same time. The ADC sampling chip converts the analog quantity of the collected voltage value into a digital quantity, and sends the digital value to the CPU through the SPI bus.
[0059] In this application, the DC bias component of the AC voltage signal output by the current sensor is isolated by a DC blocking capacitor. The ADC acquisition circuit adopts multi-channel acquisition and sets a self-detection channel to detect the first reference voltage of the current sensor, the second reference voltage of the voltage follower, the third reference voltage of the amplifier circuit, etc., and realizes the detection of the acquisition circuit and the self-detection function of the ADC chip at the same time. When the current sensor, the voltage follower, and the amplifier circuit function normally, the current value of the signal current signal is determined, and the signal state is determined based on the comparison of the current value of the signal current signal with a predetermined threshold. This is conducive to improving the accuracy of determining the state of the signal.
[0060] In some embodiments, the dual CPU module includes a first CPU and a second CPU;
[0061] The first CPU and the second CPU are both connected to the ADC acquisition circuit, and are used to respectively obtain the digital voltage value output by the ADC acquisition circuit;
[0062] The first CPU is used to determine a first current value of the signal machine current signal based on the digital voltage value output by the ADC acquisition circuit;
[0063] The second CPU is used to determine a second current value of the signal machine current signal based on the digital voltage value output by the ADC acquisition circuit;
[0064] The dual CPU module is used to determine whether there is a circuit fault in the signal state detection circuit based on the comparison between the first current value and the second current value.
[0065] In this exemplary embodiment, the tolerance value is determined as the difference in current values collected by the two CPUs through their own independent collection loops. That is, the difference in current value between the first current value and the second current value. This tolerance value is set at 10%, that is, if the current value collected by CPU1 is 120mA, and the current value collected by CPU2 exceeds 120mA±10%, then it is determined that the output collection circuit fault warning is issued.
[0066] In some embodiments, the dual CPU module is used to determine the mean square error value of the digital voltage value within a predetermined time period based on the digital voltage value output by the ADC acquisition circuit within a predetermined time period;
[0067] Based on the mean square error value of the digital voltage value within the predetermined time period and the linear relationship between the mean square error value and the current value of the signal machine current signal, the current value of the signal machine current signal is determined.
[0068] In this exemplary embodiment, for example, the voltage value sampled and output by the ADC is a sine waveform with a frequency of 50 Hz and a period of 20 mS. The CPU collects 32 voltage values every 20 mS and calculates the mean square error value within the 20 mS period by the root mean square algorithm. The formula is as follows:
[0069] Mean square error calculation formula: S∧2=1 / n[(X1-X avg )∧2+(X2-X avg )∧2+……(X n -X avg )∧2], where Xavg is the average value of the initial reference voltage sample, X1, X2, ..., Xn are n collected voltage values, and S is the mean square error value calculated within a fixed period. That is, n = 32, and the CPU calculates the mean square error value S.
[0070] According to the acquisition principle, there is a linear relationship between the mean square error S and the actual signal machine current. The principle is as follows:
[0071] The calculated mean square error value S and the corresponding actual current value Ixh of the signal machine satisfy the linear relationship formula: mean square error value S = w*Ixh+b, w is the weight coefficient, b is the intercept, and Ixh is the signal machine current. Among them, w = N1*N2, N1 is the ratio of the voltage output by the current sensor and the current collected input, and N2 is the amplification factor of the amplifier circuit; among them, N1 and N2 can be determined by circuit parameters.
[0072] By configuring the signal current tolerance value, nominal value, upper limit value and lower limit value through software, the corresponding value can be flexibly configured according to the actual signal current used, thereby realizing judgment output without changing the hardware circuit, thereby increasing the adaptability of the system.
[0073] The signal machine current tolerance value, nominal value, upper limit value and lower limit value are configured in the host computer configuration file. The host computer sends the value to the signal machine current acquisition board, and the signal machine current acquisition board compares the actual current value collected with the configuration file to determine the output result.
[0074] For example, the nominal value of the signal machine current is the current value when a certain light position is normally lit. This nominal current value varies according to the actual signal machine type and the color of the light position. For example, the nominal value of the signal machine current in this embodiment is 120mA, and the upper and lower limits of the current are set according to ±20%, that is, the upper limit of the current is 144mA, and the lower limit of the current is 96mA. If the current value collected by the CPU exceeds this range, it is judged that the output is an over-limit alarm, indicating that the working state of the signal machine is abnormal.
[0075] In some embodiments, Figure 2 The structure of a signal machine state detection circuit is shown according to an exemplary embodiment. Figure 2 .like Figure 2 As shown, the amplifier circuit 22 includes a fixed-multiple amplifier circuit, a resistor R3 and an amplification control switch S;
[0076] The amplification factor control switch S is connected in series with the resistor R3 and then connected in parallel with the fixed factor amplification circuit in the signal state detection circuit.
[0077] In this exemplary embodiment, an amplification speed control switch can be added on the amplifier circuit side, and the CPU sends a control signal to control the switch state, thereby controlling the amplification factor of the amplifier circuit. By setting the expected factor, the CPU periodically sends a control signal to flip the signal amplification factor.
[0078] like Figure 2 As shown, it includes a control switch S. The dual CPU sets whether to connect the resistor R3 in series by periodically controlling the on and off of the switch S. The amplification factor of the amplifier circuit is adjusted by whether to connect R3 in series. According to the preset cycle, the voltage amplification factor is flipped, that is, the value collected by the CPU will also be flipped according to the expected multiple. In this way, the dynamic collection of the signal machine current collection circuit is realized, which enhances the reliability of the system.
[0079] In some embodiments, including:
[0080] Signal power supply; wherein the power supply line of the signal power supply passes through the threading hole of the current sensor 20 and is connected to the signal; the signal power supply is used to power the signal.
[0081] In this exemplary embodiment, Figure 1 The power supply of the signal machine is usually 50HZ AC, and the voltage is generally 110VAC / 220VAC. Pass one of the power supply lines through the threading hole of the current sensor, and then power the signal machine. The current sensor is suitable for various AC voltage-powered signal machines, and converts the signal machine current value into a voltage value through electromagnetic induction. When the default signal machine current is zero, the current sensor works to output the reference voltage Vref1. When the signal machine lights up and there is current, because the current is 50HZ AC current, the current sensor outputs a 50HZ sinusoidal voltage with a DC bias of Vref1.
[0082] The current sensor is powered by a separate isolated power supply, and the voltage value is V+, which ensures the stable operation of the current sensor. The voltage waveform output by the current sensor passes through the DC blocking capacitor to remove the DC bias of Vref1, and then is output to the voltage follower. The reference voltage of the voltage follower is Vref2. After passing through the voltage follower, the voltage waveform outputs an AC voltage with a DC bias of Vref2.
[0083] The reference value of the amplifier circuit and the voltage follower is the same, which is Vref2. The amplifier circuit amplifies the sinusoidal voltage waveform output by the voltage follower by a multiple of N1 to adjust the waveform range and adapt to the input range of the ADC sampling chip.
[0084] The present disclosure provides a signal machine state detection method, which is executed based on a signal machine state detection circuit, wherein the signal machine state detection circuit includes a current sensor connected to the signal machine and used to convert the signal machine current signal into a voltage signal; a voltage follower connected to the current sensor and used to isolate and stabilize the voltage signal after passing through a DC blocking capacitor; wherein the DC blocking capacitor is used to isolate the DC signal in the voltage signal; an amplifier circuit connected to the voltage follower and used to amplify the voltage signal output by the voltage follower by a predetermined multiple; an ADC acquisition circuit electrically connected to the current sensor, the voltage follower and the amplifier circuit and used to acquire a first reference voltage of the current sensor, a second reference voltage of the voltage follower, a third reference voltage of the amplifier circuit and a voltage signal output by the amplifier circuit, and convert the voltage signal output by the amplifier circuit into a digital voltage value; and a dual CPU module connected to the ADC acquisition circuit.
[0085] Figure 3 FIG. 1 is a flow chart of a signal light state detection method according to an exemplary embodiment. Figure 3As shown, the signal machine state detection method includes:
[0086] Step 30: Based on the dual CPU module, the digital voltage value output by the ADC acquisition circuit is obtained, and based on the digital voltage value, the current value of the signal machine current signal is determined;
[0087] Step 31 : Determine the state of the signal based on the comparison between the current value of the signal current signal and a predetermined threshold value.
[0088] In this exemplary embodiment, the current sensor has a DC blocking capacitor. The main function of the DC blocking capacitor is to allow AC signals to pass through while blocking DC signals from passing through. In the circuit, the DC blocking capacitor is used to isolate the DC component so that only the AC signal is transmitted. In the present application, the DC bias component of the AC voltage signal output by the current sensor is isolated by the DC blocking capacitor. The voltage signal output by the DC blocking capacitor is transmitted to the voltage follower. The voltage follower acts as an isolation buffer to isolate the current sensor from the amplification circuit, so that the circuit is very little interfered with.
[0089] The amplifier circuit amplifies the voltage signal after the primary isolation so that its voltage range is suitable for the input range of the ADC acquisition chip. The amplifier circuit can dynamically control the amplification factor so that the input voltage signal is flipped and output according to the preset factor.
[0090] The ADC chip of the ADC acquisition circuit adopts multi-channel acquisition and sets a self-detection channel to detect the output reference voltage of the current sensor, the reference voltage of the amplifier circuit, the output voltage of the voltage follower, etc., and realizes the detection of the acquisition circuit and the self-detection function of the ADC chip at the same time. The ADC sampling chip converts the analog quantity of the collected voltage value into a digital quantity, and sends the digital value to the CPU through the SPI bus.
[0091] In this application, the DC bias component of the AC voltage signal output by the current sensor is isolated by a DC blocking capacitor. The ADC acquisition circuit adopts multi-channel acquisition and sets a self-detection channel to detect the first reference voltage of the current sensor, the second reference voltage of the voltage follower, the third reference voltage of the amplifier circuit, etc., and realizes the detection of the acquisition circuit and the self-detection function of the ADC chip at the same time. When the current sensor, the voltage follower, and the amplifier circuit function normally, the current value of the signal current signal is determined, and the signal state is determined based on the comparison of the current value of the signal current signal with a predetermined threshold. This is conducive to improving the accuracy of determining the state of the signal.
[0092] In some embodiments, the dual CPU module includes a first CPU and a second CPU;
[0093] The method of obtaining the digital voltage value output by the ADC acquisition circuit based on the dual CPU module and determining the current value of the signal machine current signal based on the digital voltage value comprises:
[0094] Based on the first CPU, the digital voltage value output by the ADC acquisition circuit is acquired, and based on the digital voltage value, a first current value of the signal machine current signal is determined;
[0095] Based on the second CPU, the digital voltage value output by the ADC acquisition circuit is acquired, and based on the digital voltage value, a second current value of the signal machine current signal is determined;
[0096] The determining the state of the signal based on comparing the current value of the signal current signal with a predetermined threshold value includes: determining whether there is a circuit fault in the signal state detection circuit based on comparing the first current value with the second current value;
[0097] If there is no circuit failure in the signal state detection circuit, the signal state is determined based on a comparison between a current value of the signal current signal and a predetermined threshold value.
[0098] In this exemplary embodiment, the tolerance value is determined as the difference in current values collected by the two CPUs through their own independent collection loops. That is, the difference in current value between the first current value and the second current value. This tolerance value is set at 10%, that is, if the current value collected by CPU1 is 120mA, and the current value collected by CPU2 exceeds 120mA±10%, then it is determined that the output collection circuit fault warning is issued.
[0099] In some embodiments, the predetermined threshold value includes an upper current limit value and a lower current limit value;
[0100] The step of comparing the current value of the signal current signal with a predetermined threshold value to determine the state of the signal includes:
[0101] If the current value of the current signal of the signal machine is between the current upper limit value and the current lower limit value, it is determined that the working state of the signal machine is normal;
[0102] If the current value of the signal current signal is greater than the current upper limit value, or less than the current lower limit value, it is determined that the working state of the signal is abnormal.
[0103] In this exemplary embodiment, the signal current tolerance value, nominal value, upper limit value, and lower limit value are configured through software. The corresponding values can be flexibly configured according to the different signal currents actually used, thereby achieving judgment output without changing the hardware circuit, thereby increasing the adaptability of the system.
[0104] The signal machine current tolerance value, nominal value, upper limit value and lower limit value are configured in the host computer configuration file. The host computer sends the value to the signal machine current acquisition board, and the signal machine current acquisition board compares the actual current value collected with the configuration file to determine the output result.
[0105] For example, the nominal value of the signal machine current is the current value when a certain light position is normally lit. This nominal current value varies according to the actual signal machine type and the color of the light position. For example, the nominal value of the signal machine current in this embodiment is 120mA, and the upper and lower limits of the current are set according to ±20%, that is, the upper limit of the current is 144mA, and the lower limit of the current is 96mA. If the current value collected by the CPU exceeds this range, it is judged that the output is an over-limit alarm, indicating that the working state of the signal machine is abnormal.
[0106] In some embodiments, determining the current value of the signal machine current signal based on the digital voltage value includes:
[0107] Determine the mean square error of the digital voltage value within the predetermined time period based on the digital voltage value output by the ADC acquisition circuit within the predetermined time period;
[0108] Based on the mean square error value of the digital voltage value within the predetermined time period and the linear relationship between the mean square error value and the current value of the signal machine current signal, the current value of the signal machine current signal is determined.
[0109] In this exemplary embodiment, for example, the voltage value sampled and output by the ADC is a sine waveform with a frequency of 50 Hz and a period of 20 mS. The CPU collects 32 voltage values every 20 mS and calculates the mean square error value within the 20 mS period by the root mean square algorithm. The formula is as follows:
[0110] Mean square error calculation formula: S∧2=1 / n[(X1-X avg )∧2+(X2-X avg )∧2+……(X n -X avg )∧2], where Xavg is the average value of the initial reference voltage sample, X1, X2, ..., Xn are n collected voltage values, and S is the mean square error value calculated within a fixed period. That is, n = 32, and the CPU calculates the mean square error value S.
[0111] According to the acquisition principle, there is a linear relationship between the mean square error S and the actual signal machine current. The principle is as follows:
[0112] The calculated mean square error value S and the corresponding actual current value Ixh of the signal machine satisfy the linear relationship formula: mean square error value S = w*Ixh+b, w is the weight coefficient, b is the intercept, and Ixh is the signal machine current. Among them, w = N1*N2, N1 is the ratio of the voltage output by the current sensor and the current collected input, and N2 is the amplification factor of the amplifier circuit; among them, N1 and N2 can be determined by circuit parameters.
[0113] The present disclosure provides an electronic device, comprising:
[0114] The signal machine state detection circuit described in the above embodiments; wherein the signal machine state detection circuit is connected to the signal machine;
[0115] The electronic device is used to detect the working state of the signal through the signal state detection circuit.
[0116] It should be noted that the logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be specifically implemented in any computer-readable medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can determine instructions from an instruction execution system, device or apparatus and execute instructions), or in combination with these instruction execution systems, devices or apparatuses. For the purposes of this specification, "computer-readable medium" can be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in combination with these instruction execution systems, devices or apparatuses. More specific examples of computer-readable media (a non-exhaustive list) include the following: an electrical connection portion with one or more wirings (electronic device), a portable computer disk box (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium and then editing, interpreting or otherwise processing in a suitable manner if necessary, and then stored in a computer memory.
[0117] It should be understood that the various parts of the present disclosure can be implemented in hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, multiple steps or methods can be implemented in software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.
[0118] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present disclosure. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.
[0119] In the description of the present disclosure, it should be understood that the terms "center", "longitudinal", "lateral", "length", "width", "thickness", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside", "clockwise", "counterclockwise", "axial", "radial", "circumferential" and the like indicate orientations or positional relationships based on the orientations or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present disclosure and simplifying the description, and do not indicate or imply that the referred device or element must have a specific orientation, be constructed and operated in a specific orientation, and therefore should not be understood as a limitation on the present disclosure.
[0120] In addition, the terms "first", "second", etc. used in the embodiments of the present disclosure are only used for descriptive purposes and should not be understood as indicating or implying relative importance, or implicitly indicating the number of technical features indicated in the embodiments. Therefore, the features defined by the terms "first", "second", etc. in the embodiments of the present disclosure may explicitly or implicitly indicate that at least one of the features is included in the embodiment. In the description of the present disclosure, the word "multiple" means at least two or two or more, such as two, three, four, etc., unless otherwise clearly and specifically defined in the embodiments.
[0121] In the present disclosure, unless otherwise clearly specified or limited in the embodiments, the terms "installed", "connected", "connected" and "fixed" etc. appearing in the embodiments should be understood in a broad sense. For example, the connection can be a fixed connection, a detachable connection, or an integrated connection. It can be understood that it can also be a mechanical connection, an electrical connection, etc.; of course, it can also be a direct connection, or an indirect connection through an intermediate medium, or it can be the internal connection of two elements, or the interaction relationship between two elements. For ordinary technicians in this field, the specific meanings of the above terms in the present disclosure can be understood according to the specific implementation situation.
[0122] In the present disclosure, unless otherwise clearly specified and limited, a first feature being "above" or "below" a second feature may mean that the first and second features are in direct contact, or the first and second features are in indirect contact through an intermediate medium. Moreover, a first feature being "above", "above" or "above" a second feature may mean that the first feature is directly above or obliquely above the second feature, or simply means that the first feature is higher in level than the second feature. A first feature being "below", "below" or "below" a second feature may mean that the first feature is directly below or obliquely below the second feature, or simply means that the first feature is lower in level than the second feature.
[0123] Although the embodiments of the present disclosure have been shown and described above, it is to be understood that the above embodiments are exemplary and are not to be construed as limitations of the present disclosure. A person skilled in the art may change, modify, replace and vary the above embodiments within the scope of the present disclosure.
Claims
1. A signal machine state detection circuit, characterized in that: include: A current sensor connected to the signal machine and used to convert the current signal of the signal machine into a voltage signal; A voltage follower connected to the current sensor, used to isolate and stabilize the voltage signal after passing through the DC blocking capacitor; wherein the DC blocking capacitor is used to isolate the DC signal in the voltage signal; an amplifier circuit, connected to the voltage follower, and used to amplify the voltage signal output by the voltage follower by a predetermined multiple; An ADC acquisition circuit is electrically connected to the current sensor, the voltage follower and the amplifier circuit, and is used to acquire the first reference voltage of the current sensor, the second reference voltage of the voltage follower, the third reference voltage of the amplifier circuit and the voltage signal output by the amplifier circuit, and convert the voltage signal output by the amplifier circuit into a digital voltage value; The dual CPU module is connected to the ADC acquisition circuit and is used to determine the current value of the signal machine current signal based on the digital voltage value output by the ADC acquisition circuit, and to determine the state of the signal machine based on the comparison between the current value of the signal machine current signal and a predetermined threshold value.
2. The signal state detection circuit according to claim 1, characterized in that: The dual CPU module includes a first CPU and a second CPU; The first CPU and the second CPU are both connected to the ADC acquisition circuit, and are used to respectively obtain the digital voltage value output by the ADC acquisition circuit; The first CPU is used to determine a first current value of the signal machine current signal based on the digital voltage value output by the ADC acquisition circuit; The second CPU is used to determine a second current value of the signal machine current signal based on the digital voltage value output by the ADC acquisition circuit; The dual CPU module is used to determine whether there is a circuit fault in the signal state detection circuit based on the comparison between the first current value and the second current value.
3. The signal state detection circuit according to claim 1, characterized in that: The dual CPU module is used to determine the mean square error value of the digital quantity voltage value within a predetermined time period based on the digital quantity voltage value output by the ADC acquisition circuit within a predetermined time period; Based on the mean square error value of the digital voltage value within the predetermined time period and the linear relationship between the mean square error value and the current value of the signal machine current signal, the current value of the signal machine current signal is determined.
4. The signal state detection circuit according to claim 1, characterized in that: The amplification circuit includes a fixed-multiple amplification circuit, a resistor R3 and an amplification control switch; The amplification factor control switch is connected in series with the resistor R3 and then connected in parallel with the fixed factor amplification circuit in the signal state detection circuit.
5. The signal state detection circuit according to claim 1, characterized in that: include: A signal machine power supply; wherein, the power supply line of the signal machine power supply passes through the threading hole of the current sensor and is connected to the signal machine; the signal machine power supply is used to power the signal machine.
6. A signal machine state detection method, characterized in that: Executed based on a signal machine state detection circuit, wherein the signal machine state detection circuit includes a current sensor connected to the signal machine and used to convert the signal machine current signal into a voltage signal; a voltage follower connected to the current sensor and used to isolate and stabilize the voltage signal after passing through a DC blocking capacitor; wherein the DC blocking capacitor is used to isolate the DC signal in the voltage signal; an amplifier circuit connected to the voltage follower and used to amplify the voltage signal output by the voltage follower by a predetermined multiple; an ADC acquisition circuit electrically connected to the current sensor, the voltage follower and the amplifier circuit and used to acquire the first reference voltage of the current sensor, the second reference voltage of the voltage follower, the third reference voltage of the amplifier circuit and the voltage signal output by the amplifier circuit, and convert the voltage signal output by the amplifier circuit into a digital voltage value; a dual CPU module connected to the ADC acquisition circuit; The method comprises: Based on the dual CPU modules, the digital voltage value output by the ADC acquisition circuit is obtained, and based on the digital voltage value, the current value of the signal machine current signal is determined; The signal state is determined based on a comparison of a current value of the signal current signal with a predetermined threshold value.
7. The signal state detection method according to claim 6, characterized in that: The dual CPU module includes a first CPU and a second CPU; The method of obtaining the digital voltage value output by the ADC acquisition circuit based on the dual CPU module and determining the current value of the signal machine current signal based on the digital voltage value comprises: Based on the first CPU, the digital voltage value output by the ADC acquisition circuit is acquired, and based on the digital voltage value, a first current value of the signal machine current signal is determined; Based on the second CPU, the digital voltage value output by the ADC acquisition circuit is acquired, and based on the digital voltage value, a second current value of the signal machine current signal is determined; The determining the state of the signal based on comparing the current value of the signal current signal with a predetermined threshold value includes: determining whether there is a circuit fault in the signal state detection circuit based on comparing the first current value with the second current value; If there is no circuit failure in the signal state detection circuit, the signal state is determined based on a comparison between a current value of the signal current signal and a predetermined threshold value.
8. The signal state detection method according to claim 7, characterized in that: The predetermined threshold value includes an upper current limit value and a lower current limit value; The step of comparing the current value of the signal current signal with a predetermined threshold value to determine the state of the signal includes: If the current value of the signal current signal is between the current upper limit value and the current lower limit value, it is determined that the signal is in a normal working state; If the current value of the signal current signal is greater than the current upper limit value, or less than the current lower limit value, it is determined that the working state of the signal is abnormal.
9. The signal state detection method according to claim 6, characterized in that: The step of determining the current value of the signal machine current signal based on the digital voltage value includes: Determine the mean square error of the digital voltage value within the predetermined time period based on the digital voltage value output by the ADC acquisition circuit within the predetermined time period; Based on the mean square error value of the digital voltage value within the predetermined time period and the linear relationship between the mean square error value and the current value of the signal machine current signal, the current value of the signal machine current signal is determined.
10. An electronic device, characterized in that: include: The signal state detection circuit according to any one of claims 1 to 5; wherein the signal state detection circuit is connected to the signal; The electronic device is used to detect the working state of the signal through the signal state detection circuit.
