ΣSigmaStudio Ask AI Русский Log in

FIR and general filtering on ADAU1701. Hints about fixed point arithmetic!

SigmaDSP & SigmaStudio leonxp Aug 2, 2013 00:00 16 replies Original on forum ↗
Subscribe
leonxp Question
Aug 2, 2013 00:00

Hi everybody, I'll show you what I've done and what results I got.

Aim

Exploiting ADAU1701 to correct a loud speaker frequency response (from 40Hz to 1000Hz) in order to make it as flat as possible in the low band.

Procedure

Get loudspeaker impulse response and frequency response measurements.

Use of the inverse measured frequency response in order to compute FIR coefficients of an equalizing filter that eqaualizes my loudspeaker. The filter design has been done using a simple windowing method. Many filters have been designed of many different order, I choose for this example a 600th-order FIR.

Simulation in Matlab of the filter designed (see Results point 1.)

Exporting of filter coefficients in text-file in order to feed the "FIR" block of sigmastudio.

Build a patch in SigmaStudio composed of just a FIR filter block, a probe/stimulus components and input/output associations. Instructions memory consumption of about 610 instruction memory locations.
The FIR block has been updated with the coefficients file ( I've attached it below).

Measure the loudspeaker frequency response using the processing corretion built-up by the 600th-order FIR (see Results point 2.)

Results

Matlab simulation of equalization procedure

Real equalization process using the ADAU1701 computation procedure to correct the original loudspeaker frequency response

FIR filter frequency response into Matlab domain

FIR filter frequency response into ADAU1701 domain (exploiting stimulus/probe blocks)

Questions

As you can see the simulated equalization process and the real one are very different. Also the frequency response of FIR in matlab and in sigmastudio are different expecially on the tail at high frequencies. I think that this mismatch is due to the arithmetic used by ADAU1701 and a PC. In my opinion ADAU1701 is a fixed-point DSP with double precision, isn't it?

How FIR computation into DSP works? What's the correct format of the coefficients in order to achieve a working FIR filtering? I attached the coefficients file as you can see if the decimal format is useful or not (to visualize it better use matlab or notepad++, because windows textfile reader doesn't read newline commands).

What's the wordlength of a fixed-point coefficient admitted by the chip?

How can I convert matlab coefficients in a fixed-point version suitable for sigmaDSP ADAU1701?

I hope you can help me because I'm completely frozen on ths. I made many many tests and measurements without any successful results.
Regards,
Leo.

Audio Signal Processors

filter

sigmastudio

SigmaDSP Audio Processors

frequency

audio

adau1701

Show More

58503e30975196b6de7250e7c9a415e2.bmp
58503e30975196b6de7250e7c9a415e2.bmp
779d47d2c602aefb76df8929312bb234.bmp
779d47d2c602aefb76df8929312bb234.bmp
6072cc79a1bb23483860f40b81bab379.bmp
6072cc79a1bb23483860f40b81bab379.bmp
2451578fc815550539ac936809149375.bmp
2451578fc815550539ac936809149375.bmp
gr4eme Reply
Aug 2, 2013 00:00

Hi LeonXP

As a High End loudspeaker designer for 17 years can i ask why you require a flat line response?

Im not sure exactly what your aim is but if it was me i would take the response in a known environment and have the EQ correct any in room response to the known response

Graeme

gr4eme Reply
Aug 2, 2013 00:00

Loudspeakers are very rarely flat in my experience, mainly because a flat loudspeaker would sound terrible so any one designing would probably never need the ability to do what your asking, just my 2¢

leonxp Reply
Aug 2, 2013 00:00

I need to flat as best as possible loudspeaker modules (also composite systems) in order to show correction power of ADAU1701 mounted on board of amplifiers I'm working on.
Hi-fi means less "frequency color" as possible right? I know that customers choose louspeakers not only for their power but also for their "color". But this is not my business, I need hi-fi test results.

Regards.

P.s. My measurements are performed in an anechoic room with measurements systems which negelet any reflected sound contribuition.

ADIApproved Reply
Aug 2, 2013 00:00

Hi Leon:

The difference in your results is due to quantization of your coefficients. The 1701 has a 5.23 fixed point format. To complicate things further the stimluy and probe provide a first approximation view of the transfer function and, although they do take into account the coefficient quantization and correct fixed point number, they do not do so for the actual signal and therefore you might also encounter differences in an actual measurement. The FIR block doesn't use the double precision arithmetic because it would make it very wastefull (double all the operations), for FIR filtering you most likey do not this double precison arithmetic.

To simulate fixed point in Matlab, Mathworks has a fixed point library that you could use. You can also simply quantize your calculated coefficients to a 5.23 number by finding the fractional value that is best represented with a 2^-23 precision.

Hope this helps.

Miguel

ADIApproved Reply
Aug 2, 2013 00:00

HI again:

By the way, if you try using our Automatic Filter Designer (built into sigmaStudio) you can do the approximaition of speakers to different targets (if you want it flat, you can leave it flat) by approximating biquads instead of FIR. this process will lessen the DSP burden from using many coefficients (typical from FIR filters).

As greme mentions, not sure if flat response should be the target but the tool lets you specify whatever target you want.

Cheers

Miguel

leonxp Reply
Aug 2, 2013 00:00

Sorry, I respect your job (and I like it very much) and if you want to show me your products I'd glad to see your web site and know more about that.
But think about a composite module of 4 or 6 trasducers into the same loudspeaker. It's quite impossible to produce 6 different trasducers which match exactely the frequency response band you desire. In this circumstance you have to cut overlapping bands and try to flat all of them or some of them. Think to composite modules mounted on loudspeaker of strange shapes don't to common loudspeakers.
I know that loudspeakers, amplification set for live music and so on are cool if they sound in a particular way but this is not my business.

Regards,

Leo.

leonxp Reply
Aug 2, 2013 00:00

Matlab tools about it I found are related to well-known filters as pass-band, low-pass, etc...
I found something about quantization but I cannot understand how to use the fractional value and exactly what it is. Do you know something about that?

By the way, the procedure I've to test is:

0. B are FIR coefficients vector computed in a common way with matlab

