# Wavelet-Based Optimum Identification of Vehicle Axles Using Bridge Measurements
## 2 Shannon Entropy  
In science, entropy is usually related to the amount of disorder/order, with higher entropy indicating greater disorder [32]. Random events or unpredictability can be measured in term of entropy with greater entropy implying greater uncertainty [33]. In contrast, a system with lower entropy has an ordered state, providing more stable, reliable, and, depending on the context, perhaps more useful information [34; 35]. [PERSON] proposes a criterion to measure the amount of information in any distribution using the concept of Shannon entropy [34]. Assuming a discrete random variable with possible values [x\({}_{1}\)... x\({}_{n}\)] and a probability distribution function, \(P(X)\), such that \(\sum_{i=1}^{n}P(x_{i})=1\), the entropy can be explicitly defined as [34]:  
\[E_{ent}(X)=-\sum_{i=1}^{n}P(x_{i})log_{2}P(x_{i}) \tag{1}\]  
where \(log_{2}\)(.) signifies log to base two. In this expression, the entropy \(E_{ent}(X)\) is a function of the probabilities of the random variable, \(P(X=x)\), in a sample (\(X\)) and not the random variable itself (x) [36]. An example of \(X\) is the number of heads in four tosses of a fair coin. It is well known that \(X\) can be 0, 1, 2, 3 or 4, and their probabilities are 1/16, 4/16, 6/16, 4/16 and 1/16 respectively. Based on Equation (1), the Shannon entropy is calculated as \(E_{ent}(X)=2.03\). If one of the coins is tossed and lands on head and three others remain, the random event \(X\) is changed accordingly. \(X\) can still be 0, 1, 2, 3 or 4, but their probabilities are now 0, 1/8, 3/8, 3/8 and 1/8 respectively. In this case, the Shannon entropy is calculated as \(E_{ent}(X)=1.81\). It is less as the uncertainty has been reduced. When there is only one coin left to toss, the unpredictability is only related to that last coin, and the corresponding Shannon entropy is \(E_{ent}(X)=1\). Shannon entropy is an effective means of measuring the amount of uncertainty in random data or an event. Obviously, as fewer coins remain to be tossed, the uncertainty reduces and, so too does the Shannon entropy.  
In the context of this paper, Shannon entropy is used to detect contrast or difference rather than probability. In a normalized set of data, Equation (1) assigns high values to functions where some values are much greater than others and low values to functions where all values are similar. This is illustrated in Figure 1 which shows four functions of 16 values, for each of which the values sum to unity. The function of Figure 1a has a unit value at one point and zero at all other points, i.e., one sharp peak. In the context of axle detection, this is the ideal situation and a wavelet scale giving this function would be favored. It has greatest contrast and the minimum possible entropy value of zero. The function of Figure 1b has three values of 0.33. This reduces the contrast and increases the entropy to 1.59. Figure 1c,d are sine wave functions with different frequency. The contrast is the same in both cases and significantly less than the other functions. The entropy value for both cases is 3.68. This figure shows that greater contrast functions result in lower values of Shannon entropy, making it a good indicator of contrast. For optimum axle identification from a series of wavelet results, the desired result is great contrast between the 'axle part' and the rest. Therefore, Shannon entropy is used here to guide the selection of optimum-contrast scale in the wavelet transform.