Summary of the invention
The purpose of the invention is to overcome the shortcomings of above-mentioned background technique, a kind of wireless data transmission method is provided
And system, the accuracy and reliability of wireless data transmission can be effectively improved, is met higher and higher under big data era
Data transportation requirements.
To achieve the above objectives, the present invention provides a kind of wireless data transmission method, comprising the following steps: S1: when
When terminal transmitting terminal is in uplink pilot time slot, the receiving end Xiang Jizhan sends the sine wave of specific frequency, and the specific frequency is
Randomly selected a kind of frequency from existing K kind nominal frequency;S2: after the sine wave of specific frequency is sent completely, Xiang Ji
The PN sequence that receiving end transmission of standing is modulated through OQPSK, so that base station receiving end is timed synchronous use;S3: it is sent out to PN sequence
After the completion of sending, the receiving end Xiang Jizhan sends the coded data modulated through OQPSK, and the coded data uses Error Correction of Coding;S4: base
The sine wave progress channel estimation that receiving end is sent according to terminal transmitting terminal of standing is synchronous with frequency deviation, is timed together according to PN sequence
Step and phase estimation;After frequency deviation synchronization and Timing Synchronization, coded data is demodulated and decoded using phase estimation.
Based on the above technical solution, the terminal transmitting terminal is realized specific using the communication chip of sx1276 model
The sine wave of frequency is sent;Its realization process includes following below scheme: FSK mode is set by sx1276 communication chip, in FSK mould
Under formula, sine wave freuqency is set;According to the sine wave duration and bit rate to be sent, data length is set;Using configured
The transmission of sx1276 communication chip realization sine wave.
Based on the above technical solution, the realization process modulated described in step S2 and step S3 through OQPSK is as follows:
To be sent 0,1bit data conversion is at 1 or -1;Real void is carried out to the data after conversion to be staggered;It is real empty to what is obtained
Alternating series, since first number, if the phase of subsequent number increases 90 ° relative to the phase of the number of front,
1 is obtained, if the phase of subsequent number reduces 90 ° relative to the phase of the number of front, obtains 0, according to above-mentioned rule
Corresponding 0 or 1 data are obtained by real void staggered 1 or -1;Obtain 0 or 1 data are sent into MSK or GMSK modulation
Device, which is realized, modulates the OQPSK of data.
Based on the above technical solution, step S4 specifically includes following below scheme: S401: base station receiving end is according to terminal
The sine wave that transmitting terminal is sent estimates the frequency of sine wave, phase and amplitude;End is obtained according to the amplitude and phase of sine wave
Hold the channel response of transmitting terminal;According to the frequency of sine wave, by the frequency of sine wave and with the frequency frequency difference of sine wave it is the smallest
Nominal frequency subtracts each other to obtain frequency deviation, to the reception signal compensation frequency deviation after sine wave, realizes Frequency Synchronization;S402: base station
Receiving end carries out related calculation the PN sequence received and known PN sequence, obtains timing offset;The timing offset is compensated, it is real
Existing Timing Synchronization, and phase estimation is obtained according to the phase of correlation;S403: it after Frequency Synchronization and Timing Synchronization, utilizes
Phase estimation demodulates and decodes coded data.
Based on the above technical solution, the Error Correction of Coding used in step S3 is convolutional code.
The present invention also provides a kind of wireless data transmission system for realizing above-mentioned transmission method, including terminal hair simultaneously
Sending end and base station receiving end, the terminal transmitting terminal include sine wave transmission unit, PN sequence transmission unit and coded data hair
Send unit;
The sine wave transmission unit is used for: when terminal transmitting terminal is in uplink pilot time slot, the receiving end Xiang Jizhan hair
Send the sine wave of specific frequency;
The PN sequence transmission unit is used for: after the sine wave of specific frequency is sent completely, the receiving end Xiang Jizhan is sent
The PN sequence modulated through OQPSK;
The coded data transmission unit is used for: after PN sequence is sent completely, the receiving end Xiang Jizhan is sent through OQPSK tune
The coded data using Error Correction of Coding of system;
The base station receiving end is used for: it is synchronous with frequency deviation to carry out channel estimation according to the sine wave that terminal transmitting terminal is sent;
Synchronous and phase estimation is timed according to PN sequence;After Frequency Synchronization and Timing Synchronization, using phase estimation to coding
Data are demodulated and decoded.
Based on the above technical solution, the sine wave transmission unit is realized using the communication chip of sx1276 model
The sine wave of specific frequency is sent;Its realization process includes following below scheme: FSK mode is set by sx1276 communication chip,
Under FSK mode, sine wave freuqency is set;According to the sine wave duration and bit rate to be sent, data length is set;Utilize configuration
Good sx1276 communication chip realizes the transmission of sine wave.
Based on the above technical solution, the PN sequence transmission unit and coded data transmission unit realize OQPSK
The process of modulation is as follows: to be sent 0,1bit data conversion is at 1 or -1;Real empty staggered row is carried out to the data after conversion
Column;To obtained real empty alternating series, since first number, if phase of the phase of subsequent number relative to the number of front
90 ° are increased, then obtaining 1, if the phase of subsequent number reduces 90 ° relative to the phase of the number of front, is obtained
0, corresponding 0 or 1 data are obtained by real void staggered 1 or -1 according to above-mentioned rule;Obtain 0 or 1 data are sent into
MSK or GMSK modulation device, which are realized, modulates the OQPSK of data.
Based on the above technical solution, the base station receiving end includes channel estimation and frequency deviation synchronization unit, timing
Synchronous and phase estimation unit and demodulating and decoding unit;
The channel estimation and frequency deviation synchronization unit are used for: estimating sine wave according to the sine wave that terminal transmitting terminal is sent
Frequency, phase and amplitude;The channel response of terminal transmitting terminal is obtained according to the amplitude and phase of sine wave;According to sine wave
Frequency subtracts each other to obtain frequency deviation by the frequency of sine wave and with the smallest nominal frequency of frequency frequency difference of sine wave, to sine wave it
The reception signal compensation frequency deviation afterwards realizes Frequency Synchronization;
The Timing Synchronization and phase estimation unit are used for: the PN sequence received is done related fortune to known PN sequence
It calculates, obtains timing offset;The timing offset is compensated, Timing Synchronization is realized, phase estimation is obtained according to the phase of correlation;
The demodulating and decoding unit is used for: after Frequency Synchronization and Timing Synchronization, using phase estimation to coded data
It is demodulated and decoded.
Based on the above technical solution, the Error Correction of Coding that the coded data transmission unit uses is convolutional code.
The beneficial effects of the present invention are:
Terminal transmitting terminal of the invention is according to uplink pilot time slot+PN sequence+entangle when carrying out the transmission of upstream data
What the frame format of miscoding data was sent, structure is simple and easy to implement for frame format.Specifically, terminal transmitting terminal is led in uplink
The sine wave of specific frequency is first sent when frequency time slot;After sine wave is sent completely, sends PN sequence: being sent completely to PN sequence
Afterwards, the coded data for using Error Correction of Coding is finally sent.Base station receiving end after receiving the data that terminal transmitting terminal is sent, according to
Sine wave progress channel estimation is synchronous with frequency deviation, is timed synchronous and phase estimation according to PN sequence;And frequency deviation it is synchronous and
After Timing Synchronization, coded data is demodulated and decoded using phase estimation, to realize the transmission of wireless communication data.
Compared with prior art, entire data transmission procedure of the invention is safe and reliable, and accuracy is high.Simple and reliable
Upstream data frame format to can guarantee effectively reliable transmission under the transmission of big data quantity, when meeting big data
Higher and higher transmission requirement under generation.
Specific embodiment
With reference to the accompanying drawing and specific embodiment the present invention is described in further detail.
Shown in Figure 1, the embodiment of the present invention provides a kind of wireless data transmission method, comprising the following steps:
Step S1: when terminal transmitting terminal is in uplink pilot time slot, the receiving end Xiang Jizhan sends the sine of specific frequency
Wave, the specific frequency are randomly selected a kind of frequencies from existing K kind nominal frequency.
It is understood that terminal transmitting terminal is using the communication core for being semtech company sx1276 model in the present embodiment
Piece come realize specific frequency sine wave send.When specific operation, realization process includes following below scheme:
Step S101, sine wave freuqency is set: setting FSK (Frequency-shift for sx1276 communication chip
Keying, frequency shift keying) mode, under FSK mode, when the bit of transmission is continuous " 0 " or continuous " 1 ", transmission
Signal is exactly sine wave;By the way that centre frequency F is arrangedRFWith carrier shift amount FDEVThe frequency f for controlling sine wave, makes sine wave
Frequency is the specific frequency, wherein when sending bit is continuous " 0 ", sine wave freuqency f=FRF-FDEV, when transmission ratio
When spy is continuous " 1 ", sine wave freuqency f=FRF+FDEV, it is transferred to step S102.
Further, when practical operation, centre frequency FRFWith carrier shift amount FDEVThe minimum resolution of setting is
FSTEP, FSTEPIt is determined by crystal oscillator frequency, and centre frequency FRF=mFSTEP(m is positive integer), sine wave freuqency f=nFSTEP(n is
Positive integer).If n < m, due to FRF=mFSTEP, f=nFSTEP, then will send bit and be set as continuous " 0 ", by carrier shift amount
FDEVIt is set as (m-n) FSTEP;If n > m, bit will be sent and be set as continuous " 1 ", by carrier shift amount FDEVIt is set as (n-
m)FSTEP。
Step S102, according to sine wave duration and bit rate the setting data length to be sent: setting the sine wave to be sent
Time span be t, then data length is arranged bit rate BitRate are as follows: t/BitRate is transferred to step S103.
Step S103, send sine wave: configuration sx1276 communication chip enters Sleep mode suspend mode, then will adjust
Type processed enters Standby mode standby mode after being set as FSK mode;Centre frequency F is setRF, carrier shift amount FDEVWith
Transmission power sets 0 for Preamble preamble length, sets SyncOn to " 0 ", synchronization character is disabled, to FIFO
The information bit of corresponding data length is written in (First Input First Output, First Input First Output) memory;Into
Enter the FSTx mode of sx1276 communication chip, waits PLL (Phase Locked Loop, phaselocked loop) Frequency Locking, frequency locker
The Tx mode for entering sx1276 communication chip after fixed starts to send sine wave;It is sinusoidal after sx1276 issues TxDone interruption
Wave is sent completely.
Step S2: after the sine wave of specific frequency is sent completely, the receiving end Xiang Jizhan is sent through OQPSK (four phases of offset
Phase-shift keying (PSK)) modulation PN sequence (Pseudo-noise Sequence, PN sequence), for base station receiving end into
Row Timing Synchronization uses.
Step S3: after PN sequence is sent completely, the receiving end Xiang Jizhan sends the coded data modulated through OQPSK, described
Coded data uses Error Correction of Coding.In the present embodiment, the Error Correction of Coding used is convolutional code.
It is understood that PN sequence and coded data sent in the present invention are modulated by OQPSK.
OQPSK modulation refers to that the code stream by same phase and orthogonal two branch has been staggered a bit period in time.Due to two branch codes
The offset of first half period will not occur two tributary bit polarity while turn over so that polarity upset only may occur all the way every time
The phenomenon that turning.Therefore, OQPSK signal phase can only jump 0 °, ± 90 °, be not in 180 ° of phase hit, as shown in Figure 2.
The formula modulated according to fig. 2 with OQPSK:
S (t)=I (t) * sin (wt)+Q (t-Tb) * cos (wt)
I (t)=A1*g(t-T)+A3*g(t-3*T)+A5*g(t-5*T)
Q (t)=A2*g(t-2*T)+A4*g(t-4*T)+A6*g(t-6*T)
Wherein, I (t) and Q (t) respectively indicate in the same direction and orthogonal two paths of signals, A1, A3, A5For the symbol of branch road in the same direction,
A2, A4, A6For the symbol in quadrature branch, sin (wt) and cos (wt) indicate to be equal to one with orthogonal two-way carrier wave, Tb in the same direction and compare
The special period, it is known that: PN sequence and coded data are after OQPSK modulating-coding, so that envelope fluctuating is small, performance is changed
It is kind, so that wireless communication data is able to achieve effective, reliable transmission.Specifically, it is passed through described in step S2 and step S3
The realization process of OQPSK modulation is as follows:
To be sent 0,1bit data conversion is at 1 or -1: being converted into 1 for 0, is converted into -1 for 1;By the number after conversion
According to being denoted as a1, a2, a3, a4, a5 ..., then real void is carried out to the data after conversion and is staggered, such as a1*j, a2, a3*j, a4,
A5*j ..., j are positive integer;To obtained real empty alternating series, since first number, if the phase of subsequent number is opposite
90 ° are increased in the phase of the number of front, then 1 is obtained, if the phase of subsequent number subtracts relative to the phase of the number of front
90 ° are lacked, then obtaining 0;Corresponding 0 or 1 data are obtained according to by real void staggered 1 or -1, then 0 or 1 data are just
Be GMSK or MSK modulation before Binary Zero, 1 data;Obtain 0 or 1 data are sent into MSK or GMSK modulation device is realized
OQPSK modulation to data.
S4: base station receiving end is synchronous with frequency deviation according to the sine wave progress channel estimation that terminal transmitting terminal is sent, according to PN
Sequence is timed synchronous and phase estimation;After frequency deviation is synchronous and Timing Synchronization, using phase estimation to coded data into
Row demodulation and decoding.
When practical operation, step S4 specifically includes following operation:
S401: base station receiving end estimates the frequency, phase and width of sine wave according to the sine wave that terminal transmitting terminal is sent
Degree;The channel response of terminal transmitting terminal is obtained according to the amplitude and phase of sine wave;According to the frequency of sine wave, by sine wave
Frequency and subtract each other to obtain frequency deviation with the smallest nominal frequency of frequency frequency difference of sine wave, to the reception signal compensation after sine wave
The frequency deviation realizes Frequency Synchronization;
S402: base station receiving end carries out related calculation the PN sequence received and known PN sequence, obtains timing offset;
The timing offset is compensated, realizes Timing Synchronization, and phase estimation is obtained according to the phase of correlation;
S403: after Frequency Synchronization and Timing Synchronization, coded data is demodulated and decoded using phase estimation.
Shown in Figure 3, the embodiment of the present invention also provides a kind of wireless data transmission system, including terminal transmitting terminal
With base station receiving end, the terminal transmitting terminal includes that sine wave transmission unit, PN sequence transmission unit and coded data send list
Member.
Wherein, sine wave transmission unit is used for: when terminal transmitting terminal is in uplink pilot time slot, the receiving end Xiang Jizhan hair
Send the sine wave of specific frequency.PN sequence transmission unit is used for: after the sine wave of specific frequency is sent completely, being received to base station
End sends the PN sequence modulated through OQPSK.Coded data transmission unit is used for: after PN sequence is sent completely, being received to base station
End sends the coded data using Error Correction of Coding modulated through OQPSK.Base station receiving end is used for: being sent according to terminal transmitting terminal
It is synchronous with frequency deviation that sine wave carries out channel estimation;Synchronous and phase estimation is timed according to PN sequence;In Frequency Synchronization and determine
When it is synchronous after, coded data is demodulated and decoded using phase estimation.
Further, shown in Figure 3, the base station receiving end includes channel estimation and frequency deviation synchronization unit, periodically same
Step and phase estimation unit and demodulating and decoding unit.Wherein, channel estimation and frequency deviation synchronization unit are used for: according to terminal transmitting terminal
The sine wave sent estimates the frequency of sine wave, phase and amplitude;Terminal is obtained according to the amplitude and phase of sine wave to send
The channel response at end;According to the frequency of sine wave, by the frequency of sine wave and with the smallest nominal frequency of the frequency frequency difference of sine wave
Rate subtracts each other to obtain frequency deviation, to the reception signal compensation frequency deviation after sine wave, realizes Frequency Synchronization.Timing Synchronization and phase are estimated
Meter unit is used for: the PN sequence received and known PN sequence being carried out related calculation, timing offset is obtained;It is inclined to compensate the timing
Difference realizes Timing Synchronization, and obtains phase estimation according to the phase of correlation.Demodulating and decoding unit is used for: in Frequency Synchronization and
After Timing Synchronization, coded data is demodulated and decoded using phase estimation.
It should be understood that system provided by the above embodiment is when being operated, only drawing with above-mentioned each functional module
Divide and be illustrated, in practical application, can according to need and be completed by different functional modules above-mentioned function distribution, i.e.,
The internal structure of system is divided into different functional modules, to complete all or part of the functions described above.
The present invention is not limited to the above-described embodiments, for those skilled in the art, is not departing from
Under the premise of the principle of the invention, several improvements and modifications can also be made, these improvements and modifications are also considered as protection of the invention
Within the scope of.
The content being not described in detail in this specification belongs to the prior art well known to professional and technical personnel in the field.