Real-time measurement and control system and method for material level of temporary storage material box of soybean protein production line

By applying machine vision technology to the buffer box of the soy protein production line for level detection and using the PLC controller for closed-loop control, the problem of inaccurate level detection in the existing technology is solved, and efficient extruders are achieved Control and reduce production costs.

CN119439930APending Publication Date: 2025-02-14SHANDONG KAISTAR MASCH MFG CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411628126.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-14
Publication Date
2025-02-14

AI Technical Summary

Technical Problem

The existing industrial detection instruments cannot achieve accurate detection of the material level of the buffer box, resulting in the inability to achieve closed-loop automatic control of the extruder of the drying equipment, which is not conducive to the automated and intelligent production of the production process.

Method used

Using a real-time level measurement and control system based on machine vision technology, the camera collects the image of the material in the material box, uses an industrial control machine to perform image processing, calculates the level value of the material, and uses the PLC controller to discharging the dragon and extruder. Perform closed-loop control.

Benefits of technology

It realizes continuous real-time detection and intelligent closed-loop control of the buffer box level, improves the drying efficiency and product quality of the extruder, and reduces production costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119439930A_ABST
    Figure CN119439930A_ABST
Patent Text Reader

Abstract

The invention provides a real-time measurement and control system and method for the material level of a temporary storage material box of a soybean protein production line. The system comprises the temporary storage material box, a discharging auger and an extruding machine which are arranged in the soybean protein production line, and the discharging auger is used for conveying materials in the temporary storage material box to the extruding machine; a glass sight glass is installed on the side face of the temporary storage material box, and a ruler is arranged on one side of the glass sight glass. A camera is arranged on the side of the temporary storage material box, a first lighting source is arranged above the camera, and the camera is connected with an industrial personal computer through a signal transmission subsystem. The industrial personal computer is used for collecting a material accumulation image in the glass sight glass in real time through the camera and calculating a material level value of the material through a built-in image processing technology; the industrial personal computer is connected with the PLC through the industrial control switch and used for sending the material level value to the PLC. The PLC is connected with the discharging auger and the extruding machine and used for controlling the rotating speed of the discharging auger and the extruding time of the extruding machine according to the material level value.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of machine vision measurement and control, and more particularly to a real-time measurement and control system and method for a buffer box level of a soybean protein production line. Background Art

[0002] In the buffer box of the soybean protein production line, the material is a mixture of protein, ethanol and water produced by extracting soybean meal after mixing ethanol and water in the extractor. The buffer box undertakes the extraction and drying process. The level control of the buffer box is very important for the continuity and stability of the entire production process, which can maximize the drying effect and production capacity of the extruder of the drying equipment under the buffer box.

[0003] Currently, the following measurement technologies are usually used to detect the level of material boxes: The first is the ultrasonic level meter. Since the ultrasonic level meter is sensitive to temperature and pressure, it is generally necessary to measure at normal temperature and pressure. The material in the buffer box is a mixture of protein, ethanol and water. In the explosive gas environment formed by the material, the temperature and pressure stability cannot be guaranteed, and the measurement accuracy of the ultrasonic level meter may be significantly reduced.

[0004] The second type is the radar level meter. The radar electromagnetic waves emitted by the radar level meter will be more absorbed by the ethanol water medium with a large dielectric constant when propagating in the medium, and the propagation speed will also be slowed down and the attenuation speed will be fast, resulting in a reduction in the effective time window and a reduction in the equivalent propagation speed, which will weaken the effective signal and thus affect the detection accuracy.

[0005] The third is to use capacitive level measurement technology. This technology detects the level by measuring the capacitance between two electrodes immersed in the material, and can work in high temperature and high pressure environments. However, its disadvantages are that when applied to high-viscosity materials, frequent maintenance is required, the sensor has drift problems, and the life span is not long.

[0006] The fourth type is to use the radio frequency admittance level switch to sense the height of the material level by detecting the change in the admittance value between the probe and the silo wall through high-frequency electromagnetic waves. The active shielding technology can shield the hanging material on the probe, and the shielding electric field compensates for the electric field loss of the hanging material, so it can monitor the materials that are easy to hang. However, due to the uncertainty of the change of production process materials in the buffer bin, it cannot be used as a real-time material height detection instrument and can only be used as a material switch.

[0007] In summary, existing industrial detection instruments are unable to accurately detect the material level of the buffer box, and thus are unable to achieve closed-loop automatic control of the drying equipment extruder, which is not conducive to the automated and intelligent production of the production process. Summary of the invention

