Innovative non-invasive ultrasound method for whisky cask liquid level measurement ✩

Regular measurement and inspection of whisky casks are crucial for ensuring quality and effective inventory management. This process helps detect issues such as leaks, damage, and contamination that can harm the whisky’s condition. Additionally, monitoring the whisky level provides valuable insights into maturation progress, evaporation rates, and production planning to account for expected losses. Currently, the industry relies on dipsticks and pressure sensors to measure liquid levels in casks. Dipsticks require moving casks from high shelves, risking human safety, the utilisation of extensive resources and necessitating cask opening, which has inherent issues. Pressure sensors, installed inside casks, are sensitive to temperature, limiting their accuracy and suitability for warehouse testing. This paper presents a new non-invasive method using ultrasound to measure liquid levels in wooden casks. An external ultrasonic probe glides along the surface of the cask. By leveraging the distinct ultrasonic acoustic properties in the liquid and the air, the sensor can detect the upper boundary of the liquid, thereby indicating the whisky level. Since this new method only needs to access a small portion of the cask to measure the level, it enables distilleries to accurately monitor cask contents on-site, reducing the costs and risks associated with moving casks. The paper also includes quantitative data on ultrasonic properties such as moisture, velocity, and signal attenuation for various cask samples. The prototype system successfully demonstrated this approach on a retired Ex-Bourbon whisky cask, providing precise liquid level measurements on different surfaces and storage orientations without the need for cask opening. It achieved centimetre-level accuracy compared to dipstick reference readings.