normalize B coefficients with the norm_factor = 2^(ceil(log2(max(abs(B))))), this is the maximum value of B coefficients aprroximated to the nearest power of two of its value, for istance b_max = -5 => norm_factor = 8
So:
norm_factor = 2^(ceil(log2(max(abs(B)))))
B_norm = B/norm_factor

compute the wordlength of quantizer. It's:
wordlength = 2^(DSP_resolution_bit - 1) (in ADAU1701 case what is this resolution 23 or 28???)
For a 16 bit DSP resolution the: wordlength = 2^15 = 32768

compute B_quantized as:
B_quantized = [round(B_norm*wordlength) / wordlength] * norm_fact

My questions are:

what the resolution of ADAU1701 to achieve the optimal wordlength?

how can I use the fractional value, and what is it exactely?

My reference:
http://cnx.org/content/m10813/latest/

Thanks, regards

Leo.

ADIApproved Reply
Aug 2, 2013 00:00

Hi Leo:

I now recall that regardless of the value you enter in the FIR filter, you can get the quantized value in the output window. So simply copy the output of the capture window of SigmaStudio into Matlab and plot your transfer function again.

Let us know your results.

Regards

Miguel

leonxp Reply
Aug 2, 2013 00:00

I got the data from the capture (note in my capture window and in the file exportation I read 5.32 data ??? whiat does it mean). Nevertheless data I load into DSP and data I got reading them are a bit different. I post these them.

Original DATA
(no quantization)

Captured DATA

0.000185
0.000193
0.000199
0.000205
0.000209
0.000212
0.000213
0.000213
0.000212
0.000210
0.000206
0.000201
0.000195
0.000189
0.000182
0.000175
0.000168
0.000161
0.000155
0.000149
0.000145
0.000142
0.000140
0.000141
0.000143
0.000147
0.000153
0.000161
0.000172
0.000184
0.000199
0.000216
0.000234
0.000254
0.000275
0.000297
0.000319
0.000342
0.000364
0.000386
0.000407
0.000426
0.000444
0.000460
0.000474
0.000485
0.000494
0.000500
0.000504
0.000505
0.000504
0.000501
0.000495
0.000489
0.000481
0.000473
0.000466
0.000458
0.000453
0.000449
0.000447
0.000449
0.000454
0.000463
0.000476
0.000494
0.000516
0.000543
0.000575
0.000611
0.000650
0.000694
0.000739
0.000787
0.000836
0.000885
0.000933
0.000979
0.001021
0.001059
0.001092
0.001118
0.001137
0.001147
0.001148
0.001139
0.001120
0.001091
0.001052
0.001003
0.000945
0.000878
0.000803
0.000722
0.000635
0.000545
0.000452
0.000359
0.000268
0.000180
0.000097
0.000020
-0.000048
-0.000106
-0.000153
-0.000188
-0.000209
-0.000218
-0.000212
-0.000194
-0.000161
-0.000117
-0.000061
0.000005
0.000079
0.000160
0.000245
0.000333
0.000420
0.000506
0.000587
0.000662
0.000729
0.000785
0.000830
0.000862
0.000881
0.000886
0.000877
0.000856
0.000822
0.000778
0.000725
0.000666
0.000602
0.000539
0.000477
0.000421
0.000374
0.000340
0.000321
0.000321
0.000342
0.000388
0.000458
0.000556
0.000682
0.000835
0.001015
0.001221
0.001451
0.001701
0.001969
0.002249
0.002537
0.002829
0.003117
0.003397
0.003661
0.003905
0.004121
0.004305
0.004450
0.004553
0.004608
0.004613
0.004566
0.004465
0.004309
0.004101
0.003841
0.003534
0.003185
0.002798
0.002380
0.001940
0.001485
0.001024
0.000568
0.000126
-0.000292
-0.000676
-0.001017
-0.001305
-0.001533
-0.001694
-0.001781
-0.001790
-0.001717
-0.001561
-0.001322
-0.001002
-0.000605
-0.000135
0.000401
0.000994
0.001635
0.002311
0.003012
0.003724
0.004434
0.005128
0.005792
0.006413
0.006977
0.007474
0.007891
0.008219
0.008450
0.008579
0.008600
0.008511
0.008313
0.008007
0.007597
0.007090
0.006494
0.005818
0.005075
0.004275
0.003434
0.002565
0.001683
0.000802
-0.000063
-0.000899
-0.001694
-0.002436
-0.003117
-0.003729
-0.004267
-0.004729
-0.005114
-0.005425
-0.005667
-0.005847
-0.005974
-0.006062
-0.006122
-0.006171
-0.006224
-0.006299
-0.006414
-0.006584
-0.006827
-0.007158
-0.007590
-0.008135
-0.008800
-0.009591
-0.010510
-0.011555
-0.012720
-0.013994
-0.015363
-0.016807
-0.018304
-0.019826
-0.021342
-0.022818
-0.024216
-0.025496
-0.026618
-0.027538
-0.028214
-0.028604
-0.028666
-0.028362
-0.027657
-0.026516
-0.024914
-0.022827
-0.020240
-0.017140
-0.013526
-0.009402
-0.004778
0.000327
0.005884
0.011861
0.018214
0.024897
0.031854
0.039023
0.046340
0.053734
0.061132
0.068458
0.075636
0.082588
0.089238
0.095512
0.101340
0.106654
0.111394
0.115503
0.118934
0.121646
0.123607
0.124793
0.125189
0.124793
0.123607
0.121646
0.118934
0.115503
0.111394
0.106654
0.101340
0.095512
0.089238
0.082588
0.075636
0.068458
0.061132
0.053734
0.046340
0.039023
0.031854
0.024897
0.018214
0.011861
0.005884
0.000327
-0.004778
-0.009402
-0.013526
-0.017140
-0.020240
-0.022827
-0.024914
-0.026516
-0.027657
-0.028362
-0.028666
-0.028604
-0.028214
-0.027538
-0.026618
-0.025496
-0.024216
-0.022818
-0.021342
-0.019826
-0.018304
-0.016807
-0.015363
-0.013994
-0.012720
-0.011555
-0.010510
-0.009591
-0.008800
-0.008135
-0.007590
-0.007158
-0.006827
-0.006584
-0.006414
-0.006299
-0.006224
-0.006171
-0.006122
-0.006062
-0.005974
-0.005847
-0.005667
-0.005425
-0.005114
-0.004729
-0.004267
-0.003729
-0.003117
-0.002436
-0.001694
-0.000899
-0.000063
0.000802
0.001683
0.002565
0.003434
0.004275
0.005075
0.005818
0.006494
0.007090
0.007597
0.008007
0.008313
0.008511
0.008600
0.008579
0.008450
0.008219
0.007891
0.007474
0.006977
0.006413
0.005792
0.005128
0.004434
0.003724
0.003012
0.002311
0.001635
0.000994
0.000401
-0.000135
-0.000605
-0.001002
-0.001322
-0.001561
-0.001717
-0.001790
-0.001781
-0.001694
-0.001533
-0.001305
-0.001017
-0.000676
-0.000292
0.000126
0.000568
0.001024
0.001485
0.001940
0.002380
0.002798
0.003185
0.003534
0.003841
0.004101
0.004309
0.004465
0.004566
0.004613
0.004608
0.004553
0.004450
0.004305
0.004121
0.003905
0.003661
0.003397
0.003117
0.002829
0.002537
0.002249
0.001969
0.001701
0.001451
0.001221
0.001015
0.000835
0.000682
0.000556
0.000458
0.000388
0.000342
0.000321
0.000321
0.000340
0.000374
0.000421
0.000477
0.000539
0.000602
0.000666
0.000725
0.000778
0.000822
0.000856
0.000877
0.000886
0.000881
0.000862
0.000830
0.000785
0.000729
0.000662
0.000587
0.000506
0.000420
0.000333
0.000245
0.000160
0.000079
0.000005
-0.000061
-0.000117
-0.000161
-0.000194
-0.000212
-0.000218
-0.000209
-0.000188
-0.000153
-0.000106
-0.000048
0.000020
0.000097
0.000180
0.000268
0.000359
0.000452
0.000545
0.000635
0.000722
0.000803
0.000878
0.000945
0.001003
0.001052
0.001091
0.001120
0.001139
0.001148
0.001147
0.001137
0.001118
0.001092
0.001059
0.001021
0.000979
0.000933
0.000885
0.000836
0.000787
0.000739
0.000694
0.000650
0.000611
0.000575
0.000543
0.000516
0.000494
0.000476
0.000463
0.000454
0.000449
0.000447
0.000449
0.000453
0.000458
0.000466
0.000473
0.000481
0.000489
0.000495
0.000501
0.000504
0.000505
0.000504
0.000500
0.000494
0.000485
0.000474
0.000460
0.000444
0.000426
0.000407
0.000386
0.000364
0.000342
0.000319
0.000297
0.000275
0.000254
0.000234
0.000216
0.000199
0.000184
0.000172
0.000161
0.000153
0.000147
0.000143
0.000141
0.000140
0.000142
0.000145
0.000149
0.000155
0.000161
0.000168
0.000175
0.000182
0.000189
0.000195
0.000201
0.000206
0.000210
0.000212
0.000213
0.000213
0.000212
0.000209
0.000205
0.000199
0.000193
0.000185

0,000185012800000000
0,000192999800000000
0,000198960300000000
0,000205040000000000
0,000208973900000000
0,000211954100000000
0,000213027000000000
0,000213027000000000
0,000211954100000000
0,000210046800000000
0,000205993700000000
0,000200986900000000
0,000195026400000000
0,000188946700000000
0,000182032600000000
0,000174999200000000
0,000167965900000000
0,000161051800000000
0,000154972100000000
0,000149011600000000
0,000144958500000000
0,000141978300000000
0,000139951700000000
0,000141024600000000
0,000143051100000000
0,000146985100000000
0,000152945500000000
0,000161051800000000
0,000172019000000000
0,000184059100000000
0,000198960300000000
0,000216007200000000
0,000234007800000000
0,000254035000000000
0,000275015800000000
0,000296950300000000
0,000319004100000000
0,000342011500000000
0,000363946000000000
0,000385999700000000
0,000406980500000000
0,000426054000000000
0,000444054600000000
0,000460028600000000
0,000473976100000000
0,000484943400000000
0,000494003300000000
0,000499963800000000
0,000504016900000000
0,000504970600000000
0,000504016900000000
0,000501036600000000
0,000494957000000000
0,000488996500000000
0,000481009500000000
0,000473022500000000
0,000465989100000000
0,000458002100000000
0,000452995300000000
0,000448942200000000
0,000447034800000000
0,000448942200000000
0,000453949000000000
0,000463008900000000
0,000476002700000000
0,000494003300000000
0,000516057000000000
0,000542998300000000
0,000574946400000000
0,000610947600000000
0,000650048300000000
0,000694036500000000
0,000738978400000000
0,000787019700000000
0,000836014700000000
0,000885009800000000
0,000933051100000000
0,000978946700000000
0,00102102800000000
0,00105905500000000
0,00109195700000000
0,00111794500000000
0,00113701800000000
0,00114703200000000
0,00114798500000000
0,00113904500000000
0,00111997100000000
0,00109100300000000
0,00105202200000000
0,00100302700000000
0,000944972000000000
0,000877976400000000
0,000802993800000000
0,000722050700000000
0,000635027900000000
0,000545024900000000
0,000452041600000000
0,000359058400000000
0,000267982500000000
0,000180006000000000
9,70363600000000e-05
2,00271600000000e-05
-4,80413400000000e-05
-0,000105977100000000
-0,000152945500000000
-0,000187993000000000
-0,000208973900000000
-0,000218033800000000
-0,000211954100000000
-0,000193953500000000
-0,000161051800000000
-0,000116944300000000
-6,10351600000000e-05
5,00679000000000e-06
7,90357600000000e-05
0,000159978900000000
0,000244975100000000
0,000332951500000000
0,000419974300000000
0,000506043400000000
0,000586986500000000
0,000661969200000000
0,000728964800000000
0,000784993200000000
0,000830054300000000
0,000862002400000000
0,000880956600000000
0,000885963400000000
0,000877022700000000
0,000856041900000000
0,000821948100000000
0,000777959800000000
0,000725030900000000
0,000666022300000000
0,000602006900000000
0,000538945200000000
0,000476956400000000
0,000421047200000000
0,000373959500000000
0,000339984900000000
0,000321030600000000
0,000321030600000000
0,000342011500000000
0,000388026200000000
0,000458002100000000
0,000555992100000000
0,000681996300000000
0,000834941900000000
0,00101494800000000
0,00122094200000000
0,00145101500000000
0,00170099700000000
0,00196898000000000
0,00224900200000000
0,00253701200000000
0,00282895600000000
0,00311696500000000
0,00339698800000000
0,00366103600000000
0,00390505800000000
0,00412094600000000
0,00430500500000000
0,00444996400000000
0,00455296000000000
0,00460803500000000
0,00461304200000000
0,00456595400000000
0,00446498400000000
0,00430905800000000
0,00410103800000000
0,00384104300000000
0,00353395900000000
0,00318503400000000
0,00279796100000000
0,00238001300000000
0,00194001200000000
0,00148499000000000
0,00102400800000000
0,000568032300000000
0,000126004200000000
-0,000291943600000000
-0,000676035900000000
-0,00101697400000000
-0,00130498400000000
-0,00153303100000000
-0,00169396400000000
-0,00178098700000000
-0,00179004700000000
-0,00171697100000000
-0,00156104600000000
-0,00132203100000000
-0,00100195400000000
-0,000604987100000000
-0,000134944900000000
0,000401020100000000
0,000993967100000000
0,00163495500000000
0,00231099100000000
0,00301194200000000
0,00372397900000000
0,00443399000000000
0,00512802600000000
0,00579202200000000
0,00641298300000000
0,00697696200000000
0,00747394600000000
0,00789105900000000
0,00821900400000000
0,00845003100000000
0,00857901600000000
0,00859999700000000
0,00851094700000000
0,00831294100000000
0,00800705000000000
0,00759697000000000
0,00708997200000000
0,00649404500000000
0,00581800900000000
0,00507497800000000
0,00427496400000000
0,00343394300000000
0,00256502600000000
0,00168299700000000
0,000802040100000000
-6,29425000000000e-05
-0,000898957300000000
-0,00169396400000000
-0,00243604200000000
-0,00311696500000000
-0,00372898600000000
-0,00426697700000000
-0,00472903300000000
-0,00511395900000000
-0,00542497600000000
-0,00566697100000000
-0,00584697700000000
-0,00597405400000000
-0,00606203100000000
-0,00612199300000000
-0,00617098800000000
-0,00622403600000000
-0,00629901900000000
-0,00641405600000000
-0,00658404800000000
-0,00682699700000000
-0,00715804100000000
-0,00759005500000000
-0,00813496100000000
-0,00880003000000000
-0,00959098300000000
-0,0105099700000000
-0,0115549600000000
-0,0127199900000000
-0,0139939800000000
-0,0153629800000000
-0,0168069600000000
-0,0183039900000000
-0,0198260500000000
-0,0213420400000000
-0,0228179700000000
-0,0242160600000000
-0,0254960100000000
-0,0266180000000000
-0,0275379400000000
-0,0282139800000000
-0,0286040300000000
-0,0286660200000000
-0,0283620400000000
-0,0276570300000000
-0,0265159600000000
-0,0249140300000000
-0,0228270300000000
-0,0202399500000000
-0,0171400300000000
-0,0135259600000000
-0,00940203700000000
-0,00477802800000000
0,000326991100000000
0,00588405100000000
0,0118609700000000
0,0182139900000000
0,0248969800000000
0,0318540300000000
0,0390230400000000
0,0463399900000000
0,0537339400000000
0,0611319500000000
0,0684579600000000
0,0756360300000000
0,0825879600000000
0,0892380500000000
0,0955120300000000
0,101340100000000
0,106654000000000
0,111394000000000
0,115503000000000
0,118934000000000
0,121646000000000
0,123607000000000
0,124793100000000
0,125188900000000
0,124793100000000
0,123607000000000
0,121646000000000
0,118934000000000
0,115503000000000
0,111394000000000
0,106654000000000
0,101340100000000
0,0955120300000000
0,0892380500000000
0,0825879600000000
0,0756360300000000
0,0684579600000000
0,0611319500000000
0,0537339400000000
0,0463399900000000
0,0390230400000000
0,0318540300000000
0,0248969800000000
0,0182139900000000
0,0118609700000000
0,00588405100000000
0,000326991100000000
-0,00477802800000000
-0,00940203700000000
-0,0135259600000000
-0,0171400300000000
-0,0202399500000000
-0,0228270300000000
-0,0249140300000000
-0,0265159600000000
-0,0276570300000000
-0,0283620400000000
-0,0286660200000000
-0,0286040300000000
-0,0282139800000000
-0,0275379400000000
-0,0266180000000000
-0,0254960100000000
-0,0242160600000000
-0,0228179700000000
-0,0213420400000000
-0,0198260500000000
-0,0183039900000000
-0,0168069600000000
-0,0153629800000000
-0,0139939800000000
-0,0127199900000000
-0,0115549600000000
-0,0105099700000000
-0,00959098300000000
-0,00880003000000000
-0,00813496100000000
-0,00759005500000000
-0,00715804100000000
-0,00682699700000000
-0,00658404800000000
-0,00641405600000000
-0,00629901900000000
-0,00622403600000000
-0,00617098800000000
-0,00612199300000000
-0,00606203100000000
-0,00597405400000000
-0,00584697700000000
-0,00566697100000000
-0,00542497600000000
-0,00511395900000000
-0,00472903300000000
-0,00426697700000000
-0,00372898600000000
-0,00311696500000000
-0,00243604200000000
-0,00169396400000000
-0,000898957300000000
-6,29425000000000e-05
0,000802040100000000
0,00168299700000000
0,00256502600000000
0,00343394300000000
0,00427496400000000
0,00507497800000000
0,00581800900000000
0,00649404500000000
0,00708997200000000
0,00759697000000000
0,00800705000000000
0,00831294100000000
0,00851094700000000
0,00859999700000000
0,00857901600000000
0,00845003100000000
0,00821900400000000
0,00789105900000000
0,00747394600000000
0,00697696200000000
0,00641298300000000
0,00579202200000000
0,00512802600000000
0,00443399000000000
0,00372397900000000
0,00301194200000000
0,00231099100000000
0,00163495500000000
0,000993967100000000
0,000401020100000000
-0,000134944900000000
-0,000604987100000000
-0,00100195400000000
-0,00132203100000000
-0,00156104600000000
-0,00171697100000000
-0,00179004700000000
-0,00178098700000000
-0,00169396400000000
-0,00153303100000000
-0,00130498400000000
-0,00101697400000000
-0,000676035900000000
-0,000291943600000000
0,000126004200000000
0,000568032300000000
0,00102400800000000
0,00148499000000000
0,00194001200000000
0,00238001300000000
0,00279796100000000
0,00318503400000000
0,00353395900000000
0,00384104300000000
0,00410103800000000
0,00430905800000000
0,00446498400000000
0,00456595400000000
0,00461304200000000
0,00460803500000000
0,00455296000000000
0,00444996400000000
0,00430500500000000
0,00412094600000000
0,00390505800000000
0,00366103600000000
0,00339698800000000
0,00311696500000000
0,00282895600000000
0,00253701200000000
0,00224900200000000
0,00196898000000000
0,00170099700000000
0,00145101500000000
0,00122094200000000
0,00101494800000000
0,000834941900000000
0,000681996300000000
0,000555992100000000
0,000458002100000000
0,000388026200000000
0,000342011500000000
0,000321030600000000
0,000321030600000000
0,000339984900000000
0,000373959500000000
0,000421047200000000
0,000476956400000000
0,000538945200000000
0,000602006900000000
0,000666022300000000
0,000725030900000000
0,000777959800000000
0,000821948100000000
0,000856041900000000
0,000877022700000000
0,000885963400000000
0,000880956600000000
0,000862002400000000
0,000830054300000000
0,000784993200000000
0,000728964800000000
0,000661969200000000
0,000586986500000000
0,000506043400000000
0,000419974300000000
0,000332951500000000
0,000244975100000000
0,000159978900000000
7,90357600000000e-05
5,00679000000000e-06
-6,10351600000000e-05
-0,000116944300000000
-0,000161051800000000
-0,000193953500000000
-0,000211954100000000
-0,000218033800000000
-0,000208973900000000
-0,000187993000000000
-0,000152945500000000
-0,000105977100000000
-4,80413400000000e-05
2,00271600000000e-05
9,70363600000000e-05
0,000180006000000000
0,000267982500000000
0,000359058400000000
0,000452041600000000
0,000545024900000000
0,000635027900000000
0,000722050700000000
0,000802993800000000
0,000877976400000000
0,000944972000000000
0,00100302700000000
0,00105202200000000
0,00109100300000000
0,00111997100000000
0,00113904500000000
0,00114798500000000
0,00114703200000000
0,00113701800000000
0,00111794500000000
0,00109195700000000
0,00105905500000000
0,00102102800000000
0,000978946700000000
0,000933051100000000
0,000885009800000000
0,000836014700000000
0,000787019700000000
0,000738978400000000
0,000694036500000000
0,000650048300000000
0,000610947600000000
0,000574946400000000
0,000542998300000000
0,000516057000000000
0,000494003300000000
0,000476002700000000
0,000463008900000000
0,000453949000000000
0,000448942200000000
0,000447034800000000
0,000448942200000000
0,000452995300000000
0,000458002100000000
0,000465989100000000
0,000473022500000000
0,000481009500000000
0,000488996500000000
0,000494957000000000
0,000501036600000000
0,000504016900000000
0,000504970600000000
0,000504016900000000
0,000499963800000000
0,000494003300000000
0,000484943400000000
0,000473976100000000
0,000460028600000000
0,000444054600000000
0,000426054000000000
0,000406980500000000
0,000385999700000000
0,000363946000000000
0,000342011500000000
0,000319004100000000
0,000296950300000000
0,000275015800000000
0,000254035000000000
0,000234007800000000
0,000216007200000000
0,000198960300000000
0,000184059100000000
0,000172019000000000
0,000161051800000000
0,000152945500000000
0,000146985100000000
0,000143051100000000
0,000141024600000000
0,000139951700000000
0,000141978300000000
0,000144958500000000
0,000149011600000000
0,000154972100000000
0,000161051800000000
0,000167965900000000
0,000174999200000000
0,000182032600000000
0,000188946700000000
0,000195026400000000
0,000200986900000000
0,000205993700000000
0,000210046800000000
0,000211954100000000
0,000213027000000000
0,000213027000000000
0,000211954100000000
0,000208973900000000
0,000205040000000000
0,000198960300000000
0,000192999800000000
0,000185012800000000

These are Images of processing data with the coefficients written as DSP do:

Filter:

Equalization:

594126d9a338549c99681ee4d66972c9.bmp
594126d9a338549c99681ee4d66972c9.bmp
89c82950e07a904913d565872a798c07.bmp
89c82950e07a904913d565872a798c07.bmp
leonxp Reply
Aug 2, 2013 00:00

I tried a quantization of coefficients, using 16 bits as length of word these are results (only in Matlab I cannot test the loudspeaker before monday):

Filter Coefficients:

Original Coefficients
Quantized Coefficients

0.000185
0.000193
0.000199
0.000205
0.000209
0.000212
0.000213
0.000213
0.000212
0.000210
0.000206
0.000201
0.000195
0.000189
0.000182
0.000175
0.000168
0.000161
0.000155
0.000149
0.000145
0.000142
0.000140
0.000141
0.000143
0.000147
0.000153
0.000161
0.000172
0.000184
0.000199
0.000216
0.000234
0.000254
0.000275
0.000297
0.000319
0.000342
0.000364
0.000386
0.000407
0.000426
0.000444
0.000460
0.000474
0.000485
0.000494
0.000500
0.000504
0.000505
0.000504
0.000501
0.000495
0.000489
0.000481
0.000473
0.000466
0.000458
0.000453
0.000449
0.000447
0.000449
0.000454
0.000463
0.000476
0.000494
0.000516
0.000543
0.000575
0.000611
0.000650
0.000694
0.000739
0.000787
0.000836
0.000885
0.000933
0.000979
0.001021
0.001059
0.001092
0.001118
0.001137
0.001147
0.001148
0.001139
0.001120
0.001091
0.001052
0.001003
0.000945
0.000878
0.000803
0.000722
0.000635
0.000545
0.000452
0.000359
0.000268
0.000180
0.000097
0.000020
-0.000048
-0.000106
-0.000153
-0.000188
-0.000209
-0.000218
-0.000212
-0.000194
-0.000161
-0.000117
-0.000061
0.000005
0.000079
0.000160
0.000245
0.000333
0.000420
0.000506
0.000587
0.000662
0.000729
0.000785
0.000830
0.000862
0.000881
0.000886
0.000877
0.000856
0.000822
0.000778
0.000725
0.000666
0.000602
0.000539
0.000477
0.000421
0.000374
0.000340
0.000321
0.000321
0.000342
0.000388
0.000458
0.000556
0.000682
0.000835
0.001015
0.001221
0.001451
0.001701
0.001969
0.002249
0.002537
0.002829
0.003117
0.003397
0.003661
0.003905
0.004121
0.004305
0.004450
0.004553
0.004608
0.004613
0.004566
0.004465
0.004309
0.004101
0.003841
0.003534
0.003185
0.002798
0.002380
0.001940
0.001485
0.001024
0.000568
0.000126
-0.000292
-0.000676
-0.001017
-0.001305
-0.001533
-0.001694
-0.001781
-0.001790
-0.001717
-0.001561
-0.001322
-0.001002
-0.000605
-0.000135
0.000401
0.000994
0.001635
0.002311
0.003012
0.003724
0.004434
0.005128
0.005792
0.006413
0.006977
0.007474
0.007891
0.008219
0.008450
0.008579
0.008600
0.008511
0.008313
0.008007
0.007597
0.007090
0.006494
0.005818
0.005075
0.004275
0.003434
0.002565
0.001683
0.000802
-0.000063
-0.000899
-0.001694
-0.002436
-0.003117
-0.003729
-0.004267
-0.004729
-0.005114
-0.005425
-0.005667
-0.005847
-0.005974
-0.006062
-0.006122
-0.006171
-0.006224
-0.006299
-0.006414
-0.006584
-0.006827
-0.007158
-0.007590
-0.008135
-0.008800
-0.009591
-0.010510
-0.011555
-0.012720
-0.013994
-0.015363
-0.016807
-0.018304
-0.019826
-0.021342
-0.022818
-0.024216
-0.025496
-0.026618
-0.027538
-0.028214
-0.028604
-0.028666
-0.028362
-0.027657
-0.026516
-0.024914
-0.022827
-0.020240
-0.017140
-0.013526
-0.009402
-0.004778
0.000327
0.005884
0.011861
0.018214
0.024897
0.031854
0.039023
0.046340
0.053734
0.061132
0.068458
0.075636
0.082588
0.089238
0.095512
0.101340
0.106654
0.111394
0.115503
0.118934
0.121646
0.123607
0.124793
0.125189
0.124793
0.123607
0.121646
0.118934
0.115503
0.111394
0.106654
0.101340
0.095512
0.089238
0.082588
0.075636
0.068458
0.061132
0.053734
0.046340
0.039023
0.031854
0.024897
0.018214
0.011861
0.005884
0.000327
-0.004778
-0.009402
-0.013526
-0.017140
-0.020240
-0.022827
-0.024914
-0.026516
-0.027657
-0.028362
-0.028666
-0.028604
-0.028214
-0.027538
-0.026618
-0.025496
-0.024216
-0.022818
-0.021342
-0.019826
-0.018304
-0.016807
-0.015363
-0.013994
-0.012720
-0.011555
-0.010510
-0.009591
-0.008800
-0.008135
-0.007590
-0.007158
-0.006827
-0.006584
-0.006414
-0.006299
-0.006224
-0.006171
-0.006122
-0.006062
-0.005974
-0.005847
-0.005667
-0.005425
-0.005114
-0.004729
-0.004267
-0.003729
-0.003117
-0.002436
-0.001694
-0.000899
-0.000063
0.000802
0.001683
0.002565
0.003434
0.004275
0.005075
0.005818
0.006494
0.007090
0.007597
0.008007
0.008313
0.008511
0.008600
0.008579
0.008450
0.008219
0.007891
0.007474
0.006977
0.006413
0.005792
0.005128
0.004434
0.003724
0.003012
0.002311
0.001635
0.000994
0.000401
-0.000135
-0.000605
-0.001002
-0.001322
-0.001561
-0.001717
-0.001790
-0.001781
-0.001694
-0.001533
-0.001305
-0.001017
-0.000676
-0.000292
0.000126
0.000568
0.001024
0.001485
0.001940
0.002380
0.002798
0.003185
0.003534
0.003841
0.004101
0.004309
0.004465
0.004566
0.004613
0.004608
0.004553
0.004450
0.004305
0.004121
0.003905
0.003661
0.003397
0.003117
0.002829
0.002537
0.002249
0.001969
0.001701
0.001451
0.001221
0.001015
0.000835
0.000682
0.000556
0.000458
0.000388
0.000342
0.000321
0.000321
0.000340
0.000374
0.000421
0.000477
0.000539
0.000602
0.000666
0.000725
0.000778
0.000822
0.000856
0.000877
0.000886
0.000881
0.000862
0.000830
0.000785
0.000729
0.000662
0.000587
0.000506
0.000420
0.000333
0.000245
0.000160
0.000079
0.000005
-0.000061
-0.000117
-0.000161
-0.000194
-0.000212
-0.000218
-0.000209
-0.000188
-0.000153
-0.000106
-0.000048
0.000020
0.000097
0.000180
0.000268
0.000359
0.000452
0.000545
0.000635
0.000722
0.000803
0.000878
0.000945
0.001003
0.001052
0.001091
0.001120
0.001139
0.001148
0.001147
0.001137
0.001118
0.001092
0.001059
0.001021
0.000979
0.000933
0.000885
0.000836
0.000787
0.000739
0.000694
0.000650
0.000611
0.000575
0.000543
0.000516
0.000494
0.000476
0.000463
0.000454
0.000449
0.000447
0.000449
0.000453
0.000458
0.000466
0.000473
0.000481
0.000489
0.000495
0.000501
0.000504
0.000505
0.000504
0.000500
0.000494
0.000485
0.000474
0.000460
0.000444
0.000426
0.000407
0.000386
0.000364
0.000342
0.000319
0.000297
0.000275
0.000254
0.000234
0.000216
0.000199
0.000184
0.000172
0.000161
0.000153
0.000147
0.000143
0.000141
0.000140
0.000142
0.000145
0.000149
0.000155
0.000161
0.000168
0.000175
0.000182
0.000189
0.000195
0.000201
0.000206
0.000210
0.000212
0.000213
0.000213
0.000212
0.000209
0.000205
0.000199
0.000193
0.000185

0.000183
0.000191
0.000198
0.000206
0.000206
0.000214
0.000214
0.000214
0.000214
0.000206
0.000206
0.000198
0.000198
0.000191
0.000183
0.000175
0.000168
0.000160
0.000153
0.000153
0.000145
0.000145
0.000137
0.000137
0.000145
0.000145
0.000153
0.000160
0.000175
0.000183
0.000198
0.000214
0.000237
0.000252
0.000275
0.000298
0.000320
0.000343
0.000366
0.000389
0.000404
0.000427
0.000443
0.000458
0.000473
0.000488
0.000496
0.000504
0.000504
0.000504
0.000504
0.000504
0.000496
0.000488
0.000481
0.000473
0.000465
0.000458
0.000450
0.000450
0.000450
0.000450
0.000450
0.000465
0.000473
0.000496
0.000519
0.000542
0.000572
0.000610
0.000648
0.000694
0.000740
0.000786
0.000839
0.000885
0.000931
0.000977
0.001022
0.001060
0.001091
0.001122
0.001137
0.001144
0.001144
0.001137
0.001122
0.001091
0.001053
0.000999
0.000946
0.000877
0.000801
0.000725
0.000633
0.000542
0.000450
0.000359
0.000267
0.000183
0.000099
0.000023
-0.000046
-0.000107
-0.000153
-0.000191
-0.000206
-0.000221
-0.000214
-0.000191
-0.000160
-0.000114
-0.000061
0.000008
0.000076
0.000160
0.000244
0.000336
0.000420
0.000504
0.000587
0.000664
0.000732
0.000786
0.000832
0.000862
0.000877
0.000885
0.000877
0.000854
0.000824
0.000778
0.000725
0.000664
0.000603
0.000542
0.000481
0.000420
0.000374
0.000343
0.000320
0.000320
0.000343
0.000389
0.000458
0.000557
0.000679
0.000832
0.001015
0.001221
0.001450
0.001701
0.001968
0.002251
0.002541
0.002831
0.003120
0.003395
0.003662
0.003906
0.004120
0.004303
0.004448
0.004555
0.004608
0.004616
0.004562
0.004463
0.004311
0.004097
0.003838
0.003532
0.003181
0.002800
0.002380
0.001938
0.001488
0.001022
0.000565
0.000130
-0.000290
-0.000679
-0.001015
-0.001305
-0.001534
-0.001694
-0.001778
-0.001793
-0.001717
-0.001564
-0.001320
-0.000999
-0.000603
-0.000137
0.000404
0.000992
0.001633
0.002312
0.003014
0.003723
0.004433
0.005127
0.005791
0.006416
0.006981
0.007477
0.007889
0.008217
0.008453
0.008575
0.008598
0.008514
0.008316
0.008003
0.007599
0.007088
0.006493
0.005821
0.005074
0.004272
0.003433
0.002563
0.001686
0.000801
-0.000061
-0.000900
-0.001694
-0.002434
-0.003113
-0.003731
-0.004265
-0.004730
-0.005112
-0.005424
-0.005669
-0.005844
-0.005974
-0.006058
-0.006119
-0.006172
-0.006226
-0.006302
-0.006416
-0.006584
-0.006828
-0.007156
-0.007591
-0.008133
-0.008797
-0.009590
-0.010513
-0.011559
-0.012718
-0.013992
-0.015366
-0.016808
-0.018303
-0.019829
-0.021339
-0.022820
-0.024216
-0.025497
-0.026619
-0.027534
-0.028214
-0.028603
-0.028664
-0.028366
-0.027657
-0.026520
-0.024918
-0.022827
-0.020241
-0.017143
-0.013527
-0.009399
-0.004776
0.000328
0.005882
0.011864
0.018211
0.024895
0.031853
0.039024
0.046341
0.053734
0.061134
0.068459
0.075638
0.082588
0.089241
0.095512
0.101341
0.106651
0.111397
0.115501
0.118935
0.121643
0.123604
0.124794
0.125191
0.124794
0.123604
0.121643
0.118935
0.115501
0.111397
0.106651
0.101341
0.095512
0.089241
0.082588
0.075638
0.068459
0.061134
0.053734
0.046341
0.039024
0.031853
0.024895
0.018211
0.011864
0.005882
0.000328
-0.004776
-0.009399
-0.013527
-0.017143
-0.020241
-0.022827
-0.024918
-0.026520
-0.027657
-0.028366
-0.028664
-0.028603
-0.028214
-0.027534
-0.026619
-0.025497
-0.024216
-0.022820
-0.021339
-0.019829
-0.018303
-0.016808
-0.015366
-0.013992
-0.012718
-0.011559
-0.010513
-0.009590
-0.008797
-0.008133
-0.007591
-0.007156
-0.006828
-0.006584
-0.006416
-0.006302
-0.006226
-0.006172
-0.006119
-0.006058
-0.005974
-0.005844
-0.005669
-0.005424
-0.005112
-0.004730
-0.004265
-0.003731
-0.003113
-0.002434
-0.001694
-0.000900
-0.000061
0.000801
0.001686
0.002563
0.003433
0.004272
0.005074
0.005821
0.006493
0.007088
0.007599
0.008003
0.008316
0.008514
0.008598
0.008575
0.008453
0.008217
0.007889
0.007477
0.006981
0.006416
0.005791
0.005127
0.004433
0.003723
0.003014
0.002312
0.001633
0.000992
0.000404
-0.000137
-0.000603
-0.000999
-0.001320
-0.001564
-0.001717
-0.001793
-0.001778
-0.001694
-0.001534
-0.001305
-0.001015
-0.000679
-0.000290
0.000130
0.000565
0.001022
0.001488
0.001938
0.002380
0.002800
0.003181
0.003532
0.003838
0.004097
0.004311
0.004463
0.004562
0.004616
0.004608
0.004555
0.004448
0.004303
0.004120
0.003906
0.003662
0.003395
0.003120
0.002831
0.002541
0.002251
0.001968
0.001701
0.001450
0.001221
0.001015
0.000832
0.000679
0.000557
0.000458
0.000389
0.000343
0.000320
0.000320
0.000343
0.000374
0.000420
0.000481
0.000542
0.000603
0.000664
0.000725
0.000778
0.000824
0.000854
0.000877
0.000885
0.000877
0.000862
0.000832
0.000786
0.000732
0.000664
0.000587
0.000504
0.000420
0.000336
0.000244
0.000160
0.000076
0.000008
-0.000061
-0.000114
-0.000160
-0.000191
-0.000214
-0.000221
-0.000206
-0.000191
-0.000153
-0.000107
-0.000046
0.000023
0.000099
0.000183
0.000267
0.000359
0.000450
0.000542
0.000633
0.000725
0.000801
0.000877
0.000946
0.000999
0.001053
0.001091
0.001122
0.001137
0.001144
0.001144
0.001137
0.001122
0.001091
0.001060
0.001022
0.000977
0.000931
0.000885
0.000839
0.000786
0.000740
0.000694
0.000648
0.000610
0.000572
0.000542
0.000519
0.000496
0.000473
0.000465
0.000450
0.000450
0.000450
0.000450
0.000450
0.000458
0.000465
0.000473
0.000481
0.000488
0.000496
0.000504
0.000504
0.000504
0.000504
0.000504
0.000496
0.000488
0.000473
0.000458
0.000443
0.000427
0.000404
0.000389
0.000366
0.000343
0.000320
0.000298
0.000275
0.000252
0.000237
0.000214
0.000198
0.000183
0.000175
0.000160
0.000153
0.000145
0.000145
0.000137
0.000137
0.000145
0.000145
0.000153
0.000153
0.000160
0.000168
0.000175
0.000183
0.000191
0.000198
0.000198
0.000206
0.000206
0.000214
0.000214
0.000214
0.000214
0.000206
0.000206
0.000198
0.000191
0.000183