[0008] In view of the problems existing in the prior art, the purpose of the present invention is to provide a real-time measurement and control system and method for the buffer box level of a soy protein production line. Based on machine vision technology, continuous real-time detection of the buffer box level is achieved, and intelligent closed-loop control of the material position is performed, thereby improving the drying efficiency of the extruder.

[0009] In order to achieve the above object, the present invention is implemented through the following technical solutions: In the first aspect, the present invention discloses a real-time measurement and control system for the material level of a buffer box of a soybean protein production line, comprising a buffer box, a discharging auger and an extruder arranged in the soybean protein production line, the discharging auger is used to transport the material in the buffer box to the extruder; a glass sight glass is installed on the side of the buffer box, and a scale is arranged on one side of the glass sight glass; a camera is arranged on the side of the buffer box, the lens of the camera is perpendicular to the plane of the glass sight glass, a first lighting light source is arranged above the camera, and the camera is connected to an industrial computer through a signal transmission subsystem; the industrial computer is used to collect a material accumulation image in the glass sight glass through the camera in real time, and calculate the material level value of the material through the built-in image processing technology; the industrial computer is connected to a PLC controller through an industrial control switch, and is used to send the material level value to the PLC controller; The PLC controller is connected to the discharging auger and the extruder respectively, and is used to control the rotation speed of the discharging auger and the extrusion time of the extruder according to the material level value.

[0010] Further, the signal transmission subsystem includes an access switch, an aggregation switch and a core switch; The access switch is connected to the camera and the aggregation switch respectively, and the core switch is connected to the aggregation switch, the industrial computer and the industrial control switch respectively; the industrial computer is provided with a first network card and a second network card, the industrial computer is connected to the core switch through the first network card, and the industrial computer is connected to the industrial control switch through the second network card.

[0011] Furthermore, a second lighting source is provided in the cache box, and the second lighting source is arranged at the upper part of the cache box along the feeding direction of the material.

[0012] Furthermore, the system also includes a control cabinet, in which a discharging auger frequency converter and an extruder frequency converter are provided; the discharging auger includes an auger traction motor, an auger reducer and an auger blade, the auger traction motor is mechanically connected to the auger reducer through a motor chain, and the auger blade is mechanically connected to the output end of the auger reducer; the PLC controller is electrically connected to the discharging auger frequency converter through a DP cable, and the discharging auger frequency converter is electrically connected to the auger traction motor, and is used to adjust the speed of the auger blade by controlling the speed of the auger traction motor to control the material level value of the cache material box.

[0013] Furthermore, the extruder includes an extruder traction motor, an extruder reducer and an extruder roller, the extruder traction motor is mechanically connected to the extruder reducer, and the extruder roller is mechanically connected to the output end of the extruder reducer; the PLC controller is electrically connected to the extruder frequency converter through a DP cable, and the extruder frequency converter is electrically connected to the extruder traction motor, and is used to adjust the extrusion time of the material in the extruder by controlling the rotation speed of the extruder roller.

[0014] In a second aspect, the present invention further discloses a method for real-time measurement and control of a buffer box level of a soybean protein production line, comprising the following steps: S1: Set the camera parameters on the human-machine interface of the industrial computer to control the camera to collect video, set the timer to capture video images in a regular cycle, and save them in the hard disk of the industrial computer; S2: Read the video image in a timed loop, and cut out the target detection area image from the video image based on the position detection target area defined by the Halcon operator; S3: Convert the RGB image of the target detection area into the HSV color space, select the saturation component for threshold segmentation, and extract the material area according to the preset pixel threshold interval; S4: Filling and closing the holes in the material area, using Halcon's rectangle calculation operator to calculate the coordinates of the corner pixels of the material image rectangle and the length and width of the material image rectangle based on the area pixels; S5: drawing a material line in the material area according to the coordinates of the material image rectangle corner pixels and the length and width of the material image rectangle based on the area pixels, displaying the material area at the edge of the graphic, and displaying the material line in the material area with fill; S6: Perform camera calibration, convert pixel coordinates into world coordinates, calculate the distance between the material line and the edge of the glass mirror in the world coordinates, that is, the material level value, and display it on the industrial computer human-machine interface; S7: Use the dynamic link library .NET.DLL to transmit the level value to the PLC controller; S8: The PLC controller is used to adjust the speed of the discharge auger and the speed of the extruder through the PID control algorithm according to the difference between the preset material level value and the detected material level value, so as to maintain the stability of the material height in the material box.

