Documentation

dsp.Chirp System object

Package: dsp

Generate swept-frequency cosine (chirp) signal

Description

The Chirp object generates a swept-frequency cosine (chirp) signal.

To generate the chirp signal:

  1. Define and set up your chirp signal. See Construction.

  2. Call step to generate the signal according to the properties of dsp.Chirp. The behavior of step is specific to each object in the toolbox.

Construction

H = dsp.Chirp returns a chirp signal, H, with unity amplitude.

H = dsp.Chirp('PropertyName',PropertyValue,...) returns a chirp signal, H, with each specified property set to the specified value.

Properties

Type

Frequency sweep type

Specify the frequency sweep type as Swept cosine, Linear, Logarithmic, or Quadratic. This property specifies how the output instantaneous frequency sweep varies over time. The default value is Linear.

SweepDirection

Sweep direction

Specify the sweep direction as either Unidirectional or Bidirectional. The default value is Unidirectional.

InitialFrequency

Initial frequency (hertz)

When you set the Type property to Linear, Quadratic, or Logarithmic, this property specifies the initial instantaneous frequency in hertz of the output chirp signal. When you set the Type property to Logarithmic, the value of this property is one less than the actual initial frequency of the sweep. Also, when the sweep is logarithmic, the initial frequency must be less than the target frequency, specified by the TargetFrequency property. This property is tunable. The default value is 1000.

TargetFrequency

Target frequency (hertz)

When you set the Type property to Linear, Quadratic, or Logarithmic, this property specifies the instantaneous frequency of the output signal in hertz at the target time. When you set the Type property to Swept Cosine, the target frequency is the instantaneous frequency of the output at half the target time. Also, when the sweep is logarithmic, the target frequency must be greater than the initial frequency, specified by the InitialFrequency property. This property is tunable. The default value is 4000.

TargetTime

Target time

When you set the Type property to Linear, Quadratic, or Logarithmic, this property specifies the target time in seconds at which the target frequency is reached. When you set the Type property to Swept cosine, this property specifies the time at which the sweep reaches 2ftgt – finit Hz, where ftgt is the TargetFrequency and finit is the InitialFrequency. The target time should not be greater than the sweep time, specified by the SweepTime property. This property is tunable. The default value is 1.

SweepTime

Sweep time

When you set the SweepDirection property to Unidirectional, the sweep time in seconds is the period of the output frequency sweep. When you set the SweepDirection property to Bidirectional, the sweep time is half the period of the output frequency sweep. The sweep time should be no less than the target time, specified by the TargetTime. This property must be a positive numeric scalar and is tunable. The default value is 1.

InitialPhase

Initial phase

Specify initial phase of the output in radians at time t = 0. This property is tunable. The default value is 0.

SampleRate

Sample rate

Specify the sampling rate of the output in hertz as a positive numeric scalar. The default value is 8000.

SamplesPerFrame

Samples per output frame

Specify the number of samples to buffer into each output as a positive integer. The default value is 1.

OutputDataType

Output data type

Specify the output data type as double or single. The default value is double.

Methods

cloneCreate chirp object with same property values
getNumInputsNumber of expected inputs to step method
getNumOutputsNumber of outputs of step method
isLockedLocked status for input attributes and nontunable properties
releaseAllow property value and input characteristics changes
resetReset internal states of chirp object
stepGenerate chirp signal

Examples

Generate a bidirectional swept chirp signal:

 hchirp = dsp.Chirp(...
 'SweepDirection', 'Bidirectional', ...
 'TargetFrequency', 25, ... 
 'InitialFrequency', 0,...
 'TargetTime', 1, ...
 'SweepTime', 1, ...
 'SamplesPerFrame', 400, ...
 'SampleRate', 400);
 plot(step(hchirp));

Algorithms

This object implements the algorithm, inputs, and outputs described on the Chirp block reference page. The object properties correspond to the block parameters.

See Also

Was this topic helpful?