Method and apparatus for polarity matching of galvanometer electromagnetic torque direction and angle detection device

By acquiring and judging angle signals in the galvanometer driver, generating control signals and setting polarity adjustment factors, the problem of traditional galvanometer drivers being unable to automatically match polarity is solved, realizing automatic polarity matching and negative feedback control, thereby improving production efficiency and lens protection.

CN114665785BActive Publication Date: 2026-06-30BEIJING HANHUA GLOBAL TECH DEV CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
BEIJING HANHUA GLOBAL TECH DEV CO LTD
Filing Date
2022-03-09
Publication Date
2026-06-30

AI Technical Summary

Technical Problem

Traditional galvanometer drivers cannot automatically match the polarity of the change in the electromagnetic torque direction of the galvanometer with the angle signal output by the angle detection device, which prevents the closed-loop control module from entering the negative feedback state and may damage the motor or the reflector.

Method used

Before the galvanometer deflection angle closed-loop control module is working normally, the angle signal is collected, a control signal is generated to drive the galvanometer rotor to deflect, and the polarity adjustment factor is set to ensure polarity matching by judging the integral value of the reference signal and the change of the angle signal, and polarity reversal is performed in the closed-loop control module.

Benefits of technology

It achieves fully automatic polarity matching of the galvanometer system without manual intervention, improves production efficiency and the adaptive control capability of the driver, protects the lens, and avoids damage caused by polarity mismatch.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114665785B_ABST
    Figure CN114665785B_ABST
Patent Text Reader

Abstract

This application discloses a method and apparatus for matching the polarity of a galvanometer electromagnetic torque direction and angle detection device. The method includes: before the galvanometer's deflection angle closed-loop control module operates normally, acquiring a first galvanometer angle signal output by the galvanometer angle detection device; generating a control signal through a reference signal, controlling the power amplifier module to input an excitation signal to the galvanometer stator winding, and then acquiring a second galvanometer angle signal; determining whether the polarity of the change in the galvanometer's electromagnetic torque direction matches the polarity of the angle signal output by the galvanometer angle detection device; if the polarity does not match, setting a first polarity adjustment factor; after the deflection angle closed-loop control module operates normally, using the first polarity adjustment factor to reverse the polarity of the output signal, ensuring that the galvanometer's deflection angle closed-loop control module performs negative feedback control on the galvanometer system. This method requires no manual intervention and can automatically match when a polarity mismatch is detected, effectively improving the production efficiency of the galvanometer system and the adaptive control capability of the driver.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of galvanometer deflection control technology, and in particular to a method and apparatus for polarity matching of galvanometer electromagnetic torque direction and angle detection device. Background Technology

[0002] A galvanometer is a light reflection system consisting of a special DC permanent magnet motor and a reflective mirror. Its characteristics include a limited rotation angle of the motor rotor (usually -20° to +20°), and the reflective mirror is connected to the rotor. It is often used as an actuator in the field of optics to change the angle of the light path.

[0003] Figure 1 This is a schematic diagram of a galvanometer system that uses a photoelectric angle sensor as the output device for the galvanometer deflection angle. Figure 1 The galvanometer shown is connected to its driver via the following functional pins: #1 Photoelectric angle sensor A group output, #2 Photoelectric angle sensor B group output, #3 Laser diode positive terminal, #4 Reference ground, #5 Stator winding negative terminal, #6 Stator winding positive terminal. Correct connection of pins #1 to #4 ensures the normal operation of the photoelectric angle sensor used in the galvanometer. The galvanometer can also use an encoder as its deflection angle output device; however, regardless of the device used to output the deflection angle signal, the wound stator coil must be fixed in the galvanometer's iron casing during manufacturing. Due to manufacturing limitations, the winding direction of the stator coil cannot be individually distinguished during installation. Figure 1 For example, during installation, the two ends of the stator winding can only be randomly fixed to pins #5 and #6 of the galvanometer interface. Therefore, when a positive current is input to pin #6, the direction of the torque generated by the galvanometer rotor may not be consistent with the rotor rotation direction output by the galvanometer angle output device. This leads to a polarity mismatch between the direction of the galvanometer's electromagnetic torque and the change in the angle signal output by the galvanometer angle detection device. When this polarity mismatch occurs, the deflection angle closed-loop control module in the galvanometer driver will be unable to enter the negative feedback working state; that is, the galvanometer's closed-loop control will enter the positive feedback working state. This will result in the motor burning out or the reflector being shattered.

[0004] Traditional galvanometer drivers cannot perform adaptive control for galvanometers with the above-mentioned problems. Therefore, when debugging or repairing the galvanometer system, technicians need to find the correct matching polarity by changing the soldering order of pins #5 and #6 on the galvanometer interface, so that the galvanometer driver can perform normal negative feedback control on the galvanometer. Summary of the Invention

[0005] This application provides a method and apparatus for matching the direction of electromagnetic torque of a galvanometer with the polarity of an angle detection device, in order to solve the problem that traditional galvanometer drivers cannot automatically match the polarity of the change in the electromagnetic torque direction of the galvanometer with the polarity of the angle signal output by the galvanometer angle detection device.

[0006] The technical solution adopted in this application is as follows:

[0007] A method for matching the direction of electromagnetic torque of a galvanometer with the polarity of an angle detection device, the method comprising the following steps:

[0008] Before the deflection angle closed-loop control module of the galvanometer is working normally, the first galvanometer angle signal output by the galvanometer angle detection device is collected.

[0009] A control signal is generated based on a reference signal, and an excitation signal is generated through the control signal. The excitation signal is then input into the galvanometer stator winding to drive the galvanometer rotor to deflect.

[0010] After the excitation signal is input to the galvanometer stator winding, the second galvanometer angle signal output by the galvanometer angle detection device is acquired;

[0011] Based on the integral value of the reference signal, the first galvanometer angle signal, and the second galvanometer angle signal, determine whether the direction of the galvanometer electromagnetic torque matches the polarity of the change in the angle signal output by the galvanometer angle detection device.

[0012] If the direction of the electromagnetic torque of the galvanometer does not match the polarity of the change in the angle signal of the angle detection device, then a first polarity adjustment factor is set.

