A Phase Synchronization Method of MEMS Vibrator Drive Signal Based on FPGA
The phase synchronization of the MEMS galvanometer drive signal is realized through FPGA, and the DDS signal generator and phase accumulator technology are used to solve the jump problem caused by randomness in the synchronization process of the two-axis drive signal of the MEMS galvanometer, achieving signal continuity and Galvanometer stability.
Patent Information
- Application Number
- CN202211341060.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-10-30
- Publication Date
- 2024-09-27
- Estimated Expiration
- 2042-10-30
AI Technical Summary
The MEMS galvanometer has randomness in the phase synchronization process of the two-axis drive signals, which may cause the drive signal to jump, affect the normal working status of the galvanometer, and even damage the structure.
Use FPGA to implement the DDS signal generator, and control the PSW value through the phase accumulator to ensure that the fast axis and slow axis drive signals return to the initial phase at the same time when they are about to reach the initial phase. Use the high-speed processing characteristics of FPGA to perform phase synchronization and set phase synchronization. The window period is PSWmax/2n to ensure signal continuity.
It significantly improves the sudden change in the shape of the driving signal caused by phase synchronization, ensures the continuity of the signal, reduces the adverse effects on the MEMS galvanometer, and ensures the normal working condition of the galvanometer.
Smart Images

