A method for predicting the sound field distribution of an electromagnetic ultrasonic transducer and an electronic device
Through the deep learning method based on the Transformer model, the sound field distribution of electromagnetic ultrasonic transducers is predicted, which solves the problem of inaccurate prediction of sound field distribution in the prior art, and improves the application efficiency of non-destructive detection.
Patent Information
- Application Number
- CN202411761706.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-03
- Publication Date
- 2025-06-06
- Estimated Expiration
- 2044-12-03
AI Technical Summary
The prior art is difficult to accurately predict the sound field distribution of electromagnetic ultrasonic transducers, which affects its application efficiency in the field of non-destructive testing.
Using a deep learning method based on the Transformer model, the sound field distribution diagram of the ultrasonic waves generated on the surface of the test object is predicted by obtaining the geometric structure diagram of the electromagnetic ultrasonic transducer.
It realizes high-precision, fast and highly adaptable sound field distribution prediction, and improves the application effect of electromagnetic ultrasonic transducers in the field of non-destructive testing.
Smart Images

Figure CN119249912B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of electromagnetic ultrasonic transducers, and in particular to a method for predicting the sound field distribution of an electromagnetic ultrasonic transducer and an electronic device. Background Art
[0002] Electromagnetic Acoustic Transducer (EMAT) is an advanced non-contact ultrasonic transducer. Its working principle relies on the interaction between the bias magnetic field generated by an external permanent magnet and the high-frequency alternating current introduced through the energized coil. This interaction causes the particles on the surface of the material to be tested to produce high-frequency vibrations, thereby achieving effective excitation and reception of ultrasonic waves.
[0003] The acoustic field distribution characteristics of electromagnetic ultrasonic transducers are an important aspect in their design and application. Understanding these characteristics helps to optimize the design of EMAT and improve the application efficiency of electromagnetic ultrasonic transducers in the field of non-destructive testing. Therefore, it is very meaningful to study a new method for predicting the acoustic field distribution of electromagnetic ultrasonic transducers. Summary of the invention
[0004] Multiple aspects of the present application provide a method for predicting the sound field distribution of an electromagnetic ultrasonic transducer and an electronic device, which are used to provide an accurate and efficient method for predicting the sound field distribution of an electromagnetic ultrasonic transducer.
[0005] An embodiment of the present application provides a method for predicting the sound field distribution of an electromagnetic ultrasonic transducer, the method comprising: obtaining a geometric structure diagram of a target electromagnetic ultrasonic transducer, wherein the target electromagnetic ultrasonic transducer includes a target test object; inputting the geometric structure diagram of the target electromagnetic ultrasonic transducer into a trained sound field distribution prediction model based on a Transformer model to predict the sound field distribution diagram of the ultrasonic wave generated on the surface of the target test object.
[0006] An embodiment of the present application also provides an electronic device, comprising: a memory and a processor; the memory is used to store a computer program; the processor is coupled to the memory, and is used to execute the computer program to perform the steps in the sound field distribution prediction method of the electromagnetic ultrasonic transducer.
[0007] In the embodiment of the present application, a sound field distribution prediction model based on a Transformer model is pre-trained, and the sound field distribution prediction model can be used to predict the sound field distribution map of the ultrasonic wave generated on the surface of the test object in the electromagnetic ultrasonic transducer based on the geometric structure diagram of the electromagnetic ultrasonic transducer. Thus, a deep learning method based on a Transformer model is used to predict the sound field distribution map of the electromagnetic ultrasonic transducer, achieving high-precision, fast, and adaptable sound field distribution prediction, and improving the application effect of the electromagnetic ultrasonic transducer in the field of non-destructive testing. BRIEF DESCRIPTION OF THE DRAWINGS
[0008] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0009] Figure 1 A flowchart of a method for predicting the sound field distribution of an electromagnetic ultrasonic transducer provided in an embodiment of the present application;
[0010] Figure 2 A schematic diagram of the structure of a sound field distribution prediction model provided in an embodiment of the present application;
[0011] Figure 3 is a finite element model of an exemplary electromagnetic ultrasonic transducer;
[0012] Figure 4 is a geometric structure diagram of an exemplary electromagnetic ultrasonic transducer;
[0013] Figure 5 is an exemplary sound field distribution diagram;
[0014] Figure 6 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0015] In order to make the purpose, technical solution and advantages of the present application clearer, the technical solution of the present application will be clearly and completely described below in combination with the specific embodiments of the present application and the corresponding drawings. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present application.
[0016] The technical solutions provided by various embodiments of the present application are described in detail below in conjunction with the accompanying drawings.
[0017] Figure 1 A flowchart of a method for predicting the acoustic field distribution of an electromagnetic ultrasonic transducer provided in an embodiment of the present application. Figure 1, the method may include the following steps:
[0018] 101. Obtain a geometric structure diagram of a target electromagnetic ultrasonic transducer, where the target electromagnetic ultrasonic transducer includes a target test object.
[0019] 102. The geometric structure diagram of the target electromagnetic ultrasonic transducer is input into the trained sound field distribution prediction model based on the Transformer model to predict the sound field distribution diagram of the ultrasonic wave generated on the surface of the target test object.
[0020] Specifically, the target electromagnetic ultrasonic transducer can be any type of electromagnetic ultrasonic transducer, without limitation. The geometric structure diagram of the target electromagnetic ultrasonic transducer describes the physical layout of the target electromagnetic ultrasonic transducer and the relative positions of the various components. The geometric structure diagram includes, but is not limited to, a mechanical structure diagram constructed based on computer-aided design (CAD) software. The geometric structure parameters of the target electromagnetic ultrasonic transducer can be obtained from the geometric structure diagram of the target electromagnetic ultrasonic transducer. The geometric structure parameters include, but are not limited to, the shape of the coil (circular, rectangular, spiral, etc.), the size of the coil (diameter, length, etc.), the shape of the permanent magnet (cylindrical, cubic, etc.), the size of the permanent magnet (height, width, depth), the magnetization direction and magnetic induction intensity, the relative position and relative distance between the coil and the permanent magnet, the relative position and relative distance between the coil and the test object, or the relative position and relative distance between the permanent magnet and the test object. Among them, the relative distance between the permanent magnet and the test object can also be referred to as the lift-off distance.
[0021] In this embodiment, the trained Transformer-based sound field distribution prediction model can predict the sound field distribution diagram of the ultrasonic wave generated on the surface of the target test object based on the geometric structure diagram of the target electromagnetic ultrasonic transducer. The target test object includes, but is not limited to, aluminum plate, galvanized layer, nickel-plated layer, structural steel plate, stainless steel plate or carbon steel plate.
[0022] Among them, the sound field distribution diagram of ultrasound describes the spatial distribution of parameters such as sound pressure or sound intensity during the propagation of ultrasound. In practical applications, the sound field distribution diagram that describes the spatial distribution of sound pressure can be called a sound pressure distribution diagram, which shows the change of sound pressure of ultrasound in space. The sound field distribution diagram that describes the spatial distribution of sound intensity can be called a sound intensity distribution diagram, which shows the change of sound intensity of ultrasound in space.
[0023] In practical applications, there is no restriction on the model structure of the sound field distribution prediction model based on the Transformer model. Further, in order to improve the model performance of the sound field distribution prediction model, see Figure 2, the sound field distribution prediction model based on the Transformer model may include: an encoder, a Transformer model, a fusion module and a decoder; accordingly, the geometric structure diagram of the target electromagnetic ultrasonic transducer is input into the trained sound field distribution prediction model based on the Transformer model to predict the sound field distribution diagram of the ultrasonic wave generated on the surface of the target test object. The implementation method is as follows: the geometric structure diagram of the target electromagnetic ultrasonic transducer is input into the encoder for encoding processing to obtain a first feature map; the first feature map is input into the Transformer model to obtain a second feature map output by the Transformer model; the first feature map and the second feature map are input into the fusion module to obtain a third feature map output by the fusion module; the third feature map is input into the decoder for decoding processing to obtain the sound field distribution diagram of the ultrasonic wave generated on the surface of the target test object.
[0024] Specifically, the encoder performs dimensionality reduction processing on the input geometric structure graph, extracts the main features of the geometric structure graph, and forms the first feature graph. The Transformer model is a deep learning model based on the self-attention mechanism, which can capture the long-distance dependencies in the first feature graph and generate a richer second feature graph. The fusion module fuses the first feature graph and the second feature graph from two different sources to obtain a more comprehensive feature representation (i.e., the third feature graph). Feature fusion includes, but is not limited to, additive fusion, multiplicative fusion, or feature fusion based on the attention mechanism. Among them, feature fusion based on the attention mechanism is an advanced feature combination technology that allows the model to pay more attention to certain specific parts of information during the fusion process, thereby improving the model's sensitivity to important information and reducing noise interference. Feature fusion based on the attention mechanism includes, but is not limited to, feature fusion based on channel attention and feature fusion based on spatial attention. By decoding the third feature graph through the decoder, the sound field distribution map of the ultrasonic wave generated on the surface of the target test object can be obtained.
[0025] Further optionally, in order to improve the model performance of the sound field distribution prediction model, the first feature map and the second feature map are input into a fusion module to obtain a third feature map output by the fusion module. The implementation method includes: inputting the first feature map and the second feature map into the fusion module, so that the fusion module performs the following operations: performing pooling operations of different scales on the first feature map and the second feature map, respectively, to generate sub-feature maps of multiple scales corresponding to the first feature map and sub-feature maps of multiple scales corresponding to the second feature map; for each scale, performing additive fusion on the sub-feature map of the scale corresponding to the first feature map and the sub-feature map of the scale corresponding to the second feature map to obtain an additive fusion result of the scale; performing feature fusion based on the attention mechanism on the additive fusion results of multiple scales to obtain a third feature map.
[0026] Optionally, multiple scales are set as needed, for example, 3 scales, 4 scales, 5 scales, etc.
[0027] Specifically, pooling operations of different scales are performed on the first feature map to generate sub-feature maps of different scales corresponding to the first feature map. Pooling operations include, but are not limited to, maximum pooling operations or average pooling operations. Pooling operations of different scales are performed on the second feature map to generate sub-feature maps of different scales corresponding to the second feature map. Through multi-scale pooling operations, the model can capture information of different scales, thereby better understanding the multi-level features of the model's input data (i.e., the geometric structure map).
[0028] For each identical scale, the sub-feature map of the scale corresponding to the first feature map and the sub-feature map of the scale corresponding to the second feature map are additively fused to obtain the additive fusion result of the scale. The additive fusion operation is simple and effective, and can directly combine feature maps from different sources, retaining their respective advantages.
[0029] The addition fusion results of multiple scales are subjected to feature fusion based on the attention mechanism to obtain the third feature map. The attention mechanism can dynamically adjust the weights of different feature maps, so that the model pays more attention to important feature information, reduces noise interference, improves the model's sensitivity to key features, and enhances the accuracy and robustness of feature representation.
[0030] In this embodiment, the performance of the sound field distribution prediction model can be significantly improved through multi-scale pooling, additive fusion, and feature fusion based on the attention mechanism. These technologies not only enhance the model's ability to capture multi-scale features, but also improve the accuracy and robustness of feature representation by dynamically adjusting feature weights.
[0031] The technical solution provided in the embodiment of the present application pre-trains a sound field distribution prediction model based on a Transformer model, and the sound field distribution prediction model can be used to predict the sound field distribution map of the ultrasonic wave generated on the surface of the test object in the electromagnetic ultrasonic transducer based on the geometric structure diagram of the electromagnetic ultrasonic transducer. Thus, a deep learning method based on the Transformer model is used to predict the sound field distribution map of the electromagnetic ultrasonic transducer, achieving high-precision, fast, and highly adaptable sound field distribution prediction, and improving the application effect of the electromagnetic ultrasonic transducer in the field of non-destructive testing.
[0032] In practical applications, there is no restriction on the training method of the sound field distribution prediction model. Further optionally, in order to improve the model performance of the sound field distribution prediction model, the training method of the sound field distribution prediction model is: based on the geometric model of the sample electromagnetic ultrasonic transducer, a finite element model corresponding to the sample electromagnetic ultrasonic transducer is constructed; the geometric model of the sample electromagnetic ultrasonic transducer includes: geometric models corresponding to the permanent magnet, the coil, the test piece or the air field; finite element analysis is performed based on the finite element model under different geometric structure parameters of the sample electromagnetic ultrasonic transducer to obtain a reference sound field distribution diagram of the ultrasonic wave generated on the surface of the test piece under different geometric structure parameters; wherein the geometric structure parameters include at least: the length of the permanent magnet, the thickness of the permanent magnet and the lift-off distance between the permanent magnet and the test piece; the geometric structure diagram corresponding to different geometric structure parameters and the reference sound field distribution diagram are used as training data sets, and the initial sound field distribution prediction model based on the Transformer model is trained according to the training data set to obtain a sound field distribution prediction model.
[0033] Specifically, the sample electromagnetic ultrasonic transducer can be understood as the electromagnetic ultrasonic transducer used in the model training stage. The geometric model of the sample electromagnetic ultrasonic transducer includes, but is not limited to, a 3D (three-dimensional) model constructed based on CAD software. The test piece includes, but is not limited to, aluminum plates, galvanized layers, nickel-plated layers, structural steel plates, stainless steel plates or carbon steel plates. The air field refers to the space between the permanent magnet, the coil and the test piece. In practical applications, the geometric models corresponding to the permanent magnet, the coil, the test piece or the air field can be imported into the finite element analysis software to construct the finite element model corresponding to the sample electromagnetic ultrasonic transducer. See Figure 3 , the finite element model includes, for example, the geometric model of the aluminum plate (i.e., the test piece) ( Figure 3 gray part), the geometric model of the permanent magnet (given by Figure 3 The red part represents the S pole and the blue part represents the N pole), air field ( Figure 3 In addition, the permanent magnet is also provided with a coil ( Figure 3 The S pole is the South Pole and the N pole is the North Pole.
[0034] In practical applications, finite element analysis is performed based on a finite element model under different geometric structure parameters of the sample electromagnetic ultrasonic transducer to obtain a reference sound field distribution diagram of the ultrasonic wave generated on the surface of the test piece under different geometric structure parameters. Specifically, simulation based on finite element analysis can obtain a more realistic sound field distribution diagram of the ultrasonic wave. Here, the sound field distribution diagram obtained by finite element analysis is referred to as a reference sound field distribution diagram. By changing the geometric structure parameters of the sample electromagnetic ultrasonic transducer, the process of the ultrasonic wave generated by the electromagnetic ultrasonic transducer of different geometric structures on the surface of the test piece can be simulated. Among them, the geometric structure parameters include, for example, but are not limited to: the length of the permanent magnet, the thickness of the permanent magnet, and the lift-off distance between the permanent magnet and the test piece. The geometric structure diagram corresponding to different geometric structure parameters and the reference sound field distribution diagram are used as training data sets, and the training data sets are used for model training to obtain a sound field distribution prediction model. It can be understood that a diverse and more realistic training data set can be obtained through finite element analysis, thereby improving the generalization performance and prediction accuracy of the sound field distribution prediction model.
[0035] For example, participating in Figure 4 The geometric structure diagram of the electromagnetic ultrasonic transducer shown in the figure has the following geometric structure parameters: the length C of the aluminum plate is 20 mm (millimeter), the thickness D of the aluminum plate is 10 mm, the radius R of the coil is 0.15 mm, the length B of the permanent magnet is 12 mm, the length E of the air field is 20 mm, the thickness F of the air domain is 8 mm, and the shear wave velocity is 3169 m / s (meters / second). When changing the geometric structure parameters of the electromagnetic ultrasonic transducer, the length of the permanent magnet, the thickness of the permanent magnet, the lift-off distance, etc. can be changed. For example, the value range of the permanent magnet length is 12~13.6 mm, and the permanent magnet length is changed according to the step length of 0.2 mm; the value range of the permanent magnet thickness is 4~4.9 mm, and the permanent magnet thickness is changed according to the step length of 0.1 mm; the value range of the lift-off distance is 0.1~0.2, and the lift-off distance is changed according to the step length of 0.02 mm.
[0036] Figure 5 The sound field distribution diagram shown illustrates the sound field distribution, where different colors correspond to different sound pressure levels; red and yellow represent higher sound pressure values, green is roughly in the middle range, indicating a sound pressure value close to zero; blue and cyan represent lower sound pressure values.
[0037] Optionally, the initial sound field distribution prediction model based on the Transformer model is trained according to the training data set to obtain the sound field distribution prediction model in the following manner: Step 11, in each round of model training, for any training data in the training data set, the geometric structure diagram in the training data is input into the initial sound field distribution prediction model to obtain the predicted sound field distribution diagram output by the initial sound field distribution prediction model; Step 12, according to the predicted sound field distribution diagram corresponding to each training data of this round of model training and the reference sound field distribution diagram, determine the loss function corresponding to this round of model training; Step 13, according to the loss function corresponding to this round of model training, adjust the model parameters of the initial sound field distribution prediction model to obtain the trained sound field distribution prediction model; Repeat steps 11, 12 and 13 until the trained sound field distribution prediction model converges.
[0038] Specifically, the model training is iteratively performed using the training data set until a converged sound field distribution prediction model is obtained. In practical applications, for each round of model training, the mean square error corresponding to this round of model training can be calculated based on the predicted sound field distribution map and the reference sound field distribution map corresponding to each training data corresponding to this round of model training, and the mean square error corresponding to this round of model training is used as the loss function corresponding to this round of model training. The mean absolute percentage error corresponding to this round of model training can also be calculated based on the predicted sound field distribution map and the reference sound field distribution map corresponding to each training data corresponding to this round of model training, and the mean absolute percentage error corresponding to this round of model training is used as the loss function corresponding to this round of model training.
[0039] Further optionally, in order to improve the model performance of the sound field distribution prediction model, according to the predicted sound field distribution map and the reference sound field distribution map corresponding to each training data of this round of model training, the implementation method of determining the loss function corresponding to this round of model training can include: calculating the mean square error corresponding to this round of model training according to the predicted sound field distribution map and the reference sound field distribution map corresponding to each training data corresponding to this round of model training; calculating the average absolute percentage error corresponding to this round of model training according to the predicted sound field distribution map and the reference sound field distribution map corresponding to each training data corresponding to this round of model training; calculating the Pearson correlation coefficient corresponding to this round of model training according to the predicted sound field distribution map and the reference sound field distribution map corresponding to each training data corresponding to this round of model training; determining the loss function corresponding to this round of model training according to the mean square error, the average absolute percentage error and the Pearson correlation coefficient corresponding to this round of model training. Assuming that the mean square error is recorded as MSE, the average absolute percentage error is recorded as MAPE, and the Pearson correlation coefficient is recorded as PCC, the MSE, MAPE and PCC are calculated according to the following formulas.
[0040] ;
[0041] ;
[0042] ;
[0043] Where, X i and Y i represent the acoustic parameters (e.g., sound pressure) in the predicted sound field distribution map of the i-th training data in this round of model training and the acoustic parameters in the reference sound field distribution map, respectively, while X 0 and Y 0 are the average values of the acoustic parameters in the predicted sound field distribution map and the reference sound field distribution map, respectively. N is the total number of samples in this round of model training (that is, the number of training data). Among them, i is a positive integer, X 0 is the average value of the acoustic parameters in the predicted sound field distribution map of N training data, Y 0 is the average value of the acoustic parameters in the reference sound field distribution map of N training data.
[0044] Optionally, when adjusting the model parameters of the initial sound field distribution prediction model according to the loss function corresponding to this round of model training, the model parameters of the initial sound field distribution prediction model are adjusted so as to minimize the mean square error and mean absolute percentage error corresponding to this round of model training and to make the Pearson correlation coefficient corresponding to this round of model training close to 1.
[0045] Further optionally, the model parameters of the initial sound field distribution prediction model are adjusted to minimize the mean square error and mean absolute percentage error corresponding to the current round of model training, and to make the Pearson correlation coefficient corresponding to the current round of model training close to 1 as the goal: if the mean square error corresponding to the current round of model training is less than the first threshold, and the mean absolute percentage error corresponding to the current round of model training is less than the second threshold, then the model parameters of the initial sound field distribution prediction model are adjusted to make the Pearson correlation coefficient corresponding to the current round of model training close to 1 as the goal. The first threshold and the second threshold are flexibly set as needed.
[0046] Further optionally, in order to combine the model training efficiency and model accuracy, the above method also includes: if the mean square error corresponding to the current round of model training is less than the first threshold, and the mean absolute percentage error corresponding to multiple consecutive rounds of model training is greater than the second threshold, the Pearson correlation coefficient corresponding to the current round of model training is less than the third threshold, and the multiple consecutive rounds of model training include the current round of model training and at least one round of model training before the current round of model training, then the change trend information of the Pearson correlation coefficient is determined according to the Pearson correlation coefficient of the multiple consecutive rounds of model training; if the change trend information of the Pearson correlation coefficient reflects that the Pearson correlation coefficient is getting closer and closer to 1 as the rounds increase, then the model parameters of the initial sound field distribution prediction model are adjusted with the goal of making the Pearson correlation coefficient corresponding to the current round of model training close to 1. Among them, multiple consecutive rounds are flexibly set as needed, for example, 10 consecutive rounds, etc.
[0047] Optionally, if the changing trend information of the Pearson correlation coefficient reflects that the Pearson correlation coefficient becomes irregular as the number of rounds increases, that is, it is not getting closer to 1, the mean square error corresponding to this round of model training can still be made smaller than the first threshold, and the mean absolute percentage error corresponding to this round of model training can still be made smaller than the second threshold, so that the Pearson correlation coefficient corresponding to this round of model training is close to 1, and the model parameters of the initial sound field distribution prediction model are adjusted.
[0048] Figure 6 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. Figure 6 As shown, the electronic device includes: a memory 61 and a processor 62.
[0049] The memory 61 is used to store computer programs and can be configured to store various other data to support operations on the computing platform. Examples of such data include instructions for any application program or method operating on the computing platform.
[0050] The memory 61 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.
[0051] The processor 62 is coupled to the memory 61 and is used to execute the computer program in the memory 61 to execute the steps in the method for predicting the sound field distribution of the electromagnetic ultrasonic transducer.
[0052] Further optional, such as Figure 6As shown, the electronic device also includes: a communication component 63, a display 64, a power component 65, an audio component 66 and other components. Figure 6 Only some components are shown schematically, which does not mean that the electronic device only includes Figure 6 Components shown.
[0053] Accordingly, an embodiment of the present application further provides a computer-readable storage medium storing a computer program, which, when executed, can implement each step that can be executed by an electronic device in the above method embodiment.
[0054] Above Figure 6 The communication component in the communication component is configured to facilitate wired or wireless communication between the device where the communication component is located and other devices. The device where the communication component is located can access a wireless network based on a communication standard, such as WiFi, 2G, 3G, 6G / LTE, 6G and other mobile communication networks, or a combination thereof. In an exemplary embodiment, the communication component receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.
[0055] Above Figure 6 The display in the embodiment includes a screen, which may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from a user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundary of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation.
[0056] Above Figure 6 The power supply component in the device provides power to various components of the device where the power supply component is located. The power supply component may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the device where the power supply component is located.
[0057] Above Figure 6 The audio component in can be configured to output and / or input audio signals. For example, the audio component includes a microphone (MIC), and when the device where the audio component is located is in an operating mode, such as a call mode, a recording mode, and a speech recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in a memory or sent via a communication component. In some embodiments, the audio component also includes a speaker for outputting an audio signal.
[0058] The above is only an embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.
Claims
1. A method for predicting the sound field distribution of an electromagnetic ultrasonic transducer, characterized in that: include: Acquire a geometric structure diagram of a target electromagnetic ultrasonic transducer, wherein the target electromagnetic ultrasonic transducer includes a target test object; Inputting the geometric structure diagram of the target electromagnetic ultrasonic transducer into a trained sound field distribution prediction model based on a Transformer model to predict the sound field distribution diagram of the ultrasonic wave generated on the surface of the target test object; The training method of the sound field distribution prediction model is as follows: Constructing a finite element model corresponding to the sample electromagnetic ultrasonic transducer based on the geometric model of the sample electromagnetic ultrasonic transducer; the geometric model of the sample electromagnetic ultrasonic transducer includes: geometric models corresponding to the permanent magnet, the coil, the test piece or the air field; Finite element analysis is performed based on the finite element model under different geometric structure parameters of the sample electromagnetic ultrasonic transducer to obtain a reference sound field distribution diagram of the ultrasonic wave generated on the surface of the test piece under different geometric structure parameters; wherein the geometric structure parameters at least include: the length of the permanent magnet, the thickness of the permanent magnet and the lift-off distance between the permanent magnet and the test piece; The geometric structure diagrams and reference sound field distribution diagrams corresponding to different geometric structure parameters are used as training data sets, and the initial sound field distribution prediction model based on the Transformer model is trained according to the training data sets to obtain a sound field distribution prediction model; The sound field distribution prediction model based on the Transformer model includes: an encoder, a Transformer model, a fusion module and a decoder; accordingly, the geometric structure diagram of the target electromagnetic ultrasonic transducer is input into the trained sound field distribution prediction model based on the Transformer model to predict the sound field distribution diagram of the ultrasonic wave generated on the surface of the target test object, including: Inputting the geometric structure diagram of the target electromagnetic ultrasonic transducer into the encoder for encoding processing to obtain a first feature map; inputting the first feature map into the Transformer model to obtain a second feature map output by the Transformer model; The first feature map and the second feature map are input into the fusion module, so that the fusion module performs the following operations: respectively perform pooling operations of different scales on the first feature map and the second feature map to generate sub-feature maps of multiple scales corresponding to the first feature map and sub-feature maps of multiple scales corresponding to the second feature map; for each scale, perform addition fusion on the sub-feature map of the scale corresponding to the first feature map and the sub-feature map of the scale corresponding to the second feature map to obtain an addition fusion result of the scale; perform feature fusion based on the attention mechanism on the addition fusion results of multiple scales to obtain a third feature map; The third characteristic map is input into the decoder for decoding processing to obtain a sound field distribution map of the ultrasonic wave generated on the surface of the target test object.
2. The method according to claim 1, characterized in that: The initial sound field distribution prediction model based on the Transformer model is trained according to the training data set to obtain the sound field distribution prediction model, including: Step 11: In each round of model training, for any training data in the training data set, the geometric structure diagram in the training data is input into the initial sound field distribution prediction model to obtain a predicted sound field distribution diagram output by the initial sound field distribution prediction model; Step 12: Determine the loss function corresponding to the current round of model training according to the predicted sound field distribution map and the reference sound field distribution map corresponding to each training data of the current round of model training; Step 13: adjusting the model parameters of the initial sound field distribution prediction model according to the loss function corresponding to the current round of model training to obtain a trained sound field distribution prediction model; Repeat step 11, step 12 and step 13 until the trained sound field distribution prediction model converges.
3. The method according to claim 2, characterized in that According to the predicted sound field distribution map and the reference sound field distribution map corresponding to each training data of this round of model training, the loss function corresponding to this round of model training is determined, including: Calculate the mean square error corresponding to the current round of model training based on the predicted sound field distribution map and the reference sound field distribution map corresponding to each training data corresponding to the current round of model training; Calculate the mean absolute percentage error corresponding to this round of model training based on the predicted sound field distribution map and the reference sound field distribution map corresponding to each training data corresponding to this round of model training; According to the predicted sound field distribution map and the reference sound field distribution map corresponding to each training data corresponding to the current round of model training, the Pearson correlation coefficient corresponding to the current round of model training is calculated; According to the mean square error, mean absolute percentage error and Pearson correlation coefficient corresponding to this round of model training, the loss function corresponding to this round of model training is determined.
4. The method according to claim 3, characterized in that Adjusting the model parameters of the initial sound field distribution prediction model according to the loss function corresponding to the current round of model training includes: The model parameters of the initial sound field distribution prediction model are adjusted with the goal of minimizing the mean square error and mean absolute percentage error corresponding to this round of model training and making the Pearson correlation coefficient corresponding to this round of model training close to 1.
5. The method according to claim 4, characterized in that The model parameters of the initial sound field distribution prediction model are adjusted with the goal of minimizing the mean square error and the mean absolute percentage error corresponding to the current round of model training and making the Pearson correlation coefficient corresponding to the current round of model training close to 1, including: If the mean square error corresponding to this round of model training is less than the first threshold, and the mean absolute percentage error corresponding to this round of model training is less than the second threshold, the model parameters of the initial sound field distribution prediction model are adjusted with the goal of making the Pearson correlation coefficient corresponding to this round of model training close to 1.
6. The method according to claim 4, characterized in that Also includes: If the mean square error corresponding to the current round of model training is less than the first threshold, and the mean absolute percentage errors corresponding to multiple consecutive rounds of model training are greater than the second threshold, and the Pearson correlation coefficient corresponding to the current round of model training is less than the third threshold, and the multiple consecutive rounds of model training include the current round of model training and at least one round of model training before the current round of model training, then determine the change trend information of the Pearson correlation coefficient according to the Pearson correlation coefficients of the multiple consecutive rounds of model training; If the variation trend information of the Pearson correlation coefficient reflects that the Pearson correlation coefficient is getting closer to 1 as the rounds increase, the model parameters of the initial sound field distribution prediction model are adjusted with the goal of making the Pearson correlation coefficient corresponding to the current round of model training close to 1.
7. An electronic device, characterized in that: include: Memory and processor; The memory is used to store computer programs; The processor is coupled to the memory and configured to execute the computer program to perform the steps in the method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Obstacle size prediction system and method based on GA-BP neural network
CN113642529A