Index-> contents reference index search Up-> SPT_HELP SignalGeneratorMain pmmod Prev Next SPT_HELP-> SPTFunctionsByCategory Mathematical Functions Data Manipulation Functions SignalGeneratorMain AnalogFilterFunctions FIR Filter Design Window Functions IIR Filter Design FourierFunctions Plotting Functions Histogram Functions SignalGeneratorMain-> binbits nrzbits awgn cawgn ammod pmmod fmmod quadmod sinwave triwave sawwave sqrwave RandNumGens OtherSigGen pmmod Headings-> Description Example Reference

Phase Modulation Function
 Syntax `y = pmmod(`m,kp,fc,pc,fs`)` Include: `include spt\pmmod.oms` See Also ammod , fmmod , quadmod
``` ARGUMENTS:    INPUTS:       m  = MATRIX, any numerical type, coerced to DOUBLE for            internal processing. Represents sampled version of an            arbitrary baseband modulation waveform in [Volt].       kp = SCALAR, any numerical type, coerced to DOUBLE for            internal processing. Modulator sensitivity in            [radians/Volt]. Scales 'm' before modulation.       fc = SCALAR, any numerical type, coerced to DOUBLE for            internal processing. Carrier frequency in [Hz].       pc = SCALAR, any numerical type, coerced to DOUBLE for            internal processing. Carrier phase in [radians].       fs = SCALAR, any numerical type, coerced to DOUBLE for            internal processing. Sampling rate in [Samples/sec].    RETURN: MATRIX, type DOUBLE, sampled PM waveform. Same             dimensions as input 'm'. ```
Description ``` ```Sample a PM (Phase Modulation) modulated carrier with given baseband modulation waveform, carrier frequency and carrier phase in a column-wise fashion. ``` ```Returns a sampled version of a PM modulated carrier with the same dimensions as input 'm'. The user specifies the arbitrary baseband modulation waveform 'm' in [Volt], the sampling rate 'fs' in [Samples/sec], the carrier frequency in [Hz], the carrier initial phase angle in [radians], and the modulator sensitivity 'kp' in [radians/Volt]. All inputs may be any numerical type and are coerced to DOUBLE for local processing. ``` ```The general form of the modeled AM waveform is: ```          cos(2*PI*fc*t + kp*m + pc), ```and this waveform is sampled at a rate of 'fs'. The phase angle of the resulting carrier sinusoid is proportional waveform 'm'. 'm' may be a matrix, in which case an identically dimensioned matrix is returned where each column of 'm' has separately been modulated onto the specified carrier. The modulation sensitivity factor 'kp' scales the waveform 'm' before applying it to the carrier and converts the modulation voltage to radians. ``` ```It should also be noted that the function places no restrictions on the relation between carrier, modulation, or sampling frequencies. The user may 'under-sample' the waveform by making the maximum frequency represented in 'm' or 'fc' higher than half the sampling rate without error. (This is in fact done deliberately in some sampled data systems). ``` ```Example ``` # Create a PM modulated waveform fs     = 256d0;          # sampling rate [Samples/second] N      = 256;            # record length [Samples] fc     =  32d0;          # carrier frequency [Hz] pc     =   1d0;          # initial carrier phase [radians] fm1    =   4d0;          # modulation freq [Hz] twopit = 2d0*PI*(seq(N)-1d0)/fs; # Create 2*PI*time m      = cos(twopit*fm1);        # Create modulation waveform kp     = 1;              # Hz/volt dphi  = .3;           # peak phase deviation for phase mod [radians] pm     = pmmod(dphi*m,kp,fc,pc,fs);   # time waveform spec   = abs(dft(complex(pm))/N)^2d0; # spectrum power pmspec = spec.row(1,N/2+1); pmspec = pmspec + {0d0,reverse(spec.row(N/2+1,N/2))}; pmspec = db10(pmspec);                # spectrum mag, dB t      = timeaxis(1d0/fs, N);         # time axis for plotting f      = freqaxis(fs/N, N);           # freq axis for plotting ginit; format double "f7.1"; gaddtext("PM MODULATOR Function", [.5,.95]); s=["fs =",ntoa(fs)," Hz"," , fc =",ntoa(int(fc))," Hz"," , fm =",ntoa(int(fm1))," Hz"]; gaddtext(s, [.5,.90]); vp1 = gaddview(0.05, 0.50, .90, .35 ); gyaxis("linear",-2,2,2,2); gxaxis("linear",0,N/fs,4,5); gplot(t,pm); gxtitle("TIME [SEC]"); gytitle("VOLTS"); gtitle("pmmod() WAVEFORM"); gygrid("minor"); gxgrid("major"); vp2 = gaddview(.05, .05, .90, .35 ); gyaxis("linear",-60,0,6,2); gxaxis("linear",0,fs/2,4,4); gygrid("minor"); gxgrid("major"); gxtitle("FREQ [Hz]"); gytitle("MAG [dB]"); gtitle("pmmod() SPECTRUM"); gplot(f.row(1,N/2+1),pmspec); ``` ``` ```Reference ``` ```Haykin, Simon, "Communication Systems.", New York: Wiley, 1994.