[0013] After the deflection angle closed-loop control module is working normally, the first polarity adjustment factor is used to reverse the polarity of the output signal of the galvanometer angle detection device input to the deflection angle closed-loop control module or the output signal of the deflection angle closed-loop control module, so as to ensure that the galvanometer system with mismatched polarity is subjected to negative feedback control.

[0014] Further, determining whether the direction of the electromagnetic torque of the galvanometer matches the polarity of the change in the angle signal output by the angle detection device includes:

[0015] When the integral value of the reference signal is greater than 0, it is determined whether the first galvanometer angle signal is less than the second galvanometer angle signal: if the first galvanometer angle signal is less than the second galvanometer angle signal, it is determined that the direction of the galvanometer electromagnetic torque matches the polarity of the change in the angle signal output by the angle detection device; otherwise, the direction of the galvanometer electromagnetic torque does not match the polarity of the change in the angle signal output by the angle detection device.

[0016] Alternatively, when the integral value of the reference signal is less than 0, it is determined whether the first galvanometer angle signal is greater than the second galvanometer angle signal: if the first galvanometer angle signal is greater than the second galvanometer angle signal, it is determined that the direction of the galvanometer electromagnetic torque matches the polarity of the change in the angle signal output by the angle detection device; otherwise, the direction of the galvanometer electromagnetic torque does not match the polarity of the change in the angle signal output by the angle detection device.

[0017] Furthermore, an open-loop control method is used to generate a control signal, which is then used to generate an excitation signal. This excitation signal is then input into the galvanometer stator winding to drive the galvanometer rotor to deflect, comprising the following steps:

[0018] S201 presets the total number N of half-waves of the excitation signal, the amplitude adjustment coefficient increment Δk, and the angular frequency w of the sine wave;

[0019] S202 initializes the half-wave count timer n=0, timer t0=0, and amplitude adjustment coefficient k=0;

[0020] S203 calculates the reference signal u. ref The reference signal u ref The calculation formula is:

[0021] u ref = k sin(wt)

[0022] Where t = t0 + Δt, Δt is the timer step value;

[0023] S204 sets the reference signal u ref With control signal u con The same, thus obtaining the control signal u con The control signal u con The input power amplifier module is then used to inject the excitation signal output by the power amplifier module into the galvanometer stator winding.

[0024] S205 determines whether wt is greater than π;

[0025] If wt is less than π, then proceed to S203;

[0026] S207 If wt is greater than π, then determine whether n is greater than or equal to N, and proceed to S208 or S209;

[0027] S208 If n is less than N, then calculate And repeat S203-S208;

[0028] S209 If n is greater than or equal to N, then stop inputting excitation signals to the galvanometer stator winding.

[0029] Furthermore, a closed-loop control method is used to generate a control signal, which is then used to generate an excitation signal. This excitation signal is then input to the galvanometer stator winding to drive the galvanometer rotor to deflect. This process includes the following steps:

[0030] S301 Preset Position Compensation Value V offset The function outputs the saturation value u. throld and total duration t max ,

[0031] S302 initializes the timer t = 0;

[0032] S303 calculates the reference signal u. ref The calculation formula is:

[0033]

[0034] Where h is the slope of the ramp signal, t is time, and u throld The function outputs the saturation value, h and u throld The relationship is that they have the same sign;

[0035] S304 acquires the galvanometer angle position signal V during galvanometer deflection. pos And perform absolute value operation to obtain |V pos +V offset |;

[0036] S305 according to |V pos +V offset |and the reference signal u ref The error signal u is calculated. err :

[0037] u err =u ref -|V pos +V offset |;

[0038] S306 based on the error signal u err The control signal u is calculated. con The calculation formula is:

[0039]

[0040] Where, k p k i and k d These are the proportional, integral, and derivative coefficients of the PID controller, respectively, and s is the differential operator;

[0041] S307 will send the control signal u conThe input power amplifier module is then used to inject the excitation signal output by the power amplifier module into the galvanometer stator winding.

[0042] S308 determines whether t is greater than t max And perform S309 or S3010;

[0043] S309 If t is less than t max Then the timer counts for t = t + Δt, and repeats steps S303-S308, where Δt is the timer step value;

[0044] S3010 If t is greater than or equal to t max If the excitation signal is not input to the galvanometer stator winding, then the input signal to the galvanometer stator winding will be stopped.

[0045] Furthermore, this application also provides a polarity matching device for the galvanometer electromagnetic torque direction and angle detection device, including:

[0046] The acquisition module is used to acquire the galvanometer angle signal output by the galvanometer angle detection device before the galvanometer deflection angle closed-loop control module is working normally.

[0047] The polarity matching test signal generation module is used to generate a control signal based on a reference signal before the deflection angle closed-loop control module of the galvanometer is working normally. The control signal is used to control the power amplifier module to generate an excitation signal to drive the galvanometer rotor to deflect.

[0048] The judgment module is used to determine whether the direction of the electromagnetic torque of the galvanometer matches the polarity of the change in the angle signal output by the angle detection device, based on the integral value of the reference signal and the galvanometer angle signals acquired before and after the injection of the excitation signal, before the galvanometer deflection angle closed-loop control module is working normally; wherein, the galvanometer angle signal includes a first galvanometer angle signal acquired before the injection of the excitation signal and a second galvanometer angle signal acquired after the injection of the excitation signal.

[0049] The polarity adjustment factor generation module is used to set a first polarity adjustment factor when the direction of the electromagnetic torque of the galvanometer does not match the polarity of the change in the angle signal output by the angle detection device before the deflection angle closed-loop control module of the galvanometer is working normally.

[0050] The polarity adjustment module is used to reverse the polarity of the output signal of the galvanometer angle detection device input to the deflection angle closed-loop control module or the output signal of the deflection angle closed-loop control module after the galvanometer deflection angle closed-loop control module is working normally, using the first polarity adjustment factor, so as to ensure negative feedback control of the galvanometer system with mismatched polarities.

[0051] Furthermore, the judgment module is used to determine that when the integral value of the reference signal is greater than 0 and the first galvanometer angle signal is less than the second galvanometer angle signal, the direction of the electromagnetic torque of the galvanometer matches the polarity of the change in the angle signal output by the angle detection device; otherwise, the direction of the electromagnetic torque of the galvanometer does not match the polarity of the change in the angle signal output by the angle detection device.