Introduction
Wooden casks play an important role in the whisky industry.Whisky is stored and matured in these wooden casks over many years.The whisky's character is influenced by its interaction with the wooden cask during maturation.However, this traditional method can pose challenges, including leaks, damage, and contamination, all of which can adversely affect the whisky's quality and value.Moreover, the ageing process within the cask is associated with a gradual loss of liquid due to evaporation and absorption by the wood, necessitating careful monitoring and management to account for these expected losses.Therefore, regular measurement and inspection of whisky casks are critical, as they play a pivotal role in safeguarding the whisky's quality, monitoring maturation progress, and optimising production planning.
Dipsticks provide a simple and time-tested approach [1], measuring whisky levels within a cask using a dipstick involves inserting a clean dipstick through the bunghole, lowering it to the cask's bottom, and slowly withdrawing it to reveal the whisky level.The process of using dipsticks require physically moving casks from high shelves to a suitable work area where accessing and opening the bunghole is easier.The process not only poses safety risks for personnel but is also not as precise as more advanced measurement techniques like ultrasonic sensors or pressure transducers.The accuracy depends on the inspectors, who might inconsistently use dipsticks due to variations in how the dipstick is inserted, the angle at which it is inserted, and human error.Additionally, dipsticks are typically designed for top access, which can be problematic for vertically stored casks since the bung hole is typically located on the side of the cask.Measuring the weight change of the whisky cask is also a straightforward approach.However, weight measurements also require the cask to be moved down from high shelves, which is challenging and presents health and safety concerns for warehouse personnel.Besides, since the casks are typically stacked together, measuring the weight of a cask at the bottom https://doi.org/10.1016/j.measurement.2024.114345Received 17 January 2024; Accepted 16 February 2024 of the stack is also challenging.Alternatively, scales can be placed beneath each cask to monitor weight changes in a new and modernised warehouse.
Conversely, pressure sensors, strategically attached to the casks, offer a more advanced alternative.By measuring the pressure of the liquid or the air inside the casks, the level can be roughly estimated using the ideal gas law [2].Roussey et al. [3] utilised multiple pressure sensors and oxygen sensors to successfully collect liquid level, ullage pressure, and dissolved oxygen concentration inside the cask during the 6-month maturation period.Nonetheless, the pressure sensor also poses its own limitations, primarily related to temperature sensitivity [4], which can affect their accuracy and suitability for comprehensive warehouse-wide testing.The varying temperatures within a whisky warehouse can cause fluctuations in pressure readings, potentially leading to inaccurate level measurements.Additionally, implementing pressure sensors on whisky casks involves a range of substantial challenges.The cost factor is significant, as procuring, installing, and maintaining sensors across numerous casks would require a substantial financial investment [1].Moreover, retrofitting casks with sensors may affect the structural integrity of the casks and potentially influence the ageing process.
Other methods, such as capacitive sensing [5], time-domain reflectometry [6], optical techniques [7] and ultrasound distance measurements [8,9] are similar to the pressure sensors.These sensors rely on the principles of wave reflections at the boundary between the liquid and air or on the differences in properties between the liquid and air.It requires drilling holes and attaching the sensors inside casks for consistent and accurate measurements.Methods, such as capacitive sensing [10] also require direct contact to the liquid, introducing additional contamination risks as some sensors may contain materials that could potentially leach harmful substances into the liquid over time, affecting the quality and safety of the beverage.
Ultrasound techniques have been used in various industrial applications to determine internal contents from external places, including wooden structures [11,12], metallic assets [13][14][15][16] and nuclear assets [9].K.S. Ho et al. presented a method to inspect drink cans using electromagnetic acoustic transducers [17].Similar concept was presented on [18], using an electromagnetic acoustic transducer to measure liquid level in a container.However, due to the properties inherent to wood, generating electromagnetic waves on wooden surfaces poses a significant challenge.Wood is a poor conductor of electricity and does not readily support the induction of electromagnetic fields required for such wave generation.
The ultrasound sensors have shown significant promise in effectively measuring and inspecting the contents within containers solely from their external surfaces.This capability holds the potential to provide non-invasive and accurate measurements of the liquid contained within casks.Conversely, the acoustic properties of ultrasound in wooden materials differ from those in metals.Yang, H. et al. stated that the acoustic velocity and signal attenuation decreased with an increase in wood moisture [19].The velocity attenuation in the longitudinal direction of the wood test sample within their study dropped from 5100 m/s and 10 dB to 3300 m/s and 3.5 dB.Landis E. presented that the longitudinal direction had the smallest attenuation, with an attenuation of 30 dB/m in the longitudinal direction and 200 dB/m in the radial and tangential directions [20].Similarly, V. Bucur and F. Feeney found that the velocity significantly dropped in the radial and tangential directions.The excitation frequency with the smallest signal attenuation is around 250 kHz [21].Ultrasound waves tend to experience more attenuation when passing through wood, posing challenges when transmitting ultrasound through wooden materials.Additionally, the chemical gel used for ultrasound coupling might be absorbed by the wood, enter the whisky, and affect the quality and safety of the beverage.
In summary, traditional dipsticks and pressure sensors present challenges for measuring whisky cask liquid levels due to safety risks, disruption of ageing, invasive installation, and sensitivity to temperature and vibrations.Additionally, these methods lack precision and accuracy, which are crucial for effectively managing whisky inventory.Precision ensures consistent and repeatable measurements, reducing the risk of errors in inventory calculations.Accuracy is essential for precisely determining the whisky quantity in each cask, enabling the detection of even minor changes in levels, which can be vital for early detection of issues like leaks during ageing.The state-of-the-art measurement instruments described in the literature necessitate invasive procedures, such as opening the whisky cask and accessing the internal structure.Consequently, they are unsuitable for non-invasive liquid level measurement for a large number of whisky casks in warehouses.
The aim of this paper is to develop and validate a rapidlydeployable, non-invasive sensing method using ultrasound transducers to accurately measure liquid levels in wooden casks, with a primary focus on its application in the whisky industry.The sensing system is designed to provide more accurate and precise liquid level measurements than state-of-the-art methods, whether the whisky casks are stored horizontally or vertically within warehouses.This versatility ensures that the method can be seamlessly integrated into various whisky production and ageing processes.The significance of this new method is underscored by its potential to reduce costs and mitigate risks associated with moving casks while simultaneously providing invaluable insights into maturation progress, evaporation rates, and production planning.
To provide a comprehensive understanding of the ultrasound technology's challenges in the context of wooden pieces, this paper also includes quantitative data on ultrasonic properties such as moisture, velocity, and signal attenuation obtained from various cask samples.
The overview and principles of ultrasound in the context of whisky casks are discussed in Section 2. In Section 3, the ultrasonic properties of wood casks are characterised.Section 4 presents practical liquid level measurements on a retired Ex-Bourbon cask using the proposed methods.The conclusion and future works are discussed in Section 5.
The main contributions of this paper are: • Proposed a new, non-invasive method to measure liquid levels in wooden casks.• Quantitatively assessed ultrasonic properties in various cask samples, including moisture, velocity, and signal attenuation.
• Achieved centimetre-level accuracy independent of the cask storage orientation.

