Main Content

pulseCompressionLibrary

Create a library of pulse compression specifications

Since R2021a

Description

The pulseCompressionLibrary System object™ creates a pulse compression library. The library contains sets of parameters that describe pulse compression operations performed on received signals to generate their range response. You can use this library to perform matched filtering or stretch processing. This object can process waveforms created by the pulseWaveformLibrary object.

To make a pulse compression library

  1. Create the pulseCompressionLibrary object and set its properties.

  2. Call the object with arguments, as if it were a function.

To learn more about how System objects work, see What Are System Objects?

Creation

Description

complib = pulseCompressionLibrary() System object creates a pulse compression library, complib, with default property values.

complib = pulseCompressionLibrary(Name,Value) creates a pulse compression library with each property Name set to a specified Value. You can specify additional name-value pair arguments in any order as (Name1,Value1,...,NameN,ValueN). Enclose each property name in single quotes.

Example: complib = pulseCompressionLibrary('SampleRate',1e9,'WaveformSpecification',{{'Rectangular','PRF',1e4,'PulseWidth',100e-6},{'SteppedFM','PRF',1e4}},'ProcessingSpecification',{{'MatchedFilter','SpectrumWindow','Hann'},{'MatchedFilter','SpectrumWindow','Taylor'}}) creates a library with two matched filters. One is matched to a rectangular waveform and the other to a stepped FM waveform. The matched filters use a Hann window and a Taylor window, respectively.

example

Properties

expand all

Unless otherwise indicated, properties are nontunable, which means you cannot change their values after calling the object. Objects lock when you call them, and the release function unlocks them.

If a property is tunable, you can change its value at any time.

For more information on changing property values, see System Design in MATLAB Using System Objects.

Waveform sample rate, specified as a positive scalar. All waveforms have the same sample rate. Units are in hertz.

Example: 100e3

Data Types: double

Signal propagation speed, specified as a positive scalar. Units are in meters per second (m/s). The default propagation speed is the value returned by physconst('LightSpeed'). See physconst for more information.

Example: 3e8

Data Types: double

Pulse waveforms, specified as a cell array. Each cell of the array contains the specification of one waveform.

{{Waveform 1 Specification},{Waveform 2 Specification},{Waveform 3 Specification}, ...}
Each waveform specification is also a cell array containing the parameters of the waveform. The entries in a specification cell are the pulse identifier and a set of name-value pairs specific to that waveform.
{PulseIdentifier,Name1,Value1,Name2,Value2, ...}

This System object supports four built-in waveforms and also lets you specify custom waveforms. For the built-in waveforms, the waveform specifier consists of a waveform identifier followed by several name-value pairs setting the properties of the waveform. For the custom waveforms, the waveform specifier consists of a handle to a user-define waveform function and the functions input arguments.

Waveform Types

Pulse TypePulse IdentifierWaveform Arguments
Linear FM'LinearFM'Linear FM Waveform Arguments
Phase coded'PhaseCoded'Phase-Coded Waveform Arguments
Rectangular'Rectangular'Rectangular Waveform Arguments
Stepped FM'SteppedFM'Stepped FM Waveform Arguments
CustomFunction handleCustom Waveform Arguments

Example: {{'Rectangular','PRF',10e3,'PulseWidth',100e-6},{'Rectangular','PRF',100e3,'PulseWidth',20e-6}}

Data Types: cell

Pulse compression descriptions, specified as a cell array of processing specifications. Each cell defines a different processing specification. Each processing specification is itself a cell array containing the processing type and processing arguments.

