Main Content

phased.SteppedFMWaveform

Stepped FM pulse waveform

Description

The phased.SteppedFMWaveform object System object™ creates a stepped FM pulse waveform.

To create a stepped FM pulse waveform:

  1. Create the phased.SteppedFMWaveform 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

steppedFMWaveform = phased.SteppedFMWaveform creates a stepped FM pulse waveform System object, steppedFMWaveform. The object generates samples of a linearly stepped FM pulse waveform.

steppedFMWaveform = phased.SteppedFMWaveform(Name=Value) sets properties using optional name-value arguments.

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.

Signal sample rate, specified as a positive scalar. Units are Hertz. The ratio of sample rate to pulse repetition frequency (PRF) must be a positive integer, ensuring each pulse contains a whole number of samples.

Data Types: double

Method to set pulse duration (pulse width), specified as "Pulse width" or "Duty cycle". This property determines how you set the pulse duration. When you set this property to "Pulse width", then you set the pulse duration directly using the PulseWidth property. When you set this property to "Duty cycle", you set the pulse duration from the values of the PRF and DutyCycle properties. The pulse width is equal to the duty cycle divided by the pulse repetition frequency.

Data Types: double

Length of each pulse, specified as a positive scalar. This value must be less than or equal to the reciprocal of the pulse repetition frequency.

Data Types: double

Waveform duty cycle, specified as a scalar in the range (0,1). The pulse width is the value of the DutyCycle property divided by the value of the PRF property.

Dependencies

To enable this property, set the DurationSpecification property to "Duty cycle".

Data Types: double

Pulse repetition frequency, specified as a scalar or a row vector. Units are in Hz. The pulse repetition interval is the inverse of the pulse repetition frequency. The pulse repetition frequency value must satisfy these restrictions:

  • The product of pulse repetition frequency and the pulse width must be less than or equal to one. This condition expresses the requirement that the pulse width is less than one pulse repetition interval. For the phase-coded waveform, the pulse width is the product of the chip width and number of chips.

  • The ratio of sample rate to any element of PRF must be an integer. This condition expresses the requirement that the number of samples in one pulse repetition interval is an integer.

You can select the value of the pulse repetition frequency using property settings alone or using property settings in conjunction with the prfidx input argument of the object (when you call the object as if it were a function).

  • When PRFSelectionInputPort is false, you set the pulse repetition frequency using properties only. You can

    • implement a constant pulse repetition frequency by specifying PRF as a positive real-valued scalar.

    • implement a staggered pulse repetition frequency by specifying PRF as a row vector with positive real-valued entries. Then, each call to the object uses successive elements of this vector for the pulse repetition frequency. When the process reaches the last element of the vector, it continues cyclically with the first element.

  • When PRFSelectionInputPort is true, you can implement a selectable pulse repetition frequency by specifying PRF as a row vector with positive real-valued entries. But this time, when you execute object, select a pulse repetition frequency by passing an argument specifying an index into the pulse repetition frequency vector.

In all cases, the number of output samples remains fixed when you set the OutputFormat property to "Samples". When you use a varying pulse repetition frequency and set the OutputFormat property to "Pulses", the number of samples can vary.

Data Types: double

Option to enable the PRF selection input, specified as true (logical 1) or false (logical 0). When you set this property to false, the object uses the values specified in the PRF property. When you set this property to true, you pass an index argument into the object (when you call the object as if it were a function) to select a value from the pulse repetition frequency vector.

Data Types: logical

Linear frequency step size, specified as a positive scalar. Units are in hertz.

Data Types: double

Number of frequency steps, specified as a positive integer. When the NumSteps value is 1, the stepped FM waveform reduces to a rectangular waveform.

Data Types: double

Source of frequency offset, specified as one of these options.

  • "Property" — The object determines the offset by using the value of the FrequencyOffset property.

  • "Input port" — The object determines the frequency offset by using the freqoffset input argument.

Frequency offset, specified as a scalar. Units are in hertz.

Dependencies

To enable this property, set the FrequencyOffsetSource property to "Property".

Data Types: double

Output signal format, specified as a one of these options.

  • "Pulses" — The output of the object (when you call the object as if it were a function) takes the form of multiple pulses specified by the value of the NumPulses property. The number of samples per pulse can vary if you change the pulse repetition frequency during the simulation.

  • "Samples" — The output of the object (when you call the object as if it were a function) is in the form of multiple samples. In this case, the number of output signal samples is the value of the NumSamples property, which remains fixed.

Number of samples in the output, specified as a positive integer.

Dependencies

To enable this property, set the OutputFormat property to "Samples".

Data Types: double

Number of pulses in the output, specified as a positive integer.

Dependencies

To enable this property, set the OutputFormat property to "Pulses".

Option to output the PRF for the current pulse, specified as false (logical 0) or true (logical 1).

Dependencies

To enable this property, set the OutputFormat property to "Pulses".

Data Types: logical

Option to enable the matched filter coefficients output port, specified as false (logical 0) or true (logical 1). When you set this property to false, the object does not provide the matched filter coefficients used during the simulation as an output. When you set this property to true, the object provides the matched filter coefficients used during the simulation as an output.

Data Types: logical

Usage

Description

Y = steppedFMWaveform() returns samples of the stepped FM pulses in a column vector, Y. The output, Y, results from increasing the frequency of the preceding output by an amount specified by the FrequencyStep property. If the total frequency increase is larger than the value specified by the SweepBandwidth property, the object returns the samples of a rectangular pulse.

Y = steppedFMWaveform(prfidx) uses the prfidx index to select the PRF from the predefined vector of values specified by in the PRF property. This syntax applies when you set the PRFSelectionInputPort property to true.

