ASK signal filtering method and device

文档序号:1524046 发布日期:2020-02-11 浏览:7次 中文

阅读说明:本技术 一种ask信号滤波方法及设备 (ASK signal filtering method and device ) 是由 詹小强 于 2019-11-04 设计创作,主要内容包括:本发明涉及无线充电领域,尤其是用于解调ASK调制信号的滤波方法及无线充电设备。该滤波方法步骤包括:接收所述ASK信号,自上一个bit解调结束起,初始化电平累计时间为0,初始化获电平跳变次数为0,循环获取电平持续时间,所述电平持续时间为两次跳转之间的电平时间,每次获取到电平持续时间时,将其累加至所述电平累计时间,将所述电平跳变次数加1,如果所述电平跳变次数为大于等于1的奇数时根据所述电平累计时间给当前bit赋值;如果所述电平累计时间大于第一阈值,或所述电平跳变次数大于1且当前电平持续时间大于第二阈值时,跳出循环,流程结束。本发明在主流解调逻辑上添加更优秀的滤波方法,使得解调能力有了显著的提高。(The invention relates to the field of wireless charging, in particular to a filtering method for demodulating an ASK (amplitude shift keying) modulation signal and wireless charging equipment. The filtering method comprises the following steps: receiving the ASK signal, initializing the level accumulation time to be 0 from the end of the last bit demodulation, initializing the level jump time to be 0, circularly acquiring the level duration time, wherein the level duration time is the level time between two jumps, accumulating the level duration time to the level accumulation time when the level duration time is acquired each time, adding 1 to the level jump time, and assigning a value to the current bit according to the level accumulation time if the level jump time is an odd number which is more than or equal to 1; and if the level accumulated time is greater than a first threshold value, or the level jump times are greater than 1 and the current level duration is greater than a second threshold value, jumping out of the loop and ending the process. The invention adds more excellent filtering method on mainstream demodulation logic, so that the demodulation capability is obviously improved.)

1. An ASK signal filtering method, characterized by:

receiving the ASK signal;

initializing the level accumulation time to be 0 and initializing the level jump times to be 0 since the last bit demodulation is finished;

circularly acquiring the level duration, wherein the level duration is the level time between two jumps;

accumulating the level duration time to the level accumulation time every time the level duration time is acquired, and adding 1 to the level jump times;

if the level jump times are odd numbers which are more than or equal to 1, assigning a value to the current bit according to the level accumulated time;

and if the accumulated time of the level is greater than a first threshold value, or the number of the level jumps is greater than 1 and the duration time of the current level is greater than a second threshold value, jumping out of the loop and ending the process.

2. The ASK signal filtering method of claim 1, wherein: the first threshold is preset to 600 us.

3. The ASK signal filtering method of claim 1, wherein: the second threshold is preset to 140 us.

4. The ASK signal filtering method according to any one of claims 1 to 3, wherein: the threshold adjustment is performed before the ASK signal filtering method is executed, and the threshold adjustment specifically includes: and continuously acquiring the duty ratios of the first N bits, and determining the second threshold according to the duty ratios.

5. The ASK signal filtering method of claim 4, wherein: the determining the second threshold according to the duty ratio is specifically performed by adopting the following formula:

the second threshold value is (duty ratio/0.5) × the second threshold value preset value.

6. An ASK signal filtering method, characterized by:

receiving the ASK signal;

initializing the level accumulation time to be 0 and initializing the level jump times to be 0 since the last bit demodulation is finished;

circularly acquiring the level duration, wherein the level duration is the level time between two jumps;

accumulating the level duration time to the level accumulation time every time the level duration time is acquired, and adding 1 to the level jump times;

when the level jump times are odd numbers larger than 1, assigning a value to the current bit according to the level accumulated time;

when the level jump times are even numbers which are larger than 0, recording the current level duration as a peak level time;

