Pulse generation method, device and equipment based on Bezier curve and medium
Through the pulse generation method based on the Bezier curve, the motion instability caused by the acceleration of the acceleration and deceleration section of the printing car is solved, and the smooth operation and high-precision printing of the printing car are achieved.
Patent Information
- Application Number
- CN202410140995.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-02-01
- Publication Date
- 2025-08-01
AI Technical Summary
In the prior art, the acceleration of the acceleration section of the trolley and the deceleration section are fixed values, resulting in unstable movement of the trolley, causing problems of jitter and unstable operation.
Using a pulse generation method based on the Bezier curve, by obtaining the printing car speed curve, the acceleration and deceleration coefficient and driving pulse frequency are calculated using the third-order Bezier function to generate a smooth driving pulse to control the acceleration and deceleration process of the printing car.
It realizes the smooth operation of the printing car during acceleration and deceleration, reduces mechanical vibration and motion instability, and improves printing accuracy and equipment stability.
Smart Images

Figure CN120396540A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of inkjet printing, and more particularly to a pulse generation method, device, equipment and medium based on a Bessel curve. Background Art
[0002] Inkjet printing technology refers to a technology of ejecting ink droplets onto a printing medium through nozzles on a print head to obtain images or texts. Currently, high-precision and large-format products are realized by alternately performing the reciprocating movement of the print head driven by a print carriage along the X-axis of the printer and the forward movement along the Y-axis. With the development of inkjet technology, people's requirements for inkjet printing are getting higher and higher, not only requiring high printing precision but also high printing speed. There is a growing trend of more and more devices being carried on the print carriage, which in turn leads to a continuous increase in the weight of the print carriage.
[0003] In existing industrial printers, the motor operation of the print carriage generally adopts a trapezoidal acceleration and deceleration control algorithm. The main problem of trapezoidal acceleration and deceleration control is its discontinuous acceleration change. Refer to Figure 1 for a schematic diagram of the trapezoidal acceleration and deceleration motion curve. When using the trapezoidal motion curve, during the acceleration and deceleration phases of the print carriage, the acceleration suddenly changes from zero to a fixed value, or from a fixed value to zero suddenly. Such a mutation may cause the print carriage to move unevenly, resulting in running jitter, causing the print carriage to generate jitter that is not conducive to the stable operation of the device during the acceleration and deceleration phases, and triggering serious problems such as false alarms of liquid level warnings and overall displacement of the printer. Summary of the Invention
[0004] In view of this, embodiments of the present invention provide a pulse generation method, device, equipment and medium based on a Bessel curve to solve the technical problem in the prior art that the acceleration values in the acceleration and deceleration phases of the print carriage are fixed values, resulting in the inability of the print carriage to operate smoothly.
[0005] In a first aspect, an embodiment of the present invention provides a pulse generation method based on a Bessel curve, the method comprising:
[0006] Obtaining an actual print carriage speed curve according to a preset print carriage speed curve, wherein the actual print carriage speed curve at least includes an acceleration phase curve and a deceleration phase speed curve, and the acceleration phase speed curve and the deceleration phase speed curve are Bessel curves;
[0007] Obtaining the acceleration and deceleration coefficients at each moment according to a third-order Bessel function corresponding to the actual print carriage speed curve;
[0008] Obtaining the frequency of the drive pulse at each moment according to the acceleration and deceleration coefficients at each moment;
[0009] The driving pulse is generated according to the frequency of the driving pulse at each moment.
[0010] Preferably, obtaining the actual printing carriage speed curve according to the preset printing carriage speed curve includes:
[0011] Determine the starting point, end point, first control point and second control point of the third-order Bezier curve according to the preset printing carriage speed curve;
[0012] A third-order Bessel function is established according to the starting point, the end point, the first control point, and the second control point, wherein the third-order Bessel function is as follows:
[0013] B(t)=P0*(1-t) 3 +3*P1*t*(1-t) 2 +3*P2*t 2 *(1-t)+P3*t 3
[0014] Wherein, t is the normalized length ratio of the Bezier curve and 0≤t≤1, P0 is the coordinate value of the starting point, P1 is the coordinate value of the first control point, P2 is the coordinate value of the second control point, and P3 is the coordinate value of the end point.
[0015] Preferably, the starting point, the end point, the first control point and the second control point are determined according to the preset printing carriage speed curve:
[0016] According to the preset print carriage speed curve, a minimum pulse frequency and a maximum pulse frequency of a driving pulse for driving the print carriage are obtained;
[0017] determining the starting point and the end point based on the minimum pulse frequency and the minimum pulse frequency;
[0018] The first control point and the second control point are determined according to the starting point and the end point.
[0019] Preferably, obtaining the frequency of the driving pulse at each moment according to the acceleration / deceleration coefficient at each moment includes:
[0020] The acceleration / deceleration coefficient corresponding to the i-th moment is Yi;
[0021] According to the acceleration and deceleration coefficient corresponding to the i-th moment, the frequency increment of the printing carriage at each moment is calculated. The frequency increment of the printing carriage at each moment is calculated by the following formula:
[0022] Fδi=Yi*(Fmax-Fmin)
[0023] Wherein, Fδi is the frequency increment corresponding to the i-th moment, 0 ≤ i ≤ 1, Yi is the acceleration and deceleration coefficient corresponding to the i-th moment, Fmax is the maximum pulse frequency, and Fmin is the minimum pulse frequency;
[0024] Calculate the frequency of the drive pulse at each moment according to the frequency increment of the printing carriage at each moment.
[0025] Preferably, the calculating the frequency of the drive pulse at each moment according to the frequency increment of the printing carriage at each moment includes:
[0026] Calculate the frequency of the drive pulse according to the formula Fi = Fmin + Fδi, where Fδi is the frequency increment corresponding to the i-th moment, and Fmin is the minimum pulse frequency.
[0027] Preferably, the generating the drive pulse according to the frequency of the drive pulse at each moment includes:
[0028] Obtain the preset working clock pulse frequency and the working clock period;
[0029] Calculate the number of counts of the working clock pulses within the motor drive pulse period at each moment according to the preset working clock pulse frequency and the frequency of the drive pulse at each moment, where the number of counts of the working clock pulses within the motor drive pulse period at each moment is calculated according to the following formula:
[0030] N = Fsys / Fi
[0031] Wherein, N is the number of counts of the working clock pulses within the motor drive pulse period at the i-th moment, Fsys is the preset working clock pulse frequency, and Fi is the motor long working frequency at the i-th moment;
[0032] Generate the drive pulse according to the number of pulses at each moment.
[0033] Preferably, the generating the drive pulse according to the number of counts of the working clock pulses within the motor drive pulse period at each moment includes:
[0034] Perform cyclic counting on the working clock pulses at each moment, and automatically reset to zero when the clock pulse count reaches N - 1 to obtain the pulse count value;
[0035] When the pulse count value is greater than or equal to 0 and less than or equal to N / 2 - 1, output the first level;
[0036] When the pulse count value is greater than or equal to N / 2 and less than or equal to N - 1, a second level is output, where the first level is a high level or a low level, the second level has a polarity opposite to that of the first level, and N = Fsys / Fi, Fsys is the preset working clock pulse frequency, and Fi is the working frequency at time i.
[0037] In a second aspect, an embodiment of the present invention provides a pulse generation device based on a Bessel curve, characterized in that the device includes:
[0038] A speed curve acquisition module, configured to acquire an actual printing carriage speed curve according to a preset printing carriage speed curve, where the actual printing carriage speed curve is a Bessel curve;
[0039] An acceleration / deceleration coefficient acquisition module, configured to acquire an acceleration / deceleration coefficient at each moment according to a third-order Bessel function corresponding to the actual printing carriage speed curve;
[0040] A frequency acquisition module, configured to acquire the frequency of a driving pulse at each moment according to the acceleration / deceleration coefficient at each moment;
[0041] A pulse generation module, configured to generate the driving pulse according to the frequency of the driving pulse at each moment.
[0042] In a third aspect, an embodiment of the present invention provides a printing device, including: at least one processor, at least one memory, and computer program instructions stored in the memory, and when the computer program instructions are executed by the processor, the method in the first aspect of the above-mentioned embodiment is implemented.
[0043] In a fourth aspect, an embodiment of the present invention provides a storage medium, on which computer program instructions are stored, and when the computer program instructions are executed by a processor, the methods in the first aspect and the second aspect of the above-mentioned embodiment are implemented.
[0044] In summary, the beneficial effects of the present invention are as follows:
[0045] The pulse generation method, device, equipment and medium based on Bessel curves provided by the embodiments of the present invention obtain the actual printing carriage speed curve according to a preset printing carriage speed curve. Among them, the actual printing carriage speed curve at least includes an acceleration stage curve and a deceleration stage speed curve, and the acceleration stage speed curve and the deceleration stage speed curve are Bessel curves. The Bessel curve provides a smooth transition method, which means that the printing carriage will not encounter sudden force changes brought about by trapezoidal acceleration and deceleration control during the acceleration and deceleration processes. This smooth transition reduces mechanical vibration and motion instability, thereby improving printing accuracy; according to the third-order Bessel function corresponding to the actual printing carriage speed curve, the acceleration and deceleration coefficients at each moment are obtained. The third-order Bessel curve provides sufficient control accuracy to finely adjust the acceleration and deceleration processes, so that the movement of the printing carriage is smoother and more accurate; according to the acceleration and deceleration coefficients at each moment, the frequency of the drive pulse at each moment is obtained. The pulse frequency directly controls the speed of the stepper motor. By adjusting the frequency, the rotation speed of the motor can be accurately controlled, so as to ensure that the printing carriage runs smoothly according to the preset Bessel speed curve; according to the frequency of the drive pulse at each moment, the drive pulse is generated. The finally generated drive pulse will accurately reflect the acceleration and deceleration processes defined by the Bessel curve, so that the movement of the printing carriage is smoother and more accurate, solving the technical problem that the acceleration in the acceleration section and deceleration section of the printing carriage in the prior art is a fixed value, resulting in the printing carriage being unable to run smoothly. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following will briefly introduce the drawings required to be used in the embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained according to these drawings, and these are all within the protection scope of the present invention.
[0047] Figure 1 It is a schematic diagram of a printing carriage speed curve provided by an embodiment of the present invention.
[0048] Figure 2 It is a schematic flow chart of the pulse generation method based on Bessel curves in an embodiment of the present invention.
[0049] Figure 3 It is a schematic diagram of a printing carriage speed curve in an embodiment of the present invention.
[0050] Figure 4 It is a schematic structural diagram of a pulse generation device based on Bessel curves in an embodiment of the present invention.
[0051] Figure 5 It is a schematic structural diagram of a pulse generation device based on Bessel curves in an embodiment of the present invention. Detailed implementation mode
[0052] The features and exemplary embodiments of various aspects of the present invention will be described in detail below. In order to make the objectives, technical solutions and advantages of the present invention clearer, the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only configured to explain the present invention and are not configured to limit the present invention. For those skilled in the art, the present invention can be implemented without some of these specific details. The following description of the embodiments is only provided to provide a better understanding of the present invention by showing examples of the present invention.
[0053] It should be noted that in this document, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variant thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements not only includes those elements, but also includes other elements not expressly listed, or also includes elements inherent to such process, method, article or device. Without further limitation, the elements defined by the statement "including..." do not exclude the existence of additional identical elements in the process, method, article or device including the said elements.
[0054] In a printer, the print carriage reciprocates under the drive of an internal servo motor to achieve cyclic operation. Each reciprocating movement of the print carriage includes acceleration, deceleration, and uniform motion. The acceleration, deceleration, and uniform motion processes of the print carriage are all controlled by drive pulses input to the servo motor. The waveforms of the drive pulses input to the servo motor are the same. Each time the servo motor receives a drive pulse, it will rotate a preset angle. The drive pulse frequency of the servo motor determines the rotation speed of the servo motor, and thus determines the moving speed of the print carriage.
[0055] After startup, the drive pulse frequency of the print carriage continuously increases, and the print carriage is in the acceleration stage. When the drive pulse frequency of the print carriage reaches the maximum pulse frequency, the speed of the print carriage no longer increases, and the print carriage is in the uniform motion stage. During deceleration, the drive pulse frequency of the print carriage will continuously decrease.
[0056] Embodiment 1
[0057] See Figure 2 , the embodiment of the present invention provides a pulse generation method based on a Bessel curve, and the method includes:
[0058] S1. Obtain the actual printing carriage speed curve based on a preset printing carriage speed curve. Among them, the actual printing carriage speed curve at least includes an acceleration stage curve and a deceleration stage speed curve, and the acceleration stage speed curve and the deceleration stage speed curve are Bézier curves;
[0059] In this step, first obtain the preset printing carriage speed curve. The preset printing carriage speed curve is as Figure 1 shown. Figure 1 The shown printing carriage speed curve is a trapezoidal motion curve. The acceleration of the carriage during the acceleration and deceleration sections is a fixed value. According to the acceleration formula F = ma, there are problems of sudden appearance or disappearance of force, which is the fundamental reason for the running jitter. In this step, obtain the corresponding actual printing carriage speed curve according to the preset printing carriage speed curve. Among them, the actual printing carriage speed curve at least includes an acceleration stage curve and a deceleration stage speed curve, and the acceleration stage speed curve and the deceleration stage speed curve are Bézier curves. By adjusting the speed curve of the printing carriage, during acceleration and deceleration, the acceleration value will gradually increase and then gradually decrease, and there will be no sudden force, so the operation is smoother;
[0060] Through the flexible arrangement of control points, Bézier curves allow the creation of more delicate and continuous acceleration and deceleration paths. Compared with the mutation of the trapezoidal curve, the continuity of the Bézier curve ensures the smooth change of acceleration, thus avoiding the jitter caused by the sudden change of acceleration.
[0061] In an embodiment, the obtaining the actual printing carriage speed curve based on the preset printing carriage speed curve specifically includes:
[0062] S11. Determine the starting point, ending point, first control point, and second control point according to the preset printing carriage speed curve;
[0063] Specifically, the starting point P0 and the ending point P3 represent the start and end of the printing carriage speed curve respectively. In practical applications, these may correspond to the starting speed and target speed of the printing carriage. The two points of the first control point and the second control point are used to control the shape of the Bézier curve, thereby affecting the way the printing carriage accelerates and decelerates. The selection of these control points is crucial for ensuring the smooth movement of the printing carriage during acceleration and deceleration.
[0064] S12. Establish a third - order Bézier function based on the starting point, the ending point, the first control point, and the second control point. Among them, the third - order Bézier function is as follows:
[0065] B(t)=P0*(1 - t) 3 +3*P1*t*(1 - t) 2 +3*P2*t2 *(1 - t)+P3*t 3
[0066] Wherein, t is the normalized length ratio of the Bezier curve and 0≤t≤1, P0 is the coordinate value of the starting point, P1 is the coordinate value of the first control point, P2 is the coordinate value of the second control point, and P3 is the coordinate value of the end point;
[0067] In this step, first determine the starting point, end point, first control point, and second control point according to the preset printing carriage speed curve. Since the actual printing carriage speed curve at least includes an acceleration phase curve and a deceleration phase speed curve, the acceleration phase speed curve and the deceleration phase speed curve are Bezier curves. A Bezier curve is a smooth curve drawn based on the coordinate positions of four arbitrarily located points. To determine a Bezier curve, first, the coordinate positions of the four points need to be determined. After obtaining the coordinate positions of the four points, the corresponding third-order Bezier function can be established according to the third-order Bezier curve parameter equation. Among them, the third-order Bezier function is as follows:
[0068] B(t)=P0*(1 - t) 3 +3*P1*t*(1 - t) 2 +3*P2*t 2 *(1 - t)+P3*t 3
[0069] Wherein, t is the normalized length ratio of the Bezier curve and 0≤t≤1, P0 is the coordinate value of the starting point, P1 is the coordinate value of the first control point, P2 is the coordinate value of the second control point, and P3 is the coordinate value of the end point;
[0070] This function maps the time t to the speed, thereby generating a smooth speed curve. This curve gradually moves from the starting point to the end point according to the value of t (from 0 to 1), and adjusts its path through the control points. This property of the Bezier curve makes it particularly suitable for creating smooth and controllable dynamic change paths, such as acceleration and deceleration paths in printer applications.
[0071] In one embodiment, determining the starting point, end point, first control point, and second control point according to the preset printing carriage speed curve specifically includes:
[0072] S121. According to the preset printing carriage speed curve, obtain the minimum pulse frequency and the maximum pulse frequency of the drive pulse for driving the printing carriage;
[0073] S122. Determine the starting point and the end point according to the minimum pulse frequency and the minimum pulse frequency;
[0074] S123. Determine the first control point and the second control point based on the starting point and the ending point;
[0075] In this step, first, according to the preset printing carriage speed curve, obtain the minimum pulse frequency and the maximum pulse frequency of the driving pulse for driving the printing carriage. A servo motor is provided in the printing carriage. The printing carriage moves under the drive of the servo motor. A rotor is provided in the servo motor, and the rotor rotates under the drive of the driving pulse. For each driving pulse received by the servo motor, the rotor in the servo motor will rotate a set angle under the drive of the driving pulse.
[0076] In the acceleration stage of the printing carriage, the waveform of the driving pulse remains unchanged, and the frequency continuously increases. The rotation speed of the rotor in the servo motor continuously increases, and the moving speed of the printing carriage continuously increases. When the printing carriage accelerates to the maximum speed, the frequency of the driving pulse remains unchanged, and the printing carriage moves at a constant speed at the maximum speed. In the deceleration stage of the printing carriage, the frequency of the driving pulse will continuously decrease, and the rotation speed of the rotor in the servo motor continuously decreases.
[0077] After obtaining the maximum pulse frequency and the minimum pulse frequency, determine the starting point and the ending point based on the minimum pulse frequency and the minimum pulse frequency. Since the actual printing carriage speed curve is such that the acceleration value will gradually increase and then gradually decrease. Taking the speed curve in the acceleration stage as an example, first determine the midpoint of the acceleration stage speed curve. The abscissa and ordinate of the first control point are less than the abscissa and ordinate of the midpoint, and the abscissa and ordinate of the second control are greater than the abscissa and ordinate of the midpoint, so as to achieve the acceleration value gradually increasing and then gradually decreasing.
[0078] S2. Obtain the acceleration and deceleration coefficients at each moment according to the cubic Bezier function corresponding to the actual printing carriage speed curve;
[0079] In this step, obtain the acceleration and deceleration coefficients at each moment according to the cubic Bezier function corresponding to the actual printing carriage speed curve. The normalized coordinate of P3 is (1, 1), and at this time the value on the vertical axis reaches the maximum value. B(t) is the point on the Bezier curve corresponding to t. By substituting t into the above cubic Bezier function, a Y value can be obtained, which is the acceleration and deceleration coefficient corresponding to the t moment.
[0080] S3. Obtain the frequency of the driving pulse at each moment according to the acceleration and deceleration coefficients at each moment;
[0081] In one embodiment, the obtaining the frequency of the driving pulse at each moment according to the acceleration and deceleration coefficients at each moment includes:
[0082] Denote the acceleration and deceleration coefficient corresponding to the i-th moment as Yi;
[0083] Calculate the frequency increment of the printing carriage at each moment according to the acceleration and deceleration coefficient corresponding to the i-th moment, where the frequency increment of the printing carriage at each moment is calculated by the following formula:
[0084] Fδi = Yi * (Fmax - Fmin)
[0085] In the formula, Fδi is the frequency increment corresponding to the i-th moment, 0 ≤ i ≤ 1, Yi is the acceleration and deceleration coefficient corresponding to the i-th moment, Fmax is the maximum pulse frequency, and Fmin is the minimum pulse frequency;
[0086] Calculate the frequency of the drive pulse at each moment according to the frequency increment of the printing carriage at each moment.
[0087] In this step, first calculate the frequency increment at each moment according to the above formula. After obtaining the frequency increment Fδi, calculate the frequency of the drive pulse according to the formula Fi = Fmin + Fδi. In the formula, Fδi is the frequency increment corresponding to the i-th moment, Fmin is the minimum pulse frequency, and Fmax is the maximum pulse frequency.
[0088] S4. Generate the drive pulse according to the frequency of the drive pulse at each moment.
[0089] In one embodiment, the generating the drive pulse according to the frequency of the drive pulse at each moment includes:
[0090] S41. Obtain the preset working clock pulse frequency and the working clock period;
[0091] S42. Calculate the number of pulses at each moment according to the preset working clock pulse frequency and the frequency of the drive pulse at each moment. Among them, the number of motor pulses at each moment is calculated by the following formula:
[0092] Ti = Fsys / Fi * Tsys
[0093] In the formula, Ti is the number of pulses at the i-th moment, Fsys is the preset working clock pulse frequency, Fi is the working frequency at the i-th moment, and Tsys is the working clock period;
[0094] S43. Generate the drive pulse according to the number of pulses at each moment;
[0095] In one embodiment, the generating the drive pulse according to the number of pulses at each moment includes:
[0096] Perform cyclic counting on the pulses generated at each moment to obtain a pulse count value;
[0097] When the pulse count value is greater than or equal to 0 and less than or equal to N / 2 - 1, output the first level;
[0098] When the pulse count value is greater than or equal to N / 2 and less than or equal to N-1, a second level is output, where the first level is a high level or a low level, the second level has a polarity opposite to that of the first level, N = Fsys / Fi, Fsys is the preset working clock pulse frequency, and Fi is the working frequency at time i.
[0099] In this step, the preset working clock pulse frequency and the working clock period are known. The pulse number at each moment is calculated based on the preset working clock pulse frequency and the frequency of the driving pulse at each moment. The preset working clock pulse frequency is used as the dividend, and the working frequency at time i is used as the divisor, and the obtained quotient is N. Denote the motor pulse at time i as Ti, then it can be known that Tx = N*Tsys. By cyclically counting the working clock pulses from 0 to N-1, corresponding pulse signals can be generated to the external motor. When the counter value is in [0, N / 2-1], the signal outputs a high level (or a low level), and when the counter value is in [N / 2, N-1], the signal outputs a level with the opposite polarity.
[0100] The pulse generation method based on the Bessel curve provided by the embodiment of the present invention obtains the actual printing carriage speed curve by relying on the preset printing carriage speed curve, where the actual printing carriage speed curve at least includes an acceleration stage curve and a deceleration stage speed curve, and the acceleration stage speed curve and the deceleration stage speed curve are Bessel curves; the acceleration and deceleration coefficients at each moment are obtained according to the third-order Bessel function corresponding to the actual printing carriage speed curve; the frequency of the driving pulse at each moment is obtained according to the acceleration and deceleration coefficients at each moment; the driving pulse is generated according to the frequency of the driving pulse at each moment, so that the printer carriage does not generate jitter that is not conducive to the stable operation of the device during the acceleration and deceleration stages, and solves the technical problem that the acceleration of the printing carriage in the acceleration section and the deceleration section in the prior art is a fixed value, resulting in the printing carriage being unable to run smoothly.
[0101] Embodiment 2
[0102] The embodiment of the present invention provides a pulse generation device based on the Bessel curve, characterized in that the device includes:
[0103] A speed curve acquisition module, configured to obtain an actual printing carriage speed curve according to a preset printing carriage speed curve, where the actual printing carriage speed curve is a Bessel curve;
[0104] An acceleration and deceleration coefficient acquisition module, configured to obtain the acceleration and deceleration coefficients at each moment according to the third-order Bessel function corresponding to the actual printing carriage speed curve;
[0105] A frequency acquisition module, configured to acquire the frequency of the drive pulse at each moment according to the acceleration and deceleration coefficients at each moment;
[0106] A pulse generation module, configured to generate the drive pulse according to the frequency of the drive pulse at each moment.
[0107] The pulse generation device based on the Bessel curve provided by the embodiment of the present invention obtains the actual printing carriage speed curve according to the preset printing carriage speed curve, wherein the actual printing carriage speed curve at least includes an acceleration stage curve and a deceleration stage speed curve, and the acceleration stage speed curve and the deceleration stage speed curve are Bessel curves; obtains the acceleration and deceleration coefficients at each moment according to the third-order Bessel function corresponding to the actual printing carriage speed curve; obtains the frequency of the drive pulse at each moment according to the acceleration and deceleration coefficients at each moment; generates the drive pulse according to the frequency of the drive pulse at each moment, so that the printer carriage weakens the jitter degree that is not conducive to the stable operation of the device during the acceleration and deceleration stages, and solves the technical problem that in the prior art, the acceleration in the acceleration section and the deceleration section of the printing carriage is a fixed value, resulting in the printing carriage being unable to run smoothly.
[0108] Embodiment 3
[0109] Embodiment 3 of the present invention discloses a printing device, including at least one processor, at least one memory, and computer program instructions stored in the memory.
[0110] Specifically, the above-mentioned processor may include a central processing unit (CPU), or an application specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present invention.
[0111] In a suitable case, the memory may include a removable or non-removable (or fixed) medium. The memory may include a mass memory for data or instructions. By way of example and not limitation, the memory may include a hard disk drive (HDD), a floppy disk drive, a flash memory, an optical disk, a magneto-optical disk, a magnetic tape, or a general medium. In a suitable case, the memory may be inside or outside the data processing device. In a specific embodiment, the memory is a non-volatile solid-state memory. In a specific embodiment, the memory includes a read-only memory (ROM). In a suitable case, the ROM may be a mask-programmed ROM, a programmable ROM (PROM), an erasable PROM (EPROM), an electrically erasable PROM (EEPROM), an electrically rewritable ROM (EAROM), or a flash memory, or a combination of two or more of these.
[0112] The processor reads and executes the computer program instructions stored in the memory to implement any one of the above-mentioned inkjet printer nozzle installation correction methods based on image recognition in Embodiment 1.
[0113] In one example, the printing device may further include a communication interface and a bus. Referring to Figure 5 , where the processor, the memory, and the communication interface are connected through the bus and complete communication with each other.
[0114] The communication interface is mainly used to implement communication between the modules, devices, and equipment in the embodiments of the present invention.
[0115] The bus includes hardware, software, or both, and couples the components of the nozzle installation correction device based on image recognition together. By way of example and not limitation, the bus may include an Accelerated Graphics Port (AGP) or other graphics bus, an Enhanced Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), a HyperTransport (HT) interconnect, an Industry Standard Architecture (ISA) bus, an InfiniBand interconnect, a Low Pin Count (LPC) bus, a memory bus, a MicroChannel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a Serial Advanced Technology Attachment (SATA) bus, a Video Electronics Standards Association Local (VLB) bus, or other suitable buses or a combination of two or more of these. In a suitable case, the bus may include one or more buses. Although the embodiments of the present invention describe and illustrate specific buses, the present invention contemplates any suitable bus or interconnect.
[0116] Embodiment 4
[0117] In addition, in combination with the above-mentioned pulse generation method based on Bessel curves in Embodiment 1, the embodiments of the present invention can provide a computer-readable storage medium to implement. Computer program instructions are stored on the computer-readable storage medium; when the computer program instructions are executed by the processor, any one of the above-mentioned nozzle attitude intelligent correction methods based on machine vision is implemented.
[0118] In summary, the pulse generation method, device, equipment and medium based on Bessel curves provided by the embodiments of the present invention obtain the actual printing carriage speed curve according to a preset printing carriage speed curve, where the actual printing carriage speed curve at least includes an acceleration stage curve and a deceleration stage speed curve, and the acceleration stage speed curve and the deceleration stage speed curve are Bessel curves; obtain the acceleration and deceleration coefficients at each moment according to the third-order Bessel function corresponding to the actual printing carriage speed curve; obtain the frequency of the driving pulse at each moment according to the acceleration and deceleration coefficients at each moment; and generate the driving pulse according to the frequency of the driving pulse at each moment, so that the printer carriage will not generate jitter that is not conducive to the stable operation of the equipment during the acceleration and deceleration stages, solving the technical problem in the prior art that the acceleration in the acceleration stage and deceleration stage of the printing carriage is a fixed value, resulting in the printing carriage being unable to run smoothly.
[0119] It should be clear that the present invention is not limited to the specific configurations and processes described above and shown in the figures. For the sake of brevity, the detailed descriptions of known methods are omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of the present invention is not limited to the specific steps described and shown, and those skilled in the art can make various changes, modifications and additions, or change the order between steps after understanding the spirit of the present invention.
[0120] It should also be noted that the functional blocks shown in the above structure block diagrams can be implemented as hardware, software, firmware or a combination thereof. When implemented in hardware, it can be, for example, an electronic circuit, an application specific integrated circuit (ASIC), appropriate firmware, a plug-in, a functional card, etc. When implemented in software, the elements of the present invention are programs or code segments used to perform the required tasks. The program or code segment can be stored in a machine-readable medium or transmitted via a data signal carried in a carrier wave on a transmission medium or a communication link. A "machine-readable medium" can include any medium capable of storing or transmitting information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, ROM, flash memory, erasable ROM (EROM), floppy disks, CD-ROMs, optical discs, hard disks, fiber media, radio frequency (RF) links, and so on. The code segment can be downloaded via a computer network such as the Internet, an intranet, etc.
[0121] It also needs to be noted that the exemplary embodiments mentioned in the present invention describe some methods or systems based on a series of steps or devices. However, the present invention is not limited to the order of the above steps, that is, the steps can be executed in the order mentioned in the embodiments, or different from the order in the embodiments, or several steps can be executed simultaneously.
[0122] The above are only specific embodiments of the present invention. Those skilled in the art can clearly understand that for the convenience and brevity of description, the specific working processes of the systems, modules, and units described above can refer to the corresponding processes in the foregoing method embodiments and will not be elaborated herein. It should be understood that the protection scope of the present invention is not limited thereto. Any person skilled in the art within the technical scope disclosed by the present invention can easily think of various equivalent modifications or substitutions, and these modifications or substitutions should all be covered within the protection scope of the present invention.
Claims
1. A pulse generation method based on Bessel curves, characterized in that The method includes: Obtaining an actual printing carriage speed curve according to a preset printing carriage speed curve, where the actual printing carriage speed curve at least includes an acceleration stage curve and a deceleration stage speed curve, and the acceleration stage speed curve and the deceleration stage speed curve are Bézier curves; Obtaining the acceleration and deceleration coefficients at each moment according to the third-order Bézier function corresponding to the actual printing carriage speed curve; Obtaining the frequency of the drive pulse at each moment according to the acceleration and deceleration coefficients at each moment; Generating the drive pulse according to the frequency of the drive pulse at each moment.
2. The pulse generation method based on a Bessel curve according to claim 1, wherein Obtaining an actual printing carriage speed curve according to a preset printing carriage speed curve includes: Determining the starting point, ending point, first control point, and second control point of the third-order Bézier curve according to the preset printing carriage speed curve; Establishing a third-order Bézier function according to the starting point, the ending point, the first control point, and the second control point, where the third-order Bézier function is as follows: B(t) = P0 * (1 - t) 3 + 3 * P1 * t * (1 - t) 2 + 3 * P2 * t 2 * (1 - t) + P3 * t 3 In the formula, t is the normalized length ratio of the Bézier curve and 0≤t≤1, P0 is the coordinate value of the starting point, P1 is the coordinate value of the first control point, P2 is the coordinate value of the second control point, and P3 is the coordinate value of the ending point.
3. The pulse generation method based on Bessel curves according to claim 1, wherein The determining the starting point, ending point, first control point, and second control point according to the preset printing carriage speed curve includes: Obtaining the minimum pulse frequency and the maximum pulse frequency of the drive pulse for driving the printing carriage according to the preset printing carriage speed curve; Determining the starting point and the ending point according to the minimum pulse frequency and the minimum pulse frequency; Determining the first control point and the second control point according to the starting point and the ending point.
4. The pulse generation method based on Bessel curve according to claim 3, wherein, The obtaining the frequency of the drive pulse at each moment according to the acceleration and deceleration coefficients at each moment includes: Denoting the acceleration and deceleration coefficient corresponding to the i-th moment as Yi; Calculating the frequency increment of the printing carriage at each moment according to the acceleration and deceleration coefficient corresponding to the i-th moment, where the frequency increment of the printing carriage at each moment is calculated by the following formula: Fδi = Yi * (Fmax - Fmin) In the formula, Fδi is the frequency increment corresponding to the i-th moment, 0≤i≤1, Yi is the acceleration and deceleration coefficient corresponding to the i-th moment, Fmax is the maximum pulse frequency, and Fmin is the minimum pulse frequency; Calculating the frequency of the drive pulse at each moment according to the frequency increment of the printing carriage at each moment.
5. The pulse generation method based on Bessel curves according to claim 3, wherein The calculating the frequency of the drive pulse at each moment according to the frequency increment of the printing carriage at each moment includes: Calculating the frequency of the drive pulse according to the formula Fi = Fmin + Fδi, where Fδi is the frequency increment corresponding to the i-th moment, and Fmin is the minimum pulse frequency.
6. The pulse generation method based on Bessel curves according to claim 4, wherein The generating the drive pulse according to the frequency of the drive pulse at each moment includes: Obtaining the preset working clock pulse frequency and the working clock period; Calculate the number of working clock pulses within the motor drive pulse period at each moment according to the preset working clock pulse frequency and the frequency of the drive pulse at each moment, where the number of working clock pulses within the motor drive pulse period at each moment is calculated according to the following formula: N = Fsys / Fi In the formula, N is the number of working clock pulses within the motor drive pulse period at the i-th moment, Fsys is the preset working clock pulse frequency, and Fi is the working frequency of the motor at the i-th moment; Generate the drive pulse according to the number of pulses at each moment.
7. The pulse generation method based on Bessel curves according to claim 6, wherein, The generating the drive pulse according to the number of working clock pulses within the motor drive pulse period at each moment includes: Perform cyclic counting on the working clock pulses at each moment, and automatically reset to zero when the clock pulse count reaches N - 1 to obtain the pulse count value; When the pulse count value is greater than or equal to 0 and less than or equal to N / 2 - 1, output the first level; When the pulse count value is greater than or equal to N / 2 and less than or equal to N - 1, output the second level, where the first level is a high level or a low level, and the second level has the opposite polarity to the first level, N = Fsys / Fi, Fsys is the preset working clock pulse frequency, and Fi is the working frequency at the i-th moment.
8. A pulse generation device based on a Bessel curve, characterized in that, The device includes: A speed curve acquisition module, configured to obtain an actual printing carriage speed curve according to a preset printing carriage speed curve, where the actual printing carriage speed curve is a Bezier curve; An acceleration and deceleration coefficient acquisition module, configured to obtain the acceleration and deceleration coefficient at each moment according to the cubic Bezier function corresponding to the actual printing carriage speed curve; A frequency acquisition module, configured to obtain the frequency of the drive pulse at each moment according to the acceleration and deceleration coefficient at each moment; A pulse generation module, configured to generate the drive pulse according to the frequency of the drive pulse at each moment.
9. A storage medium having computer program instructions stored thereon, characterized in that, When the computer program instructions are executed by a processor, the method described in any one of claims 1 - 7 is implemented.
10. A printing device, characterized in that, Including: At least one processor, at least one memory, and computer program instructions stored in the memory, and when the computer program instructions are executed by the processor, the method described in any one of claims 1 - 7 is implemented.