{{Processing 1 Specification},{Processing 2 Specification},{Processing 3 Specification}, ...}
Each processing specification indicates which type of processing to apply to a waveform and the arguments needed for processing.
{ProcessType,Name,Value,...}
The value of ProcessType is either 'MatchedFilter' or 'StretchProcessor'.

  • 'MatchedFilter' – The name-value pair arguments are

    • 'Coefficients',coeff – specifies the matched filter coefficients, coeff, as a column vector. When not specified, the coefficients are calculated from the WaveformSpecification property. For the Stepped FM waveform containing multiple pulses, coeff corresponds to each pulse until the pulse index, idx changes.

    • 'SpectrumWindow',sw – specifies the spectrum weighting window, sw, applied to the waveform. Window values are one of 'None', 'Hamming', 'Chebyshev', 'Hann', 'Kaiser', and 'Taylor'. The default value is 'None'.

    • 'SidelobeAttenuation',slb – specifies the sidelobe attenuation window, slb, of the Chebyshev or Taylor window as a positive scalar. The default value is 30. This parameter applies when you set 'SpectrumWindow' to 'Chebyshev' or 'Taylor'.

    • 'Beta',beta – specifies the parameter, beta, that determines the Kaiser window sidelobe attenuation as a nonnegative scalar. The default value is 0.5. This parameter applies when you set 'SpectrumWindow' to 'Kaiser'.

    • 'Nbar',nbar – specifies the number of nearly constant level sidelobes, nbar, next to the main lobe in a Taylor window as a positive integer. The default value is 4. This parameter applies when you set 'SpectrumWindow' to 'Taylor'.

    • 'SpectrumRange',sr – specifies the spectrum region, sr, on which the spectrum window is applied as a 1-by-2 vector having the form [StartFrequency EndFrequency]. The default value is [0 1.0e5]. This parameter applies when you set the 'SpectrumWindow' to any value other than 'None'. Units are in Hz.

      Both StartFrequency and EndFrequency are measured in the baseband region [-Fs/2 Fs/2]. Fs is the sample rate specified by the SampleRate property. StartFrequency cannot be larger than EndFrequency.

  • 'StretchProcessor' – The name-value pair arguments are

    • 'ReferenceRange',refrng – specifies the center of the ranges of interest, refrng, as a positive scalar. The refrng must be within the unambiguous range of one pulse. The default value is 5000. Units are in meters.

    • 'RangeSpan',rngspan – specifies the span of the ranges of interest. rngspan, as a positive scalar. The range span is centered at the range value specified in the 'ReferenceRange' parameter. The default value is 500. Units are in meters.

    • 'RangeFFTLength',len – specifies the FFT length in the range domain, len, as a positive integer. If not specified, the default value is same as the input data length.

    • 'RangeWindow',rw specifies the window used for range processing, rw, as one of 'None', 'Hamming', 'Chebyshev', 'Hann', 'Kaiser', and 'Taylor'. The default value is 'None'.

Example: 'StretchProcessor'

Data Types: string | struct

Linear FM Waveform Arguments

Specify optional pairs of arguments as Name1=Value1,...,NameN=ValueN, where Name is the argument name and Value is the corresponding value. Name-value arguments must appear after other arguments, but the order of the pairs does not matter.

Before R2021a, use commas to separate each name and value, and enclose Name in quotes.

Example: {'LinearFM','PRF',1e4,'PulseWidth',50e-6,'SweepBandwidth',1e5,... 'SweepDirection','Up','SweepInterval','Positive'}

Pulse repetition frequency (PRF), specified as a positive scalar. Units are in hertz. See Pulse Repetition Frequency Restrictions for restrictions on the PRF.

Example: 20e3

Data Types: double

Pulse duration, specified as a positive scalar. Units are in seconds. You cannot specify both PulseWidth and DutyCycle.

Example: 100e-6

Data Types: double

Pulse duty cycle, specified as a positive scalar greater than zero and less than or equal to one. You cannot specify both PulseWidth and DutyCycle.

Example: 0.7

Data Types: double

Bandwidth of the FM sweep, specified as a positive scalar. Units are in hertz.

Example: 100e3

Data Types: double

Direction of the FM sweep, specified as 'Up' or 'Down'. 'Up' corresponds to increasing frequency. 'Down' corresponds to decreasing frequency.

Data Types: char

FM sweep interval, specified as 'Positive' or 'Symmetric'. If you set this property value to 'Positive', the waveform sweeps the interval between 0 and B, where B is the SweepBandwidth argument value. If you set this property value to 'Symmetric', the waveform sweeps the interval between –B/2 and B/2.

Example: 'Symmetric'

Data Types: char

Envelope function, specified as 'Rectangular' or 'Gaussian'.

Example: 'Gaussian'

Data Types: char

Frequency offset of pulse, specified as a scalar. The frequency offset shifts the frequency of the generated pulse waveform. Units are in hertz.

Example: 100e3

Data Types: double

Phase-Coded Waveform Arguments

Specify optional pairs of arguments as Name1=Value1,...,NameN=ValueN, where Name is the argument name and Value is the corresponding value. Name-value arguments must appear after other arguments, but the order of the pairs does not matter.

Before R2021a, use commas to separate each name and value, and enclose Name in quotes.

Example: {'PhaseCoded','PRF',1e4,'Code','Zadoff-Chu', 'SequenceIndex',3,'ChipWidth',5e-6,'NumChips',8}

Pulse repetition frequency (PRF), specified as a positive scalar. Units are in hertz. See Pulse Repetition Frequency Restrictions for restrictions on the PRF.

Example: 20e3

Data Types: double

Type of phase modulation code, specified as 'Frank', 'P1', 'P2', 'Px', 'Zadoff-Chu', 'P3', 'P4', or 'Barker'.

Example: 'P1'

Data Types: char

Sequence index used for the Zadoff-Chu code, specified as a positive integer. The value of SequenceIndex must be relatively prime to the value of NumChips.

Example: 3

Dependencies

To enable this name-value pair, set the Code property to 'Zadoff-Chu'.

Data Types: double

