Digital zero-crossing shaping circuit and method

By using a digital zero-crossing plastic circuit in power line carrier communication, the half-period length of the power line signal is detected by counting units, and ideal zero-crossing points are calculated and generated, the problem of large deviation in the zero-crossing moment in the prior art is solved, and high-precision and high-efficiency zero-crossing plastic shaping is achieved, and signal consistency and stability are improved.

CN119696621APending Publication Date: 2025-03-25深圳市力合微电子股份有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411553035.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-01
Publication Date
2025-03-25

AI Technical Summary

Technical Problem

In power line carrier communication, it is difficult for the prior art to achieve high-precision and high-efficiency zero-crossing plastic surgery, resulting in large deviations and unstable zero-crossing moments, affecting signal consistency and communication quality.

Method used

A digital zero crossing shaping circuit is adopted, including an input processing unit, an edge detection unit, a counting unit and an output generation unit. By detecting the jump of the power line digital signal, the counting unit is used to detect the half-period length of the original zero crossing signal, and calculate and generate an ideal zero crossing point to achieve high-precision zero crossing shaping.

Benefits of technology

This circuit can reduce the zero-crossing time deviation caused by zero-crossing voltage fluctuations, improve the consistency and stability of the zero-crossing signal, reduce the impact of the external environment on the plastic shaping effect, and save components and processor computing resources on the communication module.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119696621A_ABST
    Figure CN119696621A_ABST
Patent Text Reader

Abstract

The invention relates to a digital zero-crossing shaping circuit and a digital zero-crossing shaping method, which have high precision and high timeliness and solve the problems of consistency and stability of zero-crossing signals in power line carrier communication. In the digital zero-crossing shaping circuit, an input processing unit converts an analog signal into a digital signal, an edge detection unit detects signal jump, and two groups of counting units are cascaded to work and alternately generate a zero-crossing signal. The maximum count value of the counting unit 3 and the counting unit 4 depends on the count value of the previous period so as to adapt to power line voltage fluctuation and guarantee the ideality of zero-crossing signals. According to the circuit, the external environment influence is reduced, the zero-crossing signal is accurately and finely adjusted, the processing and transmission delay is compensated, the zero-crossing time consistency between communication modules is improved, components are saved, and the calculation burden of a processor is reduced. The zero-crossing signals are alternately generated in a mode of cascading the two counting units, the symmetry of zero-crossing points of an original power line is fully utilized, and the situation that the zero-crossing points are inconsistent due to zero-crossing voltage fluctuation is avoided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to power line carrier communication technology, and in particular to a digital zero-crossing shaping circuit and method. Background Art

[0002] In scenarios such as power line carrier communication, in order to obtain unified time slot information, a zero-crossing detection circuit is usually built on the PCB and combined with a processor to obtain a zero-crossing signal. This method not only adds additional components, but also the parameter deviation of the device (such as flip voltage) easily leads to large deviations in the zero-crossing time obtained between different communication modules for the same power line channel. In addition, the signal processing time of the processor not only consumes processor computing resources, but also further expands the zero-crossing time deviation. At the same time, considering that the power line channel itself is susceptible to external interference, the zero-crossing time itself has certain fluctuations. For example, the actual frequency of a 50Hz power line will fluctuate around 50Hz.

[0003] It should be noted that the information disclosed in the above background technology section is only used for understanding the background of the present application, and therefore may include information that does not constitute prior art known to ordinary technicians in the field. Summary of the invention

[0004] The main purpose of the present invention is to overcome the defects existing in the above-mentioned background technology and provide a high-precision and high-efficiency digital zero-crossing shaping circuit and method.

[0005] To achieve the above object, the present invention adopts the following technical solutions:

[0006] A digital zero-crossing shaping circuit includes an input processing unit, an edge detection unit, a counting unit 1, a counting unit 2, a counting unit 3, a counting unit 4 and an output generating unit:

[0007] The input processing unit is used to convert the power line analog signal into a digital signal, the input end of which is connected to the power line channel, and the output end of which is connected to the edge detection unit;

