Trolley positioning method and device based on linear motor and storage medium thereof
Through the car positioning method based on linear motors, using motor pulse signals and sensor detection, the problem of limited accuracy in traditional positioning methods is solved, and higher positioning accuracy and printing quality is achieved, control process is simplified, and printers are improved. efficiency.
Patent Information
- Application Number
- CN202411111437.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-14
- Publication Date
- 2024-11-26
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Traditional printer car positioning methods rely on gratings or magnetic gratings, and the accuracy is limited by the calculation accuracy of the transmission ratio, resulting in insufficient positioning and reliability.
The car positioning method based on linear motor is adopted, through startup detection, sensor verification, car return, position setting and pulse counting recording, the motor pulse signal is used for closed-loop control, directly map the car moving distance, eliminate mechanical transmission errors, and Apply PID control and vibration suppression algorithms.
Improve the accuracy and repeatability of positioning, simplify the control process, reduce errors, improve print quality and efficiency, and ensure the reliability of the positioning process.
Smart Images

Figure CN119024676A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the field of printing technology, and in particular to a trolley positioning method and device based on a linear motor and a storage medium thereof. Background Art
[0002] As an indispensable device in modern office and production, the core function of a printer is to convert electronic documents into paper documents. Among the many components of a printer, the carriage (also called the print head or ink cartridge carriage) plays a vital role. The carriage is responsible for moving along a specific track during the printing process to achieve precise printing positioning. This process is crucial to the printing quality, because any slight error may cause the printed content to be misplaced or blurred.
[0003] Traditional printer carriage positioning methods mainly rely on gratings or magnetic gratings as a means of position detection. Gratings are optical elements with regularly arranged transparent and opaque lines. The position of the carriage is determined by measuring the changes in light after passing through the grating. Magnetic gratings use the characteristics of magnetic materials to determine the position of the carriage by detecting changes in the magnetic field. Although these two methods can achieve the positioning of the carriage to a certain extent, their accuracy is limited by the calculation accuracy of the transmission ratio. Summary of the invention
[0004] In order to solve the above-mentioned technical problems, the present invention provides a trolley positioning method and device based on a linear motor and a storage medium thereof.
[0005] The technical solution of the present invention is achieved in this way:
[0006] A trolley positioning method based on a linear motor comprises the following steps:
[0007] S1. Power-on detection and sensor verification;
[0008] S2, the trolley returns to its original position and the counter is reset;
[0009] S3, position setting and pulse counting record;
[0010] S4, repeated positioning;
[0011] Furthermore, in S1, when the printer is turned on, the system first determines whether the trolley is within the detection range of the sensor; if the trolley is within the sensor, the system controls the trolley to move away from the sensor area, and monitors the state change of the sensor during the process;
[0012] Furthermore, S2 specifically includes, after confirming that the sensor is working properly, controlling the carriage to move back into the sensor again, that is, returning to the starting position or "origin" of the printer; after reaching the origin, clearing the pulse counter of the motor, that is, clk count, and setting the counter to zero;
[0013] Furthermore, S3 is specifically that the user moves the trolley to a specific printing position through the operation interface or manually as needed, and when the trolley reaches this position, the reading of the motor pulse counter is recorded, and this reading represents the distance from the origin to the current position of the trolley;
[0014] Furthermore, S4 is specifically, when the trolley needs to be moved to the previously recorded position again, a pulse signal having a number equal to the previously recorded number is directly sent to the motor, and the motor drives the trolley to move to the corresponding position according to the number of pulses received.
[0015] A trolley positioning device based on any of the methods described above includes a printer body, on which a trolley is slidably arranged, and the printer body is also provided with a linear motor for driving the movement of the trolley and a sensor for sensing the trolley, the linear motor is provided with a pulse encoder and a controller, and the pulse encoder is connected to the controller signal.
[0016] A storage medium based on any of the methods described above, comprising a control chip, wherein the control chip is equipped with a program code for controlling a linear motor and a trolley positioning, and when the program code is executed, any of the methods described above for trolley positioning based on a linear motor is implemented.
[0017] Compared with the prior art, the present invention has the following beneficial effects:
[0018] The present invention directly utilizes the pulse signal of the motor for closed-loop control, effectively solving the problem of transmission ratio calculation accuracy existing in the traditional positioning method relying on gratings or magnetic gratings. By accurately counting the pulses emitted by the linear motor, it is directly mapped to the moving distance of the trolley, thereby eliminating mechanical transmission errors and improving the accuracy and repeatability of positioning. At the same time, when the machine is turned on, the position of the trolley is detected by the sensor and the state of the sensor is verified, thereby ensuring the reliability of the positioning process, simplifying the control process, reducing errors, and improving the printing quality and efficiency of the printer. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] Figure 1 This is a schematic diagram of a flow chart of a method for positioning a trolley based on a linear motor according to Example 1;
[0020] Figure 2 This is a schematic diagram of the principle of a trolley positioning method based on a linear motor in Example 1. DETAILED DESCRIPTION
[0021] In order to make the purpose, features and advantages of the present invention more obvious and easy to understand, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the embodiments described below are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0022] Example 1
[0023] like Figure 1-2 As shown, a trolley positioning method based on a linear motor includes the following steps:
[0024] S1. Power-on detection and sensor verification;
[0025] S2, the trolley returns to its original position and the counter is reset;
[0026] S3, position setting and pulse counting record;
[0027] S4. Repeat positioning.
[0028] Furthermore, in S1, when the printer is turned on, the system first determines whether the trolley is within the detection range of the sensor; if the trolley is within the sensor, the system controls the trolley to move away from the sensor area, and monitors the state change of the sensor during the process;
[0029] Detect whether the car is in the sensor and evaluate the sensor status using the threshold detection method:
[0030] if(sensor_signal>threshold)theninside else putside,
[0031] sensor_signal is the sensor reading, and threshold is the preset threshold used to determine whether the car is within the sensor range;
[0032] Furthermore, S3 is specifically that the user moves the trolley to a specific printing position through the operation interface or manually as needed, and when the trolley reaches this position, the reading of the motor pulse counter is recorded, and this reading represents the distance from the origin to the current position of the trolley;
[0033] Allows the user to set the target position of the car and calculate the pulse count required for the target position:
[0034] target_pulse_count=distance×pulses_per_unit_length,
[0035] distance is the target distance set by the user, pulses_per_unit_length is the number of pulses generated by the motor per unit length;
[0036] When the car reaches this position, the reading of the motor pulse counter is recorded. This reading represents the distance from the origin to the current position of the car.
[0037] When tracking the position of the car in real time, use filtering to reduce sensor noise:
[0038]
[0039] encoder_pulses_i is the encoder pulse reading in n consecutive sampling periods, and filtered_position is the filtered position estimate;
[0040] Specifically, S4 includes, when the trolley needs to be moved to the previously recorded position again, directly sending a pulse signal with a number equal to the previously recorded number to the motor, and the motor drives the trolley to move to the corresponding position according to the number of pulses received;
[0041] Control the robot to move from its current position to the target position, and use the PID control algorithm to adjust the motor input to achieve smooth and accurate movement:
[0042]
[0043] u(t) is the control input, such as motor voltage, K p , K i , K d are the proportional, integral, and differential gains of the PID controller, and e(t) is the error between the target position and the current position;
[0044] To ensure that the robot reaches the target position, position feedback and error compensation are used for verification:
[0045] if(abs(compensated_position-target_position) <tolerance)return true,
[0046] compensated_position is the position after compensation, target_position is the target position, and tolerance is the allowable error range;
[0047] Furthermore, a vibration suppression algorithm is applied in S4 to reduce the vibration during the movement of the car:
[0048] ①Vibration recognition: detecting vibration through the high-frequency response data of the encoder;
[0049] ②Analyze vibration data to determine the frequency, amplitude and other characteristics of vibration; determine a main vibration frequency fvib through vibration analysis;
[0050] ③ Based on the results of vibration analysis, design a low-pass filter, notch filter or other types of filters; design the transfer function of the notch filter:
[0051]
[0052] Among them, ω n is the notch frequency, ζ is the damping ratio;
[0053] Discretize the continuous-time transfer function, H[z] = the discretized transfer function, and use a bilinear transformation to convert the continuous-time filter into a discrete-time filter;
[0054] Real-time filtering processing, u[k] = H[z]·e[k], where u[k] is the filtered control input and e[k] is the error signal at the current moment;
[0055] Apply the filtered control input to the motor, motor input = u[k];
[0056] ④ Implement vibration suppression control, and adjust the control input of the motor in real time according to the design of the filter to suppress vibration;
[0057] This embodiment realizes the significant advantages of the positioning method of the trolley based on the linear motor. First, the system ensures the accurate positioning of the trolley within the coverage range of the sensor through rapid power-on detection and sensor verification, and at the same time improves the monitoring ability of the sensor state by using the threshold detection method. Secondly, the steps of trolley homing and counter clearing simplify the initialization process, laying the foundation for subsequent precise control. The intelligentization of position setting and pulse counting records, combined with real-time filtering processing, not only improves the accuracy of positioning, but also enhances the stability and reliability of the system. In addition, by applying the PID control algorithm, the system can achieve smooth and accurate repeated positioning, and the introduction of the vibration suppression algorithm significantly reduces the vibration during the movement process, further improving the positioning accuracy. Finally, error compensation and dynamic performance optimization ensure that the trolley can accurately reach the target position, and the intelligent control strategy and user-friendly operation interface of the entire system make the operation more simple and intuitive; overall, this embodiment not only improves the positioning accuracy and system response speed, but also enhances the user experience and convenience of maintenance, demonstrating efficient, energy-saving and intelligent control technology.
[0058] Example 2
[0059] The present embodiment aims to provide a trolley positioning device based on the aforementioned method, including a printer body, on which a trolley is slidably arranged, and the printer body is also provided with a linear motor for driving the movement of the trolley and a sensor for sensing the trolley, and the linear motor is provided with a pulse encoder and a controller, and the pulse encoder is connected to the controller signal.
[0060] in,
[0061] Printer body: As the basic structure of the equipment, it provides a physical platform for the trolley to move;
[0062] Carriage: Sliding inside the printer body, used to carry the print head or other related components to achieve printing function;
[0063] Linear motor: installed on the printer body, responsible for driving the trolley to move along the track and providing a precise power source;
[0064] Sensor: interacts with the car to detect the position and status of the car to ensure accurate positioning;
[0065] Pulse encoder: integrated on the linear motor, providing real-time feedback of the position and speed information of the car and providing necessary data for the closed-loop control system;
[0066] Controller: connected to the pulse encoder signal, receives the feedback information from the encoder, and controls the operation of the linear motor according to the preset program code to achieve precise positioning of the trolley;
[0067] The device slides a trolley inside the printer body and is equipped with a linear motor and sensor for precise driving and positioning. The linear motor is equipped with a pulse encoder and connected to the controller through signals, ensuring real-time monitoring and precise control of the trolley's movement.
[0068] A storage medium based on the aforementioned method includes a control chip, wherein the control chip is equipped with a program code for controlling a linear motor and a trolley positioning, and when the program code is executed, the trolley positioning method based on a linear motor is implemented.
[0069] Control chip: As the core hardware for storing and executing control programs, it carries program codes for controlling the linear motor and the positioning of the car;
[0070] Program code: stored on the control chip, when executed, can realize the positioning method of the trolley based on the linear motor, including but not limited to the steps of power-on detection, sensor calibration, trolley homing, position setting, pulse counting and recording, repeated positioning, etc.;
[0071] The control chip serves as the brain of the system. It stores and executes control programs, enabling the device to automatically perform key steps such as power-on detection, sensor calibration, trolley homing, position setting, pulse counting and recording, and repeated positioning.
[0072] The specific embodiments of the invention are described in detail above, but they are only examples. The present invention is not limited to the specific embodiments described above. Those skilled in the art should understand that the above embodiments and descriptions are only for explaining the principles of the present invention. Without departing from the spirit and scope of the present invention, the present invention may have various changes and improvements, which fall within the scope of the present invention. The scope of protection of the present invention is defined by the attached claims and their equivalents.
Claims
1. A trolley positioning method based on a linear motor, characterized in that: The following steps are involved: S1. Power-on detection and sensor verification; S2, the trolley returns to its original position and the counter is reset; S3, position setting and pulse counting record; S4. Repeat positioning.
2. A method for positioning a trolley based on a linear motor according to claim 1, characterized in that: In S1, when the printer is turned on, the system first determines whether the car is within the detection range of the sensor; if the car is within the sensor, the system controls the car to move away from the sensor area and monitors the state change of the sensor during the process; detects whether the car is within the sensor and evaluates the sensor state, using the threshold detection method: if(sensor_signal>threshold)theninside else outside, sensor_signal] is the sensor reading, and threshold is the preset threshold used to determine whether the car is within the sensor range.
3. A method for positioning a trolley based on a linear motor according to claim 1, characterized in that: Specifically, S2 is to control the carriage to move back into the sensor again, that is, return to the starting position or "origin" of the printer after confirming that the sensor is working normally; after reaching the origin, clear the pulse counter of the motor, that is, clk count, and set the counter to zero.
4. A method for positioning a trolley based on a linear motor according to claim 1, characterized in that: Specifically, S3 is that the user moves the trolley to a specific printing position through the operation interface or manually as needed. When the trolley reaches this position, the reading of the motor pulse counter is recorded. This reading represents the distance from the origin to the current position of the trolley.
5. A method for positioning a trolley based on a linear motor according to claim 1, characterized in that: Specifically, S4 is that when the trolley needs to be moved to the previously recorded position again, a pulse signal having a number equal to the previously recorded number is directly sent to the motor, and the motor drives the trolley to move to the corresponding position according to the number of pulses received.
6. A method for positioning a trolley based on a linear motor according to claim 4, characterized in that: S3 allows the user to set the target position of the car and calculate the pulse count required for the target position: target_pulse_count=distance×pul ses_per_unit_length, distance is the target distance set by the user, pulses_per_unit_length is the number of pulses generated by the motor per unit length; When the car reaches this position, the reading of the motor pulse counter is recorded. This reading represents the distance from the origin to the current position of the car. When tracking the position of the car in real time, use filtering to reduce sensor noise: encoder_pulses_i is the encoder pulse reading in n consecutive sampling periods, and filtered_position is the filtered position estimate.
7. A method for positioning a trolley based on a linear motor according to claim 5, characterized in that: In S4, the robot is controlled to move from the current position to the target position, and the motor input is adjusted using the PID control algorithm to achieve smooth and accurate movement: u(t) is the control input, such as motor voltage, Kp, K i , Kd is the proportional, integral, and differential gains of the PID controller, and e(t) is the error between the target position and the current position; To ensure that the robot reaches the target position, position feedback and error compensation are used for verification: if(abs(compensated_position-target_position)< tolerance)return true, compensated_position is the compensated position, target_position is the target position, and tolerance is the allowable error range.
8. The method for positioning a trolley based on a linear motor according to claim 5, characterized in that: The S4 also applies a vibration suppression algorithm to reduce the vibration of the car during movement: ①Vibration recognition: detecting vibration through the high-frequency response data of the encoder; ②Analyze vibration data to determine the frequency, amplitude and other characteristics of vibration; determine a main vibration frequency fvib through vibration analysis; ③ Based on the results of vibration analysis, design a low-pass filter, notch filter or other types of filters; design the transfer function of the notch filter: Among them, ω n is the notch frequency, ζ is the damping ratio; Discretize the continuous-time transfer function, H[z] = the discretized transfer function, and use a bilinear transformation to convert the continuous-time filter into a discrete-time filter; Real-time filtering processing, u[k] = H[z]·e[k], where u[k] is the filtered control input and e[k] is the error signal at the current moment; Apply the filtered control input to the motor, motor input = u[k]; ④ Implement vibration suppression control and adjust the control input of the motor in real time according to the design of the filter to suppress vibration.
9. A trolley positioning device based on the method according to any one of claims 1 to 8, characterized in that: The printer body comprises a trolley which is slidably arranged on the printer body. The printer body is also provided with a linear motor for driving the trolley to move and a sensor for sensing the trolley. The linear motor is provided with a pulse encoder and a controller, and the pulse encoder is connected with the controller signal.
10. A storage medium based on the method described in any one of claims 1-8, comprising a control chip, wherein the control chip is equipped with a program code for controlling a linear motor and positioning of a trolley, and when the program code is executed, the trolley positioning method described in any one of claims 1-8 is implemented.
Citation Information
Patent Citations
Flux-switching linear motor based rail transit velocity fluctuation inhibition method
CN104104297A
Number-counting and label-printing all-in-one machine
CN105590129A
Lifting equipment control method and equipment and storage medium
CN117498729A
Recording device
CN1827388A
Linear uniaxial intelligent positioning device
CN202217166U
