denormalize - Undo filter coefficient and gain changes caused by normalize
Syntax
denormalize(hq)
Description
denormalize(hq) reverses
the coefficient changes you make when you use normalize with hq.
The filter coefficients do not change if you call denormalize(hq) before
you use normalize(hq). Calling denormalize more
than once on a filter does not change the coefficients after the first denormalize call.
Examples
Make a quantized filter hq and normalize
the filter coefficients. After normalizing the coefficients, restore
them to their original values by reversing the effects of the normalize function.
d=fdesign.highpass('n,F3dB',14,0.45)
d =
Response: 'Highpass'
Specification: 'N,F3dB'
Description: {'Filter Order';'3dB Frequency'}
NormalizedFrequency: true
FilterOrder: 14
F3dB: 0.45
hd =design(d,'butter');
hd.arithmetic='fixed'
hd =
FilterStructure: 'Direct-Form II, Second-Order Sections'
Arithmetic: 'fixed'
sosMatrix: [7x6 double]
ScaleValues: [0.5206298828125;0.436004638671875;0.3790283203125;0.3404541015625;0.31488037109375;0.29925537109375;0.29180908203125;1]
OptimizeScaleValues: true
PersistentMemory: false
CoeffWordLength: 16
CoeffAutoScale: true
Signed: true
InputWordLength: 16
InputFracLength: 15
SectionInputWordLength: 16
SectionInputAutoScale: true
SectionOutputWordLength: 16
SectionOutputAutoScale: true
OutputWordLength: 16
OutputMode: 'AvoidOverflow'
StateWordLength: 16
StateFracLength: 15
ProductMode: 'FullPrecision'
AccumMode: 'KeepMSB'
AccumWordLength: 40
CastBeforeSum: true
RoundMode: 'convergent'
OverflowMode: 'wrap'
g=normalize(hd)';
g =
2 2 2 2 2 2 2
hd.sosMatrix
ans =
0.5000 -1.0000 0.5000 1.0000 -0.2817 0.8008
0.5000 -1.0000 0.5000 1.0000 -0.2359 0.5081
0.5000 -1.0000 0.5000 1.0000 -0.2051 0.3110
0.5000 -1.0000 0.5000 1.0000 -0.1842 0.1776
0.5000 -1.0000 0.5000 1.0000 -0.1704 0.0892
0.5000 -1.0000 0.5000 1.0000 -0.1619 0.0350
0.5000 -1.0000 0.5000 1.0000 -0.1579 0.0093
denormalize(hd)
hd.sosMatrix
ans =
1.0000 -2.0000 1.0000 1.0000 -0.2817 0.8008
1.0000 -2.0000 1.0000 1.0000 -0.2359 0.5081
1.0000 -2.0000 1.0000 1.0000 -0.2051 0.3110
1.0000 -2.0000 1.0000 1.0000 -0.1842 0.1776
1.0000 -2.0000 1.0000 1.0000 -0.1704 0.0892
1.0000 -2.0000 1.0000 1.0000 -0.1619 0.0350
1.0000 -2.0000 1.0000 1.0000 -0.1579 0.0093See Also
normalize
 | cumsec | | design |  |
How much time do you spend on testing to ensure implementation meets system-level requirements?
Learn more