Principle of ultrasound in whisky casks
There are two primary orientations of whisky casks stored in warehouses: horizontal orientation or vertical orientation.Because these two orientations exhibit distinct characteristics in terms of ultrasound transmission and accessibility, the methods employed to measure the whisky levels within the casks differ slightly.
Horizontal orientation involves placing the casks on their sides, parallel to the ground.This arrangement allows for the casks to be easily rolled and manoeuvrer along racks, facilitating accessibility for various purposes.In this orientation, ultrasound measurements can be readily obtained from the ends of the casks, providing valuable data for analysis and quality control.
Pulse-echo and pitch-catch are two common methods used in ultrasonic testing for inspecting materials and structures.Pulse-echo employs a single transducer to both generate and receive ultrasonic pulses.The pulse is transmitted into the material, and the reflected signal is analysed to identify changes in the material.Pitch-catch involves two separate transducers: one for transmitting and the other for receiving.The transmitting transducer sends the ultrasonic wave into the material, and the receiving transducer detects the signal after it has travelled through the material.
When inspecting whisky casks in warehouses, pitch-catch can be problematic because it is not practical to place two transducers on  opposite sides due to the limited access.Additionally, whisky casks are often made of wood with curved surfaces and varying textures.These conditions can impact the coupling of the transducers with the surface, affecting the quality of the ultrasonic signal.Compared with the single transducer pulse-echo method, the complexity of ensuring good coupling with two transducers is also doubled.Therefore, the single-transducer pulse-echo method is utilised herein.
When measuring the casks in this storage orientation, an external ultrasonic probe travels along the cask's side, as illustrated in Fig. 1.As the ultrasonic probe moves through the whisky-filled portion of the cask, it emits ultrasound waves that travel through the liquid and reflect back to the probe.When the ultrasonic probe reaches the upper boundary of the whisky, sound transmission abruptly ceases, and there will be an absence of the echo from the opposite end of the cask, as shown in Fig. 2.This boundary can be captured and digitised by the electronics system, serving as a clear and accurate indicator of the whisky's level within the cask.
Since the ultrasound reflected signals may contain noises and echoes from other parts of the cask via different transmission paths, potentially leading to false level detection, the time when the echo from the opposite end of the cask arrives can be used to calculate the ultrasound wave travel distance using time-of-flight principle [22], as Eq.(1).
which represents the distance travelled () by an ultrasound wave to the product of the acoustic velocity () and the time consumption ().This calculated distance can be used as a cross-check reference to verify that the echo indeed originates from the opposite end of the cask.On the other hand, a vertical orientation entails positioning the casks upright, stacking on their ends.Unlike those horizontal stored casks, accessing casks in the vertical orientation is more difficult due to their height.
Ultrasound measurements in the vertical orientation can only be obtained from the sides of the casks.Similar to the measurement method used for horizontal stored cask, the probe is scanned on the side of the vertical stored cask surface, as shown in Fig. 3.When whisky is present in front of the probe, the sound will propagate into the whisky.When the probe reaches the top of the whisky, the sound will stop propagating.The transition point indicates the level of the whisky, as shown in Fig. 2.
However, the curved nature of the side staves of wooden casks, along with their typical roughness compared to the end staves, increases the attenuation when the ultrasonic waves pass through the wooden staves.Consequently, the boundary between the whisky and the air becomes blurry, which impacts the precision of level measurements.As a result, the electronics system requires adaptability, such as being able to set a higher signal amplifier gain, to compensate for the ultrasonic energy lost when propagating through the wood.
In addition, when measuring liquid levels in vertically stored casks using ultrasound, the curved shape of the casks can lead to challenges.The curvature affects the angle of incidence of the ultrasound waves, causing changes in their propagation paths and potentially reducing signal amplitudes.This issue is more pronounced in damaged casks, when the liquid level is near the cask ends.Additionally, the ultrasound beam diverges, widening the beam and potentially weakening the signals.However, despite these issues, the accuracy of the liquid level measurement is not compromised.The measurement depends on the visibility of the echo from the opposite end of the cask, not its amplitude.As long as the echo can be detected, its presence is sufficient for accurate measurement, regardless of changes in amplitude due to the cask's curved shape or beam divergence.
Furthermore, a notable challenge arises from a portion of the cask being concealed beneath thin metallic hoops.While these hoops serve an essential structural purpose, they introduce a complexity during the level measurement.The ultrasound wave encounters difficulties when trying to pass through the air gap that naturally exists between the hoops and the wooden cask.The gap functions as a barrier, preventing the transmission of ultrasound waves into the regions of the cask behind the hoops.Consequently, in these areas of the cask, the measurements become less reliable.Therefore, the emphasis in measuring vertical storage casks is placed on regions where the wood surface is directly accessible to the ultrasonic probe.
Charring is a key step in preparing casks for ageing whisky, where the cask's interior is exposed to high temperatures to create a carbon residue layer.This layer can absorb ultrasonic waves to a greater extent than clean surfaces, leading reduced amplitude in the reflected ultrasonic signal.Additionally, charring can create surface irregularities within the cask, disrupting the path of ultrasonic waves and further diminishing signal amplitude.However, the liquid level is measured based on the appearance of the echo from the other end of the cask instead of the amplitude, which ensures that the accuracy of the measurement is not compromised.

