TSignalAnalyzer Class

ComponentTMtxComponentTAnalysisTSignalTSignalAnalyzer

type TSignalAnalyzer = class(TSignal);

Analyzes a signal with different methods in time domain.

Applies the operation selected by Transform to the Input signal and places the result in Self.Data. Transform = ttAutoCorr computes the one-sided autocorrelation r[k]r[k] for lags k = 0 ... CorrTaps1-1, scaled by AutoCorrType: normal r[k]=sum_n x[n] x[n+k] (so r[0]r[0] equals the signal energy sum_n x[n]^2), biased r[k]/Nr[k]/N, unbiased r[k]/(Nk)r[k]/(N-k). ttCrossCorr computes the raw cross-correlation of the two Inputs, Data[n] = sum_k x_1[k] x_2[k+n], n = 0 ... CorrTaps1-1, whose peak lag equals the delay between the two signals. ttDct / ttInverseDct apply the orthonormal DCT-II and its inverse, satisfying IDCT(DCT(x)) = x. ttRealCepstrum returns the real cepstrum c = F^(-1)bigl(ln| F(x)|bigr) (a windowed, half-length estimate) in which an echo of delay D produces a rahmonic peak whose quefrency tracks D; ttCplxCepstrum keeps the unwrapped phase. Integration further integrates (trapezoidal, inOnce/inTwice) or differentiates (central difference (x[i+2]-x[i])/(2 Delta t), diffOnce/diffTwice) the signal using the sample interval Delta t = 1/F_s. The resulting signal is always placed in Self.Data.

Properties

NameTypeDescription
ActiveBooleanSet active to false to suppress the propagation of the Pull request and the subsequent call to the Update method.
AutoCorrTypeTAutoCorrTypeSelect the auto-correlation type.
BandWidthDoubleReturn the bandwidth of the signal.
BandwidthHDoubleReturns the upper bandwidth edge of the signal.
BandwidthLDoubleReturns the lower bandwidth edge of the signal.
BlockAssignBooleanBlock streaming of specific properties when storing only a "template".
ChannelCountIntegerGet or set the number of channels multiplexed in the data property.
ComplexBooleanSet this property to true, to request computation using complex numbers.
ContinuousBooleanIf True, the component will pass on the udpate request to the connected component.
CorrTaps1IntegerSelect number of taps for auto-correlation and cross-correlation.
CorrTaps2IntegerSelect number of taps for cross-correlation.
DataTVecStores the result of the processing.
DtDoubleTime between two consecutive samples.
EditorActiveBooleanReturns True, if the component editor is displayed.
ExpWindowDoubleFinal value of the exponential window.
FloatPrecisionTMtxFloatPrecisionSet this property to request computation in 32bit/64bit precision with real/complex numbers.
FloatPrecisionLockBooleanSet this property to true to lock changes to FloatPrecision property.
HzResDoubleFrequency resolution obtained, if an FFT algorithm would be run on the data.
InputTAnalysisConnector property to obtain a pointer to the TSignal component holding the data to be processed.
IntegrationTIntegrationSpecifies, if the signal should be integrated or differentiated.
IsDoubleBooleanSet this property to false, to request computation in 32bit floating point precision, 64bit, if true.
ItemDoubleDefault property to access values of a real signal.
ItemNumberIntegerNumber to label the object when it is an item in the List.
LengthIntegerGet or set the length of the signal in samples.
MarksTMarkListStores the time stamps and amplitude of selected samples.
MaxAmpltDoubleStores the maximum amplitude of the signal found by the MinMax method.
MaxXDoubleUse the MaxX property to store the time stamp (in seconds) of the right most sample.
MinAmpltDoubleStores the minimum amplitude of the signal found by the MinMax method.
MinXDoubleUse the MinX property to store the time stamp of the left-most sample.
OnAfterUpdateTNotifyEventThe event is triggered after the call to the Update method.
OnBeforeUpdateTNotifyEventThe event is triggered just before the call to the Update method.
OnDisplayUpdateTNotifyEventThe event is triggered after the OnAfterUpdate event. Use this event to update any associated charts or graphs or result tables.
OnGetInputTNotifyEventIf the Input property is not assigned, the component will call OnGetInput.
OnNotifyUpdateTNotifyEventThe event is called after a call to InternalUpdate, OnAfterUpdate and OnDisplayUpdate from within the Update method.
OnParameterUpdateTNotifyEventThe event is triggered when ParamUpdate method is called. The ParamUpdate method is usually called by component editors when a value was changed by the user and the editor was "Live".
PipeStateTPipeStateReturns the state of the pipe after the last update.
ReferenceTReferenceListStores a list of components that have to be notified, when this component is destroyed.
RemoveDCBooleanIf True, subtract the average value from the signal. This is not usuable for streaming.
ReportTSignalReportGenerates a report/description of the signal.
RotationIntegerDefines the rotation in number of samples within the current buffer.
SamplingFrequencyDoubleDefines the sampling frequency of the signal.
SamplingTimeDoubleThe length of the signal in seconds.
ScaleFactorDoubleThe signal will be scaled with the ScaleFactor.
SidelobeAttDoubleDefines sidelobe attenuation for the Kaiser and Cheybshev window.
SuspendNotifyUpdateBooleanSet this property to True, to prevent calling OnNotifyUpdate from the Update Method.
TransformTTimeTransformSelects the type of the transform to apply to the signal.
UsesInputsBooleanSet it to True to indicate, that valid signals will be connected to the Input or Inputs properties.
WindowTSignalWindowTypeDefines the window to applied to the signal.

Methods

NameDescription
AllowStreamingReturns the negatated value of BlockAssign.
AppendAppends Sample to the end of the signal.
ApplyWindowApply the window function.
AssignAssign values of all published properties from Source.
AssignTemplateAssign values of "template-like" published properties from Source.
CopyCopies signal Data and sampling frequency information.
CrestCompute the CREST parameter.
EditorClassTo be overriden in descendanr classses.
InputsDirtyIf all Inputs[i] are dirty the function returns true.
InternalPullWhen called, the method will pass Update requests recursively to all connected objects.
InvalidateNotifies all connected components that this component has fresh data.
LoadFromStreamLoad the component from Src stream.
LoadTemplateFromFileLoad a template from file.
LoadTemplateFromStreamLoad a template from stream.
MarksToStringsConvert marks to strings.
MinMaxFind minimum and maximum amplitude and store the result in the MinAmplt and MaxAmplt properties.
NearestMaximumFind the nearest maximum. The initial position in seconds is given with pos and the final position is returned with the Pos parameter.
NearestMinimumFind the nearest minimum. The initial position in seconds is given with pos and the final position is returned with the Pos parameter.
ParamUpdateThe method can be assigned to some other component even handler, as a notification that a parameter has changed and that Self should consider a recalculation.
PeakFind the maximum deviation of the signal from its mean value.
PipeResetRecursively processes all connected components backward and calls Reset method.
PullRequest recalculation of the entire chain of all connected components.
PullUntilEndCalls Pull until pipeEnd is returned.
ResetReset is called after loading the data from stream or file.
ResetIntegratorResets initial conditions for integration and differentiation.
SaveTemplateToFileSave template to file.
SaveTemplateToStreamSave template to stream.
SaveToStreamSave the component to Dst stream.
SizeAssign the size of the signal from Src.
UpdateRequest recalculation of the data and place the result in Self.
UpdateNotifyCall this method only, if SuspendNotifyUpdate is True.
ValuesToStringsConvert values to strings.
ZeroCrossingCompute the position of the zero crossing. The initial position in seconds is given with pos and the final position is returned with the Pos parameter. y contains the final value of the time signal. In ideal case it should be zero. The method will use linear interpolation to locate the position of the zero.