[0052] Alternatively, when the integral value of the reference signal is less than 0 and the first galvanometer angle signal is greater than the second galvanometer angle signal, it is determined that the polarity of the change in the electromagnetic torque direction of the galvanometer matches the polarity of the change in the angle signal output by the angle detection device; otherwise, the electromagnetic torque direction of the galvanometer does not match the polarity of the change in the angle signal output by the angle detection device.

[0053] The beneficial effects of adopting the technical solution of this application are as follows:

[0054] Before the closed-loop control module of the galvanometer driver's deflection angle operates normally, this application generates a control signal based on a reference signal using an open-loop or closed-loop control method. This control signal then controls the power amplifier module to generate an excitation signal, which is subsequently input to the galvanometer stator winding. Based on the integral value of the reference signal and the first and second galvanometer angle signals acquired during the galvanometer deflection process, it determines whether the direction of the galvanometer electromagnetic torque matches the polarity of the change in the angle signal output by the galvanometer angle detection device. Furthermore, if the direction of the galvanometer electromagnetic torque does not match the polarity of the change in the angle signal output by the angle detection device, a polarity adjustment factor of -1 is generated and used to adjust the galvanometer... After the deflection angle closed-loop control module of the driver is working normally, it will reverse the polarity of the output signal of the galvanometer angle detection device input into the deflection angle closed-loop control module, or reverse the polarity of the output signal of the deflection angle closed-loop control module. This allows the deflection angle closed-loop control module on the galvanometer driver to perform normal negative feedback control even for galvanometers whose electromagnetic torque direction does not match the polarity of the angle signal change output by the angle detection device. This achieves polarity matching between the electromagnetic torque direction of the galvanometer and the angle signal change output by the angle detection device. The entire polarity matching process does not require manual intervention and can achieve fully automatic detection, effectively improving the production efficiency of the galvanometer system and the adaptive control capability of the driver.

[0055] Furthermore, this application, when using an open-loop control method to generate control signals to control the galvanometer system, limits the waveform of the excitation signal input to the galvanometer stator winding. Driven by the limited waveform excitation signal, the galvanometer continuously accelerates and then decelerates during deflection, with the acceleration and deceleration times being the same. This ensures that during polarity matching, once the rotor contacts the mechanical limit of the galvanometer, the rotor speed is controllable, effectively reducing the speed at which the rotor contacts the mechanical limit during polarity matching and solving the problem of damage to the lens due to large sudden changes in rotor speed.

[0056] Furthermore, in the case of using a closed-loop control method to control the galvanometer system, this application limits the waveform of the excitation signal input to the galvanometer stator winding, and uses the limited waveform of the excitation signal to perform closed-loop control with a low bandwidth on the absolute value of the galvanometer deflection angle, so that the deflection angle trajectory of the galvanometer during the polarity matching process is smoother, and the protection of the galvanometer and lens is more complete. Attached Figure Description

[0057] To more clearly illustrate the technical solution of this application, the drawings used in the embodiments will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0058] Figure 1 This is a schematic diagram of a traditional galvanometer system that uses a photoelectric angle sensor as the output device for the galvanometer deflection angle.

[0059] Figure 2 A flowchart illustrating an automatic matching method for the polarity of the angle signal change output by a galvanometer electromagnetic torque direction and angle detection device, provided in an embodiment of this application;

[0060] Figure 3(a) is a schematic diagram of the polarity adjustment module added to the output of the deflection angle closed-loop control module after the traditional photoelectric galvanometer system is working normally.

[0061] Figure 3(b) is a schematic diagram of the polarity adjustment module added to the output end of the galvanometer angle detection device after the traditional photoelectric galvanometer system is working normally;

[0062] Figure 4 A schematic diagram of a polarity matching control module based on open-loop control provided in an embodiment of this application;

[0063] Figure 5 This is a flowchart illustrating the generation of a reference signal using an open-loop method, as provided in an embodiment of this application.

[0064] Figure 6 This is a waveform diagram of the reference signal generated in an open-loop manner according to an embodiment of this application;

[0065] Figure 7(a) shows the use of Figure 6 The diagram shows the trajectory of the galvanometer deflection angle generated when the reference signal excites the polarity-matched galvanometer system.

[0066] Figure 7(b) shows the use of Figure 6 The diagram shows the trajectory of the galvanometer deflection angle generated when the reference signal excites a galvanometer system with mismatched polarity.

[0067] Figure 8 A schematic diagram of a polarity matching control module based on closed-loop control provided in an embodiment of this application;

[0068] Figure 9 This is a flowchart illustrating the reference signal generated in a closed-loop manner according to an embodiment of this application.

[0069] Figure 10 This is a reference signal waveform diagram provided in the embodiments of this application when closed-loop control is used;

[0070] Figure 11(a) shows the use of Figure 10 The diagram shows the trajectory of the galvanometer deflection angle generated when the reference signal excites the polarity-matched galvanometer system.

[0071] Figure 11(b) shows the use of Figure 10 The diagram shows the trajectory of the galvanometer deflection angle generated when the reference signal excites a galvanometer system with mismatched polarity. Detailed Implementation

[0072] To enable those skilled in the art to better understand the technical solutions in the embodiments of this application, and to make the above-mentioned objectives, features and advantages of the embodiments of this application more apparent and understandable, the technical solutions in the embodiments of this application will be further described in detail below with reference to the accompanying drawings.

[0073] See Figure 1 A schematic diagram of a galvanometer system that uses a photoelectric angle sensor as the output device for the galvanometer deflection angle; Figure 2 Figure 3(a) is a schematic diagram of an automatic polarity matching method for the change in the electromagnetic torque direction of a galvanometer and the angle signal output by an angle detection device, provided in an embodiment of this application; Figure 3(b) is a schematic diagram of a polarity adjustment module added to the output of the deflection angle closed-loop control module after the traditional photoelectric galvanometer system is working normally; Figure 4 A schematic diagram of a polarity matching control module based on open-loop control provided in an embodiment of this application; Figure 5 This is a flowchart illustrating the generation of a reference signal using an open-loop method, as provided in an embodiment of this application. Figure 6Figure 7(a) shows the waveform of the reference signal generated in an open-loop manner according to an embodiment of this application; Figure 7(a) shows the waveform of the reference signal generated in an open-loop manner according to an embodiment of this application. Figure 6 The reference signal shown is used to excite the polarity-matched galvanometer system, generating the galvanometer deflection angle trajectory; Figure 7(b) shows the trajectory generated when the reference signal excites the galvanometer system. Figure 6 The diagram shows the trajectory of the galvanometer deflection angle generated when the reference signal excites a galvanometer system with mismatched polarity. Figure 8 A schematic diagram of a polarity matching control module based on closed-loop control provided in an embodiment of this application; Figure 9 This is a flowchart illustrating the reference signal generated in a closed-loop manner according to an embodiment of this application. Figure 10 Figure 11(a) shows the reference signal waveform diagram when using closed-loop control as provided in the embodiments of this application; Figure 10 The diagram shows the trajectory of the galvanometer deflection angle generated when the reference signal excites the polarity-matched galvanometer system; Figure 11(b) shows the trajectory generated by the reference signal excitation. Figure 10 The diagram shows the trajectory of the galvanometer deflection angle generated when the reference signal excites a galvanometer system with mismatched polarity.

[0074] Figure 1 The diagram illustrates the closed-loop control system structure for a galvanometer system that uses a photoelectric angle sensor as the output device for the galvanometer deflection angle. The "AGC Automatic Gain Control Module" maintains the normal operation of the photoelectric angle sensor system within the photoelectric galvanometer. The "Differential Amplification Module" subtracts the electrical signals output from the two sets of photoelectric sensors installed in the galvanometer to obtain a "galvanometer angle signal" linearly related to the galvanometer deflection angle. This signal serves as a feedback input signal for the "deflection angle closed-loop control module." The "Power Amplification Module" amplifies the "control signal" output from the "deflection angle closed-loop control module," driving the current through the stator windings of the galvanometer to generate torque in the rotor, thus driving the galvanometer rotor to deflect. The current flowing through the stator windings is converted into a "coil current signal" by the "Current Transmitter Module," which serves as another feedback input signal for the "deflection angle closed-loop control module." The "deflection angle closed-loop control module" calculates the output signal through the controller based on the "galvanometer angle command input" signal, the "galvanometer angle signal" and the "coil current signal", and controls the power amplifier module to perform closed-loop control of the galvanometer deflection angle, so that the deflection angle of the galvanometer tracks the "galvanometer angle command input" signal in real time.

[0075] Currently, there are two main types of galvanometer products: grating encoder type galvanometer systems and... Figure 1The photoelectric galvanometer system shown differs primarily in that the photoelectric galvanometer uses an angle sensor based on a photoelectric sensor and a laser diode to detect and output the galvanometer's deflection angle, while the grating encoder galvanometer uses a photoelectric or magnetic encoder to detect and output the galvanometer's deflection angle. Aside from this, the two types of galvanometers are structurally identical. This application's method only utilizes the galvanometer's angle deflection signal as a feedback signal for improvement; therefore, this application's method does not limit the applicable galvanometer type and defines the angle sensor or encoder used for feedback of the galvanometer's deflection angle in galvanometer products as a galvanometer angle detection device. However, for the sake of clarity, this application will use a photoelectric galvanometer as an example.

[0076] Example 1

[0077] Since traditional galvanometer closed-loop control systems cannot adaptively control the polarity mismatch between the electromagnetic torque of the galvanometer and the change in the angle signal output by the angle detection device, this application proposes an automatic matching method for the direction of the electromagnetic torque of the galvanometer and the polarity of the change in the angle signal output by the angle detection device, which specifically includes the following steps:

[0078] Step 1: Acquire the first angle signal output by the galvanometer angle detection device. The galvanometer angle detection device is generally a photoelectric galvanometer angle sensor in a photoelectric galvanometer or a rotary encoder in a grating encoder galvanometer; these sensors are used to detect the deflection angle of the galvanometer.

[0079] Step 2: A control signal is generated using a reference signal whose integral value is greater than or less than 0. This control signal is then input to the power amplifier module to generate an excitation signal. The galvanometer rotor deflects under the excitation signal. This embodiment describes inputting an excitation signal to the positive terminal of the stator winding. Those skilled in the art can derive methods for inputting excitation signals to other pins of the stator winding based on this embodiment; therefore, the process of inputting excitation signals to other pins will not be elaborated upon here.

[0080] Step 3: After inputting the excitation signal, the galvanometer rotor deflects, and the second galvanometer angle signal output by the galvanometer angle detection device is collected during the deflection of the galvanometer rotor.

[0081] Step 4: Based on the integral value of the reference signal and the changes in the galvanometer angle signal collected before and after the input excitation signal, determine whether the polarity of the direction of the galvanometer electromagnetic torque matches the polarity of the change in the angle signal output by the galvanometer angle detection device. The direction of the galvanometer electromagnetic torque is the rotation direction of the galvanometer rotor when the excitation signal flows through the stator winding of the galvanometer.

[0082] Steps 1-4 involve checking whether the direction of the galvanometer's electromagnetic torque matches the polarity of the angle signal change output by the angle detection device before the closed-loop control module for the galvanometer's deflection angle is functioning normally. If the polarities do not match, the matching method in step 5 can reverse the polarity mismatch state of the galvanometer, thereby enabling the galvanometer system to perform normal negative feedback control.

[0083] Step 5: After the deflection angle closed-loop control module of the galvanometer is working normally, if the polarity of the direction of the electromagnetic torque of the galvanometer does not match the polarity of the change in the angle signal output by the galvanometer angle detection device, a first polarity adjustment factor is set; and the first polarity adjustment factor is used to reverse the polarity of the output signal of the galvanometer angle detection device input to the deflection angle closed-loop control module, or the output signal of the deflection angle closed-loop control module. After the polarity is reversed, the direction of the electromagnetic torque of the galvanometer matches the polarity of the change in the angle signal output by the angle detection device, and the galvanometer system enters normal negative feedback control.

[0084] Preferably, the excitation signal can be input to the positive terminal of the galvanometer stator winding, and the reference signal can be either a signal integral value greater than 0 or less than 0. Therefore, the method for determining whether the direction of the galvanometer's electromagnetic torque matches the polarity of the angle signal change from the angle detection device includes the following two cases:

[0085] When the integral value of the reference signal is greater than 0, it is determined whether the first galvanometer angle signal is less than the second galvanometer angle signal: if the first galvanometer angle signal is less than the second galvanometer angle signal, it is determined that the direction of the electromagnetic torque of the galvanometer matches the polarity of the change in the angle signal of the angle detection device; otherwise, the direction of the electromagnetic torque of the galvanometer does not match the polarity of the change in the angle signal of the angle detection device.

[0086] Alternatively, when the integral value of the reference signal is less than 0, it is determined whether the first galvanometer angle signal is greater than the second galvanometer angle signal. If the first galvanometer angle signal is greater than the second galvanometer angle signal, it is determined that the direction of the galvanometer electromagnetic torque matches the polarity of the change in the angle signal of the angle detection device; otherwise, the direction of the galvanometer electromagnetic torque does not match the polarity of the change in the angle signal of the angle detection device.

[0087] Example 2

[0088] See Figure 2 The above is a flowchart illustrating an automatic polarity matching method for the electromagnetic torque of a photoelectric galvanometer and the change in the angle signal output by its angle detection device, provided in an embodiment of this application. In this embodiment, the integral value of the reference signal is greater than 0. Another automatic polarity matching method for the electromagnetic torque of a galvanometer and the change in the angle signal output by its angle detection device, provided in an embodiment of this application, specifically includes the following steps:

[0089] Before the galvanometer deflection angle closed-loop control module works properly, record the output voltage V1 of the galvanometer photoelectric angle sensor, generate a control signal using a reference signal with an integral value greater than 0, and control the power amplification module to continuously inject an excitation signal into the positive pole of the #6 stator winding, and drive the deflection of the galvanometer rotor's swing angle, and record the output voltage V2 of the galvanometer photoelectric angle sensor during the deflection process.

[0090] Judge the magnitude relationship between V1 and V2: when V1 < V2, it is determined that the polarity of the galvanometer torque direction matches the polarity of the change amount of the angle signal output by the angle detection device; when V1 > V2, it is determined that the polarity of the galvanometer torque direction does not match the polarity of the change amount of the angle signal output by the angle detection device.

[0091] If it is determined that the polarities match (that is, the polarity of the change amount of the voltage output by the galvanometer angle detection device is consistent with the direction of the galvanometer electromagnetic torque), set the polarity adjustment factor to 1 (the second polarity adjustment factor in this embodiment is 1). After the galvanometer deflection angle closed-loop control module works properly, the galvanometer system performs negative feedback control.

[0092] When the polarities do not match, the galvanometer system performs positive feedback control. Therefore, if it is determined that the polarities do not match (that is, the polarity of the change amount of the voltage output by the galvanometer angle detection device is opposite to the direction of the galvanometer electromagnetic torque), set the polarity adjustment factor to -1 (the first polarity adjustment factor in this embodiment is -1). Use the first polarity adjustment factor -1 to reverse the polarity of the voltage signal output by the galvanometer angle detection device input to the deflection angle closed-loop control module or the output signal of the deflection angle closed-loop control module, so that the polarity of the galvanometer torque matches the polarity of the change amount of the angle signal output by the angle detection device, and the galvanometer system performs normal negative feedback control.

[0093] Referring to Figure 3, add a polarity adjustment module to the traditional photoelectric galvanometer closed-loop control system. The polarity adjustment module is used to add a "polarity adjustment factor" to the feedback path of the galvanometer angle signal or the forward path where the control signal is located in the galvanometer control loop. Preferably, in the case of polarity mismatch, add the first polarity adjustment factor with a coefficient of -1. By adding the first polarity adjustment factor -1, ensure that the "deflection angle closed-loop control module" can normally control the galvanometer system with polarity mismatch, that is, ensure that the closed-loop system enters the negative feedback working state.

[0094] Embodiment III

[0095] Different from the second embodiment, a reference signal with an integral value less than 0 is used to generate a control signal. In this case, detecting whether the polarities match includes the following situations: when V1 < V2, it is determined that the polarity of the galvanometer torque direction does not match the polarity of the change in the angle signal of the angle detection device; when V1 > V2, it is determined that the polarity of the galvanometer torque direction matches the polarity of the change in the angle signal of the angle detection device.

[0096] As can be seen from the above embodiments, the entire detection process (i.e., the process of detecting whether the polarities of the galvanometer electromagnetic torque direction and the change in the angle signal output by the galvanometer angle detection device match) is automatic and does not require manual intervention. And in the case of detecting a polarity mismatch, automatic matching is performed (i.e., setting the first polarity adjustment factor to reverse the polarity of the control signal), effectively improving the production efficiency of the galvanometer system.

[0097] However, during the process of driving the galvanometer to deflect with the excitation signal, due to the low moment of inertia of the galvanometer rotor and the small mechanical limit range of the galvanometer, the load is usually an expensive and easily damaged reflecting lens. Therefore, if only a simple monotonic function signal is input to the power amplification module, when the signal amplitude is slightly large, the acceleration of the excitation lens deflection is too large, and the speed suddenly becomes zero after deflecting to the mechanical limit, resulting in lens damage; when the signal amplitude is small, the torque generated by the galvanometer rotor cannot drive the rotor to deflect reliably by a certain angle, so the relationship between V1 and V2 cannot be reliably judged. Once the polarity of the change in the angle signal output by the galvanometer angle detection device is misjudged, the system will enter a positive feedback state after the "deflection angle closed-loop control module" is started, leading to rapid damage of the galvanometer. Therefore, to solve the above problems, the present application will further limit the characteristics of the excitation signal to achieve the purpose of ensuring both the reliability of the detection process of whether the polarities match and the non-mutation of the speed of the galvanometer lens under the drive of the excitation signal.

[0098] Since the galvanometer system has two control methods: open-loop control and closed-loop control, open-loop control is a system control method without feedback information. Therefore, the open-loop control of the galvanometer system means that the galvanometer angle position signal output by the galvanometer angle detection device does not participate in the operation of the galvanometer system. And the closed-loop control of the galvanometer system is a control method with feedback information (i.e., the galvanometer angle position signal output by the galvanometer angle detection device) participating in the operation of the galvanometer system. Therefore, Embodiments 4 and 5 of the present application respectively provide the processes of driving the galvanometer rotor to deflect by inputting an excitation signal to the galvanometer stator winding using open-loop control and closed-loop control during the automatic polarity matching process.

[0099] Embodiment 4

[0100] During the automatic polarity matching process, when using open-loop control of the galvanometer system, there is no feedback signal for the galvanometer angle position. To ensure slow galvanometer deflection, the galvanometer rotor operates in the following mode during deflection under excitation: repeatedly accelerating and then decelerating until the galvanometer contacts the mechanical limit. In this mode, the acceleration and deceleration times are the same. This ensures that the deflection speed of the galvanometer is controllable during testing and prevents sudden speed changes that could damage the lens when it contacts the mechanical limit.

[0101] like Figure 4 The diagram shown is a flowchart illustrating the input of an excitation signal to the stator winding of a galvanometer to drive the rotor of the galvanometer in an open-loop control manner according to an embodiment of this application. The open-loop control method proposed in this embodiment, which inputs an excitation signal to the stator winding of the galvanometer to drive the rotor of the galvanometer, specifically includes the following steps:

[0102] S201 presets the total number N of half-waves of the excitation signal, the amplitude adjustment coefficient increment Δk, and the angular frequency w of the sine wave;

[0103] S202 initializes the half-wave count timer n=0, timer t0=0, and amplitude adjustment coefficient k=0;

[0104] S203 calculates the reference signal u. ref The reference signal u ref The calculation formula is:

[0105] u ref = k sin(wt)

[0106] Where t = t0 + Δt, Δt is the timer step value;

[0107] S204 sets the reference signal u ref Same as control signal u con Thus, the control signal u is obtained. con The control signal u con The input power amplifier module is then used to inject the excitation signal output by the power amplifier module into the galvanometer stator winding.

[0108] S205 determines whether wt is greater than π;

[0109] If wt is less than π, then proceed to S203;

[0110] S207 If wt is greater than π, then determine whether n is greater than or equal to N, and proceed to S208 or S209;

[0111] S208 If n is less than N, then calculate And repeat S203-S208;

[0112] S209 If n is greater than or equal to N, then stop inputting excitation signals to the galvanometer stator winding.

[0113] See Figure 6 The reference signal waveform generated in this embodiment of the application uses physical quantities Δk = 0.0628, N = 9, and ω = 20 for calculation. The integral value of this reference signal is greater than 0, and the reference signal is the same as the control signal. When the reference signal (control signal) with a positive integral value is used to generate an excitation signal to excite the galvanometer system with polarity matching and polarity mismatch between the electromagnetic torque direction and the angle signal change output by the galvanometer angle detection device, the generated galvanometer deflection angle trajectories are shown in Figure 7(a) and Figure 7(b), respectively.

[0114] As can be seen from Figure 7(a), the rotor is at the center of the galvanometer before excitation, therefore the output signal of the galvanometer angle detection device is 0V. Figure 6 After the reference signal generates an excitation signal to excite the galvanometer, the polarity-matched galvanometer gently deflects toward the positive mechanical limit (the position of the rotor when the galvanometer angle detection device outputs a +5V signal) until the rotor contacts the positive mechanical limit.

[0115] As can be seen from Figure 7(b), when using Figure 6 After the reference signal generates an excitation signal to excite the galvanometer, the polarity-mismatched galvanometer gently deflects from its center position toward the negative mechanical limit (the position of the rotor when the galvanometer angle sensor outputs a -5V signal) until the rotor contacts the negative mechanical limit.

[0116] Under the excitation signal generated by the above method, the speed of the galvanometer rotor is relatively small when it contacts the positive or negative mechanical limit, thus ensuring the integrity of the galvanometer lens.

[0117] If a reference signal with a negative integral value is used for detection, then the directions of forward and reverse movement of the galvanometer deflection angle mentioned above are exactly opposite.

[0118] The open-loop scheme in this embodiment can effectively control the speed at which the rotor contacts the mechanical limit during the polarity test of the galvanometer, thus protecting the lens.

[0119] Example 5

[0120] Since the response of the galvanometer to the excitation signal is affected by the galvanometer model and the size of the load lens, in practical applications, it is still necessary to adjust parameters such as the frequency, amplitude, and time step of the non-monotonic function to achieve the optimal effect. Compared with open-loop control, the advantage of closed-loop control is that the galvanometer is always under the action of a low-bandwidth closed-loop control that is not affected by polarity matching during the polarity matching process, resulting in smoother motion speed and simpler controller parameter adjustment.

[0121] The specific control scheme involves selecting a PID controller and adding an absolute value calculation unit and a position compensation unit to the galvanometer's position signal feedback loop. With these improvements, a low-bandwidth closed-loop control of the absolute value of the galvanometer's deflection angle can be achieved using a command waveform generated by the "polarity matching test signal generation module" under conditions where the galvanometer polarity is unknown. Figure 8 The diagram shown is a schematic of a polarity matching control module based on closed-loop control provided in an embodiment of this application.

[0122] like Figure 9 The diagram shown is a flowchart illustrating the input of an excitation signal to the stator winding of a galvanometer to drive the rotor of the galvanometer in a closed-loop control manner according to an embodiment of this application. The closed-loop control method proposed in this embodiment, which inputs an excitation signal to the stator winding of the galvanometer to drive the rotor of the galvanometer, specifically includes the following steps:

[0123] S301 Preset Position Compensation Value V offset The function outputs the saturation value u. throld and total duration t max ,

[0124] S302 initializes the timer t = 0;

[0125] S303 calculates the reference voltage signal, the reference voltage signal u ref The calculation formula is:

[0126]

[0127] Where h is the slope of the ramp signal, t is time, and u throld The function outputs the saturation value, h and u throld The relationship is that they have the same sign;

[0128] S304 acquires the galvanometer angle position signal V during galvanometer deflection. pos And perform absolute value operation to obtain |V pos +V offset |;

[0129] S305 according to |V pos +V offset |and the reference voltage signal uref The error signal u is calculated. err :

[0130] u err =u ref -|V pos +V 。ffset |;

[0131] S306 based on the error signal u err The control signal u is calculated. con The calculation formula is:

[0132]