[0015] Further, the step S2 comprises: The video image is read in a timed loop. When the video image is read for the first time, Halcon is used to set a rectangle operator draw_rectangle1 parallel to the coordinate axis to define the pixel value of the target area for level detection in the video image, and Halcon's operator gen_rectangle1 is used to create a rectangle parallel to the coordinate axis to define the target area for level detection. Based on the position detection target area, a target detection area image is cut out from the video image.

[0016] Further, the step S4 comprises: Use Halcon's fill_up operator to fill the holes in the material area, and use closing_rectangle1 to smooth the material area. Use Halcon's rectangle calculation operator smallest_rectangle1 to find the coordinates of the corner pixels of the rectangle based on the material image; Halcon's rectangle calculation operator smallest_rectangle2 is used to calculate the length and width of the material image rectangle based on the area pixels.

[0017] Further, the step S6 comprises: The camera is calibrated to obtain the width, height, focal length and camera pose parameters of a single pixel of the camera; the Halcon operator image_points_to_world_plane is used to convert the corresponding pixel coordinates into world coordinates, and the operator distance_pl is used to calculate the world coordinate distance from the pixel point to the straight line, so as to calculate the distance of the material line relative to the edge of the glass mirror in the world coordinate, that is, the object level value.

[0018] Compared with the prior art, the present invention has the following beneficial effects: 1. The present invention realizes human-machine interface interaction by transmitting machine vision captured images to an industrial computer, performing image processing on the industrial computer, extracting data, and displaying the images on the industrial computer interface; and transmitting data to an industrial PLC controller, so that the camera and the PLC controller can perform cross-platform data interaction, thereby realizing machine-machine interaction; the PLC controller uses a PID algorithm to perform closed-loop control of the material position in the material box, controls the operating frequency of the discharging auger, and further controls the feed speed of the extruder, and adjusts the operating frequency of the extruder, thereby saving production costs and improving extrusion drying efficiency and product quality.

[0019] 2. The present invention solves the problem of continuous real-time detection of the material level of a mixture of protein, alcohol and water in a material box under an explosive gas environment; it adopts machine vision detection of a camera, and is based on a modular design of a POE switch and a network program, and is easy to replicate and highly operable, and is convenient for modification and system upgrades.

[0020] It can be seen that compared with the prior art, the present invention has outstanding substantive features and significant progress, and the beneficial effects of its implementation are also obvious. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.

[0022] Figure 1 It is a front view of the real-time measurement and control system for the buffer material box level of the soybean protein production line of the present invention; Figure 2 It is a side view of the real-time measurement and control system for the material level of the buffer box of the soybean protein production line of the present invention.

[0023] Figure 3 The present invention is a control principle diagram of a real-time measurement and control system for the material level of a buffer box of a soybean protein production line.

[0024] Figure 4 The present invention is a flow chart of a method for real-time measurement and control of a buffer box level in a soybean protein production line.

[0025] Figure 5 It is a flow chart of another method for real-time measurement and control of the material level of a buffer box of a soybean protein production line of the present invention. DETAILED DESCRIPTION

[0026] In order to enable those skilled in the art to better understand the scheme of the present invention, the present invention is further described in detail below in conjunction with the accompanying drawings and specific implementation methods. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.

[0027] In the description of the present invention, it should be noted that, unless otherwise clearly specified and limited, the terms "installed", "connected", and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be indirectly connected through an intermediate medium, or it can be the internal communication of two components. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood by specific circumstances.

[0028] In the description of the present invention, it is necessary to understand that the terms "upper", "lower", "front", "back", "left", "right", "top", "bottom", "inside", "outside", etc., indicating the orientation or position relationship are based on the orientation or position relationship shown in the drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation on the present invention.

[0029] See also Figure 1 and Figure 2 As shown, this embodiment provides a real-time measurement and control system for the material level of a buffer box of a soy protein production line, comprising a buffer box 1, a discharging auger 2 and an extruder 3 arranged in the soy protein production line, the discharging auger 2 is used to transport the material in the buffer box 1 to the extruder 3; a glass sight glass 4 is installed on the side of the buffer box 1, and a scale 5 is provided on one side of the glass sight glass 4; a camera 6 is provided on the side of the buffer box 1, and the lens of the camera 6 is perpendicular to the plane of the glass sight glass 4, and a first lighting light source 7 is provided above the camera 6, and a second lighting light source 8 is provided in the buffer box 1, and the second lighting light source 8 is arranged at the upper part of the buffer box 1 along the feeding direction of the material.