Quantitative characterisations of ultrasonic properties
Quantifying characterisations of the ultrasonic properties in oak is critical to understanding the challenges during the cask level measurement.Wood exhibits different levels of attenuation under various conditions and varying moisture levels.Unlike metals like aluminium, which have very low attenuation of ultrasound waves, wood's attenuation properties can be influenced by factors such as moisture levels, the presence of knots, and grain patterns.As a result, ultrasound waves tend to experience more attenuation when passing through wood, leading to challenges when applying ultrasound to wood materials.This experiment aimed to quantify the relationships between wood moisture content and velocity, wood moisture content and ultrasonic signal attenuation.

Experiment setup
Two end pieces, each with a thickness of 25 mm, have been carefully chosen from retired whisky casks sourced from the Scotch Whisky Research Institute [23] to function as test specimens in the experiments, as depicted in Fig. 4.This selection encompasses a varied range of cask specimens, with each one bestowing its unique character upon the whisky ageing process [24].One of the specimens is sourced from a French cask, the other one originates from an Ex-Bourbon cask.
The experiments were conducted using two immersion, singleelement, 200 kHz, 25 mm ultrasonic transducers [25] equipped with a WaveMaker-Duet ultrasonic transceiver.The signals were digitised by a Tektronix DPO4054B oscilloscope via the Ethernet VISA protocol [26].The ultrasound signals were recorded every minute using a customised script running on MATLAB.The transducers and wood samples were placed in a water filled immersion tank [27] using a 'pitch-catch' configuration, as depicted in Fig. 5. Utilising an immersion tank is a common approach ensured consistent coupling, in this case it also ensured the wood remained saturated throughout the duration of the experiments.With this approach, signal attenuation was calculated by dividing the peak amplitude of the reflected signal by the peak amplitude of the transmitted signal.
The samples were dried in an oven until their weights stabilised.Subsequently, the oven-dried samples were rehydrated in water, and the signal was measured hourly to quantify the relationship between attenuation and moisture levels.To reduce noise, signal-averaging was performed by the oscilloscope, with 256 averages.Echo signals were recorded hourly.

