Signal Math.Generate Linear Chirp Method
Definition
Namespace: Numerics.NET
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 10.1.0
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 10.1.0
Overload List
GenerateLinearChirp(Double, Double, Double, Double, Span<Double>)
Generates a linear chirp signal where the instantaneous frequency changes linearly with time.
public static void GenerateLinearChirp(
double amplitude,
double startAngularFrequency,
double endAngularFrequency,
double initialPhase,
Span<double> destination
)Parameters
- amplitude Double
- The amplitude of the chirp.
- startAngularFrequency Double
- The starting angular frequency in radians per sample.
- endAngularFrequency Double
- The ending angular frequency in radians per sample.
- initialPhase Double
- The initial phase in radians.
- destination Span<Double>
- The destination span to write the generated signal.
Remarks
Generates a linear chirp according to the formula:
φ[n] = φ₀ + ω₀n + ½(ω₁ - ω₀)n²/(N-1)
y[n] = A sin(φ[n])
where A is the amplitude, ω₀ is the start frequency, ω₁ is the end frequency, φ₀ is the initial phase, and N is the count.
GenerateLinearChirp(Int32, Double, Double, Double, Double)
Generates a linear chirp signal and returns it as a vector.
public static Vector<double> GenerateLinearChirp(
int count,
double amplitude,
double startAngularFrequency,
double endAngularFrequency,
double initialPhase
)Parameters
- count Int32
- The number of points in the signal.
- amplitude Double
- The amplitude of the chirp.
- startAngularFrequency Double
- The starting angular frequency in radians per sample.
- endAngularFrequency Double
- The ending angular frequency in radians per sample.
- initialPhase Double
- The initial phase in radians.
Return Value
Vector<Double>A vector containing the generated linear chirp signal.
GenerateLinearChirp(Vector<Double>, Double, Double, Double, Double)
Generates a linear chirp signal at explicit x values and returns it as a vector.
public static Vector<double> GenerateLinearChirp(
Vector<double> x,
double amplitude,
double startAngularFrequency,
double endAngularFrequency,
double initialPhase
)Parameters
- x Vector<Double>
- The x values at which to evaluate the chirp.
- amplitude Double
- The amplitude of the chirp.
- startAngularFrequency Double
- The starting angular frequency in radians per x-unit.
- endAngularFrequency Double
- The ending angular frequency in radians per x-unit.
- initialPhase Double
- The initial phase in radians.
Return Value
Vector<Double>A vector containing the generated linear chirp signal.
GenerateLinearChirp(Double, Double, Double, Double, Double, Span<Double>)
Generates a linear chirp signal with DC offset.
public static void GenerateLinearChirp(
double amplitude,
double startAngularFrequency,
double endAngularFrequency,
double initialPhase,
double offset,
Span<double> destination
)Parameters
- amplitude Double
- The amplitude of the chirp.
- startAngularFrequency Double
- The starting angular frequency in radians per sample.
- endAngularFrequency Double
- The ending angular frequency in radians per sample.
- initialPhase Double
- The initial phase in radians.
- offset Double
- The DC offset to add to the signal.
- destination Span<Double>
- The destination span to write the generated signal.
Remarks
Generates a linear chirp with DC offset according to the formula:
y[n] = c + A sin(φ[n])
where c is the offset and φ[n] is computed as in the non-offset version.
GenerateLinearChirp(Int32, Double, Double, Double, Double, Double)
Generates a linear chirp signal with DC offset and returns it as a vector.
public static Vector<double> GenerateLinearChirp(
int count,
double amplitude,
double startAngularFrequency,
double endAngularFrequency,
double initialPhase,
double offset
)Parameters
- count Int32
- The number of points in the signal.
- amplitude Double
- The amplitude of the chirp.
- startAngularFrequency Double
- The starting angular frequency in radians per sample.
- endAngularFrequency Double
- The ending angular frequency in radians per sample.
- initialPhase Double
- The initial phase in radians.
- offset Double
- The DC offset to add to the signal.
Return Value
Vector<Double>A vector containing the generated linear chirp signal.
GenerateLinearChirp(ReadOnlySpan<Double>, Double, Double, Double, Double, Span<Double>)
Generates a linear chirp signal at explicit x values.
public static void GenerateLinearChirp(
ReadOnlySpan<double> x,
double amplitude,
double startAngularFrequency,
double endAngularFrequency,
double initialPhase,
Span<double> destination
)Parameters
- x ReadOnlySpan<Double>
- The x values at which to evaluate the chirp.
- amplitude Double
- The amplitude of the chirp.
- startAngularFrequency Double
- The starting angular frequency in radians per x-unit.
- endAngularFrequency Double
- The ending angular frequency in radians per x-unit.
- initialPhase Double
- The initial phase in radians.
- destination Span<Double>
- The destination span to write the generated signal.
GenerateLinearChirp(Vector<Double>, Double, Double, Double, Double, Double)
Generates a linear chirp signal with DC offset at explicit x values and returns it as a vector.
public static Vector<double> GenerateLinearChirp(
Vector<double> x,
double amplitude,
double startAngularFrequency,
double endAngularFrequency,
double initialPhase,
double offset
)Parameters
- x Vector<Double>
- The x values at which to evaluate the chirp.
- amplitude Double
- The amplitude of the chirp.
- startAngularFrequency Double
- The starting angular frequency in radians per x-unit.
- endAngularFrequency Double
- The ending angular frequency in radians per x-unit.
- initialPhase Double
- The initial phase in radians.
- offset Double
- The DC offset to add to the signal.
Return Value
Vector<Double>A vector containing the generated linear chirp signal.
GenerateLinearChirp(ReadOnlySpan<Double>, Double, Double, Double, Double, Double, Span<Double>)
Generates a linear chirp signal with DC offset at explicit x values.
public static void GenerateLinearChirp(
ReadOnlySpan<double> x,
double amplitude,
double startAngularFrequency,
double endAngularFrequency,
double initialPhase,
double offset,
Span<double> destination
)Parameters
- x ReadOnlySpan<Double>
- The x values at which to evaluate the chirp.
- amplitude Double
- The amplitude of the chirp.
- startAngularFrequency Double
- The starting angular frequency in radians per x-unit.
- endAngularFrequency Double
- The ending angular frequency in radians per x-unit.
- initialPhase Double
- The initial phase in radians.
- offset Double
- The DC offset to add to the signal.
- destination Span<Double>
- The destination span to write the generated signal.