[0030] In addition, the system also includes a control cabinet, which is provided with a discharging auger frequency converter 21 and an extruder frequency converter 31; the discharging auger 2 includes an auger traction motor, an auger reducer and an auger blade, the auger traction motor is mechanically connected to the auger reducer through a motor chain, and the auger blade is mechanically connected to the output end of the auger reducer; the extruder 3 includes an extruder traction motor, an extruder reducer and an extruder roller, the extruder traction motor is mechanically connected to the extruder reducer, and the extruder roller is mechanically connected to the output end of the extruder reducer.

[0031] Based on the above equipment structure and layout, see Figure 3 As shown, in this system, the camera 6 is connected to the industrial computer 9 through the signal transmission subsystem; the industrial computer 9 is used to collect the material accumulation image in the glass mirror 4 through the camera 6 in real time, and calculate the material level value through the built-in image processing technology; the industrial computer 9 is connected to the PLC controller 11 through the industrial control switch 10, and is used to send the level value to the PLC controller 11.

[0032] Specifically, the signal transmission subsystem includes an access switch 12, an aggregation switch 13 and a core switch 14; the access switch 12 is connected to the camera 6 and the aggregation switch 13 respectively, and the core switch 14 is connected to the aggregation switch 13, the industrial computer 9 and the industrial control switch 10 respectively; the industrial computer 9 is provided with a first network card 91 and a second network card 92, the industrial computer 9 is connected to the core switch 14 through the first network card 91, and the industrial computer 9 is connected to the industrial control switch 10 through the second network card 92.

[0033] The PLC controller 11 is electrically connected to the discharge auger inverter 21 through a DP cable, and the discharge auger inverter 21 is electrically connected to the auger drag motor, and is used to adjust the speed of the auger blade by controlling the speed of the auger drag motor to control the material level value of the buffer material box 1. The PLC controller 11 is electrically connected to the extruder inverter 31 through a DP cable, and the extruder inverter 31 is electrically connected to the extruder drag motor, and is used to adjust the extrusion time of the material in the extruder 3 by controlling the speed of the extruder roller.

[0034] It should be noted that in this system, the camera 6 uses an explosion-proof fixed-focus barrel camera series, the access switch 12 provides 8 100M POE electrical ports and 1 Gigabit network electrical port, the aggregation switch 13 provides 16 100M POE electrical ports and 2 Gigabit optical multiplexing ports, the industrial computer 9 uses the Advantech series industrial computer, the industrial computer switch 10 uses the Mosa industrial control switch, the PLC controller 11 uses the Siemens 1500 series controller, the discharging auger inverter 21 and the extruder inverter 31 use Schneider inverters with Profibus-DP communication cards. The software platform uses Microsoft VisualStudio based on the Windows system, and the image processing software uses the HALCON machine vision software developed by MVTec.

[0035] When in use, the camera 6 arranged on site collects the material level in the glass mirror 4 of the buffer material box 1, enters the access switch 12 via the POE network cable, then enters the aggregation switch 13 via the network cable, and enters the core switch 14 via the optical fiber. The core switch 14 and the first network card 91 of the industrial computer 9 are connected by network cable. After being processed by the software of the industrial computer 9, the video signal is converted into an image signal. The image signal is processed by the computer image to obtain the height data value of the material in the glass mirror 4 of the buffer material box 1 in the image, and the data is transmitted to the PLC controller 11 through the second network card 92 and the network cable. The PLC controller 11 transmits the data to the PLC controller 11 through the Profibus The DP cable is connected to the discharging auger inverter 21, and the discharging auger inverter 21 is connected to the on-site discharging auger 2 cable. The discharging auger inverter 21 controls the rotation speed of the on-site discharging auger 2. In the PLC controller 11, the material level height of the buffer box 1 is set. According to the difference between the level setting value and the real-time level detection value transmitted by the machine vision, the PID control algorithm is used to control the rotation speed of the discharging auger 3 in time, thereby controlling the height of the material in the buffer box 1.

[0036] See also Figure 4 As shown, based on the above system, the present invention also discloses a real-time measurement and control method for the buffer box level of a soybean protein production line, comprising the following steps: S1: Set the camera parameters on the human-machine interface of the industrial computer to control the camera to collect video, set the timer to capture video images in a regular cycle, and save them in the hard disk of the industrial computer.

[0037] As an example, in the image acquisition and storage human-machine interface of the industrial computer, set the camera IP address, device port, enter the user name and password, start the real-time preview function of the recorder, set the timer, capture the image in the Windows picture frame in a regular loop, and save it to the hard disk folder of the industrial computer.