if: and when the level accumulation time is greater than a third threshold value or the peak level time is greater than a fourth threshold value, jumping out of the cycle and ending the process.

7. The ASK signal filtering method of claim 6, wherein: the third threshold is preset to 600 us.

8. The ASK signal filtering method of claim 6, wherein: the fourth threshold is preset to 20 us.

9. The ASK signal filtering method of claim 1 or 6, wherein: assigning a value to the current bit according to the level accumulation time specifically comprises the following steps: when the level accumulated time is in a first range, assigning a current bit as a half bit 1; and when the level accumulation time is in a second range, assigning the current bit as bit0, wherein the upper limit of the first range is smaller than the lower limit of the second range.

10. The ASK signal filtering method of claim 9, wherein: the first range is greater than or equal to 140us and smaller than 370us, and the second range is greater than or equal to 370us and smaller than or equal to 750 us.

Technical Field

The invention relates to the field of electronic power technology and wireless charging, in particular to a filtering method for demodulating an ASK (amplitude Shift keying) modulation signal and wireless charging equipment.

Background

Wireless charging is expected to replace a wired novel technology, and the market demand for the wireless charging technology is increasing. The QI protocol established by the Wireless Power Consortium (WPC) specifies that RX must modulate voltage and current using ASK, which obtains and demodulates ASK envelope signals from a carrier coupled to a coil, making ASK demodulation a key technology for Wireless charging. When a modulation signal is screened from a carrier wave of 110Khz-200Khz, the modulation envelope and ripple difference is not large due to the fact that the ground bounce or the modulation depth is not enough or even the glitch interference of AC, so that the normal modulation signal is distorted, and the communication interruption caused by the intermittent TX demodulation even can not be demodulated affects the customer experience. The traditional method for solving the problem is to use hardware filtering, but the use of hardware filtering not only increases the cost, but also the consistency cannot be guaranteed.

Disclosure of Invention

In order to solve the problem that the software demodulation of the wireless charging TX end depends too much on hardware, the method can be realized by using a software method, does not depend on hardware, carries out filtering and noise reduction on high frequency and spike interference generated when the modulation depth is not enough or even when an AC waveform is distorted, and screens and restores ASK data packets sent by an RX from disordered signals so as to reduce the dependence of demodulation on hardware, remarkably improve the demodulation capacity, improve the charging distance of wireless charging and increase the charging area of wireless charging.

In order to achieve the purpose of the invention, the technical scheme adopted by the invention is as follows: the ASK filtering method provided by the invention comprises the following steps: receiving the ASK signal, initializing the level accumulation time to be 0 from the end of the last bit demodulation, initializing the level jump time to be 0, circularly acquiring the level duration time, wherein the level duration time is the level time between two jumps, accumulating the level duration time to the level accumulation time when the level duration time is acquired each time, adding 1 to the level jump time, and assigning a value to the current bit according to the level accumulation time if the level jump time is an odd number which is more than or equal to 1; and if the level accumulated time is greater than a first threshold value, or the level jump times are greater than 1 and the current level duration is greater than a second threshold value, jumping out of the loop and ending the process.

On the basis of the scheme, the first threshold value can be preset to 600us, and the second threshold value can be preset to 140 us. Before the ASK signal filtering method is executed, a threshold value may be adjusted, where the threshold value adjustment specifically includes: and continuously acquiring the duty ratios of the first N bits, and determining the second threshold according to the duty ratios, wherein the value of N can be 6. The determining the second threshold according to the duty ratio is specifically performed by adopting the following formula: the second threshold value is (duty ratio/0.5) × the second threshold value preset value.

