Path: blob/main/src/utils/emissions/HelpersHarmonoise.cpp
169678 views
/****************************************************************************/1// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.dev/sumo2// Copyright (C) 2001-2025 German Aerospace Center (DLR) and others.3// This program and the accompanying materials are made available under the4// terms of the Eclipse Public License 2.0 which is available at5// https://www.eclipse.org/legal/epl-2.0/6// This Source Code may also be made available under the following Secondary7// Licenses when the conditions for such availability set forth in the Eclipse8// Public License 2.0 are satisfied: GNU General Public License, version 29// or later which is available at10// https://www.gnu.org/licenses/old-licenses/gpl-2.0-standalone.html11// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later12/****************************************************************************/13/// @file HelpersHarmonoise.cpp14/// @author Daniel Krajzewicz15/// @author Jakob Erdmann16/// @author Michael Behrisch17/// @date Mon, 10.05.200418///19// Noise data collector for edges/lanes20/****************************************************************************/21#include <config.h>2223#include "PollutantsInterface.h"24#include "HelpersHarmonoise.h"25#include <limits>26#include <cmath>272829// ===========================================================================30// static definitions31// ===========================================================================32// ---------------------------------------------------------------------------33// vehicle class noise emission coefficients34// ---------------------------------------------------------------------------35// rolling component, light vehicles, alpha36double37HelpersHarmonoise::myR_A_C1_Parameter[27] = { 69.9, 69.9, 69.9, 74.9, 74.9, 74.9, 77.3, 77.5, 78.1, 78.3, 78.9, 77.8, 78.5, 81.9, 84.1, 86.5, 88.6, 88.2, 87.6, 85.8, 82.8, 80.2, 77.6, 75.0, 72.8, 70.4, 67.9 };3839// rolling component, light vehicles, beta40double41HelpersHarmonoise::myR_B_C1_Parameter[27] = { 33.0, 33.0, 33.0, 15.2, 15.2, 15.2, 41.0, 41.2, 42.3, 41.8, 38.6, 35.5, 31.7, 21.5, 21.2, 23.5, 29.1, 33.5, 34.1, 35.1, 36.4, 37.4, 38.9, 39.7, 39.7, 39.7, 39.7 };4243// rolling component, heavy vehicles, alpha44double45HelpersHarmonoise::myR_A_C3_Parameter[27] = { 80.5, 80.5, 80.5, 82.5, 83.5, 83.5, 86.5, 88.3, 88.7, 88.3, 91.4, 92.2, 96.0, 98.1, 97.8, 98.4, 97.2, 94.6, 95.9, 90.5, 87.1, 85.1, 83.2, 81.3, 81.3, 81.3, 81.3 };4647// rolling component, heavy vehicles, beta48double49HelpersHarmonoise::myR_B_C3_Parameter[27] = { 33.0, 33.0, 33.0, 30.0, 30.0, 30.0, 41.0, 41.2, 42.3, 41.8, 38.6, 35.5, 31.7, 21.5, 21.2, 23.5, 29.1, 33.5, 34.1, 35.1, 36.4, 37.4, 38.9, 39.7, 39.7, 39.7, 39.7 };5051// traction component, light vehicles, alpha52double53HelpersHarmonoise::myT_A_C1_Parameter[27] = { 90.0, 92.0, 89.0, 91.0, 92.4, 94.8, 90.8, 86.8, 86.2, 84.5, 84.5, 84.8, 83.5, 81.8, 81.4, 79.0, 79.2, 81.4, 85.5, 85.8, 85.2, 82.9, 81.0, 78.2, 77.2, 75.2, 74.2 };5455// traction component, light vehicles, beta56double57HelpersHarmonoise::myT_B_C1_Parameter[27] = { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 9.4, 9.4, 9.4, 9.4, 9.4, 9.4, 9.4, 9.4, 9.4, 9.4, 9.4, 9.4, 9.4, 9.4, 9.4, 9.4, 9.4 };5859// traction component, heavy vehicles, alpha60double61HelpersHarmonoise::myT_A_C3_Parameter[27] = { 97.7, 97.3, 98.2, 103.3, 109.5, 104.3, 99.8, 100.2, 98.9, 99.5, 100.7, 101.2, 100.6, 100.2, 97.4, 97.1, 97.8, 97.3, 95.8, 94.9, 92.7, 90.6, 89.9, 87.9, 85.9, 83.8, 82.2 };6263// traction component, heavy vehicles, beta64double65HelpersHarmonoise::myT_B_C3_Parameter[27] = { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 11.7, 11.7, 11.7, 11.7, 11.7, 11.7, 11.7, 11.7, 11.7, 11.7, 11.7, 11.7, 11.7, 11.7, 11.7, 11.7, 11.7 };6667// ---------------------------------------------------------------------------68// A-weighted correction for octave bands69// ---------------------------------------------------------------------------70const double71HelpersHarmonoise::myAOctaveBandCorrection[27] = { -44.7, -39.4, -34.6, -30.2, -26.2, -22.5, -19.1, -16.1, -13.4,72-10.9, -8.6, -6.6, -4.8, -3.2, -1.9, -0.8, 0.0, +0.6,73+1.0, +1.2, +1.3, +1.2, +1.0, +0.5, -0.1, -1.1, -2.574};7576const double77HelpersHarmonoise::mySurfaceCorrection[27] = { 0.7, 0.2, 3.6, -1.0, -1.8, -0.1, -0.9, -0.7, -1.1, -0.5, -1.5,78-2.4, -3.0, -4.6, -5.8, -6.5, -7.9, -7.8, -7.2, -6.3, -5.6,79-5.5, -4.8, -4.380};8182// ===========================================================================83// method definitions84// ===========================================================================85double86HelpersHarmonoise::computeNoise(SUMOEmissionClass c, double v, double a) {87double* alphaT, *betaT, *alphaR, *betaR;88double ac = 0;89if (PollutantsInterface::isHeavy(c)) {90alphaT = myT_A_C3_Parameter;91betaT = myT_B_C3_Parameter;92alphaR = myR_A_C3_Parameter;93betaR = myR_B_C3_Parameter;94ac = 5.6;95} else if (!PollutantsInterface::isSilent(c)) {96alphaT = myT_A_C1_Parameter;97betaT = myT_B_C1_Parameter;98alphaR = myR_A_C1_Parameter;99betaR = myR_B_C1_Parameter;100ac = 4.4;101} else {102return 0;103}104//105double L_low = 0;106double L_high = 0;107v = v * 3.6;108double s = -30.;//109for (int i = 0; i < 27; ++i) {110double crc_low = alphaR[i] + betaR[i] * log10(v / 70.) + 10.*log10(.8); // + mySurfaceCorrection[i];111double ctc_low = alphaT[i] + betaT[i] * ((v - 70.) / 70.) + a * ac + 10.*log10(.2);112double Li_low = 10. * log10(pow(10., (crc_low / 10.)) + pow(10., (ctc_low / 10.)));113Li_low += s;114double crc_high = alphaR[i] + betaR[i] * log10(v / 70.) + 10.*log10(.2); // + mySurfaceCorrection[i];115double ctc_high = alphaT[i] + betaT[i] * ((v - 70.) / 70.) + a * ac + 10.*log10(.8);116double Li_high = 10. * log10(pow(10., (crc_high / 10.)) + pow(10., (ctc_high / 10.)));117Li_high += s;118L_low += pow(10., (Li_low + myAOctaveBandCorrection[i]) / 10.);119L_high += pow(10., (Li_high + myAOctaveBandCorrection[i]) / 10.);120}121L_low = (10. * log10(L_low));122L_high = (10. * log10(L_high));123double v1 = (double)(10. * log10(pow(10., L_low / 10.) + pow(10., L_high / 10.)));124return v1;125}126127128/****************************************************************************/129130131