[0008] The edge detection unit is used to detect the jump of the power line digital signal. When a rising edge is detected, the counting unit 1 is started and the counting unit 2 is stopped. When a falling edge is detected, the counting unit 2 is started and the counting unit 1 is stopped.

[0009] The output of the counting unit 1 is connected to the counting unit 3. When the counting unit 1 stops counting, the maximum counting value of the counting unit 3 is recalculated and updated according to its current counting value, and the counting unit 3 is started;

[0010] The output of the counting unit 2 is connected to the counting unit 4. When the counting unit 2 stops counting, the maximum counting value of the counting unit 4 is recalculated and updated according to its current counting value, and the counting unit 4 is started;

[0011] The output of the counting unit 3 is connected to the output generating unit. When the counting unit 3 counts to its maximum value, it stops counting and generates an event that the output generating unit flips the output signal.

[0012] The output of the counting unit 4 is connected to the output generating unit. When the counting unit 4 counts to its maximum value, it stops counting and generates an event that the output generating unit flips the output signal.

[0013] The output generation unit generates a shaped zero-crossing signal according to the input flip event

[0014] A digital zero-crossing shaping method using the digital zero-crossing shaping circuit comprises the following steps:

[0015] S301, the edge detection unit detects the output generated by the input processing unit;

[0016] S302, if the edge detection unit detects edge 1, execute S303, if edge 2 is detected, execute S308, if no edge is detected, execute S301;

[0017] S303, start the counting unit 1 and restart counting from 0;

[0018] S304, stop the counting unit 2, and record the current count value 2 of the counting unit 2, and recalculate and update the maximum count value 4 of the counting unit 4 according to the count value;

[0019] S305, start the counting unit 4 and restart counting from 0;

[0020] S306, determining whether the current counting unit 4 has counted to the maximum count value 4, if yes, executing S307, if no, continuing counting, and executing S301 at the same time;

[0021] S307, stop and reset the counting unit 4, and execute S313;

[0022] S308, start the counting unit 2 and restart counting from 0;

[0023] S309, stop the counting unit 1, and record the current count value 1 of the counting unit 1, and recalculate and update the maximum count value 3 of the counting unit 3 according to the count value;

[0024] S310, starting the counting unit 3 and restarting counting from 0;

[0025] S311, determining whether the current counting unit 3 has reached the maximum count value 3, if yes, executing S312, if no, continue counting and execute S301 at the same time;

[0026] S312, stop and reset the counting unit 3, and execute S313;

[0027] S313, flip the output signal and continue to execute S301.

[0028] The present invention has the following beneficial effects:

[0029] The present invention provides a digital zero-crossing shaping circuit, which can reduce the excessive deviation of the zero-crossing time (inconsistent zero-crossing time) and instability caused by zero-crossing voltage fluctuation, while reducing the analog zero-crossing detection circuit, improving the consistency and stability of the zero-crossing signal, and proposes a high-precision and high-efficiency digital zero-crossing shaping circuit.

[0030] The present invention uses a counting unit to detect the half-cycle length of the original zero-crossing signal, and calculates and generates the ideal zero-crossing point of the original zero-crossing signal accordingly. The maximum count values ​​of the counting unit 3 and the counting unit 4 are respectively dependent on the count value of the previous half-cycle (i.e., the count value when the counting unit 1 and the counting unit 2 are stopped), so once the original power line voltage fluctuates as a whole (such as being too high or too low), the zero-crossing signal can be adjusted in time to ensure that the shaped zero-crossing signal is still ideal.

