Eclipse SUMO - Simulation of Urban MObility
HelpersHarmonoise.cpp
Go to the documentation of this file.
1 /****************************************************************************/
2 // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo
3 // Copyright (C) 2001-2019 German Aerospace Center (DLR) and others.
4 // This program and the accompanying materials
5 // are made available under the terms of the Eclipse Public License v2.0
6 // which accompanies this distribution, and is available at
7 // http://www.eclipse.org/legal/epl-v20.html
8 // SPDX-License-Identifier: EPL-2.0
9 /****************************************************************************/
16 // Noise data collector for edges/lanes
17 /****************************************************************************/
18 
19 
20 // ===========================================================================
21 // included modules
22 // ===========================================================================
23 #include <config.h>
24 
25 #include "PollutantsInterface.h"
26 #include "HelpersHarmonoise.h"
27 #include <limits>
28 #include <cmath>
29 
30 
31 // ===========================================================================
32 // static definitions
33 // ===========================================================================
34 // ---------------------------------------------------------------------------
35 // vehicle class noise emission coefficients
36 // ---------------------------------------------------------------------------
37 // rolling component, light vehicles, alpha
38 double
39 HelpersHarmonoise::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 };
40 
41 // rolling component, light vehicles, beta
42 double
43 HelpersHarmonoise::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 };
44 
45 
46 // rolling component, heavy vehicles, alpha
47 double
48 HelpersHarmonoise::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 };
49 
50 // rolling component, heavy vehicles, beta
51 double
52 HelpersHarmonoise::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 };
53 
54 
55 
56 // traction component, light vehicles, alpha
57 double
58 HelpersHarmonoise::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 };
59 
60 // traction component, light vehicles, beta
61 double
62 HelpersHarmonoise::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 };
63 
64 
65 // traction component, heavy vehicles, alpha
66 double
67 HelpersHarmonoise::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 };
68 
69 // traction component, heavy vehicles, beta
70 double
71 HelpersHarmonoise::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 };
72 
73 
74 // ---------------------------------------------------------------------------
75 // A-weighted correction for octave bands
76 // ---------------------------------------------------------------------------
77 double
78 HelpersHarmonoise::myAOctaveBandCorrection[27] = { -44.7, -39.4, -34.6, -30.2, -26.2, -22.5, -19.1, -16.1, -13.4,
79  -10.9, -8.6, -6.6, -4.8, -3.2, -1.9, -0.8, 0.0, +0.6,
80  +1.0, +1.2, +1.3, +1.2, +1.0, +0.5, -0.1, -1.1, -2.5
81  };
82 
83 
84 
85 double
86 mySurfaceCorrection[27] = { 0.7, 0.2, 3.6, -1.0, -1.8, -0.1, -0.9, -0.7, -1.1, -0.5, -1.5,
87  -2.4, -3.0, -4.6, -5.8, -6.5, -7.9, -7.8, -7.2, -6.3, -5.6,
88  -5.5, -4.8, -4.3
89  };
90 
91 
92 // ===========================================================================
93 // method definitions
94 // ===========================================================================
95 double
97  double* alphaT, *betaT, *alphaR, *betaR;
98  double ac = 0;
100  alphaT = myT_A_C3_Parameter;
101  betaT = myT_B_C3_Parameter;
102  alphaR = myR_A_C3_Parameter;
103  betaR = myR_B_C3_Parameter;
104  ac = 5.6;
105  } else if (!PollutantsInterface::isSilent(c)) {
106  alphaT = myT_A_C1_Parameter;
107  betaT = myT_B_C1_Parameter;
108  alphaR = myR_A_C1_Parameter;
109  betaR = myR_B_C1_Parameter;
110  ac = 4.4;
111  } else {
112  return 0;
113  }
114  //
115  double L_low = 0;
116  double L_high = 0;
117  v = v * 3.6;
118  double s = -30.;//
119  for (int i = 0; i < 27; ++i) {
120  double crc_low = alphaR[i] + betaR[i] * log10(v / 70.) + 10.*log10(.8); // + mySurfaceCorrection[i];
121  double ctc_low = alphaT[i] + betaT[i] * ((v - 70.) / 70.) + a * ac + 10.*log10(.2);
122  double Li_low = 10. * log10(pow(10., (crc_low / 10.)) + pow(10., (ctc_low / 10.)));
123  Li_low += s;
124  double crc_high = alphaR[i] + betaR[i] * log10(v / 70.) + 10.*log10(.2); // + mySurfaceCorrection[i];
125  double ctc_high = alphaT[i] + betaT[i] * ((v - 70.) / 70.) + a * ac + 10.*log10(.8);
126  double Li_high = 10. * log10(pow(10., (crc_high / 10.)) + pow(10., (ctc_high / 10.)));
127  Li_high += s;
128  L_low += pow(10., (Li_low + myAOctaveBandCorrection[i]) / 10.);
129  L_high += pow(10., (Li_high + myAOctaveBandCorrection[i]) / 10.);
130  }
131  L_low = (10. * log10(L_low));
132  L_high = (10. * log10(L_high));
133  double v1 = (double)(10. * log10(pow(10., L_low / 10.) + pow(10., L_high / 10.)));
134  return v1;
135 }
136 
137 
138 
139 
140 /****************************************************************************/
141 
PollutantsInterface::isSilent
static bool isSilent(const SUMOEmissionClass c)
Checks whether the emission class describes an electric or similar silent vehicle.
Definition: PollutantsInterface.cpp:111
PollutantsInterface::isHeavy
static bool isHeavy(const SUMOEmissionClass c)
Checks whether the emission class describes a bus, truck or similar vehicle.
Definition: PollutantsInterface.cpp:105
SUMOEmissionClass
int SUMOEmissionClass
Definition: SUMOVehicleClass.h:231
HelpersHarmonoise::myR_B_C3_Parameter
static double myR_B_C3_Parameter[27]
rolling component, heavy vehicles, beta
Definition: HelpersHarmonoise.h:79
HelpersHarmonoise::myR_A_C3_Parameter
static double myR_A_C3_Parameter[27]
rolling component, heavy vehicles, alpha
Definition: HelpersHarmonoise.h:76
HelpersHarmonoise.h
HelpersHarmonoise::computeNoise
static double computeNoise(SUMOEmissionClass c, double v, double a)
Returns the noise produced by the a vehicle of the given type at the given speed.
Definition: HelpersHarmonoise.cpp:96
HelpersHarmonoise::myAOctaveBandCorrection
static double myAOctaveBandCorrection[27]
A-weighted correction for octave bands.
Definition: HelpersHarmonoise.h:96
PollutantsInterface.h
HelpersHarmonoise::myT_B_C1_Parameter
static double myT_B_C1_Parameter[27]
traction component, light vehicles, beta
Definition: HelpersHarmonoise.h:85
mySurfaceCorrection
double mySurfaceCorrection[27]
Definition: HelpersHarmonoise.cpp:86
HelpersHarmonoise::myT_A_C3_Parameter
static double myT_A_C3_Parameter[27]
traction component, heavy vehicles, alpha
Definition: HelpersHarmonoise.h:88
HelpersHarmonoise::myT_B_C3_Parameter
static double myT_B_C3_Parameter[27]
traction component, heavy vehicles, beta
Definition: HelpersHarmonoise.h:91
HelpersHarmonoise::myR_A_C1_Parameter
static double myR_A_C1_Parameter[27]
rolling component, light vehicles, alpha
Definition: HelpersHarmonoise.h:70
HelpersHarmonoise::myR_B_C1_Parameter
static double myR_B_C1_Parameter[27]
rolling component, light vehicles, beta
Definition: HelpersHarmonoise.h:73
config.h
HelpersHarmonoise::myT_A_C1_Parameter
static double myT_A_C1_Parameter[27]
traction component, light vehicles, alpha
Definition: HelpersHarmonoise.h:82