TSignalModulator Class

Source: SignalProcessing.cs · Assembly: Dew.Signal
ComponentTMtxComponentTAnalysisTSignalTSignalRateConverterTSignalModulator

public class TSignalModulator : TSignalRateConverter

Modulates a signal.

Use the component to move the signal to a specified carrier frequency. The process is also called modulation. By increasing the sampling frequency using high speed linear phase interpolation, narrow frequency bands can be moved to any carrier frequency in real time. This is the inverse procedure to the signal demodulator. The target sampling frequency and carrier frequency can be independently controlled. The procedure generates only one sided upper side band, to the right of the carrier.

The target sampling frequency can be specified with the Factor property and the CarrierFrequency property defines the carrier frequency.

Example:
Signal.SamplingFrequency := 10; //in Hz SignalModulator.Input := Signal; SignalModulator.Factor := 12; SignalModulator.CarrierFrequency := 4.5;

The output sampling frequency will be: 10*12 = 120Hz The output signal will have non-zero frequencies from 45 to 50Hz which will hold the information originally stored in the range from 0 to 5Hz.

Properties

NameTypeDescription
ActiveBooleanSet active to false to suppress the propagation of the Pull request and the subsequent call to the Update method.
AudioSignalBooleanEnable when the signal processed is Audio signal.
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".
CarrierFrequencyDoubleSpecifies where to move the Input signal in the frequency domain.
ChannelCountInt32Get 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.
DataTVecStores the result of the processing.
DtDoubleTime between two consecutive samples.
EditorActiveBooleanReturns True, if the component editor is displayed.
FactorDoubleFactor by which to change the sampling frequency of the signal connected to the Input property.
FilterDelayDoubleReturns the filter delay in number of samples of the final sampling frequency.
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.
HalfBandBooleanThe bandwidth will be halved during downsampling.
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.
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.
ItemNumberInt32Number to label the object when it is an item in the List.
LengthInt32Get 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.
RippleDoubleDefines the ripple of the passband and of the stopband of the FIR lowpass filter used for interpolation.
SamplingFrequencyDoubleDefines the sampling frequency of the signal.
SamplingTimeDoubleThe length of the signal in seconds.
ScaleFactorDoubleAdditional scaling factor which is applied without extra performance cost.
SuspendNotifyUpdateBooleanSet this property to True, to prevent calling OnNotifyUpdate from the Update Method.
TransBWDoubleDefines the width of the transition band of the FIR filter used for interpolation/decimation.
UsesInputsBooleanSet it to True to indicate, that valid signals will be connected to the Input or Inputs properties.

Methods

NameDescription
AllowStreamingReturns the negatated value of BlockAssign.
AppendAppends Sample to the end of the signal.
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.
InitializeInitializes filtering structures after Factor and other properties have been set.
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.
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 all delay lines.
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.

Events

NameDescription
OnAfterUpdateEventThe event is triggered after the call to the Update method.
OnBeforeUpdateEventThe event is triggered just before the call to the Update method.
OnDisplayUpdateEventThe event is triggered after the OnAfterUpdate event. Use this event to update any associated charts or graphs or result tables.
OnGetInputEventIf the Input property is not assigned, the component will call OnGetInput.
OnNotifyUpdateEventThe event is called after a call to InternalUpdate, OnAfterUpdate and OnDisplayUpdate from within the Update method.
OnParameterUpdateEventThe 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".