Based on the same conception, the invention also provides an ASK filtering method, which comprises the following steps: receiving the ASK signal, initializing the level accumulation time to be 0 from the end of the last bit demodulation, initializing the level jump time to be 0, circularly acquiring the level duration time, wherein the level duration time is the level time between two jumps, accumulating the level duration time to the level accumulation time each time the level duration time is acquired, adding 1 to the level jump time, assigning a value to the current bit according to the level accumulation time when the level jump time is an odd number larger than 1, and recording the current level duration time as the peak level time when the level jump time is an even number larger than 0; and if the level accumulation time is greater than a third threshold value or the peak level time is greater than a fourth threshold value, jumping out of the loop and ending the process.

On the basis of the above scheme, the third threshold value may be preset to 600us, and the fourth threshold value may be preset to 20 us. The assignment of the level accumulated time to the current bit is specifically as follows: and when the level accumulation time is in a first range, assigning the current bit as half bit1, and when the level accumulation time is in a second range, assigning the current bit as bit0, wherein the upper limit of the first range is smaller than the lower limit of the second range. The first range may be set to 140us or more and 370us or less, and the second range may be set to 370us or more and 750us or less.

The invention also provides an ASK filtering method, which comprises the following steps: receiving the ASK signal, after M bits 1 appear continuously, performing an initialization step from the end of the last bit demodulation, wherein the initialization level accumulation time is 0, the initialization level jump frequency is 0, and the level duration is acquired cyclically, wherein the level duration is the level time between two jumps, when the level duration is acquired each time, the level duration is accumulated to the level accumulation time, the level jump frequency is added with 1, when the level jump frequency is an odd number, whether the level accumulation time accords with a third range is judged, if so, the current bit is assigned to a half bit1, the current bit jumps to the initialization step, when the level jump frequency is an even number, whether the level accumulation time is greater than a fifth threshold value is judged, if so, the current bit jumps out of the cycle, and the process is ended.

On the basis of the above scheme, M may be set to 2, the third range may be set to 140us to 370us, and the fifth threshold may be set to 370 us. The ASK signal filtering method may further include a threshold adjustment before the ASK signal filtering method, where the threshold adjustment specifically includes: and continuously acquiring the duty ratios of the first N bits, and determining the fifth threshold according to the duty ratios, wherein N can be set to be 6. The determining the fifth threshold according to the duty ratio is specifically performed by adopting the following formula: the fifth threshold value is (duty ratio/0.5) × the fifth threshold value preset value.

The invention also provides a storage medium storing a computer program implementing the above method.

The invention also provides a wireless charging device which uses the method for filtering.

The invention solves the problem that the software demodulation of the wireless charging TX end is too dependent on hardware, adds a more excellent filtering processing method on mainstream demodulation logic, obviously improves the demodulation capability, and not only improves the charging distance of wireless charging, but also increases the charging area of wireless charging in practical application. When a plurality of wireless charging RX modules and mobile phones on the market are matched, the probability of packet leakage and demodulation failure of a data packet is greatly reduced, the compatibility of a wireless charging TX end is improved, the cost is reduced, and the two purposes are achieved.

Drawings

FIG. 1 is a differential bi-phase encoding used by RX;

FIG. 2 is an example of a Byte structure;

FIG. 3 is an example ASK data packet;

FIG. 4 is an example of bit1 demodulation failure;

FIG. 5 is an example of bit0 demodulation failure;

FIG. 6 is an example of the accumulated sum bit0 demodulation modification;

FIG. 7 is an example of a spike glitch bit 0;

FIG. 8 is an example of a spike glitch bit 1;

FIG. 9 is an example of a de-spike bit 0;

FIG. 10 is a duty cycle 30% example;

FIG. 11 Special bit distribution;

fig. 12 specially processes the preamble.

Detailed Description

The invention is described in further detail below with reference to the figures and the embodiments.

According to a QI protocol, RX uses an amplitude shift keying modulation mode to communicate with TX, RX connects a modulation capacitor into an LC resonance loop in series to modify a resonance point to cause amplitude change of a TX coil, TX detects envelope of coil current or voltage, and ASK signals sent by RX are obtained after operational amplification and noise removal. RX modulates data bits onto a power signal using differential bi-phase coding. To do so, the RX should align each data bit with the internal clock signal Tclk so that the start of the data bit coincides with an edge of the clock signal. The frequency clk of the internal clock signal should be 2 + -4% kHz.

As shown in FIG. 1, a Bit needs to last 500us, one level flip in the modulation signal of 250us encodes Bit1, and one level flip in the power signal of 500us encodes Bit 0.

RX uses an 11-bit asynchronous serial format to transmit data bytes. This format consists of a start bit, 8 data bits of a byte, a parity bit, and a stop bit. The start bit is bit0 and the stop bit is bit 1. The order of the data bits is LSB first, which means that the RX check bits should be set to bit0 if the data byte contains an odd number of bits 1, and to bit1 if the data byte contains an even number of bits 1. As shown in fig. 2, a data byte format is shown, with each bit differentially bi-phase encoded, for example, with a value of 0x 35.

RX and TX communications are both made using data packets consisting of 4 parts, i.e., preamble, header, contents and checksum. The preamble, which consists of at least 11 bits and at most 25 bits, is all set to bit1, allows time for the TX to process and determine the start of the packet to enhance interference immunity.

As shown in fig. 3, ASK packets sent by the RX respectively consist of preamble, header, message, and checksum. One of the simplest packets consists of a set of preambles, an 11-bit header, an 11-bit message, and an 11-bit checksum. The preamble is composed of at least 11 bits and at most 25 bits 1, and part of the start bits of the other 11 bits is composed of byte with LSB priority, parity check bit and end bit.

When the TX powers on the coil, the RX modulates the communication data packet to the TX according to the timing specified by the protocol due to the energy obtained by the electromagnetic induction of the coil, the TX performs filtering, denoising and amplification through the modulation and demodulation circuit to obtain envelope signals, and the envelope signals are processed through the comparator to obtain the output signal shown in fig. 3. At the moment, the capture function of the singlechip can be utilized to determine the duration of high and low levels according to the jumping edge so as to distinguish bit0 and bit1, thereby obtaining the bytes in the data packets respectively and forming the data packets with specific functions.

Since 250us half Bit is an ideal value and enough margin is needed to obtain the modulation signal from the 110 k-200 k alternating current signal, the duration of the corresponding level of Bit0 is generally set to 370 us-750 us, and half Bit1 is set to 140us-370us, and it is necessary to satisfy the half-cycle time specification twice in succession to encode Bit 1. When the TX transmits energy outwards through a coil, the state of analyzing a data packet is kept within 90ms, when 3 continuous bits 1 are analyzed to consider that Preamble of the data packet is received, at the moment, bit1 is continuously counted and appearance of a start bit0 is waited, if the count of bit1 exceeds 25 or the state of level duration >750us appears, current data are cleared and Preamble is continuously monitored, and if the start bit0 is detected, demodulation of a header packet is started. The data packet is LSB first, and fig. 3 shows a first received data packet single Strength in the wireless charging protocol, which has a header of 0x03, a message of 0x5A, and a checksum of 0x 59. The number of checksum and bit1 in Byte is related, even bit1 corresponds to the checksum being bit1, and odd bit 0. And (3) carrying out XOR operation on the header and the message in the Package, comparing the result with the received Package, completing demodulation of the data packet if the result is matched, completing corresponding action according to the QI, and continuously keeping power transmission and protocol communication. Wherein at any time if the level duration >750us occurs or the parity check fails, the current data is cleared and monitoring of the Preamble continues until the 90ms wait time ends.

