• 沒有找到結果。

Matlab receiver platform architecture

There are three systems that are used for this thesis. Figurer 3-7 shows a DSSS system that is used to do the front-end signal process, frequency and timing synchronization. Figure 3-8 is a dual system constituted of DSSS system and Orthogonal Frequency Division Multiplexing (OFDM) system and this system is used to test the proposed dual system AGC algorithm. This AGC algorithm for single system (DSSS system) and dual system (DSSS system + OFDM system) is introduced in chapter 4.

Figure 3-9 shows an complete 802.11b system that is used to calculate Bit-Error-Rate (BER) and Packet-Error-Rate (PER).

Figure 3-7 DSSS system architecture

Figure 3-8 Dual system platform architecture

Figure 3-9 IEEE 802.11b platform architecture

HAPTER 4

THE FRONT-END SIGNAL PROCESS

.1 AGC algorithm

.1.1 Single system

ystem, the PN correlator output is the most important information,

C

4

4

For any DSSS s

hence in 802.11b system the Barker correlator output is used to do a lot of operation. So the proposed AGC algorithm is constructed based on the PN correlator output. Figure 4-1 shows the Barker correlator output in one symbol time. The peak means that the point having maximum correlator output power in one symbol time and its formula is

Figure 4-1 Barker correlator output during one symbol time

) ) )