[0133] Where, k p k i and k d These are the proportional, integral, and derivative coefficients of the PID controller, respectively, and s is the differential operator;

[0134] S307 will send the control signal u con The input power amplifier module is then used to inject the excitation signal output by the power amplifier module into the galvanometer stator winding.

[0135] S308 determines whether t is greater than t max And perform S309 or S3010;

[0136] S309 If t is less than t max Then the timer counts for t = t + Δt, and repeats steps S303-S308, where Δt is the timer step value;

[0137] S3010 If t is greater than or equal to t max If the excitation signal is not input to the galvanometer stator winding, then the input signal to the galvanometer stator winding will be stopped.

[0138] Following the above steps and setting k=5, u throld The waveform of the reference signal generated by =2.5 is as follows Figure 10 As shown, the integral value of the reference signal is greater than 0. When the reference signal with a positive integral value is used to obtain the control signal through the calculation of the PID controller, the polarity matching and the polarity mismatch of the change in the angle signal output by the electromagnetic torque direction and the galvanometer angle detection device are used to excite the galvanometer system, the galvanometer deflection angle trajectory is shown in Figure 11(a) and Figure 11(b), respectively.

[0139] As can be seen from Figure 11(a), before excitation, the rotor is at the center of the galvanometer, therefore the output signal of the galvanometer angle detection device is 0V. After the galvanometer is excited using closed-loop control, the voltage signal output by the polarity-matched galvanometer angle sensor is equal to the reference signal u. refThe changes occur in the same direction, producing the galvanometer deflection angle trajectory shown in Figure 11(a). Under this condition, the galvanometer angle signal changes from V1 = 0 to V2 = +2.5. A galvanometer with mismatched polarity will deflect the reference signal u. ref The mirror deflection trajectory is generated in the opposite direction of the change, as shown in Figure 11(b). Under this condition, the mirror angle signal changes from V1 = 0 to V2 = -2.5. Comparing Figure 7 and Figure 11, it is clear that when the closed-loop control scheme is adopted, the mirror deflection trajectory is smoother during the polarity matching detection process, and the protection of the mirror and lens is more complete.

[0140] Based on the above method, this embodiment provides a polarity matching device for a galvanometer electromagnetic torque direction and angle detection device, comprising:

[0141] The acquisition module is used to acquire the galvanometer angle signal output by the galvanometer angle detection device before the galvanometer deflection angle closed-loop control module is working normally.

[0142] The polarity matching test signal generation module is used to generate a control signal based on the reference signal before the deflection angle closed-loop control module of the galvanometer is working normally. The control signal is used to control the power amplifier module to generate an excitation signal to drive the galvanometer rotor to deflect.

[0143] The judgment module is used to determine whether the direction of the electromagnetic torque of the galvanometer matches the polarity of the change in the angle signal output by the angle detection device, based on the integral value of the reference signal and the galvanometer angle signals acquired before and after the injection of the excitation signal, before the galvanometer deflection angle closed-loop control module is working normally. The galvanometer angle signal includes the first galvanometer angle signal acquired before the injection of the excitation signal and the second galvanometer angle signal acquired after the injection of the excitation signal.

[0144] The polarity adjustment factor generation module is used to set the first polarity adjustment factor when the direction of the electromagnetic torque of the galvanometer does not match the polarity of the change in the angle signal output by the angle detection device before the closed-loop control module of the galvanometer's deflection angle is working normally.

[0145] The polarity adjustment module is used to reverse the polarity of the output signal of the galvanometer angle detection device input to the deflection angle closed-loop control module or the output signal of the deflection angle closed-loop control module after the galvanometer deflection angle closed-loop control module is working normally, using the first polarity adjustment factor, so as to ensure negative feedback control of the galvanometer system with mismatched polarities.

[0146] Preferably, the judgment module is used to determine that when the integral value of the reference signal is greater than 0 and the first galvanometer angle signal is less than the second galvanometer angle signal, the direction of the electromagnetic torque of the galvanometer matches the polarity of the change in the angle signal output by the angle detection device; otherwise, the direction of the electromagnetic torque of the galvanometer does not match the polarity of the change in the angle signal output by the angle detection device.

[0147] Alternatively, it can be used to determine whether the direction of the electromagnetic torque of the galvanometer matches the polarity of the change in the angle signal output by the angle detection device when the integral value of the reference signal is less than 0 and the first galvanometer angle signal is greater than the second galvanometer angle signal; otherwise, the direction of the electromagnetic torque of the galvanometer does not match the polarity of the change in the angle signal output by the angle detection device.

[0148] Similar parts between the embodiments provided in this application can be referred to mutually. The specific implementation methods provided above are only a few examples under the overall concept of this application and do not constitute a limitation on the scope of protection of this application. For those skilled in the art, any other implementation methods extended from the solution of this application without creative effort shall fall within the scope of protection of this application.

Claims

1. A method for matching the polarity of a galvanometer electromagnetic torque direction and angle detection device, characterized in that, The method includes the following steps: Before the deflection angle closed-loop control module of the galvanometer is working normally, the first galvanometer angle signal output by the galvanometer angle detection device is collected. A control signal is generated based on a reference signal, and an excitation signal is generated through the control signal. The excitation signal is then input into the galvanometer stator winding to drive the galvanometer rotor to deflect. After the excitation signal is input to the galvanometer stator winding, the second galvanometer angle signal output by the galvanometer angle detection device is acquired; Based on the integral value of the reference signal, the first galvanometer angle signal, and the second galvanometer angle signal, determine whether the direction of the galvanometer electromagnetic torque matches the polarity of the change in the angle signal output by the galvanometer angle detection device. If the direction of the electromagnetic torque of the galvanometer does not match the polarity of the change in the angle signal of the angle detection device, then a first polarity adjustment factor is set. After the deflection angle closed-loop control module is working normally, the first polarity adjustment factor is used to reverse the polarity of the output signal of the galvanometer angle detection device input to the deflection angle closed-loop control module or the output signal of the deflection angle closed-loop control module, so as to ensure that the galvanometer system with mismatched polarity is subjected to negative feedback control.

2. The polarity matching method for the galvanometer electromagnetic torque direction and angle detection device according to claim 1, characterized in that, Determining whether the direction of the electromagnetic torque of the galvanometer matches the polarity of the change in the angle signal output by the angle detection device includes: When the integral value of the reference signal is greater than 0, it is determined whether the first galvanometer angle signal is less than the second galvanometer angle signal: if the first galvanometer angle signal is less than the second galvanometer angle signal, it is determined that the direction of the galvanometer electromagnetic torque matches the polarity of the change in the angle signal output by the angle detection device; otherwise, the direction of the galvanometer electromagnetic torque does not match the polarity of the change in the angle signal output by the angle detection device. Alternatively, when the integral value of the reference signal is less than 0, it is determined whether the first galvanometer angle signal is greater than the second galvanometer angle signal: if the first galvanometer angle signal is greater than the second galvanometer angle signal, it is determined that the direction of the galvanometer electromagnetic torque matches the polarity of the change in the angle signal output by the angle detection device; otherwise, the direction of the galvanometer electromagnetic torque does not match the polarity of the change in the angle signal output by the angle detection device.

3. The polarity matching method for the galvanometer electromagnetic torque direction and angle detection device according to claim 1 or 2, characterized in that, The process involves generating a control signal using an open-loop control method, generating an excitation signal from the control signal, and then inputting the excitation signal into the stator winding of the galvanometer to drive the rotor of the galvanometer to deflect. This includes the following steps: S201 presets the total number N of half-waves of the excitation signal, the amplitude adjustment coefficient increment Δk, and the angular frequency w of the sine wave; S202 initializes the half-wave count timer n=0, timer t0=0, and amplitude adjustment coefficient k=0; S203 calculates the reference signal u. ref The reference signal u ref The calculation formula is: u ref =k sin(wt) Where t = t0 + Δt, Δt is the timer step value; S204 sets the reference signal u ref With control signal u con The same, thus obtaining the control signal u con The control signal u con The input power amplifier module is then used to inject the excitation signal output by the power amplifier module into the galvanometer stator winding. S205 determines whether wt is greater than π; If wt is less than π, then proceed to S203; S207 If wt is greater than π, then determine whether n is greater than or equal to N, and proceed to S208 or S209; S208 If n is less than N, then calculate And repeat S203-S208; S209 If n is greater than or equal to N, then stop inputting excitation signals to the galvanometer stator winding.

4. The polarity matching method for the galvanometer electromagnetic torque direction and angle detection device according to claim 1 or 2, characterized in that, A closed-loop control method is used to generate a control signal, which is then used to generate an excitation signal. This excitation signal is then input to the stator winding of the galvanometer to drive the rotor of the galvanometer to deflect. The method includes the following steps: S301 Preset Position Compensation Value V offset The function outputs the saturation value u. throld and total duration t max , S302 initializes the timer t = 0; S303 calculates the reference signal u. ref The calculation formula is: Where h is the slope of the ramp signal, t is time, and u throld The function outputs the saturation value, h and u throld The relationship is that they have the same sign; S304 acquires the galvanometer angle position signal V during galvanometer deflection. pos And perform absolute value operation to obtain |V pos +V offset |; S305 according to |V pos +V offset |and the reference signal u ref The error signal u is calculated. err : u err =u ref -|V pos +V offset |; S306 based on the error signal u err The control signal u is calculated. con The calculation formula is: Where, k p k i and k d These are the proportional, integral, and derivative coefficients of the PID controller, respectively, and s is the differential operator; S307 will send the control signal u con The input power amplifier module is then used to inject the excitation signal output by the power amplifier module into the galvanometer stator winding. S308 determines whether t is greater than t max And perform S309 or S3010; S309 If t is less than t max Then the timer counts for t = t + Δt, and repeats steps S303-S308, where Δt is the timer step value; S3010 If t is greater than or equal to t max If the excitation signal is not input to the galvanometer stator winding, then the input signal to the galvanometer stator winding will be stopped.

5. A polarity matching device for detecting the electromagnetic torque direction and angle of a galvanometer, characterized in that, include: The acquisition module is used to acquire the galvanometer angle signal output by the galvanometer angle detection device before the galvanometer deflection angle closed-loop control module is working normally. The polarity matching test signal generation module is used to generate a control signal based on a reference signal before the deflection angle closed-loop control module of the galvanometer is working normally. The control signal is used to control the power amplifier module to generate an excitation signal to drive the galvanometer rotor to deflect. The judgment module is used to determine whether the direction of the electromagnetic torque of the galvanometer matches the polarity of the change in the angle signal output by the angle detection device, based on the integral value of the reference signal and the galvanometer angle signals acquired before and after the injection of the excitation signal, before the galvanometer deflection angle closed-loop control module is working normally; wherein, the galvanometer angle signal includes a first galvanometer angle signal acquired before the injection of the excitation signal and a second galvanometer angle signal acquired after the injection of the excitation signal. The polarity adjustment factor generation module is used to set a first polarity adjustment factor when the direction of the electromagnetic torque of the galvanometer does not match the polarity of the change in the angle signal output by the angle detection device before the deflection angle closed-loop control module of the galvanometer is working normally. The polarity adjustment module is used to reverse the polarity of the output signal of the galvanometer angle detection device input to the deflection angle closed-loop control module or the output signal of the deflection angle closed-loop control module after the galvanometer deflection angle closed-loop control module is working normally, using the first polarity adjustment factor, so as to ensure negative feedback control of the galvanometer system with mismatched polarities.

6. The polarity matching device for the galvanometer electromagnetic torque direction and angle detection device according to claim 5, characterized in that, The judgment module is used to determine that when the integral value of the reference signal is greater than 0 and the first galvanometer angle signal is less than the second galvanometer angle signal, the direction of the electromagnetic torque of the galvanometer matches the polarity of the change in the angle signal output by the angle detection device; otherwise, the direction of the electromagnetic torque of the galvanometer does not match the polarity of the change in the angle signal output by the angle detection device. Alternatively, when the integral value of the reference signal is less than 0 and the first galvanometer angle signal is greater than the second galvanometer angle signal, it is determined that the polarity of the change in the electromagnetic torque direction of the galvanometer matches the polarity of the change in the angle signal output by the angle detection device; otherwise, the electromagnetic torque direction of the galvanometer does not match the polarity of the change in the angle signal output by the angle detection device.