Summary of the invention
It is an object of the invention to deficiency in view of the above technology, the LoRa modulated signal solution under a kind of multipath channel is proposed
Tune method, to improve the error bit ability of receiving end, to improve the reliability of system.
To achieve the above object, technical scheme is as follows:
(1) corresponding dot product will be carried out with original down-chirp signal by the targeting signal after down-sampling, then successively
It carries out FFT and seeks absolute value, length is 2 after obtaining directly demodulationSFTargeting signal A, wherein SF be spreading factor;
(2) interception and reset data are carried out to the targeting signal after direct demodulation, obtain new targeting signal B:
(2a) finds the targeting signal A maximum value after directly demodulating, and retains maximum value or so M point, is truncated to a length of
For the size of the targeting signal C, M of (2M+1) a point according to value the case where channel, value range is 1 to 2SF-1-1;
(2b) is by value and maximum value of each point of targeting signal C after interceptionIt is compared: when the value of certain point
Greater than maximum valueWhen, then the value of the point remains unchanged, when the value of certain point is less than maximum valueWhen, then by the value of the point
0 is reset to, new targeting signal B is obtained, wherein the size of P is according to value the case where channel,
(3) it will be carried out by each of load signal after down-sampling symbol with original down-chirp signal corresponding
Dot product, then successively carry out FFT and take absolute value to each symbol, obtain the load signal D after directly demodulation;
(4) each of the load signal D after directly demodulating symbol and new targeting signal B are subjected to matched filtering
Operation obtains new load signal E;
(5) position corresponding to each symbol maximum value is found in new load signal E, successively it is carried out ten into
Binary conversion and Gray's inverse mapping are made, modulation intelligence bit is obtained.
Compared with prior art, the present invention having the advantage that
1. the reliability of lifting system
In the present invention, passes through the matched filter operation of targeting signal and load signal in receiving end, take full advantage of leading
The channel information for including in signal, to reduce the influence of channel;Simultaneously because passing through during obtaining targeting signal
Interception and reset data to targeting signal, reduce the introducing of noise;It is directly right compared in traditional Direct demodulation
The load signal received is demodulated, and the present invention is influenced less by channel and noise, and the demodulation performance of acquisition is higher, from
And the reliability of LoRa modulated signal demodulating system can be improved.
2. error bit ability is good
Experiments have shown that being set as fixing two diameters in channel, under conditions of SF=7, the bit error rate is 10-3Locate property of the invention
There can be the promotion of 1.5dB compared to traditional Direct demodulation, there was only 0.5dB compared with the performance under additive Gaussian white noise channel
Gap.
Specific embodiment
Below in conjunction with the drawings and specific embodiments, the object, technical solutions and advantages of the present invention are described in detail.It is aobvious
So, based on the embodiments of the present invention, those of ordinary skill in the art are obtained without making creative work
Every other embodiment, shall fall within the protection scope of the present invention.
The present invention relates to a kind of demodulation method of LoRa signal, LoRa signal is with up-chirp or down-chirp
Swept-frequency signal carrys out encoded signal information.
Referring to Fig.1, the frequency modulation(PFM) of the LoRa signal, including unmodulated LoRa signal, the i.e. frequency of up-chirp signal
Rate curve line 1, the frequency curve line 2 of LoRa signal after modulation.
Referring to Fig. 2, the LoRa signal modulation, including unmodulated LoRa signal graph a, LoRa signal graph b after modulation.
Current major part is all traditional Direct demodulation about the demodulation use of LoRa modulated signal, and this method is in list
Under diameter channel, preferable performance can be obtained, but under multipath channel, error bit ability can significantly decrease, system can
It is deteriorated by property.The present invention is exactly to solve the problems, such as the demodulation of the LoRa modulated signal under multipath channel.
Referring to Fig. 3, steps are as follows for realization of the invention:
Step 1, targeting signal and load signal are obtained.
It is respectively that original up-chirp and original down-chirp carries out down-sampling to reception signal, unmodulated LoRa signal;
The symbolic number of targeting signal and load signal according to known to receiving end divides the reception signal after down-sampling
It cuts, obtains targeting signal F and load signal P1.
Step 2, new targeting signal B and load signal D are obtained.
Referring to Fig. 4, this step is implemented as follows:
(2a) obtains new targeting signal B:
(2a1) is that original down-chirp is carried out a little by targeting signal F and by the unmodulated LoRa signal after down-sampling
Multiply, then successively carry out FFT and seek absolute value, obtaining length is 2SFTargeting signal A;
(2a2) is 2 to lengthSFTargeting signal A intercepted:
Referring to Fig. 5, the realization of this step are as follows: save maximum value or so M point, obtain the signal that length is (2M+1) a point
C finds out maximum value from the targeting signal A after direct demodulation, and determines the subscript MAX of the corresponding position of the maximum value, by MAX
Compared with M carries out size:
As MAX≤M, 2 will be designated as under targeting signal ASF(MAX-M) is designated as 2 underSFThis segment signal is as interception letter
Number front half section, will be designated as under targeting signal A 1 to this segment signal of subscript MAX+M as the second half section of intercept signal, front and back two
Section constitutes targeting signal C;
When MAX >=2SFWhen-M, it will be designated as MAX-M under targeting signal A and be designated as 2 underSFThis segment signal is as intercept signal
Front half section, 1 will be designated as under targeting signal A to subscript MAX+M-2SFSecond half section of this segment signal as intercept signal, front and back
Two sections of composition targeting signal C;
When MAX is unsatisfactory for above-mentioned two situations, it is leading that this segment signal of MAX-M to MAX+M composition is designated as under targeting signal A
Signal C;
(2a3) resets the targeting signal C after interception:
By the value of the every bit in the targeting signal C after interception and maximum valueCompare as size, when certain point
Value is less than maximum valueWhen, which resets to 0, when the value of certain point is more than or equal to maximum valueWhen, keep the point
It is worth constant, obtains new targeting signal B, wherein the size of P is according to value the case where channel,
(2b) obtains new load signal D:
It will be original down- by each of load signal P1 after down-sampling symbol and unmodulated LoRa signal
Chirp signal carries out corresponding dot product, then successively carries out FFT to each symbol and take absolute value, and obtains after directly demodulating
Load signal D.
Step 3, new load signal E is obtained.
Each of new targeting signal B and load signal D symbol is subjected to matched filtering, is keeping load signal D
In each symbol it is fixed in the case where, new targeting signal B is carried out to slide dot product point by point with it, when new targeting signal
When B is overlapped with the last one point of each symbol in load signal D, by each symbol in load signal D since starting point
It gradually moves and is placed on the last one point below, when the starting point of new targeting signal B and load signal D are overlapped again,
Operation is terminated, acquired results are new load signal E.
Step 4, modulation intelligence bit is obtained.
(5a) finds the subscript m ax of position corresponding to each symbol maximum value in new load signal E, calculates max+
The value of M-MAX, by the calculated result and 2SFMake complementation, to eliminate the influence of initial position MAX-M, obtains new load signal
The physical location P of each symbol maximum value in E;
The P that (5b) is obtained with (5a) takes coefficient d 0 of its remainder as binary gray code lowest order divided by 2, then after
Continue quotient divided by 2, coefficient d 1 of the gained remainder as binary gray code time low level repeats down always, until quotient is 0, obtains
To binary gray code b;
(5c) retains highest order of the highest order of binary gray code b as natural binary code, by natural binary code
A time high position of the highest order with the result after time high-order Gray code phase exclusive or as natural binary code;
(5d) successively finds out remaining position of natural binary code according to method identical with (5c), obtains modulation intelligence ratio
It is special.
Below in conjunction with emulation experiment, technical effect of the invention is described in further detail:
Experiment 1,
1.1) experiment condition: SF=7 i.e. symbol lengths are set as 128 points, sample frequency Fs=10MHz up-samples multiple
It is 8, signal bandwidth B=Fs/8, the byte-sized for inputting modulation intelligence is Byte=64, and channel is two fixed diameters, and
Delay time between two diameters is 0.6us, retains targeting signal A maximum value or so each 16 points, takes
1.2) experiment content
It is above-mentioned 1.1) under the conditions of, LoRa signal is demodulated with the method for the present invention and traditional demodulation method, as a result
It is as shown in Figure 7:
From fig.7, it can be seen that the method for the present invention compares traditional demodulation method, it is 10 in the bit error rate-3Locate error bit ability to obtain
The promotion of 1.5dB, and 33 points are not set 0 targeting signal compared with 128 points of long targeting signals, error bit ability is promoted,
33 points of length set 0 targeting signal with it is 33 points long do not set 0 targeting signal compared with, error bit ability is equally also promoted.From can
For the angle of property, under identical SNR, bit error rate is lower, and the reliability of the system is better.
It is also seen that from 5 curves of Fig. 7 under the performance and theoretical case additive white Gaussian noise AWGN of the method for the present invention
Performance it is close, i.e. the only gap of 0.5dB.
Experiment 2,
2.1) experiment condition: SF=8 i.e. symbol lengths are set as 256 points, sample frequency Fs=10MHz up-samples multiple
It is 8, signal bandwidth B=Fs/8, the byte-sized for inputting modulation intelligence is Byte=64, and channel is two fixed diameters, and
Delay time between two diameters is 0.6us, retains targeting signal A maximum value or so each 16 points, takes
2.2) experiment content
It is above-mentioned 2.1) under the conditions of, LoRa signal is demodulated with the method for the present invention and traditional demodulation method, as a result
It is as shown in Figure 8:
As seen from Figure 8, the method for the present invention compares traditional demodulation method, is 10 in the bit error rate-3Locate error bit ability to obtain
The promotion of 1.5dB, and 33 points are not set 0 targeting signal compared with 256 points of long targeting signals, error bit ability is promoted,
33 points of length set 0 targeting signal with it is 33 points long do not set 0 targeting signal compared with, error bit ability is equally also promoted.
For the angle of reliability, under identical SNR, bit error rate is lower, and the reliability of the system is better.
To sum up, the demodulation method of the LoRa modulated signal under a kind of multipath channel of the invention and traditional LoRa, which are modulated, believes
Number Direct demodulation is compared, identical in SF, is fixed under conditions of two diameters, is 10 in the bit error rate-3Locate error bit ability to obtain
The promotion of 1.5dB, at the same set leading after 0 and do not set 0 it is leading, and do not intercept leading, not matched method is compared, property
Can all be it is best, differed with the performance under theoretical case additive white Gaussian noise AWGN only 0.5dB, show the present invention in multipath
There is better demodulation performance, the reliability of system is higher under channel.