Y = steppedFMWaveform(freqoffset), uses the freqoffset to generate the waveform with an offset as specified at step time. Use this syntax for cases where the transmit pulse frequency needs to be dynamically updated. This syntax applies when you set the FrequencyOffsetSource property to "Input port".

example

[Y,prf] = steppedFMWaveform(___) also returns the current pulse repetition frequency, prf. To enable this syntax, set the PRFOutputPort property to true and set the OutputFormat property to "Pulses".

[Y,coeff] = steppedFMWaveform(___) returns the matched filter coefficients, coeff, for the current pulse. To enable this syntax, set CoefficientsOutputPort to true. coeff is returned as either an NZ-by-1 vector or an NZ-by-M matrix.

You can combine optional input and output arguments when their enabling properties are set. Optional inputs and outputs must be listed in the same order as the order of the enabling properties. For example, [Y,prf,coeff] = steppedFMWaveform(sRFM,prfidx,freqoffset).

Note

The object performs an initialization the first time the object is executed. This initialization locks nontunable properties and input specifications, such as dimensions, complexity, and data type of the input data. If you change a nontunable property or an input specification, the System object issues an error. To change nontunable properties or inputs, you must first call the release method to unlock the object.

Input Arguments

expand all

PRF Index, specified as an integer.

Frequency offset, specified as a scalar.

Output Arguments

expand all

Samples of the stepped FM pulses, returned as a column vector.

Current pulse repetition frequency, returned as a scalar.

Matched filter coefficients, returned as either an NZ-by-1 vector or an NZ-by-M matrix .

  • The object returns an NZ-by-1 vector when the object has OutputFormat set to "Pulses" and NumPulses is equal to 1. NZ is the pulse width.

  • The object returns an NZ-by-M matrix when either OutputFormat set to "Pulses" and NumPulses is greater than 1, or OutputFormat is set to "Samples".

    • When the object generates a constant pulse width waveform (DurationSpecification set to "Pulse width" or "Duty cycle" and PRF has one unique value), NZ is the pulse width and M is the number of sub-pulses, NumSteps.

    • When the object generates a varying pulse width waveform (DurationSpecification set to "Duty cycle" and PRF has more than one unique value), NZ is the maximum of the pulse width and M is the product of NumSteps and the number of unique PRFs.

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

phased.SteppedFMWaveform.getMatchedFilterMatched filter coefficients for waveform
phased.SteppedFMWaveform.plotPlot stepped FM pulse waveform
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 stepped frequency pulse waveform object. Assume the default value, 1 MHz, for the sample rate. Then, plot the waveform.

Create the SteppedFMWaveform System object™ with 20 kHz frequency step size.

sSFM = phased.SteppedFMWaveform(NumSteps=3,FrequencyStep=20e3);
fs = sSFM.SampleRate;

Plot the third pulse of the wave using the phased.SteppedFMWaveform.plot method. Pass in the pulse number using the 'PulseIdx' name-value pair.

plot(sSFM,PulseIdx=3);

Figure contains an axes object. The axes object with title Stepped FM pulse waveform: real part, pulse 3, xlabel Time (s), ylabel Amplitude (v) contains an object of type line.

Alternatively, call the step method three times to obtain three pulses. Collect the three pulses in a single time series. Then plot the waveform using the plot function. You can see the full duty cycles of the pulses.

wavfull = [];
wav = step(sSFM);
wavfull = [wavfull;wav];
wav = step(sSFM);
wavfull = [wavfull;wav];
wav = step(sSFM);
wavfull = [wavfull;wav];
nsamps = size(wavfull,1);
t = [0:(nsamps-1)]/fs*1e6;
plot(t,real(wavfull))
xlabel("Time (\mu sec)")
ylabel("Amplitude")
grid

Figure contains an axes object. The axes object with xlabel Time ( mu blank sec), ylabel Amplitude contains an object of type line.

Plot the spectrum using the spectrogram function. Assume an fft of 64 samples and a 50% overlap. Window the signal with a hamming function.

nfft1 = 64;
nov = floor(0.5*nfft1);
spectrogram(wavfull,hamming(nfft1),nov,nfft1,fs,"centered","yaxis")

Figure contains an axes object. The axes object with xlabel Time (μs), ylabel Frequency (kHz) contains an object of type image.

Apply a frequency offset to a stepped FM (SFM) pulse waveform. Plot the frequency spectrum of the waveform with and without a frequency offset applied.

Create an SFM waveform object which is configured to set the frequency offset from an input when the object is executed.

fs = 1e6;
sSFM = phased.SteppedFMWaveform(SampleRate=fs,NumSteps=2, ...
    FrequencyStep=20e3,NumPulses=2,FrequencyOffsetSource="Input port");

Execute the object two times. First set the frequency offset set to 0 Hz, and then to 2e4 Hz.

sfmwav = sSFM(0);
sfmwav_foffset = sSFM(2e4);

Plot the frequency spectrum of the complex signals. The frequency offset signal is shifted to the right.

[Pxx,f] = pwelch(sfmwav,[],[],[],fs,"centered");
[Pxx_offset,foffset] = pwelch(sfmwav_foffset,[],[],[],fs,"centered");
plot(f/1000,Pxx,foffset/1000,Pxx_offset)
ylabel("PSD");
xlabel("Frequency (kHz)");
legend({"No offset","Offset applied"},"Location","northwest");
grid on;

Figure contains an axes object. The axes object with xlabel Frequency (kHz), ylabel PSD contains 2 objects of type line. These objects represent No offset, Offset applied.

More About

expand all

References

[1] Richards, M. A. Fundamentals of Radar Signal Processing. New York: McGraw-Hill, 2005.

Extended Capabilities

expand all

Version History

Introduced in R2011a