Injection casting pressure control method, system and equipment for semi-solid magnesium alloy
By analyzing the grayscale image of magnesium alloy products, constructing defect assessment values, and adjusting the injection casting pressure in real time, the problem of lag in injection casting pressure regulation in semi-solid magnesium alloy production is solved, and production stability and quality are improved.
Patent Information
- Application Number
- CN202510116807.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-23
- Publication Date
- 2025-09-05
- Estimated Expiration
- 2045-01-23
AI Technical Summary
In the existing technology, the pressure control method for semi-solid magnesium alloy injection casting has a long response time and is difficult to adjust in time, resulting in production quality problems such as porosity, cold shut and poor filling.
By analyzing the edge change rate and distribution in the grayscale image of magnesium alloy products, the first and second defect evaluation values are constructed. Combined with the grayscale change difference and edge distribution value, the urgency of pressure adjustment is determined, and the PID control algorithm is used to adjust the injection casting pressure in real time.
The timeliness of injection casting pressure adjustment is achieved, the production stability and quality of magnesium alloy products are improved, the lag of traditional methods is avoided, and product quality is ensured.
Smart Images

Figure CN120038295B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of high-quality magnesium material manufacturing, and specifically to an injection casting pressure control method, system, and equipment for semi-solid magnesium alloys. Background Art
[0002] With the development of science and technology, the use of alloys has become increasingly widespread. Among them, semi-solid magnesium alloys are increasingly used in automotive structural parts and 3C products due to their light weight and high strength. Since most magnesium alloys have a hexagonal close-packed structure (HCP), low symmetry, few room temperature slip systems, and poor room temperature plastic deformation and pressure forming capabilities, the current molding process for magnesium alloy structural parts is mainly based on semi-solid injection molding. In the process of semi-solid injection molding, one of the important factors affecting the production quality of magnesium alloys is the control of injection molding pressure. When the molten material is injected into the mold cavity, due to the rapid cooling rate of the material, it is necessary to reach a certain injection molding pressure to ensure that the injection speed meets the standard and the product is fully filled. Too high or too low injection molding pressure will cause product quality problems, such as pores, cold shuts, and poor filling. Therefore, high-response and high-precision injection molding pressure control is required to ensure the production quality of magnesium alloys.
[0003] Currently, the parameter adjustment method for injection casting pressure control is usually numerical simulation and analysis of the metallographic structure of the product, thereby evaluating the current production quality and the suitability of the parameters. However, the numerical simulation method is usually carried out in the early stage of production and cannot be adapted to all production environments. The method of analyzing the metallographic structure of the product requires a complicated testing process. Ultimately, the control and adjustment response time of the injection casting pressure using the above two methods is long, there is a significant lag, and it is difficult to adjust the injection casting pressure in a timely manner. Summary of the Invention
[0004] In a first aspect, an embodiment of the present application provides a method for controlling injection casting pressure of a semi-solid magnesium alloy, the method comprising the following steps:
[0005] Obtain grayscale images of magnesium alloy products produced multiple times before the current semi-solid magnesium alloy injection casting process;
[0006] Extract all edges in the grayscale image of the magnesium alloy product produced each time, analyze the rate of change of the grayscale values of all pixels on each edge, and determine the grayscale change difference of the magnesium alloy product produced each time; measure the distance from the central pixel point on each edge to the central pixel point of the grayscale image of the magnesium alloy product where the edge is located, determine the edge distribution value of the magnesium alloy product produced each time, and determine the first defect assessment value of the magnesium alloy product produced each time based on the grayscale change difference;
[0007] In the magnesium alloy grayscale image produced each time, a window is divided for each edge, and the extreme distribution and discrete degree of the grayscale values of all pixels in the window where each edge is located, as well as the discrete degree of the grayscale values of all pixels in the magnesium alloy grayscale image, are analyzed to determine the second defect assessment value of the magnesium alloy product produced each time;
[0008] Based on the first defect assessment value and the second defect assessment value, the urgency of pressure adjustment of each magnesium alloy product produced is determined, and the injection casting pressure of the semi-solid magnesium alloy at the current moment is controlled.
[0009] Preferably, the method for determining the grayscale variation difference of the magnesium alloy product produced each time is:
[0010] In the grayscale image of each magnesium alloy product produced, the mean slope of all pixels on each edge is calculated and recorded as the edge change rate of each edge;
[0011] The difference between the edge change rate of each edge and the average edge change rate of all other edges is calculated, and the cumulative sum of the differences of all edges is used as the grayscale change difference of the magnesium alloy product produced each time.
[0012] Preferably, the method for determining the marginal distribution value of the magnesium alloy product produced each time is:
[0013] In the grayscale image of the magnesium alloy product produced each time, the distance from the central pixel point of each edge to the central pixel point in the grayscale image of the magnesium alloy product is calculated, and the average of the distances of all edges is taken as the edge distribution value of the magnesium alloy product produced each time.
[0014] Preferably, the expression of the first defect evaluation value of the magnesium alloy product produced each time is: Where A i represents the first defect evaluation value of the magnesium alloy product produced for the i-th time; B i represents the grayscale change difference of the magnesium alloy product produced in the i-th time; C i represents the marginal distribution value of the magnesium alloy product produced in the i-th time; ε represents a constant preset to be greater than 0.
[0015] Preferably, the process of dividing the window for each edge is:
[0016] Get the minimum bounding rectangle of each edge, keep the center of the minimum bounding rectangle unchanged, expand all sides of the minimum bounding rectangle by a preset number of times, and use the expanded rectangle as the window of each edge.
[0017] Preferably, the method for determining the second defect evaluation value of the magnesium alloy product produced each time is:
[0018] Calculate the range and variance of the grayscale values of all pixels in the window of each edge respectively, and record them as the grayscale range of each edge and the grayscale variance of each edge;
[0019] The second defect evaluation value D of the magnesium alloy product produced for the i-th time i The expression is: D i =E i +F i Where, E i represents the sum of the average grayscale range and the average grayscale variance of all edges in the grayscale image of the magnesium alloy product produced for the i-th time; F i Represents the variance of the grayscale values of all pixels in the grayscale image of the magnesium alloy product produced for the i-th time.
[0020] Preferably, the expression of the urgency of pressure regulation of the magnesium alloy product produced each time is: G i =A i ×D i Where G i A represents the urgency of pressure regulation of the magnesium alloy product produced for the i-th time; i represents the first defect evaluation value of the magnesium alloy product produced for the i-th time; D i represents the second defect evaluation value of the magnesium alloy product produced for the i-th time.
[0021] Preferably, the controlling the injection casting pressure of the semi-solid magnesium alloy at the current moment includes:
[0022] Before the current semi-solid magnesium alloy injection-casting process, if the pressure adjustment urgency of the most recently produced magnesium alloy product adjacent to the current one is greater than or equal to the segmentation threshold, the pressure data of all moments in the injection-casting process of the magnesium alloy product corresponding to the minimum adjustment urgency before the current one is obtained and recorded as the ideal pressure data, and the pressure data at the current moment in the current semi-solid magnesium alloy injection-casting process is obtained, and the pressure data at the current moment and the ideal pressure data at the corresponding moment are used as inputs of the PID control algorithm, and a pressure control signal is output to control the pressure at the current moment in the current semi-solid magnesium alloy injection-casting process; otherwise, the pressure of the current semi-solid magnesium alloy injection-casting process is not adjusted.
[0023] In a second aspect, an embodiment of the present application provides an injection casting pressure control system for semi-solid magnesium alloys, the system comprising:
[0024] The magnesium alloy data acquisition module is used to obtain grayscale images of magnesium alloy products produced multiple times before the current semi-solid magnesium alloy injection casting process;
[0025] A magnesium alloy weight acquisition module is used to extract all edges in the grayscale image of each magnesium alloy product produced, analyze the rate of change of the grayscale values of all pixels on each edge, and determine the grayscale change difference of each magnesium alloy product produced; measure the distance from the center pixel point on each edge to the center pixel point of the grayscale image of the magnesium alloy product where the edge is located, determine the edge distribution value of each magnesium alloy product produced, and determine the first defect assessment value of each magnesium alloy product produced based on the grayscale change difference;
[0026] In the magnesium alloy grayscale image produced each time, a window is divided for each edge, and the extreme distribution and discrete degree of the grayscale values of all pixels in the window where each edge is located, as well as the discrete degree of the grayscale values of all pixels in the magnesium alloy grayscale image, are analyzed to determine the second defect assessment value of the magnesium alloy product produced each time;
[0027] The magnesium alloy injection casting pressure control module is used to determine the urgency of pressure adjustment of each magnesium alloy product produced based on the first defect assessment value and the second defect assessment value, and control the injection casting pressure of the semi-solid magnesium alloy at the current moment.
[0028] In a third aspect, an embodiment of the present application also provides an injection-casting pressure control device for semi-solid magnesium alloys, comprising a memory, a processor, and a computer program stored in the memory and running on the processor, wherein when the processor executes the computer program, the steps of any one of the above-mentioned injection-casting pressure control methods for semi-solid magnesium alloys are implemented.
[0029] As can be seen from the above embodiments, the injection casting pressure control method for semi-solid magnesium alloy provided in the embodiments of the present application has at least the following beneficial effects:
[0030] This application constructs a first defect assessment value by analyzing the edge change rate in the grayscale image of the magnesium alloy product and the position of the edge from the center pixel point of the grayscale image of the magnesium alloy product. This can help to promptly detect quality problems caused by injection casting pressure deviation and adjust the injection casting pressure in a timely manner, avoiding the hysteresis of injection casting pressure adjustment. Furthermore, by analyzing the distribution of grayscale values of pixels in the grayscale image of the magnesium alloy product, a second defect assessment value is constructed to determine whether there are problems such as cold mold defects. By evaluating the quality of the magnesium alloy product, the timeliness of injection casting pressure adjustment is improved. Furthermore, by combining the first defect assessment value and the second defect assessment value, the urgency of pressure adjustment is constructed, which can effectively solve the hysteresis of traditional methods when adjusting injection casting pressure, improve the timeliness of injection casting pressure adjustment, and thus improve the stability of the magnesium alloy product production process and the quality of the product. This application analyzes the quality of magnesium alloy products produced in the past and predicts and evaluates the pressure in the current injection casting process, thereby improving the timeliness of pressure adjustment in semi-solid magnesium alloy injection casting. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] In order to more clearly illustrate the technical solutions and advantages of the embodiments of the present application or the prior art, the following is a brief introduction to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0032] Figure 1 A flowchart of a method for controlling injection casting pressure of a semi-solid magnesium alloy according to an embodiment of the present application;
[0033] Figure 2 A schematic diagram of a pressure regulation urgency extraction process provided in one embodiment of the present application;
[0034] Figure 3 A block diagram of an injection-casting pressure control system for semi-solid magnesium alloys provided in one embodiment of the present application. DETAILED DESCRIPTION
[0035] To further illustrate the technical means and effects employed by this application to achieve the intended invention objectives, the following, in conjunction with the accompanying drawings and preferred embodiments, describes in detail the specific implementation, structure, features, and effects of the injection-casting pressure control method, system, and apparatus for semi-solid magnesium alloys proposed in this application. In the following description, references to different "one embodiment" or "another embodiment" do not necessarily refer to the same embodiment. Furthermore, specific features, structures, or characteristics of one or more embodiments may be combined in any suitable manner.
[0036] Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs.
[0037] The specific solutions of the injection casting pressure control method, system and equipment for semi-solid magnesium alloys provided by the present application are described in detail below with reference to the accompanying drawings.
[0038] See also Figure 1 , which shows a flowchart of a method for controlling injection casting pressure of a semi-solid magnesium alloy provided by an embodiment of the present application, the method comprising the following steps:
[0039] Step S1: obtaining grayscale images of magnesium alloy products produced multiple times before the current semi-solid magnesium alloy injection casting process.
[0040] A CMOS high-definition camera and an industrial light source are installed at the mold of the magnesium alloy semi-solid injection molding equipment. After each magnesium alloy demolding process, the finished magnesium alloy product is illuminated from the front and a high-definition RGB image is captured. Images of magnesium alloy products produced a preset number of times before the current semi-solid magnesium alloy injection molding process are obtained. To simplify analysis, the RGB images are converted into grayscale images and recorded as grayscale images of the magnesium alloy products.
[0041] It should be noted that the value of the preset number is set manually. In this embodiment, the value of the preset number is 50. The implementer can also set it by himself according to the specific situation. This embodiment does not impose any special restrictions.
[0042] It should be understood that the selected magnesium alloy products are products with the same material composition and processing process flow.
[0043] Step S2: Extract all edges in the grayscale image of the magnesium alloy product produced each time, analyze the rate of change of the grayscale values of all pixels on each edge, and measure the distance from the center pixel point on each edge to the center pixel point of the grayscale image of the magnesium alloy product where the edge is located to determine the first defect assessment value of the magnesium alloy product produced each time.
[0044] Normally, when the injection-casting pressure is appropriate for the current production situation, the surface of the magnesium alloy product produced is relatively smooth with clear stripes. However, when the injection-casting pressure deviates to a certain extent, shrinkage cavities and porosity may occur, resulting in irregular holes or shrinkage cracks that are locally dense and generally dispersed on the surface of the magnesium alloy product. In the grayscale image of the magnesium alloy product, these holes or cracks mainly appear as irregular edges and closed contours in local areas, with the overall appearance of localized clustering and overall dispersion. This is significantly different from the holes and stripes in magnesium alloy products under normal conditions.
[0045] Therefore, based on the grayscale image of the magnesium alloy product, all edges in the grayscale image are extracted. The greater the curvature and the less regular the edge, the more likely it is an edge caused by shrinkage cavities or porosity. Conversely, the less curvature and the more regular the edge, the more likely it is a normal edge on the magnesium alloy surface. In this embodiment, Canny edge detection is used to extract edges from the grayscale image of the magnesium alloy product. In actual applications, implementers may also use other edge extraction algorithms such as corrosion and dilation. This embodiment does not impose any specific restrictions on the choice of edge extraction algorithm. The Canny edge detection algorithm is a well-known technique, and its specific principles are not further described.
[0046] In the grayscale image of each magnesium alloy product produced, the mean slope of all pixels on each edge is calculated and recorded as the edge change rate of each edge;
[0047] It should be noted that this embodiment uses the Sobel operator to calculate the slope at the pixel point. The Sobel operator is a well-known technology and its specific principle will not be described in detail.
[0048] Furthermore, the difference between the edge change rate of each edge and the average edge change rate of all other edges is calculated, and the cumulative sum of the differences of all edges is used as the grayscale change difference of the magnesium alloy product produced each time.
[0049] It should be noted that there are many methods for measuring the differences between data. In this embodiment, all contents involving calculating the differences between data adopt the method of taking the absolute value of the difference. In actual application, as other implementation methods, the implementer may also adopt other methods for measuring the differences between data, such as the square or ratio of the difference. This embodiment does not impose any special restrictions on the selection of methods for measuring the differences between data.
[0050] According to the difference in grayscale changes of the magnesium alloy products produced each time, it can be understood that if the mean value of the slopes at all pixel points on the current edge is larger, that is, the edge change rate is larger, and the difference between the edge change rate of the current edge and the average edge change rate of all other edges is larger, then the curvature of the current edge is larger and the regularity is lower, indicating that the edge is more likely to be caused by shrinkage porosity when there is a deviation in the injection casting pressure, and the final grayscale change difference is also larger; conversely, if the mean value of the slopes at all pixel points on the current edge is smaller, that is, the edge change rate is smaller, and the difference between the edge change rate of the current edge and the average edge change rate of all other edges is smaller, then the curvature of the current edge is smaller and the regularity is higher, indicating that the edge is more likely to be a normal edge on the surface of the magnesium alloy.
[0051] Furthermore, the general order of solidification in magnesium alloy castings is: thinner areas and areas where the alloy liquid first stops flowing tend to solidify first, while thicker areas and areas where the alloy liquid flows the longest and is filled last tend to solidify last. Shrinkage cavities and porosity are most likely to be concentrated in the last solidified areas of the casting. Typically, the injection nozzle is located in the center of the mold, so the irregular edge contours formed by shrinkage cavities and porosity are more likely to be concentrated in the center of the grayscale image of the magnesium alloy product.
[0052] Therefore, by analyzing the distance between the center pixel of the edge and the center pixel of the grayscale image of the magnesium alloy product, the edge distribution value is determined, specifically:
[0053] In the grayscale image of the magnesium alloy product produced each time, the distance from the central pixel point of each edge to the central pixel point in the grayscale image of the magnesium alloy product is calculated, and the average of the distances of all edges is taken as the edge distribution value of the magnesium alloy product produced each time.
[0054] According to the edge distribution value of the magnesium alloy product produced each time, it can be understood that if the distance from the central pixel point of each edge to the central pixel point in the grayscale image of the magnesium alloy product is smaller, the edge distribution value is smaller, which means that the edges in the grayscale image of the magnesium alloy product are mostly irregular edges formed by shrinkage cavities and shrinkage porosity of the magnesium alloy caused by the deviation of the injection casting pressure. Therefore, in order to avoid shrinkage cavities and shrinkage porosity in the magnesium alloy during the injection casting process, the injection casting pressure needs to be adjusted; conversely, if the distance from the central pixel point of each edge to the central pixel point in the grayscale image of the magnesium alloy product is larger, the edge distribution value is larger, which means that the edges in the grayscale image of the magnesium alloy product are mostly normal edges in the magnesium alloy product.
[0055] Furthermore, based on the grayscale change difference and the edge distribution value, a first defect assessment value is further determined to judge whether shrinkage cavities and porosity exist in the magnesium alloy product, thereby adjusting the injection casting pressure to avoid the occurrence of shrinkage cavities and porosity, specifically:
[0056] The expression of the first defect evaluation value of the magnesium alloy product produced for the i-th time is: Where A i represents the first defect evaluation value of the magnesium alloy product produced for the i-th time; B i represents the grayscale change difference of the magnesium alloy product produced in the i-th time; C i represents the marginal distribution value of the magnesium alloy product produced for the i-th time; ε represents a preset constant greater than 0, which is used to prevent the denominator from being 0. In this embodiment, the value of ε is artificially set. In this embodiment, the value of ε is 0.01. Under the premise of ensuring that the denominator is not 0 and does not excessively affect the calculation results, the implementer can also set it by himself based on the specific situation. This embodiment does not impose any special restrictions.
[0057] According to the first defect evaluation value of the magnesium alloy product produced each time, it can be understood that when shrinkage cavities or shrinkage porosity exist in the magnesium alloy product produced for the i-th time, irregular edges will appear on the surface of the magnesium alloy product, and the regularity of these edges is low, that is, the grayscale change difference is large, and the edge distribution value is small. The larger the first defect evaluation value is, the greater the possibility that there are defects on the surface of the magnesium alloy product, and the higher the degree of inappropriateness of the pressure during the injection-casting process, the more necessary it is to control and adjust the pressure during the injection-casting process; conversely, when there are no shrinkage cavities and shrinkage porosity in the magnesium alloy product produced for the i-th time, the regularity of the edges on the surface of the magnesium alloy product is large, that is, the grayscale change difference is small, and the edge distribution value is large. The smaller the first defect evaluation value is, the smaller the possibility that there are defects on the surface of the magnesium alloy product, and the higher the degree of appropriateness of the pressure during the injection-casting process.
[0058] Step S3: In the magnesium alloy grayscale image produced each time, a window is divided for each edge, and the extreme distribution and discrete degree of the grayscale values of all pixels in the window where each edge is located, as well as the discrete degree of the grayscale values of all pixels in the magnesium alloy grayscale image, are analyzed to determine the second defect evaluation value of the magnesium alloy product produced each time.
[0059] When the injection-casting pressure is too low, the injection speed will be too low, and the production process of magnesium alloys will also have problems with cold shut and poor filling. Severe cold shut and poor filling will cause obvious irregular sunken linear lines on the surface of magnesium alloy products, as well as incomplete filling of local areas of magnesium alloy products. When the degree of cold shut and poor filling is relatively mild, the sunken linear lines are closer to the lines on the surface of ordinary magnesium alloy products. Incomplete filling of local areas of magnesium alloy products may be mistaken for uneven thickness of local areas of magnesium alloy products. It is difficult to distinguish cold shut and poor filling by the above method alone, and then misjudge the quality of magnesium alloy products, and deviate from the judgment of the appropriateness of injection-casting pressure. Therefore, further analysis is needed. The specific analysis process is as follows:
[0060] When a mild cold shut occurs, the surface of the magnesium alloy will show a milder, linear depression. However, since a cold shut can cause localized depressions on the surface of the magnesium alloy product, reducing its smoothness, the reflectivity in the depressed area decreases under the illumination of a light source. Therefore, there is a significant difference in the reflectivity of the magnesium alloy product on either side of the edge of the depressed linear pattern caused by the cold shut. Specifically, in the grayscale image of the magnesium alloy product, the grayscale value difference on both sides of the edge is large, and the difference in grayscale value change is more obvious in the depressed area.
[0061] In addition, when a relatively mild poor filling condition occurs in a magnesium alloy product, the poor filling may lead to uneven thickness in a local area, or the thickness may change as the position is farther away from the injection nozzle. The possibility of poor filling is greater as the position is farther away from the injection nozzle. In the grayscale image of the surface of the magnesium alloy product, the brightness changes unevenly, and the position with weaker brightness is farther away from the injection nozzle.
[0062] Therefore, by analyzing the extreme distribution and discreteness of the grayscale values of all pixels in the local area where each edge is located, and combining the discreteness of the grayscale values of all pixels in the magnesium alloy grayscale image, the second defect assessment value of each magnesium alloy product produced is determined. Specifically, it is:
[0063] In each magnesium alloy grayscale image produced, the minimum circumscribed rectangle of each edge is obtained, the center of the minimum circumscribed rectangle is kept unchanged, all side lengths of the minimum circumscribed rectangle are enlarged by a preset number of times, and the enlarged rectangle is used as the window of each edge.
[0064] It should be noted that the value of the preset number times is set manually. In this embodiment, the value of the preset number times is 3 times. The implementer can also set it by himself according to the specific situation. This embodiment does not impose any special restrictions.
[0065] Furthermore, the range and variance of the grayscale values of all pixels in the window of each edge are calculated respectively, and recorded as the grayscale range of each edge and the grayscale variance of each edge;
[0066] The second defect evaluation value D of the magnesium alloy product produced for the i-th time i The expression is: D i =E i +F i Where, E i represents the sum of the average grayscale range and the average grayscale variance of all edges in the grayscale image of the magnesium alloy product produced for the i-th time; F i Represents the variance of the grayscale values of all pixels in the grayscale image of the magnesium alloy product produced for the i-th time.
[0067] According to the second defect assessment value of each magnesium alloy product produced, it can be understood that when the injection casting pressure suitability during the semi-solid magnesium alloy injection casting process is low, the greater the degree of illumination difference around the edge, the greater the difference in brightness change in the image, that is, the greater the sum of the average grayscale range and the average grayscale variance, and the greater the variance of the grayscale value of the desired pixel in the grayscale image of the magnesium alloy product, the greater the obtained second defect assessment value, indicating that the possibility of cold shut and poor filling on the surface of the magnesium alloy product is greater, and at this time, it is more necessary to adjust the pressure in the current injection casting process;
[0068] On the contrary, when the injection casting pressure is appropriate during the semi-solid magnesium alloy injection casting process, the smaller the degree of illumination difference around the edge, the smaller the brightness change difference in the image, that is, the smaller the sum of the average grayscale range and the average grayscale variance, and the smaller the variance of the grayscale value of the desired pixel in the grayscale image of the magnesium alloy product, the smaller the second defect evaluation value obtained, indicating that the possibility of cold shut and poor filling on the surface of the magnesium alloy product is smaller.
[0069] Step S4: Based on the first defect assessment value and the second defect assessment value, the urgency of pressure adjustment for each magnesium alloy product produced is determined, and the injection casting pressure of the semi-solid magnesium alloy at the current moment is controlled.
[0070] According to steps S2-S3, the first defect assessment value and the second defect assessment value of each magnesium alloy product produced before the current semi-solid magnesium alloy injection-casting process are obtained. Therefore, the pressure in the injection-casting process is adjusted based on the first defect assessment value and the second defect assessment value. The specific process is as follows:
[0071] The expression of the urgency of pressure regulation of the magnesium alloy product produced for the i-th time is: Gi =A i ×D i Where G i A represents the urgency of pressure regulation of the magnesium alloy product produced for the i-th time; i represents the first defect evaluation value of the magnesium alloy product produced for the i-th time; D i represents the second defect evaluation value of the magnesium alloy product produced for the i-th time.
[0072] According to the urgency of pressure adjustment of the magnesium alloy product produced each time, it can be understood that if the first defect evaluation value of the magnesium alloy product produced for the i-th time is larger and the second defect evaluation value is larger, the urgency of pressure adjustment is larger, indicating that the possibility of cold shut and poor filling on the surface of the magnesium alloy product is greater, and at this time, it is more necessary to adjust the pressure in the current shot-casting process; conversely, if the first defect evaluation value of the magnesium alloy product produced for the i-th time is smaller and the second defect evaluation value is smaller, the urgency of pressure adjustment is smaller, indicating that the possibility of cold shut and poor filling on the surface of the magnesium alloy product is smaller.
[0073] Preferably, the schematic diagram of the pressure regulation urgency extraction process provided in this embodiment is as follows: Figure 2 shown.
[0074] Furthermore, the pressure regulation urgency of all magnesium alloy products produced before the current semi-solid magnesium alloy injection casting process is used as the input of the threshold segmentation algorithm, and the segmentation threshold is output;
[0075] It should be noted that there are many commonly used threshold segmentation algorithms. In this embodiment, the Otsu threshold segmentation algorithm is used. In actual application, as other implementation methods, the implementer may also use other threshold segmentation methods. This embodiment does not impose any special restrictions on the selection of the threshold segmentation method.
[0076] Among them, the Otsu threshold segmentation algorithm is a well-known technology, and its specific principle is not repeated here.
[0077] Furthermore, before the current semi-solid magnesium alloy injection-casting process, if the pressure adjustment urgency of the most recently produced magnesium alloy product adjacent to the current one is greater than or equal to the segmentation threshold, the pressure data of all moments in the injection-casting process of the magnesium alloy product corresponding to the minimum adjustment urgency before the current one is obtained and recorded as the ideal pressure data, and the pressure data at the current moment in the current semi-solid magnesium alloy injection-casting process is obtained, and the pressure data at the current moment and the ideal pressure data at the corresponding moment are used as inputs of the PID control algorithm, and a pressure control signal is output to control the pressure at the current moment in the current semi-solid magnesium alloy injection-casting process; otherwise, the pressure of the current semi-solid magnesium alloy injection-casting process is not adjusted.
[0078] It should be noted that this embodiment targets semi-solid magnesium alloy products of the same type and material from the same batch, so the operations at each stage of the injection casting process are the same, and the corresponding operation durations are also the same. Therefore, the operations at corresponding moments are consistent.
[0079] Thus, this embodiment analyzes the defects of the magnesium alloy product and adjusts the injection-casting pressure, thereby effectively reducing the complexity of data processing and improving the real-time performance of the injection-casting pressure control.
[0080] Based on the same inventive concept as the above method, the embodiment of the present application further provides an injection casting pressure control system for semi-solid magnesium alloys, comprising:
[0081] The magnesium alloy data acquisition module is used to obtain grayscale images of magnesium alloy products produced multiple times before the current semi-solid magnesium alloy injection casting process;
[0082] A magnesium alloy weight acquisition module is used to extract all edges in the grayscale image of each magnesium alloy product produced, analyze the rate of change of the grayscale values of all pixels on each edge, and determine the grayscale change difference of each magnesium alloy product produced; measure the distance from the center pixel point on each edge to the center pixel point of the grayscale image of the magnesium alloy product where the edge is located, determine the edge distribution value of each magnesium alloy product produced, and determine the first defect assessment value of each magnesium alloy product produced based on the grayscale change difference;
[0083] In the magnesium alloy grayscale image produced each time, a window is divided for each edge, and the extreme distribution and discrete degree of the grayscale values of all pixels in the window where each edge is located, as well as the discrete degree of the grayscale values of all pixels in the magnesium alloy grayscale image, are analyzed to determine the second defect assessment value of the magnesium alloy product produced each time;
[0084] The magnesium alloy injection casting pressure control module is used to determine the urgency of pressure adjustment of each magnesium alloy product produced based on the first defect assessment value and the second defect assessment value, and control the injection casting pressure of the semi-solid magnesium alloy at the current moment.
[0085] The block diagram of the injection casting pressure control system for semi-solid magnesium alloy provided in the embodiment of the present application is as follows: Figure 3 shown.
[0086] Based on the same inventive concept as the above-mentioned method, an embodiment of the present application also provides an injection-casting pressure control device for semi-solid magnesium alloys, comprising a memory, a processor, and a computer program stored in the memory and running on the processor. When the processor executes the computer program, the steps of any one of the above-mentioned injection-casting pressure control methods for semi-solid magnesium alloys are implemented.
[0087] It should be noted that the order in which the embodiments of the present application are presented is for illustrative purposes only and does not necessarily represent the superiority or inferiority of the embodiments. Furthermore, the foregoing descriptions of specific embodiments of this specification are provided. Furthermore, the processes depicted in the accompanying drawings do not necessarily require the specific order or sequential sequence shown to achieve the desired results. In certain embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0088] The various embodiments in this specification are described in a progressive manner, and the same or similar parts between the various embodiments can be referred to each other. Each embodiment focuses on the differences from other embodiments.
[0089] The above description is only a preferred embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent replacements, improvements, etc. made within the principles of the present application shall be included in the scope of protection of the present application.
Claims
1. A method for controlling injection casting pressure of a semi-solid magnesium alloy, characterized in that: The method comprises the following steps: Obtain grayscale images of magnesium alloy products produced multiple times before the current semi-solid magnesium alloy injection casting process; Extract all edges in the grayscale image of the magnesium alloy product produced each time, analyze the rate of change of the grayscale values of all pixels on each edge, and determine the grayscale change difference of the magnesium alloy product produced each time; measure the distance from the central pixel point on each edge to the central pixel point of the grayscale image of the magnesium alloy product where the edge is located, determine the edge distribution value of the magnesium alloy product produced each time, and determine the first defect assessment value of the magnesium alloy product produced each time based on the grayscale change difference; In the magnesium alloy grayscale image produced each time, a window is divided for each edge, and the extreme distribution and discrete degree of the grayscale values of all pixels in the window where each edge is located, as well as the discrete degree of the grayscale values of all pixels in the magnesium alloy grayscale image, are analyzed to determine the second defect assessment value of the magnesium alloy product produced each time; determining the urgency of pressure adjustment for each magnesium alloy product produced based on the first defect assessment value and the second defect assessment value, and controlling the injection casting pressure of the semi-solid magnesium alloy at the current moment; The expression of the first defect evaluation value of the magnesium alloy product produced each time is: Where, represents the first defect evaluation value of the magnesium alloy product produced for the i-th time; represents the grayscale change difference of the magnesium alloy product produced in the i-th time; represents the marginal distribution value of the magnesium alloy product produced in the i-th time; Indicates a constant greater than 0; The method for determining the second defect evaluation value of the magnesium alloy product produced each time is: Calculate the range and variance of the grayscale values of all pixels in the window of each edge respectively, and record them as the grayscale range of each edge and the grayscale variance of each edge; The second defect evaluation value of the magnesium alloy product produced for the i-th time The expression is: Where, It represents the sum of the average grayscale range and the average grayscale variance of all edges in the grayscale image of the magnesium alloy product produced for the i-th time; represents the variance of the grayscale values of all pixels in the grayscale image of the magnesium alloy product produced for the i-th time; The expression for the urgency of pressure regulation of the magnesium alloy product produced each time is: Where, Indicates the urgency of pressure regulation of the magnesium alloy product produced for the i-th time; represents the first defect evaluation value of the magnesium alloy product produced for the i-th time; represents the second defect evaluation value of the magnesium alloy product produced for the i-th time.
2. The injection casting pressure control method for semi-solid magnesium alloy according to claim 1, characterized in that: The method for determining the grayscale variation difference of the magnesium alloy product produced each time is as follows: In the grayscale image of each magnesium alloy product produced, the mean slope of all pixels on each edge is calculated and recorded as the edge change rate of each edge; The difference between the edge change rate of each edge and the average edge change rate of all other edges is calculated, and the cumulative sum of the differences of all edges is used as the grayscale change difference of the magnesium alloy product produced each time.
3. The injection casting pressure control method for semi-solid magnesium alloy according to claim 1, characterized in that: The method for determining the marginal distribution value of the magnesium alloy product produced each time is: In the grayscale image of the magnesium alloy product produced each time, the distance from the central pixel point of each edge to the central pixel point in the grayscale image of the magnesium alloy product is calculated, and the average of the distances of all edges is taken as the edge distribution value of the magnesium alloy product produced each time.
4. The injection casting pressure control method for semi-solid magnesium alloy according to claim 1, characterized in that: The process of dividing the window for each edge is as follows: Get the minimum bounding rectangle of each edge, keep the center of the minimum bounding rectangle unchanged, expand all sides of the minimum bounding rectangle by a preset number of times, and use the expanded rectangle as the window of each edge.
5. The injection casting pressure control method for semi-solid magnesium alloy according to claim 1, characterized in that: The controlling of the injection casting pressure of the semi-solid magnesium alloy at the current moment includes: The pressure regulation urgency of all magnesium alloy products produced before the current semi-solid magnesium alloy injection casting process is used as the input of the threshold segmentation algorithm, and the segmentation threshold is output; Before the current semi-solid magnesium alloy injection-casting process, if the pressure adjustment urgency of the most recently produced magnesium alloy product adjacent to the current one is greater than or equal to the segmentation threshold, the pressure data of all moments in the injection-casting process of the magnesium alloy product corresponding to the minimum adjustment urgency before the current one is obtained and recorded as the ideal pressure data, and the pressure data at the current moment in the current semi-solid magnesium alloy injection-casting process is obtained, and the pressure data at the current moment and the ideal pressure data at the corresponding moment are used as inputs of the PID control algorithm, and a pressure control signal is output to control the pressure at the current moment in the current semi-solid magnesium alloy injection-casting process; otherwise, the pressure of the current semi-solid magnesium alloy injection-casting process is not adjusted.
6. An injection-casting pressure control system for semi-solid magnesium alloys, which implements the injection-casting pressure control method for semi-solid magnesium alloys as claimed in claim 1, characterized in that: The system comprises: The magnesium alloy data acquisition module is used to obtain grayscale images of magnesium alloy products produced multiple times before the current semi-solid magnesium alloy injection casting process; A magnesium alloy weight acquisition module is used to extract all edges in the grayscale image of each magnesium alloy product produced, analyze the rate of change of the grayscale values of all pixels on each edge, and determine the grayscale change difference of each magnesium alloy product produced; measure the distance from the center pixel point on each edge to the center pixel point of the grayscale image of the magnesium alloy product where the edge is located, determine the edge distribution value of each magnesium alloy product produced, and determine the first defect assessment value of each magnesium alloy product produced based on the grayscale change difference; In the magnesium alloy grayscale image produced each time, a window is divided for each edge, and the extreme distribution and discrete degree of the grayscale values of all pixels in the window where each edge is located, as well as the discrete degree of the grayscale values of all pixels in the magnesium alloy grayscale image, are analyzed to determine the second defect assessment value of the magnesium alloy product produced each time; The magnesium alloy injection casting pressure control module is used to determine the urgency of pressure adjustment of each magnesium alloy product produced based on the first defect assessment value and the second defect assessment value, and control the injection casting pressure of the semi-solid magnesium alloy at the current moment.
7. An injection casting pressure control device for semi-solid magnesium alloys, comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that: When the processor executes the computer program, the steps of the injection casting pressure control method for semi-solid magnesium alloys as described in any one of claims 1 to 5 are implemented.
Citation Information
Patent Citations
Aluminum magnesium alloy casting internal defect image recognition method based on machine vision
CN109859160A
Method and system for evaluating quality of magnesium-titanium alloy surface coating process
CN114912832A