A dynamic self-learning classification and anomaly detection method for screening rare earth elements in neodymium iron boron by LIBS
Patent Information
- Application Number
- CN202611008045.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-08
- Publication Date
- 2026-09-25
AI Technical Summary
[0002]激光诱导击穿光谱(LIBS)技术大多被应用于钕铁硼永磁体中稀土元素的快速筛查,在实际检测中,激光脉冲轰击样品表面激发产生等离子体,随着等离子体的冷却与膨胀,内部的基体元素与微量添加的稀土元素会辐射出特征光谱;然而,在等离子体冷却推移过程中,不同元素的原子物理特性存在差异,其谱线强度的衰减行为存在各不相同;现有的技术在进行光谱数据处理时,大多采用固定时间窗口内的静态平均强度或单一延迟时刻的峰值强度来核算元素含量,有的可能仅依赖全局统一的背景扣除策略;这种处理方式存在未能有效追踪特征谱线强度随等离子体冷却推移的瞬时衰减速率差异;由于未能捕捉这种动态演变特征,基体元素谱线衰减拖尾可能对稀土元素的微弱谱线造成干扰,导致在痕量元素含量较低时,筛查结果的准确度可能下降;例如,在筛查钕铁硼永磁体中微量添加的镝元素时,铁基体的强谱线在等离子体冷却初期衰减较快,而镝的特征谱线衰减可能相对较慢;若现有技术仅采集冷却中后期的单一静态光谱强度,铁基体未完全消散的残余拖尾信号可能会叠加在镝的微弱特征峰上,导致核算出的镝元素强度出现虚高,进而可能将原本合格的低镝含量磁体误判为高镝类别,存在难以满足实际生产中对稀土元素含量的精确把控需求
[0013]通过封闭图形首尾基点闭合约束下的边界交叉积累加方式核算重叠波段能量面积,减少了波段边界处的截断误差;同时通过计算相邻波段间能量分布离散度识别异常波动波段对,能够检测由镀层不均匀或基体局部富集引起的区域性光谱畸变;采用中心有限差分法沿等离子体冷却推移过程逐点核算镝、钆、铽特征峰强度的瞬时衰减速率,能够反映不同元素因原子物理特性差异而产生的衰减行为动态特征,从而区分基体元素快速衰减拖尾与稀土元素缓慢衰减的时序差异,降低基体残余信号对稀土微弱谱线的叠加干扰。
Smart Images