Results
Fig. 6 depict the attenuation (Fig. 6(a)) and velocity (Fig. 6(b)) in the French oak.During a 45-h experiment, the wood's weight increased from 151.1 g to 201.1 g.Attenuation decreased from 75 dB to 49 dB after 30 h of rehydration, while velocity decreased from 1130 m/s initially to 1010 m/s after 30 h, remaining stable thereafter.To estimate the attenuation of an in-service cask, the sample was dried and rehydrated over one week.One side of the oak was in contact with water, while the other side was exposed to air (with humidity at about 20%).After one week, the oak's weight was approximately 190 g.Assuming that the rehydration process is linear, the expected attenuation is around 50 dB, and the velocity is about 1010 m/s, marked as the red crosses in Fig. 6.Fig. 7 illustrate the attenuation (Fig. 7(a)) and velocity (Fig. 7(b)) in the Ex-Bourbon oak.Over the course of a 330-h experiment, the wood's weight increased from 188.2 g to 266.6 g.Attenuation decreased from 61 dB to 40 dB after 250 h of rehydration, while velocity decreased from 1178 m/s initially to 1064 m/s after 270 h, remaining stable thereafter.After the experiment, the sample was redried and rehydrated over one week to estimate the attenuation of an in-service cask.One side of the oak was in contact with water, while the other side was exposed to air, the measured weight is 213 g.The expected attenuation is around 42 dB, with a velocity of about 1100 m/s, as indicated in Fig. 7.
The velocities were observed to be lower than the velocities measured in the common longitudinal direction.This is because the ultrasound transducers were placed on two sides of the end piece, where the ultrasound transmission path is perpendicular to the wood's natural grains and the radial stiffness is increased, causing a reduction in speed [20,21].
An additional observation worth mentioning pertains to the small variations in the ultrasound signal attenuation and velocity observed towards the end of our experiment.These variations can be attributed  to minor temperature fluctuations within the laboratory environment.While such variations are an inherent part of experimental studies, it is crucial to note that their magnitude was significantly lower, over 30 times smaller, than the variations caused by changes in moisture content.Consequently, these temperature-induced variations are deemed too minimal to have a substantial impact on the results.
In summary, the anticipated attenuation and velocity values within the casks, estimated at around 45 dB and 1100 m/s, respectively, pose significant challenges when performing ultrasound measurements.These characteristics underscore the complexities involved in utilising ultrasonic techniques for assessing and monitoring the properties of wood within these specific cask environments.The high attenuation values can hinder signal transmission and demand precise instrumentation and methodologies to ensure accurate results.As illustrated in Figs. 6 and 7, a notable trend was observed with increasing moisture content within the wood: both the velocities and signal attenuations exhibited significant decreases.Herein, the reduction in velocities, while notable, does not adversely impact the results.This is because the velocity changes primarily affect the time-of-flights, which is a separate aspect from the presentation of the echoes that the measurement focuses on.More importantly, the decrease in signal attenuation is advantageous for the measurements, which results in echoes that are stronger and easier to identify, enhancing the reliability and clarity of the measurements.

Experiment setup
An Ex-Bourbon retired cask provided by SWRI was used for the practical experiments, as shown in Fig. 8.The liquid level inside the cask was adjusted by adding tap water and pumping it out.Using tap water instead of whisky is to simplify the procedure and reduce health and safety risks associated with flammable ethanol vapours.This substitution is viable because, from an acoustic perspective, water and whisky exhibit similar characteristics, there is variation due to the different alcohol content [28].However, for the purposes of this  experiment, the impact of this variation is negligible since the velocity is not utilised herein.Similar to the setup presented in Section 3, the experiments were conducted using an immersion, single-element, 200 kHz ultrasonic transducer equipped with a WaveMaker-Duet ultrasonic transceiver.The signals were recorded by a Tektronix DPO4054B oscilloscope.
A small amount of water was sprayed onto the wood surface during the experiment to fill and eliminate air gaps, creating better acoustic contact between the uneven wood surface and the ultrasound probe's front face.This ensures that the ultrasound waves can propagate through the wood more effectively, resulting in more accurate and reliable inspection results.The water also helps to moisturise the wood's front surface, reducing the attenuation of the ultrasound waves.Although tap water might not offer as good coupling as the chemical couplant gel, it is much safer for use within the food industry and much easier to acquire in the warehouse.
In order to address the substantial signal attenuation experienced within the wooden material, as discussed in Section 3, a 24-volt peakto-peak sine waveform is applied to the transducer.The system measurement results were compared to the dipstick readings, which are a traditional method commonly used in distilleries.It is worth noting that the readings from the dipstick also contain inaccuracies due to variations in how the dipstick is inserted, as mentioned in Section 1.To minimise these errors, measurements were conducted multiple times, and the average values were used as the measurement results.
The experiment was repeated with two orientations of whisky casks stored in a warehouse: horizontal orientation and vertical orientation.Horizontal orientation involves the casks being laid on their sides.When casks are stored horizontally, they can be rolled and moved along racks, and ultrasound measurements can be accessed from their ends.Vertical orientation entails the casks being positioned upright on their ends.When stored vertically, accessing casks stored on higher shelves is more challenging.Ultrasound measurements can only be accessed from their sides.

