2Learning Objectives Overview of Digital Modulation Understanding GMSK ModulationLearning how to Implement a GMSK Modulator on a C54
3Digital ModulationsBaseband and bandpass signalling are used to transmit data on physical channels such as telephone cables or radiofrequency channels.The source of data (bits or symbol) may be a computer file or a digitized waveform (speech, video…)The transmitted signal carries information about the data and its characteristic changes at the same rate as the data.When the signal carrying the data informationExtends from 0 Hz upwards, the term baseband signalling is used.Has its power centered on a central frequency fc, the term bandpass signalling or modulation is used.
4Digital Modulation Modulation is used because: The channel does not include the 0 Hz frequency and baseband signalling is impossibleThe bandwidth of the channel is split between several channels for frequency multiplexingFor wireless radio-communications, the size of the antenna decreases when the transmitted frequency increases.
5Carrier FrequencyIn simple modulation schemes, a single frequency signal, the carrier, is modified at the rate of the data.The carrier is commonly written as:fc= Carrier frequencyA = Carrier Amplitude = Carrier phaseThe 3 main parameters of the carrier: amplitude, phase and frequency can be modified to carry the information leading to: amplitude, phase and frequency modulation.
6Digital Modulation CPM: Continuous Phase Modulation Frequency or phase modulationExample: MSK, GMSKCharacteristic: constant envelope modulationQAM: Quadrature Amplitude ModulationExample: QPSK, OQPSK, 16QAMCharacteristic: High spectral efficiencyMulticarrier ModulationExample: OFDM, DMTCharacteristic: Muti-path delay spread tolerance, effectivness against channel distortionModulation with constant envelope are robust to the non-linearities of the emitter or of the channel in mobile communications.They are also more robust to fading than modulation using the carrier amplitude to carry information.PSK = Phase Shift KeyingOQPSK = Offset Phase Shift Keying16QAM = QAM modulation with 16 different states For amplitude-phase.Spectral efficiency can be defined as the number of bits per second that can be transmitted in 1 Hz bandwidth with a given error probability.In multicarrier modulation, the data are sent in parallel to several carriers that are modulated and summed.OFDM = Orthogonal Frequency ModulationDMT = digital MultiTone
7What is the Complex Envelope z(t) of a Modulated Signal x(t) ? fc= Carrier frequencyz(t) = Complex envelope of x(t)zI(t), zQ(t) are the baseband componentsxH(t) = Hilbert transform of x(t) = x(t) with a phase shift of /2Cos(2 fct) and sin(2fct) are called quadrature carriers because they have a phase difference equal to /2.The 2 signals zI and zQ are sometimes called quadrature components because they modulate the 2 quadrature carriers.Sx(f) = Power spectral density of x(t)
8Complex Envelope z of a Modulated Signal x Frequency Domain
9GMSK Modulation Gaussian Minimum Shift Keying. Used in GSM and DECT standards.Relevant to mobile communications because of constant envelope modulation:Quite insensitive to non-linearities of power amplifierRobust to fading effectsBut moderate spectral efficiency.GSM = Global System for Mobile communications (ETSI standard for 2nd generation cellular mobile communications)DECT = Digital European Cordless Telephone
10What is GMSK Modulation? Continuous phase digital frequency modulationModulation index h=1/2Gaussian Frequency Shaping FilterGMSK = MSK + Gaussian filterCharacterized by the value of BTT = bit durationB = 3dB Bandwidth of the shaping filterBT = 0.3 for GSMBT = 0.5 for DECTThe Gaussian filter is used to limit the bandwidth of the modulated signal.It is a good compromise between the bandwidth of the modulated signal and the length of the impulse response of the filter.Other shapes of spectral shaping filter could be used.MSK = Minimum Shift Keying binary modulation uses the smallest possible frequency spacing corresponding to orthogonal frequencies.f=1/(2T) where T is the bit duration.
11GMSK Modulation, Expression for the Modulated Signal x(t) ak = Binary data = +/- 1h = Modulation index = 0.5The instantaneous frequency of the signal carries the information about the data ak.Normalizations(t) = Gaussian frequency shaping filters(t)= Elementary frequency pulse
13Architecture of a GMSK Modulator Here the term VCO means voltage controlled oscillator.
14Equation for the Gaussian Filter h(t) The duration MTb of the gaussian pulse is truncated to a value inversely proportional to B.BT = 0.5, MTb = 2TbBT = 0.3, MTb = 3 or 4Tb
15Frequency and Phase Elementary Pulses -18.104.22.168.40.5BTb=+¥5,3t in number of bit periods TbTgt()Elementary frequency pulse-2-10.60.81.21.41.6t in number of bit period Tb.Elementary phase pulsej/2The elementary frequency pulse is the convolution of a square pulse r(t) with a gaussian pulse h(t).Its duration is (M+1)Tb.
16GMSK Signals F ( ) t z cos = sin Binary sequence GMSK modulated Signal 51101520-1-5in rd
18Implementing a GMSK Modulator on a DSP Quadrature modulation can be used:The DSP calculates the phase and the 2 baseband components zI and zQ and sends them to the DAC.Or a modulated loop can be used.In this case, the DSP generates the instantaneous frequency finst signal that is sent to the DAC.
19Calculation of the Instantaneous Frequency finst is obtained by a simple filtering of the bit sequence ak by a FIR filter of impulse response s(n).Open Matlab routine pul_phas.m to calculate s(n).Explanation of parameters are given in following slides.
20Expression for the Baseband Components The baseband components zI and zQ are modulated in amplitude by the 2 quadrature carriers.
21Baseband Components and Carriers The carriers are generally RF analog signals generated by analog oscillatorsHowever, we will show how they could be generated digitally if the value of fc were not too high.Here RF means Radio Frequency/
22Calculation of the Baseband Components on a DSP Calculate the phase at time mTSTs the sampling frequency.Read the value of cos() and sin() from a table.
23Calculation of the Elementary Pulse Phase with Matlab The elementary pulse phase (mTS) is calculated with Matlab and stored in memory.The duration LT of the evolutive part of (mTS) depends on the value of BT. is called phi in the matlab routine.
24Calculation of the Elementary Pulse Phase with Matlab 1/2 Beginning of the matlab routineOpen Matlab routine pul_phas.m
25Calculation of the Elementary Pulse Phase with Matlab 2/2 End of the matlab routine
26Using the Matlab Routine Start MatlabUse:T_over_Ts=8L=4T=1BT=0.3call the routine using to calculate the phase pulse phi ( ) and the pulse s:[phi,s]=pul_phas(T_over_Ts,L,BT,T)Plot the phase phi and the shaping pulse splot(phi)plot(s)phi = = elementary phase pulses= elementary frequency pulse.
28Results for phiFor L=4 and T_over_Ts=8, we obtain 32 samples for phi. Matlab gives the following values for phi:Phi= [0.0001, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ]After this evolutive part of phi, phi stays equal to /2 (1.57).To calculate , the evolutive part and the constant part of the elementary phase pulse phi are treated separately.
29Calculation of Separation of evolutive and constant parts of phi.
31Recursive Calculation of Names of variablesPhase = phi = array of evolutive part of ,Nphi samples = LT/TsNs = number of samples per bit = T/Tsan = binary sequence (+/- 1)2 calculation steps:Calculate Calculate zI=cos() and zQ=sin() by table reading
32Calculation of : Initialization Initialization step:L first bit periods, phimem = 0At bit L+1, phimem is set to a1 /2.Principle of the initialization processing:FOR i=1 to i=Lfor j=(i-1)Ns+1 to j=(i-1)Ns+Nphiphase((i-1)Ns+j)= phase((i-1)Ns+j)+phi(j)an(i)EndforendFORphimem=an(1) /2
33Calculation of : After Initialization FOR i=L+1 to last_bitFor j=(i-1)Ns+1 to j=(i-1)Ns+Nphiphase((i-1)Ns+j)= phase((i-1)Ns+j)+phi(j)an(i)endForFor j=(i-1)Ns+1 to j=i Nsphase((i-1)Ns+j)= phase((i-1)Ns+j)+phimemxi=cos(phase(i-1)Ns+j)xq=sin(phase((i-1)Ns+j)phimem=phimem+pi/2 an(i+1-L)endFOR
34Coding and Wrapping the Phase Table The phase value in [-,[ is represented by the 16-bit number IphaseMinimum phase = -, Iphase = -215.Maximum phase = (1-215), Iphase =
35Index for the table in Phase Calculation Phase increment between 2 table values:2 / Ncos and on Iphase 216/NcosFor Iphase, the index of the table is:i= Ncos Iphase 2-16Here Ncos 2-16 = 2-9,So the index in the table is given by shifting Iphase 9 bits to the right.
36Coding of phi The quantized values of phi can be obtained with Matlab: phi= round(phi*2^15/pi);phi is defined and initialized in the file phi03.asm as:
37Calculation of sin() and cos() by Table Lookup We use a table of cosine valuesLength of the table Ncos=128, circular bufferContents of the table: cosine of angles i uniformly distributed between - and . deb_cos = first address of the tablemid_cos = address of the table middlecos(i ) is at address mid_cos + i
38Calculation of sin() and cos() by Table Lookup Conversion of the phase modulo 2:Wrapping phase in [-,[Done by a macro: testa02pi
39Generating the Sine Values from a Table of Cosine Values To generate sin() from the table of cosine values, we use:cos(/2 - ) or cos(-/2 + ) or cos(3/2+ )If i is the index of the cosine, for the sine we use:i-Ncos/4 if i>= -Ncos/4i+3Ncos /4 if i < Ncos/4.
40Implementation on a C54x, Test Sequence We can test the GMSK modulation on a given periodical binary sequence an:an=[ ]These bits are stored in a circular buffer:Size NB = 10Declaration of a section bits aligned on an address which is a multiple of 16 bits.
41Testing the Generation of on the C54x, Results Buffer We calculate and store it in a buffer pointed by AR1. The size of the result buffer is 1000 words.
44Listing for the Calculation of Macro for phase wrapping
45Listing for the Calculation of Initialization of Registers and Buffers 1/2
46Listing for the Calculation of Initialization of Registers and Buffers 2/2
47Listing for the Calculation of Calculation for the first L bits
48Listing for the Calculation of Calculation of the Following Bits 1/2
49Listing for the Calculation of Calculation of the Following Bits 2/2
50Illustration of the Phase Result Wrapped Between - and Plot under CCS the buffer of phase results
51Generation of the Baseband Components zI=cos() and zQ=sin() We calculate zI and zQ and we do not need to save the phase any more.We output ZI and Zq, in this example on DXR0 and DXR1.We need the table of constants for the values of cosine.This table is defined in the file tabcos.asmThe cosine values are given in format Q14.
59Generation of 2 Quadrature Carriers cos(2fct) and sin (2fct)fc is the frequency of the carrierIn this example we choose fc=1/TSampling frequency = 1/Ts = fSIn RF applications, the carriers are not generated by the DSP. It is only possible to use the DSP for low values of fc.The angle (t)= 2fct is calculated then the value of cos() is read from a table.
60Calculation of the Angle of the Carriers Recursive calculation of the angle :The precision of the generated frequency depends on the precision of .The phase increment corresponds to an increment I to the integer that represents .I=216fcTS rounded to the closest integer.
61Calculation of the Angle of the Carriers If the number of samples per period of the carrier is a power of 2, 2k:I=216fcTS=2(16-k) is exactThen the precision of the generated frequency depends only on the precision of the sampling frequency.Otherwise, there is an error dfc in fc:|dfc|<2-17fS.Error in the amplitudes of the carriers due to finite precision of the table reading. (possible interpolation).
62Implementation on a C54x We use: fs/fc=8=Ns. The cosine table has 128 Values in Q14.
63Implementation on a C54xHere k=3 (8 samples per period) and the incrementI=216fcTS=2(16-k) =213Simple case of fS/fc as an integer value, the table is read with an offset from the pointer = 16 = 27/23 to generate a cosine with 8 samples per period.We can work directly on the index i and not on I.
64Generation of the Cosine and Sine Carriers For the cosine:The circular buffer containing the cosine values (length N) is accessed with AR1.Incremented by the content of AR0=16.AR1 initialized with deb_cos.For the sine:Same circular buffer accessed by AR2.AR2 initialized with deb_cos + Ncos/4.Decremented by AR0=16.Outputs (cos and sin) are sent to DXR0 and DXR1.
65Generation of quadrature 2 Carriers File porteuse.asmA file associated with DXR0 and DXR1 is used to save visual results obtained with the CCS simulator.Here cosine table goes from:0 to 2
69TutorialThe listing files for the precedent examples can be found in the directory “tutorial”:Tutorial > Dsk5416 > Chapter 21 > Labs_modulation
70Further ActivitiesApplication 5 for the TMS320C5416 DSK and for the TMS320C5510.Alien Voices. A very simple application showing the effect of modulation on audio frequencies. It shows how the carrier causes sum and difference frequencies to be generated. Here it is used to generate the strange voices used for aliens in science fiction films and television.