[0038] S2: The video image is read in a timed loop, and the target detection area image is cut out from the video image based on the level detection target area defined by the Halcon operator.

[0039] In a specific implementation, in the image processing and data transmission human-machine interface of the industrial computer, the image is read in a timed loop to obtain the target detection area rectangle 111, the image area is reduced, and only the target detection area image is retained. Specifically, the video image is first read in a timed loop. When the video image is read for the first time, Halcon is used to set a rectangle operator draw_rectangle1 parallel to the coordinate axis to define the pixel value of the target area of ​​the object level detection in the video image, and Halcon's operator gen_rectangle1 is used to create a rectangle parallel to the coordinate axis to define the target area of ​​the object level detection; then, the target detection area image is cut out from the video image based on the object level detection target area.

[0040] S3: Convert the RGB image of the target detection area into the HSV color space, select the saturation component for threshold segmentation, and extract the material area according to the preset pixel threshold interval.

[0041] In a specific implementation, the RGB image of the target detection area is divided into three layers of independent images, the three layers of images are converted into images of hue, saturation and brightness components, the saturation component image is selected, the threshold segmentation is performed, and the area with pixel values ​​between a certain numerical range is obtained (that is, the pixel points in the image with pixel values ​​higher than or lower than a certain value are eliminated) to select the approximate material area.

[0042] S4: Fill holes and close the material area, and use Halcon's rectangle calculation operator to calculate the coordinates of the material image rectangle corner pixels and the length and width of the material image rectangle based on the area pixels.

[0043] In a specific implementation, the holes in the area are filled, the area is closed, and a rectangle 211 (based on the coordinates of the corner pixels of the material image rectangle) is output, and a rectangle 221 (based on the length and width of the material image rectangle of the area pixels) is output. Specifically, the fill_up operator of Halcon is first used to fill the holes in the material area, and the closing_rectangle1 operator is used to smooth the material area.

[0044] Then, the rectangle calculation operator smallest_rectangle1 of Halcon is used to calculate the coordinates of the corner pixels of the rectangle based on the material image; and the rectangle calculation operator smallest_rectangle2 of Halcon is used to calculate the length and width of the rectangle of the material image based on the regional pixels.

[0045] S5: Draw a material line in the material area according to the coordinates of the material image rectangle corner pixels and the length and width of the material image rectangle based on the area pixels, display the material area at the edge of the graphic, and display the material line in the material area with fill.

[0046] In a specific embodiment, a material line is drawn to facilitate image recognition (based on the data of output rectangle 211 and output rectangle 221), the edge of the graphic shows the area 111 to be measured, and the graphic fill shows the material line within the measurement area.

[0047] S6: Perform camera calibration, convert pixel coordinates into world coordinates, calculate the distance between the material line and the edge of the glass mirror in the world coordinates, that is, the position value, and display it on the industrial computer human-machine interface.

[0048] In a specific implementation, the camera is calibrated to obtain the width, height, focal length and camera pose parameters of a single pixel of the camera; then the Halcon operator image_points_to_world_plane is used to convert the corresponding pixel point coordinates into world coordinates, and the operator distance_pl is used to calculate the world coordinate distance from the pixel point to the straight line, thereby calculating the distance of the material line relative to the edge of the glass mirror in the world coordinate, that is, the object level value.

[0049] S7: Use the dynamic link library .NET.DLL to transmit the level value to the PLC controller.

[0050] In a specific implementation, the level value is transmitted to the PLC controller via a network line using a dynamic link library .NET.DLL (Dynamic Link Library).

[0051] S8: The PLC controller is used to adjust the speed of the discharge auger and the speed of the extruder through the PID control algorithm according to the difference between the preset material level value and the detected material level value, so as to maintain the stability of the material height in the material box.

[0052] In a specific implementation, in the PLC controller, according to the change in the difference between the set material level height value of the material box and the detected material level value, the speed of the discharge auger and the speed of the extruder are adjusted through the PID control algorithm.

[0053] Further, as a refinement and expansion of the specific implementation of the above embodiment, in order to fully illustrate the specific implementation process of this embodiment, another real-time measurement and control method for the buffer box level of a soybean protein production line is provided, such as Figure 5 As shown, the specific steps include: Step 1: Set parameters in the image acquisition and storage human-machine interface of the industrial computer, including the IP address of the camera, the device port number, the user name and the password. After the match is successful, you can log in to the recorder. After logging in, click the preview button to realize real-time video acquisition of the camera. The capture button realizes image acquisition of real-time video. In order to realize real-time detection, a millisecond timer is set here to capture video images in a loop; the captured images are automatically saved in the folder of the industrial computer; if you want to stop capturing the video, click the stop capture button. At this time, the loop timer is stopped, and the image capture function is also stopped.