Filter:

Equalization:

e0173a3ac74e33079dd975f1487363ca.bmp
e0173a3ac74e33079dd975f1487363ca.bmp
b7260f3c68f129262bf31ec489e80d70.bmp
b7260f3c68f129262bf31ec489e80d70.bmp
ADIApproved Reply
Aug 2, 2013 00:00

Hi Leo:

Good, Is this the answer you were expecting? Notice in your second graph the filter is using the data from your speaker as the display. In other words. If you are comparing the first graph and the second graph, then you are comparing 2 different things.I suggest instead to compare just the filter with and without quantization.

One more thing about the stimuly and probe. It's resolution is much limited than the resolution you are using in Matlab. This is the case because we need to update the stimuly and probe in real time for every change in parameter that the user makes. In other words, you shouldn't be comparing the Matlab simulation with the Probe simulation except in the points that perfectly align to those used in SigmaStudio.

In other words, the Stimulus and Probe should be used as a reference for the envelop of the filter and NOT for showing exactly what the filter will be performing at all times.

How this helps.

Miguel

leonxp Reply
Aug 2, 2013 00:00

Sorry again, maybe if I know the bit resolution of the chip I could try to conveniently quantize the coefficients. How many bits adder, ALU and others work with in ADAU1701?

ADIApproved Reply
Aug 2, 2013 00:00

Hi Leo:

I thought I answerd that question above, the 1701 has an internal 5.23 fixed point format for both data and coefficients. This means 1 bit for the sign, 4 bits for the integer part and 23 bits for the fractional part. You can also refer to page 29 of our data sheet.

Regards

Miguel

http://www.analog.com/static/imported-files/data_sheets/ADAU1701.pdf

leonxp Reply
Aug 2, 2013 00:00

This is the difference between filter with canonical coefficients and the filter with coefficients stored as DSP does.
The difference is consistence in stop band, but in the pass-band is the same, so I don't know why the equalization fails as it does.

So filters are different but not in pass-band which is the only one to affetct the equalization procedure.
In my opinion knowing how DSP works should be the only way to understand the problem.
Regards,
Leo.

7f7f4a86cffe79a0020a22d0c0a20f37.bmp
7f7f4a86cffe79a0020a22d0c0a20f37.bmp
leonxp Reply
Aug 10, 2013 00:00

Hi, I wonder what if add or mult overflow? I mean during a FIR filtering y[n] = sum_{i=0}^{M} bi * x[n-i], if overflows occur will be they notified?

The last question:

Q5.23 (Q4.23 since "MSB" is sign bit) format means 32 bit wordlength with first 4 MSBs reserved; add operations accept Q5.23 operands and give Q5.23 result; mult accepts Q5.23 operands and should return Q9.46 result or Q5.23 result if truncation of 23 LSBs and 4 MSBs is performed. How ADAU1701 performs mult, with 28 bit results or 56 bits results? And what about add?

Tnx, Regards.

EZAdministrator Reply
Aug 2, 2018 00:00

This question has been assumed as answered either offline via email or with a multi-part answer. This question has now been closed out. If you have an inquiry related to this topic please post a new question in the applicable product forum.

Thank you,
EZ Admin