[0031] Compared with the prior art, the digital zero-crossing shaping circuit proposed in the present invention reduces the influence of the external environment on the shaping effect, and avoids the situation that the zero-crossing point is inconsistent due to the zero-crossing voltage fluctuation. When the original power line voltage fluctuates as a whole, the zero-crossing signal can be adjusted in time to ensure that the zero-crossing signal after shaping is still ideal. The signal after zero-crossing shaping can be accurately fine-tuned, and the processing time of the shaping module and the early signal transmission time can be compensated at the same time. By adopting the method of digital circuit implementation, the present invention reduces the influence of the external environment on the shaping effect. By adopting the method of cascading two groups of counting units to alternately generate zero-crossing signals, the present invention makes full use of the symmetry of the original power line zero-crossing point, and avoids the situation that the zero-crossing point is inconsistent due to the zero-crossing voltage fluctuation.

[0032] By adopting the present invention and integrating the technology on the communication chip, the components of the zero-crossing detection circuit on the communication module can be saved on the one hand, and the precious computing resources of the processor can be saved on the other hand. At the same time, after being processed by the digital zero-crossing shaping circuit, the influence of the frequency fluctuation of the power line itself can be reduced on the one hand, and the zero-crossing time deviation between the communication modules can be reduced on the other hand. The high consistency of the same action at the zero-crossing time can be guaranteed through the processor interrupt mode.

[0033] Other beneficial effects of the embodiments of the present invention will be further described below. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] Figure 1 4 is a block diagram of a zero-crossing shaping circuit structure according to an embodiment of the present invention.

[0035] Figure 2 A schematic diagram of a zero-crossing shaping timing sequence according to an embodiment of the present invention;

[0036] Figure 3 Flow chart of the zero-crossing shaping method according to an embodiment of the present invention. DETAILED DESCRIPTION

[0037] The following is a detailed description of the embodiments of the present invention. It should be emphasized that the following description is only exemplary and is not intended to limit the scope and application of the present invention.

[0038] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features. In the description of the embodiments of the present invention, the meaning of "plurality" is two or more, unless otherwise clearly and specifically defined.

[0039] In the present invention, "counting units 1 to 4" represent different counting units. The numbers "1 to 4" are not used to represent reference numerals.

[0040] See also Figures 1 to 3 The embodiment of the present invention provides a zero-crossing shaping circuit, comprising: an input processing unit, an edge detection unit, a counting unit 1, a counting unit 2, a counting unit 3, a counting unit 4 and an output generating unit, wherein the input end of the input processing unit is connected to a power line channel, and the output of the input processing unit is connected to the edge detection unit, which is used to convert the power line analog signal into a digital signal; the output of the edge detection unit is connected to the counting unit 1 and the counting unit 2, and when a jump of the power line digital signal is detected, the counting unit 1 and the counting unit 2 are started / stopped respectively; the output of the counting unit 1 is connected to the calculation unit 3, and when the counting unit 1 stops counting, the maximum count of the counting unit 3 is recalculated and updated according to its current count value value, and start the counting unit 3; the output of the counting unit 2 is connected to the counting unit 4, and when the counting unit 2 stops counting, the maximum counting value of the counting unit 4 is recalculated and updated according to its current counting value, and the counting unit 4 is started; the output of the counting unit 3 is connected to the output generating unit, and the counting unit 3 stops counting when counting to its maximum value, and generates an event of the output generating unit flipping the output signal; the output of the counting unit 4 is connected to the output generating unit, and the counting unit 4 stops counting when counting to its maximum value, and generates an event of the output generating unit flipping the output signal; the output generating unit generates an output signal according to the input flipping event, that is, the shaped zero-crossing signal.

[0041] In some embodiments, the input processing unit has the function of converting analog signals into digital signals and filtering out glitches that occur during the conversion process.

[0042] In some embodiments, the edge detection unit, the counting unit 1 , the counting unit 2 , the counting unit 3 , and the counting unit 4 use a high-speed clock.