[0054] Step 2: In the image processing and data transmission human-machine interface of the industrial computer, after clicking the timing start button, the timing loop reads the image captured in the above steps and processes the image using the computer, and the image processed by the computer program will be displayed in the image window on the left. The steps of computer image processing are as follows.

[0055] Read the image; get the target detection area rectangle 111, which is based on the pixel coordinates; read the image for the first time, in order to get the pixel values ​​of the target detection area in the image, use Halcon's draw_rectangle1(WindowHandle,Row12,Column12,Row21,Column21) to draw a rectangle parallel to the coordinate axis to define the pixel values ​​of the level detection target area in the input image, and then use Halcon's operator gen_rectangle1(Rectangle11,Row12, Column12, Row21, Column21), create a rectangle parallel to the coordinate axis. This rectangle is the target area of ​​the level detection that we manually drew in the detected image in the previous step, that is, the area covered by the glass mirror on the material box. This area is the area where the actual production situation in the material box can be seen through the camera and the mirror; because the positions of the video camera and the material box mirror are fixed, in order to reduce each program execution, a rectangle is manually drawn in the image, and the pixel coordinate values ​​of the generated rectangle corners are used as the parameters of the target detection area, that is, after calculating the pixel coordinate values ​​of the two corners of Row12, Column12, Row21, and Column21, the values ​​are directly filled into the gen_rectangle1 operator. At this time, Rectangle11 is the target area of ​​the level detection; Step 3: In this embodiment, in order to reduce the load of computer image processing, we only capture the target area in the image for identification, and use Halcon's image domain reduction operator reduce_domain (Image, Rectangle11, ImageReduced) to reduce the rectangular area Rectangle11 read in the image Image to a new area ImageReduced, and reduce the domain of the given image to the specified area. The new domain is the intersection of the old domain and the area. Therefore, the new domain is a subset of the area, and the size of the matrix does not change.

[0056] Step 4: Use Halcon's image conversion operator decompose3 (ImageReduced, Image11, Image21, Image31) to convert a 3-channel image ImageReduced into three single-channel images with the same domain. Since the colors in the image are clearly distinguished, especially the color difference between the material and the background in the mirror is large, it is more appropriate to use color features for segmentation. Through three-channel segmentation, the RGB image is divided into three independent images, namely single-channel images of red Image11, green Image21 and blue Image31.

[0057] Step 5: Use Halcon's color space conversion operator trans_from_rgb (Image11, Image21, Image31, ImageH, ImageS, ImageV, 'hsv') to convert the image into a picture in hue, saturation, and value space. This operator is suitable for distinguishing images with obvious color contrast.

[0058] Step 6: Use Halcon's global threshold segmentation image operator threshold (ImageS, Region, Min, Max) to perform threshold segmentation on the saturation space image ImageS. Region is the threshold region with grayscale values ​​between Min and Max. Min and Max are the lower and upper limits of the grayscale values ​​of the selected pixels, respectively. Min is 105 and Max is 126.

[0059] Step 7: Use Halcon's filling region operator fill_up (Region, RegionFillUp) to fill the holes in the region. Region is the region obtained after the threshold, and RegionFillUp is the region with the holes filled. Then continue to use the closing region operator closing_rectangle1 (RegionFillUp, RegionClosing, 100,100) to close the RegionFillUp region with a rectangular element with a width of 100 and a height of 100, so that the boundary of the region is smoothed and the holes in the region that are smaller than the rectangular structure are closed, thereby achieving the effect of closing the region.

[0060] Step 8: Use Halcon's rectangle calculation operator smallest_rectangle1 (RegionClosing, Row31, Column31, Row41, Column41) to calculate the pixel coordinates of the upper left and lower right corners of the surrounding minimum rectangle of the RegionClosing area parallel to the coordinate axis. The upper left corner row and column pixel coordinates are Row31, Column31, and the lower right corner row and column pixel coordinates are Row41, Column41. Use Halcon's rectangle calculation operator smallest_rectangle2 (RegionClosing, Row, Column, Phi, Length1, Length2) to calculate the distance from the center point to the two sides of the smallest rectangle in any direction based on the coordinates (Row, Column) of the center point of the RegionClosing area is Length1 pixels and Length2 pixels respectively.

[0061] Step 9: Use Halcon's row storage operator gen_region_line (RegionLines, Row31, Column31, Row31, Column31+2*Length2), set the starting pixel coordinates to Row31, Column31, and the end pixel coordinates to Row31, (Column31+2*Length2), and store the generated row lines in the RegionLines area; finally, use Halcon's display operator dev_display (Image) to display the image Image read in the first step, and then use the operator dev_display (Rectangle11) to display the rectangle Rectangle11 of the target area of ​​the level detection. The image display here is first defined as margin edge display, and then use the operator dev_display (RegionLines) to display the level line area of ​​the level detection, that is, the row lines RegionLines generated at the highest point of the material. The image display here is defined as fill mode display.

[0062] Step 10: Camera calibration, get the camera's internal and external parameters. The internal parameters mainly include the width, height, and focal length of a single pixel, and the external parameters mainly include the camera pose parameters. Then use the Halcon operator image_points_to_world_plane to convert the corresponding pixel coordinates into world coordinates, and then use the operator distance_pl(Row41,Column41,Row31,Column31,Row31, Column31+2*Length2, Distance1) to calculate the world coordinate distance from the point to the line, so as to obtain the distance between the world coordinates of the level line in the level detection area and the edge of the mirror, that is, the height value of the material in the material box in the material box.

[0063] Step 11: In the industrial computer human-machine interface for image processing and data transmission, enter the PLC controller IP address in the IP address bar, enter 1 for the port number, click the Connect button, and the status display line will display the successfully connected IP address. Click the Disconnect button to display the failed connection IP address. The successful connection of the PLC controller is a prerequisite for data transmission, otherwise the control window will report an error. Here, the data transmission between the human-machine interface and the PLC controller is completed with the help of the S7.Net dynamic link library.

[0064] Click the timing start button, and the picture window on the left will display the picture of the material box mirror level detection image captured by the picture processing and data transmission control interface to the industrial computer after being processed by the Halcon operator; the functions of the timing start button include: timing cycle to process the material box mirror level detection image operator, and display the Halcon processed image in the picture display area on the left side of the control interface; extract the material box mirror level value, and transmit the value to the PLC controller through the S7.Net dynamic link library.

[0065] Step 12: In the 1515PLC controller, the level detection value of the material box sight glass is received, and then the difference between the set material box level height value and the actual material box level value calculated and transmitted by the on-site video recorder through the Halcon operator is obtained. Through the PID control algorithm, the speed of the discharge auger and the speed of the extruder are controlled and adjusted.

[0066] In summary, the present invention realizes continuous real-time detection of the material level of the buffer box based on machine vision technology, and performs intelligent closed-loop control of the material position, thereby improving the drying efficiency of the extruder.

[0067] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the method disclosed in the embodiment, since it corresponds to the system disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.

[0068] The above is a detailed introduction to the real-time measurement and control system and method for the buffer box level of the soybean protein production line provided by the present invention. Specific examples are used in this article to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea. It should be pointed out that for ordinary technicians in this technical field, without departing from the principles of the present invention, several improvements and modifications can be made to the present invention, and these improvements and modifications also fall within the scope of protection of the present invention.

Claims

1. A real-time measurement and control system for the buffer box level of a soybean protein production line, characterized in that: It comprises a buffer material box, a discharging auger and an extruder arranged in a soybean protein production line, wherein the discharging auger is used to transport the material in the buffer material box to the extruder; a glass sight glass is installed on the side of the buffer material box, and a scale is arranged on one side of the glass sight glass; a camera is arranged on the side of the buffer material box, the lens of the camera is perpendicular to the plane of the glass sight glass, a first lighting source is arranged above the camera, and the camera is connected to the industrial computer through a signal transmission subsystem; The industrial computer is used to collect the material accumulation image in the glass mirror through the camera in real time, and calculate the material level value through the built-in image processing technology; The industrial computer is connected to the PLC controller via an industrial control switch, and is used to send the material level value to the PLC controller; The PLC controller is connected to the discharging auger and the extruder respectively, and is used to control the rotation speed of the discharging auger and the extrusion time of the extruder according to the material level value.

2. The real-time measurement and control system for the buffer box level of the soybean protein production line according to claim 1 is characterized in that: The signal transmission subsystem includes an access switch, an aggregation switch and a core switch; The access switch is connected to the camera and aggregation switch respectively, and the core switch is connected to the aggregation switch, industrial computer, and industrial control switch respectively; The industrial computer is provided with a first network card and a second network card. The industrial computer is connected to the core switch via the first network card, and the industrial computer is connected to the industrial control switch via the second network card.

