已过时的dmod函数

dmod函数用于数字带通调制,支持多种调制方式如ASK、FSK、MSK、PSK和QAM。该函数通常先将数字信号映射到模拟信号再进行调制,但可以跳过映射步骤直接处理已映射的信号。参数包括载波频率、采样率和初始相位等,适用于不同类型的数字信号调制,例如4-ASK调制。

dmod

 

引自:

http://radio.feld.cvut.cz/Docs4Soft/matlab/toolbox/comm/dmod.html

Digital passband modulator数字带通调制

Syntax语法

  • y = dmod(x,Fc,Fd,Fs,'method/nomap'...);
    y = dmod(x,Fc,Fd,Fs,'ask',M);
    y = dmod(x,Fc,Fd,Fs,'fsk',M,tone);
    y = dmod(x,Fc,Fd,Fs,'msk');
    y = dmod(x,Fc,Fd,Fs,'psk',M);
    y = dmod(x,Fc,Fd,Fs,'qask',M);
    y = dmod(x,Fc,Fd,Fs,'qask/arb',inphase,quadr);
    y = dmod(x,Fc,Fd,Fs,'qask/cir',numsig,amp,phs);
    y = dmod(x,Fc,Fd,[Fs phase],...);
    [y,t] = dmod(...);
    

Optional Inputs

Input
Default Value
tone
Fd
amp
[1:length(numsig)]
phs
numsig*0
 

Description

The function dmod performs digital passband modulation and some related tasks. The corresponding demodulation function is ddemod. The table below lists the modulation schemes that dmod supports.

Modulation Scheme
Fifth Input Argument
M-ary amplitude shift keying
'ask'
M-ary frequency shift keying
'fsk'
Minimum shift keying
'msk'
M-ary phase shift keying
'psk'
Quadrature amplitude shift keying
'qask', 'qask/cir', or 'qask/arb'
 

To Avoid the Mapping Process

Ordinarily, the dmod function first maps the digital message signal to an analog signal and then modulates the analog signal. The generic syntax

  • y = dmod(x,Fc,Fd,Fs,'method/nomap'...)
    

uses the nomap flag to tell dmod that the digital message has already been mapped to an analog signal x whose sampling rate is Fs. As a result, dmod skips its usual mapping step. You can use the modmap function to perform the mapping step. In this generic syntax, method is one of the seven values listed in the table above and the other variables are as in the next section.

To Modulate a Digital Signal (General Information)

The generic syntax y = dmod(x,Fc,Fd,Fs,...) modulates the digital message signal that x represents. x is a matrix of nonnegative integers. If x is a vector of length n, then y is a vector of length n*Fs/Fd. Otherwise, if x is n-by-m, then y is (n*Fs/Fd)-by-m and each column of x is processed separately.

Fc is the carrier frequency in Hertz. The sampling rates in Hertz of x and y, respectively, are Fd and Fs. (Thus 1/Fd represents the time interval between two consecutive samples in x, and similarly for y.) The ratio Fs/Fd must be a positive integer. For best results, use values such that Fs > Fc > Fd. The initial phase of the carrier signal is zero.

The generic syntax y = dmod(x,Fc,Fd,[Fs phase],...) is the same, except that the fourth input argument is a two-element vector instead of a scalar. The first entry, Fs, is the sampling rate as described in the paragraph above. The second entry, phase, is the initial phase of the carrier signal, measured in radians.

To Modulate a Digital Signal (Specific Syntax Information)

y = dmod(x,Fc,Fd,Fs,'ask',M) performs M-ary amplitude shift keying modulation. Each entry of x must be in the range [0, M-1]. The maximum value of the modulated signal is 1.

y = dmod(x,Fc,Fd,Fs,'fsk',M,tone) performs M-ary frequency shift keying modulation. Each entry of x must be in the range [0, M-1]. The optional argument tone is the separation between successive frequencies in the modulated signal y. The default value of tone is Fd. The maximum value of y is 1.

y = dmod(x,Fc,Fd,Fs,'msk') performs minimum shift keying modulation. Each entry of x is either 0 or 1. The maximum value of y is 1.

y = dmod(x,Fc,Fd,Fs,'psk',M) performs M-ary phase shift keying modulation. Each entry of x must be in the range [0, M-1]. The maximum value of y is 1.

y = dmod(x,Fc,Fd,Fs,'qask',M) performs M-ary quadrature amplitude shift keying modulation with a square signal constellation. The table below shows the maximum value of y, for several small values of M.

M
Maximum Value of y
M
Maximum Value of y
2
1
32
5
4
1
64
7
8
3
128
11
16
3
256
15
 

 

  • Note    To see how symbols are mapped to the constellation points, generate a square constellation plot using qaskenco(M).

 

y = dmod(x,Fc,Fd,Fs,'qask/arb',inphase,quadr) performs quadrature amplitude shift keying modulation, with a signal constellation that you define using the vectors inphase and quadr. The constellation point for the kth message has in-phase component inphase(k+1) and quadrature component quadr(k+1).

y = dmod(x,Fc,Fd,Fs,'qask/cir',numsig,amp,phs) performs quadrature amplitude shift keying modulation with a circular signal constellation. numsig, amp, and phs are vectors of the same length. The entries in numsig and amp must be positive. If k is an integer in the range [1, length(numsig)], then amp(k) is the radius of the kth circle, numsig(k) is the number of constellation points on the kth circle, and phs(k) is the phase of the first constellation point plotted on the kth circle. All points on the kth circle are evenly spaced. If you omit phs, then its default value is numsig*0. If you omit amp, then its default value is [1:length(numsig)].

 

  • Note    To see how symbols are mapped to the constellation points, generate a labeled circle constellation plot using apkconst(numsig,amp,phs,'n').

 

[y,t] = dmod(...) returns the computation time in t. t is a vector whose length is the number of rows of y.

Examples

An example on the reference page for ddemod uses dmod. Also, the code below shows the waveforms used to communicate the digits 0 and 1 using 4-ASK modulation. Notice that the dmod command has two output arguments. The second output, t, is used to scale the horizontal axis in the plot.

  • Fc = 20; Fd = 10; Fs = 50;
    M = 4; % Use 4-ASK modulation.
    x = ones(Fd,1)*[0 1]; x=x(:);
    % Modulate, keeping track of time.
    [y,t] = dmod(x,Fc,Fd,Fs,'ask',M);
    plot(t,y) % Plot signal versus time.
    

See Also
ddemod, dmodce, ddemodce, amod, amodce

评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值