Horizontal storage
In this experiment, the whisky cask was placed in a horizontal orientation on a rack, mimicking real-world rack storages in whisky ageing warehouses, as Fig. 9.To maintain precision and consistency in the experiment, a tape with a precise scale was attached to the cask's surface, ensuring that the readings were accurate and comparable throughout the experiment.A line scan along the face of the cask was conducted, maintaining a consistent 1 cm spacing between each reading.To enhance the accuracy of the ultrasound readings, the signal was amplified by 60 dB within the ultrasound receiver.Additionally, to further reduce the noise level in the reflected signal, an averaging process was applied, taking into account 8 data points within the oscilloscope.
Fig. 10 displays the ultrasound signals (A-scan) recorded under three conditions: with the ultrasonic probe in front of the region where the whisky was present, at the boundary of the whisky level, and in front of the region without liquid.The figure demonstrates that changes in the whisky level can be clearly observed using the proposed method.The peak-to-peak amplitude of the echoes originating from the other side of the cask, when the transducer is positioned below the liquid level, measures at 75 mV.The echo from the opposite end of the cask arrived at 1.12 ms.Using Eq. ( 1), the travel distance is calculated as 168 cm, and thus the distance to the reflector is 84 cm, aligning with the cask specifications.It is important to note that the time-of-flight presented here is a rough estimation, intended to demonstrate that the echo originated from the other end of the cask, rather than to accurately measure cask depths as the measurement relies solely on the presence of an echo from the opposite side of the barrel not its time-of-flight.
The B-Scan result provides a comprehensive visualisation by aggregating A-scan data collected at different spatial locations.Along the vertical axis, this representation depicts positions along the cask's end surface, facilitating the observation of ultrasonic signal variations across the cask end.The horizontal axis on the plot reflects the time taken for ultrasound signals to traverse from the excitation pulse source to the point of reflection.To enhance the informativeness and precision of this visualisation, signal amplitude is depicted using a colour bar.
Fig. 11 displays the ultrasound B-Scan results obtained while moving the probe along the end of the cask.The liquid level, measured at 29 cm using a dipstick, is indicated and marked on the figure.The experiments were repeated multiple times, and the achieved standard deviation was 0.63 cm, with errors consistently below 1 cm.The acquired signals were post-processed by Hilbert transform [29] accompanied with a 100 kHz bandwidth bandpass filter [30] centred at 200 kHz.The post-processing improves the visibility of echoes and helps extract more accurate information by enhancing the signal-tonoise ratio.As shown in Fig. 11, the reflected signals also captured the echoes bouncing from the first reflection to the opposite side of the cask and then reflecting back to the probe.It is worth to note that, as presented in Fig. 11, some echoes were received when the transducer was moved above 29 cm, at the boundary of the liquid.However, the  signal amplitude of these echoes is more than 10 times weaker than the amplitude measured at the liquid level.Therefore, these signals will be ignored during the measurement, and will not impact the accuracy of the testing result.

Vertical storage
In this experiment, the whisky cask was rotated and positioned vertically to simulate real-world pallet storage conditions found in whisky warehouses, as Fig. 12.To establish a reference level and prevent any interference, water was pumped into the cask with the liquid level maintained several centimetres below the cask's bunghole.This approach allows for the estimation of the ground truth liquid level by considering the known distance between the liquid level and the bunghole.To assess the accuracy of the system's measurements, the result was compared against this reference level.Fig. 13 illustrates the ultrasound A-Scan results obtained while the probe is moved along the side of the cask.To enhance the signal's clarity and strength, a 60 dB amplification was applied within the ultrasound receiver.60 dB is the maximum achievable gain by the receiver.The peak-to-peak amplitude of the echoes originating from the other side of the cask, when the transducer is positioned below the liquid level, measures at 10 mV.This amplitude is significantly weaker, approximately 7 times lower, than the amplitude measured from the cask end.This distinction in signal strength is attributed to the curved nature of the side staves of wooden casks, as well as their characteristic roughness when compared to the end staves.This increased roughness and curvature contribute to greater signal attenuation when ultrasonic waves pass through the wooden staves, as previously discussed in Section 2. Using Eq. ( 1), the travel distance is calculated as 128 cm, and the distance to the reflector is 64 cm, which aligns the cask specifications.In this experimental setup, the vertical axis represents the height of the probe along the side of the cask, while the horizontal axis continues to represent the time it takes for ultrasound signals to travel from the excitation pulse source to the point of reflection.As depicted in Fig. 14, an important observation arises due to the presence of an air gap between the thin metallic hoops and the wooden casks.This gap creates a limitation for the system, rendering it unable to measure the level of the whisky in these specific regions.
Notably, despite the reflected signals being weaker compared to those from horizontally stored casks, the ultrasound-based method proved capable of accurately determining the liquid level within the cask.This is a significant advantage, especially in a warehouse setting where traditional measurement techniques are often impractical due to the vertical storage orientation of the casks.

