Portable thermal transfer printer step motor overheating cooperative temperature control method
By constructing a motor temperature rise prediction model array and combining printing density, speed, and ambient temperature parameters, precise coordinated temperature control of the stepper motor and printhead is achieved, solving the problem of temperature control lag or excessive interruption in portable thermal transfer printers and improving the reliability and adaptability of the equipment.
Patent Information
- Application Number
- CN202611202973.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-10
- Publication Date
- 2026-11-06
AI Technical Summary
Existing portable thermal transfer printers lack a forward-looking and accurate prediction of stepper motor temperature rise and a coordinated temperature control mechanism, resulting in delayed or excessive interruption of thermal protection, which affects the reliability and adaptability of the equipment.
An array of motor temperature rise prediction models is constructed. By acquiring parameters such as printing density, speed, and ambient temperature, and combining them with the cumulative number of rotation steps, refined modeling and coordinated temperature control are performed. The model combination is dynamically adjusted to achieve differentiated protection for the stepper motor and printhead.
It improves the accuracy and stability of stepper motor temperature rise prediction, avoids false triggering or delayed response of protection actions, and balances the safety of the motor and printhead with the continuity of printing tasks.
Smart Images

Figure CN123040482A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of thermal transfer printing technology, specifically to a method for coordinated temperature control of stepper motor overheating in portable thermal transfer printers. Background Technology
[0002] Portable thermal transfer printers are widely used in scenarios such as logistics label printing, mobile office, and on-site document printing due to their compact size, portability, and flexibility. During continuous or high-load printing, both the stepper motor and printhead will experience significant temperature rise. Improper temperature control can easily lead to motor step loss, drive damage, or printhead burnout, affecting the lifespan and reliability of the equipment.
[0003] Currently, the temperature control of stepper motors and printheads is usually handled as independent modules, lacking coordinated judgment and linkage response based on the real-time status of both. Due to the lack of proactive means to predict motor temperature rise, temperature control is always in a passive response state, making it difficult to effectively avoid thermal failures before they occur, thus limiting the reliability and adaptability of printers under continuous heavy-duty conditions. Summary of the Invention
[0004] This invention provides a method for coordinated temperature control of stepper motor overheating in portable thermal transfer printers. This invention solves the technical problem in existing technologies where the lack of a forward-looking and accurate prediction of stepper motor temperature rise and a coordinated temperature control mechanism leads to delayed or excessive interruption of thermal protection.
[0005] In view of the above problems, the present invention provides a method for coordinated temperature control of stepper motor overheating in a portable thermal transfer printer, the method comprising:
[0006] The portable thermal transfer printer obtains the print density parameters, print speed parameters, ambient temperature parameters, and the cumulative number of rotation steps of the stepper motor in the current printing task.
[0007] The pre-built motor temperature rise prediction model array is invoked, and the working condition boundary fuzziness coefficient is calculated based on the printing density parameter, the printing speed parameter, and the ambient temperature parameter.
[0008] Based on the fuzzy coefficient of the working condition boundary, a motor temperature rise prediction model is dynamically selected from the motor temperature rise prediction model array to participate in this prediction. The printing density parameter, the printing speed parameter, the ambient temperature parameter, and the cumulative number of rotation steps are respectively input into the selected motor temperature rise prediction model, and the predicted motor temperature of the stepper motor is output.
[0009] The printhead temperature is obtained from the temperature sensor built into the printhead. Based on the predicted motor temperature and the printhead temperature, a coordinated temperature control strategy is executed. The coordinated temperature control strategy includes motor overheat protection and printhead overheat protection.
[0010] One or more technical solutions provided in this invention have at least the following technical effects or advantages:
[0011] This invention constructs a motor temperature rise prediction model array based on operating condition clustering, achieving refined modeling of regions with different heating characteristics. This significantly improves the accuracy and stability of stepper motor temperature rise prediction across the entire operating condition range. By strictly limiting the timing of ambient temperature acquisition to the quiet period before each printing task begins, interference from thermal contamination generated by the print head and motor operation is effectively eliminated. Simultaneously, the cumulative rotation steps within the current startup cycle are introduced for real-time accumulation, enabling the prediction model to quantitatively perceive the total heat accumulation of the motor since startup and accurately capture the thermal superposition effect in multi-task continuous printing scenarios. Through quantitative evaluation of the fuzzy coefficient of the operating condition boundary, the degree of belonging to the current operating condition is accurately determined, and the model combination participating in the prediction is dynamically adjusted accordingly. When the operating condition is clearly assigned, the local accuracy advantage of the best-matching model is fully utilized. When the classification is ambiguous, the system integrates information from multiple models to achieve a smooth transition, further improving the continuity and robustness of predictions. Through a collaborative judgment logic based on predicted motor temperature and measured printhead temperature, it achieves differentiated triggering of two protection actions. When the motor tends to overheat but the printhead still has capacity, printing continues by slowing down and reducing density instead of stopping, balancing motor protection and printing task continuity. When the printhead overheats, it immediately stops to ensure the absolute safety of the printhead. By multiplying the upper limit of the rated operating temperature of the stepper motor and the printhead by their respective independent safety factors, the two overheating thresholds are determined, ensuring that the threshold settings fully adapt to the thermal characteristics of each component. Simultaneously, a buffer space is reserved for prediction errors, effectively avoiding false triggering or delayed response of protection actions. This achieves precise, efficient, and collaborative overheat protection for the stepper motor and printhead.
[0012] In summary, this invention solves the technical problem of delayed or excessive interruption of thermal protection caused by the lack of a forward-looking and accurate prediction and coordinated temperature control mechanism for stepper motor temperature rise in the prior art. Attached Figure Description
[0013] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0014] Figure 1This is a flowchart illustrating the method for coordinated temperature control of stepper motor overheating in a portable thermal transfer printer provided in an embodiment of the present invention.
[0015] Figure 2 This is a schematic diagram of the pre-construction process of the motor temperature rise prediction model array in the portable thermal transfer printer stepper motor overheating collaborative temperature control method provided in the embodiment of the present invention.
[0016] Figure 3 This is a schematic diagram of the network structure of the lightweight regression model in the collaborative temperature control method for overheating of the stepper motor in a portable thermal transfer printer provided in this embodiment of the invention. Detailed Implementation
[0017] This invention provides a method for coordinated temperature control of stepper motor overheating in portable thermal transfer printers, which specifically solves the technical problem of delayed or excessive interruption of thermal protection caused by the lack of forward-looking and accurate prediction of stepper motor temperature rise and coordinated temperature control mechanism in the prior art.
[0018] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative effort are within the scope of protection of the present invention.
[0019] Examples, such as Figure 1 As shown, this invention provides a method for coordinated temperature control of stepper motor overheating in a portable thermal transfer printer, the method comprising:
[0020] S100: Obtain the print density parameters, print speed parameters, ambient temperature parameters, and cumulative rotation steps of the stepper motor in the current printing task of the portable thermal transfer printer.
[0021] In existing temperature control technologies for portable thermal transfer printers, ambient temperature parameters are typically collected during motor operation or immediately after it stops. At this point, sensor readings are already affected by interference from motor self-heating and printhead thermal radiation, failing to reflect the true baseline ambient temperature. Furthermore, most existing solutions only focus on the operating parameters of the current single printing task, lacking a cumulative record of the stepper motor's rotation steps throughout the entire power-on cycle. This results in the complete neglect of the cumulative effect of residual heat from previous tasks on the current temperature rise. In addition, inconsistent data collection times for various operating parameters lead to temporal misalignments in the input features, weakening the accuracy of subsequent prediction models. Therefore, establishing a data acquisition mechanism that can eliminate thermal interference, reflect the cumulative thermal effect, and ensure the temporal synchronization of various parameters has become a pressing technical problem to be solved.
[0022] Step S100 in the method provided in this embodiment of the invention includes:
[0023] Read the print density and print speed parameters of the current print job from the print job configuration of the portable thermal transfer printer;
[0024] The ambient temperature parameters are collected by the ambient temperature sensor integrated into the motherboard of the portable thermal transfer printer, and the collection time is before each printing task begins.
[0025] The number of rotation steps performed by the stepper motor in this printing task is obtained, and the number of rotation steps in this task is added together with the number of rotation steps in each previous printing task within this power-on cycle to obtain the cumulative number of rotation steps.
[0026] In this embodiment of the invention, the print density parameters, print speed parameters, ambient temperature parameters, and the cumulative number of rotation steps of the stepper motor during the current printing cycle of the portable thermal transfer printer are first obtained. Specifically, the main control chip of the portable thermal transfer printer listens in real time to the print task instructions issued by the host computer, such as a mobile APP or PC-based print driver. When a new print task begins to be parsed, the main control chip directly parses and extracts the print density parameters and print speed parameters of the current task from the header of the print task data packet or the configuration descriptor. The print density parameter is usually expressed as grayscale levels or heating pulse width duty cycle, for example, 1 to 10 levels, with higher levels representing longer heating times for each pixel; the print speed parameter is usually expressed as media feed rate, for example, in mm / s. After extraction, these two parameters are temporarily stored in the RAM cache of the microcontroller for subsequent calculations.
[0027] Furthermore, ambient temperature parameters are collected. Specifically, to improve the accuracy of temperature rise prediction and avoid interference from instantaneous printhead heating or motor heat dissipation, this embodiment of the invention strictly limits the timing of ambient temperature data collection. Before each printing task officially begins, i.e., during the idle period before the stepper motor rotates and the printhead is powered on and heated, the main control chip reads the ambient temperature of the printer's internal cavity through a digital ambient temperature sensor integrated into the motherboard. This temperature sensor can be a high-precision NTC thermistor or an SHT30 digital temperature and humidity sensor. The read voltage or digital signal is converted into an actual temperature value in °C after analog-to-digital conversion and linear compensation, serving as the reference ambient temperature parameter for the current operating conditions.
[0028] Furthermore, the cumulative rotation steps are used to quantify the total heat accumulation effect of the stepper motor within the current power-on cycle. The main control chip maintains a non-volatile register variable specifically for storing the cumulative rotation steps since power-on. Whenever a print job is executed, the driver layer determines the total number of pulses required for the current job based on the current print speed parameters and the number of lines to be printed; this total number of pulses is the rotation step count for that job. Specifically, the driver layer first calculates the number of step pulses required per line based on the print speed, then multiplies this value by the total number of lines in the current print job to obtain the rotation step count. After the job is completed, the rotation step count is added to the aforementioned register variable, achieving real-time updates of the cumulative value. When the printer is powered off, this register variable is automatically cleared; if the printer is only in standby mode without power interruption, this cumulative value remains, thus accurately reflecting the total motion wear and heat accumulation of the motor within the power-on cycle.
[0029] For example, suppose a portable thermal transfer printer is powered on at 9:00 AM. Immediately after powering on, it executes its first print job, printing a label. The driver layer reads the job configuration, resolving the print density to level 8 and the print speed to 60 mm / s. Before the job starts, the motherboard sensor detects an ambient temperature of 25°C. This label printing requires 2000 steps from the stepper motor. After the job is completed, the cumulative step count register is updated to 2000 steps. The printer then idles for 30 minutes. At 9:35 AM, the user initiates a second print job, printing a photo. The main control chip again reads the new job configuration, obtaining a print density of level 10 and a print speed of 40 mm / s. Before the stepper motor starts, the current ambient temperature is forcibly detected, measuring 26.5°C. This photo job requires 5000 steps from the motor. After the job is completed, the cumulative step count is updated to 7000 steps. The 7000 steps, along with the concentration, speed, and ambient temperature of 26.5℃ from the new task, are used as input features of the current operating condition and passed to the motor temperature rise prediction model array in subsequent steps. It is important to emphasize that the 26.5℃ collected this time was not affected by the residual heat generated from the previous 2000 steps of motor rotation, because the collection time was strictly limited to before the execution of the new task, and a 30-minute standby cooling and balancing period was allowed.
[0030] This invention effectively eliminates thermal contamination from the printhead and motor by strictly limiting ambient temperature data acquisition to the quiet period before each printing task begins, ensuring the purity and accuracy of the ambient temperature parameters. By introducing the cumulative rotation steps within the current startup cycle and accumulating them in real time, the prediction model can quantify the total heat accumulation of the motor since startup, accurately capturing the thermal superposition effect in multi-task continuous printing scenarios. Simultaneously, by synchronously locking and binding four key parameters at the same moment before the current task starts, a complete operating condition feature vector with strong temporal consistency is constructed, significantly enhancing the correlation of input features when the subsequent model array makes predictions. This greatly improves the accuracy and reliability of stepper motor temperature prediction, providing a solid data foundation for the precise execution of collaborative temperature control strategies.
[0031] S200: Call the pre-built motor temperature rise prediction model array, and calculate the working condition boundary fuzziness coefficient based on the printing density parameter, the printing speed parameter and the ambient temperature parameter.
[0032] In existing portable thermal transfer printer motor temperature rise prediction technologies, a single fixed model is usually used to make uniform predictions for all operating conditions. However, different combinations of printing density, printing speed, and ambient temperature can cause significant changes in the motor's heating characteristics. A single global model cannot take into account the differentiated characteristics of each operating condition region, and the prediction deviation is particularly prominent in the boundary region of the operating condition. At the same time, existing solutions lack a systematic partitioning and targeted modeling mechanism for historical operating conditions. Samples from different heating characteristic ranges interfere with each other, which limits the local prediction accuracy of the model under specific operating conditions.
[0033] Furthermore, online prediction lacks quantitative criteria for determining the degree of belonging to the current operating condition. Relying solely on the nearest neighbor method to select a model can easily overlook other valuable predictive information when the operating condition lies at the boundary of multiple clusters, leading to abrupt and unstable prediction results. Therefore, how to construct a temperature rise prediction system that can scientifically partition operating conditions, train dedicated prediction models for each region, and adaptively adjust the model combination based on the degree of ambiguity at the operating condition boundaries during prediction has become a pressing technical problem to be solved.
[0034] The pre-construction process of the motor temperature rise prediction model array, such as Figure 2 As shown, it includes:
[0035] Collect historical printing data of the portable thermal transfer printer under different printing densities, different printing speeds, and different ambient temperatures during its historical use. Each historical printing data entry includes printing density parameters, printing speed parameters, ambient temperature parameters, cumulative rotation steps, and a corresponding stepper motor temperature rise label. The stepper motor temperature rise label is the actual temperature rise value of the stepper motor at the corresponding cumulative rotation steps.
[0036] The printing density parameter, printing speed parameter and ambient temperature parameter of each historical printing data are used to form a historical working condition feature vector. K-Means clustering is performed on all historical working condition feature vectors to obtain K historical working condition clusters and the cluster center of each historical working condition cluster.
[0037] For each historical working condition cluster, a lightweight regression model is trained using the printing density parameters, printing speed parameters, ambient temperature parameters, and cumulative rotation steps of the historical printing data within that historical working condition cluster as input features, and the corresponding stepper motor temperature rise label as the supervision label. This model serves as the motor temperature rise prediction model for that historical working condition cluster.
[0038] The motor temperature rise prediction model array is obtained by combining K motor temperature rise prediction models, and the cluster center of each historical operating condition cluster is taken as the cluster center of each historical operating condition cluster.
[0039] In this embodiment of the invention, the pre-construction process of the motor temperature rise prediction model array is completed before the printer leaves the factory. First, historical printing data is collected. Specifically, a data acquisition platform is built in a laboratory environment, and a portable thermal transfer printer is controlled to perform numerous printing tests under various combinations of operating conditions. Specifically, the printing density parameter is set to ten levels from 1 to 10, the printing speed parameter is set to multiple levels within the range of 20mm / s to 100mm / s, and the ambient temperature parameter is set to multiple temperature points within the range of 0℃ to 45℃. Cross-combination tests are performed on different values of these parameters. After each test task is completed, the printing density parameter, printing speed parameter, ambient temperature parameter, and the cumulative number of rotation steps from the moment the printer is turned on to the end of the task are recorded. Simultaneously, the actual temperature rise of the motor at that moment is measured using a high-precision thermocouple attached to the stepper motor housing. This measured temperature rise value is used as a monitoring label for that historical printing data. After thorough testing, thousands of historical printing data points covering all commonly used operating condition combinations are collected.
[0040] Secondly, the printing density, printing speed, and ambient temperature parameters from each collected historical printing data point are extracted to form a three-dimensional historical operating condition feature vector. K-Means clustering is then performed on all historical operating condition feature vectors, dividing all historical operating conditions into K clusters. This ensures that the operating condition characteristics within the same cluster are similar, while the operating condition characteristics between different clusters are significantly different. After clustering, the arithmetic mean of all feature vectors within each historical operating condition cluster is calculated to obtain the cluster center, which represents the typical operating condition characteristics of that cluster.
[0041] Subsequently, for each historical operating condition cluster, a lightweight regression model is independently trained using the print density parameters, print speed parameters, ambient temperature parameters, and cumulative rotation steps of all historical print data within that cluster as input features, and the corresponding stepper motor temperature rise label as the supervised objective. This regression model is used to learn the nonlinear mapping relationship between the input operating condition features and cumulative steps to the motor temperature rise value. A dedicated motor temperature rise prediction model is trained for each historical operating condition cluster.
[0042] Finally, the motor temperature rise prediction models corresponding to the above K historical operating condition clusters are combined to form a complete motor temperature rise prediction model array. At the same time, the cluster centers of each historical operating condition cluster are stored together for use in subsequent online prediction for operating condition matching and model selection.
[0043] For each historical operating condition cluster, a lightweight regression model is trained using the print density parameters, print speed parameters, ambient temperature parameters, and cumulative rotation steps of the historical print data within that cluster as input features, and the corresponding stepper motor temperature rise label as the supervision label. This model serves as the motor temperature rise prediction model for that historical operating condition cluster, including:
[0044] An initial lightweight regression model is constructed based on a fully connected neural network. The initial lightweight regression model includes an input layer, a hidden layer, and an output layer.
[0045] The historical printing data within the historical operating condition cluster is divided into a training set and a validation set according to a preset ratio;
[0046] The model input is taken from the printing density parameters, printing speed parameters, ambient temperature parameters and cumulative rotation steps of the historical printing data in the training set. The model input is passed to the hidden layer through the input layer. After nonlinear feature transformation by the hidden layer, it is passed to the output layer. The output layer outputs a predicted temperature rise value.
[0047] The mean square error between the predicted temperature rise value and the stepper motor temperature rise label corresponding to the same historical printing data is calculated. The network parameters of the initial lightweight regression model are updated with the training objective of minimizing the sum of the mean square errors of all historical printing data in the training set.
[0048] After each training round, the mean square error of the initial lightweight regression model on the validation set is calculated. When the mean square error on the validation set no longer decreases within a preset number of consecutive rounds, training is terminated, and the trained lightweight regression model is obtained. The trained lightweight regression model is then used as the motor temperature rise prediction model corresponding to the historical operating condition cluster.
[0049] In this embodiment of the invention, an initial lightweight regression model is first constructed. This model adopts a fully connected neural network structure, consisting of an input layer, a hidden layer, and an output layer. The input layer has four neurons, which are used to receive four input features: printing concentration parameter, printing speed parameter, ambient temperature parameter, and cumulative rotation steps. The hidden layer has sixteen neurons, and the input layer and the hidden layer are fully connected, meaning that each neuron in the input layer is connected to every neuron in the hidden layer. The output layer has one neuron, which outputs the predicted temperature rise value.
[0050] Furthermore, for the historical scenario cluster currently being trained, all historical printing data within this cluster are randomly divided into a training set and a validation set at an 8:2 ratio. The training set comprises 80% of the total data and is used for learning and updating model parameters; the validation set comprises 20% of the total data and is used to monitor the model's generalization performance and control when training stops. This ratio balances the sufficiency of training samples with the statistical reliability of validation set evaluation, effectively preventing model overfitting with limited data.
[0051] Furthermore, the printing density parameters, printing speed parameters, ambient temperature parameters, and cumulative rotation steps of each historical printing data point in the training set are used as model inputs, passed layer by layer from the input layer to the hidden layers. In the hidden layers, each neuron performs a weighted sum of the signals it receives from the input layer, and then performs a nonlinear transformation through the ReLU activation function to generate the neuron's output. The outputs of all neurons in the hidden layers continue to be passed forward to the output layer, where the received signals are weighted summed and then output a scalar value through a linear activation function. This scalar value is the temperature rise value predicted by the model for the current input. The predicted temperature rise value is compared with the stepper motor temperature rise label corresponding to that data point, and the mean squared error between the two is calculated as the prediction loss for that data point.
[0052] Furthermore, with the training objective of minimizing the sum of the mean squared errors of all historical printed data on the training set, the backpropagation algorithm is used to calculate the gradient of the loss function with respect to each network parameter layer by layer, and all connection weights and bias parameters from the input layer to the hidden layer and from the hidden layer to the output layer are updated along the gradient descent direction.
[0053] Finally, during model training, each training epoch first performs a complete forward and backward propagation on the entire training set using the current network parameters. This means all training samples are used to calculate the loss and update the network weights. After each training epoch, the current network parameters are kept constant, and each historical printed data point from the validation set is sequentially input into the model for forward propagation to obtain the predicted temperature rise value for each data point. Then, the mean squared error between all predicted temperature rise values on the validation set and their respective true temperature rise labels is calculated, serving as a quantitative metric for evaluating the generalization ability of the current model.
[0054] The system continuously monitors the change trend of the validation set mean squared error (MSE) with increasing training epochs, pre-setting an early termination threshold of 10 epochs. Starting from the 10th training epoch, after each epoch, the MSE on the validation set in the current epoch is compared with the historical lowest MSE achieved on the validation set over the past 10 epochs. If the MSE value of the current epoch is not lower than the aforementioned historical lowest value, it is considered that the validation set error has not decreased within 10 consecutive training epochs. At this point, the model is deemed to have reached its optimal generalization state, and training is immediately terminated, with no further training epochs executed. After training termination, the network weight parameters and bias parameters at the current moment are saved, thus obtaining the lightweight regression model corresponding to the historical working condition cluster. This early termination control mechanism effectively avoids overfitting caused by excessive learning of noise on the training set, ensuring the model's predictive generalization ability on unknown working condition data.
[0055] An initial lightweight regression model is constructed based on a fully connected neural network, such as... Figure 3 As shown, it includes:
[0056] The number of neurons in the input layer is set to 4, and the four neurons respectively receive the printing density parameter, printing speed parameter, ambient temperature parameter and cumulative rotation steps;
[0057] The number of neurons in the hidden layer is set to 16. The input of each neuron in the hidden layer is weighted and summed, and then nonlinearly transformed by the ReLU activation function. The hidden layer and the input layer are fully connected. The weight matrix from the input layer to the hidden layer has a dimension of 4×16.
[0058] The number of neurons in the output layer is set to 1. The inputs to the output layer are weighted and summed, and a scalar value is output through a linear activation function as the predicted temperature rise value. The dimension of the weight matrix from the hidden layer to the output layer is 16×1.
[0059] In this embodiment of the invention, the initial lightweight regression model comprises an input layer, a hidden layer, and an output layer. The input layer has a fixed number of four neurons, each uniquely corresponding to one of the following parameters: printing concentration, printing speed, ambient temperature, and cumulative rotation steps. The input layer does not perform any data transformation; it simply passes the four received values to the next layer as is.
[0060] The hidden layer contains 16 neurons. Each neuron in the hidden layer is fully connected to all four neurons in the input layer. For any neuron in the hidden layer, the signals from the four input neurons are multiplied by their respective connection weights, summed, and then the neuron's bias term is added to obtain a weighted sum. This weighted sum is then input into the ReLU activation function for a nonlinear transformation. The ReLU activation function sets negative values to zero and keeps positive values unchanged. This nonlinear transformation enables the model to fit complex nonlinear mappings. All connection weights from the input layer to the hidden layer form a 4x16 weight matrix.
[0061] The output layer has only one neuron. The output layer neuron is fully connected to all 16 neurons in the hidden layer. The output layer neuron multiplies the signals from each of the 16 hidden layer neurons by their respective connection weights, sums the results, and adds the bias term from the output layer neuron to obtain a weighted sum. This weighted sum is then input into a linear activation function, which directly outputs the value of the weighted sum as the final predicted temperature rise. All connection weights from the hidden layer to the output layer form a 16x1 weight matrix.
[0062] The above network structure parameter settings result in a smaller number of overall model parameters and less computation, which can fully adapt to the limited computing power and storage resources of the main control chip of portable thermal transfer printers.
[0063] Step S200 in the method provided in this embodiment of the invention includes:
[0064] The printing density parameter, the printing speed parameter, and the ambient temperature parameter are used to construct a feature vector for the current operating condition.
[0065] Calculate the Euclidean distance between the current operating condition feature vector and the center of each historical operating condition cluster in the motor temperature rise prediction model array, sort all Euclidean distances from smallest to largest, and extract the nearest and second nearest distances;
[0066] Divide the nearest distance by the second nearest distance to obtain the ambiguity coefficient of the working condition boundary, wherein when the second nearest distance is 0, the ambiguity coefficient of the working condition boundary is set to 0.
[0067] In this embodiment of the invention, when the portable thermal transfer printer receives a new printing task, it obtains the printing density parameter, printing speed parameter, ambient temperature parameter, and cumulative rotation steps in the current power-on cycle of the current task according to the aforementioned method. The first three parameters of these four parameters, namely the printing density parameter, printing speed parameter, and ambient temperature parameter, are extracted and combined to form the current operating condition feature vector.
[0068] Furthermore, the Euclidean distance between the current operating condition feature vector and the centers of each historical operating condition cluster in the motor temperature rise prediction model array is calculated. Specifically, for each historical operating condition cluster center, its three-dimensional coordinates are subtracted from the corresponding three-dimensional coordinates of the current operating condition feature vector, squared, summed, and then the square root is taken to obtain the Euclidean distance between them. This distance value reflects the similarity between the current operating condition and the centers of each historical operating condition cluster; the smaller the distance, the closer the current operating condition is to the operating condition characteristics of that cluster. All calculated Euclidean distances are arranged in ascending order of value, and the smallest nearest distance and the second smallest nearest distance are extracted from them.
[0069] Furthermore, the extracted nearest distance is divided by the second nearest distance, and the resulting ratio is the ambiguity coefficient of the working condition boundary. This ambiguity coefficient ranges from zero to one. When the nearest distance is much smaller than the second nearest distance, the ambiguity coefficient approaches zero, indicating that the current working condition clearly belongs to the nearest working condition cluster, and the boundary is clear. When the nearest distance and the second nearest distance are nearly equal, the ambiguity coefficient approaches one, indicating that the current working condition is in the boundary region of multiple working condition clusters, and its affiliation is ambiguous. Specifically, when the second nearest distance is zero, it means that the distance between the current working condition feature vector and the centers of two clusters is simultaneously zero; in this case, the ambiguity coefficient of the working condition boundary is directly set to zero.
[0070] This invention employs a clustering algorithm to partition historical operating conditions and trains independent prediction models for each cluster, achieving refined modeling of regions with different heating characteristics. This avoids interference between samples and effectively improves the local prediction accuracy within each operating condition region. By using a lightweight neural network structure with a single hidden layer and a limited number of neurons, the number of model parameters is kept to a very low level, fully adapting to the limited computing resources of portable device main control chips. By introducing an operating condition boundary ambiguity coefficient, a quantitative assessment of the degree of current operating condition attribution is achieved. This allows for adaptive adjustment of the model combination involved in prediction based on the degree of boundary ambiguity. When the operating condition attribution is clear, the accuracy advantage of the best-matching model is fully utilized; when the attribution is ambiguous, information from multiple models is fused to achieve a smooth transition. The combined effect of these mechanisms significantly improves the accuracy, stability, and environmental adaptability of motor temperature rise prediction across the entire operating condition range.
[0071] S300: Based on the fuzzy coefficient of the working condition boundary, dynamically select the motor temperature rise prediction model to participate in this prediction from the array of motor temperature rise prediction models, input the printing density parameter, the printing speed parameter, the ambient temperature parameter and the cumulative number of rotation steps into the selected motor temperature rise prediction model respectively, and output the predicted motor temperature of the stepper motor.
[0072] In existing motor temperature rise prediction technologies, when using multi-model arrays for prediction, there is a lack of quantitative basis for adaptively determining the number of models to be called based on the degree of ambiguity of the operating condition boundaries. Typically, the number of models called is fixed based on experience, leading to excessive model calls causing unnecessary computational overhead when the boundaries are clear, and insufficient model calls resulting in insufficient information when the boundaries are ambiguous. Furthermore, when selecting participating models, existing solutions often simply select a fixed number based on distance, failing to dynamically adjust according to the degree of belonging to the operating condition. When the operating condition is at the boundary of multiple clusters, even slight fluctuations in the operating condition can cause abrupt changes in the selection results, resulting in discontinuous oscillations in the predicted temperature. In addition, when fusing the prediction results of multiple models, existing technologies only calculate weights based on the operating condition distance, ignoring the differences in prediction stability of each model within its own specific region. This results in models that are closer in distance but have high prediction dispersion being given excessive weights, which degrades the fusion accuracy. Therefore, how to establish a prediction fusion mechanism that can adaptively determine the number of models to be called based on the degree of ambiguity of the operating condition boundaries and scientifically weight the results by combining operating condition distance and model confidence has become an urgent technical problem to be solved.
[0073] Step S300 in the method provided in this embodiment of the invention includes:
[0074] Multiply the fuzzy coefficient of the working condition boundary by the total number of models in the motor temperature rise prediction model array and round up to obtain the number of models that need to be called.
[0075] According to the Euclidean distance between the current operating condition feature vector and the center of each historical operating condition cluster in ascending order, select the number of motor temperature rise prediction models sequentially from the motor temperature rise prediction model array.
[0076] The printing density parameter, the printing speed parameter, the ambient temperature parameter, and the cumulative number of rotation steps are respectively input into each selected motor temperature rise prediction model, and each selected motor temperature rise prediction model outputs an initial predicted motor temperature.
[0077] Based on the distance between the current operating condition feature vector and the center of the historical operating condition cluster corresponding to each selected motor temperature rise prediction model, the operating condition matching weight of each selected motor temperature rise prediction model is calculated.
[0078] The predicted motor temperature is obtained by weighting each initial predicted motor temperature according to the operating condition matching weight.
[0079] In this embodiment of the invention, the calculated ambiguity coefficient of the operating condition boundary is first multiplied by the total number of models in the motor temperature rise prediction model array. The product is then rounded up to obtain the number of models required for this prediction. This number is at least one and at most the total number of models in the model array. When the ambiguity coefficient of the operating condition boundary approaches zero, fewer models are required, and only the most matching one or a few models need to be called. When the ambiguity coefficient of the operating condition boundary approaches one, more models are required to achieve full fusion of information from multiple models.
[0080] Furthermore, all models in the motor temperature rise prediction model array are sorted in ascending order of their Euclidean distance from the current operating condition feature vector to the center of each historical operating condition cluster. Following this sorting, the previously determined number of motor temperature rise prediction models are selected as the participating models for this prediction. Specifically, when only one model is needed, i.e., when the operating condition boundary is extremely clear, only the model with the closest distance is selected for prediction.
[0081] Furthermore, the printing density parameters, printing speed parameters, ambient temperature parameters, and cumulative rotation steps of the current operating condition are input into each selected motor temperature rise prediction model. Each model independently completes the forward calculation and outputs an initial predicted motor temperature. Since each model is trained on different historical operating condition clusters, their prediction results for the same input operating condition may differ. This precisely reflects the different understandings of the temperature rise characteristics of the current operating condition from the perspective of different clusters.
[0082] Secondly, for each selected motor temperature rise prediction model, the operating condition matching weight of the model under the current operating condition is calculated based on the distance between the current operating condition feature vector and the center of the historical operating condition cluster corresponding to the model. The closer the distance, the closer the current operating condition is to the operating condition area that the model is good at, and the higher the weight should be given to the prediction result of the model; the farther the distance, the greater the difference between the current operating condition and the operating condition area of the model, and the lower the weight should be given to the prediction result of the model.
[0083] Finally, based on the calculated matching weights of each model's operating conditions, a weighted average is calculated for each initial predicted motor temperature, and the result of the weighted average is used as the final output predicted motor temperature. Through weighted fusion, it is ensured that the prediction of the best-matching model dominates when the operating condition boundaries are clear, while also ensuring that the prediction information of multiple related models is reasonably integrated when the operating condition boundaries are ambiguous.
[0084] Specifically, based on the distance between the current operating condition feature vector and the center of the historical operating condition cluster corresponding to each selected motor temperature rise prediction model, the operating condition matching weight of each selected motor temperature rise prediction model is calculated, including:
[0085] Calculate the Euclidean distance between the center of the historical operating condition cluster corresponding to each selected motor temperature rise prediction model and the feature vector of the current operating condition;
[0086] Obtain the standard deviation of the prediction error on the validation set for each selected motor temperature rise prediction model when the pre-construction stage training is completed, and use the standard deviation of the prediction error as the local prediction confidence of each selected motor temperature rise prediction model.
[0087] Multiply the Euclidean distance corresponding to each selected motor temperature rise prediction model with the corresponding local prediction confidence to obtain the comprehensive distance metric for each selected motor temperature rise prediction model.
[0088] Calculate the reciprocal of the comprehensive distance metric for each selected motor temperature rise prediction model, normalize all reciprocals, and use the normalized reciprocals as the operating condition matching weights for each selected motor temperature rise prediction model.
[0089] First, for each selected motor temperature rise prediction model, the Euclidean distance between the center of the historical operating condition cluster corresponding to the model and the feature vector of the current operating condition is calculated. This distance reflects the similarity between the current operating condition and the typical operating condition region represented by the model; the smaller the distance, the higher the degree of matching between the operating conditions.
[0090] Secondly, during the pre-construction phase of the motor temperature rise prediction model, after each model is trained, its prediction error standard deviation on its respective validation set is recorded. This standard deviation is obtained as follows: during the model validation process after training, the input features of each historical printing data in the validation set are input into the model to obtain the predicted temperature rise value. The error between the predicted temperature rise value and the actual temperature rise label for each data point is calculated, and then the standard deviation of the prediction errors for all data on the validation set is statistically analyzed. This standard deviation quantifies the prediction stability and reliability of the model within its specific operating condition region. The smaller the standard deviation, the more stable the model's prediction results and the higher the confidence level. The prediction error standard deviation of each model is saved as the local prediction confidence level of that model for use during online prediction.
[0091] Subsequently, for each selected motor temperature rise prediction model, its corresponding Euclidean distance is multiplied by its corresponding local prediction confidence level to obtain the comprehensive distance metric for that motor temperature rise prediction model. This comprehensive distance metric considers both the proximity of the current operating condition to the model's preferred region and the model's own prediction stability, serving as a comprehensive evaluation index of the model's predictive applicability.
[0092] Finally, the reciprocal of the comprehensive distance metric for each selected motor temperature rise prediction model is calculated. The reason for using the reciprocal is that a smaller comprehensive distance metric indicates a closer proximity to the operating conditions and a higher model confidence level, meaning the model is more applicable to the current operating conditions and should therefore receive a higher weight. Taking the reciprocal results in a larger value, which aligns with the desired weight direction. Subsequently, the reciprocals of all selected models are summed and normalized; that is, the reciprocal of each model is divided by the sum of the reciprocals of all models to obtain the final operating condition matching weight for each model. After normalization, the sum of the weights of all selected models is one.
[0093] This invention adaptively determines the number of models to be called by multiplying the ambiguity coefficient of the working condition boundary with the total number of models. This achieves dynamic adjustment of the number of models called based on the clarity of the working condition attribution. When the boundary is clear, the number of models called is reduced to improve computational efficiency, while when the boundary is ambiguous, the number of models called is increased to ensure information sufficiency. By selecting models in ascending order of working condition distance, the invention ensures that the model that best matches the current working condition is called first for prediction. By using the standard deviation of the prediction error of each model on the validation set as the local confidence level and multiplying it with the working condition distance to construct a comprehensive distance metric, the weights simultaneously reflect the working condition matching degree and the model's own stability, achieving a more scientific and reasonable weighted fusion. Finally, the predicted temperature is output by weighted averaging of multiple models, significantly improving the accuracy, continuity, and reliability of predictions across the entire working condition range.
[0094] S400: Obtain the printhead temperature collected by the temperature sensor built into the printhead, and execute a coordinated temperature control strategy based on the predicted motor temperature and the printhead temperature. The coordinated temperature control strategy includes motor overheat protection action and printhead overheat protection action.
[0095] In existing temperature control technologies for portable thermal transfer printers, the protection of the stepper motor and the printhead are typically designed as two independent modules, lacking a collaborative judgment mechanism based on the real-time temperature status of both. When the motor overheats while the printhead still has capacity, the printer shuts down directly, interrupting a task that could have continued. Furthermore, existing solutions lack proactive prediction of motor thermal tendencies, often triggering protection only after the actual temperature exceeds the limit, resulting in a delayed response. In addition, overheat thresholds are often set using fixed empirical values or simple correlations between two thresholds, failing to fully consider the differences in the rated temperature limits of different components and the inherent error range of the prediction model, leading to overly conservative or aggressive threshold settings. Therefore, establishing a temperature control strategy that can distinguish overheating types, collaboratively execute differentiated protection actions, and has scientifically reasonable threshold settings has become a pressing technical problem that needs to be solved.
[0096] Step S400 in the method provided in this embodiment of the invention includes:
[0097] The temperature of the printhead is collected in real time by a temperature sensor built into the printhead. The temperature sensor is a thermistor integrated on the ceramic substrate of the printhead.
[0098] When the predicted motor temperature reaches the preset motor overheating threshold and the printhead temperature is lower than the preset printhead overheating threshold, it is determined that the stepper motor is in an overheating tendency state, and the motor overheating protection action is executed. The motor overheating protection action is to reduce the printing speed parameter and reduce the printing density parameter.
[0099] When the printhead temperature is higher than the preset printhead overheating threshold, it is determined to be a printhead overheating state, and a printhead protection action is executed. The printhead protection action is to immediately stop the current printing task and wait for the printhead temperature to drop below the preset printhead overheating threshold before resuming printing.
[0100] In this embodiment of the invention, the printhead temperature is first acquired in real time. Specifically, a thermistor is integrated on the ceramic substrate of the printhead as a temperature sensor. This thermistor is arranged close to the heating element of the printhead and can sensitively reflect the actual operating temperature of the printhead. The main control chip periodically reads the resistance change of the thermistor through an analog-to-digital converter interface and converts it into the actual printhead temperature value through table lookup or linear compensation. This process is continuously acquired and updated in real time throughout the entire printing task.
[0101] Furthermore, the main control chip compares the predicted motor temperature with the preset motor overheating threshold. When the predicted motor temperature reaches or exceeds the preset motor overheating threshold, and the printhead temperature is simultaneously below the preset printhead overheating threshold, it is determined that the stepper motor is in an overheating tendency state. In this state, the printhead still has some capacity to continue operating, but the motor has approached or reached its safe operating temperature limit, requiring immediate measures to reduce the motor's heating rate. At this point, the motor overheating protection action is executed.
[0102] Specifically, the main control chip actively reduces the printing speed parameter, i.e., reduces the rotation frequency of the stepper motor, decreasing the number of rotation steps per unit time, thereby reducing the current switching frequency and heat generation power of the winding coil. Simultaneously, it appropriately reduces the printing density parameter, i.e., reduces the width or duty cycle of the printhead heating pulse, indirectly shortening the motor stepping wait time for each printed line, further reducing the motor's rotational load per unit time. The magnitude of the speed and density reduction can be adjusted in stages based on the predicted degree to which the motor temperature exceeds the preset overheat threshold; the greater the overheating threshold, the greater the reduction. After these two actions are executed in tandem, the motor's heating rate decreases significantly, and the printing task continues at the reduced speed and density without interruption, thus protecting the motor while maintaining printing continuity.
[0103] Furthermore, the main control chip compares the real-time collected printhead temperature with the preset printhead overheating threshold. When the printhead temperature exceeds the preset printhead overheating threshold, it is determined that the printhead is currently in an overheating state. In this state, the printhead's own heating element or ceramic substrate has reached or exceeded the safe temperature limit. If power is continued to be supplied for heating, it may cause permanent damage to the printhead. At this time, the printhead protection action is executed.
[0104] Specifically, the main control chip immediately stops the current printing task, cuts off the heating power to the printhead, and the stepper motor also stops rotating, pausing the entire printing process. It then enters a cooling-down state, continuously monitoring the printhead temperature. When the printhead temperature gradually drops below the preset overheat threshold and sufficient hysteresis is maintained, the printing task automatically resumes from the point of interruption. These actions ensure that the printhead will not be damaged by overheating under any circumstances.
[0105] It should be noted that the motor overheat protection and printhead overheat protection actions are not mutually exclusive, but rather triggered collaboratively based on the real-time temperature status of their respective components. When neither component is overheating, the printing task proceeds normally; when only the motor is prone to overheating, the motor overheat protection action is triggered, reducing the speed and density before continuing printing; when only the printhead is overheating, the printhead protection action is triggered, stopping printing and waiting for it to cool down; when both components overheat simultaneously, the printhead protection action takes priority, stopping all operations to ensure the safety of this expensive and vulnerable component.
[0106] The methods for determining the preset motor overheat threshold and the preset printhead overheat threshold include:
[0107] Obtain the upper limit of the rated operating temperature of the stepper motor, and multiply the upper limit of the rated operating temperature of the stepper motor by the first safety factor to obtain the preset motor overheating threshold.
[0108] Obtain the upper limit of the rated operating temperature of the printhead, and multiply the upper limit of the rated operating temperature of the printhead by the second safety factor to obtain the preset printhead overheating threshold.
[0109] There is no fixed relationship between the preset motor overheating threshold and the preset printhead overheating threshold. The preset motor overheating threshold is only used to compare with the predicted motor temperature, and the preset printhead overheating threshold is only used to compare with the printhead temperature.
[0110] First, obtain the upper limit of the rated operating temperature specified in the stepper motor's product specifications. This upper limit is the highest permissible operating temperature at which the motor manufacturer guarantees that the coil insulation material and permanent magnet performance will not undergo irreversible degradation. Multiply this upper limit by a first safety factor; the product is the preset motor overheat threshold. The first safety factor is between zero and one, and its specific value is determined comprehensively based on the motor's thermal time constant, the printer's internal heat dissipation conditions, and the error range of the prediction model. Preferably, the first safety factor is between 0.85 and 0.95, which provides a buffer for prediction errors and sudden temperature rises, while preventing excessively frequent triggering of protection actions due to an overly low threshold, thus avoiding impact on printing efficiency.
[0111] Secondly, obtain the upper limit of the rated operating temperature specified in the printhead product specification. This upper limit is the highest permissible operating temperature that the printhead manufacturer guarantees will not cause thermal damage to the heating element and ceramic substrate. Multiply this upper limit of the rated operating temperature of the printhead by a second safety factor; the product is the preset printhead overheating threshold. The value of the second safety factor is between zero and one, and its specific value is determined comprehensively based on the thermal response characteristics of the printhead, heat dissipation conditions, and temperature sensor measurement errors. Preferably, the second safety factor is between 0.80 and 0.90 to fully protect the safety of the printhead.
[0112] It's important to note that there is no fixed relationship between the preset motor overheat threshold and the preset printhead overheat threshold. Since stepper motors and printheads are two completely different components, their rated operating temperature limits typically differ significantly. For example, the rated operating temperature limit of a printhead may be over 300℃, while the rated operating temperature limit of a stepper motor is usually only 80℃ to 120℃. After multiplying by their respective safety factors, the preset motor overheat threshold may be much lower than the preset printhead overheat threshold, or vice versa depending on the specific component selection. The two thresholds are stored and retrieved independently. The preset motor overheat threshold is only used to compare with the predicted motor temperature to determine whether to trigger motor overheat protection; the preset printhead overheat threshold is only used to compare with the printhead temperature to determine whether to trigger printhead protection. They do not interfere with or convert between each other, each serving an independent protection logic.
[0113] For example, suppose that in a portable thermal transfer printer, the upper limit of the rated operating temperature of the stepper motor is 100°C, and the first safety factor is 0.9, then the preset motor overheating threshold is 90°C; the upper limit of the rated operating temperature of the printhead is 300°C, and the second safety factor is 0.85, then the preset printhead overheating threshold is 255°C.
[0114] There is a continuous printing job where parameters change in real time. At a certain moment, the predicted motor temperature is 92℃, while the printhead temperature is 210℃. This indicates a tendency for the stepper motor to overheat, and the motor overheat protection mechanism is immediately activated: the printing speed is reduced from the current 60mm / s to 40mm / s, and the print density is reduced from level 8 to level 6. After reducing the speed and density, the motor's heating rate decreases significantly, the predicted motor temperature begins to drop, and the printing job continues with the adjusted parameters without interruption.
[0115] If the printhead temperature subsequently rises to 260℃, exceeding the preset printhead overheating threshold of 255℃, it is immediately determined to be in an overheated state. Printhead protection actions are executed, immediately stopping the current printing task, cutting off the power supply to the printhead heater, and stopping the stepper motor. It then enters a waiting state, continuously monitoring the printhead temperature. Once the printhead temperature gradually drops to 245℃, the printing task automatically resumes from the point of interruption.
[0116] It should be noted that the above values are for illustrative purposes only and do not constitute a limitation on the present invention.
[0117] This invention, through the introduction of a collaborative judgment logic based on predicted motor temperature and measured printhead temperature, achieves differentiated triggering of two protection actions. When the motor tends to overheat but the printhead still has capacity, printing continues by reducing speed and density instead of stopping, balancing motor protection and task continuity. When the printhead overheats, it immediately stops to ensure the absolute safety of the expensive printhead. By determining the overheat threshold by multiplying the upper limit of the rated operating temperature of each component by an independent safety factor, the threshold setting is fully adapted to the thermal characteristics of the components themselves, while reserving buffer space for prediction errors, effectively avoiding false triggering or delayed response. The two thresholds have no fixed magnitude relationship and are used independently for comparison of corresponding temperatures, ensuring reliable decoupling of the two protection logics and achieving accurate, efficient, and collaborative overheat protection for the stepper motor and printhead.
[0118] In summary, the embodiments of the present invention have at least the following technical effects:
[0119] This invention constructs a motor temperature rise prediction model array based on operating condition clustering, achieving refined modeling of regions with different heating characteristics. This significantly improves the accuracy and stability of stepper motor temperature rise prediction across the entire operating condition range. By strictly limiting the timing of ambient temperature acquisition to the quiet period before each printing task begins, interference from thermal contamination generated by the print head and motor operation is effectively eliminated. Simultaneously, the cumulative rotation steps within the current startup cycle are introduced for real-time accumulation, enabling the prediction model to quantitatively perceive the total heat accumulation of the motor since startup and accurately capture the thermal superposition effect in multi-task continuous printing scenarios. Through quantitative evaluation of the fuzzy coefficient of the operating condition boundary, the degree of belonging to the current operating condition is accurately determined, and the model combination participating in the prediction is dynamically adjusted accordingly. When the operating condition is clearly assigned, the local accuracy advantage of the best-matching model is fully utilized. When the classification is ambiguous, the system integrates information from multiple models to achieve a smooth transition, further improving the continuity and robustness of predictions. Through a collaborative judgment logic based on predicted motor temperature and measured printhead temperature, it achieves differentiated triggering of two protection actions. When the motor tends to overheat but the printhead still has capacity, printing continues by slowing down and reducing density instead of stopping, balancing motor protection and printing task continuity. When the printhead overheats, it immediately stops to ensure the absolute safety of the printhead. By multiplying the upper limit of the rated operating temperature of the stepper motor and the printhead by their respective independent safety factors, the two overheating thresholds are determined, ensuring that the threshold settings fully adapt to the thermal characteristics of each component. Simultaneously, a buffer space is reserved for prediction errors, effectively avoiding false triggering or delayed response of protection actions. This achieves precise, efficient, and collaborative overheat protection for the stepper motor and printhead.
[0120] In summary, this invention solves the technical problem of delayed or excessive interruption of thermal protection caused by the lack of a forward-looking and accurate prediction and coordinated temperature control mechanism for stepper motor temperature rise in the prior art.
[0121] It should be noted that the order of the above embodiments of the present invention is merely for descriptive purposes and does not represent the superiority or inferiority of the embodiments. Furthermore, the above description focuses on specific embodiments of this specification. Additionally, the processes depicted in the accompanying drawings do not necessarily require a specific or sequential order to achieve the desired results. In some embodiments, multitasking and parallel processing are possible or may be advantageous.
[0122] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
[0123] This specification and accompanying drawings are merely illustrative examples of the invention and are intended to cover any and all modifications, variations, combinations, or equivalents within the scope of the invention. Clearly, those skilled in the art can make various alterations and modifications to the invention without departing from its scope. Therefore, if such modifications and modifications fall within the scope of the invention and its equivalents, the invention is intended to include these modifications and modifications.
Claims
1. A method for coordinated temperature control of stepper motor overheating in a portable thermal transfer printer, characterized in that, The portable thermal transfer printer includes a printhead and a stepper motor, and the method includes: The portable thermal transfer printer obtains the print density parameters, print speed parameters, ambient temperature parameters, and the cumulative number of rotation steps of the stepper motor in the current printing task. The pre-built motor temperature rise prediction model array is invoked, and the working condition boundary fuzziness coefficient is calculated based on the printing density parameter, the printing speed parameter, and the ambient temperature parameter. Based on the fuzzy coefficient of the working condition boundary, a motor temperature rise prediction model is dynamically selected from the motor temperature rise prediction model array to participate in this prediction. The printing density parameter, the printing speed parameter, the ambient temperature parameter, and the cumulative number of rotation steps are respectively input into the selected motor temperature rise prediction model, and the predicted motor temperature of the stepper motor is output. The printhead temperature is obtained from the temperature sensor built into the printhead. Based on the predicted motor temperature and the printhead temperature, a coordinated temperature control strategy is executed. The coordinated temperature control strategy includes motor overheat protection and printhead overheat protection.
2. The method for coordinated temperature control of stepper motor overheating in a portable thermal transfer printer according to claim 1, characterized in that, The process of acquiring the print density parameters, print speed parameters, ambient temperature parameters, and cumulative rotation steps of the stepper motor during the current printing cycle of the portable thermal transfer printer includes: Read the print density and print speed parameters of the current print job from the print job configuration of the portable thermal transfer printer; The ambient temperature parameters are collected by the ambient temperature sensor integrated into the motherboard of the portable thermal transfer printer, and the collection time is before each printing task begins. The number of rotation steps performed by the stepper motor in this printing task is obtained, and the number of rotation steps in this task is added together with the number of rotation steps in each previous printing task within this power-on cycle to obtain the cumulative number of rotation steps.
3. The method for coordinated temperature control of stepper motor overheating in a portable thermal transfer printer according to claim 1, characterized in that, The pre-construction process of the motor temperature rise prediction model array includes: Collect historical printing data of the portable thermal transfer printer under different printing densities, different printing speeds, and different ambient temperatures during its historical use. Each historical printing data entry includes printing density parameters, printing speed parameters, ambient temperature parameters, cumulative rotation steps, and a corresponding stepper motor temperature rise label. The stepper motor temperature rise label is the actual temperature rise value of the stepper motor at the corresponding cumulative rotation steps. The printing density parameter, printing speed parameter and ambient temperature parameter of each historical printing data are used to form a historical working condition feature vector. K-Means clustering is performed on all historical working condition feature vectors to obtain K historical working condition clusters and the cluster center of each historical working condition cluster. For each historical working condition cluster, a lightweight regression model is trained using the printing density parameters, printing speed parameters, ambient temperature parameters, and cumulative rotation steps of the historical printing data within that historical working condition cluster as input features, and the corresponding stepper motor temperature rise label as the supervision label. This model serves as the motor temperature rise prediction model for that historical working condition cluster. The motor temperature rise prediction model array is obtained by combining K motor temperature rise prediction models, and the cluster center of each historical operating condition cluster is taken as the cluster center of each historical operating condition cluster.
4. The method for coordinated temperature control of stepper motor overheating in a portable thermal transfer printer according to claim 3, characterized in that, For each historical operating condition cluster, a lightweight regression model is trained using the print density parameters, print speed parameters, ambient temperature parameters, and cumulative rotation steps of the historical print data within that cluster as input features, and the corresponding stepper motor temperature rise label as the supervision label. This model serves as the motor temperature rise prediction model for that historical operating condition cluster, including: An initial lightweight regression model is constructed based on a fully connected neural network. The initial lightweight regression model includes an input layer, a hidden layer, and an output layer. The historical printing data within the historical operating condition cluster is divided into a training set and a validation set according to a preset ratio; The model input is taken from the printing density parameters, printing speed parameters, ambient temperature parameters and cumulative rotation steps of the historical printing data in the training set. The model input is passed to the hidden layer through the input layer. After nonlinear feature transformation by the hidden layer, it is passed to the output layer. The output layer outputs a predicted temperature rise value. The mean square error between the predicted temperature rise value and the stepper motor temperature rise label corresponding to the same historical printing data is calculated. The network parameters of the initial lightweight regression model are updated with the training objective of minimizing the sum of the mean square errors of all historical printing data in the training set. After each training round, the mean square error of the initial lightweight regression model on the validation set is calculated. When the mean square error on the validation set no longer decreases within a preset number of consecutive rounds, training is terminated, and the trained lightweight regression model is obtained. The trained lightweight regression model is then used as the motor temperature rise prediction model corresponding to the historical operating condition cluster.
5. The method for coordinated temperature control of stepper motor overheating in a portable thermal transfer printer according to claim 4, characterized in that, An initial lightweight regression model is constructed based on a fully connected neural network, including: The number of neurons in the input layer is set to 4, and the four neurons respectively receive the printing density parameter, printing speed parameter, ambient temperature parameter and cumulative rotation steps; The number of neurons in the hidden layer is set to 16. The input of each neuron in the hidden layer is weighted and summed, and then nonlinearly transformed by the ReLU activation function. The hidden layer and the input layer are fully connected. The weight matrix from the input layer to the hidden layer has a dimension of 4×16. The number of neurons in the output layer is set to 1. The inputs to the output layer are weighted and summed, and a scalar value is output through a linear activation function as the predicted temperature rise value. The dimension of the weight matrix from the hidden layer to the output layer is 16×1.
6. The method for coordinated temperature control of stepper motor overheating in a portable thermal transfer printer according to claim 1, characterized in that, Based on the print density parameter, the print speed parameter, and the ambient temperature parameter, calculate the boundary ambiguity coefficient of the current operating condition, including: The printing density parameter, the printing speed parameter, and the ambient temperature parameter are used to construct a feature vector for the current operating condition. Calculate the Euclidean distance between the current operating condition feature vector and the center of each historical operating condition cluster in the motor temperature rise prediction model array, sort all Euclidean distances from smallest to largest, and extract the nearest and second nearest distances; Divide the nearest distance by the second nearest distance to obtain the ambiguity coefficient of the working condition boundary, wherein when the second nearest distance is 0, the ambiguity coefficient of the working condition boundary is set to 0.
7. The method for coordinated temperature control of stepper motor overheating in a portable thermal transfer printer according to claim 1, characterized in that, Based on the fuzzy coefficient of the operating condition boundary, a motor temperature rise prediction model is dynamically selected from the motor temperature rise prediction model array to participate in this prediction. The print density parameter, the print speed parameter, the ambient temperature parameter, and the cumulative rotation steps are respectively input into the selected motor temperature rise prediction model, and the predicted motor temperature of the stepper motor is output, including: Multiply the fuzzy coefficient of the working condition boundary by the total number of models in the motor temperature rise prediction model array and round up to obtain the number of models that need to be called. According to the Euclidean distance between the current operating condition feature vector and the center of each historical operating condition cluster in ascending order, select the number of motor temperature rise prediction models sequentially from the motor temperature rise prediction model array. The printing density parameter, the printing speed parameter, the ambient temperature parameter, and the cumulative number of rotation steps are respectively input into each selected motor temperature rise prediction model, and each selected motor temperature rise prediction model outputs an initial predicted motor temperature. Based on the distance between the current operating condition feature vector and the center of the historical operating condition cluster corresponding to each selected motor temperature rise prediction model, the operating condition matching weight of each selected motor temperature rise prediction model is calculated. The predicted motor temperature is obtained by weighting each initial predicted motor temperature according to the operating condition matching weight.
8. The method for coordinated temperature control of stepper motor overheating in a portable thermal transfer printer according to claim 6, characterized in that, Based on the distance between the current operating condition feature vector and the center of the historical operating condition cluster corresponding to each selected motor temperature rise prediction model, the operating condition matching weight of each selected motor temperature rise prediction model is calculated, including: Calculate the Euclidean distance between the center of the historical operating condition cluster corresponding to each selected motor temperature rise prediction model and the feature vector of the current operating condition; Obtain the standard deviation of the prediction error on the validation set for each selected motor temperature rise prediction model when the pre-construction stage training is completed, and use the standard deviation of the prediction error as the local prediction confidence of each selected motor temperature rise prediction model. Multiply the Euclidean distance corresponding to each selected motor temperature rise prediction model with the corresponding local prediction confidence to obtain the comprehensive distance metric for each selected motor temperature rise prediction model. Calculate the reciprocal of the comprehensive distance metric for each selected motor temperature rise prediction model, normalize all reciprocals, and use the normalized reciprocals as the operating condition matching weights for each selected motor temperature rise prediction model.
9. The method for coordinated temperature control of stepper motor overheating in a portable thermal transfer printer according to claim 1, characterized in that, The printhead temperature is acquired from the temperature sensor built into the printhead. Based on the predicted motor temperature and the printhead temperature, a coordinated temperature control strategy is executed, including: The temperature of the printhead is collected in real time by a temperature sensor built into the printhead. The temperature sensor is a thermistor integrated on the ceramic substrate of the printhead. When the predicted motor temperature reaches the preset motor overheating threshold and the printhead temperature is lower than the preset printhead overheating threshold, it is determined that the stepper motor is in an overheating tendency state, and the motor overheating protection action is executed. The motor overheating protection action is to reduce the printing speed parameter and reduce the printing density parameter. When the printhead temperature is higher than the preset printhead overheating threshold, it is determined to be a printhead overheating state, and a printhead protection action is executed. The printhead protection action is to immediately stop the current printing task and wait for the printhead temperature to drop below the preset printhead overheating threshold before resuming printing.
10. The method for coordinated temperature control of stepper motor overheating in a portable thermal transfer printer according to claim 9, characterized in that, The methods for determining the preset motor overheat threshold and the preset printhead overheat threshold include: Obtain the upper limit of the rated operating temperature of the stepper motor, and multiply the upper limit of the rated operating temperature of the stepper motor by the first safety factor to obtain the preset motor overheating threshold. Obtain the upper limit of the rated operating temperature of the printhead, and multiply the upper limit of the rated operating temperature of the printhead by the second safety factor to obtain the preset printhead overheating threshold. There is no fixed relationship between the preset motor overheating threshold and the preset printhead overheating threshold. The preset motor overheating threshold is only used to compare with the predicted motor temperature, and the preset printhead overheating threshold is only used to compare with the printhead temperature.
