Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Acoustic parameters (C50,C80, D50 etc.) calculation bug #7

Closed
wbinek opened this issue Jan 14, 2015 · 14 comments
Closed

Acoustic parameters (C50,C80, D50 etc.) calculation bug #7

wbinek opened this issue Jan 14, 2015 · 14 comments
Milestone

Comments

@wbinek
Copy link
Contributor

wbinek commented Jan 14, 2015

Function GetSumLimit() in projet_calculation.cpp calculates from time=0, whereas all parameters should be calculated starting from time when direct wave approaches the receiver.

I've made a temporary solution at:
wbinek@827530d

@nicolas-f
Copy link
Member

Thanks for feedback.

We have to fix this issue by changing the fromTime value. (without copying array)

@Picaut Picaut added this to the 1.3.x milestone Nov 9, 2016
@nicolas-f
Copy link
Member

nicolas-f commented Dec 13, 2016

After reading again the code:

The implementation follow the ISO 3382:1997(F). The reverberation time RT30 is computed using the regression on a Schroeder curve from -5db to -35db.

The variable wxFloat32 fromTime is the time when the value is -5 dB inferior than the higher value of the Schroeder curve.

@nicolas-f
Copy link
Member

All this post-processing code will be moved into lib_interface and included into the automated unit test framework.

@wbinek
Copy link
Contributor Author

wbinek commented Dec 13, 2016

The RT calculation is ok. The bug is in energetic parameters calculation (mainly C and D). The integration should start when the impulse arrives to the receiver not from t=0.

@wbinek
Copy link
Contributor Author

wbinek commented Dec 13, 2016

If you look at for example projet_calculation.cpp in C param calculation there is:

wxFloat32 wj_CurrentFreq=GetSumLimit(idFreq,0.f,te,timeTable,tab_wj)/GetSumLimit(idFreq,te,-1.f,timeTable,tab_wj);

The problem is that instead of starting integration from fixed 0 it should start when direct sound approaches the receiver. It can be changed in parameter calculation funcition or GetSumLimit method.
This applies to all energetic parameters.

@nicolas-f
Copy link
Member

Yes sorry, I was focused in RT and EDT. I reopen the issue and I will fix it by updating

Compute_ST_Param
Compute_C_Param
Compute_D_Param
Compute_TS_Param
Compute_LEF_Param
Compute_LF_Param
Compute_LFC_Param
Compute_LG_Param
Compute_G_Param

@nicolas-f nicolas-f reopened this Dec 13, 2016
nicolas-f added a commit to nicolas-f/I-Simpa that referenced this issue Dec 14, 2016
@Picaut
Copy link
Collaborator

Picaut commented Dec 3, 2020

I try to validate this modification. However, I obtained NaN or °Inf values for all parameters (except reverberation parameters).
Need to verify step by step the calculation, in debug mode.

Below, a simulation (v1.3.4) for a 10m cubic room, source at the center, receiver at 2m from the source:

50Hz to 1250Hz, increasing absorption from 0, step 0.05, d=1 (100% diffuse)
1600 and 2000 Hz, absorption 0.1 and 0.2 respectively, no diffusion d=0

image

@Picaut
Copy link
Collaborator

Picaut commented Dec 3, 2020

May be a problem in this function. Is-it for finding the time step of direct field? lastdb should not be updated at each time step?
Time step of the direct field (if exists) could be estimated simply by calculating the distance from source;
If no direct field ?

https://github.com/Ifsttar/I-Simpa/blob/dca3a488d558d3756fb2a90a0f52877e2238c9bd/src/isimpa/data_manager/projet_calculation.cpp#L114-L126

@nicolas-f
Copy link
Member

Yes it could be that. GetTimeDecay should return the time before the noise level is decaying .

@Picaut
Copy link
Collaborator

Picaut commented Dec 3, 2020

Are you sure it finds the time step of the direct field (or a valid change/increasing of energy)?

@nicolas-f
Copy link
Member

With I-Simpa in dev branch I have this:

isimpa

What is the timestep in spps ?
issue_7.zip

@nicolas-f
Copy link
Member

ok, there is an issue when sound power received is < 0 dB. I will try to fix that

nicolas-f added a commit to nicolas-f/I-Simpa that referenced this issue Dec 4, 2020
…ossible in order to not skip first sound wave time
@Picaut
Copy link
Collaborator

Picaut commented Dec 4, 2020

May be that results are correct. I have prepared a I-Simpa project with the possibility to compare results with expected values for C, D...

@Picaut
Copy link
Collaborator

Picaut commented Dec 7, 2020

I have compared SPPS and expected theoretical results for 100% diffusing room, in many room size (verifying also the effects of the Time Step and distance from source). It seems that the procedure for calculating the clarity C80 within I-Simpa seems correct. It probably needs further validation with measurements or other reference data, but it seems quite acceptable for now.

image

@Picaut Picaut closed this as completed Dec 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants