A laser scanning galvanometer model predictive control method and system
Through the laser scanning galvanometer model predictive control method, the calculation of state quantities and reference trajectories is used to set the gain coefficient matrix, combined with the model predictive control algorithm, to solve the following error problem of the laser scanning galvanometer during high-frequency swing and multi-axis coupling motion. , improves control accuracy and robustness, and meets high-frequency control requirements.
Patent Information
- Application Number
- CN202211335687.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-10-28
- Publication Date
- 2024-09-20
- Estimated Expiration
- 2042-10-28
AI Technical Summary
Existing motor control methods for laser scanning galvanometers are prone to following errors during high-frequency swings and multi-axis coupling movements, resulting in distortion of the scanned image. Moreover, traditional control methods are sensitive to parameter changes and are prone to overshooting and jitter.
Using the laser scanning galvanometer model predictive control method, through the calculation of state quantities and reference trajectories, the gain coefficient matrix is set, combined with the model predictive control algorithm, the control signal is calculated, the following error is reduced, and high frequency is achieved through a high-performance control algorithm processor control.
It effectively reduces the following error between the scanning galvanometer motor output and the trajectory command, improves control accuracy and robustness, reduces calculation time, meets high-frequency control requirements, and achieves low power consumption and high-precision control effects.
Smart Images