[0043] In the zero-crossing shaping circuit of the present invention, the zero-crossing signal is alternately generated by using the mode of two groups of counting units cascaded, which makes full use of the symmetry of the zero-crossing point of the power line, and avoids the problem of inconsistent zero-crossing points caused by voltage fluctuations. The maximum count value of counting unit 3 and counting unit 4 depends on the count value of the last half cycle, so that the circuit can adjust the zero-crossing signal in time, even when the power line voltage fluctuates as a whole, the zero-crossing signal after shaping can be kept ideal. In addition, the circuit can also accurately fine-tune the signal after zero-crossing shaping, and compensate the processing time of the shaping module and the early signal transmission time, further ensuring the accuracy of the zero-crossing signal. This circuit is integrated on the communication chip, saving the zero-crossing detection circuit components on the communication module, reducing the computing resource consumption of the processor, and reducing the power line frequency fluctuation itself and the deviation of the zero-crossing moment between different communication modules, and the high consistency of the zero-crossing moment can be realized by the processor interrupt mode. In general, the present invention realizes the accurate control of the zero-crossing signal through its high-precision and high-efficiency digital zero-crossing shaping circuit.

[0044] See also Figure 3 , a digital zero-crossing shaping method using the digital zero-crossing shaping circuit comprises the following steps:

[0045] S301, the edge detection unit detects the output generated by the input processing unit;

[0046] S302, if the edge detection unit detects edge 1, execute S303, if edge 2 is detected, execute S308, if no edge is detected, execute S301;

[0047] S303, start the counting unit 1 and restart counting from 0;

[0048] S304, stop the counting unit 2, and record the current count value 2 of the counting unit 2, and recalculate and update the maximum count value 4 of the counting unit 4 according to the count value;

[0049] S305, start the counting unit 4 and restart counting from 0;

[0050] S306, determining whether the current counting unit 4 has counted to the maximum count value 4, if yes, executing S307, if no, continuing counting, and executing S301 at the same time;

[0051] S307, stop and reset the counting unit 4, and execute S313; S308, start the counting unit 2, and start counting from 0 again;

[0052] S309, stop the counting unit 1, and record the current count value 1 of the counting unit 1, and recalculate and update the maximum count value 3 of the counting unit 3 according to the count value;

[0053] S310, starting the counting unit 3 and restarting counting from 0;

[0054] S311, determining whether the current counting unit 3 has reached the maximum count value 3, if yes, executing S312, if no, continue counting and execute S301 at the same time;

[0055] S312, stop and reset the counting unit 3, and execute S313; S313, flip the output signal, and continue to execute S301.

[0056] In the embodiment of the present invention, a high-speed counting unit is used to detect the half-cycle length of the original zero-crossing signal, and the ideal zero-crossing point of the original zero-crossing signal is calculated and generated accordingly.

[0057] The maximum count values ​​of the counting unit 3 and the counting unit 4 are respectively dependent on the count values ​​of the previous half cycle (i.e., the count values ​​when the counting unit 1 and the counting unit 2 are stopped). Therefore, once the original power line voltage fluctuates as a whole (such as being too high or too low), the zero-crossing signal can be adjusted in time to ensure that the shaped zero-crossing signal is still ideal.

[0058] By using a high-speed clock for counting, the signal after zero-crossing shaping can be precisely fine-tuned, and the processing time of the shaping module and the previous signal transmission time can be compensated at the same time.

[0059] The maximum count value of the counting unit 3 = 1.5 * ideal half-cycle count value of the power frequency - 0.5 * the count value of the counting unit 1 when it stops - fixed offset count value + configurable offset count value 1

[0060] The maximum count value of the counting unit 4 = 1.5 * ideal half-cycle count value of the power frequency - 0.5 * the count value of the counting unit 2 when it stops - fixed offset count value + configurable offset count value 2

[0061] The fixed offset count value is used to combine with the configurable offset count value to achieve advance and delay adjustment of the shaped zero-crossing signal.

