Method and device for detecting radio frequency power of electronic fence
By setting the sampling window and frequency in the radio frequency signal of the electronic fence, dividing the effective and invalid voltages, and calculating the detection voltage according to the signal type, the problem of difficulty in identifying the signal type in the prior art is solved, and the accurate identification and stability of the radio frequency signal power is achieved Report.
Patent Information
- Application Number
- CN202411238254.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-05
- Publication Date
- 2025-01-14
AI Technical Summary
The prior art is difficult to accurately detect radio frequency signals of electronic fences of different signal types, resulting in poor stability of detection power reporting and power jump.
By setting the sampling window and sampling frequency, the voltage value of the radio frequency signal is obtained, and the voltage value is divided into effective and invalid voltages. The signal type is determined according to the proportion, and different calculation methods are used to determine the detection voltage, and the power value is obtained by looking up the table.
It realizes accurate identification of radio frequency signals of electronic fences and accurate reflection of power changes, and improves the stability and accuracy of detection power.
Smart Images

Figure CN119316800A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of electronic fence detection, and in particular to a detection method and device for radio frequency power of an electronic fence. Background Art
[0002] The wireless frame structure of 5G (NR) network is the same as that of 4G (LTE). The length of a wireless frame is 10ms, which consists of 10 sub-frames, and the length of each sub-frame is 1ms. Compared with the fixed 15Khz subcarrier spacing (SCS) of LTE, NR supports multiple SCSs. Figure 1 , the frame structure of 4G(LE) can be found in Figure 2 .
[0003] For the electronic fence 4G and 5G network signals, their characteristic is that they do not carry service information, so the waveform detected by the detector is not a straight line. The wireless frame is 10ms, and it can be seen that the sampled detection voltage waveform is a waveform that changes in a 10ms period. For the detection voltage waveform of the 5G (NR) radio frequency, see Figure 3 As can be seen from the figure, the detection voltage waveform is a square wave, and the entire cycle is 10ms, that is, the length of a frame. Because there is no service information, there is only one square wave with a width of 1ms in each cycle. When the power changes, the peak value of the square wave changes, see Figure 7 . For the detection voltage waveform of 4G (LTE), see Figure 4 , the 4G detection voltage waveform is not a straight line. The detection voltage is a waveform that changes periodically within a voltage range. When the power changes, the waveform moves up and down as a whole. See Figure 8 For electronic fences, there is also a mixed operation of 4G (LTE) and 5G (NR). The detection voltage waveform is shown in Figure 5 , its waveform is 5G (NR) and
[0004] The combination of the single signal characteristics of 4G (LTE), that is, each cycle (10ms, a wireless frame) consists of a square wave with a width of 1ms and a waveform in which the voltage changes periodically within a certain range. When the output power changes, the peak value of the 5G part, that is, the square wave, changes, and the 4G part moves up and down as a whole. See Fig. 9 .
[0005] Since the radio frequency signals of the electronic fence have various signal types, it is difficult for the existing technology to accurately calculate the detection voltages of different signal types, which results in poor stability in the detection power reporting and fluctuations in the reported power. Summary of the invention
[0006] The object of the present invention is to provide a method and device for detecting radio frequency power of an electronic fence, so as to realize accurate identification of radio frequency power of the electronic fence.
[0007] In order to solve the above technical problems, the present invention provides a technical solution: a method for detecting radio frequency power of an electronic fence, comprising:
[0008] S1. According to the set sampling window and sampling frequency, obtain several voltage values within a single cycle of the electronic fence radio frequency signal;
[0009] S2, classifying each voltage value obtained by sampling as a valid voltage or an invalid voltage according to a set threshold value;
[0010] S3. Determine the signal type of the radio frequency signal of the electronic fence according to the proportion of the effective voltage in the total voltage value;
[0011] S4, determining the detection voltage of the electronic fence radio frequency signal according to the signal type and each voltage value of the electronic fence radio frequency signal;
[0012] S5. Obtain the power of the radio frequency signal of the electronic fence by looking up the table according to the detection voltage.
[0013] According to the above solution, the sampling window is greater than the time length of a wireless frame in the radio frequency signal of the electronic fence.
[0014] According to the above solution, the sampling interval defined by the sampling frequency satisfies: the sampling interval is less than half of the time length of a wireless subframe in the radio frequency signal of the electronic fence.
[0015] According to the above scheme, step S3 is: if the proportion is less than or equal to the preset first percentage value, the signal type is determined to be a 5G signal; if the proportion is greater than the second percentage value, the signal type is determined to be a 4G signal or a 4G / 5G mixed signal.
[0016] According to the above scheme, step S4 includes:
[0017] S401, sorting the voltage values;
[0018] S402, if the signal type is a 5G signal, average the larger one or more voltage values among the voltage values, and use the average value as the detection voltage;
[0019] S403: If the signal type is a 4G signal or a 4G / 5G mixed signal, the smaller 50% voltage values among the voltage values are averaged, and the obtained average value is used as the detection voltage.
[0020] A detection device for radio frequency power of an electronic fence, the device comprising:
[0021] The sampling module is used to obtain a number of voltage values within a single cycle of the electronic fence radio frequency signal according to the set sampling window and sampling frequency;
[0022] A voltage type classification module is used to classify each voltage value obtained by sampling into a valid voltage or an invalid voltage according to a set threshold value;
[0023] A signal type determination module, used to determine the signal type of the electronic fence radio frequency signal according to the proportion of the effective voltage in the total voltage value;
[0024] A detection voltage calculation module is used to determine the detection voltage of the electronic fence radio frequency signal according to the signal type and each voltage value of the electronic fence radio frequency signal;
[0025] The power calculation module is used to obtain the power of the radio frequency signal of the electronic fence according to the detection voltage table lookup.
[0026] According to the above solution, the sampling window is greater than the length of a wireless frame of the electronic fence radio frequency signal.
[0027] According to the above solution, the sampling interval defined by the sampling frequency satisfies: the sampling interval is less than half of the time length of a wireless subframe in the radio frequency signal of the electronic fence.
[0028] According to the above scheme, the detection voltage calculation module executes: if the proportion is less than or equal to the preset first percentage value, the signal type is determined to be a 5G signal; if the proportion is greater than the second percentage value, the signal type is determined to be a 4G signal or a 4G / 5G mixed signal.
[0029] According to the above scheme, the detection voltage calculation module executes:
[0030] Sort the voltage values;
[0031] If the signal type is a 5G signal, the larger voltage values among the voltage values are averaged, and the average value is used as the detection voltage;
[0032] If the signal type is a 4G signal or a 4G / 5G mixed signal, the smaller 50% voltage values among the voltage values are averaged, and the obtained average value is used as the detection voltage.
[0033] The beneficial effects of the present invention are: by performing threshold judgment on the voltage value obtained by sampling, distinguishing the effective voltage and the invalid voltage in the voltage value, and then judging the signal type of the radio frequency signal of the electronic fence according to the proportion of the effective voltage in the voltage value, using different calculation methods to determine the detection voltage according to different signal types, and obtaining the power value by looking up the table according to the detection voltage. This method adopts different detection voltage calculation methods according to the waveform characteristics of different signal types, and can accurately reflect the power change of the radio frequency signal of the electronic fence. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] Figure 1 This is a schematic diagram of the 5G signal frame structure;
[0035] Figure 2 This is a schematic diagram of the 4G signal frame structure;
[0036] Figure 3 This is a schematic diagram of the 5G signal detection voltage waveform;
[0037] Figure 4 This is a schematic diagram of the 4G signal detection voltage waveform;
[0038] Figure 5 This is a schematic diagram of the 4G / 5G hybrid signal detection voltage waveform;
[0039] Figure 6 It is the detector voltage-power curve diagram;
[0040] Figure 7 It is a schematic diagram of the detection voltage waveform of the 5G signal power change;
[0041] Figure 8 It is a schematic diagram of the detection voltage waveform of the 4G signal power change;
[0042] Fig. 9 It is a schematic diagram of the detection voltage waveform of the 4G / 5G mixed signal power change;
[0043] Fig.10 It is a schematic diagram of the flow of the detection method of the radio frequency power of the electronic fence according to the first embodiment of the present invention;
[0044] Fig.11 It is a schematic diagram of the working process of the detection device of the radio frequency power of the electronic fence in the second embodiment of the present invention. DETAILED DESCRIPTION
[0045] In order to make the purpose, technical solution and advantages of the embodiments of the present disclosure clearer, the technical solution of the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings of the embodiments of the present disclosure. Obviously, the described embodiments are part of the embodiments of the present disclosure, not all of the embodiments. Based on the described embodiments of the present disclosure, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present disclosure.
[0046] Embodiment 1:
[0047] See also Fig.10 , Fig.11 , a method for detecting radio frequency power of an electronic fence, comprising:
[0048] S1. According to the set sampling window and sampling frequency, several voltage values within a single cycle of the electronic fence radio frequency signal are obtained.
[0049] According to the characteristics of the detection voltage waveform of 4G signals, 5G signals, and 4G / 5G mixed signals, to obtain the effective detection voltage, it is first necessary to set a continuous sampling window. The waveform period of the power detection voltage is 10ms, so the sampling window must be greater than 10ms to ensure that the complete data within a cycle is obtained. Secondly, the AD sampling interval within the sampling window. According to Shannon's sampling theorem, if the bandwidth of a continuous time signal is limited, the limit information of this signal can be represented by a digital signal of a set of equally spaced sampling points, and the sampling frequency of these sampling points must be greater than twice the signal bandwidth. Because the subframe width of 5G (NR) and 4G (LTE) wireless frames is 1ms, the sampling interval must be less than 0.5ms, that is, the sampling frequency must be greater than 2K. In the actual project, the sampling window can be defined as 12ms, and 36 sets of data can be sampled, that is, the sampling frequency is 3K. The higher the frequency, the better, depending on the selected processor capabilities. At this time, the data of all states within a change cycle of the RF signal is obtained.
[0050] S2. Classify each voltage value as a valid voltage or an invalid voltage according to a set threshold value.
[0051] By observing the waveform characteristics of the detection voltage of 4G and 5G, it can be seen that for 5G signals, the effective voltage is only in the square wave band, while for 4G or mixed signals of 4G and 5G, the voltage is effective throughout the entire cycle. In actual projects, a threshold can be set to define effective voltage and invalid voltage, for example, setting 50mV or less as invalid voltage and 50mV or more as effective voltage.
[0052] S3. Determine the signal type of the radio frequency signal of the electronic fence according to the proportion of the effective voltage in the total voltage value.
[0053] By analyzing the proportion of effective voltage in the array, if the effective voltage is greater than 50%, it is a 4G or a mixed signal of 4G and 5G, and if the effective voltage is less than or equal to 50%, it is a 5G signal.
[0054] S4. Determine the detection voltage of the electronic fence radio frequency signal according to the signal type and each voltage value of the electronic fence radio frequency signal.
[0055] See also Figure 6 From the curve, we can see that the detector slope is 50mv / dBm, that is, for every 1dBm change, the detector voltage changes by 50mv. For the waveform change when the output power of the electronic fence RF signal (5G) changes by 10dBm, see Figure 7As can be seen from the figure, only the peak of the square wave changes, and the change value is 500mV. If the detection power is calculated by the average method here, assuming that 10 groups of data are sampled at equal time intervals in one cycle, then theoretically only one group of data samples the peak, with a voltage value of 1800, and the rest of the data are 0.
[0056] Detection voltage before power change:
[0057] Vlast=(v1+v2+v3+v4+...) / 10;
[0058] That is, Vlast = (v1 + v2 + v3 + v4 + ...) / 10 = (1800 + 0 + 0 ...) / 10 = 180 mV;
[0059] After the output power changes, the square wave peak is 1300, so the detection voltage after the power changes is:
[0060] VNest=(v1+v2+v3+v4+...) / 10=(1300+0+0...) / 10=130mV;
[0061] From the above calculation, we can know that if the average value is used for calculation, it is calculated that the voltage only changes by 50mV when the power changes by 10dBm, and the voltage only changes by 5mV when the power changes by 1dBm. The voltage change is too small, which will cause the power amplifier to be unable to recognize the power change of 1dBm, and will also cause poor stability in the detection power reporting and reported power jumps.
[0062] Therefore, this embodiment adopts the following voltage calculation method:
[0063] 1) For 5G signals
[0064] Assume that N (for example, 10) data are sampled at equal time intervals in a cycle. Theoretically, only one data sample reaches the peak, and its voltage value is 1800mv, and the rest of the data are 0. Sort the data from small to large (using insertion sort, bubble sort and other sorting algorithms), and take the average of the last 1 / 10 of the sorted N data (for the convenience of explanation here, the actual project is that the sampling frequency must be greater than 3k), then:
[0065] Vlast=V10 / 1=1800 / 1=1800mV;
[0066] Assuming that the square wave peak is 1850mv after the output power changes by 1dBm, then:
[0067] Vnext=V10 / 1=1850 / 1=1850mV;
[0068] Vnext-Vlast=50mV;
[0069] In this way, the peak voltage change of the square wave when the power changes by 1dBm is accurately obtained to be 50mV, that is, the detection sampling voltage of the 5G signal is obtained very accurately.
[0070] In this embodiment, the voltage value used to calculate the detection voltage accounts for 10% of the total voltage value. It should be understood that due to the presence of capacitors, the voltage waveform actually collected is not a standard square wave, and it rises at a certain slope from 0 to the maximum voltage value, resulting in the sampled voltage value excluding the maximum voltage value and 0, and there are multiple intermediate values between the maximum voltage value and 0. Therefore, in actual situations, the voltage value used to calculate the detection voltage accounts for not 10% of the total voltage value, but needs to be set according to actual conditions.
[0071] 2) For 4G signal
[0072] Since the entire waveform moves up and down as the power changes, when calculating the effective voltage, the sampled data is first sorted from small to large according to the quick sort algorithm, and then the average of the first half of the array 50% of the data is calculated. For example, 10 data are sorted from small to large and represented as V1, V2, V3, ... V10;
[0073] Then we have:
[0074] Vlast=(V1+V2+V3+V4+V5) / 5;
[0075] After the output power changes by 1dBm:
[0076] Vnext=(V1+V2+V3+V4+V5) / 5;
[0077] When there are enough sampled data, the overall movement value of the waveform is expressed as:
[0078] Vnext-Vlast=50mV
[0079] In this way, the 4G signal can also accurately identify the detection voltage change value and obtain the sampled voltage value.
[0080] 3) 4G / 5G mixed signal
[0081] For mixed signals of 4G and 5G, the detection voltage waveform is the overlap of the two. If all data are taken to calculate the average value, the detection voltage of the 5G part will affect the calculation result. As analyzed in the previous article, this will cause the obtained change voltage to be smaller and the power detection resolution to be lower. Since the 5G voltage part accounts for a small proportion in the 4G / 5G mixed signal, the calculation method of the 4G signal is directly adopted.
[0082] S5. Obtain the power of the radio frequency signal of the electronic fence by looking up the table according to the detection voltage.
[0083] The accurate power value can be calculated by pre-storing the detection voltage-power value comparison table in the EEPROM.
[0084] Embodiment 2:
[0085] This embodiment discloses a detection device for radio frequency power of an electronic fence, a sampling module, which is used to obtain several voltage values within a single cycle of the radio frequency signal of the electronic fence according to a set sampling window and sampling frequency;
[0086] A voltage type classification module is used to classify each voltage value obtained by sampling into a valid voltage or an invalid voltage according to a set threshold value;
[0087] A signal type determination module, used to determine the signal type of the electronic fence radio frequency signal according to the proportion of the effective voltage in the total voltage value;
[0088] A detection voltage calculation module is used to determine the detection voltage of the electronic fence radio frequency signal according to the signal type and each voltage value of the electronic fence radio frequency signal;
[0089] The power calculation module is used to obtain the power of the radio frequency signal of the electronic fence according to the detection voltage table lookup.
[0090] See also Figure 2 The detection device of the radio frequency power of the electronic fence in this embodiment is specifically as follows:
[0091] Set the sampling window and sampling frequency, and the sampling module samples the radio frequency signal of the electronic fence (for example, set a task interval of 12ms);
[0092] The detection voltage calculation module uses a sorting algorithm to sort the raw data obtained by sampling and save it;
[0093] The voltage type classification module classifies the sorted voltage values into valid voltages or invalid voltages;
[0094] The signal type determination module determines the signal type as a 4G or 5G signal according to the specific proportion of the effective voltage in the sampled voltage value;
[0095] The detection voltage calculation module calculates the detection voltage value corresponding to the signal according to the specific signal type; for 4G signals or 4G / 5G mixed signals, the average value of the smaller 50% voltage values in the sorted voltage values is calculated; for 5G signals, the average value of the larger 10% voltage values in the sorted voltage values is calculated as the detection voltage;
[0096] The power calculation module converts the detection voltage into a power value according to a pre-stored detection voltage-power comparison table.
[0097] Furthermore, the detection device also includes a power reporting module for reporting the power value.
[0098] The above descriptions are merely embodiments of the present invention and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.
Claims
1. A method for detecting radio frequency power of an electronic fence, characterized in that: include: S1. According to the set sampling window and sampling frequency, obtain several voltage values within a single cycle of the electronic fence radio frequency signal; S2, classifying each voltage value obtained by sampling as a valid voltage or an invalid voltage according to a set threshold value; S3. Determine the signal type of the radio frequency signal of the electronic fence according to the proportion of the effective voltage in the total voltage value; S4, determining the detection voltage of the electronic fence radio frequency signal according to the signal type and each voltage value of the electronic fence radio frequency signal; S5. Obtain the power of the radio frequency signal of the electronic fence by looking up the table according to the detection voltage.
2. The method for detecting radio frequency power of an electronic fence according to claim 1, characterized in that: The sampling window is greater than the time length of a wireless frame in the radio frequency signal of the electronic fence.
3. The method for detecting radio frequency power of an electronic fence according to claim 1, characterized in that: The sampling interval defined by the sampling frequency satisfies: the sampling interval is less than half of the time length of a wireless subframe in the radio frequency signal of the electronic fence.
4. The method for detecting radio frequency power of an electronic fence according to claim 1, characterized in that: Step S3 is: if the proportion is less than or equal to the preset first percentage value, the signal type is determined to be a 5G signal; if the proportion is greater than the second percentage value, the signal type is determined to be a 4G signal or a 4G / 5G mixed signal.
5. The method for detecting radio frequency power of an electronic fence according to claim 4, characterized in that: Step S4 includes: S401, sorting the voltage values; S402, if the signal type is a 5G signal, average the larger one or more voltage values among the voltage values, and use the average value as the detection voltage; S403: If the signal type is a 4G signal or a 4G / 5G mixed signal, the smaller 50% voltage values among the voltage values are averaged, and the obtained average value is used as the detection voltage.
6. A detection device for radio frequency power of an electronic fence, characterized in that: The device includes: The sampling module is used to obtain a number of voltage values within a single cycle of the electronic fence radio frequency signal according to the set sampling window and sampling frequency; A voltage type classification module is used to classify each voltage value obtained by sampling into a valid voltage or an invalid voltage according to a set threshold value; A signal type determination module, used to determine the signal type of the electronic fence radio frequency signal according to the proportion of the effective voltage in the total voltage value; A detection voltage calculation module is used to determine the detection voltage of the electronic fence radio frequency signal according to the signal type and each voltage value of the electronic fence radio frequency signal; The power calculation module is used to obtain the power of the radio frequency signal of the electronic fence according to the detection voltage table lookup.
7. The electronic fence radio frequency power detection device according to claim 6, characterized in that: The sampling window is greater than the length of a wireless frame of the electronic fence radio frequency signal.
8. The electronic fence radio frequency power detection device according to claim 6, characterized in that: The sampling interval defined by the sampling frequency satisfies: the sampling interval is less than half of the time length of a wireless subframe in the radio frequency signal of the electronic fence.
9. The electronic fence radio frequency power detection device according to claim 6, characterized in that: The detection voltage calculation module executes: if the proportion is less than or equal to a preset first percentage value, the signal type is determined to be a 5G signal; if the proportion is greater than a second percentage value, the signal type is determined to be a 4G signal or a 4G / 5G mixed signal.
10. The electronic fence radio frequency power detection device according to claim 9, characterized in that: The detection voltage calculation module performs: Sort the voltage values; If the signal type is a 5G signal, the larger voltage values among the voltage values are averaged, and the obtained average value is used as the detection voltage; If the signal type is a 4G signal or a 4G / 5G mixed signal, the smaller 50% voltage values among the voltage values are averaged, and the obtained average value is used as the detection voltage.