Figure CN115793515B
Abstract
Description
Technical field:
[0001] The invention relates to the field of micro-vibration mirror control, and in particular to a phase synchronization method of a MEMS vibration mirror driving signal based on FPGA. Background technology:
[0002] The development of the MEMS (Micro-Electro-Mechanical System) industry has had a significant impact on the fields of information, medical care, and space technology. In this context, many MEMS products have emerged. Among them, the MEMS galvanometer is a drivable micro-mirror made based on MEMS technology, and the mirror diameter is usually only a few millimeters. Compared with traditional optical scanning mirrors, it has the advantages of light weight, small size, easy mass production, and low production cost. It performs more prominently in terms of optical, mechanical properties, and power consumption, and has broad application prospects in high-definition projection, laser radar, 3D scanning, and other fields.
[0003] According to the driving principle, MEMS galvanometers can be divided into several types: electrostatic drive, electromagnetic drive, piezoelectric drive, and thermoelectric drive. The most common types are electrostatic drive and electromagnetic drive. Electrostatic drive uses the electrostatic attraction generated between charged conductors. This force acts on the mirror surface, and under the action of torque, it performs torsional motion; electromagnetic drive uses the Lorentz force to drive the mirror surface to twist. In its structure, the electromagnetically driven MEMS galvanometer is added with magnetic materials. The magnetic field generated by the current and the magnetic material interacts to generate electromagnetic force to cause the mirror surface to twist. Regardless of the driving method, a certain driving signal needs to be generated from the outside to obtain the torsional force required for vibration. From the working mode, MEMS galvanometers can be divided into two categories: resonant state and non-resonant state. The working frequency of the non-resonant state working mode can be adjusted freely, and can be adjusted in real time from zero to the inherent resonant frequency range of the micromirror structure; the resonant state working mode requires the MEMS galvanometer to work at the resonant frequency point. If the scanning frequency deviates from the resonant frequency point, the scanning angle will be greatly reduced, or even cannot work normally.
[0004] For a two-dimensional MEMS galvanometer, it can vibrate and scan in two mutually perpendicular directions, namely the X-axis (fast axis) and the Y-axis (slow axis). When both axes adopt the resonant working mode, the fast axis and slow axis of the MEMS galvanometer work within their respective frequency ranges. When the two axes vibrate at the same time, the vibration trajectory is Lissajous Figures, the shape of the trajectory depends on the frequency ratio, amplitude ratio and initial phase difference of the two-axis vibration. These three factors are determined by the driving signal that drives the micromirror to vibrate. Among them, the frequency and amplitude can be adjusted intuitively. When the initial phase difference of the two-axis driving signals is set, phase synchronization is required. Usually, the initial phases of the two-axis driving signals are pre-set separately, and then a moment is selected to reset the phases of the two signals to the initial phase at the same time to obtain a specific initial phase difference. Because the moment of phase synchronization is random, the driving signal may jump, thereby affecting the normal working state of the galvanometer and even damaging the galvanometer structure. Summary of the invention:
[0005] In view of the deficiencies in the prior art, the purpose of the present invention is to provide a phase synchronization method for a MEMS galvanometer drive signal based on FPGA. When setting the initial phase difference of the two-axis drive signals, the high-speed processing characteristics of the FPGA are utilized. When both the fast-axis drive signal and the slow-axis drive signal of the MEMS galvanometer are about to reach the initial phase, the two-axis drive signals return to the initial phase at the same time, so that the two-axis drive signals of the MEMS galvanometer are synchronized under the condition of relatively continuous phases, thereby obtaining a specific initial phase difference.
[0006] In order to achieve the above-mentioned object of the invention, the present invention adopts the following technical solutions:
[0007] A method for synchronizing a MEMS galvanometer drive signal based on FPGA, characterized by comprising the following steps:
[0008] a. Use FPGA to implement DDS signal generator to generate driving signal, store the periodic signal waveform in FPGA ROM. The depth of ROM is the number of sampling points in one cycle. There is a linear mapping relationship between ROM address and PSW. By controlling PSW, the signal in ROM can be read out cyclically.
[0009] b. The PSW is controlled by the phase accumulator, that is, at each rising edge of the clock, the PSW value increases by a frequency control word FSW (Frequency Setting Word). When the PSW value is greater than PSWmax, the PSW value returns to PSW-PSWmax, and the cycle continues. The PSW value is mapped to the ROM address, and the signal of the required frequency can be read. According to the DDS principle, the frequency f of the output signal can be obtained. out for
[0010]
[0011] where f clk is the operating clock frequency of DDS, FSW is the frequency control word, PSW max is the maximum phase control word;
[0012] Controlling the two-axis vibration of the MEMS galvanometer requires two ROMs in the above FPGA to generate driving signals, and the two ROMs are controlled by independent phase accumulators.
[0013] c. Perform phase synchronization on the two-axis drive signals of the MEMS galvanometer to obtain a specific initial phase difference, and obtain the initial phase of the two-axis drive signals from the initial phase difference of the two-axis drive signals. According to the mapping relationship, the initial phase control words of the two-axis drive signals are obtained. The initial phase control word of the fast-axis drive signal is represented by PSW1, and the initial phase control word of the slow-axis drive signal is represented by PSW2;
[0014] d. Set the phase synchronization window to PSW max / 2 n , n=0,1,2,3…;
[0015] e. When the PSW value of the fast axis drive signal is PSW1-PSW max / 2 n When the PSW value of the slow axis drive signal is at PSW2-PSWmax / 2, the fast axis synchronization enable signal sync_ready_out1 is pulled high. Similarly, when the PSW value of the slow axis drive signal is at PSW2-PSWmax / 2 n When PSW2 is reached, the slow axis synchronization enable signal sync_ready_out2 is pulled high;
[0016] f. Get the overlapped part of the two-axis synchronization enable signals,
[0017] sync_ready=sync_ready_out1&sync_ready_out2 (2)
[0018] Among them, sync_ready is the phase synchronization enable signal. The high level of sync_ready is valid, indicating that the phase synchronization operation can be performed. At the rising edge of the sync_ready signal, the PSW value of the fast axis is set to PSW1, and the PSW value of the slow axis is set to PSW2. At this point, the driving signal phases of the fast axis and the slow axis return to the initial phase at the same time, completing the phase synchronization operation.
[0019] In the above technical solution:
[0020] The driving signal is a voltage signal or a current signal used to drive the MEMS galvanometer to vibrate, including a fast-axis driving signal for driving the fast-axis vibration of the MEMS galvanometer, and a slow-axis driving signal for driving the slow-axis vibration of the MEMS galvanometer. Both axis driving signals are periodic signals, and their phases cycle periodically between 0 and 360 degrees.
[0021] The phase synchronization refers to making the fast axis driving signal and the slow axis driving signal of the MEMS galvanometer return to the initial phase at the same time, in order to obtain a specific initial phase difference. The initial phase can be set to any value between 0 and 360 degrees.
[0022] In the present invention, the phase of the signal at any time can be represented by PSW (Phase Setting Word). The phase and the phase control word have a linear mapping relationship. When the phase is 360 degrees, the maximum value of the phase control word PSW is max The window period of the driving signal phase synchronization is PSW max / 2 n (n=0,1,2,3…), when the value of n is larger, the phase value during phase synchronization is closer to the initial phase.
[0023] Set the initial phase of the fast axis drive signal to PSW1, and set the initial phase of the slow axis drive signal to PSW2. In order to ensure the continuity of the signal, the phase should be synchronized when the phase is about to reach the initial phase, and the phase value during synchronization should be as close to the initial phase as possible. max / 2 n When the phase value of the slow axis drive signal is between PSW2-PSW max / 2 n When the two axes are in the synchronous ready state at the same time, the phase synchronization operation is performed.
[0024] When n is equal to 0, the window period of the phase synchronization of the driving signal is any period of the entire signal cycle, which is equivalent to directly performing the phase synchronization operation. When the n value is larger, the phase value during phase synchronization is closer to the initial phase, the smaller the impact on signal continuity, but the waiting time to complete the phase synchronization operation is longer.
[0025] The advantages of the present invention are that the present invention can significantly improve the sudden change in shape of the driving signal caused by direct phase synchronization, ensure the continuity of the phase of the driving signal during phase synchronization, and reduce the adverse effects on the MEMS galvanometer during phase synchronization. Description of the drawings:
[0026] Figure 1 A schematic diagram of a phase accumulator according to an embodiment of the present invention;
[0027] Figure 2 This is a flow chart of a phase synchronization method according to an embodiment of the present invention;
[0028] Figure 3 A timing diagram of a phase control word and a synchronization enable signal according to an embodiment of the present invention; Specific implementation method:
[0029] The embodiments of the present invention are described in detail below.
[0030] The present invention is a method for synchronizing a MEMS galvanometer drive signal based on FPGA. In this embodiment, the drive signal is generated by using FPGA to implement a DDS (Direct Digital Synthesis) signal generator. First, the periodic signal waveform is stored in the ROM of the FPGA. The depth of the ROM is the number of sampling points in one cycle. There is a linear mapping relationship between the ROM address and the PSW. By controlling the PSW, the signal in the ROM can be read out cyclically.
[0031] like Figure 1 As shown, the PSW is controlled by the phase accumulator, that is, at each rising edge of the clock, the PSW value increases by one FSW (Frequency Setting Word). When the PSW value is greater than PSW max When PSW value returns to PSW-PSW max By mapping the PSW value to the ROM address, the signal of the required frequency can be read out. According to the DDS principle, the frequency f of the output signal can be obtained. out for
[0032]
[0033] where f clk is the working clock frequency of DDS, FSW is the frequency control word, PSW max is the maximum phase control word.
[0034] Controlling the two-axis vibration of the MEMS galvanometer requires the two ROMs to generate driving signals, and the two ROMs are controlled by independent phase accumulators.
[0035] The two-axis drive signals of the MEMS galvanometer are phase synchronized to obtain a specific initial phase difference. The steps are as follows: Figure 2 shown.
[0036] First, the initial phase of the two-axis drive signal is obtained from the initial phase difference of the two-axis drive signal, and the initial phase control word of the two-axis drive signal is obtained according to the mapping relationship. The initial phase control word of the fast axis drive signal is represented by PSW1, and the initial phase control word of the slow axis drive signal is represented by PSW2.
[0037] Furthermore, the phase synchronization window is set to PSW. max / 2 n(n=0,1,2,3…), where the larger the n value is, the smaller the window period is, which means that the phase value during phase synchronization is closer to the initial phase, and thus the impact on signal continuity is smaller. The adverse effect is that the chance of the window period of phase synchronization of the two axes overlapping becomes smaller, and the waiting time for phase synchronization becomes longer. When there is no requirement for synchronization time, a larger n value can be set at the beginning; when the synchronization time is more sensitive, the initial value of n can be determined based on two factors: the phase synchronization time of the signal and the continuity of the signal.
[0038] Furthermore, when the PSW value of the fast axis drive signal is between PSW1-PSW max / 2 n By PSW1, Figure 3 In the △t1 period, the fast axis synchronization enable signal sync_ready_out1 is pulled high; similarly, when the PSW value of the slow axis drive signal is at PSW2-PSW max / 2 n By PSW2, that is Figure 3 During the △t2 period, the slow-axis synchronization enable signal sync_ready_out2 is pulled high.
[0039] Furthermore, the overlapped part of the two-axis synchronization enable signals is obtained, that is, Figure 3 Middle △t time period.
[0040] sync_ready=sync_ready_out1&sync_ready_out2 (2)
[0041] Among them, sync_ready is the phase synchronization enable signal. The high level of sync_ready is effective, indicating that the phase synchronization operation can be performed. At the rising edge of the sync_ready signal, the PSW value of the fast axis is set to PSW1, and the PSW value of the slow axis is set to PSW2. At this point, the phases of the driving signals of the fast axis and the slow axis return to the initial phase at the same time, completing the phase synchronization operation.
[0042] The flowchart and schematic diagram in the accompanying drawings show the FPGA algorithm flow and functional system architecture of the embodiment of the present invention, wherein each box in the flowchart can represent a module, a program segment or a part of an instruction.
Claims
1. A synchronization method for MEMS galvanometer drive signals based on FPGA, Features The following steps are involved: a. Use FPGA to implement DDS signal generator to generate driving signal, store the periodic signal waveform in FPGA ROM. The depth of ROM is the number of sampling points in one cycle. There is a linear mapping relationship between ROM address and PSW. By controlling PSW, the signal in ROM can be read out cyclically. b. The PSW is controlled by the phase accumulator, that is, at each rising edge of the clock, the PSW value increases by a frequency control word FSW. When the PSW value is greater than PSWmax, the PSW value returns to PSW-PSWmax, and the cycle continues. The PSW value is mapped to the ROM address, and the signal of the required frequency can be read. According to the DDS principle, the frequency f of the output signal can be obtained. out for where f clk is the operating clock frequency of DDS, FSW is the frequency control word, PSW max is the maximum phase control word; Controlling the two-axis vibration of the MEMS galvanometer requires two ROMs in the above FPGA to generate drive signals, and the two ROMs are controlled by independent phase accumulators; c. Perform phase synchronization on the two-axis drive signals of the MEMS galvanometer to obtain a specific initial phase difference, and obtain the initial phase of the two-axis drive signals from the initial phase difference of the two-axis drive signals. According to the mapping relationship, the initial phase control words of the two-axis drive signals are obtained. The initial phase control word of the fast-axis drive signal is represented by PSW1, and the initial phase control word of the slow-axis drive signal is represented by PSW2; d. Set the phase synchronization window to PSW max / 2 n , n=0,1,2,3…; e. When the PSW value of the fast axis drive signal is PSW1-PSW max / 2 n When the PSW value of the slow axis drive signal is at PSW2-PSWmax / 2, the fast axis synchronization enable signal sync_ready_out1 is pulled high. Similarly, when the PSW value of the slow axis drive signal is at PSW2-PSWmax / 2 n When PSW2 is reached, the slow axis synchronization enable signal sync_ready_out2 is pulled high; f. Get the overlapped part of the two-axis synchronization enable signals, sync_ready=sync_ready_out1&sync_ready_out2 (2) Among them, sync_ready is the phase synchronization enable signal. The high level of sync_ready is valid, indicating that the phase synchronization operation can be performed. At the rising edge of the sync_ready signal, the PSW value of the fast axis is set to PSW1, and the PSW value of the slow axis is set to PSW2. At this point, the driving signal phases of the fast axis and the slow axis return to the initial phase at the same time, completing the phase synchronization operation.
