Quantcast

Documentation Center

  • Trial Software
  • Product Updates

Contents

fdesign.rsrc

Rational-factor sample-rate converter specification

Syntax

D = fdesign.rsrc(L,M)
D = fdesign.rsrc(L,M,RESPONSE)
D = fdesign.rsrc(L,M,PULSESHAPINGRESPONSE,SPS)
D = fdesign.rsrc(L,M,CICRESPONSE,D)
D = fdesign.rsrc(L,M,RESPONSE,SPEC)
D = fdesign.rsrc(L,M,SPEC,specvalue1,specvalue2,...)
D = fdesign.rsrc(...,Fs)
D = fdesign.rsrc(...,MAGUNITS)

Description

D = fdesign.rsrc(L,M) constructs a rational-factor sample-rate filter specification object D with the InterpolationFactor property equal to the positive integer L, the DecimationFactor property equal to the positive integer M and the Response property set to 'Nyquist'. The default values for the transition width and stopband attenuation in the Nyquist design are 0.1π radians/sample and 80 dB. If L is unspecified, L defaults to 3. If M is unspecified, M defaults to 2.

D = fdesign.rsrc(L,M,RESPONSE) constructs an rational-factor sample-rate converter with the interpolation factor L, decimation factor M, and the response you specify in RESPONSE.

D = fdesign.rsrc(L,M,PULSESHAPINGRESPONSE,SPS) constructs a pulse-shaping rational-factor sample-rate convertor filter specification object with the 'RESPONSE' property equal to one of the supported pulseshaping filters: 'Gaussian', 'Raised Cosine', or 'Square Root Raised Cosine'. SPS is the samples per symbol. The samples per symbol, SPS, must precede any specification string.

D = fdesign.rsrc(L,M,CICRESPONSE,D) constructs a CIC or CIC compensator rational-factor sample-rate convertor filter specification object with the 'RESPONSE' property equal to 'CIC' or 'CICCOMP'. D is the differential delay. The differential delay, D, must precede any specification string.

Because you are designing multirate filters, the specification strings available are not the same as the specifications for designing single-rate filters. The interpolation and decimation factors are not included in the specification strings. Different filter responses support different specifications. The following table lists the supported response types and specification strings. The strings are not case sensitive.

Design String

Valid Specification Strings

'Arbitrary Magnitude'

See fdesign.arbmag for a description of the specification string entries.

  • 'N,F,A' (default string)

  • 'N,B,F,A'

'Arbitrary Magnitude and Phase'

See fdesign.arbmagnphase for a description of the specification string entries.

  • 'N,F,H' (default string)

  • 'N,B,F,H'

'Bandpass'

See fdesign.bandpass for a description of the specification string entries.

  • 'Fst1,Fp1,Fp2,Fst2,Ast1,Ap,Ast2' (default string)

  • 'N,Fc1,Fc2'

  • 'N,Fst1,Fp1,Fp2,Fst2'

'Bandstop'

See fdesign.bandstop for a description of the specification string entries.

  • 'N,Fc1,Fc2'

  • 'N,Fp1,Fst1,Fst2,Fp2'

  • 'Fp1,Fst1,Fst2,Fp2,Ap1,Ast,Ap2' (default string)

'CIC'

'Fp,Fst,Ap,Ast' — Only valid specification. Fp is the passband frequency, Fst is the stopband frequency, Ap is the passband ripple, and Ast is the stopband attenuation in decibels.

To specify a CIC rational-factor sample-rate convertor, include the differential delay after 'CIC' and before the filter specification string: 'Fp,Ast'. For example:
d = fdesign.rsrc(2,2,'cic',4);

'CIC Compensator'

See fdesign.ciccomp for a description of the specification string entries.

  • 'Fp,Fst,Ap,Ast' (default string)

  • 'N,Fc,Ap,Ast'

  • 'N,Fp,Ap,Ast'

  • 'N,Fp,Fst'

  • 'N,Fst,Ap,Ast'

To specify a CIC compensator rational-factor sample-rate convertor, include the differential delay after 'CICCOMP' and before the filter specification string. For example:
d = fdesign.rsrc(2,2,'ciccomp',4);

'Differentiator'

'N' — filter order

'Gaussian'

'Nsym,BTNsym is the filter order in symbols and BT is the bandwidth-symbol time product.

The specification string must be preceded by an integer-valued SamplesPerSymbol.

'Halfband

See fdesign.halfband for a description of the specification string entries.

  • 'TW,Ast' (default string)

  • 'N,TW'

  • ‘N'

  • 'N,Ast'

If you use the quasi-linear IIR design method, iirlinphase, with a halfband specification, the interpolation factor must be 2.

'Highpass'