Because a large amount of high-frequency interference and even waveform distortion exist in the 2 k-4 k data packets analyzed from the 110KHz-200KHz carrier waves, and at least the first 3 data packets are wirelessly charged with only one demodulation opportunity, the communication failure of the current protocol can be caused by missing or analysis errors, so that repeated charging interruption is caused, and the customer experience is seriously influenced. The detection of the preamble is the most basic, which determines whether to demodulate the envelope signal which changes continuously at the later stage, the header is a command of one-time communication, which specifies how the current TX should operate, different headers also correspond to messages with different lengths, once an error occurs, the message and the checksum may be misplaced, even a safety accident occurs, the message reflects specific parameters or the response strength of the TX, and the checksum is finally a final pass to the header and the message, which can intercept most of the abnormal demodulation conditions. However, many problems need to be considered, for example, how to discard or accumulate the level maintenance time of 0-140 us, how to judge how to generate a spike glitch in bit0, how to process the duty ratio of not 50%, and the like, it is important to ensure that each bit is analyzed correctly, and it is particularly important to enhance the software demodulation capability on the basis of not increasing the cost.

As shown in fig. 4 and 5, a spike is generated with the original envelope maintained, so that a level duration <140us occurs. In fig. 4, two consecutive half bits 1 form a bit1 during demodulation, so the theoretical value of the waveform is two bits 1, but after a spike occurs, the bit1 confirms that one bit demodulation is finished at the position of the spike according to the basic demodulation method, which is likely to cause the following half bits 1>370us to demodulate into a bit0, and thus the whole data packet is invalid due to failure. Also in fig. 5, if bit0 confirms the end of bit demodulation at the spike position, bit0 will also be misinterpreted as half bit1 due to a level duration <370 us.

From the two waveforms of fig. 4 and 5, the data packet is consistent with the ideal profile after removing the spike, and can be corrected by bit edge continuous roll-over accumulation, wherein the level duration is defined as indicated by levelTime, a new variable named as jitterTime is used for storing the level accumulation time when the level duration is less than 140us, and the level jump times are recorded by the jitterTimeCnt. When the first jumping edge generated after the last bit demodulation is finished assigns jttertimecnt to 1, and when the jumping edge is generated for the second time and the levelTime is less than 140us, the count of the jttertimecnt is increased by 1, and the jttertiment plus is levelTime, and when the levelTimeCnt is an odd number with >1, the jttertiment is judged to assign the current bit until the jttertiment >600us or the levelTime >140us is ended.

Fig. 6 illustrates the method logic in conjunction with actual numbers: if the jittertiment equals 1, the jitterTime equals 350us, the current bit is determined to be a half bit1, when the jittertiment equals 2, the jitterTime + equals 30us equals 380us, when the jittertiment equals 3, the jitterTime + equals 80us equals 460us, when the determination threshold satisfies bit0, the current bit is immediately rewritten to be bit0, and when the jittertiment equals 4, the jitterTime + equals 200us equals 660 us. The same approach can be used for fig. 4 to restore the desired level duration.

As shown in fig. 7 and 8, the same spike glitch is generated while maintaining the ideal trend, which is different from fig. 4 and 5 in that the spike duration is very short and does not exceed 20us, a complete bit is already broken and isolated, and if the basic demodulation method is adopted, too much valid time is lost because multiple levelTime <140us are discarded, thereby destroying the integrity of the data packet. Even if the bit edge continuous flip accumulation method is used, demodulation is terminated early due to the fact that levelTime appearing in the middle is larger than 140us in duration, and data packets are misplaced and fail.

Therefore, based on the two situations, the obvious characteristic is that the duration of the peak is short, the solution needs to be solved by using peak burr denoising, a new variable sharkTime is added in the method for accumulating time, and the number of the peaks is counted by using the new variable sharktincnt. When the first jumping edge of the last bit after demodulation is finished is assigned sharkTimeCnt to be 1 and the state of the bit at the moment is judged according to the level duration, when another peak with the levelTime being less than 20us occurs, sharkTimeCnt is assigned sharkTimeCnt to be 2, the duration is accumulated and the state of the bit is judged, when another peak occurs again, sharkTimeCnt is assigned again to be 1 and the state of the bit is judged, and therefore, when sharkTimeCnt is 2, one cycle of failure is finished.