Figure CN122822145A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data processing technology, and in particular to a dynamic self-learning classification and anomaly detection method for screening rare earth elements in NdFeB using LIBS. Background Technology
[0002] Laser-induced breakdown spectroscopy (LIBS) is mostly used for the rapid screening of rare earth elements in neodymium iron boron permanent magnets. In actual detection, a laser pulse bombards the sample surface to generate plasma. As the plasma cools and expands, the matrix elements and trace amounts of added rare earth elements emit characteristic spectra. However, during the plasma cooling process, the atomic physical properties of different elements vary, and their spectral line intensity decay behaviors differ. Existing techniques, when processing spectral data, mostly use the static average intensity within a fixed time window or the peak intensity at a single delay time to calculate the element content, and some may only rely on a globally uniform background subtraction strategy. This processing method fails to effectively track the characteristic spectral line intensity as the plasma cools. Differences in instantaneous decay rates; due to the failure to capture this dynamic evolution characteristic, the decay tail of matrix element spectral lines may interfere with the weak spectral lines of rare earth elements, leading to a decrease in the accuracy of screening results when the content of trace elements is low; for example, when screening for trace amounts of dysprosium in neodymium iron boron permanent magnets, the strong spectral lines of the iron matrix decay faster in the early stage of plasma cooling, while the characteristic spectral lines of dysprosium may decay relatively slowly; if the existing technology only collects the single static spectral intensity in the middle and late stages of cooling, the residual tail signal of the iron matrix that has not completely dissipated may be superimposed on the weak characteristic peak of dysprosium, resulting in an artificially high calculated dysprosium intensity, which may misclassify a qualified low-dysprosium magnet as a high-dysprosium type, making it difficult to meet the requirements for precise control of rare earth element content in actual production. Summary of the Invention
[0003] The technical problem to be solved by the present invention is to provide a dynamic self-learning classification and anomaly detection method for screening rare earth elements in NdFeB magnets using LIBS, which can realize the integrated processing of screening, classification and anomaly deviation detection of dysprosium, gadolinium and terbium content in NdFeB permanent magnets.
[0004] To solve the above-mentioned technical problems, the technical solution of the present invention is as follows:
[0005] Firstly, a dynamic self-learning classification and anomaly detection method for screening rare earth elements in NdFeB using LIBS is provided, the method comprising:
[0006] Step 1: Obtain the original spectral sequence, extract the characteristic bands containing the transition region between the nickel-copper coating and the substrate, and perform background filtering to obtain a multi-channel spectral matrix;
[0007] Step 2: Based on the multi-channel spectral matrix, calculate the instantaneous decay rate of the characteristic peak intensity of dysprosium, gadolinium, and terbium as the plasma cools and shifts point by point to obtain the dynamic evolution gradient set of the signal;
[0008] Step 3: Based on the gradient set of the dynamic evolution of the signal, construct an orthogonal projection space to obtain the matrix intrinsic spectral data vector; based on the matrix intrinsic spectral data vector, extract the overlapping bands of rare earth elements to obtain the weak spectral line distribution sequence.
[0009] Step 4: Based on the weak spectral line distribution sequence, calculate the total energy area of the overlapping bands of rare earth elements across the entire domain to obtain the rare earth element content screening index; based on the rare earth element content screening index, calculate the energy distribution dispersion between adjacent bands to obtain the abnormal fluctuation data set.
[0010] Step 5: Based on the abnormal fluctuation data set, construct a multidimensional orthogonal feature space to obtain a multidimensional spatial classification topology.
[0011] Step 6: Determine the classification boundary based on the multidimensional spatial classification topology to obtain the element classification matching degree set; based on the element classification matching degree set, determine the classification category and content threshold deviation status of the key rare earth elements of NdFeB permanent magnets to obtain the classification and anomaly detection results of the key rare earth elements of NdFeB permanent magnets.
[0012] The above-described solution of the present invention has at least the following beneficial effects:
[0013] By calculating the energy area of overlapping bands through the boundary intersection accumulation method under the closed constraint of the first and last base points of the closed pattern, the truncation error at the band boundary is reduced. At the same time, by calculating the energy distribution dispersion between adjacent bands, abnormal fluctuation band pairs can be identified, and regional spectral distortion caused by coating inhomogeneity or local enrichment of the substrate can be detected. The instantaneous decay rate of the characteristic peak intensity of dysprosium, gadolinium, and terbium is calculated point by point along the plasma cooling process using the central finite difference method. This can reflect the dynamic characteristics of the decay behavior of different elements due to differences in atomic physical properties, thereby distinguishing the temporal difference between the rapid decay tail of matrix elements and the slow decay of rare earth elements, and reducing the superposition interference of residual matrix signals on weak rare earth spectral lines. Attached Figure Description
[0014] Figure 1 This is a flowchart illustrating a dynamic self-learning classification and anomaly detection method for screening rare earth elements in NdFeB using LIBS, as provided in an embodiment of the present invention.
[0015] Figure 2 This is a flowchart illustrating the process of constructing a multidimensional orthogonal feature space based on an abnormal fluctuation data set to obtain a multidimensional spatial classification topology, as provided in an embodiment of the present invention.
[0016] Figure 3This is a schematic diagram of the process for obtaining screening indicators of rare earth element content provided by an embodiment of the present invention. Detailed Implementation
[0017] Exemplary embodiments of the present disclosure will now be described in more detail with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
[0018] like Figure 1 As shown, embodiments of the present invention propose a dynamic self-learning classification and anomaly detection method for screening rare earth elements in NdFeB using LIBS. The method includes the following steps:
[0019] Step 1: Obtain the original spectral sequence, extract the characteristic bands containing the transition region between the nickel-copper coating and the substrate, and perform background filtering to obtain a multi-channel spectral matrix;
[0020] Step 2: Based on the multi-channel spectral matrix, calculate the instantaneous decay rate of the characteristic peak intensity of dysprosium, gadolinium, and terbium as the plasma cools and shifts point by point to obtain the dynamic evolution gradient set of the signal;
[0021] Step 3: Based on the gradient set of the dynamic evolution of the signal, construct an orthogonal projection space to obtain the matrix intrinsic spectral data vector; based on the matrix intrinsic spectral data vector, extract the overlapping bands of rare earth elements to obtain the weak spectral line distribution sequence.
[0022] Step 4: Based on the weak spectral line distribution sequence, calculate the total energy area of the overlapping bands of rare earth elements across the entire domain to obtain the rare earth element content screening index; based on the rare earth element content screening index, calculate the energy distribution dispersion between adjacent bands to obtain the abnormal fluctuation data set.
[0023] Step 5: Based on the abnormal fluctuation data set, construct a multidimensional orthogonal feature space to obtain a multidimensional spatial classification topology.
[0024] Step 6: Determine the classification boundary based on the multidimensional spatial classification topology to obtain the element classification matching degree set; based on the element classification matching degree set, determine the classification category and content threshold deviation status of the key rare earth elements of NdFeB permanent magnets to obtain the classification and anomaly detection results of the key rare earth elements of NdFeB permanent magnets.
[0025] In this embodiment of the invention, the energy area of overlapping bands is calculated by accumulating the boundary intersections under the closed constraint of the first and last base points of the closed pattern, which reduces the truncation error at the band boundary. At the same time, abnormal fluctuation band pairs are identified by calculating the energy distribution dispersion between adjacent bands, which can detect regional spectral distortion caused by coating inhomogeneity or local enrichment of the substrate. The instantaneous decay rate of the characteristic peak intensity of dysprosium, gadolinium, and terbium is calculated point by point along the plasma cooling process using the central finite difference method, which can reflect the dynamic characteristics of decay behavior of different elements due to differences in atomic physical properties. This distinguishes the temporal difference between the rapid decay tail of the matrix element and the slow decay of rare earth elements, and reduces the superposition interference of the residual matrix signal on the weak rare earth spectral lines.
[0026] In a preferred embodiment of the present invention, step 1, obtaining the original spectral sequence, extracting the characteristic bands containing the transition region between the nickel-copper plating layer and the substrate, and performing background filtering to obtain a multi-channel spectral matrix, may include:
[0027] Step 101: Laser pulses are emitted point-by-point along the surface of the NdFeB permanent magnet sample from the coating towards the substrate at preset step sizes. The full-band spectral intensity signal corresponding to each excitation point is acquired to obtain the original spectral sequence. Specifically, the main parameters of the laser-induced breakdown spectrometer used in this embodiment are: laser output wavelength of 1064 nm, pulse energy adjustable from 50 mJ to 100 mJ, pulse width of 5 nanoseconds to 10 nanoseconds, and repetition frequency adjustable from 1 Hz to 10 Hz. The recommended repetition frequency for NdFeB permanent magnet coating erosion analysis is 2 Hz to 5 Hz. The basis for selecting this recommended range of 2 Hz to 5 Hz is that below 2 Hz, the total time required to complete point-by-point acquisition of more than 50 excitation points exceeds 25 seconds, and the coating erosion depth is affected by the laser... The effects of thermal accumulation become more pronounced, and the consistency of plasma cooling and transition decreases. Above 5 Hz, the characteristic time for the recombination and decay of charged particles in the residual plasma excited by the previous pulse in ambient air is approximately 0.1 to 0.2 seconds, with an interval of less than 0.2 seconds between the pulses. The residual plasma preheats and interferes with the ablation process of the subsequent pulse in the substrate region, altering the shape of the initial segment of the decay rate curve. The spectrometer detector covers a wavelength range of 200 nm to 900 nm, with a spectral resolution better than 0.1 nm in the ultraviolet and visible light bands, corresponding to a wavelength interval between 0.02 nm and 0.05 nm per channel. The stepping accuracy of the sample stage along the coating towards the substrate is 1 μm. All detections are performed in a standard atmospheric pressure environment.
[0028] The neodymium iron boron permanent magnet sample was fixed on the sample stage. The pitch angle of the sample stage was adjusted so that the normal of the sample surface was at an angle of 5 to 15 degrees with the incident direction of the laser, to prevent specular reflection light from the coating surface from directly entering the spectral collection optical path and causing detector saturation. A visually flat area of the coating surface was selected as the starting excitation point. Three to five laser pulses were emitted to pre-etch the surface to remove adsorbed contaminants and the natural oxide layer. The spectral data of the pre-etching pulses were discarded. During the formal data acquisition phase, the laser pulse energy and focused spot diameter were set so that the etching depth of a single pulse on the nickel-copper coating was controlled within the range of 0.5 micrometers to 2 micrometers. The laser pulses were directed perpendicularly to the substrate along the coating surface. The sample stage is moved sequentially in the direction of the part according to a preset step size. The step size is a fixed value in the range of 1 micrometer to 5 micrometers, selected according to the expected thickness of the coating. After each step size, a set of 3 to 5 laser pulses is emitted at the new position. The spectrometer synchronously records the full-band spectral intensity signal within a 1 microsecond to 3 microsecond acquisition time window after each pulse excitation. The arithmetic mean of the spectral intensity obtained from each acquisition in the set of pulses on the corresponding wavelength channel is taken as the single full-band spectral data corresponding to the excitation point. Each full-band spectrum contains wavelength channels determined by the size of the spectrometer detector pixel array. The typical pixel array size is 2048, 4096 or 8192.
[0029] The total number of all wavelength channels in each full-band spectrum is recorded as the total number of channels. The point-by-point excitation and spectral acquisition process is continuously executed. After each excitation, the spectral intensity change at the wavelength channel near the characteristic wavelength of nickel element 341.48 nm is monitored in real time. When the spectral intensity values of 3 to 5 consecutive adjacent excitation points at this channel no longer continue to decrease, and the fluctuation range between each excitation point does not exceed 5% of the horizontal intensity value of the substrate, it is determined that the laser ablation has fully penetrated the transition zone between the nickel-copper plating layer and the plating substrate and entered the interior of the uniform NdFeB substrate. At this time, point-by-point excitation is stopped. All excitation points from the starting excitation point to the stopping excitation point are arranged in chronological order of excitation time to obtain the full-band spectrum set. The total number of excitation points is recorded as the total number of excitation points. This full-band spectrum set arranged in excitation order is the original spectral sequence.
[0030] Step 102: Based on the abrupt drop in spectral intensity at the characteristic wavelength of nickel in the original spectral sequence from a high value in the coating area to the substrate level, the termination boundary of the nickel-copper coating and the starting boundary of the substrate are calibrated. All spectral data between the termination boundary of the nickel-copper coating and the starting boundary of the substrate are extracted to obtain the characteristic band containing the transition region of the nickel-copper coating and the substrate. Specifically, this includes: locating the characteristic wavelength channel of nickel from each full-band spectrum of the original spectral sequence; the strongest characteristic emission line of nickel in laser-induced plasma is the atomic line at 341.48 nm, and the channel in the spectrometer wavelength channel that is numerically closest to this wavelength is selected as the characteristic wavelength channel of nickel; the spectral intensity values of each full-band spectrum in the original spectral sequence at the characteristic wavelength channel of nickel are extracted sequentially. The excitation points are arranged in a one-dimensional sequence, the length of which is equal to the total number of excitation points. Observing the changing trend of this sequence along the direction of the excitation point sequence, it presents a three-segment characteristic: the first segment is a high-value plateau region, corresponding to the stage where laser etching is still inside the nickel-copper plating layer; the middle segment is a rapid drop zone, corresponding to the stage where etching reaches the interface between the plating layer and the substrate, and the nickel element concentration drops sharply; the last segment is a low-value stable region, corresponding to the stage where etching has entered the NdFeB substrate, and the nickel element exists only as a trace impurity. The two boundary positions are accurately calibrated using a dual-threshold sliding window determination method; the arithmetic mean of the intensity values of a preset number of excitation points in the first segment is calculated as the average intensity of the high-value plateau region; the arithmetic mean of the intensity values of a preset number of excitation points in the last segment is calculated as the average intensity of the low-value stable region.
[0031] Threshold 1 is set to 80% of the average intensity in the high-value plateau region. This value is based on the fact that in the laser-induced breakdown spectrum of the nickel-copper coating of NdFeB permanent magnets, the normal fluctuation range of the 341.48 nm nickel spectral line intensity within the coating is approximately ±20% of the average value. This fluctuation originates from the microscopic inhomogeneity of the coating thickness (the presence of submicron-level grains and grain boundaries within the coating, resulting in differences in the surface density of nickel atoms in different micro-regions) and the sequential jitter of the laser pulse energy. Setting threshold 1 to 80%, which is 20% below the average value, clearly exceeds the normal fluctuation range of ±20%, thus distinguishing the true attenuation point of the coating signal and avoiding interference from normal statistical fluctuations. If threshold 1 is set higher... For example, if the threshold is 90%, points in the 10% region above the normal fluctuation band may be misjudged as the attenuation start point. If it is set lower, for example, 70%, the detected attenuation start point will be delayed to a deeper position in the transition zone, losing the early interface spectral information when the coating is just penetrated, affecting the integrity of the subsequent characteristic band interception in the transition zone. The threshold is set to 129% of the average intensity of the low-value stable region. The basis for this value is that when the laser ablation completely penetrates the NdFeB substrate, the intensity of the 341.48 nm nickel spectral line drops to the substrate level. At this time, the fluctuation of the intensity value comes from the dark current shot noise of the detector and the non-uniformity of the trace nickel distribution in the micro-composition of the substrate. The fluctuation range is about ±80% of the average value of the substrate. Setting threshold 2 to 120%, which is 20% higher than the substrate, provides a margin equivalent to 2.5 times the noise band width. This ensures that the calibrated substrate starting boundary is located where the signal has indeed stabilized to the substrate level, rather than a temporary signal residue caused by local residue of nickel-copper plating material at the grain boundary in the transition region. If threshold 2 is set too low, such as 110%, the local residual signal in the transition region may be misjudged as the substrate not yet being reached, resulting in redundant data that has already entered the substrate in the intercepted transition region spectrum.
[0032] The sliding window length is defined as 3 to 7 consecutive excitation points. This range is based on the fact that when etching a typical nickel-copper coating with a thickness of 15 to 30 micrometers point by point with a step size of 1 to 5 micrometers, the complete transition zone from the coating to the substrate contains approximately 3 to 30 excitation points. A window of 3 points can provide a boundary localization resolution of approximately 3 to 15 micrometers. A window of 7 points has a stronger ability to suppress single-pulse outliers. When the window is less than 3 points, the false intensity jumps caused by a single abnormal pulse cannot be effectively smoothed. When the window is greater than 7 points, the boundary localization ambiguity range exceeds 7 steps, corresponding to 7 to 35 micrometers. For thin coating samples with a coating thickness of less than 10 micrometers, the boundary recognition accuracy is insufficient. Starting from the beginning of the nickel characteristic wavelength intensity shift sequence and moving towards the end, one excitation point position is slid each time, and the arithmetic mean of all intensity values covered by the current window is calculated. When the average value of the window at a certain position is first detected to be lower than threshold one, the sequence number of the starting excitation point of the window in the sequence is recorded, and the sequence number is marked as the starting point of the coating signal attenuation. Continue to slide the window towards the end of the sequence and calculate the average value of the window. When the average value of the window at a certain position is first detected to be lower than threshold two, the sequence number of the starting excitation point of the window in the sequence is recorded, and the sequence number is marked as the starting point of the matrix signal.
[0033] The excitation point location corresponding to the attenuation start of the coating signal is marked as the termination boundary of the nickel-copper coating, and the excitation point location corresponding to the start of the substrate signal is marked as the starting boundary of the substrate. All full-band spectral data within the range of the nickel-copper coating termination boundary to the substrate starting boundary are extracted from the original spectral sequence. The number of excitation points within this extracted range is recorded as the number of extracted excitation points. , The number of excitation points is less than or equal to the total number of excitation points; each spectrum within the intercepted range still retains complete spectral information of all wavelength channels, and the spectral data obtained from this interception is the characteristic band containing the transition region of the nickel-copper coating and the substrate.
[0034] Step 103 involves fitting a low-order polynomial baseline to each wavelength channel of the characteristic band, and subtracting the fitted baseline value from the original spectral intensity of each wavelength channel to obtain a multi-channel spectral matrix. Specifically, this includes independently performing baseline fitting and subtraction processing on each wavelength channel within the characteristic band. The processing of one wavelength channel will be illustrated as an example, starting from the characteristic band... In each spectrum, the spectral intensity value corresponding to the wavelength channel is extracted and arranged in order of excitation point to form a spectrum of length [length missing]. A one-dimensional intensity sequence; perform low-order polynomial baseline fitting on this one-dimensional intensity sequence along the excitation point index dimension; the order of the fitting polynomial is... The order is chosen from 3 to 5. The basis for this range is that, in the laser-induced breakdown spectrum of the NdFeB permanent magnet coating to the substrate, the change in continuous background radiation intensity with excitation depth is not a simple monotonic decay. The background intensity decreases as the nickel-copper material is consumed during the coating erosion stage. At the coating-substrate interface, due to the difference in absorption coefficients of the two materials for the 1064 nm laser (approximately 20% to 30% per micrometer for nickel-copper alloy and approximately 15% to 25% per micrometer for NdFeB), the laser energy coupling efficiency undergoes a sudden change, and the background intensity curve... Lines often exhibit inflection points, continuing to decline at a slower rate within the matrix. Second-order polynomials can only describe monotonic changes in a single curvature direction and cannot characterize these inflection point features. Third-order polynomials can describe a single inflection point, while fourth and fifth-order polynomials can describe more complex curvature changes. However, when the order reaches 6 or higher, the fitting polynomial begins to follow the narrow peak signals of rare earth elements with widths only on the order of 0.1 nanometers (these signals typically span only 3 to 5 excitation points in the excitation point dimension), causing the rare earth signal itself to be misfitted as part of the baseline, resulting in signal loss in subsequent analyses. The fitting employs an iterative weighted least squares method, with the first iteration involving all... Each data point is assigned an equal initial weight, with each data point having an initial weight of 1. Under this equal weight condition, using the excitation point index as the independent variable and the spectral intensity value as the dependent variable, the solution that minimizes the weighted sum of squared residuals is obtained. The coefficients of the first-order polynomial, the fitting function is in the form of:
[0035]
[0036] in Indicates the excitation point number ( ), This indicates that the wavelength channel is in the [missing information]. The fitted baseline value at each excitation point, For the solution to be found polynomial coefficients, The polynomial order is preset. After the first round of fitting, the absolute value of the residual between the fitted value and the original spectral intensity value is calculated point by point. The median of all absolute residual values is multiplied by 3 to obtain the preset residual threshold. For data points whose absolute residual value exceeds the preset residual threshold, it is determined that the data point is significantly affected by the narrow peak signal of rare earth elements, and its weight in the next iteration is updated to the current weight. For data points whose absolute residual value does not exceed the preset residual threshold, it is determined that the data point mainly reflects the characteristics of continuous background radiation, and its current weight remains unchanged.
[0037] The reason for taking three times the median as the residual threshold is that, in the excitation point region dominated only by continuous background radiation, the fitted residuals approximately follow a symmetrical distribution centered at zero. The median is a robust estimate of the distribution center position and is not affected by the small number of large residual values caused by the rare earth narrow peak. Three times the median can effectively distinguish between abnormally large residuals caused by the rare earth narrow peak signal and normal background fitting fluctuations. The second iteration uses the weights updated in the first iteration to perform weighted least squares fitting again, solving for a new set of polynomial coefficients that minimizes the sum of squared weighted residuals, and obtaining the second-round fitted polynomial curve. The residuals are calculated point by point again, and the weights are updated. The above iterative process is repeated, and the convergence criterion is set as the Euclidean distance between the coefficient vectors obtained in two adjacent iterations being less than 1. The convergence criterion is based on the following: when the relative change of the coefficients is less than one part per million, the change in the baseline value of the fitted curve at each excitation point is much smaller than the minimum effective reading of the spectrometer detector, and the fitting results have no substantial difference. If convergence is not achieved after 20 iterations (the preset maximum number of iterations), the iteration is stopped and the last fitted polynomial curve is taken as the final baseline. The maximum number of iterations (20 iterations) is based on the fact that in actual testing of NdFeB permanent magnet samples, the iterative weighted least squares method usually converges in 5 to 8 iterations, and the upper limit of 20 iterations provides sufficient convergence safety margin. After the above iterative weighted least squares fitting, the wavelength channel is obtained in all... The fitted baseline value at each excitation point is used to subtract the fitted baseline value at each excitation point from the original spectral intensity value of the wavelength channel at each excitation point. The difference obtained is the net spectral intensity value after deducting continuous background radiation.
[0038] After performing the baseline fitting and subtraction operations on each wavelength channel, arrange all net spectral intensity values into a matrix with each wavelength channel in a row and each excitation point number in a column. :
[0039]
[0040] in This represents a multi-channel spectral matrix, where the number of rows equals the total number of channels and the number of columns equals... ;matrix Each row corresponds to a fixed wavelength channel, each column corresponds to a fixed excitation point depth, and each element is the net spectral intensity value of a specific wavelength channel after subtracting continuous background radiation at a specific excitation depth.
[0041] This embodiment can automatically capture complete spectral data of the transition zone between the coating and the substrate, eliminating subjective bias and omission of transition zone information caused by manual visual interpretation of the boundary position.
[0042] In a preferred embodiment of the present invention, step 2, which involves calculating the instantaneous decay rate of the characteristic peak intensities of dysprosium, gadolinium, and terbium as the plasma cools down point by point based on the multi-channel spectral matrix to obtain the signal dynamic evolution gradient set, may include:
[0043] Step 201 involves extracting the characteristic peak intensity variation sequences of dysprosium, gadolinium, and terbium from the multi-channel spectral matrix as a function of plasma cooling, thus obtaining the characteristic peak intensity variation sequences for dysprosium, gadolinium, and terbium. Specifically, this includes: before executing this method, determining the characteristic emission wavelengths of dysprosium, gadolinium, and terbium under NdFeB matrix laser-induced plasma conditions using the following methods; preparing a set of standard NdFeB permanent magnet samples, preparing multiple samples according to known proportions, wherein the mass fraction of dysprosium is taken from multiple values within the range of 0% to 8% according to a preset gradient, and the mass fraction of gadolinium... The mass fraction of terbium was selected from multiple values within the range of 0% to 5% according to a preset gradient, and the mass fraction of terbium was selected from multiple values within the range of 0% to 3% according to a preset gradient. The gradient values of each element included blank control samples with a mass fraction of zero. Each standard sample was processed into a block of uniform size by wire EDM and a nickel-copper plating layer was electroplated on the surface. The plating layer thickness was consistent with the target plating layer thickness of the actual sample to be tested. For each standard sample, under the same laser-induced breakdown spectral acquisition conditions as the subsequent actual test (laser wavelength 1064 nm, pulse energy and repetition frequency kept consistent with the detection stage, acquisition time window 1 microsecond to 3 microseconds, atmospheric environment), laser pulses were excited point by point along the coating towards the substrate and the full-band spectrum was acquired.
[0044] For the spectral data of each standard sample, the characteristic emission wavelengths of the three rare earth elements were identified and confirmed according to the following steps: First, the spectrum of the standard sample with the highest dysprosium mass fraction and the spectrum of the blank control sample with zero dysprosium mass fraction were compared channel by channel in the ultraviolet band from 200 nm to 400 nm. In the difference spectrum, the positive peak that does not exist in the blank control sample but only appears in the dysprosium-containing sample was identified as the candidate characteristic emission peak of dysprosium. For each candidate peak, its peak position and full width at half maximum (FWHM) were recorded. Among all the candidate peaks of dysprosium, the peaks that meet the following conditions were selected as the characteristic emission peaks of dysprosium: the ratio of the peak intensity to the adjacent baseline is greater than 3, the FWHM is in the range of 0.05 nm to 0.3 nm, and there is no peak at the corresponding wavelength position in the standard sample spectra with the highest gadolinium mass fraction and the highest terbium mass fraction. The emission signals of the same magnitude (to exclude spectral line misattribution) were used. The peak with the highest intensity and most symmetrical shape after the above screening was selected as the main characteristic peak of dysprosium, and its precise peak wavelength was recorded. For dysprosium in a neodymium iron boron matrix, this main characteristic peak is usually located around 353.17 nm, corresponding to the first-order ion line of dysprosium atoms. Using the same difference comparison and screening method, the main characteristic peak of gadolinium was determined from the difference spectrum between the standard sample with the highest gadolinium mass fraction and the blank control sample with zero gadolinium mass fraction. This peak is usually located around 342.25 nm, corresponding to the neutral atom line of gadolinium atoms. The main characteristic peak of terbium was determined from the difference spectrum between the standard sample with the highest terbium mass fraction and the blank control sample with zero terbium mass fraction. This peak is usually located around 350.92 nm, corresponding to the first-order ion line of terbium atoms.
[0045] The precise wavelength positions of the three main characteristic peaks determined above through differential spectral comparison with standard samples are used as the fixed characteristic wavelength positions of dysprosium, gadolinium, and terbium in subsequent steps of this method. For different batches or grades of NdFeB permanent magnet samples, these characteristic wavelength positions remain stable due to the inherent atomic energy level structure of the three elements, eliminating the need to repeat the above standard sample comparison process for each test. During formal testing, in the multi-channel spectral matrix... In the matrix, find the wavelength channel row number that is numerically closest to the three characteristic wavelengths mentioned above; from the matrix... Extract all dysprosium characteristic wavelengths from the line The net spectral intensity values of the columns are arranged in ascending order of column number to obtain the intensity shift sequence of the characteristic peak of dysprosium; the intensity shift sequences of the characteristic peaks of gadolinium and terbium are extracted from the characteristic wavelength rows of gadolinium and terbium respectively in the same way.
[0046] Step 202 involves calculating the instantaneous attenuation rate point-by-point using the central finite difference method for the intensity shift sequences of dysprosium, gadolinium, and terbium characteristic peaks. Specifically, this includes determining the time interval between adjacent excitation points, assuming the laser pulse repetition frequency is... (Unit: Hertz) then the time interval between adjacent excitation points (Unit: seconds) is:
[0047]
[0048] The first dysprosium characteristic peak intensity shift sequence Taking the intensity value at each excitation point as an example ( This value is denoted as For the excitation point at the beginning of the sequence ( The instantaneous decay rate is calculated using forward finite difference calculation, and the formula is as follows:
[0049]
[0050] in This represents the instantaneous decay rate of dysprosium at the first excitation point. and These represent the intensity values of the dysprosium characteristic peak at the first and second excitation points, respectively. The time interval between adjacent excitation points; for excitation points within the sequence ( The instantaneous decay rate is calculated using the central finite difference method, and the formula is as follows:
[0051]
[0052] in Indicates the first The instantaneous decay rate of dysprosium at each excitation point, and They represent the first The and the first The intensity values of the characteristic peak of dysprosium at each excitation point The time span between these two excitation points; for the excitation point at the end of the sequence ( The instantaneous decay rate is calculated using backward finite difference calculation, and the formula is as follows:
[0053]
[0054] in Indicates the first The instantaneous decay rate of dysprosium at each excitation point, and They represent the first The and the first The intensity values of the dysprosium characteristic peak at each excitation point; the truncation error characteristics of the above three difference schemes are as follows: the internal excitation points use central difference, and the truncation error is on the order of magnitude of... The first and last ends are reduced to forward and backward difference functions, respectively, with truncation errors of the same order. The dimension of all three instantaneous decay rates is spectral intensity per second. Using the same three difference schemes as described above, the instantaneous decay rate at each excitation point is calculated point-by-point for the gadolinium characteristic peak intensity shift sequence and the terbium characteristic peak intensity shift sequence, using the same notation. Record the instantaneous decay rate of each element.
[0055] Step 203 involves merging the instantaneous decay rates of all points in the dysprosium characteristic peak intensity shift sequence, the gadolinium characteristic peak intensity shift sequence, and the terbium characteristic peak intensity shift sequence to obtain a dynamic evolution gradient set of the signal. Specifically, this includes: merging the instantaneous decay rates of the three elements to obtain a dynamic evolution gradient set of the signal; merging all the instantaneous decay rates of the dysprosium element... The instantaneous decay rates are arranged sequentially according to the excitation point number as one. The instantaneous decay rates of gadolinium and terbium elements are also arranged as row vectors of the same dimension. These three row vectors are stacked row by row from top to bottom in a fixed order of dysprosium, gadolinium, and terbium to form a matrix. :
[0056]
[0057] in The gradient set matrix represents the dynamic evolution of the signal, consisting of 3 rows. Columns; in subscript , , The chemical symbols for dysprosium, gadolinium, and terbium are respectively used; matrix The first row contains all elements representing the instantaneous decay rate of dysprosium, the second row contains gadolinium, the third row contains terbium, and each column corresponds to a fixed excitation point position.
[0058] This embodiment, with its fixed characteristic wavelength selection method, can effectively adapt to the detection of multiple batches and grades of NdFeB samples, reducing the workload of repeated calibration and improving the overall detection efficiency.
[0059] In a preferred embodiment of the present invention, step 3, constructing an orthogonal projection space based on the signal dynamic evolution gradient set to obtain the matrix intrinsic spectral data vector; and extracting the overlapping bands of rare earth elements based on the matrix intrinsic spectral data vector to obtain a weak spectral line distribution sequence, may include:
[0060] Step 301: Calculate the covariance matrix of the gradient set of the signal dynamic evolution, and perform eigenvalue decomposition on the covariance matrix to obtain all eigenvalues and corresponding eigenvectors. Specifically, this includes: matrix... The size is 3 rows Column, regard it as A set of 3D column vectors, each column vector corresponding to an excitation point location, whose three components are, in order, the instantaneous decay rates of dysprosium, gadolinium, and terbium at that excitation point; calculate this... The mean vector of three 3-dimensional column vectors; the k-th component of the mean vector (k takes the values 1, 2, and 3, corresponding to the three measurement dimensions of dysprosium, gadolinium, and terbium, respectively) is calculated as follows: [The text abruptly ends here, likely due to an incomplete translation or a missing section.] Sum of all components of the k-th dimension of each column vector and divide by The resulting quotient is the k-th dimension component of the mean vector; the covariance matrix is calculated. The covariance matrix is a 3x3 symmetric square matrix. The solution for the element value (k takes 1, 2, 3, l takes 1, 2, 3) located in the k-th row and l-th column of this matrix is to traverse all... For each column vector, extract the difference between the k-th dimension component and the k-th dimension component of the mean vector, multiply this difference by the difference between the l-th dimension component and the l-th dimension component of the mean vector, and then... Sum of the product values and divide by The resulting quotient is the value of the element in the k-th row and l-th column of the covariance matrix. Eigenvalue decomposition is then performed on the aforementioned 3-row, 3-column covariance matrix. The numerical solution algorithm for eigenvalue decomposition uses the Jacobi iteration method, which gradually eliminates the absolute values of the off-diagonal elements of the covariance matrix by successively applying planar rotation transformations until the absolute values of all off-diagonal elements are less than a preset convergence threshold. The convergence threshold is taken as follows: The basis for this is that, for a 3x3 covariance matrix, Jacobi iterations typically reduce the number of off-diagonal elements to a minimum in less than 10 iterations. The improvements made in the following iterations are overshadowed by the limited precision of double-precision floating-point numbers; after the eigenvalue decomposition is completed, three eigenvalues (in descending order) and their corresponding three eigenvectors are obtained, each eigenvector having a dimension of 3.
[0061] Step 302: Sort all eigenvalues from largest to smallest, and take the eigenvectors corresponding to the first preset number of eigenvalues as the basis vector set of the matrix subspace. The space spanned by the basis vector set of the matrix subspace is the orthogonal projection space. Project each column of the multi-channel spectral matrix onto the orthogonal projection space to obtain the matrix projection components corresponding to each column of spectral vectors. Subtract the corresponding matrix projection components from each column of spectral vectors to obtain the matrix intrinsic spectral data vectors. Specifically, this includes: sorting the three eigenvalues obtained in step 301 from largest to smallest, with a preset number of 2; selecting the two eigenvectors corresponding to the two largest eigenvalues as the basis vector set of the matrix subspace; normalizing these two eigenvectors (dividing each vector by its own magnitude) to form a set of standard orthogonal basis vectors; the 2-dimensional linear subspace spanned by this set of standard orthogonal basis vectors... Let this be denoted as the projection subspace, which represents the synergistic decay pattern of dysprosium, gadolinium, and terbium dominated by matrix effects during plasma cooling. In the laser-induced breakdown spectrum of NdFeB permanent magnets, dysprosium and terbium typically exist in the NdFeB main phase lattice by replacing NdFeB atoms. The signal decay behavior of these two elements during plasma cooling is highly correlated, mainly driven by the common global physical process of plasma temperature decrease, corresponding to the largest eigenvalue of the covariance matrix, which typically contributes 60% to 75% of the total variance. If gadolinium exists as an additive element in the rare-earth-rich phase at the grain boundary, it exhibits partially independent decay characteristics due to the difference in volatilization temperature between it and dysprosium and terbium in the main phase, corresponding to the second largest eigenvalue, which typically contributes 15% to 25% of the total variance. The eigenvectors corresponding to the first two eigenvalues can cumulatively explain more than 85% of the total variance.
[0062] Multichannel spectral matrix Each column is considered a spectral column vector, the dimension of which is equal to the number of all channels; for the ... Column spectrum column vector ( Take from 1 to The integer value of the vector is then multiplied by the two orthonormal basis vectors of the projected subspace, resulting in two inner product values. These two inner product values are then multiplied by their respective basis vectors and summed to obtain the vector representing the first inner product. The projection component of the column spectrum column vector onto the projection subspace. This projection component represents the projection component from the first column. The portion of the original spectrum that can be explained by matrix effect variation modes; the first Subtracting each component of the corresponding projected component from each component of the original spectral column vector yields a new column vector of the same dimension, which is the first column vector. The matrix intrinsic spectral data vectors at each excitation point location; these vectors represent the remaining spectral information after stripping the dominant matrix effect components from the original spectra; for all All column spectral vectors underwent the above projection and subtraction operations, resulting in a total of Each matrix intrinsic spectral data vector.
[0063] Step 303: Determine the characteristic wavelength positions of dysprosium, gadolinium, and terbium from the matrix intrinsic spectral data vector; expand the dysprosium characteristic wavelength position to both sides by a first preset width to obtain a dysprosium analysis window, expand the gadolinium characteristic wavelength position to both sides by a second preset width to obtain a gadolinium analysis window, and expand the terbium characteristic wavelength position to both sides by a third preset width to obtain a terbium analysis window. Specifically, each component of the matrix intrinsic spectral data vector corresponds to a wavelength channel, the dysprosium characteristic wavelength position is the actual wavelength value corresponding to the dysprosium characteristic wavelength row number determined in step 201, the gadolinium characteristic wavelength position is the actual wavelength value corresponding to the gadolinium characteristic wavelength row number, and the terbium characteristic wavelength position is the actual wavelength value corresponding to the terbium characteristic wavelength row number. The half-width of the dysprosium analysis window is set at 0.3 nm. This value is based on the fact that the measured full width at half maximum (FWHM) of the dysprosium primary ion line at 353.17 nm in atmospheric pressure laser-induced plasma is usually between 0.08 nm and 0.15 nm. The broadening of the spectral line mainly comes from the collisional perturbation of the luminescent atoms by charged particles in the plasma and the non-uniform distribution of the microscopic electric field around the luminescent atoms. The isotopic shifts of the two main isotopes of dysprosium (mass numbers 164 and 162) do not exceed 0.04 nm. The 0.3 nm half-width is equivalent to 2 to 4 times the full width at half maximum (FWHM) of the spectral line, which is sufficient to include more than 95% of the spectral line profile area in the analysis window, and maintains a distance of about 0.18 nm from the nearest interfering line (the primary ion line of iron at 353.65 nm, with a wavelength spacing of about 0.48 nm).
[0064] The half-width at half-maximum (FWHM) of the gadolinium analysis window is set at 0.5 nm. This value is based on the fact that the measured FWHM of the 342.25 nm neutral atomic line of gadolinium in laser-induced plasma on a NdFeB matrix can reach 0.15 nm to 0.30 nm, significantly wider than the two first-order ion lines corresponding to dysprosium and terbium. This difference arises because neutral atomic lines are typically more sensitive to collisions with charged particles in the plasma environment than first-order ion lines. Furthermore, the energy level structure of gadolinium atoms is relatively dense, making it prone to mixing between adjacent energy levels under plasma conditions, leading to an expansion of the emission spectral line distribution along the wavelength axis. A 0.5 nm FWHM can cover the contour information of the spectral line flanks extending to approximately 1.7 times the FWHM, even under the most severe broadening (approximately 0.30 nm FWHM).
[0065] The full width at half maximum (FWHM) of the terbium analysis window was set to 0.4 nm. This value was chosen because the measured FWHM of the terbium primary ion line at 350.92 nm on a NdFeB matrix is approximately 0.10 nm to 0.20 nm. Simultaneously, this spectral line exhibits a weak companion peak at approximately 0.10 nm to 0.15 nm on its longer wavelength side. This companion peak is generated by the splitting of hyperfine energy levels of different terbium isotopes. A FWHM of 0.4 nm can simultaneously cover both the main peak and the companion peak, and is consistent with the dysprosium analysis window (FWHM 0.3 nm). The half-windows are spaced approximately 2.2 nanometers apart and approximately 8.2 nanometers apart from the gadolinium analysis window (half-width 0.5 nanometers). The analysis windows will not overlap with each other due to the expansion of the windows. The half-window width value is divided by the wavelength interval per channel (nanometer per channel) of the spectrometer at that wavelength, and the quotient is rounded to the nearest integer to obtain the corresponding number of half-window channels. The channel interval obtained by adding or subtracting the number of half-window channels from the characteristic wavelength row number of each element is the analysis window of that element.
[0066] Step 304: Detect the existence of wavelength overlap regions between any two analysis windows in the dysprosium, gadolinium, and terbium element analysis windows, and mark the overlapping wavelength intervals covered by the two analysis windows with overlapping wavelength regions as overlapping bands; extract the spectral intensity values corresponding to each wavelength channel within all overlapping bands, arrange them in ascending order of wavelength, and obtain a weak spectral line distribution sequence. Specifically, this includes checking the wavelength overlap of three pairs of analysis window combinations, namely dysprosium and gadolinium windows, dysprosium and terbium windows, and gadolinium and terbium windows; taking the dysprosium and gadolinium window combination as an example, the complete process of overlap detection and boundary determination is illustrated. Take the wavelength values corresponding to all wavelength channels covered by the dysprosium element analysis window, and record the maximum and minimum wavelength values, which are denoted as the maximum wavelength and minimum wavelength of the dysprosium window, respectively. Similarly, take the maximum and minimum wavelength values from the gadolinium element analysis window, and record them as the maximum wavelength and minimum wavelength of the gadolinium window, respectively. The overlap determination condition is that two conditions must be met simultaneously, that is, the value of the maximum wavelength of the dysprosium window is greater than the value of the minimum wavelength of the gadolinium window, and the value of the maximum wavelength of the gadolinium window is greater than the value of the minimum wavelength of the dysprosium window. If either condition is not met, it is determined that the dysprosium window and the gadolinium window are separated from each other in terms of wavelength, and there is no wavelength overlap.
[0067] After determining that there is wavelength overlap between the two windows, the specific boundary of the overlap interval is determined. The starting wavelength of the overlap interval is determined by comparing the minimum wavelength values of the dysprosium window and the gadolinium window. If the minimum wavelength value of the dysprosium window is greater than that of the gadolinium window, then the minimum wavelength of the dysprosium window is taken as the starting wavelength of the overlap interval; otherwise, the minimum wavelength of the gadolinium window is taken as the starting wavelength of the overlap interval. The ending wavelength of the overlap interval is determined by comparing the maximum wavelength values of the dysprosium window and the gadolinium window. If the maximum wavelength value of the dysprosium window is less than that of the gadolinium window, then the maximum wavelength of the dysprosium window is taken as the starting wavelength of the overlap interval. The termination wavelength of the overlapping interval is determined by the wavelength of the gadolinium window; otherwise, the maximum wavelength of the gadolinium window is taken as the termination wavelength of the overlapping interval. The overlapping interval covers all wavelength channels from the starting wavelength to the termination wavelength. Following the same judgment logic and boundary determination method, the combinations of dysprosium and terbium windows and gadolinium and terbium windows are processed sequentially. The overlapping intervals corresponding to each pair of overlapping analysis windows in the three pairs of detections are each marked as an overlapping band. Each overlapping band has a clear starting wavelength channel number, termination wavelength channel number, and the number of wavelength channels it covers. Let the total number of overlapping bands marked in the three pairs of detections be denoted as . ; The value can be zero (the three pairs of analysis windows are separated from each other in wavelength and have no overlap), or it can be 1, 2 or 3 (there is one, two or three pairs of overlap).
[0068] For each marked overlapping band, from all Extract the spectral intensity values corresponding to each wavelength channel within the overlapping wavelength range from each matrix intrinsic spectral data vector; for the same wavelength channel, take the value of that wavelength channel in the range of the matrix intrinsic spectral data vector. The arithmetic mean of the spectral intensity values at each excitation point is used as the representative spectral intensity value for that wavelength channel within the overlapping band. All wavelength channels within the entire overlapping band are arranged in ascending order of their actual wavelength values, with the corresponding representative spectral intensity value appended to the end of each channel. This arrangement yields a one-dimensional data sequence containing pairs of wavelength and spectral intensity values; this data sequence represents the weak spectral line distribution sequence.
[0069] In this embodiment, the characteristic components that dominate the matrix effect are screened by eigenvalue decomposition of the covariance matrix and then projected and stripped. This can preserve the true characteristic spectral information of the three rare earth elements to the greatest extent and effectively separate weak spectral line signals in overlapping bands of the elements.
[0070] In a preferred embodiment of the present invention, step 4 involves calculating the total energy area of overlapping rare earth element bands across the entire domain based on the weak spectral line distribution sequence, thereby obtaining a rare earth element content screening index; and calculating the energy distribution dispersion between adjacent bands based on the rare earth element content screening index, thereby obtaining an abnormal fluctuation data set, which may include:
[0071] Step 401: For each overlapping band in the weak spectral line distribution sequence, wavelength intensity coordinate points are formed by combining the wavelength values and spectral intensity values of each wavelength channel within the overlapping band. These coordinate points are then arranged in ascending order of wavelength to obtain a sequence of wavelength intensity coordinate points. Specifically, the weak spectral line distribution sequence contains a total of... Data from several overlapping bands, each separated from the others in wavelength; extract the data from the first band. Several overlapping bands, Take 1 to The integer value; the overlapping band contains wavelength channels, each with an actual wavelength value and a representative spectral intensity value calculated in step 304; each wavelength channel in the overlapping band is mapped to a coordinate point on a two-dimensional plane with the wavelength value as the abscissa and the representative spectral intensity value as the ordinate. ,in Indicates the first In the overlapping bands, the first Wavelength values (nanometers) for each wavelength channel. This represents the corresponding spectral intensity value (in units of spectral intensity). Take integer values from 1 up to the total number of wavelength channels within the overlapping band; according to Sort all coordinate points within the overlapping band in ascending order, and the sorted result is the first... A sequence of wavelength intensity coordinates for overlapping bands.
[0072] Step 402: Add a first-end base point at the beginning of the wavelength intensity coordinate point sequence and a last-end base point at the end. The wavelength value of the first-end base point is the wavelength value at the beginning of the overlapping band, and the spectral intensity value is zero. The wavelength value of the last-end base point is the wavelength value at the end of the overlapping band, and the spectral intensity value is zero. Connect the first-end base point, the wavelength intensity coordinate point sequence, and the last-end base point end to end to form a closed figure. Specifically, this includes: in the... At the very beginning of the wavelength intensity coordinate point sequence of overlapping bands, a first-end base point is added. The x-coordinate of the first-end base point is equal to the minimum wavelength value within that band, and the y-coordinate is set to zero. At the very end of the sequence, a last-end base point is added. The x-coordinate of the last-end base point is equal to the maximum wavelength value within that band, and the y-coordinate is set to zero. Starting from the first-end base point, each coordinate point in the sequence is connected sequentially with straight line segments in increasing wavelength order until the last-end base point is reached. Finally, straight line segments are connected back from the last-end base point to the first-end base point, forming a closed polygonal boundary that connects the beginning and end. The two-dimensional planar region enclosed by this closed boundary is the first... A closed pattern of overlapping bands.
[0073] Step 403: Calculate the edge cross product by edge along the boundary of the closed figure. Subtract the product of the wavelength value at the starting point and the spectral intensity value at the ending point from the product of the wavelength value at the ending point and the spectral intensity value at the starting point to obtain the edge cross product. Sum the edge cross products of all edges of the closed figure, take the absolute value, and divide by two to obtain the energy area of the overlapping band. Specifically, this includes: calculating the edge cross product and energy area by edge along the boundary of the closed figure; assuming the vertices of the closed figure are arranged counterclockwise, the total number of vertices equals the number of wavelength channels in the band plus 2 (including the first and last base points); the closed figure is formed by connecting each edge sequentially from beginning to end, and each edge is determined by its starting and ending vertices; for the first... The edge, whose starting point is the th edge. The vertex is the nth vertex, and the endpoint is the nth vertex. vertices (when) When the last vertex is reached, the endpoint returns to the first vertex, and the cross product of the corresponding edges is obtained. The calculation formula is:
[0074]
[0075] in Indicates the first The cross product of the edges of the strip. and They represent the first The x-coordinate (wavelength value, nanometers) and y-coordinate (intensity value, spectral intensity unit) of each vertex. and They represent the first Find the x and y coordinates of each vertex; cross product of all sides of the closed figure. Sum the results one by one, take the absolute value of the sum, and divide by 2. The result is the nth sum. Energy area of overlapping bands The calculation formula is:
[0076]
[0077] in Indicates the first The energy area of each overlapping band, with dimensions in nanometers multiplied by spectral intensity units, is summed to cover all sides of the closed figure. The physical meaning is the area of the region enclosed between the rare earth element spectral line profile and the baseline within the overlapping band.
[0078] Step 404 involves summing up the energy areas of all overlapping bands in the weak spectral line distribution sequence to obtain the rare earth element content screening index. Specifically, this includes summing up the energy areas of all overlapping bands in the weak spectral line distribution sequence. Energy area of overlapping bands The rare earth element content is determined by summing the results one by one; if... If the value is zero (i.e., the analysis windows of dysprosium, gadolinium, and terbium are fully separated from each other in terms of wavelength and have no overlap), then the value of the rare earth element content screening index is also zero. Under the same laser parameters and acquisition conditions, the value of this rare earth element content screening index is positively correlated with the actual total content of the three rare earth elements dysprosium, gadolinium, and terbium in the neodymium iron boron permanent magnet sample.
[0079] Step 405: Sort the energy areas of each overlapping band corresponding to the rare earth element content screening index according to the wavelength of the overlapping band from smallest to largest to obtain an ordered overlapping band energy area sequence; for each pair of adjacent overlapping band energy areas in the ordered overlapping band energy area sequence, take the absolute value of the difference between the energy areas of the previous overlapping band and the energy areas of the next overlapping band to obtain an adjacent band energy difference sequence. Specifically, this includes: rearranging the energy areas of each overlapping band according to the wavelength of the first end of each overlapping band from smallest to largest, and then adjusting the order of each energy area accordingly to obtain an energy area sequence arranged in ascending order of wavelength, which is the ordered overlapping band energy area sequence; in this sequence, calculate the absolute difference for each pair of adjacent energy areas: subtract the previous energy area from the next energy area, and take the absolute value of the difference, which is the energy difference between this pair of adjacent bands; after calculating for all adjacent pairs in the sequence, a total of The energy differences are arranged in ascending order of wavelength to form a sequence of energy differences between adjacent bands.
[0080] Step 406: Calculate the mean and standard deviation of the energy difference sequence between adjacent bands. Mark the preceding and following overlapping bands corresponding to individual differences exceeding the mean plus three times the standard deviation in the energy difference sequence between adjacent bands as anomalous band pairs. Collect all anomalous band pairs to obtain the anomalous fluctuation data set, specifically including: all... For each energy difference, calculate its arithmetic mean, sum all energy differences, and then divide by . Calculate the standard deviation of these energy differences: square the deviation of each energy difference from the arithmetic mean, sum all the squares, and divide by . The square root of the quotient is then taken, and the result is the standard deviation. The anomaly threshold is set as the arithmetic mean plus three times the standard deviation. The basis for taking three times the standard deviation is that in NdFeB permanent magnet samples with uniform rare earth element distribution, the energy difference between adjacent overlapping bands mainly comes from random fluctuations in local plasma temperature and electron density, as well as readout noise from the spectrometer detector. Under the combined effect of these random factors, the energy difference between adjacent bands approximately follows a symmetrical distribution. Under this distribution assumption, the probability of an event where the observed value deviates from the mean by more than three times the standard deviation is approximately 0.27%. In the actual production and testing scenario of NdFeB permanent magnets, this mislabeling rate is within an acceptable range because the labeled abnormal bands will be further discriminated by the support vector machine classification model in subsequent step 5, rather than directly concluding that the sample is abnormal. Each energy difference in the energy difference sequence of adjacent bands is examined one by one. For any energy difference in the sequence, if its value is greater than the above-mentioned anomaly judgment threshold, the preceding and following overlapping bands corresponding to that energy difference are marked as an anomalous band pair. All marked anomalous band pairs are collected to form an anomalous fluctuation data set. The total number of anomalous band pairs is denoted as . If all energy differences do not exceed the anomaly detection threshold, then The value is zero, indicating that the abnormal fluctuation data set is an empty set.
[0081] In this embodiment, the analysis method of energy dispersion in adjacent bands can effectively capture the subtle spectral energy fluctuations caused by uneven distribution and abnormal ratio of rare earth elements. It can screen out samples with slight ratio abnormalities that are easily missed and make preliminary and refined identification of sample quality defects.
[0082] like Figure 2 As shown, in another preferred embodiment of the present invention, step 5, constructing a multidimensional orthogonal feature space based on the abnormal fluctuation data set to obtain a multidimensional spatial classification topology, may include:
[0083] Step 501: For each abnormal band pair in the abnormal fluctuation data set, extract the instantaneous decay rates of dysprosium, gadolinium, and terbium corresponding to the abnormal band pair from the signal dynamic evolution gradient set. Combine this with the overlapping band energy area and the energy difference between adjacent bands of the abnormal band pair to form a five-dimensional feature vector, specifically including: the total number of bands in the abnormal fluctuation data set... The first anomalous band pair, for the first one... A pair of anomalous bands, Take 1 to Integer values, from the gradient set matrix of the dynamic evolution of the signal. Extract features related to decay rate from the matrix. The first row (dysprosium element row) contains Take this instantaneous decay rate value. The arithmetic mean of the values is used as the first eigencomponent in the five-dimensional eigenvector of this anomalous band pair, reflecting the overall level of the decay rate of dysprosium during the entire plasma cooling and migration process; matrix The 2nd row (gadolinium element row) takes The arithmetic mean of the values is used as the second-dimensional eigencomponent; the matrix The 3rd row (terbium element row) takes The arithmetic mean of the values is taken as the third feature component; the dimension of these three feature components is spectral intensity per second; the sum of the energy areas of the preceding and following overlapping bands in the anomalous band pair is taken as the fourth feature component, reflecting the total spectral energy scale in the wavelength region where the anomalous band pair is located; the energy difference value (i.e., the absolute difference in energy areas between the bands in the pair) used to determine the anomalous band pair in step 406 is taken as the fifth feature component, reflecting the degree of anomalous energy distribution of the anomalous band pair; the above five feature components are combined in a fixed order from the first to the fifth dimension to form the fifth feature component. The five-dimensional eigenvectors of each anomalous band pair; for all The above feature extraction operation was performed on each of the anomalous band pairs, resulting in a total of Five eigenvectors.
[0084] Step 502: The five-dimensional feature vectors are aggregated into a training feature vector set. The training feature vector set is then subjected to mean normalization and variance normalization processing dimension-by-dimensionally to obtain a standardized training feature vector set. Specifically, this includes: [The text abruptly ends here, likely due to an incomplete sentence or missing information.] Five five-dimensional feature vectors are aggregated into a training feature vector set. Since the five dimensions have different dimensions (dimensions 1-3 are measured in spectral intensity units per second, while dimensions 4 and 5 are measured in nanometers multiplied by spectral intensity units) and numerical ranges, directly feeding the original feature values into the support vector machine for training would result in the larger dimensions unreasonably dominating Euclidean distance calculations and kernel function operations. Therefore, it is necessary to perform standardization on the training feature vector set dimension by dimension before training the classification model to eliminate dimensional differences. The standardization process is performed independently for each dimension, with all five dimensions processed in the same way. Taking one dimension as an example, the standardization process is illustrated: from the training feature vector set... Extract the component values of each dimension from each feature vector to form a vector of length . A one-dimensional sequence is given; the arithmetic mean of all values in the sequence is calculated as the training mean for that dimension; the training mean is subtracted from each value in the sequence to obtain the mean-reduced sequence; the standard deviation of the mean-reduced sequence is calculated by squaring each element in the sequence and summing the results, then dividing the sum by . Take the arithmetic square root, which is the training standard deviation for that dimension; divide each element in the mean-removed sequence by the training standard deviation, and the result is the standardized value for that dimension.
[0085] After the above processing is performed on all five dimensions, each original five-dimensional feature vector is converted into a standardized five-dimensional feature vector. After standardization, the mean of each dimension is 0 and the standard deviation is 1. A standardized five-dimensional feature vector constitutes a standardized training feature vector set.
[0086] Step 503: Input the standardized training feature vector set into the pre-trained support vector machine (SVM) classification model. The SVM classification model uses a radial basis function (RBF) kernel to map the standardized training feature vector set to a high-dimensional orthogonal feature space. The optimal classification hyperplane between each category is calculated in the high-dimensional orthogonal feature space to obtain the multi-dimensional classification topology. Specifically, the SVM classification model uses a one-to-one combinatorial classification strategy to process... A multi-class classification problem with several categories; specifically, the organization method is as follows: In each of the categories, every two distinct categories form a binary classification combination, and a separate binary classification support vector machine sub-model is trained for each combination; the total number of binary classification combinations is . Accordingly, training is required. A binary classification support vector machine sub-model; during the detection phase, the standardized five-dimensional feature vectors to be tested are respectively input into all... Each sub-model provides a binary classification vote for the test vector, determining which of its two corresponding categories the vector belongs to. The total number of votes for each candidate category is then tallied, and the category with the most votes is the final classification result. In neodymium iron boron permanent magnets, the rare earth element categories may have overlapping feature spaces. For example, the distribution regions of dysprosium-dominant (normal content) and dysprosium-gadolinium mixed (high content) categories in the five-dimensional feature space may be adjacent or even partially overlapping. A one-to-one strategy trains a separate classification hyperplane for each pair of categories, preventing the hyperplane from shifting direction due to the majority of samples from one category, thus better protecting the classification accuracy of smaller sample categories. Furthermore, the training processes of each sub-model are independent, facilitating parallel execution across multiple computing cores to shorten the overall training time.
[0087] From the standardized training feature vector set, all standardized five-dimensional feature vectors and their class labels belonging to the two categories corresponding to the current binary classification combination are selected to form the training subset of this sub-model. In this training subset, the label of one category is mapped to a positive value of one, and the label of the other category is mapped to a negative value of one. A radial basis function (RBF) kernel is used to implicitly map each standardized five-dimensional feature vector in this training subset to a high-dimensional orthogonal feature space. The expression for the RFB kernel is:
[0088]
[0089] in Represents two input vectors and The inner product value in this high-dimensional orthogonal feature space, Represented by natural constant An exponential function with a base of approximately 2.71828. and For any two standardized five-dimensional feature vectors in the training subset, express and The Euclidean distance between them (i.e., the sum of the squares of the differences between the five corresponding dimension components of the two vectors, and then taking the arithmetic square root). The kernel width parameter and satisfying ; Controlling the radius of influence of each training sample in a high-dimensional orthogonal feature space: The larger the value, the smaller the radius of influence of a single sample, and the more complex and refined the classification boundary becomes; The smaller the value, the larger the radius of influence, and the smoother the classification boundary. The value of is automatically selected from the candidate parameter set through cross-validation. The specific selection process will be detailed in the cross-validation section later.
[0090] In a high-dimensional orthogonal feature space, the optimization objective of the binary support vector machine sub-model is to find a classification hyperplane that maximizes the sum of the geometric distances from this hyperplane to the nearest training sample point in each of the two classes, while allowing a small number of training samples to be on the incorrect side of the classification margin. To solve this constrained convex optimization problem, the Lagrange dual method is used to transform the original optimization problem into its dual form. Specifically, the dual transformation means that each training sample in the original problem corresponds to an inequality constraint (requiring the sample to be correctly classified to the correct side of the classification margin), and a dual variable is introduced for each constraint; this dual variable is the Lagrange multiplier. Let the total number of training samples in the training subset be... Then the dual problem has a total of _n_ Lagrange multipliers, of which the _n_ is _n_1_2_1_2_3_2_3_4_2_3_4_3_4_5_2_3_4_5_6_3_4_5_6_4_5_6_4_5_6_5_6_4_5_6_5_6_5_6_7 ...6_7_5_6 The multiplier is denoted as ( ), each With the Each training sample corresponds one-to-one with the previous one. Each Lagrange multiplier... The value of satisfies It is also subject to an upper bound constraint of a preset penalty coefficient: It must not exceed this upper limit value.
[0091] The physical meaning of Lagrange multipliers lies in the fact that their values directly reflect the geometric position of the corresponding training sample in a high-dimensional orthogonal feature space; specifically, there are three cases, when... , indicating the first A training sample is located on the correct side of the classification margin and its distance to the hyperplane is greater than half of the classification margin. This sample has been correctly classified and does not contribute to the position of the hyperplane. Greater than zero and less than the upper bound of the penalty coefficient, indicating that the first... A training sample lies precisely on the boundary of the classification margin; this sample is a support vector, which plays a direct and indispensable role in determining the position of the hyperplane. Equal to the upper bound of the penalty coefficient, indicating the first A training sample that is inside the classification margin (but still on the correct side of the hyperplane) or has been misclassified by the hyperplane is also a support vector, but is penalized because it is on the wrong side of the classification margin; all The training samples constitute the support vector set of this binary classification sub-model, and the number of support vectors is usually much smaller than the total number of training samples. .
[0092] The optimization objective of the dual problem is to satisfy Equality constraints (where For the first The binary classification labels of each training sample (with values of positive or negative one) and each Maximize all within the interval constraint between zero and the upper bound of the penalty coefficient. The sum minus one-half multiplied by all pairs The sum of ( and All traverse from 1 to The dual quadratic programming problem is numerically solved using a sequential minimum optimization algorithm. The core idea of the sequential minimum optimization algorithm is that, due to equality constraints... The existence of the Lagrange multiplier makes it impossible to update a single multiplier while keeping the other multipliers fixed. Therefore, each time, two Lagrange multipliers are selected to form a working set, and the current values of all other multipliers are kept unchanged. A joint optimization is then performed on these two multipliers. The joint optimization of the two multipliers has an analytical solution, eliminating the need to call a general numerical optimizer, and its computational efficiency is higher than that of a conventional quadratic programming solver. The process of the sequential minimum optimization algorithm is as follows: in the initialization phase, a Lagrange multiplier is assigned to each training sample in the training subset, for a total of... All multipliers are initialized to zero. The bias term is initialized to zero, and the error between the current decision function value and the true label is calculated and cached for each training sample. The outer loop iterates through all... For each training sample, check whether the Lagrange multiplier of each sample satisfies the complementary relaxation condition. The complementary relaxation condition is determined in three ranges: if the multiplier is zero, the product of the decision function output value and the label of the sample must be greater than or equal to 1; if the multiplier is strictly between zero and the upper bound of the penalty coefficient, the product must be exactly equal to 1; if the multiplier is equal to the upper bound of the penalty coefficient, the product must be less than or equal to 1. Samples that do not meet the conditions in the corresponding range are marked as violating samples.
[0093] The inner loop selects the multiplier corresponding to the sample with the largest absolute value of the decision function error from the violation samples as the first multiplier to be optimized in this iteration; then selects the multiplier corresponding to the sample with the largest absolute value of the difference between the errors of the two samples from the remaining samples as the second multiplier; keeping the other multipliers unchanged, the optimal update values of these two multipliers are solved analytically; for the second multiplier, its optimal update value without interval constraints is equal to the current value plus the second sample label multiplied by the difference between the errors of the first and second samples, and then divided by the distance metric between the two samples in the kernel function space; this update value is clipped to a feasible interval determined by both equality constraints and interval constraints, with the clipping rules handled separately based on whether the two sample labels are the same; finally, the update value of the first multiplier is derived from the clipped second multiplier; after updating the two multipliers, the bias term is updated synchronously, and the error cache of all training samples is refreshed; the alternating execution of the outer and inner loops is repeated until the Lagrange multipliers of all training samples satisfy the complementary relaxation condition, and the violation amount does not exceed the preset tolerance error. The basis for this tolerance value is that, in the standardized five-dimensional feature space, the deviation of the hyperplane normal vector corresponding to this tolerance is less than one-thousandth of the classification margin width, and the classification accuracy gain brought by continued convergence is negligible.
[0094] After the algorithm converges, it iterates through all training subsets. From the training samples, samples with Lagrange multipliers strictly greater than zero are selected, forming the support vector set of the current binary classification sub-model. The normal vector of the optimal classifying hyperplane is calculated using this support vector set. The normal vector equals the product of the Lagrange multiplier corresponding to each support vector, the binary label of that support vector, and the feature space representation of that support vector after kernel function mapping. The sum of these three products over all support vectors is then applied. The final value of the bias term is the arithmetic mean of the bias estimates corresponding to all support vectors that satisfy the condition that the multiplier is strictly between zero and the upper bound of the penalty coefficient. The normal vector, bias term, feature data of the support vectors, and the corresponding multipliers of this binary support vector machine sub-model, along with the mapping relationship between the two classes of the sub-model, are stored persistently as a whole. Regarding the selection of the penalty coefficient, the penalty coefficient used to constrain the upper bound of the Lagrange multiplier in the above binary support vector machine model is... The penalty coefficient is a preset value ranging from 0.1 to 10. Physically, this penalty coefficient controls the model's tolerance for misclassification of training samples. A larger penalty coefficient intensifies the penalty for misclassification, narrowing the classification margin and causing the model to fit the training data more accurately. A smaller penalty coefficient allows more training samples to fall within the classification margin or even be misclassified, widening the classification margin and enhancing the model's generalization ability. The selection of this range (0.1 to 10) is based on the fact that in the standardized five-dimensional feature space, the magnitude of the feature values is unified to 1. When the penalty coefficient is 0.1, the model allows approximately 10% of the training samples to be on the wrong side of the classification margin, suitable for robust training scenarios with a small number of mislabeled training samples. When the penalty coefficient is 10, the model almost does not allow misclassification, suitable for scenarios where the training sample labels are highly reliable and the feature separation between categories is good. In the neodymium iron boron permanent magnet rare earth element classification application of this embodiment, a value of 1 is recommended, as this value strikes a balance between the classification margin width and the training set fitting accuracy.
[0095] For all Each binary classification combination executes the complete training process described above one by one. The training process of each sub-model is independent and can be distributed across multiple computing cores for parallel execution. If a sub-model fails to converge after reaching a preset limit of 5000 training iterations, it will backtrack and use the set of parameters with the largest classification margin among all completed iterations of that sub-model as the training result; kernel width parameter The value is obtained through Cross-validation method from candidate parameter set Automatic optimization; the exponential independent variable of the radial basis kernel function is ,in For Euclidean distance The typical value is about 5; when At that time, the exponential independent variable is approximately -0.005, and the kernel function value is... The kernel function values of almost all training samples are close to 1, and the decision function approximates a linear support vector machine; when At that time, the exponential independent variable is approximately -500, and the kernel function value is approximately The kernel function value of each training sample is significantly nonzero only in its own minimal neighborhood.
[0096] The candidate set uniformly covers a kernel width range of five orders of magnitude from approximately linear to extremely localized with a step size of 10, effectively covering the full spectrum from underfitting to overfitting at a typical training scale of tens to hundreds of NdFeB permanent magnet standard samples. The specific execution process of cross-validation is as follows: the standardized training feature vector set is randomly and uniformly divided into... Mutually exclusive subsets ( (take 5 or 10); for each in the candidate set Retrieve values and execute sequentially. Round of training and validation: in the first round wheel( ), with the first A subset is used as the validation set, and the rest... The union of the subsets is used as the training set for this round. The support vector machine classification model is trained, and the classification accuracy of the model on the validation set is calculated. The arithmetic mean of the classification accuracy obtained from the rounds of validation is used as the basis for this. The cross-validation accuracy corresponding to the selected value. Iterate through all candidates in the candidate set. After obtaining the values, select the one with the highest cross-validation accuracy. The value is used as the final kernel width parameter; if multiple values exist... If the same value achieves the highest cross-validation accuracy, the smaller value is preferred to obtain a smoother classification boundary and reduce the risk of overfitting to specific training samples. The following four sets of data are collected and persistently stored to constitute the multidimensional spatial classification topology of the method of this invention. The normal vector, bias term, support vector feature data, and corresponding multipliers of each binary support vector machine sub-model; the mapping relationship between the two classes corresponding to each binary sub-model; the training mean and training standard deviation of the five dimensions recorded in step 502; and the kernel width parameter obtained through cross-validation. value.
[0097] This embodiment employs a one-to-one multi-classification strategy and a cross-validation parameter optimization mode, which can improve the model's ability to distinguish different rare earth element ratios and abnormal states to a certain extent, and reduce the risk of misjudgment caused by small sample features and overlapping features.
[0098] In a preferred embodiment of the present invention, step 6, determining the attribution boundary based on the multidimensional spatial classification topology to obtain an element classification matching degree set; determining the attribution category and content threshold deviation state of the key rare earth elements of the NdFeB permanent magnet based on the element classification matching degree set, and obtaining the classification and anomaly detection results of the key rare earth elements of the NdFeB permanent magnet, may include:
[0099] Step 601: In the multidimensional spatial classification topology, extract the optimal classification hyperplane corresponding to each category, and use the optimal classification hyperplane of each category as the boundary of each category; after collecting the original spectral sequence of the NdFeB permanent magnet sample to be tested and filtering out the background, calculate the instantaneous decay rate of dysprosium, gadolinium, and terbium point by point, and extract the instantaneous decay rate of the dysprosium, gadolinium, and terbium elements to be tested; at the same time, extract the overlapping bands of rare earth elements, calculate the energy area of the overlapping bands and the energy difference between adjacent bands, and accumulate the values of each overlapping band. The band energy area is used to obtain the screening index for the content of rare earth elements to be tested. The five-dimensional feature vector of the tested element is composed of five dimensions: the instantaneous decay rate of dysprosium, the instantaneous decay rate of gadolinium, the instantaneous decay rate of terbium, the overlapping band energy area, and the energy difference between adjacent bands. Specifically, this includes: performing steps 101 to 103 on the NdFeB permanent magnet sample to obtain the multi-channel spectral matrix of the sample; performing steps 201 to 203 to obtain the signal dynamic evolution gradient set matrix of the sample. From the signal dynamic evolution gradient set matrix of the sample, the arithmetic mean of all elements in the first row is taken as the instantaneous decay rate of dysprosium, the arithmetic mean of the second row is taken as the instantaneous decay rate of gadolinium, and the arithmetic mean of the third row is taken as the instantaneous decay rate of terbium; performing steps 301 to 304 extracts the weak spectral line distribution sequence from the sample. Perform the complete operation from step 401 to step 404, calculate the energy area of each overlapping band, and sum them to obtain the screening index of the rare earth element content to be tested.
[0100] Perform steps 405 to 406 to detect anomalous band pairs; extract the last two dimensions of the five-dimensional feature vector of the sample under test, handling two cases; if at least one anomalous band pair is detected in the sample under test (i.e. If the energy difference is not zero, then the pair with the largest energy difference among all anomalous band pairs is selected as the representative anomalous band pair. The sum of the energy areas of the two overlapping bands involved in this representative anomalous band pair is taken as the fourth-dimensional feature component, and the energy difference is taken as the fifth-dimensional feature component. If no anomalous band pair is detected in the sample to be tested (i.e., ...), then... If the value is zero, then the fourth feature component is the sum of the energy areas of all overlapping bands of the sample under test, and the fifth feature component is zero. These five feature values are combined in the same fixed order as in step 501 of the training phase to form the five-dimensional feature vector to be tested. The training mean and training standard deviation of the five dimensions are used to perform standardization on this five-dimensional feature vector: the k-th feature value is subtracted from the k-th dimension training mean, and then divided by the k-th dimension training standard deviation. Take integer values from 1 to 5; after standardization, obtain the standardized five-dimensional feature vector to be tested.
[0101] Step 602: Calculate the distance from the five-dimensional feature vector to be tested to the category assignment boundary, convert the distance of each category into the assignment probability of each category, and collect the assignment probabilities of all categories to obtain the element classification matching degree set, specifically including: for The first in the category Categories Take 1 to (integer values), extracting the first from the multidimensional spatial classification topology. Normal vectors and bias term parameters of all binary classification support vector machine sub-models participating in each category; calculate the standardized five-dimensional feature vectors of the test to the nth... The comprehensive distance to the category boundary is calculated; the comprehensive distance is the minimum value among the distances from the test vector to the hyperplanes of all binary sub-models corresponding to that category; the calculation of the distance to a single hyperplane involves performing an inner product operation between the normal vector of the hyperplane and the test feature vector (i.e., the sum of the products of the corresponding components of the two vectors), adding the bias term of the hyperplane, taking the absolute value of the result, and then dividing it by the magnitude of the normal vector (i.e., the square root of the sum of the squares of the components of the normal vector); the smaller the distance value, the closer the test vector is to the feature space region corresponding to that category in the high-dimensional orthogonal feature space; The overall distance of each category is converted into the probability of belonging. The conversion process is as follows: for each overall distance, take the reciprocal. To avoid division by zero when the overall distance is exactly zero, in the actual calculation, add the overall distance to the probability of belonging. Take the reciprocal of the value after the given value, and use this reciprocal as the intermediate value; take all The sum is obtained by summing the intermediate values of each category. The probability of belonging to the category is equal to the probability of belonging to the category. Divide the median value of each category by the sum. This conversion method guarantees that all... The sum of the probability of belonging to a class equals 1, and the smaller the distance, the greater the probability of belonging to a class. Each attribution probability constitutes the set of element classification matching degrees.
[0102] Step 603: Select the category with the highest belonging probability from the element classification matching degree set, and determine the category with the highest belonging probability as the rare earth element belonging category of the NdFeB permanent magnet sample to be tested. Specifically, this includes: traversing all belonging probability values in the element classification matching degree set, finding the maximum value by comparing them one by one, recording the category label corresponding to the maximum value, and determining the category as the rare earth element belonging category of the NdFeB permanent magnet sample to be tested.
[0103] Step 604: Based on the preset rare earth element content standard threshold corresponding to the rare earth element classification, compare the screening index of the rare earth element content to be tested with the rare earth element content standard threshold. If the screening index of the rare earth element content to be tested exceeds the preset permissible deviation range of the rare earth element content standard threshold, the NdFeB permanent magnet sample to be tested is determined to be a sample with abnormal content threshold deviation. Combine the rare earth element classification and content threshold deviation determination status to obtain the classification and abnormal detection results of key rare earth elements in NdFeB permanent magnets. Specifically, this includes: before the implementation of this method, pre-preparing... Each of the categories is assigned a standard threshold for rare earth element content and a corresponding permissible deviation range; taking the first category as an example... Taking a category as an example, the content standard threshold is determined by converting the standard rare earth element ratio represented by that category into a spectral energy area index. The upper limit of the permissible deviation range is the content standard threshold multiplied by 1 plus the permissible deviation ratio, and the lower limit is the content standard threshold multiplied by 1 minus the permissible deviation ratio. The permissible deviation ratio is in the range of 5% to 15%.
[0104] The basis for the permissible deviation range is as follows: the lower limit of 5% is determined by the measurement repeatability of this method itself; in repeated laser-induced breakdown spectroscopy acquisition of NdFeB permanent magnet samples, the relative standard deviation of the rare earth element content screening index is usually between 3% and 5%. The main sources of error are the submicron-level inhomogeneity of rare earth element distribution in different micro-regions of the sample surface and the fluctuation of plasma excitation conditions caused by the sequential jitter of laser pulse energy; if the permissible deviation is less than 5%, the random fluctuation of the measurement itself may lead to a large number of samples with normal actual content being misjudged as abnormal; the upper limit of 15% is determined by the actual impact threshold of the rare earth total content deviation on the magnetic properties of NdFeB permanent magnets; when the total rare earth content deviates from the nominal value of the formula by more than 15%, the volume fraction of the main phase and the distribution morphology of the rare earth-rich phase at the grain boundaries of the sintered NdFeB permanent magnet will undergo detectable changes, and the corresponding remanence and coercivity can show clearly identifiable deviations in conventional magnetic performance tests. The proportioning deviation is a significant process deviation that should be detected during the mixing and smelting processes, rather than being discovered only during the spectral screening of the finished product. The content standard threshold and permissible deviation ratio corresponding to the sample category determined in step 603 are extracted, and the rare earth element content screening index calculated in step 601 is compared with the permissible range of that category. If the value of the rare earth element content screening index is greater than or equal to the lower limit and less than or equal to the upper limit, the rare earth element content of the sample is considered normal. If the value of the rare earth element content screening index is greater than the upper limit, the content is considered abnormally high. If the value of the rare earth element content screening index is less than the lower limit, the content is considered abnormally low. Finally, the rare earth element category, classification probability value, content threshold deviation judgment status, rare earth element content screening index value, and the compared content standard threshold are combined into a structured detection output result, which is the classification and abnormality detection result of the key rare earth elements in the NdFeB permanent magnet.
[0105] This embodiment achieves intelligent identification of rare earth element classification and abnormal content status in NdFeB samples by converting the attribution probability into high-dimensional spatial distance and combining it with a graded threshold deviation judgment mechanism.
[0106] The above description represents the preferred embodiments of the present invention. It should be noted that those skilled in the art can make improvements and modifications without departing from the principles of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.
Claims
1. A dynamic self-learning classification and anomaly detection method for screening rare earth elements in NdFeB using LIBS, characterized in that, The method includes: Step 1: Obtain the original spectral sequence, extract the characteristic bands containing the transition region between the nickel-copper coating and the substrate, and perform background filtering to obtain a multi-channel spectral matrix; Step 2: Based on the multi-channel spectral matrix, calculate the instantaneous decay rate of the characteristic peak intensity of dysprosium, gadolinium, and terbium as the plasma cools and shifts point by point to obtain the dynamic evolution gradient set of the signal; Step 3: Based on the gradient set of the dynamic evolution of the signal, construct an orthogonal projection space to obtain the matrix intrinsic spectral data vector; based on the matrix intrinsic spectral data vector, extract the overlapping bands of rare earth elements to obtain the weak spectral line distribution sequence. Step 4: Based on the weak spectral line distribution sequence, calculate the total energy area of the overlapping bands of rare earth elements across the entire domain to obtain the rare earth element content screening index; based on the rare earth element content screening index, calculate the energy distribution dispersion between adjacent bands to obtain the abnormal fluctuation data set. Step 5: Based on the abnormal fluctuation data set, construct a multidimensional orthogonal feature space to obtain a multidimensional spatial classification topology. Step 6: Determine the classification boundary based on the multidimensional spatial classification topology to obtain the element classification matching degree set; based on the element classification matching degree set, determine the classification category and content threshold deviation status of the key rare earth elements of NdFeB permanent magnets to obtain the classification and anomaly detection results of the key rare earth elements of NdFeB permanent magnets.
2. The dynamic self-learning classification and anomaly detection method for screening rare earth elements in NdFeB using LIBS as described in claim 1, characterized in that, The original spectral sequence was obtained, and characteristic bands containing the transition region between the nickel-copper plating and the substrate were extracted and background filtering was performed to obtain a multi-channel spectral matrix, including: Laser pulses are emitted point by point along the surface of the NdFeB permanent magnet sample from the coating towards the substrate at preset step sizes, and the full-band spectral intensity signal corresponding to each excitation point is collected to obtain the original spectral sequence. Based on the abrupt drop in intensity of spectral lines at the characteristic wavelength of nickel in the original spectral sequence from the high value in the coating area to the base level in the substrate area, the termination boundary of the nickel-copper coating and the starting boundary of the substrate are calibrated. All spectral data between the termination boundary of the nickel-copper coating and the starting boundary of the substrate are extracted to obtain the characteristic bands containing the transition region of the nickel-copper coating and the substrate. For each characteristic band, a low-order polynomial baseline is fitted one by one for each wavelength channel. The fitted baseline value is then subtracted from the original spectral intensity of each wavelength channel to obtain a multi-channel spectral matrix.
3. The dynamic self-learning classification and anomaly detection method for screening rare earth elements in NdFeB using LIBS as described in claim 2, characterized in that, Based on the multi-channel spectral matrix, the instantaneous decay rate of the characteristic peak intensities of dysprosium, gadolinium, and terbium as the plasma cools is calculated point by point, resulting in a set of dynamic signal evolution gradients, including: The characteristic peak intensity variation sequences of dysprosium, gadolinium, and terbium with plasma cooling were extracted from the multi-channel spectral matrix to obtain the characteristic peak intensity variation sequences of dysprosium, gadolinium, and terbium. The instantaneous decay rate was calculated point by point using the central finite difference method for the intensity shift sequences of dysprosium, gadolinium, and terbium characteristic peaks. The instantaneous decay rates of all points in the dysprosium characteristic peak intensity shift sequence, the instantaneous decay rates of all points in the gadolinium characteristic peak intensity shift sequence, and the instantaneous decay rates of all points in the terbium characteristic peak intensity shift sequence are combined to obtain the signal dynamic evolution gradient set.
4. The dynamic self-learning classification and anomaly detection method for screening rare earth elements in NdFeB using LIBS as described in claim 3, characterized in that, Based on the gradient set of the dynamic evolution of the signal, an orthogonal projection space is constructed to obtain the matrix intrinsic spectrum data vector, including: Calculate the covariance matrix of the gradient set of the dynamic evolution of the signal, and perform eigenvalue decomposition on the covariance matrix to obtain all eigenvalues and corresponding eigenvectors. Sort all eigenvalues in descending order, and take the eigenvectors corresponding to the first preset number of eigenvalues as the basis vector set of the matrix subspace. The space spanned by the basis vector set of the matrix subspace is the orthogonal projection space. Project each column of the multi-channel spectral matrix onto the orthogonal projection space to obtain the matrix projection component corresponding to each column of spectral vector. Subtract the corresponding matrix projection component from each column of spectral vector to obtain the matrix intrinsic spectral data vector.
5. The dynamic self-learning classification and anomaly detection method for screening rare earth elements in NdFeB using LIBS as described in claim 4, characterized in that, Based on the intrinsic spectral data vector of the matrix, the overlapping bands of rare earth elements are extracted to obtain a weak spectral line distribution sequence, including: The characteristic wavelength positions of dysprosium, gadolinium, and terbium are determined from the intrinsic spectral data vector of the matrix. A first preset width is extended to both sides of the characteristic wavelength position of dysprosium to obtain the dysprosium analysis window, a second preset width is extended to both sides of the characteristic wavelength position of gadolinium to obtain the gadolinium analysis window, and a third preset width is extended to both sides of the characteristic wavelength position of terbium to obtain the terbium analysis window. The wavelength overlap region between any two analysis windows in the dysprosium, gadolinium, and terbium element analysis windows is detected one by one. The overlapping wavelength intervals covered by the two analysis windows with wavelength overlap regions are marked as overlapping bands. The spectral intensity values corresponding to each wavelength channel in all overlapping bands are extracted and arranged in ascending order of wavelength to obtain a weak spectral line distribution sequence.
6. The dynamic self-learning classification and anomaly detection method for screening rare earth elements in NdFeB using LIBS as described in claim 5, characterized in that, Based on the weak spectral line distribution sequence, the total energy area of the overlapping bands of rare earth elements is calculated by summing the data across the entire region, resulting in screening indicators for rare earth element content, including: For each overlapping band in the weak spectral line distribution sequence, wavelength intensity coordinate points are formed by the wavelength value and spectral intensity value of each wavelength channel within the overlapping band, and then arranged in ascending order of wavelength to obtain a sequence of wavelength intensity coordinate points; Add a first-end base point at the beginning of the wavelength intensity coordinate point sequence and a last-end base point at the end. The wavelength value of the first-end base point is the wavelength value of the first end of the overlapping band, and the spectral intensity value is zero. The wavelength value of the last-end base point is the wavelength value of the last end of the overlapping band, and the spectral intensity value is zero. Connect the first-end base point, the wavelength intensity coordinate point sequence, and the last-end base point end to end to form a closed figure. The cross product is calculated edge by edge along the boundary of the closed figure. The product of the wavelength value at the starting point of the edge and the spectral intensity value at the ending point of the edge is subtracted from the product of the wavelength value at the ending point of the edge and the spectral intensity value at the starting point of the edge to obtain the cross product. The cross products of all edges of the closed figure are summed and the absolute value is divided by two to obtain the energy area of the overlapping band. By summing up the energy areas of all overlapping bands in the weak spectral line distribution sequence, the rare earth element content screening index is obtained.
7. The dynamic self-learning classification and anomaly detection method for screening rare earth elements in NdFeB using LIBS as described in claim 6, characterized in that, Based on the rare earth element content screening index, the energy distribution dispersion between adjacent bands is calculated to obtain an abnormal fluctuation data set, including: The energy areas of each overlapping band corresponding to the rare earth element content screening index are sorted in ascending order of overlapping band wavelength to obtain an ordered overlapping band energy area sequence. For each pair of adjacent overlapping band energy areas in the ordered overlapping band energy area sequence, the absolute value of the difference between the energy area of the previous overlapping band and the energy area of the next overlapping band is taken to obtain an adjacent band energy difference sequence. Calculate the mean and standard deviation of the energy difference sequence between adjacent bands. Mark the preceding and following overlapping bands corresponding to a single difference value in the energy difference sequence that exceeds the mean plus three times the standard deviation as an anomalous band pair. Collect all anomalous band pairs to obtain the anomalous fluctuation data set.
8. The dynamic self-learning classification and anomaly detection method for screening rare earth elements in NdFeB using LIBS as described in claim 7, characterized in that, Based on the abnormal fluctuation data set, a multidimensional orthogonal feature space is constructed, resulting in a multidimensional spatial classification topology, including: For each abnormal band pair in the abnormal fluctuation data set, the instantaneous decay rates of dysprosium, gadolinium, and terbium corresponding to the abnormal band pair are extracted from the signal dynamic evolution gradient set. Combined with the overlapping band energy area and adjacent band energy difference of the abnormal band pair, a five-dimensional feature vector is formed. The five-dimensional feature vectors are aggregated into a training feature vector set. The mean is normalized to zero and the variance is normalized in each dimension of the training feature vector set to obtain a standardized training feature vector set. The standardized training feature vector set is input into the pre-trained support vector machine classification model. The support vector machine classification model uses the radial basis kernel function to map the standardized training feature vector set to a high-dimensional orthogonal feature space. The optimal classification hyperplane between each category is calculated in the high-dimensional orthogonal feature space to obtain the multi-dimensional classification topology.
9. The dynamic self-learning classification and anomaly detection method for screening rare earth elements in NdFeB using LIBS as described in claim 8, characterized in that, The affiliation boundary is determined based on the multidimensional spatial classification topology, resulting in a set of element classification matching degrees, including: In the multidimensional spatial classification topology, the optimal classification hyperplane corresponding to each category is extracted, and the optimal classification hyperplane of each category is used as the boundary of each category. After collecting the original spectral sequence of the NdFeB permanent magnet sample to be tested and filtering out the background, the instantaneous decay rate of dysprosium, gadolinium, and terbium is calculated point by point. The instantaneous decay rate of dysprosium, gadolinium, and terbium to be tested is extracted. At the same time, the overlapping bands of rare earth elements are extracted, the energy area of the overlapping bands and the energy difference of adjacent bands are calculated, and the energy areas of each overlapping band are accumulated to obtain the screening index of the content of rare earth elements to be tested. The five-dimensional feature vector of the sample is composed of the five-dimensional features of the instantaneous decay rate of dysprosium, gadolinium, and terbium, the energy area of the overlapping bands, and the energy difference of adjacent bands. Calculate the distance from the five-dimensional feature vector to be tested to the boundary of each category, convert the distance of each category into the probability of belonging to each category, and collect the probability of belonging to all categories to obtain the set of element classification matching degree.
10. The dynamic self-learning classification and anomaly detection method for screening rare earth elements in NdFeB using LIBS as described in claim 9, characterized in that, Based on the element classification matching degree set, the classification and content threshold deviation status of key rare earth elements in NdFeB permanent magnets are determined, resulting in the classification and anomaly detection results of key rare earth elements in NdFeB permanent magnets, including: Select the category with the highest probability of belonging from the element classification matching degree set, and determine the rare earth element belonging category of the NdFeB permanent magnet sample to be tested as the category of rare earth element belonging. Based on the preset rare earth element content standard threshold corresponding to the rare earth element classification, the screening index of the rare earth element content to be tested is compared with the rare earth element content standard threshold. If the screening index of the rare earth element content to be tested exceeds the preset permissible deviation range of the rare earth element content standard threshold, the neodymium iron boron permanent magnet sample to be tested is judged as a sample with abnormal content threshold deviation. The rare earth element classification and content threshold deviation judgment status are combined to obtain the classification and abnormal detection results of key rare earth elements in neodymium iron boron permanent magnets.