See fdesign.highpass for a description of the specification string entries.

  • 'Fst,Fp,Ast,Ap' (default string)

  • 'N,F3db'

  • 'N,Fc'

  • 'N,Fc,Ast,Ap'

  • 'N,Fp,Ast,Ap'

  • 'N,Fst,Ast,Ap'

  • 'N,Fst,Fp'

  • 'N,Fst,Ast,Ap'

  • 'N,Fst,Fp,Ast'

'Hilbert'

See fdesign.hilbert for a description of the specification string entries.

  • 'N,TW' (default string)

  • 'TW,Ap'

'Inverse-sinc Lowpass'

See fdesign.isinclp for a description of the specification string entries.

  • 'Fp,Fst,Ap,Ast' (default string))

  • 'N,Fc,Ap,Ast'

  • 'N,Fp,Fst'

  • 'N,Fst,Ap,Ast'

'Inverse-sinc Highpass'

See fdesign.isinchp for a description of the specification string entries.

  • 'Fst,Fp,Ast,Ap' (default string))

  • 'N,Fc,Ast,Ap'

  • 'N,Fst,Fp'

  • 'N,Fst,Ast,Ap'

'Lowpass'

See fdesign.lowpass for a description of the specification string entries.

  • 'Fp,Fst,Ap,Ast' (default string)

  • 'N,F3dB'

  • 'N,Fc'

  • 'N,Fc,Ap,Ast'

  • 'N,Fp,Ap,Ast'

  • 'N,Fp,Fst'

  • 'N,Fp,Fst,Ap'

  • 'N,Fp,Fst,Ast'

  • 'N,Fst,Ap,Ast'

'Nyquist'

See fdesign.nyquist for a description of the specification string entries. For all Nyquist specifications, you must specify the Lth band. This typically corresponds to the interpolation factor so that the nonzero samples of the upsampler output are preserved.

  • 'TW,Ast' (default string)

  • 'N'

  • 'N,Ast'

  • 'N,Ast'

'Raised Cosine'

See fdesign.pulseshaping for a description of the specification string entries.

  • 'Ast,Beta' (default string)

  • 'Nsym,Beta'

  • 'N,Beta'

The specification string must be preceded by an integer-valued SamplesPerSymbol.

'Square Root Raised Cosine'

See fdesign.pulseshaping for a description of the specification string entries.

  • 'Ast,Beta' (default string)

  • 'Nsym,Beta'

  • 'N,Beta'

The specification string must be preceded by an integer-valued SamplesPerSymbol.

D = fdesign.rsrc(L,M,RESPONSE,SPEC) constructs object D and sets its Specification property to SPEC. Entries in the SPEC string represent various filter response features, such as the filter order, that govern the filter design. Valid entries for SPEC depend on the design type of the specifications object.

When you add the SPEC input argument, you must also add the RESPONSE input argument.

D = fdesign.rsrc(L,M,SPEC,specvalue1,specvalue2,...) constructs an object D and sets its specifications at construction time.

D = fdesign.rsrc(...,Fs) provides the sampling frequency of the signal to be filtered. Fs must be specified as a scalar trailing the other numerical values provided. Fs is assumed to be in Hz as are all other frequency values provided.

D = fdesign.rsrc(...,MAGUNITS) specifies the units for any magnitude specification you provide in the input arguments. MAGUNITS can be one of

  • 'linear' — specify the magnitude in linear units.

  • 'dB' — specify the magnitude in dB (decibels).

  • 'squared' — specify the magnitude in power units.

When you omit the MAGUNITS argument, fdesign assumes that all magnitudes are in decibels. Note that fdesign stores all magnitude specifications in decibels (converting to decibels when necessary) regardless of how you specify the magnitudes.

Examples

Design a rational-factor sample-rate converter. Set the rational sample-rate change to 5/3. Use the default Nyquist design with a transition width of 0.05π radians/sample and stopband attenuation of 40 dB. The Lth band factor in the Nyquist design is equal to the interpolation factor.

d = fdesign.rsrc(5,3,'nyquist',5,.05,40);
hm = design(d,'kaiserwin'); %design with Kaiser window
 

Design a rational-factor sample-rate converter. Set the rational sample-rate change to 5/3. Use a Nyquist design with the 'N,TW' specification string. Set the order equal to 12 and the transition width to 0.1π radians/sample. The Lth band factor in the Nyquist design is equal to the interpolation factor.

d = fdesign.rsrc(5,3,'nyquist',5,'N,TW',12,0.1);
 

Design a rational-factor sample-rate converter. Assume the data are sampled at 10 kHz. Set the rational sample-rate change to 3/2. Use a Nyquist design with the 'N,TW' specification string. Set the order equal to 12 and the transition width to 100 Hz. The Lth band factor in the Nyquist design is equal to the interpolation factor.

d = fdesign.rsrc(3,2,'nyquist',3,'N,TW',12,100,1e4);
hd = design(d,'equiripple');

See Also

| | | | | |

Was this topic helpful?