3. The real-time measurement and control system for the buffer box level of the soybean protein production line according to claim 1 is characterized in that: A second lighting light source is arranged in the cache material box, and the second lighting light source is arranged at the upper part of the cache material box along the feeding direction of the material.

4. The real-time measurement and control system for the buffer box level of the soybean protein production line according to claim 2 is characterized in that: The system also includes a control cabinet, in which a discharging auger frequency converter and an extruder frequency converter are arranged; the discharging auger includes an auger traction motor, an auger reducer and an auger blade, the auger traction motor is mechanically connected to the auger reducer through a motor chain, and the auger blade is mechanically connected to the output end of the auger reducer; the PLC controller is electrically connected to the discharging auger frequency converter through a DP cable, and the discharging auger frequency converter is electrically connected to the auger traction motor, and is used to adjust the rotation speed of the auger blade by controlling the rotation speed of the auger traction motor to control the material level value of the cache material box.

5. The real-time measurement and control system for the buffer box level of the soybean protein production line according to claim 4 is characterized in that: The extruder includes an extruder traction motor, an extruder reducer and an extruder roller, wherein the extruder traction motor is mechanically connected to the extruder reducer, and the extruder roller is mechanically connected to the output end of the extruder reducer; the PLC controller is electrically connected to the extruder frequency converter via a DP cable, and the extruder frequency converter is electrically connected to the extruder traction motor, and is used to adjust the extrusion time of the material in the extruder by controlling the rotation speed of the extruder roller.

6. A real-time measurement and control method for the buffer box level of a soybean protein production line, characterized in that: The method adopts the real-time measurement and control system for the buffer box level of the soybean protein production line according to any one of claims 1 to 5; The method comprises the following steps: S1: Set the camera parameters on the human-machine interface of the industrial computer to control the camera to collect video, set the timer to capture video images in a regular cycle, and save them in the hard disk of the industrial computer; S2: Read the video image in a timed loop, and cut out the target detection area image from the video image based on the position detection target area defined by the Halcon operator; S3: Convert the RGB image of the target detection area into the HSV color space, select the saturation component for threshold segmentation, and extract the material area according to the preset pixel threshold interval; S4: Filling and closing the holes in the material area, using Halcon's rectangle calculation operator to calculate the coordinates of the corner pixels of the material image rectangle and the length and width of the material image rectangle based on the area pixels; S5: drawing a material line in the material area according to the coordinates of the material image rectangle corner pixels and the length and width of the material image rectangle based on the area pixels, displaying the material area at the edge of the graphic, and displaying the material line in the material area with fill; S6: Perform camera calibration, convert pixel coordinates into world coordinates, calculate the distance between the material line and the edge of the glass mirror in the world coordinates, that is, the material level value, and display it on the industrial computer human-machine interface; S7: Use the dynamic link library .NET.DLL to transmit the level value to the PLC controller; S8: The PLC controller is used to adjust the speed of the discharge auger and the speed of the extruder through the PID control algorithm according to the difference between the preset material level value and the detected material level value, so as to maintain the stability of the material height in the material box.

7. The method for real-time measurement and control of the buffer box level of a soybean protein production line according to claim 6, characterized in that: The step S2 comprises: The video image is read in a timed loop. When the video image is read for the first time, Halcon is used to set a rectangle operator draw_rectangle1 parallel to the coordinate axis to define the pixel value of the target area for level detection in the video image, and Halcon's operator gen_rectangle1 is used to create a rectangle parallel to the coordinate axis to define the target area for level detection. Based on the position detection target area, a target detection area image is cut out from the video image.

8. The method for real-time measurement and control of the buffer box level of a soybean protein production line according to claim 6, characterized in that: The step S4 comprises: Use Halcon's fill_up operator to fill the holes in the material area, and use closing_rectangle1 to smooth the material area. Use Halcon's rectangle calculation operator smallest_rectangle1 to find the coordinates of the corner pixels of the rectangle based on the material image; Halcon's rectangle calculation operator smallest_rectangle2 is used to calculate the length and width of the material image rectangle based on the area pixels.

9. The method for real-time measurement and control of the buffer box level of a soybean protein production line according to claim 6, characterized in that: The step S6 comprises: The camera is calibrated to obtain the width, height, focal length and camera pose parameters of a single pixel of the camera; the Halcon operator image_points_to_world_plane is used to convert the corresponding pixel coordinates into world coordinates, and the operator distance_pl is used to calculate the world coordinate distance from the pixel point to the straight line, so as to calculate the distance of the material line relative to the edge of the glass mirror in the world coordinate, that is, the object level value.