Figure CN115509135B
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of scanning galvanometer motor control, and in particular relates to a laser scanning galvanometer model prediction control method and system. Background Art
[0002] At present, the most common motor control method for laser scanning galvanometers is PID control. The PID control strategy has a simple structure and has good control effects on position, speed and current. It is widely used in various industrial control fields. However, due to the thermal and electromagnetic influences on the scanning galvanometer during operation, and the various parameters are prone to change during long-term operation, the sensitivity of PID control to parameter changes will make the motor control effect unsatisfactory, and it is easy to have overshoot and jitter. In addition, when tracking high-speed trajectories, the traditional galvanometer control method will have poor tracking coupling effects for multiple scanning axes, resulting in distortion of the scanned image.
[0003] Today's laser scanning galvanometers generally use control methods based on current commands or system features to achieve high-precision response to trajectories. These control systems have complex performance adjustments, and the high-frequency swing and multi-axis coupled motion of the scanning galvanometers are prone to scanning image distortion due to tracking errors. Summary of the invention
[0004] The technical problem to be solved by the present invention is to provide a laser scanning galvanometer model predictive control method and system in view of the deficiencies in the above-mentioned prior art, which can coordinate the control signal when the trajectory command is known to reduce the following error between the actual output of the scanning galvanometer motor and the trajectory command; however, model predictive control generally requires a large amount of numerical calculations, and the control frequency (100kHz) of the scanning galvanometer motor is relatively high, so it is necessary to use a high-performance control algorithm processor and supporting functional modules to meet the control performance requirements.
[0005] The present invention adopts the following technical solutions:
[0006] A laser scanning galvanometer model predictive control method comprises the following steps:
[0007] S1. Determine the state of the galvanometer drive system. If it is in a paused or initial state, the galvanometer drive system performs a reference trajectory sequence initialization operation, and sets the initial values of the reference trajectory sequence to zero; retains the original reference trajectory sequence during operation; the galvanometer drive system performs a state information sampling operation, and collects the angle, angular velocity, and current of the galvanometer motor at the current moment; S2. Place the reference trajectory r(k+p|k) at time k+p obtained by the galvanometer drive system at time k in step S1 at the end of the reference trajectory sequence obtained in step S1, and advance the original trajectory data by one position to obtain a new reference trajectory sequence;
[0008] S3, according to step S1, the system state x(k) of the galvanometer drive system at time k and the mathematical model of the galvanometer motor as the controlled object are obtained, and the estimated value x(k+1|k) of the system state of the galvanometer drive system at time k+1 is calculated;
[0009] S4, setting a gain coefficient matrix, calculating the influence of the reference trajectory part in the new reference trajectory sequence obtained in step S2 on the output by the galvanometer model predictive control method, and obtaining the controller output signal component about the reference trajectory at time k+1; according to the model predictive control algorithm, based on the estimated value of the system state quantity obtained in step S3, obtaining the control system output component about the state quantity of the galvanometer drive system at time k+1;
[0010] S5, combining the controller output signal component about the reference trajectory at time k+1 obtained in step S4 and the control system output component about the state quantity at time k+1 to obtain a total control signal;
[0011] S6. At time k+1, the total control signal obtained in step S5 is loaded to the input end of the galvanometer motor to complete the control.
[0012] Specifically, in step S1, the current working state of the galvanometer drive system determines whether to perform a zeroing operation on the reference trajectory, but the galvanometer drive system always keeps operating by sampling galvanometer state information such as galvanometer angle and current through devices such as the galvanometer angle sensor, current sensor, signal amplifier and analog-to-digital converter.
[0013] Specifically, in step S3, the galvanometer driving system loads the reference trajectory of the galvanometer at time k+p obtained from the host computer to the end of the reference trajectory sequence of the galvanometer driving system, and pops out and discards the first data of the reference trajectory.
[0014] Specifically, in step S3, the angular velocity value of the galvanometer motor swing of the galvanometer drive system is obtained by the angle value difference, and together with the angle and the current, constitutes the galvanometer system state vector. The system state quantity estimated value x(k+1|k) is:
[0015]
[0016] Among them, A d is the state transfer matrix of the state space model of the galvanometer system, x(k) is the state vector of the galvanometer system, B d is the input matrix of the state space model of the galvanometer system, and u(k) is the input of the galvanometer system at time k.
[0017] Specifically, in step S4, the cost function and the state prediction sequence based on the predicted following error and the control signal sequence are solved and simplified to obtain the gain coefficient matrix.
[0018] Furthermore, the value function J is:
[0019] J = (R(k) - CGX(k) - CHU(k)) T W(R(k)-CGX(k)-CHU(k))+U(K) T QU(K)
[0020] Among them, R(k) is the reference trajectory in the prediction time domain, C is the system output matrix, W is the following error weight matrix, Q is the control input signal weight matrix, x(k) is the current state vector of the galvanometer system, U(k) is the prediction time domain control signal sequence, G is the state quantity recursive matrix, and H is the control signal recursive matrix.
[0021] Specifically, in step S4, the controller output signal component u related to the reference trajectory at time k+1 is r (k) Specifically:
[0022] u r (k) = G r R(k)
[0023] Among them, G r is the gain coefficient matrix of the reference command trajectory, and R(k) is the reference command trajectory at time k.
[0024] Specifically, in step S4, the control system output component u related to the state quantity at time k+1 x (k) Specifically:
[0025] u x (k) = G x x(k)
[0026] Among them, G x is the gain coefficient matrix of the state quantity, and x(k) is the state vector of the galvanometer system.
[0027] Specifically, after step S6 is completed, the process returns to step S2 to implement loop control.
[0028] In a second aspect, an embodiment of the present invention provides a laser scanning galvanometer model predictive control system, comprising:
[0029] The initial module is determined by the state of the galvanometer drive system. If it is in the pause or initial state, the galvanometer drive system performs the reference trajectory sequence initialization operation, and sets the initial values of the reference trajectory sequence to zero; the original reference trajectory sequence is retained during operation; the galvanometer drive system performs state information sampling operation to collect the angle, angular velocity and current of the galvanometer motor at the current moment;
[0030] The trajectory module places the reference trajectory r(k+p|k) at time k+p obtained by the galvanometer drive system of the initial module at time k at the end of the reference trajectory sequence obtained by the initial module, and advances the original trajectory data by one position to obtain a new reference trajectory sequence;
[0031] The state module calculates the estimated value x(k+1|k) of the system state of the galvanometer drive system at time k+1 according to the system state x(k) obtained by the initial module and the mathematical model of the galvanometer motor as the controlled object;
[0032] The output module sets the gain coefficient matrix, calculates the influence of the reference trajectory part in the new reference trajectory sequence obtained by the trajectory module through the galvanometer model predictive control method on the output, and obtains the controller output signal component about the reference trajectory at time k+1; according to the model predictive control algorithm, based on the estimated value of the system state quantity obtained by the state module, the control system output component about the state quantity of the galvanometer drive system at time k+1 is obtained;
[0033] A judgment module combines the controller output signal component about the reference trajectory at time k+1 obtained by the output module and the control system output component about the state quantity at time k+1 to obtain a total control signal;
[0034] The control module, at time k+1, loads the total control signal obtained by the judgment module to the input end of the galvanometer motor to complete the control.
[0035] Compared with the prior art, the present invention has at least the following beneficial effects:
[0036] A laser scanning galvanometer model predictive control method reasonably arranges the state quantity and reference trajectory related calculations and reduces the calculation time by offline calculation of the gain coefficient matrix, so that the drive system can meet the galvanometer control frequency requirements.
[0037] Furthermore, initializing the drive system is helpful to ensure the accuracy of calculations and prevent the uncertain state from affecting subsequent control.
[0038] Furthermore, in order to realize model predictive control, in addition to the galvanometer swing angle and armature current directly obtained by the sensor, the angular velocity information must be obtained by differential processing of the angle signal.
[0039] Furthermore, based on the galvanometer state space model, the state trajectory in the prediction time domain is estimated through an iterative recursive method.
[0040] Furthermore, by jointly solving the value function and the state prediction sequence to obtain the model predictive control output, and calculating the gain constant in the expression offline, fast and efficient control output can be achieved.
[0041] Furthermore, the setting of the value function realizes the determination of the calculation basis of the model predictive control and ensures the logical completeness of the solution of the optimal control signal.
[0042] Furthermore, the multiplication of the reference trajectory and the corresponding gain coefficient can be performed directly after obtaining the instruction trajectory from the host computer or the internal memory. This calculation timing arrangement can achieve efficient calculation.
[0043] Furthermore, by setting the state quantity gain coefficient, the calculation from the state quantity to the output component of the control system is completed in one step, which simplifies the calculation steps.
[0044] Furthermore, for the nonlinearity of the galvanometer itself, the loop control can correct the tracking deviation caused by interference and model error to the greatest extent.
[0045] It can be understood that the beneficial effects of the second aspect mentioned above can be found in the relevant description of the first aspect mentioned above, and will not be repeated here.
[0046] In summary, the output and instruction of the model predictive control proposed in the present invention have a controllable delay relationship, which is conducive to linkage with the laser; the state prediction and rolling optimization control of the model predictive control based on the galvanometer model make the galvanometer have more outstanding robustness.
[0047] The technical solution of the present invention is further described in detail below through the accompanying drawings and embodiments. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] Figure 1 This is a flow chart of the laser scanning galvanometer model predictive control method of the present invention;
[0049] Figure 2 The schematic diagram of the laser scanning galvanometer model prediction control system and its FPGA implementation according to the present invention;
[0050] Figure 3 It is a simulation comparison diagram of the model predictive control, PID control scanning trajectory and reference command trajectory of the present invention. DETAILED DESCRIPTION
[0051] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are 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.
[0052] In the description of the present invention, it should be understood that the terms “include” and “comprises” indicate the presence of described features, wholes, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or collections thereof.
[0053] It should also be understood that the terms used in the present specification are only for the purpose of describing specific embodiments and are not intended to limit the present invention. As used in the present specification and the appended claims, unless the context clearly indicates otherwise, the singular forms "a", "an" and "the" are intended to include plural forms.
[0054] It should be further understood that the term "and / or" used in the present specification and the appended claims refers to any combination of one or more of the associated listed items and all possible combinations, and includes these combinations. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the associated objects are in an "or" relationship.
[0055] It should be understood that, although the terms first, second, third, etc. may be used to describe preset ranges, etc. in the embodiments of the present invention, these preset ranges should not be limited to these terms. These terms are only used to distinguish preset ranges from each other. For example, without departing from the scope of the embodiments of the present invention, the first preset range may also be referred to as the second preset range, and similarly, the second preset range may also be referred to as the first preset range.
[0056] The word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining" or "in response to detecting", depending on the context. Similarly, the phrases "if it is determined" or "if (stated condition or event) is detected" may be interpreted as "when it is determined" or "in response to determining" or "when detecting (stated condition or event)" or "in response to detecting (stated condition or event)", depending on the context.
[0057] Various structural schematic diagrams of the embodiments disclosed in the present invention are shown in the accompanying drawings. These figures are not drawn to scale, and some details are magnified and some details may be omitted for the purpose of clear expression. The shapes of various regions and layers shown in the figures and the relative sizes and positional relationships therebetween are only exemplary, and may deviate in practice due to manufacturing tolerances or technical limitations, and those skilled in the art may additionally design regions / layers with different shapes, sizes, and relative positions according to actual needs.
[0058] Model predictive control can theoretically achieve zero tracking error between the output and input reference trajectory of the controlled system. Based on the mathematical model of the controlled system and the reference trajectory in the predicted time domain, the predicted trajectory tracking error relative to different control input signals in multiple future control cycles can be obtained. In addition, in order to realize the operation of high-performance control algorithms, a highly integrated high-speed computing control system is essential.
[0059] The present invention provides a laser scanning galvanometer model prediction control method, which performs state prediction and optimal control based on the discrete mathematical model of the galvanometer motor, calculates the output signal; an evaluation function of the control input signal output signal vector based on the actual measured current, angle and actual output voltage signal, and the reference command trajectory within the prediction step length; a dedicated digital control circuit and various functional modules based on FPGA and Verilog HDL coding. The present invention effectively reduces the following error of the laser scanning galvanometer, ensures that the control frequency meets the requirements, and achieves low power consumption and high-precision control effects.
[0060] The present invention discloses a laser scanning galvanometer model predictive control method, which includes two parts: model predictive control and hardware circuits and devices for implementing control algorithms. The model predictive control is mainly used to ensure zero trajectory tracking error in the theory of laser scanning galvanometer control; the hardware circuits and devices are mainly used as a platform for implementing high-speed calculation of the model predictive control algorithm, ensuring the accuracy and speed of the system at the physical level.
[0061] See also Figure 1 The present invention provides a laser scanning galvanometer model predictive control method, which is used to ensure the zero trajectory tracking error of the laser scanning galvanometer control theory, follows the model predictive control output signal calculation logic, and samples the system state at the current moment. During the sampling process, the delay of the system hardware conditions itself needs to be calculated, so as to obtain a more practical system state at the current moment; the specific steps are as follows:
[0062] S1. If the galvanometer drive system is paused or in the initial state, the galvanometer drive system performs a reference trajectory sequence zeroing operation, that is, R(k-1) - the reference trajectory in the predicted time domain - is a zero matrix; if the galvanometer drive system is in operation, R(k-1) is kept unchanged; the galvanometer drive system simultaneously samples the galvanometer motor state quantity at the current moment - angle θ and current I;
[0063] S2. At time k, the galvanometer drive system obtains the reference trajectory r(k+p|k) at time k+p from the host computer, and makes the reference trajectory enter from the end of the original reference trajectory sequence R(k-1), while the elements of the original reference trajectory sequence are shifted forward in sequence. Thus, the reference trajectory sequence R(k) at time k is obtained.
[0064] S3. By analyzing the galvanometer structure, the dynamic and electromagnetic equilibrium equations are obtained:
[0065]
[0066]
[0067] Among them, K T is the electromagnetic torque coefficient of the galvanometer motor, I is the armature current of the galvanometer motor, J g is the total moment of inertia of the galvanometer, ω is the angular velocity of the galvanometer motor, d is the viscous damping coefficient of the galvanometer motor, u is the potential difference across the armature of the galvanometer motor, L is the armature inductance of the galvanometer motor, and R is the armature resistance of the galvanometer motor.
[0068] With angle θ, angular velocity ω and current i as state quantities, the dynamic and electromagnetic equilibrium equations of the galvanometer are rewritten in the form of state equations:
[0069]
[0070] Among them, x is the galvanometer state vector, A c is the state transfer matrix of the galvanometer continuous state space model, B c is the input matrix of the galvanometer continuous state space model, and u is the control input signal of the galvanometer. Since the actual control system is discrete operation, the continuous system is discretized to obtain the discrete system state equation
[0071] x(k+1)=A d x(k)+B d u(k)
[0072] Where x(k) is the state vector of the galvanometer at time k, A d is the state transfer matrix of the discrete state space model of the galvanometer, B d is the input matrix of the discrete state space model of the galvanometer, u(k) is the control input signal of the galvanometer at time k, and x(k+1) is the state of the galvanometer at time k+1 represented by the galvanometer state at time k, the control signal and the galvanometer model.
[0073] The prediction time domain of the model predictive control system is set to p, the control time domain is set to m, and m≤p. After the system state and input at time k are known, the system state from time k+1 to time k+m and time k+p is predicted, and the result is:
[0074] x(k+1|k)=A d x(k)+B d u(k)
[0075]
[0076]
[0077]
[0078] The above recursive relationship is further expressed by a matrix, and we get:
[0079] Z(k)=GX(k)+HU(K)
[0080] in,
[0081] S4. Establish value function:
[0082] J = (R(k) - CZ(k)) T W(R(k)-CZ(k))+U(K) T QU(K)
[0083] Among them, R(k) is the reference trajectory in the prediction time domain, C is the system output matrix, W is the following error weight matrix, and Q is the control input signal weight matrix. Model predictive control obtains the state prediction value of each control moment in the prediction time domain through the recursive relationship of the controlled system state in S3, and solves the control signal matrix that makes the value function achieve the minimum value.
[0084] Replace Z(k) in the value function with x(k) and U(K) to get the quadratic value function about U(K):
[0085] J=(Y r (k)-CGX(k)-CHU(k)) T W(Y r (k)-CGX(k)-CHU(k))+U(K) T QU(K)
[0086] Solve the first value of the control input signal vector corresponding to the minimum value of the value function, which is the control input of the next control cycle. Solve the quadratic value function to get:
[0087] In U(k)=(Y r (k)-CGx(k)) T WCH(Q+(CH) T WCH) -1 When , the value function achieves the minimum value, that is, the first valid element of U(k) is the control signal required at the next moment, which can meet the performance requirements of the galvanometer control.
[0088] The process of solving the value function involves multi-dimensional matrix inversion and four arithmetic operations, which requires a huge amount of calculation. Repeated calculations waste too much resources. At the same time, considering the execution efficiency and accuracy of the control algorithm, the calculation process is simplified offline. In the expression of U(k), G, W, C, H and Q are all known quantities. Let WCH(Q+(CH)TWCH)-1=Ω, (GC)TWCH(Q+(CH)TWCH)-1=Ψ, which is a triangular matrix, then U(k)=Y r (k) T Ω-x(k) T Ψ. The sum of all elements in Ω is equal to the value of the first element in Ψ.
[0089] S5. After completing the off-line calculation simplification of the calculation process of the galvanometer model predictive control in step S4, the calculation of the control signal is divided into two items with the reference trajectory as a variable and the state quantity as a variable. The addition of the two items after calculation is the desired galvanometer drive control signal.
[0090] S6. In order to better conform to the actual control logic, the control input signal calculated by the model predictive control at time k should be the control input signal at time k+1, that is, the state prediction recursive relationship is adjusted to solve u(k+1) as the output of the model predictive control. After the solution is completed, the control signal is loaded to the control signal input terminal of the galvanometer motor.
[0091] In another embodiment of the present invention, a laser scanning galvanometer model predictive control system is provided, which can be used to implement the above-mentioned laser scanning galvanometer model predictive control method. Specifically, the laser scanning galvanometer model predictive control system includes an initial module, a trajectory module, a state module, an output module, a judgment module and a control module.
[0092] Among them, the initial module is determined by the state of the galvanometer drive system. If it is in a paused or initial state, the galvanometer drive system performs a reference trajectory sequence initialization operation, and sets the initial values of the reference trajectory sequence to zero; the original reference trajectory sequence is retained during operation; the galvanometer drive system performs a state information sampling operation to collect the angle, angular velocity and current of the galvanometer motor at the current moment;
[0093] The trajectory module places the reference trajectory r(k+p|k) at time k+p obtained by the galvanometer drive system of the initial module at time k at the end of the reference trajectory sequence obtained by the initial module, and advances the original trajectory data by one position to obtain a new reference trajectory sequence;
[0094] The state module calculates the estimated value x(k+1|k) of the system state of the galvanometer drive system at time k+1 according to the system state x(k) obtained by the initial module and the mathematical model of the galvanometer motor as the controlled object;
[0095] The output module sets the gain coefficient matrix, calculates the influence of the reference trajectory part in the new reference trajectory sequence obtained by the trajectory module through the galvanometer model predictive control method on the output, and obtains the controller output signal component about the reference trajectory at time k+1; according to the model predictive control algorithm, based on the estimated value of the system state quantity obtained by the state module, the control system output component about the state quantity of the galvanometer drive system at time k+1 is obtained;
[0096] A judgment module combines the controller output signal component about the reference trajectory at time k+1 obtained by the output module and the control system output component about the state quantity at time k+1 to obtain a total control signal;
[0097] The control module, at time k+1, loads the total control signal obtained by the judgment module to the input end of the galvanometer motor to complete the control.
[0098] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, 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 described embodiments are part of the embodiments of the present invention, rather than all of the embodiments. The components of the embodiments of the present invention described and shown in the drawings here can usually be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present invention provided in the drawings is not intended to limit the scope of the claimed invention, but merely represents selected embodiments of the present invention. Based on the embodiments in the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.
[0099] The laser scanning galvanometer model predictive control method of the present invention requires a specific implementation platform, which can be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc., which are the computing core and control core of the terminal, which are suitable for implementing one or more instructions, specifically suitable for loading and executing one or more instructions to realize the corresponding method flow or corresponding function.
[0100] Due to the requirements of the model predictive control algorithm and the galvanometer control frequency, FPGA is selected as the main control chip type, and its circuit programmability is used to realize the high-speed control algorithm and the parallel operation of various functional modules. Some FPGA chips contain enough DSP slices and logic resources to meet the operation rate of the control algorithm. Even in the face of ever-increasing performance requirements, the logic resources inside the FPGA are sufficient to support it.
[0101] In addition to running the model predictive control algorithm, the FPGA also includes the operation of the communication circuit module between the host computer, controller, data acquisition module and control signal output module. Each communication module is controlled by a separate cycle enable control module. By utilizing the hardware parallel capability of the FPGA, it can achieve completely independent operation and the work processes will not conflict with each other.
[0102] The FPGA also includes module circuits necessary for the controller, such as signal filtering, timing control, data differentiation and working mode judgment.
[0103] The scanning galvanometer controller equipped with a model predictive control system uses a galvanometer deflection angle sensor, which can be a grating, photoelectric or capacitive sensor, and uses the corresponding signal processing circuit to obtain a digital galvanometer deflection angle value that can be recognized by the control algorithm core.
[0104] The angular velocity value of the galvanometer at the current moment is obtained through the digital differential circuit module.
[0105] The digital value of the current at the current moment is obtained through the current sampling circuit and the data processing circuit.
[0106] Obtain the reference trajectory information in the storage unit of the host computer or onboard, participate in the data processing of the model prediction algorithm module circuit, and obtain the control signal output at the next moment.
[0107] The galvanometer motor is effectively driven by a digital-to-analog conversion circuit module, an operational amplifier circuit module, and a power amplifier circuit module.
[0108] Based on various input and output interfaces, the host computer can input control instructions to the galvanometer controller and read feedback signals.
[0109] The command input to the galvanometer controller is realized through the onboard interactive circuit module.
[0110] The system model is used to deduce the system state at the next control moment, so as to estimate the output in the subsequent prediction time domain, and the cost function is solved to obtain the most ideal system input signal that meets the conditions.
[0111] The present invention proposes a model predictive control calculation example. In actual calculation, the control signal output formula is directly applied, and the calculation complexity is reduced through offline calculation. The simplified calculation formula is directly used to implement the model predictive control.
[0112] See also Figure 2 An example of the scanning galvanometer model predictive control hardware platform proposed in the present invention is a scanning galvanometer servo controller, which is composed of an FPGA and a peripheral signal processing circuit.
[0113] Among them, the host computer communication module, ADC control module, DAC control module, control algorithm operation core module, storage module and top-level timing control module are implemented in FPGA.
[0114] The functions of each module are as follows:
[0115] Host computer communication module: obtains reference trajectory signals, top-level control signals and parameter signals from the host computer, and transmits them to the corresponding processing submodules;
[0116] ADC control module: communicates with the ADC chip in the peripheral circuit to obtain real-time sampling data as the state quantity of the galvanometer control system;
[0117] DAC control module: communicates with the DAC chip in the peripheral circuit to achieve accurate output of the control signal at the control moment;
[0118] Control algorithm calculation core module: as the calculation core of the model predictive control algorithm, it realizes the calculation of the optimal control signal through known conditions;
[0119] Storage module: stores control parameters and reference trajectory sequences;
[0120] Top-level timing control module: assigns the working timing of each sub-module.
[0121] The peripheral signal processing circuit includes a galvanometer angle sensor power supply circuit, an angle sensor output signal amplification circuit, a Hall current detection circuit, an analog-to-digital conversion circuit, a digital-to-analog conversion circuit and a power amplifier circuit.
[0122] The functions of each circuit are as follows:
[0123] Galvanometer angle sensor power supply circuit: provides necessary working power for the angle sensor;
[0124] Angle sensor output signal amplifier circuit: amplifies tiny angle signals to facilitate ADC conversion;
[0125] Hall current detection circuit: converts current information into voltage signal and transmits it to the corresponding ADC module;
[0126] Analog-to-digital conversion circuit: converts analog data into digital data and transmits it to FPGA;
[0127] Digital-to-analog conversion circuit: converts the digital control signal in FPGA into voltage form;
[0128] Power amplifier circuit: enhances the driving capability of the control signal.
[0129] See also Figure 3 The present invention provides a simulation comparison diagram of the tracking performance of the designed scanning galvanometer model predictive control and PID control for various trajectories. Figure 3 It can be clearly seen that under the action of model predictive control, the galvanometer has a better effect of following the reference trajectory.
[0130] In summary, the laser scanning galvanometer model predictive control method and system of the present invention have more outstanding trajectory following performance compared to traditional PID control, and there is no deviation in following time between the theoretical instruction trajectory; especially for continuous trajectory instructions, the model predictive control method of the present invention realizes error-free trajectory following.
[0131] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.
[0132] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0133] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0134] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0135] The above contents are only for explaining the technical idea of the present invention and cannot be used to limit the protection scope of the present invention. Any changes made on the basis of the technical solution in accordance with the technical idea proposed by the present invention shall fall within the protection scope of the claims of the present invention.
Claims
1. A laser scanning galvanometer model predictive control method, characterized in that: The following steps are involved: S1, depending on the state of the galvanometer drive system, if it is in a pause or initial state, the galvanometer drive system performs a reference trajectory sequence initialization operation and sets the initial values of the reference trajectory sequence to zero; Keep the original reference trajectory sequence during operation; The galvanometer drive system performs state information sampling operations to collect the angle, angular velocity and current of the galvanometer motor at the current moment; S2, placing the reference trajectory r(k+p|k) at time k+p obtained by the galvanometer drive system at time k in step S1 at the end of the reference trajectory sequence obtained in step S1, and advancing the original trajectory data by one position to obtain a new reference trajectory sequence; S3, according to step S1, the system state x(k) of the galvanometer drive system at time k and the mathematical model of the galvanometer motor as the controlled object are obtained, and the estimated value x(k+1|k) of the system state of the galvanometer drive system at time k+1 is calculated; S4, setting a gain coefficient matrix, calculating the influence of the reference trajectory part in the new reference trajectory sequence obtained in step S2 on the output by the galvanometer model predictive control method, and obtaining the controller output signal component about the reference trajectory at time k+1; according to the model predictive control algorithm, based on the estimated value of the system state quantity obtained in step S3, obtaining the control system output component about the state quantity of the galvanometer drive system at time k+1; S5, combining the controller output signal component about the reference trajectory at time k+1 obtained in step S4 and the control system output component about the state quantity at time k+1 to obtain a total control signal; S6. At time k+1, the total control signal obtained in step S5 is loaded to the input end of the galvanometer motor to complete the control.
2. The laser scanning galvanometer model predictive control method according to claim 1, characterized in that: In step S1, whether to perform a zeroing operation on the reference trajectory is determined according to the current working state of the galvanometer drive system. However, the galvanometer drive system always operates by sampling galvanometer state information such as galvanometer angle and current through devices such as the galvanometer angle sensor, current sensor, signal amplifier and analog-to-digital converter.
3. The laser scanning galvanometer model predictive control method according to claim 1, characterized in that: In step S3, the galvanometer driving system loads the reference trajectory of the galvanometer at time k+p obtained from the host computer to the end of the reference trajectory sequence of the galvanometer driving system, and pops out and discards the first data of the reference trajectory.
4. The laser scanning galvanometer model predictive control method according to claim 1, characterized in that: In step S3, the angular velocity value of the galvanometer motor swing of the galvanometer drive system is obtained by the angle value difference, and together with the angle and the current, it constitutes the galvanometer system state vector. The system state quantity estimated value x(k+1|k) is: Among them, A d is the state transfer matrix of the state space model of the galvanometer system, x(k) is the state vector of the galvanometer system, B d is the input matrix of the state space model of the galvanometer system, and u(k) is the input of the galvanometer system at time k.
5. The laser scanning galvanometer model predictive control method according to claim 1, characterized in that: In step S4, the cost function and the state prediction sequence based on the predicted following error and the control signal sequence are solved and simplified to obtain the gain coefficient matrix.
6. The laser scanning galvanometer model predictive control method according to claim 5, characterized in that: The value function J is: J=(R(k)-CGX(k)-CHU(k)) T W(R(k)-CGX(k)-CHU(k))+U(K) T Q(K) Among them, R(k) is the reference trajectory in the prediction time domain, C is the system output matrix, W is the following error weight matrix, Q is the control input signal weight matrix, x(k) is the current state vector of the galvanometer system, U(k) is the prediction time domain control signal sequence, G is the state quantity recursive matrix, and H is the control signal recursive matrix.
7. The laser scanning galvanometer model predictive control method according to claim 1, characterized in that: In step S4, the controller output signal component u related to the reference trajectory at time k+1 is r (k) Specifically: u r (k)=G r R(k) Among them, G r is the gain coefficient matrix of the reference command trajectory, and R(k) is the reference command trajectory at time k.
8. The laser scanning galvanometer model predictive control method according to claim 1, characterized in that: In step S4, the control system output component u related to the state quantity at time k+1 x (k) Specifically: u x (k)=G x x(k) Among them, G x is the gain coefficient matrix of the state quantity, and x(k) is the state vector of the galvanometer system.
9. The laser scanning galvanometer model predictive control method according to claim 1, characterized in that: After step S6 is completed, return to step S2 to implement loop control.
10. A laser scanning galvanometer model predictive control system, characterized in that: include: The initial module is determined by the state of the galvanometer drive system. If it is in a paused or initial state, the galvanometer drive system performs a reference trajectory sequence initialization operation and sets the initial values of the reference trajectory sequence to zero. Keep the original reference trajectory sequence during operation; The galvanometer drive system performs state information sampling operations to collect the angle, angular velocity and current of the galvanometer motor at the current moment; The trajectory module places the reference trajectory r(k+p|k) at time k+p obtained by the galvanometer drive system of the initial module at time k at the end of the reference trajectory sequence obtained by the initial module, and advances the original trajectory data by one position to obtain a new reference trajectory sequence; The state module calculates the estimated value x(k+1|k) of the system state of the galvanometer drive system at time k+1 according to the system state x(k) obtained by the initial module and the mathematical model of the galvanometer motor as the controlled object; The output module sets the gain coefficient matrix, calculates the influence of the reference trajectory part in the new reference trajectory sequence obtained by the trajectory module using the galvanometer model predictive control method on the output, and obtains the controller output signal component about the reference trajectory at time k+1; according to the model predictive control algorithm, based on the estimated value of the system state quantity obtained by the state module, the control system output component about the state quantity of the galvanometer drive system at time k+1 is obtained; A judgment module combines the controller output signal component about the reference trajectory at time k+1 obtained by the output module and the control system output component about the state quantity at time k+1 to obtain a total control signal; The control module, at time k+1, loads the total control signal obtained by the judgment module to the input end of the galvanometer motor to complete the control.