Illustrated with actual data in FIG. 9: when the first spike occurs, the initialization data sharkticnt is 1, sharkTime is 80, bit is stateless, when another transition edge occurs, sharkticnt is 2, sharkTime + is 10-90, the spike characteristic is met, but bit is still stateless, and the next cycle is started. When a new jump edge appears, reassigning sharkTimeCnt to 1, sharktiment + to 240us to 330us, determining that bit is half bit1, continuously waiting until sharkTimeCnt is 2, sharktimet + to 15 us 345us, and the bit state is still half bit1, when the jump edge arrives again, sharktiment is 1, sharkTime + to 180 us 525us, correcting the bit state to be bit0, continuously waiting for the jump edge and determining the bit state, and ending until a threshold exceeds sharktimet >600us or leitmevel >20us, and keeping the last bit result, so that the state is determined to be bit 0.

In addition, in the mainstream application, the duty ratio of the RX-end modulated ASK waveform is 50%, but if RX is placed at a specific position away from the center of the TX coil, for example, a mobile phone supporting wireless charging is placed at the edge of the transmitting board to charge the mobile phone, the duty ratio of the envelope signal on the coil changes greatly, and generally the duty ratio becomes smaller, as shown in fig. 10. When this occurs, neither the base demodulation nor the preamble can identify the data packet, let alone demodulate the data packet, and therefore the duration threshold of the base demodulation needs to be modified, for example, in proportion to the duty cycle.

When this occurs, it can be determined that there is no change for a short time, meaning that the duty cycle of the entire packet is nearly identical, and preamble as the demodulation buffer phase has a continuous bit1 well suited to recognize this. Because the preamble is composed of at least 11 bits and at most 25 bits of bit1, the duty cycle of bit1 can be continuously collected to see the trend, if the continuous 6 bit duty cycles are almost consistent, when the bit0 appears, the demodulation threshold of bit1 is immediately modified according to the duty cycle, and the duty cycle coefficient is continuously finely adjusted according to the data of the preamble phase until the end of the charging phase.

As shown in fig. 11, the special bit is a specific position in the data packet, and the bit value is fixed, for example, preamble is all 1, the start bit is all 0, and the end bit is all 1. These positions can therefore be used to deliberately screen the envelope signal for certain bits for demodulation.

When two bits 1 appear continuously in the preamble stage, indicating that the waveform is in the preamble stage, using a new variable PreTimeCnt to refer to the number of turns, wherein the new variable PreTime is used for accumulating the duration, and when the accumulated PreTimeCnt is odd and meets the threshold range of half bit1, recognizing that half bit1 is successfully demodulated, then returning to continue judging, when the accumulated number is even, judging whether the threshold value exceeds a half bit1 threshold value, if so, judging that the current waveform is not a modulation signal, and clearing all recorded information.

Illustrated by FIG. 12 with actual data: the former bit waveform is complete, prefimcnt is 1, prefime is 80us when the transition edge occurs, wait for the second transition edge prefime + ═ 130 ═ 210us not to exceed the threshold of the current half bit1, prefime + - ═ 135us 345us when prefimcnt is 3 meets the half bit1 duration threshold, and finally the demodulation is successful, and the same applies when processing the start bit and the end bit.

In addition, the present invention also provides a storage medium storing a computer program that realizes the above-described embodiments.

In addition, the invention also provides an electronic device, in particular a wireless charging device, which performs filtering by using the method described in the above embodiment.

It should be noted that, in the practical application, a person skilled in the art should recognize that the combination, the division, the order adjustment, and the decoration of the above embodiments and steps are all considered to be within the protection scope of the present invention without departing from the principle of the present invention. What is not described in detail in this specification is prior art to the knowledge of those skilled in the art.

11页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:用于高效地生成窄带物联网上行链路信号的方法、系统和计算机可读介质

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!