Mercurial > hg > aimc
comparison matlab/bmm/carfac/CARFAC_Close_AGC_Loop.m @ 504:a0869cb1c99b
Major update to how the DOHC works; like in recent book OHC chapter; Design Doc update (a bit)
author | dicklyon@google.com |
---|---|
date | Thu, 24 May 2012 22:26:56 +0000 |
parents | 896620d9d539 |
children | b3118c9ed67f |
comparison
equal
deleted
inserted
replaced
502:37c007925536 | 504:a0869cb1c99b |
---|---|
22 | 22 |
23 % fastest decimated rate determines interp needed: | 23 % fastest decimated rate determines interp needed: |
24 decim1 = CF.AGC_params.decimation(1); | 24 decim1 = CF.AGC_params.decimation(1); |
25 | 25 |
26 for ear = 1:CF.n_ears | 26 for ear = 1:CF.n_ears |
27 extra_damping = CF.ears(ear).AGC_state.AGC_memory(:, 1); % stage 1 result | 27 undamping = 1 - CF.ears(ear).AGC_state.AGC_memory(:, 1); % stage 1 result |
28 % Update the target stage gain for the new damping: | 28 % Update the target stage gain for the new damping: |
29 new_g = CARFAC_Stage_g(CF.ears(ear).CAR_coeffs, extra_damping); | 29 new_g = CARFAC_Stage_g(CF.ears(ear).CAR_coeffs, undamping); |
30 % set the deltas needed to get to the new damping: | 30 % set the deltas needed to get to the new damping: |
31 CF.ears(ear).CAR_state.dzB_memory = ... | 31 CF.ears(ear).CAR_state.dzB_memory = ... |
32 (extra_damping - CF.ears(ear).CAR_state.zB_memory) / decim1; | 32 (CF.ears(ear).CAR_coeffs.zr_coeffs .* undamping - ... |
33 CF.ears(ear).CAR_state.zB_memory) / decim1; | |
33 CF.ears(ear).CAR_state.dg_memory = ... | 34 CF.ears(ear).CAR_state.dg_memory = ... |
34 (new_g - CF.ears(ear).CAR_state.g_memory) / decim1; | 35 (new_g - CF.ears(ear).CAR_state.g_memory) / decim1; |
35 end | 36 end |