Overview
Fixed point Discrete-time derivative
Discussion
Computes the derivative of a fixed-point (1.31 format) discrete-time signal. The derivative is defined as:
...
The hidden internal array .lastValue stores the previous value x[n-1] between blocks. The length of the array is set by the prebuild function to the number of channels. The output format of the module is 18.14.
Type Definition
Code Block |
---|
typedef struct _ModuleDerivativeFract32 { ModuleInstanceDescriptor instance; // Common Audio Weaver module instance structure FLOAT32 gain; // Additional gain. fract32 gainFract32; // Additional gain. fract32* lastValue; // Previous value x[n-1]. } ModuleDerivativeFract32Class; |
Variables
Properties
Name | Type | Usage | isHidden | Default value | Range | Units |
gain | float | parameter | 0 | 1 | -1:1 | linear |
gainFract32 | fract32 | derived | 1 | 0.3662 | Unrestricted | |
lastValue | fract32* | state | 1 | [1 x 1] | Unrestricted |
Pins
Input Pins
Name: in
Description: Input signal
...
Sample rate range: Unrestricted
Complex support: Real
Output Pins
Name: out
Description: Output signal
Data type: fract32
MATLAB Usage
File Name: derivative_fract32_module.m
...