Chip duration, specified as a positive scalar. Units are in seconds. See Chip Restrictions for restrictions on chip sizes.

Example: 30e-3

Data Types: double

Number of chips in waveform, specified as a positive integer. See Chip Restrictions for restrictions on chip sizes.

Example: 3

Data Types: double

Frequency offset of pulse, specified as a scalar. The frequency offset shifts the frequency of the generated pulse waveform. Units are in hertz.

Example: 100e3

Data Types: double

Rectangular Waveform Arguments

Specify optional pairs of arguments as Name1=Value1,...,NameN=ValueN, where Name is the argument name and Value is the corresponding value. Name-value arguments must appear after other arguments, but the order of the pairs does not matter.

Before R2021a, use commas to separate each name and value, and enclose Name in quotes.

Example: {'Rectangular','PRF',10e3,'PulseWidth',100e-6}

Pulse repetition frequency (PRF), specified as a positive scalar. Units are in hertz. See Pulse Repetition Frequency Restrictions for restrictions on the PRF.

Example: 20e3

Data Types: double

Pulse duration, specified as a positive scalar. Units are in seconds. You cannot specify both PulseWidth and DutyCycle.

Example: 100e-6

Data Types: double

Pulse duty cycle, specified as a positive scalar greater than zero and less than or equal to one. You cannot specify both PulseWidth and DutyCycle.

Example: 0.7

Data Types: double

Frequency offset of pulse, specified as a scalar. The frequency offset shifts the frequency of the generated pulse waveform. Units are in hertz.

Example: 100e3

Data Types: double

Stepped FM Waveform Arguments

Specify optional pairs of arguments as Name1=Value1,...,NameN=ValueN, where Name is the argument name and Value is the corresponding value. Name-value arguments must appear after other arguments, but the order of the pairs does not matter.

Before R2021a, use commas to separate each name and value, and enclose Name in quotes.

Example: {'SteppedFM','PRF',10e-4}

Pulse repetition frequency (PRF), specified as a positive scalar. Units are in hertz. See Pulse Repetition Frequency Restrictions for restrictions on the PRF.

Example: 20e3

Data Types: double

Pulse duration, specified as a positive scalar. Units are in seconds. You cannot specify both PulseWidth and DutyCycle.

Example: 100e-6

Data Types: double

Pulse duty cycle, specified as a positive scalar greater than zero and less than or equal to one. You cannot specify both PulseWidth and DutyCycle.

Example: 0.7

Data Types: double

Number of frequency steps in waveform, specified as a positive integer.

Example: 3

Data Types: double

Linear frequency step size, specified as a positive scalar.

Example: 100.0

Data Types: double

Frequency offset of pulse, specified as a scalar. The frequency offset shifts the frequency of the generated pulse waveform. Units are in hertz.

Example: 100e3

Data Types: double

Custom Waveform Arguments

You can create a custom waveform from a user-defined function. The first input argument of the function must be the sample rate. For example, specify a hyperbolic waveform function,

function wav = HyperbolicFM(fs,prf,pw,freq,bw,fcent),
where fs is the sample rate and prf, pw, freq, bw, and fcent are other waveform arguments. The function must have at least one output argument, wav, to return the samples of each pulse. This output must be a column vector. There can be other outputs returned following the waveform samples.

Then, create a waveform specification using a function handle instead of the waveform identifier. The first cell in the waveform specification must be a function handle. The remaining cells contain all function input arguments except the sample rate. Specify all input arguments in the order they are passed into the function.

waveformspec = {@HyperbolicFM,prf,pw,freq,bw,fcent}
See Add Custom Waveform to Pulse Waveform Library for an example that uses a custom waveform.

Usage

Description

[Y,rng] = pulselib(X,idx) returns samples of a compressed pulse waveform, Y, specified by its index, idx, in the library. RNG denotes the ranges corresponding to Y.

Input Arguments

expand all

Input signal, specified as a complex-valued K-by-L matrix, complex-valued K-by-N matrix, or a complex-valued K-by-N-by-L array. K denotes the number of fast time samples, L the number of pulses, and N is the number of channels. Channels can be array elements or beams.

Data Types: double
Complex Number Support: Yes

Index of the processing specification in the pulse compression library, specified as a positive integer.

Data Types: double

Output Arguments

expand all

Output signal, returned as a complex-valued M-by-L matrix, complex-valued M-by-N matrix, or a complex-valued M-by-N-by-L array. M denotes the number of fast time samples, L the number of pulses, and N is the number of channels. Channels can be array elements or beams. The number of dimensions of Y matches the number of dimensions of X.

When matched filtering is performed, M is equal to the number of rows in X. When stretch processing is performed and you specify a value for the RangeFFTLength name-value pair, M is set to the value of RangeFFTLength. When you do not specify RangeFFTLength, M is equal to the number of rows in X.

Data Types: double
Complex Number Support: Yes

Sample ranges, returned as a real-valued length-M vector where M is the number of rows of Y. Elements of this vector denote the ranges corresponding to the rows of Y.

Data Types: double

Object Functions

To use an object function, specify the System object as the first input argument. For example, to release system resources of a System object named obj, use this syntax:

release(obj)

expand all

plotResponsePlot range response from pulse compression library
stepRun System object algorithm
releaseRelease resources and allow changes to System object property values and input characteristics
resetReset internal states of System object

Examples

collapse all

Create a rectangular waveform and a linear FM waveform. Use the processing methods in the pulse compression library to range-process the waveforms. Use matched filtering for the rectangular waveform and stretch processing for the linear FM waveform.

Create two waveforms using the pulseWaveformLibrary System object™. The sampling frequency is 1 MHz and the pulse repetition frequency for both waveforms is 1 kHz. The pulse width is also the same at 50 microsec.

fs = 1.0e6;
prf = 1e3;
pw = 50e-6;
waveform1 = {'Rectangular','PRF',prf,'PulseWidth',pw};
waveform2 = {'LinearFM','PRF',prf,'PulseWidth',pw,...
    'SweepBandwidth',1e5,'SweepDirection','Up',...
    'SweepInterval', 'Positive'};
pulselib = pulseWaveformLibrary('WaveformSpecification',...
    {waveform1,waveform2},'SampleRate',fs);

Retrieve the waveforms for processing by the pulse compression library.

rectwav = pulselib(1);
lfmwav = pulselib(2);

Create the compression processing library using the pulseCompressionLibrary System object™ with two processing specifications. The first processing specification is matched filtering and the second is stretch processing.

mf = getMatchedFilter(pulselib,1);
procspec1 = {'MatchedFilter','Coefficients',mf};
procspec2 = {'StretchProcessor','ReferenceRange',5000,...
    'RangeSpan',200,'RangeWindow','Hamming'};
comprlib = pulseCompressionLibrary( ...,
    'WaveformSpecification',{waveform1,waveform2}, ...
    'ProcessingSpecification',{procspec1,procspec2}, ...
    'SampleRate',fs,'PropagationSpeed',physconst('Lightspeed'));

Process both waveforms.

rect_out = comprlib(rectwav,1);
lfm_out = comprlib(lfmwav,2);
nsamp = fs/prf;
t = [0:(nsamp-1)]/fs;

plot(t*1000,real(rect_out))
hold on
plot(t*1000,real(lfm_out))
hold off
title('Pulse Compression Output')
xlabel('Time (millsec)')
ylabel('Amplitude')

Figure contains an axes object. The axes object with title Pulse Compression Output, xlabel Time (millsec), ylabel Amplitude contains 2 objects of type line.

Plot the range response of an LFM signal hitting three targets at ranges of 2000, 4000, and 5500 meters. Assuming the maximum range of the radar is 10 km, determine the pulse repetition interval from the maximum range.

Create the LFM pulse waveform.

rmax = 10.0e3;
c = physconst('Lightspeed');
pri = 2*rmax/c;
fs = 1e6;
pri = ceil(pri*fs)/fs;
prf = 1/pri;
nsamp = pri*fs;
rxdata = zeros(nsamp,1);
t1 = 2*2000/c;
t2 = 2*4000/c;
t3 = 2*5500/c;
idx1 = floor(t1*fs);
idx2 = floor(t2*fs);
idx3 = floor(t3*fs);
lfm = phased.LinearFMWaveform('PulseWidth',10/fs,'PRF',prf, ...
    'SweepBandwidth',(30*fs)/40);
w = lfm();

Embed the waveform section of the pulse into the received signal.

x = w(1:11);
rxdata(idx1:idx1+10) = x;
rxdata(idx2:idx2+10) = x;
rxdata(idx3:idx3+10) = x;

Create the pulse waveform library.

w1 = {'LinearFM','PulseWidth',10/fs,'PRF',prf, ...
    'SweepBandwidth',(30*fs)/40};
wavlib = pulseWaveformLibrary('SampleRate',fs,'WaveformSpecification',{w1});
wav = wavlib(1);

Generate the range response signal.

p1 = {'MatchedFilter','Coefficients',getMatchedFilter(wavlib,1),'SpectrumWindow','None'};
idx = 1;
complib = pulseCompressionLibrary( ...
    'WaveformSpecification',{w1}, ...
    'ProcessingSpecification',{p1}, ...
    'SampleRate',fs, ...
    'PropagationSpeed',c);
y = complib(rxdata,1);

Plot the range response.

plotResponse(complib,rxdata,idx,'Unit','mag');

Figure contains an axes object. The axes object with title Range Response Pattern, xlabel Range (m), ylabel Magnitude contains an object of type line.

More About

expand all

Extended Capabilities

Version History

Introduced in R2021a