CN106549690B - Automatic gain control method and device for power carrier communication system - Google Patents
Automatic gain control method and device for power carrier communication system Download PDFInfo
- Publication number
- CN106549690B CN106549690B CN201610962590.5A CN201610962590A CN106549690B CN 106549690 B CN106549690 B CN 106549690B CN 201610962590 A CN201610962590 A CN 201610962590A CN 106549690 B CN106549690 B CN 106549690B
- Authority
- CN
- China
- Prior art keywords
- value
- mark
- adc
- minimum
- gain
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04B—TRANSMISSION
- H04B3/00—Line transmission systems
- H04B3/54—Systems for transmission via power distribution lines
- H04B3/58—Repeater circuits
Abstract
The invention discloses an automatic gain control method and device for a power line carrier communication system. The method comprises the following steps: searching the maximum value and the minimum value in the continuous N ADC quantization values; calculating the maximum and full-scale quantizationsA difference in values and a difference between the minimum value and a minimum range quantization value; calculating the smaller of the 2 difference values; calculating a relative value of said smaller one of the differences with respect to the 50% full scale quantization value; when the relative value is larger than the upper threshold, setting the upper limit exceeding mark as 1, otherwise, setting the upper limit exceeding mark as 0, when the relative value is smaller than the lower threshold, setting the lower limit mark as 1, otherwise, setting the lower limit mark as 0; when the upper limit is exceeded, the mark is continuous NoverWhen the times are all 1, the gain value is reduced by one gear, and when the low limit mark is continuous NsagWhen the times are all 1, the gain value is increased by one gear. The invention has strong immunity to impulse noise under the condition of low signal-to-noise ratio, and simultaneously has low complexity and is easy to realize.
Description
Technical Field
The invention relates to the technical field of power line carrier communication, in particular to an automatic gain control method and device for a power line carrier communication system.
Background
Power Line carrier Communication (PLC), a Communication method specific to Power systems, is a data transmission technology that uses the existing Power Line as a Communication medium, modulates information data to be transmitted on a carrier signal suitable for Power Line medium transmission, and transmits along the Power Line, and a receiving end demodulates the carrier signal to recover the original information data.
The distance difference of different communication unit modules on the power line is large, so that great difference of carrier signal attenuation is brought; due to impedance mismatching, complex phenomena such as reflection, standing wave and the like can occur in the carrier signal, so that the attenuation characteristic of the power line is more complex;
on the other hand, various noises such as colored background noise, narrow-band interference noise, periodic impulse noise, random impulse noise and the like exist on the power line, the instantaneous power of the noise is often much higher than the power of the carrier signal, and in this case, the traditional automatic gain control technology can adjust the gain according to the change of the noise power, so that the amplitude of the carrier signal which is annihilated by the noise jumps, and the receiving demodulation signal-to-noise ratio is further deteriorated.
In addition, in order to ensure the stability of gain control, the conventional automatic gain control technology generally performs feedback control by power, energy or effective value and the like, all the feedback control needs multiplication, and when the sampling frequency of the ADC is very high, the power consumption and the scale are large.
Disclosure of Invention
The invention provides an automatic gain control method of a power carrier communication system, aiming at solving the problems of the existing automatic gain control technology in the power carrier communication system.
In order to achieve the purpose, the invention is realized by the following technical scheme:
an automatic gain control method of a power carrier communication system is characterized by comprising the following steps:
searching the maximum value and the minimum value in the continuous N ADC quantization values;
calculating the difference value between the maximum value and the full-scale quantized value and the difference value between the minimum value and the minimum-scale quantized value;
calculating the smaller of the 2 difference values;
calculating a relative value of said smaller one of the differences with respect to the 50% full scale quantization value;
when the relative value is larger than the upper threshold, setting the upper limit exceeding mark as 1, otherwise, setting the upper limit exceeding mark as 0, when the relative value is smaller than the lower threshold, setting the lower limit mark as 1, otherwise, setting the lower limit mark as 0;
when the upper limit is exceeded, the mark is continuous NoverWhen the times are all 1, the gain value is reduced by one gear, and when the low limit mark is continuous NsagWhen the times are all 1, the gain value is increased by one gear.
In the step of searching for the maximum value and the minimum value in the N continuous ADC quantization values, the input voltage range of the ADC is marked as Vmin~VmaxWhen the input voltage is less than or equal to VminTime ADC outputs minimum range quantized value QminWhen the input voltage is greater than or equal to VmaxTime ADC outputs full-scale quantized value QmaxWhen the input voltage is in the range of measurement range, the output quantization value Q changes linearly with the input voltage V.
And the bit width of the quantized value Q of the ADC is 8-14 bits.
The relative value R in the step of calculating the relative value of the smaller difference value with respect to the 50% full-scale quantization valuenThe calculation formula of (2) is as follows:
wherein Qhalf=(Qmax-Qmin)/2,dmin,nThe sequence number n represents the nth search maximum and minimum values for the smaller one of the 2 difference values in step S203.
And in the step of setting the upper limit flag to be 1 when the relative value is greater than the upper limit threshold value, and otherwise setting the lower limit flag to be 1 when the relative value is less than the lower limit threshold value, and otherwise setting the lower limit flag to be 0 degree, the upper limit threshold value is more than 2 times of the lower limit threshold value.
When the upper limit mark is continuously NoverWhen the times are all 1, the gain value is reduced by one gear, and when the low limit mark is continuous NsagAnd when the times are all 1, in the step of increasing the gain value by one gear, when the upper limit exceeding flag is 0 or the gain value is reduced for one time, the upper limit exceeding flag counter is cleared, and when the lower limit exceeding flag is 0 or the gain value is increased for one time, the lower limit exceeding flag counter is cleared.
The step of reducing the gain value by one step represents reducing the ADC input signal to the original valueThe step of increasing the gain value by one step represents that the ADC input signal is amplified to the original valueDoubling;
the gain value is determined by a 4-bit control word, the gain value is increased by one gear, namely the control word is increased by 1, the gain value is decreased by one gear, namely the control word is decreased by 1, the gain value is not increased when the control word is increased to the maximum allowable value, and the gain value is not decreased when the control word is decreased to the minimum allowable value;
the control word is initialized to a particular value, i.e., neither amplified nor reduced, for the input signal each time automatic gain control is enabled.
An automatic gain control device of a power carrier communication system comprises the following modules:
the maximum and minimum searching module is used for searching the maximum value and the minimum value in the continuous N ADC quantization values;
the difference value calculation module is used for calculating the difference value between the maximum value and the full-scale quantized value and the difference value between the minimum value and the minimum-scale quantized value;
a difference comparison module for calculating the smaller of the 2 differences;
the range calculation module is used for evaluating the amplitude of the ADC input signal, namely calculating the relative value of the smaller difference value relative to a 50% full-range quantized value;
the range judgment indicating module is used for judging and indicating whether the input signal is in an expected signal range or not;
and the gain adjusting module is used for calculating and outputting a gain control word and determining whether the input signal of the ADC is amplified or reduced.
Compared with the prior art, the invention has the following beneficial effects:
the invention can not only scale the carrier signal to a proper intensity when the power line channel is good, but also has strong immunity to impulse noise under the condition of low signal-to-noise ratio, and can effectively prevent the error adjustment of gain.
On the other hand, when the amplitude of the received signal is judged, only the maximum value and the minimum value of the sampling signal are calculated, multiplication operation is not carried out, and the calculation is simple and easy to realize.
Drawings
Fig. 1 is a schematic diagram illustrating a connection between an automatic gain control apparatus and other apparatuses according to an embodiment of the present invention;
fig. 2 is a schematic flow chart of an automatic gain control method according to an embodiment of the present invention;
fig. 3 is a schematic diagram of an automatic gain control apparatus according to an embodiment of the present invention.
Detailed Description
In order to make the advantages and technical solutions of the present invention easier to understand, the technical solutions in the embodiments of the present invention are described in further detail below with reference to the drawings in the embodiments.
As shown in fig. 1, the plc receiving unit module adjusts an amplification factor of a Programmable Gain Amplifier (PGA) through Automatic Gain Control (AGC), and performs appropriate amplification or reduction on a received carrier signal to ensure that the ADC sampling signal has sufficient accuracy and amplitude saturation does not occur for a long time.
As shown in fig. 2, an automatic gain control method for a power carrier communication system includes the following steps:
step S201: finding the maximum Q of N successive ADC quantization valuesmax,nAnd a minimum value Qmin,nIs formulated as follows:
Qmax,n=max{Qi,Qi+1,……,Qi+N-1}
Qmin,n=min{Qi,Qi+1,……,Qi+N-1}
where i is N · N, N is 0,1,2, … …, the sequence number N represents the nth search maximum and minimum, max { a } represents the maximum of the search array a, and min { a } represents the minimum of the search array a;
in one embodiment of the present invention, N takes the value of 64;
the input voltage range of the ADC is marked as Vmin~VmaxIn which V ismaxGreater than VminWhen the input voltage is less than or equal to VminTime ADC outputs minimum range quantized value QminWhen the input voltage is greater than or equal to VmaxTime ADC outputs full-scale quantized value QmaxWhen the input voltage is in the range, the output quantization value Q changes linearly along with the input voltage V;
the bit width of the quantized value Q of the ADC is 8-14 bits;
in one embodiment of the present invention, the bit width of the quantized value Q is 10 bits, and the minimum measurement range quantized value Q isminTaking the value as 0, the full-scale quantization value QmaxTaken as 1023;
in one embodiment of the present invention, to obtain the maximum dynamic range of the signal at the input of the ADC, a dc offset voltage V is added at the input of the ADChalfWhen no AC signal is input, the ADC outputs a 50% full-scale quantized value, and when an AC signal is input, the quantized value output by the ADC fluctuates above and below the 50% full-scale quantized value.
Step S202: calculating the maximum value Qmax,nAnd full-scale quantization value QmaxDifference d of1,nAnd the minimum value Qmin,nAnd the minimum measurement range quantized value QminDifference d of2,nThe calculation formula is as follows:
d1,n=Qmax-Qmax,n
d2,n=Qmin,n-Qmin
step S203: calculating the smaller of the 2 difference values, and recording the smaller as dmin,nIs formulated as follows:
dmin,n=min{d1,n,d2,n}
step S204: calculating said smaller difference value relative to a 50% full scale quantization QhalfRelative value of (2)nThe calculation formula is as follows:
wherein Qhalf=(Qmax-Qmin)/2;
In one embodiment of the invention, QhalThe value of f after rounding off is 512;
in one embodiment of the invention, the relative value RnHas a value range of 0 to 1 and a relative value RnThe larger the value of (b) reflects the variation range of the alternating current signal at the input end of the ADC, the larger the variation range (peak-to-peak value) of the alternating current signal is.
Step S205: when the relative value R isnGreater than an upper threshold value RoverSetting the over-limit flag to 1, otherwise, setting the over-limit flag to 0, and setting the relative value R to benLess than a lower threshold RsagSetting a low time limit mark as 1, otherwise, setting the low time limit mark as 0;
the upper threshold value RoverIs the lower threshold RsagMore than 2 times of the total weight of the composition;
in one embodiment of the invention, the upper threshold RoverIs 0.75, lower threshold RsagIs 0.1875, and ensures that the signal is putAnd after the large or small scale, the size is within the range limited by the threshold value.
Step S206: when the upper limit is exceeded, the mark is continuous NoverWhen the times are all 1, the gain value is reduced by one gear, and when the low limit mark is continuous NsagWhen the times are all 1, increasing the gain value by one gear, resetting the upper limit exceeding flag counter when the upper limit exceeding flag is 0 or performing operation for reducing the gain value any time, and resetting the lower limit flag counter when the lower limit exceeding flag is 0 or performing operation for increasing the gain value any time;
the step of reducing the gain value by one step represents reducing the ADC input signal to the original valueThe step of increasing the gain value by one step represents that the ADC input signal is amplified to the original valueDoubling;
the gain value is determined by a 4-bit control word, the gain value is increased by one gear, namely the control word is increased by 1, the gain value is decreased by one gear, namely the control word is decreased by 1, the gain value is not increased when the control word is increased to the maximum allowable value, and the gain value is not decreased when the control word is decreased to the minimum allowable value;
the control word is input to the PGA, and the PGA sets the amplification factor according to the value of the control word;
the control word is initialized to a specific value when the automatic gain control is enabled each time, namely, the input signal is not amplified or reduced;
in one embodiment of the invention, the maximum allowable value of the control word is 15, and the minimum allowable value of the control word is 0, so that the dynamic range of the automatic gain is up to 45 dB;
in one embodiment of the invention, the control word initialization value is 0;
in an embodiment of the present invention, the amplifying or reducing the ADC input signal refers to amplifying or reducing an ac signal at an input end of the ADC, and a dc offset voltage at the input end of the ADC remains unchanged;
the control parameter NoverAnd NsagThe larger the automatic gain control is, the less sensitive the automatic gain control is to short-time strong pulse interference, and the longer the time required for adjusting the amplitude of the carrier signal is;
in one embodiment of the invention, the parameter N is controlledoverA value of 8, a control parameter NsagThe value is 8.
Corresponding to the embodiment of the automatic gain control method of the power carrier communication system provided by the invention, the invention also provides an automatic gain control device of the power carrier communication system.
As shown in fig. 3, an automatic gain control apparatus for a power carrier communication system includes the following modules:
a maximum and minimum value searching module 301, configured to search for a maximum value and a minimum value in the N consecutive ADC quantization values;
a difference value calculating module 302, configured to calculate a difference value between the maximum value and a full-scale quantized value and a difference value between the minimum value and a minimum-scale quantized value;
a difference comparison module 303, configured to calculate a smaller one of the 2 differences;
a range calculation module 304, configured to evaluate an amplitude of the ADC input signal, that is, calculate a relative value of the smaller difference value with respect to a 50% full-range quantization value;
a range determination indication module 305 for determining and indicating whether the input signal is within a desired signal range;
a gain adjustment module 306, configured to calculate and output a gain control word, and determine whether an input signal to the ADC is amplified or reduced;
the above description is only one embodiment of the present invention, and it is intended for persons skilled in the art to understand and realize the present invention, and it is not to be construed that the embodiment of the present invention is limited to the description, and various changes and modifications can be made to the embodiment without departing from the spirit of the present invention, and the changes and modifications still fall within the scope covered by the present invention.
Claims (10)
1. An automatic gain control method of a power carrier communication system is characterized by comprising the following steps:
searching the maximum value and the minimum value in the continuous N ADC quantization values;
calculating the difference value between the maximum value and the full-scale quantized value and the difference value between the minimum value and the minimum-scale quantized value;
calculating the smaller of the 2 difference values;
calculating a relative value of said smaller one of the differences with respect to the 50% full scale quantization value;
when the relative value is larger than the upper threshold, setting the upper limit exceeding mark as 1, otherwise, setting the upper limit exceeding mark as 0, when the relative value is smaller than the lower threshold, setting the lower limit mark as 1, otherwise, setting the lower limit mark as 0;
when the upper limit is exceeded, the mark is continuous NoverWhen the times are all 1, the gain value is reduced by one gear, and when the low limit mark is continuous NsagWhen the times are all 1, the gain value is increased by one gear.
2. The automatic gain control method of claim 1, wherein in the step of searching for the maximum value and the minimum value of the N successive ADC quantization values, the input voltage range of the ADC is denoted as Vmin~VmaxWhen the input voltage is less than or equal to VminTime ADC outputs minimum range quantized value QminWhen the input voltage is greater than or equal to VmaxTime ADC outputs full-scale quantized value QmaxWhen the input voltage is in the range of measurement range, the output quantization value Q changes linearly with the input voltage V.
3. The automatic gain control method according to claim 2, wherein the bit width of the quantized value Q of the ADC is 8-14 bits.
4. The automatic gain control of claim 1 wherein said step of calculating a relative value of said smaller one of said differences to a 50% full-scale quantization value is characterized by said relative value RnThe calculation formula of (2) is as follows:
wherein Qhalf=(Qmax-Qmin)/2,dmin,nThe sequence number n represents the nth search maximum or minimum value, which is the smaller one of the 2 difference values in step S203.
5. The automatic gain control method according to claim 1, wherein in the step of setting the upper limit flag to 1 when the relative value is larger than an upper limit threshold value and to 0 otherwise, setting the lower limit flag to 1 when smaller than a lower limit threshold value and to 0 degree otherwise, the upper limit threshold value is 2 times or more the lower limit threshold value.
6. The automatic gain control method of claim 1, wherein said time-out-of-ceiling flag continues for NoverWhen the times are all 1, the gain value is reduced by one gear, and when the low limit mark is continuous NsagAnd when the times are all 1, in the step of increasing the gain value by one gear, when the upper limit exceeding flag is 0 or the gain value is reduced for one time, the upper limit exceeding flag counter is cleared, and when the lower limit exceeding flag is 0 or the gain value is increased for one time, the lower limit exceeding flag counter is cleared.
8. The automatic gain control method according to any one of claims 1 to 7, wherein the gain value is determined by a 4-bit control word, increasing the gain value by one step increases the control word by 1, decreasing the gain value by one step decreases the control word by 1, does not increase when the control word increases to the maximum allowed value, and does not decrease when the control word decreases to the minimum allowed value.
9. The automatic gain control method of claim 8 wherein the control word is initialized to a particular value, neither amplified nor reduced, for the input signal each time automatic gain control is enabled.
10. An automatic gain control device of a power carrier communication system is characterized by comprising the following modules:
the maximum and minimum searching module is used for searching the maximum value and the minimum value in the continuous N ADC quantization values;
the difference value calculation module is used for calculating the difference value between the maximum value and the full-scale quantized value and the difference value between the minimum value and the minimum-scale quantized value;
a difference comparison module for calculating the smaller of the 2 differences;
the range calculation module is used for evaluating the amplitude of the ADC input signal, namely calculating the relative value of the smaller difference value relative to a 50% full-range quantized value;
the range judgment indicating module is used for judging and indicating whether the input signal is in an expected signal range, setting the upper limit exceeding mark to be 1 when the relative value is larger than the upper limit threshold value, and otherwise setting the lower limit mark to be 0 when the relative value is smaller than the lower limit threshold value, and otherwise setting the lower limit mark to be 1;
a gain adjusting module for calculating and outputting gain control word, deciding whether the input signal to ADC is amplified or reduced, and when the upper limit mark is exceeded, N is continuousoverWhen the times are all 1, the gain value is reduced by one gear, and when the low limit mark is continuous NsagWhen the times are all 1, the gain value is increased by one gear.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610962590.5A CN106549690B (en) | 2016-11-05 | 2016-11-05 | Automatic gain control method and device for power carrier communication system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610962590.5A CN106549690B (en) | 2016-11-05 | 2016-11-05 | Automatic gain control method and device for power carrier communication system |
Publications (2)
Publication Number | Publication Date |
---|---|
CN106549690A CN106549690A (en) | 2017-03-29 |
CN106549690B true CN106549690B (en) | 2020-04-07 |
Family
ID=58394163
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610962590.5A Active CN106549690B (en) | 2016-11-05 | 2016-11-05 | Automatic gain control method and device for power carrier communication system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106549690B (en) |
Families Citing this family (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108541055B (en) * | 2018-03-02 | 2019-09-20 | 珠海格力电器股份有限公司 | Power regulating method and device, the power regulating method based on power line carrier |
CN110380757B (en) * | 2019-05-27 | 2021-12-21 | 上海感拓智能科技有限公司 | Self-adaptive power carrier communication device |
CN111600563A (en) * | 2019-08-28 | 2020-08-28 | 青岛鼎信通讯股份有限公司 | Gain control device for two-stage programmable amplifier for power line communication |
CN114341667B (en) * | 2020-07-10 | 2023-08-04 | 深圳市速腾聚创科技有限公司 | Laser receiving circuit and laser radar |
CN113364418B (en) * | 2021-06-28 | 2023-03-21 | 贵州航天电子科技有限公司 | Program-controlled gain amplification circuit and signal control method |
CN114726410B (en) * | 2022-03-07 | 2022-09-30 | 山东大学 | Non-uniform wave beam space modulation method and system suitable for multi-antenna communication perception integration |
CN114785434B (en) * | 2022-03-23 | 2022-12-02 | 北京睿信丰科技有限公司 | Method, device, equipment, system and medium for detecting availability of S-band channel |
Family Cites Families (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
ES2187274B1 (en) * | 2001-05-17 | 2004-08-16 | Diseño De Sistemas En Silicio, S.A. | AUTOMATIC GAIN CONTROL SYSTEM FOR MULTI USER DIGITAL TRANSMISSION SYSTEM ON ELECTRICAL NETWORK. |
CN102427376A (en) * | 2011-12-09 | 2012-04-25 | 上海翊昊微电子有限公司 | Power line carrier communication system and method |
US8977314B2 (en) * | 2012-09-14 | 2015-03-10 | Aviacomm Inc. | Smart AGC for wideband multi-standard RFIC |
CN103220018B (en) * | 2013-03-19 | 2015-05-20 | 北京中宸泓昌科技有限公司 | Control method of automatic gain in power line carrier communication network |
CN105337917A (en) * | 2014-08-06 | 2016-02-17 | 南京能瑞自动化设备股份有限公司 | Gain compensation technology for orthogonal frequency division multiplexing (OFDM) power line carrier communication chip |
-
2016
- 2016-11-05 CN CN201610962590.5A patent/CN106549690B/en active Active
Also Published As
Publication number | Publication date |
---|---|
CN106549690A (en) | 2017-03-29 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106549690B (en) | Automatic gain control method and device for power carrier communication system | |
CN107086859B (en) | Digital automatic gain control circuit for wireless communication receiver | |
CN104081661B (en) | The method and apparatus of independent control front-end gain and baseband gain | |
CN101048940B (en) | Adapting filter to detected interference level | |
WO2011073859A3 (en) | Defining adaptive detection thresholds | |
US20110299061A1 (en) | Laser range finding device and distance measurement method thereof | |
US6968166B2 (en) | Method and apparatus of a fast digital automatic gain control circuit | |
US9729119B1 (en) | Automatic gain control for received signal strength indication | |
WO2004070985A3 (en) | Reduced crossmodulation operation of a multimode communication device | |
JP2007327956A (en) | Method and apparatus for measuring distance | |
RU2011108455A (en) | JOINT FREQUENCY-TIME AUTOMATIC ADJUSTMENT OF AMPLIFICATION FOR WIRELESS COMMUNICATION | |
US10892726B2 (en) | Pulse based automatic gain control for analog and pulse domain regulation | |
US9325359B2 (en) | Radiofrequency signal setting reaching a condition of jamming or clipping | |
CN107222228A (en) | Automatic gain control circuit and its control method, receiver | |
US9059877B2 (en) | Dynamic gain for DAC illumination control | |
US20150092586A1 (en) | Receiver with frequency deviation detection capability and method therefor | |
US20210028873A1 (en) | Information Transfer Using Discrete-Frequency Signals and Instantaneous Frequency Measurement | |
CN101350675B (en) | Threshold value detection circuit system for limiting amplifier | |
CN102624345A (en) | Memristor-based automatic gain control circuit | |
CN114513842B (en) | Digital automatic gain control implementation method in pulse signal receiver | |
US9203472B2 (en) | Automatic gain control for power line communication | |
KR100964384B1 (en) | Method and receiver for automatic gain control | |
WO2009120201A1 (en) | System and method of companding an input signal of an energy detecting receiver | |
CN102752002A (en) | Method for eliminating adjacent-channel interference (ACI) and receiver | |
KR200425557Y1 (en) | Apparatus for estimating received signal power level of digital communication systems |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |