Communications Toolbox | ![]() ![]() |
Customizing the Modulation Process
Recall from Digital Modulation Overview that the modulation and demodulation processes each consist of two steps. You can tell the toolbox functions to carry out only selected steps in the processes. For example, this might be useful if you want to use standard mapping and demapping techniques along with unusual or proprietary modulation and demodulation techniques.
Mapping Without Modulating and Demapping Without Demodulating
To map the digital signal to an analog signal without modulating the analog signal, use the modmap
function instead of the dmodce
function. To demap the analog signal to a digital signal without demodulating the analog signal, use the demodmap
function instead of the ddemodce
function.
To alter the basic example so that it does not modulate or demodulate the analog signals at all, replace the "old commands" listed in the first column of the table below with the "new commands" listed in the second column.
Modulating Without Mapping and Demodulating Without Demapping
To carry out the analog modulation step on a signal that has already been mapped from a digital signal to an analog signal, use the dmodce
function with the extra word /nomap
appended to the method string. To carry out the analog demodulation step but avoid demapping the resulting signal to a digital signal, use the ddemodce
function with the extra word /nomap
appended to the method string.
If you substituted your own mapping and demapping steps into the basic example then it would look something like the code below. The lines in the second grouping differ from the original example.
M=
16; % Use 16-ary modulation. Fd=
1; % Assume the original message is sampled % at a rate of 1 sample per second. Fs=
3; % The modulated signal will be sampled % at a rate of 3 samples per second. x=
randint(100,1,M); % Random digital message % Important changes are below. mapx = mymappingfunction(x); % Use your own function here. y=
dmodce(mapx,Fd,Fs,'psk/nomap',M); % Modulate without mapping. % Demodulate y without demapping. demody=
ddemodce(y,Fd,Fs,'psk/nomap',M); % Now demap. z = mydemappingfunction(demody); % Use your own function here.
![]() | Simple Digital Modulation Example | Other Options in Digital Modulation | ![]() |