power=Max r tnT Bi + r tnT Bi ………(4-1) where T is symbol time duration and r(t) (the received sign

……….(4-2) where s(t) is the received signal, h(t) is multi

2 2

path impulse response, f∆ is CFO,θ is phase offset and n(t) is AWGN. The pilot is the first point that its correlator output power is over threshold in one symbol time, it is used to find the correct symbol boundary. The formula is

Pilot_set is a set of point that correlator output power are over threshold and pilot is the point that time is smallest in the pilot_set, that means pilot is the first point that its power value is over threshold during one symbol time. In real world, initially it could not be known that how much the path loss effect is, so the AGC set VGA gain at maximum for never losing any signal whatever the received signal is noise or a packet. Next (4-4) is used to calculate next VGA gain until the packet is coming.

' 10 log (10 M ) G = −G

i D ………..……….……...(4-4)

where G and G’ are current VGA gain and next VGA gain respectively. M is the measured barker correlator output and D is the desired barker correlator output. At here, two different kinds of barker correlator output are used. One is peak power and another is average correlator power, so these can be formulated as (4-5) and (4-6)

10

Figure 4-2 Average power of barker correlator output of 100 packets

where k is the number of chips in one symbol time and D_peak and D_avg are the desired peak power and desired average power respectively. Figure 4-2 shows the average barker correlator output of 100 packets with AWGN SNR=-5dB in front and end.

It could know that the average power of noise and packets have their steady power respectively. Figure 4-3 shows the AGC state diagram for single system – DSSS system.

Figure 4-4 shows how AGC justify the VGA gain versus time according to peak power and average power. If AGC use average power to justify VGA gain, the VGA gain will

not change so rapidly and highly than using peak power. So the average power is used to justify VGA gain at AGC acquisition state. Figure 4-5 shows the situation of the received signal pass through VGA with AGC working and it could see that the relationship between figure 4-4 and figure 4-5. When detecting that packet comes, AGC will jump to the tracking state, and in tracking state AGC just use peak power to justify VGA gain and will calculate the next VGA gain after more symbol time than acquisition state. Figure 4-6 shows the Root-Mean-Square-Error(RMSE) at four kinds of environment-no multipath, SPW11b, SPW11a and IEEE Multipath from SNR -5dB to 10 dB. Next, how to detect whether a packet comes or not will be introduced.

Figure 4-3 AGC state diagram for single system

Figure 4-4 VGA gain adjustment at time domain

Figure 4-5 The received signal when AGC is on

Figure 4-6 RMSE with none and three different kinds of multipath fadding

.1.2 Dual system

In a dual system, the critical issue is that the received signal must be quickly

.1.2.1 According to ADC sampling power

Initially, the received signal power must be adjusted at a suitable level, because the recei

where Tc is the chip time during one symbol time, N is the number of chips in one 4

identified whether it belongs to which kind of system. So the dual system AGC algorithm is proposed based on this reason.

4

ved signal could not be over the detecting range of ADC, the real packet information will be truncated by ADC and cause the situation that correlator could not clearly produce correct result. For quickly justifying the VGA gain, the ADC sampling point power is used by AGC and the formula is

N

Samp power=

r tnT+ 2 2

1

_ Re( ( )) Im( ( )

symbol time which equals T/Tc. Then the next VGA gain is calculated according to

10

where D_samp is the desired sampling point power.

that the VGA gain can quickly be The advantage of using sampling point power is

adjusted at a acceptable level, but the disadvantage is the VGA gain will easily be affected by AWGN, so the VGA gain will not be so stable. Based on this reason, once the packet type has been identified, the AGC state will change to tracking state to do more precise VGA gain adjustment. In the tracing state, the AGC will adjust according to the peak power of correlator output, hence the packet type has been known. Figure 4-7 shows the AGC state diagram of proposed dual system AGC algorithm. Compared with Figure

4-6, the only difference is that only at the packet detection state of AGC. The difference of acquisition state and tracking state is that the number of accumulating the peak power of correlator output, because before the end of preamble a more quickly estimating the VGA gain is needed based on the reason of reacting with quickly changeable channel and support the all synchronization components a stable without affecting by channel. The preamble filed is very important because all information about data is in it and all synchronization mechanism must be done before the end of preamble, so supporting a more quickly reacting and stable VGA gain is needed.

Figure 4-7 AGC state diagram for dual system

Figure 4-8 VGA gain adjustment at time domain

The VGA gain adjustment of dual system at time domain is shown in Figure 4-8.

The

.1.2.2 According to correlator output average power

In this proposed method, the sum of correlator output average power of DSSS and up side is the situation of transmitting the DSSS type packet and the bottom side is the situation of transmitting the OFDM type packet. The VGA gain of transmitting OFDM type packet seems not so ideal, because the OFDM system is not my major research area, the characteristic of OFDM correlator has not been familiar with me. So, the study of characteristic of OFDM correlator is one of my future works.

4

OFDM is used. However, this method for dual system is a little different from the previous proposed method for single system. Because for quickly identifying what type of a packet is, we must let the buffer that saving data for correlating without be cleared.

In the proposed method for single system, the buffer that saving data for correlating is cleared and we must waste a symbol time for getting the correct correlator output power.

Because the preamble length of the DSSS system that is chosen is long enough to wait until that the buffer is cleared. Although the proposed method could quickly identify the packet type, the hardware cost will be higher than the method without clearing the buffer.

The block diagram of this proposed method is shown in Figure 4-9.

Figure 4-9 The block diagram of proposed method with clearing buffer DSSS correlator

OFDM correlator

AGC

Buffer Control Unit Σ

VGA ADC

Figure 4-10 VGA gain adjustment at time domain

The VGA gain adjustment of this proposed method at time domain is shown in

Table 4-1 Comparison of traditional AGC and proposed AGC

ng buffer buffer

Figure 4-10. The up side is the situation of transmitting the DSSS type packet and the bottom side is the situation of transmitting the OFDM type packet. Compared with Figure 4-8 and Figure 4-10, it could be found that the method using the sum of correlator output average power of DSSS and OFDM is much more precise than that method using only the sum of sampling point power. Table 4-1 shows the comparison of traditional method and the proposed methods.

Sampling point Correlator Correlator with

cleari

without clearing Hardware complexity 1 adder

ntrol unit Precision Easy interference Resistance to

by AWGN AWGN

Resistance to AWGN Convergence speed 2~3 symbols 4~6 symbols 2~3 symbols

.2 Packet detection

The packet detection mechanism must be acting simultaneously with AGC 4

estimating. First, a kind of value-Peak-to-Average-Power Ratio (PAPR) is introduced, and it can be formulated as

Peak _ power

There are two kinds of information used to detect packet. One is timing and the

other is PAPR. Ideally the timing information means that peak will appear at the same position during every symbol time. However, the peak position will not always be the same under AWGN and multipath. So another information-PAPR is used for detecting packet more precisely. Figure 4-11 to 4-14 show the PAPR information during a packet from SNR -5dB to 10dB. From these figure, a message shows that when the SNR increase, the PAPR information of noise and packet will be separated more clearly. But under badly multipath the PAPR information is also become useless and Figure 4-15 shows this kind of situation. The formula of the packet detection rule that using timing information and PAPR information is

1 ( _

m abs pre peakloc peaklo

m ⎧ + −

where m is a constant that defined according to the specification of our system, T is the symbol time, Peak_loc is

_ c

respectively. The proposed rule is if the Peakloc, previous Peakloc and PAPR all meet

2 2

2 2

Re( ( ( 1) ' ) ) Im( (r t− −(n 1)T+i T' ) )iB

this rule during m continuous symbol time, and then the coming of a packet will be convinced. The larger m is, the correcting rate of detecting a packet is higher, but the wasted symbols during the preamble field is also larger, so a lot of considerations is needed to define the number m. For example, if m is set to 4 that means when m equals 4, a real packet is convinced that it is coming. In other words if you want to make sure that packet comes or not more precisely, you can set a higher number 5, 6, 7 etc. Figure 4-16 is the packet miss rate using this rule under all multipath channel, and the packet miss rate is not zero under the IEEE Multipath when SNR is over 0dB, because the IEEE Multipath is a badly multipath, it will cause the signal distortion very much. However

once the Multipath is bad very much, no matter how high the SNR is, packet miss also still appears. So that is why the packet miss rate is not zero when SNR is higher under the IEEE Multipath channel, but the packet miss rate is zero when SNR is higher under the other two Multipath channels, because IEEE Multipath channel is much badly than the other two Multipath channels.

Figure 4-11 PAPR information at SNR -5 dB

Figure 4-12 PAPR information at SNR 0 dB

Figure 4-13 PAPR information at SNR 5 dB

Figure 4-14 PAPR information at SNR 10 dB

Figure 4-15 PAPR information at SNR 0 dB with IEEE Multipath

Figure 4-16 Packet miss rate under three Multipath channel

4.3 Symbol bo

After a packet is detected, the symbol boundary is also needed to be decided. Under e

undary decision

th situation of only AWGN, if the peak information are used to define the symbol boundary, then the error rate will be the same as usual, because the symbol boundary can always be found at the duration of two continuous peaks. Figure 4-17 shows an example of symbol boundary under the situation of only AWGN, the two solid lines are the symbol boundary defined based on the peak information. However, under the situation of AWGN and badly Multipath, the original peak power may be degraded by Multipath and another power of a point that originally is not a peak may be heightened by Multipath, hence, that may cause a decision of wrong symbol boundary. That situation is shown in Figure 4-18.

Figure 4-17 Symbol boundary under the situation of only AWGN

Figure 4-18 Symbol boundary under AWGN and IEEE Multipath

For more correctly deciding the symbol boundary under more complicated channel, the timing information and a new information called pilot that mentioned in previous is used.

The pilot is

and the pre_pilot is

r _ ( 1) '1 c

The information of peak_loc and pre_peak_loc are also used here. The proposed symbol boundary rule can be shown in Figure 4-19. the numbers 1, 2, 3, 4 mean the priority that would be chosen to be the symbol boundary. That is there are four results of equations and then the chosen symbol boundary is according to the priority of the decision rule.

And the decision rule could be formulated as

_ 1 2

Figure 4-19 The symbol boundary decision rule

Once the symbol boundary is identified, the correlator can be not always busy for producing correlator output, and it just need at the end of one symbol time to get the correlator output, because the symbol boundary has been known. And then the peak_loc also can be known without depending on the correlator output, so the peak power is

_

peak power ……….…….(4-16)

2 2

Re( (r t nT symbol boundary T_ c) )B Im( (r t nT symbol boundary T_ c) )B

= − + i i + − + i i

After the symbol boundary decision, it is the timing synchronization, this component is very important in a wireless communication, but it is no my research topic, it will not be introduce in this thesis.

4.4 Frequency synchronization

4.4.1 CFO introduction

The intention of frequency synchronization is to estimate f∆ , the CFO effect between TX and RX in (4-2) and f∆ is defined in ppm. The value of f∆ in 1 ppm changes with the carrier frequency, for example, with 2.4 GHz carrier frequency, 1 ppm f∆ stands for 2.4 kHz offset; however with 5 GHz carrier frequency, 1 ppm f∆ stands for 5 kHz offset. The phase offset of rotation of each peak in 1 ppm with 2.4 GHz carrier frequency is

_ 360

phase offset=carrier frequency ppm timei i i ………(4-17)

9 6 6

The max CFO is confined to ppm in IEEE 802.11b standard, that is, kHz. The max CFO number is different according to different standard. Once CFO occurs badly, the constellation would rotate continuously, and cause the packet error rate (PER) keeps high even when SNR increases. So for keeping the performance well, a CFO estimating and compensating component is needed, hence a Auto Frequency Controller (AFC) is used in our system to play this kind of role. The constellation of received signal through

±25 ±60

only CFO effect is shown in Figure 3-4. The real part of correlator output with ideal channel and only CFO 25 ppm are shown in Figure 4-20 and Figure 4-21. Compared these two figures, we can see that the peaks on the real part have shape envelope of closing sine or cosine but not very smooth. This situation could be saw in the formula of CFO effect.

Figure 4-20 Real part of correlator output with ideal channel

Figure 4-21 Real part of correlator output with CFO 25 ppm

4.4.2 AFC algorithm

In the transmitter passband, the transmitting signal is ( ) ( ) j2 f tc

s tp =s t B ei i π ………...(4-18) where f is the RF carrier frequency at the transmitter. c

and in the receiver passband

2 ' offset. The AFC algorithm is proposed to eliminate f∆ . The constellation of three consecutive correlator output peaks are shown in Figure 4-22. From this figure, we can see that f∆ can be calculated from the phase difference of two consecutive peaks. The phase difference of peak2 and peak3 is bigger than2 fπ∆ , however the actual phase difference is just2 fπ∆ , so two kinds of algorithms can be used to find the actual phase difference. One is that all the peaks are mapping to the right side of Imag axis relative to the origin. If peak3 is mapping to the right side, then the actual phase difference2 fπ∆ can be correctly calculated. The other method proposed by me is that all peaks do not need be mapping to the right side of Imag axis relative to the origin, a absolute-to-relative phase mapping table is used here and is shown in Figure 4-23. Compared with the first method, the main difference is that the proposed method does not need map peaks at left side of Imag axis to the right side, that is saving a mapping step. The phase of peakn is

n atr peak )( n

θ = ………...(4-20)

where atr(.) is the absolute-to-relative phase mapping function. The difference phase of two consecutive peaks is

1 2 ˆ

n n n f Tn

θ θ− = ∆ = ∆θ π ………..…………...……….(4-21) where∆fˆnis estimated and is ready to compensate CFO effect.

Figure 4-22 Constellation of three consecutive correlator peaks

Figure 4-23 Absolute-to-relative phase mapping

And with this proposed method, the CFO could not exceed 90± , hence,∆ must be less θn than±90 and this can be formulated as

2 2

n n

n

n n

when

when

θ π θ π

θ θ π θ π

⎧∆ − ∆ >

∆ = ⎨⎪⎪⎪∆ + ∆ < −

⎪⎩

………...(4-22)

For eliminating AWGN effect and better performance, more difference phase of consecutive peaks is used and average them. For example four symbols are taken into average

The estimated angle frequency−∆fˆnis used to compensate CFO, and it will rotate each sample point with this angle frequency. The compensated signal is

2 ˆ

where∆ε is the residual CFO. The step of estimating ˆf∆ is called CFO acquisition.

Because∆εwill be very small,j2 (π ε )t+ ∆θ can be saw as another phase offset∆ . The θε phase offset would accumulate phase error as time goes by. So, a step of resetting the phase of NCO after several symbols is called CFO tracking. The formula is

( ) ( ) j2 t

whereφis the estimated phase offset at the CFO tracking state after several symbols, and∆ is very close toθε φ. Figure 4-24 shows an example of CFO tracking. Figure 4-25 shows the phase at time domain when AFC is on. Figure 4-26 shows the RMSE of CFO range that AFC algorithm can tolerate when SNR is increasing. Figure 4-27 shows the RMSE of CFO acquisition with three Multipath models.

.

Figure 4-24 Example of CFO tracking

Figure 4-25 Phase of signal at time domain when AFC is on

Figure 4-26 RMSE of CFO range that AFC algorithm can tolerate

Figure 4-27 RMSE of CFO acquisition with three Multipath models

CHAPTER 5

SIMULATION PLATFORM

5.1 Choosing a suitable tool

The architecture of system platform is shown in Figure 3-6. The initial step that we must care is that choosing a suitable tool – language. Two languages, C/C++ and Matlab are the nice choices, because these two languages have a lot of advantages during the process of constructing platform. These advantages are listed below

a. Complete standard library and document of help b. Easy to learn programming style

c. High simulation speed

d. Quickly algorithm verification e. Co-simulate with Verilog f. Easily porting to HDL

Matlab is chosen as the suitable tool to construct the system platform for the reason of

Matlab is chosen as the suitable tool to construct the system platform for the reason of

相關文件