Practical Session V: FSK Transceiver.: Laboratory of Electronic Communications
Practical Session V: FSK Transceiver.: Laboratory of Electronic Communications
Combined transmitter and receiver interconnection 5.3 diagram. transmitter and receiver interconnection diagram Combined
Figure 2 Interconnection of the transmitter and the receiver The goal of this practice is to implement an FSK transceiver using the DSP TMS320C6713
development boards. The binary source will be the function generator. The FSK is a The second part of the practical session requires two DSP boards interconnected frequency modulation scheme in which digital information is transmitted through (one for transmission, one for reception), as shown in Figure 2. The bit source (function discrete connected to the transmitter board and the FSK-modulated the 1, generator) isfrequency changes of the carrier wave. In this concrete case, to output is aka mark in the oscilloscope. The jack/jack cable is used for transmitting the FSK displayed frequency, corresponds a value of 14kHz and the space frequency or frequency assigned to receiver a value of receiver board output is connected to the symbols to thethe 0 hasboard. The 10kHz. According to these premises, our output is oscilloscope. ransmitter The FSK transmitter output is given fby+ y(t)*= cos(2 * " ( f 0 +f#fis*the , where f 0 is the output is given by y(t) = cos(2 * " ( 0 #f s[n])) , where 0 where iss[n])) 4kHz. given by: for symbol 0, s[n] is the symbol to beis the symbol to be transmitted at discrete-time instant frequency for symbol 0, s[n] transmitted at discrete-time instant the sampling period. the sampling period. t=nT, T is Description
NOT CONNECT THE OUTPUTS OF THE TWO DSPs, AS CAUTION: DO of
the
Practical
Work
! ! ! ! r frequencies must be set to f 0 =THIS WOULD f 0f1== f 0 + "f = 0 and f1 = 1. + "f = 14Khz for 1. 10Khz for 0 to The carrier frequencies must be set and SERIOUSLY 14Khz for f 0THEM 10Khz for DAMAGE
FSK
TRANSMITTER.
5.4 5.4.1.1 Practical work .1.1 Carrier generation Carrier generation CARRIER
GENERATION
AND
FSK
MODULATION
SUBSYSTEM.
! ! ! ! Designed coefficients: unstable IIR filter is FSKto generate the used wave (Figure 4). wave (Figure 4). used transmitter An unstable IIR filter is sine to generate the sine 5.4.1
fc=10 program The first part of this practice proposes to kHz _Aan fc=14 transmitter, whose FSK kHz _B rad 0.417 block diagram is shown in Figure 3. 0.417 K1 C 0.5156 0.9662 0.5156 0.9662
In order to implement both carriers, some modifications were introduced over the original code for ask modulation, namely:
Figure 4 Carrier generation through Figure 3 Block diagram of the FSK transmitter an unstable through Figure 4 Carrier generation IIR filteran unstable IIR filter
the system shown in Figure 4 shown in Figurey[n-1]!0 or y[n-2]!0, the or y[n-2]!0, the If the system is excited with 4 is excited with y[n-1]!0 n] is a sine wave. In your code, y[n] should be stored as sinx and y[n-1]
Duplicated variables:
/* * EXTRA: Pressing DIP switch #3 changes LED #3 from off to on. */ int active_led = 0; //Coefficients for symbol 0 float K1_A=0.5176; float Sin_A=0; float C_A=0.9659; float Y2_A=0; //Coefficients for symbol 1 float K1_B=-0.5176; float Sin_B=0; float C_B=0.9659; float Y2_B=0;
Remark
the
changes
of
frequency
tracking
the
input
information.
The
presence
of
a
switching
ripple
can
be
appreciated
in
all
cases
and
it
is
due
to
the
zero-cross
frequency.
3
The following sketch tries to identify the shape transformations applied to the
received signal block by block, before acquiring the information sent by the transmitter. Limiter 5.4.2.1
The limiter transforms the input into a sequence of 1s and -1s (or zeros).
5.4.2.2 Differentiator
The differentiator neighbouring samples. extracts the frequency information by subtracting
5.4.2.3 Rectifier
The rectifier prepares the previously obtained samples before their subsequent filtering, by taking their absolute value. After the rectifier, the difference between the carrier frequencies will be given by more or less spacing between positive samples.
5.4.2.4 Filtering
The filter calculates the average of the last K (K= number of filter coefficients) samples of the rectified signal.
a.) Implement a rectangular filter (constant-coefficient filter), which simply
Regarding a he filter, we are asked to consider two frequencycases, between the two b.) Use t low-pass FIR filter whose cut-off different lies which provide two different sets of coefficients. On one hand, a constant-coefficient or carrier frequencies. This way, you will generate an output close to zero if the rectangular filter ifrequencyor computing the average filter coefficientsutput be generated upper s chosen f was transmitted. The fir of the rectifiers o may signal. with the MATLAB function fir1. The coefficients were computed by Matlab, running the command (rectwin(17)/17)*2^15. On the other hand, desiring an an output close to zero if the A program with the following structure should be implemented: upper frequency was transmitted, we design a LPF whose coefficients were also * FSK RECEIVER generated by Matlab and carrier-frequency dependant:fir1(16,f/24000,low); ans*2^15;round(ans).The cut-off frequency shall lie between the maximum bit
#include "dsk6713.h" // "dsk6713_led.h" #include Differentiate **** Implement **** #include "dsk6713_dip.h" #include Rectifier // "dsk6713_aic23.h" #include <csl_irq.h> **** Implement **** /* // - Main code routine, initializes BSL and runs LED * main() Filter // stores result in first element of FIR buffer application weight and add all elements of FIR buffer // */ // shifts elements of FIR buffer /* **** Implement **** * EXTRA: Pressing DIP switch #3 changes LED #3 from off to on. */ // Store result in output int active_led=0; **** **** Implement
4
Playing around with some desgin parameters we achieve noticeable improvements, namely :
Fsk rate fixed at 1kbps filter rising and falling delays resulted too slow.
With the filter coefficients scaled by 32767 the ripple due to the zero crossing frequency was remarkably high. It arises the need to filter it with a low pass whose cut off frequency lies between the max bit rate (14Khz 10 KHz =4kHz 2kbps) and the zero-crossing frequency (rather freq1=2x10Khz or zero crossing freq2=14Khzx2). Therefore our initial choice was a cut off frequency equal to10Khz. It shall be normalized with respect to the 48KHz sampling frequency.
Higher values of coefficients combined with low level accumulator translated into a risk of overflow. This is the reason why we opted to divide Acumulador (12M) by a value higher than 128 (7) to avoid overflow. It was a matter of error and try. Noise was still present after dividing by 12.
The selected cut off frequency (10khz) seemed too high. Nicer output signal was retrieved with 5khz and even better lowering the cut-off to 2.5khz. This was the case since the testing bit rate was the one from the function generator. Indeed, we achieved the filtering behaviour expected. And the bit rate could be increased to 1.5kbps and still behaves as desired. Because of the lack of time we could not tuned further.
At the hard decisor block and with the high pass filter in the output, if the threshold was set above 0, the signal got clearer.
10