FPGA-based two-dimensional scanning mirror control method and system
By combining one-dimensional MEMS micromirror and permanent magnet synchronous motor, and using FPGA controller to independently control, the existing two-dimensional scanning mirror system has solved the problem of low scanning range and frequency, and high-frequency and large-angle scanning is realized, which is suitable for high-frequency and volume-constrained applications.
Patent Information
- Application Number
- CN202211741977.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-30
- Publication Date
- 2025-08-22
- Estimated Expiration
- 2042-12-30
AI Technical Summary
The existing two-dimensional scanning mirror system has problems such as limited scanning range, low scanning frequency, and large system volume, which is difficult to meet the application conditions of high-frequency scanning and volume requirements.
The one-dimensional MEMS micromirror and permanent magnet synchronous motor reflection device are combined, and independent control is performed through the FPGA controller. The AXI_GPIO interrupt and CPU interrupt methods are used to realize high-frequency scanning and large-angle scanning, reducing control difficulty and cost.
It realizes a larger scanning angle and higher scanning frequency, reduces system delay and control difficulty, enhances the portability and applicability of the system, and is suitable for high-frequency scanning and volume-constrained occasions.
Smart Images

Figure CN115933161B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to a two-dimensional scanning mirror control method and system based on FPGA, belonging to the technical field of optical scanning. Background Art
[0002] An optical scanning mirror is a vector scanning device that reflects an incident light beam in a specific pattern and time sequence, thereby achieving scanning imaging on the image plane. Among them, the electromagnetically driven torsion micromirror, a type of MEMS micromirror, retains the advantages of MEMS micromirrors while offering superior performance in reducing drive voltage, increasing signal response speed, and expanding signal scanning range, thus possessing great application value.
[0003] A two-dimensional scanning mirror is mainly composed of a control signal, a controller, a driver, a mirror and its driving device, a light source, etc. Among them, the traditional two-dimensional scanning mirror mainly includes a MEMS (Micro Flectro Mechanical System) micromirror and a scanning mirror system composed of dual motors, which has the characteristics of small size, high scanning frequency, and low driving voltage. Another commonly used two-dimensional scanning mirror is a two-dimensional scanning mirror system composed of dual motors. The light undergoes two reflections in total, and the two motors are responsible for scanning the X and Y axes respectively. Its physical structure is simple and the system is easy to control. However, due to the characteristics of the physical structure of the two-dimensional MEMS micromirror, it has the disadvantages of strong nonlinearity, strong coupling, and inability to perform large-scale scanning. Its scanning range limits its application in many occasions. Due to the characteristics of the motor itself, the scanning frequency of the dual-motor two-dimensional scanning mirror system is lower than that of the two-dimensional MEMS scanning mirror, and the overall volume of the system is large, which cannot be used in some occasions with clear requirements on volume. Summary of the Invention
[0004] The present invention provides a two-dimensional scanning mirror control method and system based on FPGA, aiming to solve at least one of the technical problems existing in the prior art.
[0005] The technical solution of the present invention relates to a method for controlling a two-dimensional scanning mirror based on an FPGA. The two-dimensional scanning mirror includes a one-dimensional MEMS micromirror and a reflective mirror controlled by an adjustment motor. Control signals for the one-dimensional MEMS micromirror and the adjustment motor are output by an FPGA controller; the FPGA controller includes a first processing core and a second processing core. The method according to the present invention includes the following steps:
[0006] S100, obtaining a reference signal of an upper machine position, a position signal of the one-dimensional MEMS micromirror, and an encoder signal of the adjustment motor; wherein the encoder signal is input to a first processing core, and the position signal is input to a second processing core;
[0007] S200, the first processing core performs position loop calculation and speed loop calculation using a vector control algorithm to obtain a voltage signal required for regulating the motor drive;
[0008] S300, the second processing core obtains the voltage signal required for driving the one-dimensional MEMS micromirror through operations of the superhelix controller and the superhelix observer;
[0009] S400 , according to the driving signal output by the calculation, driving the one-dimensional MEMS micromirror and the adjustment motor to perform a swing operation to perform a two-dimensional scanning task.
[0010] Furthermore, the FPGA controller transmits signals through a storage array.
[0011] Furthermore, the FPGA controller adopts an AXI_GPIO interrupt mode and a CPU interrupt mode.
[0012] Furthermore, when the AXI_GPIO interrupt is triggered, the CPU interrupt of the first processing core is triggered, and then the CPU interrupt of the second processing core is triggered and the control algorithm operation of the one-dimensional MEMS micromirror is performed; after the control algorithm operation of the one-dimensional MEMS micromirror is completed, the first processing core executes the control operation of the adjustment motor.
[0013] Furthermore, the vector control algorithm adopts the id=0 vector control algorithm.
[0014] Furthermore, the step S200 includes the following steps:
[0015] S210, obtaining a reference signal of the regulating motor and a position signal collected by an encoder of the regulating motor, and inputting the signals into a position loop regulating PI device;
[0016] S220, obtaining a speed feedback value of an encoder of the regulating motor, and inputting an output value of the position loop regulating PI device and the speed feedback value into a speed loop regulating PI device;
[0017] S230, collecting the current three-phase current signal of the regulating motor to obtain the current signals of the d-axis and the q-axis; setting the current signal ID to 0;
[0018] S240, inputting the q-axis circuit signal and the output value of the speed loop regulating PI device into the Q-axis current regulating PI device; inputting the d-axis current signal and the set current signal id into the D-axis current regulating PI device;
[0019] S250 , inputting the output value of the Q-axis current regulating PI device and the output value of the D-axis current regulating PI device into an SVPWM module to obtain a driving signal for the regulating motor.
[0020] Furthermore, step S300 includes the following steps:
[0021] S310, obtaining a reference deflection angle and a feedback deflection angle output by the superhelical observer to calculate a deflection angle estimation error;
[0022] S320, deriving the reference deflection angle and the feedback deflection angle through a differentiator to obtain an angular velocity estimation error;
[0023] S330 , inputting the deflection angle estimation error and the angular velocity estimation error into the super-helical controller to obtain a voltage signal required for driving the one-dimensional MEMS micromirror.
[0024] The technical solution of the present invention also relates to a computer-readable storage medium having program instructions stored thereon, and the above-mentioned method is implemented when the program instructions are executed by a processor.
[0025] The technical solution of the present invention also relates to a two-dimensional scanning mirror control system based on FPGA, wherein the system includes a computer device, and the computer device includes the above-mentioned computer-readable storage medium.
[0026] The beneficial effects of the present invention are as follows:
[0027] The present invention implements a two-dimensional scanning device combining a one-dimensional MEMS micromirror and a permanent magnet synchronous motor reflector. The two-dimensional scanning mirror function is achieved through the one-dimensional oscillation of the MEMS micromirror and the interval oscillation of the motor. Since different dimensions require different scanning frequencies and scanning angles, and low-frequency dimensions generally require larger scanning angles, a one-dimensional MEMS micromirror is used to scan the high-frequency dimension, meeting the needs of high-frequency scanning. The simpler-to-control permanent magnet synchronous motor reflector is used in the low-frequency scanning dimension, thereby reducing control difficulty and increasing the scanning angle. Furthermore, both the permanent magnet synchronous motor and the one-dimensional MEMS micromirror can be developed using embedded systems, reducing the costs of industrial and commercial development. Furthermore, because the two components are independently developed and jointly controlled, the one-dimensional MEMS micromirror and the permanent magnet synchronous motor reflector can be installed in different locations according to actual needs, increasing the overall portability of the system. Compared to a two-dimensional MEMS micromirror, the present invention offers a wider scanning angle, and because the two components are independently developed, they can be independently installed as needed. Compared to a dual-motor scanning mirror system, the present invention has a higher scanning frequency, meeting the needs of high-frequency scanning. The present invention adopts FGPA as the system controller and fully utilizes the on-chip resources of the chip by adopting AXI_GPIO interrupt and CPU interrupt. While achieving high-speed sampling, the motor control algorithm and MEMS control algorithm are deployed in different CPUs, reducing system latency and achieving better control effect. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] Figure 1 2 is a schematic structural diagram of a two-dimensional scanning device according to the present invention.
[0029] Figure 2 yes Figure 1 Enlarged schematic diagram of point A in the middle.
[0030] Figure 3 is a system control flow chart of the method according to the present invention.
[0031] Figure 4 It is a basic principle diagram of program design according to the method of the present invention.
[0032] Figure 5 1 is a control principle diagram of an adjusting motor according to the method of the present invention.
[0033] Figure 6 1 is a control principle diagram of a one-dimensional MEMS micromirror according to the method of the present invention.
[0034] Figure 7 2 is a diagram showing the tracking effect of the experimental platform according to the method of the present invention.
[0035] Reference numerals:
[0036] Two-dimensional scanning device 100; slide rail 200; micromirror mechanism 300; one-dimensional MEMS micromirror 310; micromirror base 320; micromirror lifting frame 330; motor reflection mechanism 400; adjustment motor 410; reflector 420; motor base 430; motor lifting frame 440; lower connecting plate 441; upper connecting plate 442; active rotating plate 443; transmission rotating plate 444; screw 445; prism mechanism 500; dichroic prism 510; prism base 520; prism lifting frame 530; prism rotating frame 540; carrier plate 550; laser 600. DETAILED DESCRIPTION
[0037] The following will provide a clear and complete description of the concept, specific structure and technical effects of the present invention in conjunction with the embodiments and drawings to fully understand the purpose, scheme and effects of the present invention.
[0038] It should be noted that, unless otherwise specified, when a feature is referred to as being "fixed" or "connected" to another feature, it may be directly fixed or connected to the other feature, or it may be indirectly fixed or connected to the other feature. The singular forms "a", "said" and "the" used herein are also intended to include the plural forms, unless the context clearly indicates otherwise. In addition, unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the art. The terms used in this specification are only for describing specific embodiments and are not intended to limit the invention. The term "and / or" used herein includes any combination of one or more related listed items.
[0039] Should be understood that, although the present disclosure may adopt the term first, second, third etc. to describe various elements, these elements should not be limited to these terms.These terms are only used to distinguish the elements of the same type from each other.For example, without departing from the scope of the present disclosure, the first element may also be referred to as the second element, and similarly, the second element may also be referred to as the first element.The use of any and all examples or exemplary language ("for example", "such as" etc.) provided herein is only intended to better illustrate embodiments of the present invention, and unless otherwise required, will not impose limitations on the scope of the present invention.
[0040] See also Figure 1The two-dimensional scanning device 100 of the present invention includes a micromirror mechanism 300, a motor reflection mechanism 400, a prism mechanism 500, and an FPGA controller for outputting drive signals for a one-dimensional MEMS micromirror 310 and an adjustment motor 410. The micromirror mechanism 300 includes a one-dimensional MEMS micromirror 310, a micromirror base 320, and a micromirror lift 330 for adjusting the height of the one-dimensional MEMS micromirror 310. The micromirror base 320 is slidably mounted on a slide rail 200, and the micromirror lift 330 is mounted on the micromirror base 320. The motor reflection mechanism 400 includes a reflector 420, an adjustment motor 410, a motor base 430, and a motor lift 440 for adjusting the height of the adjustment motor 410. The motor base 430 is slidably mounted on the slide rail 200, and the motor lift 440 is mounted on the motor base 430. The reflector 420 is mounted on the adjustment motor 410. The prism mechanism 500 includes a beam splitter prism 510, a prism base 520, a prism lifting frame 530 for adjusting the height of the beam splitter prism 510, and a prism rotating frame 540 for adjusting the reflection angle of the beam splitter prism 510. The prism base 520 is slidably disposed on the slide rail 200, and the prism lifting frame 530 and the prism rotating frame 540 are both disposed on the prism base 520.
[0041] In the two-dimensional scanning mirror of the present invention composed of the above-mentioned two-dimensional scanning device 100, the light beam is emitted from the laser 600 to the dichroic prism 510. The dichroic prism 510 allows the light beam to reach the one-dimensional MEMS micromirror 310 of the micromirror mechanism 300. The one-dimensional MEMS micromirror 310 reflects the light beam and allows the light beam to pass through the dichroic prism 510 and reach the reflective mirror 420 of the motor reflective mechanism 400. After being reflected by the reflective mirror 420, the light beam reaches the imaging light shielding plate or PSD sensor.
[0042] In one embodiment, see Figure 1 The micromirror mechanism 300 includes a micromirror base 320, a micromirror bracket, a micromirror lift 330, and a one-dimensional MEMS micromirror 310, arranged from bottom to top. The mirror surface of the one-dimensional MEMS micromirror 310 faces the beam splitter prism 510, and the one-dimensional MEMS micromirror 310 is electrically connected to a position sensor, which obtains the rotation angle signal of the one-dimensional MEMS micromirror 310 through the position sensor. The micromirror base 320 is slidably disposed on the slide rail 200 and can be fixed to the slide rail 200 by adjusting the knob, thereby adjusting the distance between the one-dimensional MEMS micromirror 310 and the motor reflection mechanism 400. At the same time, the height of the one-dimensional MEMS micromirror 310 can be adjusted by the micromirror lift 330.
[0043] In one embodiment, see Figure 2The motor reflection mechanism 400 includes a motor base 430, a motor lifting frame 440, a motor bracket and an adjustment motor 410 arranged from top to bottom. The shaft end of the adjustment motor 410 is connected to a reflector 420, and the reflector 420 forms an angle with the one-dimensional MENS mirror. The reflection angle of the reflector 420 is adjusted by rotating the adjustment motor 410. The motor base 430 is slidably arranged on the slide rail 200, and the motor base 430 can be fixed on the slide rail 200 by adjusting the knob. At the same time, the height of the reflector 420 can be adjusted by the motor lifting frame 440. It should be noted that the adjustment motor 410 in the embodiment of the present invention adopts a permanent magnet synchronous motor. Among them, the FPGA controller obtains the current signal of the adjustment motor 410 through the analog-to-digital conversion acquisition circuit.
[0044] In one embodiment, the motor lift frame 440 includes a lower connecting plate 441, an upper connecting plate 442, a driving rotating plate 443, and a transmission rotating plate 444. The lower connecting plate 441 is mounted on the motor base 430. The upper connecting plate 442 is used to mount the motor bracket. The driving rotating plate 443 and the transmission rotating plate 444 are disposed between the lower connecting plate 441 and the upper connecting plate 442. The middle portion of the driving rotating plate 443 intersects and rotatably connects with the middle portion of the transmission rotating plate 444, forming an X-shaped arrangement. The upper end of the driving rotating plate 443 is located on the same side as the lower end of the transmission rotating plate 444, while the lower end of the driving rotating plate 443 is located on the same side as the upper end of the transmission rotating plate 444. The upper end of the transmission rotating plate 444 is rotationally connected to the upper connecting plate 442, while the lower end of the transmission rotating plate 444 is slidably connected to the lower connecting plate 441. The lower end of the driving rotating plate 443 is rotatably connected to the lower connecting plate 441. A screw 445 is provided at the bottom of the upper connecting plate 442. The upper end of the active rotating plate 443 is threadedly connected to the screw 445. One end of the screw 445 is provided with a handle, which is provided on the outside of the upper connecting plate 442. By rotating the screw 445 with the handle, the active rotating plate 443 moves along the screw 445, thereby causing the upper end of the active rotating plate 443 to move relative to the upper connecting plate 442. The upper end of the active rotating plate 443 moves in a direction away from or toward the handle. At the same time, the lower end of the active rotating plate 443 rotates relative to the lower connecting plate 441, changing the tilt angle of the active rotating plate 443, so that the upper connecting plate 442 drives the electrode and the reflector 420 to rise or fall. At the same time, the upper connecting plate 442 drives the upper end of the transmission rotating plate 444 to move upward, the upper end of the transmission rotating plate 444 rotates relative to the upper connecting plate 442, and drives the lower end of the transmission rotating plate 444 to slide relative to the lower connecting plate 441, thereby changing the tilt angle of the transmission rotating plate 444. Therefore, the height of the reflector 420 can be adjusted by the motor lift 440 .
[0045] In one embodiment, see Figure 1A prism mechanism 500 is disposed between the micromirror mechanism 300 and the motor mechanism. The prism mechanism 500 comprises, arranged from bottom to top, a prism base 520, a carrier plate 550, a prism lift 530, a prism turret 540, a prism holder, and a beam splitter prism 510. The prism base 520 is slidably disposed on the slide rail 200 and can be fixed to the slide rail 200 by adjusting a knob, thereby adjusting the distance between the beam splitter prism 510 and the one-dimensional MEMS micromirror 310 and the reflector 420. The height of the beam splitter prism 510 can be adjusted by the prism lift 530. The angle between the beam splitter prism 510 and the one-dimensional MEMS micromirror 310 and the reflector 420 can be adjusted by the prism turret 540. The one-dimensional MEMS micromirror 310 and the reflector 420 are respectively disposed on the left and right sides of the beam splitter prism 510 . The laser 600 is disposed in front of the beam splitter prism 510 . The laser 600 is fixedly mounted on the carrier 550 via a laser bracket.
[0046] In one embodiment, see Figure 3 The control portion of the two-dimensional scanning device 100 of the present invention utilizes an FPGA controller. The reference input signal can be generated by a host computer, various devices in the application scenario, or the FPGA controller. The reference signal, the position sensor signal of the one-dimensional MEMS micromirror 310, and the encoder signal of the adjustment motor 410 are input into the FPGA controller, which performs calculations and outputs control signals for the one-dimensional MEMS micromirror 310 and the adjustment motor 410. After amplification by the corresponding driver boards, the two control signals are output as actual drive signals for the adjustment motor 410 and the one-dimensional MEMS micromirror 310. The one-dimensional MEMS micromirror 310 and the adjustment motor 410 swing under the action of the drive signals, performing x-axis and y-axis scanning tasks, respectively. It should be noted that an analog-to-digital conversion circuit (AD chip) is connected between the FPGA controller and the adjustment motor 410 and its driver, and the three-phase current and bus voltage of the adjustment motor 410 are collected via the AD chip. The driver board of the one-dimensional MEMS micromirror 310 is equipped with AD and DA conversion circuits.
[0047] See also Figure 4 The two-dimensional scanning device 100 of the present invention includes a first processing core CPU0 and a second processing core CPU1. Specifically, the chip on the development board used includes a dual-core ARM processor and a traditional field programmable gate array FPGA logic component, that is, Figure 3 The FPGA side and the ARM side. The ARM is a dual-core ARM. To better utilize chip resources and improve chip operation efficiency, the control of the regulating motor 410 and the control of the one-dimensional MEMS micromirror 310 are deployed in two cores, namely, Figure 3The CPUO (central processing unit) and CPU1 in the controller are connected. An FPGA is used for data acquisition and output. The actual angle of the one-dimensional MEMS micromirror 310 is converted by an AD (analog-to-digital conversion circuit), and the analog angle signal is converted into a digital angle signal. This digital signal is collected by the FPGA after passing through the external pins of the FPGA. The pulse number of the A and B phases of the motor 410 encoder, the digital signal obtained after AD conversion of the current, and the digital signal transmitted by the host computer are also collected by the FPGA after passing through the external pins of the FPGA. The above two processes are carried out continuously to ensure the real-time and accuracy of the collected data.
[0048] See also Figure 4 Block RAM (BRAM) is the memory array of the FPGA. The FPGA and ARM implement data signal exchange by performing read and write operations on the BRAM. Data transmitted from the FPGA to the ARM includes a reference signal, the number of motor pulses, the digital signal of the motor current, and the digital signal of the MEMS micromirror rotation angle. Data transmitted from the ARM to the FPGA includes the control voltage of the MEMS micromirror and the duty cycle of the motor control. The control cycle is controlled by the system clock master control module on the FPGA, and the embodiment of the present invention sets it to two clock cycles.
[0049] Furthermore, the system's reference signal, motor pulse number, motor current digital signal, and MEMS micromirror angle digital signal are transmitted to the ARM end through BARM, wherein the motor's reference signal, motor pulse number, and motor current digital signal are received by CPU0, and the MEMS micromirror reference signal and MEMS micromirror angle digital signal are received by CPU1. In the embodiment of the present invention, the interrupt at the ARM end uses the AXI_GPI0 interrupt trigger mode, wherein the interrupt trigger signal is generated by the system clock master control module at the FPGA end, generating a trigger signal once every 10us, which is also the control cycle of the MEMS micromirror. When the interrupt is triggered, the interrupt service function of CPU0 is entered, in which the interrupt of CPU1 is further triggered, and the interrupt service function of CPU1 is entered to perform the calculation of the MEMS micromirror control algorithm. After the interrupt service function of CPU1 ends, it returns to the interrupt service function of CPU0 and performs the control algorithm calculation of the permanent magnet synchronous motor until the interrupt service function of CPU0 ends and returns to the main function to complete the operation of one control cycle. The embodiment of the present invention adopts an FGPA controller as the system controller. By adopting AXI_GPI0 interrupt and CPU interrupt, it fully utilizes the on-chip resources of the chip. While achieving high-speed sampling, the motor control algorithm and MEMS control algorithm are deployed in different CPUs, reducing system latency and achieving better control effects.
[0050] After performing motor control and MEMS control operations on the ARM side, the duty cycle information of the six PWM signals and the required voltage control signal amplitude of the MEMS micromirror are obtained. The ARM stores this data in the BARM, and the FPGA reads the corresponding address of the BARM to obtain the corresponding information. Among them, the voltage control signal of the MEMS micromirror is output through the FPGA pin, and after DA (analog-to-digital conversion), it is input into the MEMS driver board to control the MEMS. The FPGA processes the duty cycle of the motor PWM to obtain the corresponding PWM waveform, which is output through the pin to the permanent magnet synchronous motor driver board to realize motor control. Ultimately, the permanent magnet synchronous motor and MEMS micromirror rotate to the position determined by the desired signal. When the desired reference signal changes according to a certain pattern, the permanent magnet synchronous motor and MEMS micromirror rotate accordingly, thereby realizing the scanning function.
[0051] Reference Figures 3 to 6 In some embodiments, the FPGA-based two-dimensional scanning mirror control method according to the present invention includes at least the following steps:
[0052] S100, obtaining a reference signal of an upper machine position, a position signal of the one-dimensional MEMS micromirror 310, and an encoder signal of the adjustment motor 410; wherein the encoder signal is input to a first processing core, and the position signal is input to a second processing core;
[0053] S200, the first processing core performs position loop calculation and speed loop calculation using a vector control algorithm to obtain a voltage signal required for driving the regulating motor 410;
[0054] S300, the second processing core obtains the voltage signal required to drive the one-dimensional MEMS micromirror 310 through the operation of the superhelix controller and the superhelix observer;
[0055] S400 , according to the driving signal output by the operation, driving the one-dimensional MEMS micromirror 310 and the adjustment motor 410 to perform a swing operation to perform a two-dimensional scanning task.
[0056] In one embodiment, see Figure 5The regulating motor 410 of the embodiment of the present invention is a permanent magnet synchronous motor, and the control method for the permanent magnet synchronous motor is a vector control method. Specifically, the control algorithm mainly adopts the PID control strategy. After the system position and posture are input, the reference q-axis current signal is obtained through the position loop and speed loop calculation. The motor adopts id=0 vector control. After the current loop calculation, the q-axis and d-axis current signals of the actual control input are obtained. After processing by the SVPWM module, six low-voltage control PWM (pulse width modulation) signals are obtained. The PWM signal is a control signal commonly used in the motor control process. After conversion by the driver board, the three-phase voltage signal actually required for motor drive can be obtained, that is, the voltage signal required to drive the regulating motor 410. The signal output by CPU0 is the duty cycle information of the six PWM signals.
[0057] See specifically Figure 5 The vector control algorithm employed in the present invention primarily comprises three components: a controller, a current acquisition component, and a position acquisition component. The reference signal REF and the position signal acquired by the encoder are input into the position loop regulator PI controller for computation. The computational result and the speed calculation (the encoder's speed feedback value) are then input into the speed loop regulator PI controller to obtain the calculated result. Current acquisition is performed to obtain the current three-phase current signals ia / ib / ic of the regulating motor 410. These three-phase currents are then converted to obtain the d-axis and q-axis current signals id / iq. The output of the speed regulation loop PI controller and the current signal iq are then input into the Q-axis current regulator PI controller to obtain the voltage signal Uq. After setting id = 0, the voltage signal Uq and the current signal id are then input into the D-axis current regulator PI controller to obtain the voltage signal Ud. After the voltage signals Uq and Ud are converted and processed by the SVPWM module, they are then processed by the inverter to obtain the drive signal for the regulating motor 410, which is used to control the swinging operation of the regulating motor 410 and achieve the scanning task.
[0058] In one embodiment, see Figure 6 In the embodiment of the present invention, a superhelical control method is primarily employed to control the one-dimensional MEMS micromirror 310, and a corresponding superhelical observer is designed to reduce noise in the feedback signal. The current deflection angle information fed back by the system is processed by the superhelical observer to obtain the observed deflection angle and velocity information. This information is then combined with the reference deflection angle and velocity information and calculated by the superhelical algorithm controller to obtain the input voltage amplitude for controlling the one-dimensional MEMS micromirror 310. This is the voltage signal required to drive the one-dimensional MEMS micromirror 310. The output signal from CPU 1 is the voltage signal amplitude of the MEMS micromirror.
[0059] See specifically Figure 6The present invention controls the one-dimensional MEMS micromirror 310 by: obtaining a reference deflection angle θ ref and the feedback deflection angle output by the super-helical observer To calculate the deflection angle estimation error e; the reference deflection angle and the feedback deflection angle are derived by the differentiator to obtain the angular velocity estimation error The deflection angle estimation error and the angular velocity estimation error are input into the super-helical controller to obtain the voltage signal u required to drive the one-dimensional MEMS micromirror 310 , thereby obtaining the current deflection angle θ of the one-dimensional MEMS micromirror 310 .
[0060] The two-dimensional scanning device 100 of the present invention has been applied to the tracking and aiming system platform. The platform consists of the developed two-dimensional scanning mirror device, a host computer and a camera. The host computer processes the visual image obtained by the monocular camera and calculates the spatial coordinates of the tracking target point. Through the coordinate position conversion, the deflection angle of the adjustment motor 410 and the one-dimensional MEMS micromirror 310 is obtained and input to the two-dimensional scanning mirror system, thereby achieving tracking of the target point. Its tracking effect can be seen in Figure 7 The image shows a short straight line. The laser points in the box are noise caused by the glass shell of the MEMS micromirror and the glass layer of the plane reflector. As you can see, the system achieves good tracking results.
[0061] It should be appreciated that the method steps in the embodiments of the present invention can be implemented or executed by computer hardware, a combination of hardware and software, or by computer instructions stored in a non-transitory computer-readable memory. The method can use standard programming techniques. Each program can be implemented in a high-level procedural or object-oriented programming language to communicate with the computer system. However, if desired, the program can be implemented in assembly or machine language. In any case, the language can be a compiled or interpreted language. In addition, for this purpose, the program can be run on a programmed application-specific integrated circuit.
[0062] Furthermore, the operations of the processes described herein may be performed in any suitable order unless otherwise indicated herein or otherwise clearly contradicted by the context. The processes described herein (or variations and / or combinations thereof) may be performed under the control of one or more computer systems configured with executable instructions and may be implemented as code (e.g., executable instructions, one or more computer programs, or one or more applications) that is executed collectively on one or more processors, by hardware, or a combination thereof. The computer program includes a plurality of instructions that can be executed by one or more processors.
[0063] Further, the method can be implemented in any type of computing platform that is operably connected to a suitable computer, including but not limited to a personal computer, a minicomputer, a mainframe, a workstation, a network or distributed computing environment, a separate or integrated computer platform, or in communication with a charged particle tool or other imaging device, etc. Various aspects of the present invention can be implemented as machine-readable code stored on a non-transitory storage medium or device, whether removable or integrated into a computing platform, such as a hard disk, an optical read and / or write storage medium, an RSM, a ROM, etc., so that it can be read by a programmable computer, and when the storage medium or device is read by the computer, it can be used to configure and operate the computer to perform the process described herein. In addition, the machine-readable code, or portions thereof, can be transmitted over a wired or wireless network. When such media includes instructions or programs that implement the steps described above in conjunction with a microprocessor or other data processor, the invention described herein includes these and other different types of non-transitory computer-readable storage media. When programmed according to the methods and techniques of the present invention, the present invention can also include the computer itself.
[0064] The computer program can be applied to input data to perform the functions described herein, thereby converting the input data to generate output data that is stored in a non-volatile memory. The output information can also be applied to one or more output devices such as a display. In a preferred embodiment of the present invention, the converted data represents a physical and tangible object, including a specific visual depiction of the physical and tangible object produced on the display.
[0065] The above description is merely a preferred embodiment of the present invention. The present invention is not limited to the aforementioned embodiments. As long as the technical effects of the present invention are achieved by the same means, any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention shall be included within the scope of protection of the present invention. Within the scope of protection of the present invention, various modifications and variations of the technical solutions and / or implementation methods are possible.
Claims
1. A two-dimensional scanning mirror control method based on FPGA, characterized in that: The two-dimensional scanning mirror includes a one-dimensional MEMS micromirror and a reflecting mirror controlled by an adjusting motor, and the control signals of the one-dimensional MEMS micromirror and the adjusting motor are output by the FPGA controller; The FPGA controller includes a first processing core and a second processing core; The method comprises the following steps: S100, obtaining a reference signal of an upper machine position, a position signal of the one-dimensional MEMS micromirror, and an encoder signal of the adjustment motor; wherein the encoder signal is input to a first processing core, and the position signal is input to a second processing core; S200, the first processing core performs position loop calculation and speed loop calculation using a vector control algorithm to obtain a voltage signal required for regulating the motor drive; S300, the second processing core obtains the voltage signal required for driving the one-dimensional MEMS micromirror through operations of the superhelix controller and the superhelix observer; S400 , according to the driving signal output by the calculation, driving the one-dimensional MEMS micromirror and the adjustment motor to perform a swing operation to perform a two-dimensional scanning task.
2. The method according to claim 1, characterized in that The FPGA controller transmits signals through a storage array.
3. The method according to claim 1, characterized in that The FPGA controller adopts AXI_GPIO interrupt mode and CPU interrupt mode.
4. The method according to claim 3, wherein: When the AXI_GPIO interrupt is triggered, the CPU interrupt of the first processing core is triggered, and then the CPU interrupt of the second processing core is triggered and the control algorithm operation of the one-dimensional MEMS micromirror is performed; after the control algorithm operation of the one-dimensional MEMS micromirror is completed, the first processing core executes the control operation of the regulating motor.
5. The method according to claim 1, wherein The vector control algorithm adopts the id=0 vector control algorithm.
6. The method according to claim 5, characterized in that The step S200 includes the following steps: S210, obtaining a reference signal of the regulating motor and a position signal collected by an encoder of the regulating motor, and inputting the signals into a position loop regulating PI device; S220, obtaining a speed feedback value of an encoder of the regulating motor, and inputting an output value of the position loop regulating PI device and the speed feedback value into a speed loop regulating PI device; S230, collecting the current three-phase current signal of the regulating motor to obtain the current signals of the d-axis and the q-axis; setting the current signal ID to 0; S240, inputting the q-axis current signal and the output value of the speed loop regulating PI device into the Q-axis current regulating PI device; inputting the d-axis current signal and the set current signal id into the D-axis current regulating PI device; S250 , inputting the output value of the Q-axis current regulating PI device and the output value of the D-axis current regulating PI device into an SVPWM module to obtain a driving signal for the regulating motor.
7. The method according to claim 1, characterized in that The step S300 includes the following steps: S310, obtaining a reference deflection angle and a feedback deflection angle output by the superhelical observer to calculate a deflection angle estimation error; S320, deriving the reference deflection angle and the feedback deflection angle through a differentiator to obtain an angular velocity estimation error; S330: Input the deflection angle estimation error and the angular velocity estimation error into the super-helical controller to obtain a voltage signal required for driving the one-dimensional MEMS micromirror. 8 . A computer-readable storage medium having program instructions stored thereon, wherein the program instructions are executed by a processor to implement the method according to claim 1 .
9. Two-dimensional scanning mirror control system based on FPGA, characterized in that: include: A computer device comprising the computer-readable storage medium according to claim 8.
Citation Information
Patent Citations
Two-dimensional micro-electro-mechanical system (MEMS) micro-mirror driving and controlling system and method
CN107450178A
Synchronizing scanning display with video
CN112204648A