A method of food inspection based on x-rays
By monitoring and adjusting the X-ray emitter power in real time, the problem of inaccurate crystal shape caused by sample temperature changes in X-ray detection was solved, ensuring the accuracy of crystalline food detection.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-19
- Publication Date
- 2026-03-17
Smart Images

Figure CN121027184B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of detection, and in particular to an X-ray-based food detection method. Background Technology
[0002] Currently, some foods are composed of crystals, such as crystalline salt and crystalline sugar. The same type of crystalline food may have multiple crystal forms, and different crystal forms determine different properties of the food, including differences in key attributes such as solubility, stability, digestibility, and taste. Therefore, it is necessary to test the specific crystal form of a food to determine whether its properties meet the requirements. X-ray diffraction (XRD) is an analytical method that uses X-rays to detect the structure of crystals or molecules. It is widely used in the trace detection of crystalline substances and can be used for phase detection of crystalline foods.
[0003] The principle of XRD is that when X-rays irradiate a crystal, they are scattered by the regularly arranged atoms in the crystal. When the optical path difference of the scattered light meets the condition of being an integer multiple of the wavelength, coherent superposition (constructive interference) occurs, forming diffraction peaks at specific angles. The structural information of the crystal can then be inferred from the position, intensity, and shape of the diffraction peaks. However, X-rays are high-frequency electromagnetic waves that carry energy, and XRD detection takes a long time (usually tens of minutes). When irradiating a sample, the sample converts some of the energy into heat through processes such as absorption and photoelectric effect, causing excessive temperature changes in the sample. This leads to structural disturbances in the sample's crystal, resulting in changes in the shape and position of the diffraction peaks. Consequently, errors can easily occur during comparison, making it impossible to accurately determine the crystal form of food. Summary of the Invention
[0004] Therefore, it is necessary to provide an X-ray-based food detection method to address the aforementioned problems.
[0005] This invention is implemented as follows: it provides an X-ray-based food detection method, the method comprising:
[0006] S1: Take a set mass of the crystalline food to be tested and pre-process it to obtain a food sample;
[0007] S2: After detecting the initial temperature of the food sample, place the food sample on the sample stage of the XRD diffractometer.
[0008] S3: After the detection begins, monitor the power of the X-ray emitter and the temperature of the space in the XRD diffractometer, and retrieve the thermal conductivity parameters of the food sample.
[0009] S4: At each moment during the detection process, take that moment as the current moment, and determine the temperature prediction curve of the food sample within a set time period after the current moment based on the power of the X-ray emitter, thermal conductivity parameters, initial temperature, and ambient temperature.
[0010] S5: Based on the temperature prediction curve, determine whether there is any moment in the future set time period where the temperature of the food sample deviates from the initial temperature by more than the set deviation. If not, adjust the power of the X-ray transmitter so that the temperature of the food sample at each moment in the future set time period deviates from the initial temperature by less than the set deviation. If so, do not adjust the power of the X-ray transmitter.
[0011] S6: After the detection is completed, the peak height of the diffraction peaks in the diffraction pattern is adjusted according to the power change of the X-ray emitter during the detection process;
[0012] S7: Compare the adjusted diffraction pattern with the standard pattern to determine the crystal form of the crystalline food.
[0013] Preferably, the thermal conductivity parameters include the sample's specific heat capacity, thermal conductivity, and energy absorption efficiency of the sample to X-rays; the initial time is time 0, the initial temperature is the sample temperature corresponding to time 0, and the space temperature is considered constant; let the current time be time j, and the time after the current time with a set duration be time k; the temperature prediction curve of the food sample within the set duration after the current time is determined based on the X-ray emitter's power, thermal conductivity parameters, initial temperature, and space temperature, including:
[0014] S41: Let i = 1;
[0015] S42: Based on The corresponding sample temperature and space temperature were calculated from... arrive The amount of heat released is determined based on the sample's energy absorption efficiency of X-rays and the power of the X-ray emitter. arrive The heat absorbed during the corresponding time period is used to calculate the heat. Net heat absorption;
[0016] S43: Based on Determination of sample temperature The sample temperature;
[0017] S44: Let i = i + 1, execute steps S42 to S44 until the i-th step is obtained. The corresponding temperature;
[0018] S45: Use a smooth curve to... arrive Temperature connection obtained arrive The temperature curve, extracted from the temperature curve arrive The segment is used to obtain the temperature prediction curve of the food sample within a set time period after the current time.
[0019] Preferably, the following formula is used to calculate from arrive Heat release:
[0020]
[0021] in, Let k be the heat released, and k be the thermal conductivity of the sample. This represents the heat dissipation area of the sample. for The corresponding sample temperature, for The corresponding sample temperature.
[0022] Preferably, it is calculated using the following formula arrive Heat absorption during the corresponding time period:
[0023]
[0024] in, To absorb heat, The X-ray energy absorption efficiency of the sample. This refers to the power of the X-ray emitter.
[0025] Preferably, the net heat absorption is calculated using the following formula:
[0026]
[0027] in, Net heat absorption;
[0028] Calculated using the following formula Sample temperature:
[0029]
[0030] in, For the quality of the sample, is the specific heat capacity of the sample.
[0031] Preferably, adjusting the power of the X-ray emitter includes:
[0032] S51: Determine the current power of the X-ray emitter;
[0033] S52: Subtract the minimum control power from the current power to obtain the alternative power;
[0034] S53: Let i=j, and execute steps S42 to S44 based on the candidate power to obtain the power from the candidate power. arrive Temperature prediction curve;
[0035] S54: Determine that the temperature deviation of each point in the temperature prediction curve from the initial temperature is less than the set deviation. If so, determine the alternative power as the target power. If not, subtract the minimum control power from the alternative power to obtain the updated alternative power. Execute steps S53 to S54 until the target power is obtained.
[0036] S55: Adjust the power of the X-ray emitter to the target power.
[0037] Preferably, during the detection process, a time-power curve of the X-ray emitter is generated in real time; adjusting the peak height of the diffraction peaks in the diffraction pattern based on the power changes of the X-ray emitter during the detection process includes:
[0038] Retrieve the XRD diffraction pattern obtained from the detection and convert the abscissa of the XRD diffraction pattern into time.
[0039] Retrieve the generated time-power curve and align the abscissa of the time-power curve with the abscissa of the XRD diffraction pattern.
[0040] The power of the initial segment of the time-power curve is determined as the base power;
[0041] For each subsequent power segment after adjustment, determine the segment power of that power segment;
[0042] Retrieve the power-intensity curve, determine the first intensity corresponding to the power of this segment and the second intensity corresponding to the base power on the power-intensity curve, and calculate the ratio of the first intensity to the second intensity to obtain the adjustment ratio;
[0043] Identify the diffraction curve segment in the XRD diffraction pattern corresponding to the power range, and then adjust the ordinate value of the transverse diffraction curve segment according to the adjustment ratio to achieve peak height adjustment of the diffraction curve segment.
[0044] Preferably, adjusting the ordinate value of the transverse diffraction curve segment according to the adjustment ratio includes:
[0045] For each point on the diffraction curve segment, determine the ordinate value of that point;
[0046] Adjust the ordinate value of this point using the following formula:
[0047]
[0048] in, The adjusted ordinate value. The original ordinate value. To adjust the ratio.
[0049] Preferably, the power-intensity curve is a predetermined curve, and the determination steps include:
[0050] Place the standard sample corresponding to the crystalline food to be tested on the sample stage of the XRD diffractometer.
[0051] Generate a power-intensity coordinate system and retrieve the power range of the X-ray emitter;
[0052] Run the X-ray emitter at the lowest power in the power range, determine the corresponding intensity, obtain a coordinate point, and mark it on the power-intensity coordinate system;
[0053] After pausing for the set duration, the X-ray emitter is run at the next power in the power range to determine the corresponding intensity. A coordinate point is obtained and marked on the power-intensity coordinate system. This step is repeated until the coordinate point corresponding to the maximum power in the power range is obtained.
[0054] Generate a fitted line for all labeled coordinate points on the power-intensity coordinate system to obtain the power-intensity curve.
[0055] This invention provides an X-ray-based food detection method comprising: pre-processing a predetermined mass of crystalline food to be tested to obtain a food sample; after detecting the initial temperature of the food sample, placing the food sample on the sample stage of an XRD diffractometer; after starting the detection, monitoring the power of the X-ray emitter and the ambient temperature within the XRD diffractometer, and retrieving the thermal conductivity parameters of the food sample; at each moment during the detection process, taking that moment as the current moment, and determining a temperature prediction curve for the food sample within a predetermined time period after the current moment based on the X-ray emitter power, thermal conductivity parameters, initial temperature, and ambient temperature; determining, based on the temperature prediction curve, whether there is any moment within the predetermined time period where the temperature deviation of the food sample from the initial temperature exceeds a predetermined deviation; if not, adjusting the power of the X-ray emitter to ensure that the food sample temperature within the predetermined time period is within the predetermined range. If the temperature deviation from the initial temperature at any given moment within the specified time is less than the set deviation, then the power of the X-ray emitter is not adjusted. After the detection is completed, the peak height of the diffraction peaks in the diffraction pattern is adjusted based on the power change of the X-ray emitter during the detection process. The adjusted diffraction pattern is compared with the standard pattern to determine the crystal form of the crystalline food. In this application, when performing XRD detection on a food sample, the temperature change within the set time period can be predicted in real time to determine whether the sample temperature will deviate too much. If so, the power of the X-ray emitter is adjusted accordingly, thereby adjusting the net heat absorption of the sample to reduce the temperature deviation to a smaller extent. This ensures that the sample temperature remains around the initial temperature and that the crystal form does not change during the detection process, thus guaranteeing the accuracy of the sample detection. Attached Figure Description
[0056] Figure 1 This is a flowchart of an X-ray-based food detection method provided in one embodiment;
[0057] Figure 2 This is a diagram illustrating the application environment of an X-ray-based food detection method in one embodiment.
[0058] Figure 3 This is a schematic diagram of the temperature prediction curve of an X-ray-based food detection method in one embodiment;
[0059] Figure 4 This is a schematic diagram illustrating peak height adjustment in an X-ray-based food detection method in one embodiment. Detailed Implementation
[0060] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.
[0061] It is understood that the terms "first," "second," etc., used in this invention may be used to describe various elements herein, but unless specifically stated otherwise, these elements are not limited by these terms. These terms are used only to distinguish one element from another. For example, without departing from the scope of this invention, a first script may be referred to as a second script, and similarly, a second script may be referred to as a first script.
[0062] like Figure 1 As shown, in one embodiment, an X-ray-based food detection method is proposed, the method comprising:
[0063] S1: Take a set mass of the crystalline food to be tested and pre-process it to obtain a food sample;
[0064] S2: After detecting the initial temperature of the food sample, place the food sample on the sample stage of the XRD diffractometer.
[0065] S3: After the detection begins, monitor the power of the X-ray emitter and the temperature of the space in the XRD diffractometer, and retrieve the thermal conductivity parameters of the food sample.
[0066] S4: At each moment during the detection process, take that moment as the current moment, and determine the temperature prediction curve of the food sample within a set time period after the current moment based on the power of the X-ray emitter, thermal conductivity parameters, initial temperature, and ambient temperature.
[0067] S5: Based on the temperature prediction curve, determine whether there is any moment in the future set time period where the temperature of the food sample deviates from the initial temperature by more than the set deviation. If not, adjust the power of the X-ray transmitter so that the temperature of the food sample at each moment in the future set time period deviates from the initial temperature by less than the set deviation. If so, do not adjust the power of the X-ray transmitter.
[0068] S6: After the detection is completed, the peak height of the diffraction peaks in the diffraction pattern is adjusted according to the power change of the X-ray emitter during the detection process;
[0069] S7: Compare the adjusted diffraction pattern with the standard pattern to determine the crystal form of the crystalline food.
[0070] In this embodiment, steps S1 and S2 are performed by personnel, while steps S3 to S7 are performed by computer equipment. The computer equipment can be an independent physical server or terminal, or a server cluster consisting of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud servers, cloud databases, cloud storage, and CDN. Figure 2As shown, the computer equipment is connected to the XRD diffractometer, which can then control the XRD diffractometer to perform detection, control the power of the X-ray emitter of the XRD diffractometer during the detection process, and obtain the XRD diffraction pattern generated by the detection from the XRD diffractometer.
[0071] In this embodiment, the set mass range can be 2g~5g; the crystalline food to be tested can be crystalline salt, crystalline sugar, etc.; the pretreatment process mainly includes sieving using standard metal / nylon sieves of different apertures (selecting the sieve mesh number according to the particle size of the sample, such as 100 mesh, 200 mesh), collecting the target sample passing through the sieve, and discarding macroscopic impurities on the sieve; using an agate mortar (to avoid metal contamination, agate has high hardness and is chemically inert, and does not react with the sample), or a planetary ball mill (used for batch processing, selecting agate balls / alumina balls, controlling the ball milling time to 1-5 minutes to avoid over-grinding leading to amorphous crystals); after grinding, sieving through a 200-300 mesh sieve to ensure uniform sample particle size (XRD usually requires a particle size <5μm, sieving can remove large particles that are not finely ground); pouring the ground powder into the mortar and gently mixing for 1 minute, or using a vortex shaker to shake for 30 seconds to ensure uniform sample composition (to avoid local particle size differences affecting the detection results).
[0072] In this embodiment, a high-sensitivity thermocouple can be selected to detect the initial temperature of the food sample, such as a nickel-chromium-copper-nickel thermocouple (Type E thermocouple), with a detection accuracy of ±0.1℃. A temperature sensor is installed inside the XRD diffractometer to detect the temperature within the instrument. This sensor can communicate with a computer to transmit the detected temperature. The XRD diffractometer also incorporates a built-in temperature control system, such as a semiconductor temperature controller (TEC) or a precision heating / cooling cycle system, to achieve precise constant temperature within a narrow range near room temperature (e.g., 25℃ ± 0.1℃), providing a stable temperature environment for detection.
[0073] In this embodiment, the set duration can be 30 seconds or other durations, which are not limited here; the set temperature can be 10°C (for crystalline sugar), which is an optional implementation method depending on the specific test sample, and is not limited here. The set temperature is set to a temperature that can keep the crystal shape of the sample stable without change; this embodiment can predict the temperature curve within the set duration after each moment in the detection process based on temperature parameters (initial temperature, ambient temperature), thermal conductivity parameters of the sample, and power of the X-ray emitter, thereby determining whether the temperature within the set duration after that moment will deviate from the initial temperature by more than the set deviation. If it does, it means that the crystal shape of the food sample may change within the set duration in the future, resulting in detection deviation. At this time, the computer equipment By adjusting the power of the X-ray emitter, the net heat absorption of the sample is reduced, keeping the temperature deviation within the initial set deviation range. This ensures that the crystal form of the sample does not change significantly, and that the diffraction peaks in the sample's diffraction pattern do not change, thus guaranteeing the accuracy of the detection. After the detection is completed, since the power of the X-ray emitter was adjusted during the detection process, and since the peak height of the diffraction peaks in the diffraction pattern (corresponding to the intensity of the diffracted light) is positively correlated with the power of the X-ray emitter, the height of the diffraction peaks can be adjusted accordingly based on the power change of the X-ray emitter, restoring the diffraction conditions corresponding to each diffraction peak to a consistent state. The core principle of determining the crystal form of crystalline foods based on XRD diffraction patterns is the 'fingerprint' diffraction characteristics of crystals. Different crystal forms (such as α / β type of sucrose and β-V / β-VI type of cocoa butter) have unique X-ray diffraction peaks (peak position, peak intensity, peak shape). By comparing the "characteristic signals" of the diffraction peaks with diffraction data from a standard database or known crystal forms, qualitative and quantitative analysis of the crystal form can be achieved.
[0074] In this application, when performing XRD testing on food samples, the temperature change within a set time period can be predicted in real time to determine whether the sample temperature will deviate too much. If so, the power of the X-ray emitter is adjusted accordingly, thereby adjusting the net heat absorption of the sample and reducing the temperature deviation to a smaller extent. This ensures that the sample temperature remains around the initial temperature and that its crystal form does not change during the testing process, thus guaranteeing the accuracy of the sample testing.
[0075] As a preferred embodiment, such as Figure 3As shown, the thermal conductivity parameters include the sample's specific heat capacity, thermal conductivity, and energy absorption efficiency of the sample to X-rays; the initial time is time 0, the initial temperature is the sample temperature corresponding to time 0, and the space temperature is considered constant; let the current time be time j, and the time after the current time with a set duration be time k; the temperature prediction curve of the food sample within the set duration after the current time is determined based on the X-ray emitter power, thermal conductivity parameters, initial temperature, and space temperature, including:
[0076] S41: Let i = 1;
[0077] S42: Based on The corresponding sample temperature and space temperature were calculated from... arrive The amount of heat released is determined based on the sample's energy absorption efficiency of X-rays and the power of the X-ray emitter. arrive The heat absorbed during the corresponding time period is used to calculate the heat. Net heat absorption;
[0078] S43: Based on Determination of sample temperature The sample temperature;
[0079] S44: Let i = i + 1, execute steps S42 to S44 until the i-th step is obtained. The corresponding temperature;
[0080] S45: Use a smooth curve to... arrive Temperature connection obtained arrive The temperature curve, extracted from the temperature curve arrive The segment is used to obtain the temperature prediction curve of the food sample within a set time period after the current time.
[0081] Calculate from using the following formula arrive Heat release:
[0082]
[0083] in, Let k be the heat released, and k be the thermal conductivity of the sample. This represents the heat dissipation area of the sample. for The corresponding sample temperature, for The corresponding sample temperature.
[0084] Calculated using the following formula arrive Heat absorption during the corresponding time period:
[0085]
[0086] in, To absorb heat, The X-ray energy absorption efficiency of the sample. This refers to the power of the X-ray emitter.
[0087] Calculate the net heat absorption using the following formula:
[0088]
[0089] in, Net heat absorption;
[0090] Calculated using the following formula Sample temperature:
[0091]
[0092] in, For the quality of the sample, is the specific heat capacity of the sample.
[0093] In this embodiment, the interval between moments can be 1 second or other durations, which are not limited here; the thermal conductivity and specific heat capacity of the sample are physical properties of the sample itself, which can be determined by referring to tables (pre-set tables of thermal conductivity and specific heat capacity of various substances); the energy absorption efficiency of the sample to X-rays can be measured by pre-experimentation. The measurement steps include: measuring the intensity I0 of X-rays directly irradiating the detector when there is no sample (multiple measurements are required to take the average value to reduce noise); taking a standard of the crystalline food to be tested and pre-treating the standard to obtain a standard sample; placing the sample in the X-ray path (ensuring that the sample completely covers the light spot) and measuring the intensity I of the X-rays after penetration; the absorption ratio = 1 - I / I0, that is, the actual absorption efficiency; in this embodiment, a sample placement area of a set size is set on the sample stage. During detection, the food sample is laid in the sample placement area so that the food sample forms the same shape as the sample placement area, thereby determining the area of the food sample, that is, the heat dissipation area.
[0094] In this embodiment, adjusting the power of the X-ray emitter includes:
[0095] S51: Determine the current power of the X-ray emitter;
[0096] S52: Subtract the minimum control power from the current power to obtain the alternative power;
[0097] S53: Let i=j, and execute steps S42 to S44 based on the candidate power to obtain the power from the candidate power. arrive Temperature prediction curve;
[0098] S54: Determine that the temperature deviation of each point in the temperature prediction curve from the initial temperature is less than the set deviation. If so, determine the alternative power as the target power. If not, subtract the minimum control power from the alternative power to obtain the updated alternative power. Execute steps S53 to S54 until the target power is obtained.
[0099] S55: Adjust the power of the X-ray emitter to the target power.
[0100] In this embodiment, since the X-ray transmitter is controlled by a computer device, the computer device can acquire the power of the X-ray transmitter in real time; the power range of the X-ray transmitter is 1kW~4kW; the minimum adjustable power can be 0.1kW, which is determined by adjusting the parameters of the specific device; based on the alternative power... arrive The temperature prediction curve, i.e. Generate starting point arrive The temperature prediction curve is calculated in step S42. arrive During the corresponding period of heat absorption, Alternate power is used.
[0101] As a preferred embodiment, such as Figure 4 As shown, during the detection process, the time-power curve of the X-ray emitter is generated in real time; the peak height of the diffraction peaks in the diffraction pattern is adjusted based on the power changes of the X-ray emitter during the detection process, including:
[0102] Retrieve the XRD diffraction pattern obtained from the detection and convert the abscissa of the XRD diffraction pattern into time.
[0103] Retrieve the generated time-power curve and align the abscissa of the time-power curve with the abscissa of the XRD diffraction pattern.
[0104] The power of the initial segment of the time-power curve is determined as the base power;
[0105] For each subsequent power segment after adjustment, determine the segment power of that power segment;
[0106] Retrieve the power-intensity curve, determine the first intensity corresponding to the power of this segment and the second intensity corresponding to the base power on the power-intensity curve, and calculate the ratio of the first intensity to the second intensity to obtain the adjustment ratio;
[0107] Identify the diffraction curve segment in the XRD diffraction pattern corresponding to the power range, and then adjust the ordinate value of the transverse diffraction curve segment according to the adjustment ratio to achieve peak height adjustment of the diffraction curve segment.
[0108] Adjusting the ordinate value of the transverse diffraction curve segment according to the adjustment ratio includes:
[0109] For each point on the diffraction curve segment, determine the ordinate value of that point;
[0110] Adjust the ordinate value of this point using the following formula:
[0111]
[0112] in, The adjusted ordinate value. The original ordinate value. To adjust the ratio.
[0113] The power-intensity curve is a predetermined curve, and the determination steps include:
[0114] Place the standard sample corresponding to the crystalline food to be tested on the sample stage of the XRD diffractometer.
[0115] Generate a power-intensity coordinate system and retrieve the power range of the X-ray emitter;
[0116] Run the X-ray emitter at the lowest power in the power range, determine the corresponding intensity, obtain a coordinate point, and mark it on the power-intensity coordinate system;
[0117] After pausing for the set duration, the X-ray emitter is run at the next power in the power range to determine the corresponding intensity. A coordinate point is obtained and marked on the power-intensity coordinate system. This step is repeated until the coordinate point corresponding to the maximum power in the power range is obtained.
[0118] Generate a fitted line for all labeled coordinate points on the power-intensity coordinate system to obtain the power-intensity curve.
[0119] In this embodiment, the vertical axis of the XRD diffraction pattern represents the intensity of the diffracted light, and the horizontal axis represents the 2θ value. The XRD diffractometer typically operates in continuous scanning mode, with the detector moving at a constant speed (e.g., 2° / min, 5° / min) from the initial 2θ to the final 2θ, while continuously acquiring diffraction signals. Time and 2θ are linearly related (with a fixed speed, the longer the time, the larger the swept 2θ range). The detection time corresponding to a specific 2θ value essentially matches the "time axis" with the "2θ scanning axis" using the device's scanning parameters. Because the scanning speed v (unit: ° / min or ° / s, i.e., the 2θ angle swept per minute / second) is constant, the relationship between time and 2θ is "sweeped 2θ angle = scanning speed × time". Specific steps are as follows:
[0120] Initial 2θ: θ0 (e.g., 5°);
[0121] Step size: Δθ (e.g., 0.02°, which is a 2θ interval for each step).
[0122] Dwell time for each step: t1 (e.g., 1s, meaning 1 second for each 2θ point).
[0123] The index of the 2θ point: n (n=0, 1, 2, ..., n=0 corresponds to the initial θ0);
[0124] The position of the nth 2θ point: θ n =θ0+n×Δθ;
[0125] The acquisition time of the nth 2θ point: t n =n×t1 (Since each point is sampled at time t1, the 0th point starts at t=0 and ends at t=t1; the 1st point starts at t=t1 and ends at t=2t1, and so on).
[0126] Example:
[0127] Assume the test parameters are: θ0=5°, Δθ=0.02°, t1=1s, and termination θ=90°.
[0128] The position of the 100th 2θ point (n=100): θ 100 =5° + 100 × 0.02° = 7°;
[0129] The acquisition time at this point is: starting at t=100×1s=100s and ending at t=101s (that is, the signal acquired within 100~101 seconds is 2θ=7°).
[0130] To find the time corresponding to 2θ=10°: first calculate n=(10°-5°) / 0.02°=250, therefore the acquisition time is t=250×1s=250s (start)~251s (end).
[0131] In this embodiment, the time-power curve is generated in real time by the computer equipment based on the power changes of the X-ray emitter monitored during the detection process; the ambient temperature during the experiment for determining the power-intensity curve is consistent with the ambient temperature inside the XRD during the actual XRD detection; the power range can be 1kW~4kW, so the minimum power is 1kW, if the minimum interval of power adjustment (i.e. the power step interval) is 0.1kW, then the next power is 1.1kW, and so on, until the maximum power of 4kW is reached.
[0132] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0133] The embodiments described above are merely illustrative of several implementations of the present invention, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of the present invention. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of the present invention, and these modifications and improvements all fall within the scope of protection of the present invention. Therefore, the scope of protection of this patent should be determined by the appended claims.
Claims
1. A method of X-ray based food inspection, characterized in that The method comprises: S1: taking a set quality of a to-be-tested crystalline food for pretreatment to obtain a food sample; S2: detecting the initial temperature of the food sample, and then placing the food sample on a sample table of an XRD diffractometer; S3: after starting detection, monitoring the power of an X-ray emitter and the space temperature in the XRD diffractometer, and calling the thermal conductivity parameter of the food sample; S4: at each moment during the detection, regarding the moment as a current moment, determining a temperature prediction curve of the food sample within a set time length after the current moment according to the power of the X-ray emitter, the thermal conductivity parameter, the initial temperature, and the space temperature; S5: determining whether there is any moment within the set time length in the future at which the temperature of the food sample deviates from the initial temperature by more than a set deviation according to the temperature prediction curve, and if not, regulating the power of the X-ray emitter so that the temperature of the food sample at each moment within the set time length in the future deviates from the initial temperature by less than the set deviation, and if so, not regulating the power of the X-ray emitter; S6: after completing the detection, adjusting the peak height of a diffraction peak in a diffraction spectrum according to the power change of the X-ray emitter during the detection; S7: comparing the adjusted diffraction spectrum with a standard spectrum to determine the crystal form of the crystalline food; During the detection, a moment-power curve of the X-ray emitter is generated in real time; adjusting the peak height of the diffraction peak in the diffraction spectrum according to the power change of the X-ray emitter during the detection comprises: calling the XRD diffraction spectrum obtained through the detection, and converting the abscissa of the XRD diffraction spectrum into a moment; calling the generated moment-power curve, and aligning the abscissa of the moment-power curve with the abscissa of the XRD diffraction spectrum; determining the power of the initial section of the moment-power curve as a basic power; for each power section after the subsequent regulation, determining the section power of the power section; calling the power-intensity curve, determining a first intensity corresponding to the section power and a second intensity corresponding to the basic power on the power-intensity curve, and calculating the ratio of the first intensity to the second intensity to obtain an adjustment ratio; identifying the diffraction curve section corresponding to the power section in the XRD diffraction spectrum, and then adjusting the ordinate value of the horizontal diffraction curve section according to the adjustment ratio to realize the peak height adjustment of the diffraction curve section.
2. The method of claim 1, wherein, The thermal conductivity parameter comprises the specific heat capacity, the thermal conductivity, and the energy absorption efficiency of the sample to X-rays; the initial moment is the 0th moment, and the initial temperature is the sample temperature corresponding to the 0th moment; the current moment is the jth moment, and the moment within the set time length after the current moment is the kth moment; determining the temperature prediction curve of the food sample within the set time length after the current moment according to the power of the X-ray emitter, the thermal conductivity parameter, the initial temperature, and the space temperature comprises: S41: let i = 1; S42: The heat release amount from to corresponding to the sample temperature and the space temperature is calculated from the energy absorption efficiency of the sample to the X-ray and the power of the X-ray emitter to the heat absorption amount of the corresponding period, thereby calculating the net heat absorption amount of ; S43: determining the sample temperature in accordance with the sample temperature; S44: let i = i + 1, execute step S42 to step S44 until the i-th corresponding temperature; S45: connecting the temperatures from to with a smooth curve to obtain a temperature curve from to , and cutting a section from the temperature curve from to to obtain a temperature prediction curve for the food sample for a set time duration after the current time.
3. The method of claim 2, wherein, The amount of heat released from to is calculated by the following equation: wherein, Q is the heat dissipated, k is the thermal conductivity of the sample, A is the heat dissipation area of the sample, Q is the corresponding sample temperature, Q is the corresponding sample temperature.
4. The method of claim 3, wherein, The heat absorption quantity of the corresponding period is calculated by the following formula to the heat absorption quantity of the corresponding period is calculated by the following formula wherein, is the amount of heat absorbed, is the X-ray energy absorption efficiency of the sample, is the power of the X-ray emitter.
5. The method of claim 4, wherein, calculating the net heat absorption amount by the following formula: wherein, Qnet is the net heat absorbed; The sample temperature is calculated by the following equation of the sample: wherein, is the mass of the sample, is the specific heat capacity of the sample.
6. The method of claim 2, wherein, regulating the power of the X-ray emitter comprises: S51: determining the current power of the X-ray emitter; S52: subtracting the minimum regulated power from the current power to obtain a candidate power; S53: let i = j, perform steps S42 to S44 based on the alternative power, thereby obtaining a temperature prediction curve from to based on the alternative power; S54: judging whether the deviation of each point in the temperature prediction curve from the initial temperature is less than the set deviation, if yes, determining the candidate power as the target power, if no, subtracting the minimum regulating power from the candidate power to obtain an updated candidate power, executing steps S53 to S54 until the target power is obtained; S55: adjusting the power of the X-ray emitter to the target power.
7. The method of claim 1, wherein, Adjusting the ordinate values of the horizontal diffraction curve segments according to the adjustment ratio comprises: For each point on the diffraction curve segment, determining the ordinate value of the point; Adjusting the ordinate value of the point by the following formula: wherein is the adjusted ordinate value, is the unadjusted ordinate value, is the adjustment ratio.
8. The method of claim 7, wherein, The power-intensity curve is a predetermined curve, and the determining step comprises: placing a standard sample corresponding to the crystalline food to be tested on the sample table of the XRD diffractometer; generating a power-intensity coordinate system and calling the power range of the X-ray emitter; running the X-ray emitter at the lowest power of the power range to determine the corresponding intensity to obtain a coordinate point, which is marked on the power-intensity coordinate system; after pausing for a set period of time, running the X-ray emitter at the next power of the power range to determine the corresponding intensity to obtain a coordinate point, which is marked on the power-intensity coordinate system, and repeatedly executing this step until the coordinate point corresponding to the maximum power of the power range is obtained; generating a fitting line of all the marked coordinate points on the power-intensity coordinate system to obtain the power-intensity curve.
Citation Information
Patent Citations
Method for measuring focus heat effect and heat damage of Raman probe
CN120629108A