Package org.ojalgo.data.transform
Class ZTransform
- java.lang.Object
-
- org.ojalgo.data.transform.ZTransform
-
- All Implemented Interfaces:
DataTransform<Access1D<?>,ComplexNumber>
public final class ZTransform extends java.lang.Object implements DataTransform<Access1D<?>,ComplexNumber>
This class implements the Z-transform for a given complex number z. The transform is applied to a sequence of real numbers, and the output is a complex number. The Z-transform is defined as: Z{x[n]} = ∑x[n]z⁻ⁿ where n is the index of the sequence, x[n] is the value of the sequence at index n, and z is the complex number that the transform is applied to.Choosing the complex number z in the context of the Z-transform is often application-specific and depends on the goals of the analysis or the properties you want to study. There are some common choices and guidelines for specific scenarios:
- Unit Circle (|z| = 1): In many applications, especially in stability analysis and frequency response, z is chosen to lie on the unit circle (|z| = 1). This is because the unit circle in the complex plane corresponds to the frequency response of a system, and properties of a system can be analyzed by studying the behavior of the transfer function along the unit circle.
- Stability Analysis: For stability analysis of discrete-time systems, z is often chosen such that all poles of the system lie inside the unit circle. This ensures that the system is stable.
- Frequency Analysis: If you are interested in the frequency domain behavior of a system, you might choose z to be a complex exponential, e.g., z = exp(jω) where j is the imaginary unit and ω is the angular frequency.
- Arbitrary Complex Numbers: In some cases, you might be interested in the Z-transform at an arbitrary complex number z for general analysis. This could be done to study the behavior of the system at a specific point in the complex plane.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static class
ZTransform.ZOperator
-
Field Summary
Fields Modifier and Type Field Description private double
myNormZ
private double
myPhaseZ
private ComplexNumber
myZ
-
Constructor Summary
Constructors Constructor Description ZTransform(ComplexNumber z)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static MatrixStore<ComplexNumber>
doDFT(Access1D<?> input)
This method computes the discrete Fourier transform (DFT) of a sequence of real numbers.(package private) static ComplexNumber
doTransform(Access1D<?> input, ComplexNumber z)
(package private) double
getNormZ()
(package private) double
getPhaseZ()
static java.util.function.UnaryOperator<ComplexNumber>
newZOperator(Access1D<?> sequence)
static ZTransform
of(double angularFrequency)
static ZTransform
of(ComplexNumber z)
ComplexNumber
transform(Access1D<?> input)
Input is a sequence of real numbers.
-
-
-
Field Detail
-
myNormZ
private final double myNormZ
-
myPhaseZ
private final double myPhaseZ
-
myZ
private final ComplexNumber myZ
-
-
Constructor Detail
-
ZTransform
ZTransform(ComplexNumber z)
-
-
Method Detail
-
doDFT
public static MatrixStore<ComplexNumber> doDFT(Access1D<?> input)
This method computes the discrete Fourier transform (DFT) of a sequence of real numbers. The DFT is computed using the Z-transform with z = exp(jω) where j is the imaginary unit and ω is the angular frequency. The DFT is defined as: X[k] = ∑x[n]exp(-jωkn) where n is the index of the sequence, x[n] is the value of the sequence at index n, and X[k] is the value of the DFT at index k.This method exists primarily for testing purposes. It is most likely better to use
DiscreteFourierTransform
to compute the DFT using an FFT algorithm.
-
newZOperator
public static java.util.function.UnaryOperator<ComplexNumber> newZOperator(Access1D<?> sequence)
-
of
public static ZTransform of(ComplexNumber z)
-
of
public static ZTransform of(double angularFrequency)
-
doTransform
static ComplexNumber doTransform(Access1D<?> input, ComplexNumber z)
-
transform
public ComplexNumber transform(Access1D<?> input)
Input is a sequence of real numbers. Output is a complex number.- Specified by:
transform
in interfaceDataTransform<Access1D<?>,ComplexNumber>
-
getNormZ
double getNormZ()
-
getPhaseZ
double getPhaseZ()
-
-