Conclusion and future work
This paper introduces a novel non-invasive ultrasound technique for measuring liquid levels in wooden casks, particularly useful for determining whisky levels.An external ultrasonic probe scans the cask's surface, exploiting the differing ultrasonic properties of liquid and air to pinpoint the liquid's upper boundary.The method, tested successfully on a retired Ex-Bourbon whisky cask, demonstrated centimetre-level precision in detecting liquid levels in both horizontally and vertically stored casks.While focused on whisky casks, the technique has potential applications in other industries that utilise wooden casks for storage and maturation, such as the wine industry.
Additionally, the paper provides detailed quantitative data on the ultrasonic properties of various cask samples, including moisture content, velocity, and signal attenuation.Notably, in French and Ex-Bourbon oak, significant reductions in signal attenuation and velocity were observed.These variations are crucial for understanding the challenges faced in ultrasound measurements, given the diverse characteristics of different oak types.The paper's findings, supported by experimental results, offer valuable insights into the expected conditions and challenges within whisky warehouses.
Future work will focus on enhancing the convenience and versatility of on-site level detection.The method will be integrated into a portable electronic device featuring an integrated transceiver, coded waveform generator, digitisation capabilities, and a user-friendly interface.This comprehensive electronic device will also undergo rigorous testing and certifications to ensure its safe use in warehouse environments with potentially explosive atmospheres.Furthermore, the application of advanced ultrasound techniques, such as tone burst [31,32], holds potential for enhancing the signal-to-noise ratio, particularly in the context of scanning vertically stored casks, making a more distinct boundary between the air and liquid interfaces.In addition, implementing machine learning techniques [33]

Declaration of competing interest
The authors declared that there is no conflict of interest.

Fig. 1 .
Fig. 1.Concept of inspection along end of horizontal cask.

Fig. 2 .
Fig. 2. Expected ultrasound reflected signals.(a) Whisky not in front of the probe, only the echo from the wood front end.(b) Whisky in front of the probe, an additional echo from the opposite end of the cask.

Fig. 3 .
Fig. 3. Concept of inspection along side of vertical cask.

Fig. 6 .
Fig. 6.Signal attenuations (a) and velocities (b) in the French oak under different moistures.Red crosses stand for the expected attenuation and velocity in warehouses.

D
.Zhang et al.

Fig. 7 .
Fig. 7. Signal attenuations (a) and velocities (b) in the Ex-Bourbon oak under different moistures.Red crosses stand for the expected attenuation and velocity in warehouses.

Fig. 10 .
Fig. 10.Ultrasound A-Scan signals at various locations on the end of the cask.

Fig. 11 .
Fig. 11.Ultrasound B-Scan results from the end of the cask (Hilbert processed and bandpass filtered).Liquid level is around 29 cm.

D
.Zhang et al.

Fig. 13 .
Fig. 13.Ultrasound A-Scan signals at various locations on the side of the cask.

Fig. 14 .
Fig. 14.Ultrasound B-Scan results from the side of the cask (Hilbert processed and bandpass filtered).Liquid level is around 33 cm.

Fig. 14
Fig.14displays the ultrasound B-Scan results obtained while scanning the side of the cask with the probe.The liquid level, measured at 33 cm, is clearly indicated and marked on the figure.In this experimental setup, the vertical axis represents the height of the probe along the side of the cask, while the horizontal axis continues to represent the time it takes for ultrasound signals to travel from the excitation pulse source to the point of reflection.As depicted in Fig.14, an important observation arises due to the presence of an air gap between the thin metallic hoops and the wooden casks.This gap creates a limitation for the system, rendering it unable to measure the level of the whisky in these specific regions.Notably, despite the reflected signals being weaker compared to those from horizontally stored casks, the ultrasound-based method proved capable of accurately determining the liquid level within the cask.This is a significant advantage, especially in a warehouse setting where traditional measurement techniques are often impractical due to the vertical storage orientation of the casks.
could help to categorise signals into three classes: with liquid, on the liquid boundary, and without liquid.CRediT authorship contribution statement Dayi Zhang: Data curation, Formal analysis, Investigation, Methodology, Visualization, Writing -original draft, Writing -review & editing.William Jackson: Data curation, Formal analysis, Investigation, Methodology, Visualization, Writing -original draft, Writing -review & editing.Gordon Dobie: Conceptualization, Funding acquisition, Project administration, Supervision, Writing -review & editing.Charles Macleod: Conceptualization, Funding acquisition, Project administration, Supervision.Anthony Gachagan: Conceptualization, Funding acquisition, Project administration, Supervision.