[0062] Compared with the prior art, the digital zero-crossing shaping circuit and method proposed in the present invention reduce the influence of the external environment on the shaping effect, and avoid the situation that the zero-crossing point is inconsistent due to the zero-crossing voltage fluctuation. When the original power line voltage fluctuates as a whole, the zero-crossing signal can be adjusted in time to ensure that the zero-crossing signal after shaping is still ideal. The signal after zero-crossing shaping can be accurately fine-tuned, and the processing time of the shaping module and the early signal transmission time can be compensated at the same time. By adopting the method of digital circuit implementation, the present invention reduces the influence of the external environment on the shaping effect. By adopting the method of cascading two groups of counting units to alternately generate zero-crossing signals, the present invention makes full use of the symmetry of the original power line zero-crossing point, and avoids the situation that the zero-crossing point is inconsistent due to the zero-crossing voltage fluctuation.

[0063] The above contents are further detailed descriptions of the present invention in combination with specific preferred embodiments, and it cannot be determined that the specific implementation of the present invention is limited to these descriptions. For those skilled in the art of the present invention, several equivalent substitutions or obvious variations can be made without departing from the concept of the present invention, and the performance or use is the same, which should be regarded as belonging to the protection scope of the present invention.

Claims

1. A digital zero-crossing shaping circuit, characterized in that: It includes an input processing unit, an edge detection unit, a counting unit 1, a counting unit 2, a counting unit 3, a counting unit 4 and an output generating unit: The input processing unit is used to convert the power line analog signal into a digital signal, the input end of which is connected to the power line channel, and the output end of which is connected to the edge detection unit; The edge detection unit is used to detect the jump of the power line digital signal. When a rising edge is detected, the counting unit 1 is started and the counting unit 2 is stopped. When a falling edge is detected, the counting unit 2 is started and the counting unit 1 is stopped. The output of the counting unit 1 is connected to the counting unit 3. When the counting unit 1 stops counting, the maximum counting value of the counting unit 3 is recalculated and updated according to its current counting value, and the counting unit 3 is started; The output of the counting unit 2 is connected to the counting unit 4. When the counting unit 2 stops counting, the maximum counting value of the counting unit 4 is recalculated and updated according to its current counting value, and the counting unit 4 is started; The output of the counting unit 3 is connected to the output generating unit. When the counting unit 3 counts to its maximum value, it stops counting and generates an event that the output generating unit flips the output signal. The output of the counting unit 4 is connected to the output generating unit. When the counting unit 4 counts to its maximum value, it stops counting and generates an event that the output generating unit flips the output signal. The output generation unit generates a shaped zero-crossing signal according to an input flip event.

2. The digital zero-crossing shaping circuit according to claim 1, characterized in that: The input processing unit is configured to filter out glitches occurring during the conversion process while converting the analog signal into a digital signal.

3. The digital zero-crossing shaping circuit according to claim 1 or 2, characterized in that: The edge detection unit, the counting unit 1, the counting unit 2, the counting unit 3 and the counting unit 4 use a high-speed clock.

4. A digital zero-crossing shaping method using the digital zero-crossing shaping circuit according to claims 1 to 3, characterized in that: The steps include: S301, the edge detection unit detects the output generated by the input processing unit; S302, if the edge detection unit detects edge 1, execute S303, if edge 2 is detected, execute S308, if no edge is detected, execute S301; S303, start the counting unit 1 and restart counting from 0; S304, stop the counting unit 2, and record the current count value 2 of the counting unit 2, and recalculate and update the maximum count value 4 of the counting unit 4 according to the count value; S305, start the counting unit 4 and restart counting from 0; S306, determining whether the current counting unit 4 has counted to the maximum count value 4, if yes, executing S307, if no, continuing counting, and executing S301 at the same time; S307, stop and reset the counting unit 4, and execute S313; S308, start the counting unit 2 and restart counting from 0; S309, stop the counting unit 1, and record the current count value 1 of the counting unit 1, and recalculate and update the maximum count value 3 of the counting unit 3 according to the count value; S310, starting the counting unit 3 and restarting counting from 0; S311, determining whether the current counting unit 3 has reached the maximum count value 3, if yes, executing S312, if no, continue counting and execute S301 at the same time; S312, stop and reset the counting unit 3, and execute S313; S313, flip the output signal and continue to execute S301.