METHOD TO ESTIMATE PHASE AND AMPLITUDE FOR CONTROL OF A RESONANT MEMS MIRROR
20230234836 · 2023-07-27
Assignee
Inventors
Cpc classification
B81B7/008
PERFORMING OPERATIONS; TRANSPORTING
B81B2207/03
PERFORMING OPERATIONS; TRANSPORTING
G02B26/101
PHYSICS
B81B2201/042
PERFORMING OPERATIONS; TRANSPORTING
B81B3/0043
PERFORMING OPERATIONS; TRANSPORTING
International classification
B81B7/00
PERFORMING OPERATIONS; TRANSPORTING
B81B3/00
PERFORMING OPERATIONS; TRANSPORTING
Abstract
Techniques to be described herein are based upon the combination of a digital lock-in amplifier approach with a numerical method to yield accurate estimations of the amplitude and phase of a sense signal obtained from a movement sensor associated with a resonant MEMS device such as a MEMS mirror. The techniques described herein are efficient from a computational point of view, in a manner which is suitable for applications in which the implementing hardware is to follow size and power consumption constraints.
Claims
1. A method of operating a micro-electro mechanical systems (MEMS) device, comprising: driving the MEMS device with a drive signal; sensing movement of the MEMS device caused by the drive signal, and generating a sense signal indicative of the movement; using a rotation-matrix approach to generate a reference cosine wave and a reference sine wave, the reference cosine wave and reference sine wave each having an amplitude of 1 and a same frequency as that of the sense signal; multiplying the sense signal by the reference sine wave to produce a first product; multiplying the sense signal by the reference cosine wave to produce a second product; low-pass filtering the first product to produce a first intermediate output; low-pass filtering the second product to produce a second intermediate output; performing a 4-quadrant CORDIC technique on the first and second intermediate outputs to thereby determine a phase shift between the sense signal and the drive signal as well as an amplitude of the sense signal; comparing the phase shift to a target phase shift to produce a phase error as a difference therebetween; comparing the amplitude of the sense signal to a target amplitude to thereby produce an amplitude error as a difference therebetween; and modifying the drive signal based upon the phase error and the amplitude error so that the phase error and amplitude error are eliminated.
2. The method of claim 1, further comprising digitizing the sense signal prior to multiplication by the reference sine and cosine waves; and wherein the reference sine and cosine waves are generated in digital form.
3. The method of claim 1, wherein the low-pass filtering of the first product serves to remove intermodulation components from the reference sine wave; and wherein the low-pass filtering of the second product serves to remove intermodulation components from the reference cosine wave.
4. The method of claim 1, wherein the low-pass filtering of the first product is performed using a first decimation SINC filter; and wherein the low-pass filtering of the second product is performed using a second decimation SINC filter.
5. The method of claim 1, wherein performing the 4-quadrant CORDIC technique comprises: a) defining an index i having integer values ranging from 0 to N-1, with N being the total amount of CORDIC iterations; b) precalculating N angles θ.sub.i such that for each of the N angles, tan (θ.sub.i) = 2.sup.-i; c) determining a starting coordinate set X.sub.0, Y.sub.0 from the two SINC outputs (i.e. Y and X); d) If X>=0, setting Δθ=0 as a starting point, else if X<0, then if Y>0 setting Δθ = +180, else setting Δθ = -180. Also, rotating the starting X,Y coordinates by 180° by setting X=-X and Y=-Y; e) for a first number i=0 in the index, setting a next coordinate set X.sub.1, Y.sub.1 to be such that X.sub.1=X.sub.0-(Y.sub.0 >> 0) and Y.sub.1=Y.sub.0+(X.sub.0 >> 0) and determine a phase Δθ = Δθ - θ.sub.i if Y.sub.0 ≤ 0, but setting the next coordinate set X.sub.1,Y.sub.1 to be such that X.sub.1=X.sub.0+(Y.sub.0 >>0) and Y.sub.1=Y.sub.0-(X.sub.0 >>0)and determine the phase Δθ = Δθ + θ.sub.i, if Y.sub.0 > 0; f) incrementing i by one; g) for an ith number i in the index, setting a next coordinate set Xi, Yi to be such that X.sub.i+1=X.sub.i-(Y.sub.i >> i) and Y.sub.i+1=Y.sub.i+(X.sub.i >> i) and determine a phase Δθ = Δθ - θ.sub.i if Y.sub.i ≤ 0, but setting the next coordinate set X.sub.i+1,Y.sub.i+1 to be such that X.sub.i+i=X.sub.i+(Y.sub.i >>i) and Y.sub.i+1=Y.sub.i-(X.sub.i >>i)and determine the phase Δθ = Δθ + θ.sub.i, if Y.sub.i > 0; h) if i<N-1, return to f); and i) if i=N-1: determine the phase shift as being equal to the phase Δθ and determine the amplitude of the sense signal as being equal to K.Math.X.sub.N-1, being
6. The method of claim 1, wherein the rotation-matrix approach is performed by: a) defining an index i having integer values ranging from 0 to N-1, with N being the number of samples per reference cycle; b) determining a rotation amount as being equal to 360°/N and precalculating the (x_rot; y_rot)=(cos(360/N); sin(360/N)) rotation coordinates; c) determining a starting coordinate set X.sub.0, Y.sub.0 where x.sub.0 = cos (φ.sub.ref), y.sub.0 = sin (φ.sub.ref), with φ.sub.re.sub.f being equal to the initial phase shift for the reference waves; d) rotating the start coordinate set X.sub.0, Y.sub.0 by the rotation amount to produce a next coordinate set X.sub.1, Y.sub.1as X.sub.1 = X.sub.0 ▪ x.sub.rot - Y.sub.0 ▪ y.sub.rot and Y.sub.1 = X.sub.0 ▪ y.sub.rot + Y.sub.0 ▪ x.sub.rot; e) incrementing i by 1; f) rotate the coordinate set X.sub.1, Y.sub.1 by the rotation amount to produce an ith coordinate set X.sub.i, Y.sub.i as X.sub.i+1 = X.sub.i ▪ x.sub.rot - Y.sub.i ▪ y.sub.rot and Y.sub.i+1 = X.sub.i ▪ y.sub.rot + Y.sub.i ▪ x.sub.rot; g) if i<N-1, return to e); and h) if i=N-1, reset the index to 0, and start over from c).
7. A system for driving micro-electro mechanical systems (MEMS) device, the system comprising: a driver generating a drive signal for the MEMS device; a sensor associated with the MEMS device and generating an output indicative of movement of the MEMS device; an analog to digital converter digitizing the output of the sensor to produce a sense signal indicative of movement of the MEMS device; a reference generator using a rotation-matrix approach to generate a reference cosine wave and a reference sine wave based upon a frequency drive signal, the reference cosine wave and reference sine wave each having an amplitude of 1 and a same frequency as that of the sense signal; a processing circuit configured to: multiply the sense signal by the reference sine wave to produce a first product; multiply the sense signal by the reference cosine wave to produce a second product; low-pass filter the first product to produce a first intermediate output; low-pass filter the second product to produce a second intermediate output; and perform a 4-quadrant CORDIC technique on the first and second intermediate outputs to thereby determine a phase shift between the sense signal and the drive signal as well as an amplitude of the sense signal; a first error amplifier comparing the amplitude of the sense signal to a target amplitude to thereby produce an amplitude error as a difference therebetween; a second error amplifier comparing the phase shift to a target phase shift to produce a phase error as a difference therebetween; and controller circuitry causing modifying of the drive signal based upon the phase error and the amplitude error so that the phase error and amplitude error are eliminated.
8. The system of claim 7, wherein the controller circuitry comprises: a phase controller generating a control signal based upon the phase error; a programmable oscillator, generating the frequency drive signal based upon the control signal, the driver modifying phase of the drive signal based upon the frequency drive signal such that the phase error is eliminated; and an amplitude controller generating a voltage drive signal to the driver based upon the amplitude error, the driver modifying amplitude of the drive signal based upon the voltage drive signal such that the amplitude error is eliminated.
9. The system of claim 8, wherein the programmable oscillator comprises a phase locked loop (PLL).
10. The system of claim 7, wherein the processing circuit is an application specific integrated circuit (ASIC).
11. The system of claim 7, wherein the low-pass filtering of the first product performed by the processing circuit serves to remove intermodulation components from the reference sine wave; and wherein the low-pass filtering of the second product performed by the processing circuit serves to remove intermodulation components from the reference cosine wave.
12. The system of claim 7, wherein the low-pass filtering of the first product is performed by the processing circuit using a first decimation SINC filter; and wherein the low-pass filtering of the second product is performed by the processing circuit using a second decimation SINC filter.
13. The system of claim 7, wherein the processing circuit performs the 4-quadrant CORDIC technique by: a) defining an index i having integer values ranging from 0 to N-1, with N being the total amount of CORDIC iterations; b) precalculating N angles θ.sub.i such that for each of the N angles, tan (θ.sub.i) = 2.sup.-i; c) determining a starting coordinate set X.sub.0, Y.sub.0 from the two SINC outputs (i.e. Y and X); d) If X>=0, setting Δθ=0 as a starting point, else if X<0, then if Y>0 setting Δθ = +180, else setting Δθ = -180. Also, rotating the starting X,Y coordinates by 180° by setting X=-X and Y=-Y; e) for a first number i=0 in the index, setting a next coordinate set X.sub.1, Y.sub.1 to be such that X.sub.1=X.sub.0-(Y.sub.0 >> 0) and Y.sub.1=Y.sub.0+(X.sub.0 >> 0) and determine a phase Δθ = Δθ - θ.sub.i if Y.sub.0 ≤ 0, but setting the next coordinate set X.sub.1,Y.sub.1 to be such that X.sub.1=X.sub.0+(Y.sub.0 >> 0) and Y.sub.1=Y.sub.0-(X.sub.0 >>0)and determine the phase Δθ = Δθ + θ.sub.i, if Y.sub.0 > 0; f) incrementing i by one; g) for an ith number i in the index, setting a next coordinate set Xi, Yi to be such that X.sub.i+1=X.sub.i-(Y.sub.i >> i) and Y.sub.i+1=Y.sub.i+(X.sub.i >> i) and determine a phase Δθ = Δθ - θ.sub.i if Y.sub.i ≤ 0, but setting the next coordinate set X.sub.i+1,Y.sub.i+1 to be such that X.sub.i+1=X.sub.i+(Y.sub.i >>i) and Y.sub.i+1=Y.sub.i-(X.sub.i >>i)and determine the phase Δθ = Δθ + θ.sub.i, if Y.sub.i > 0; h) if i<N-1, return to f); and i) if i=N-1: determine the phase shift as being equal to the phase Δθ and determine the amplitude of the sense signal as being equal to K.Math.X.sub.N-1, being
14. The system of claim 7, wherein the processing circuit performs the rotation-matrix by: a) defining an index i having integer values ranging from 0 to N-1, with N being the number of samples per reference cycle; b) determining a rotation amount as being equal to 360°/N and precalculating the (x_rot; y_rot)=(cos(360/N); sin(360/N)) rotation coordinates; c) determining a starting coordinate set X.sub.0, Y.sub.0, where x.sub.0 = cos (φ.sub.ref), y.sub.0 = sin (φ.sub.ref), with φ.sub.ref being equal to theinitial phase shift for the reference waves; d) rotating the start coordinate set X.sub.0, Y.sub.0 by the rotation amount to produce a next coordinate set X.sub.1, Y.sub.1as X.sub.1 = X.sub.0 ▪ x.sub.rot - Y.sub.0 ▪ y.sub.rot and Y.sub.1 = X.sub.0 ▪ y.sub.rot + Y.sub.0 ▪ x.sub.rot; e) incrementing i by 1; f) rotate the coordinate set X.sub.1, Y.sub.1 by the rotation amount to produce an ith coordinate set X.sub.i, Y.sub.i as X.sub.i+1 = X.sub.i ▪ x.sub.rot - Y.sub.i ▪ y.sub.rot and Y.sub.i+1 = X.sub.i ▪ y.sub.rot + Y.sub.i ▪ x.sub.rot; g) if i<N-1, return to e); and h) if i=N-1, reset the index to 0, and start over from c).
15. A method of operating a micro-electro mechanical systems (MEMS) device, comprising: generating a reference cosine wave and a reference sine wave, the reference cosine wave and reference sine wave each having an amplitude of 1 and a same frequency as that of a sense signal indicative of movement of the MEMS device; multiplying the sense signal by the reference sine wave to produce a first product; multiplying the sense signal by the reference cosine wave to produce a second product; filtering the first product to produce a first intermediate output; filtering the second product to produce a second intermediate output; and performing a technique on the first and second intermediate outputs to thereby determine a phase shift between the sense signal and the drive signal as well as an amplitude of the sense signal; comparing the phase shift to a target phase shift to produce a phase error as a difference therebetween; comparing the amplitude of the sense signal to a target amplitude to thereby produce an amplitude error as a difference therebetween; and modifying a drive signal for the MEMS device based upon the phase error and the amplitude error so that the phase error and amplitude error are eliminated.
16. The method of claim 15, further comprising digitizing the sense signal prior to multiplication by the reference sine and cosine waves; and wherein the reference sine and cosine waves are generated in digital form.
17. The method of claim 15, wherein the filtering of the first product serves to remove intermodulation components from the reference sine wave; and wherein the filtering of the second product serves to remove intermodulation components from the reference cosine wave.
18. The method of claim 15, wherein the filtering of the first product is performed using a first decimation filter; and wherein the filtering of the second product is performed using a second decimation filter.
Description
BRIEF DESCRIPTION OF THE DRAWINGS
[0085]
[0086]
[0087]
[0088]
[0089]
[0090]
[0091]
[0092]
[0093]
[0094]
[0095]
[0096]
[0097]
[0098]
[0099]
[0100]
[0101]
[0102]
DETAILED DESCRIPTION
[0103] The following disclosure enables a person skilled in the art to make and use the subject matter disclosed herein. The general principles described herein may be applied to embodiments and applications other than those detailed above without departing from the spirit and scope of this disclosure. This disclosure is not intended to be limited to the embodiments shown, but is to be accorded the widest scope consistent with the principles and features disclosed or suggested herein.
[0104] Techniques to be described herein are based upon the combination of a digital lock-in amplifier approach with a numerical method to yield accurate estimations of the amplitude and phase of a sense signal obtained from a movement sensor associated with a resonant MEMS device such as a MEMS mirror. The techniques described herein are efficient from a computational point of view, in a manner which is suitable for applications in which the implementing hardware is to follow size and power consumption constraints.
[0105] First, the mathematical underpinnings of the techniques described herein will be discussed, and then the practical application and realization of those techniques will be discussed together with the uses thereof in real world applications to provide for accurate control of resonant MEMS mirrors using these techniques.
[0106] Illustrated in
[0107] Turn now to the example of
[0108] The mathematics yielding this result are now explained. The sense signal can be mathematically represented as:
[0109] Here, Asense is the amplitude of the sense signal, ω.sub.sense is the frequency of the sense signal, and φ.sub.sense is the phase of the sense signal.
[0110] The reference signal can be mathematically using the following two equations:
[0111] Here, Aref is the amplitude of the reference signal, ω.sub.ref is the frequency of the reference signal, and φ.sub.ref is the phase of the reference signal.
[0112] The results of multiplication of the sense signal by the reference signal yields x and y values, which can be mathematically represented as:
[0113] Here, Aref is the amplitude of the reference signal, Asense is the amplitude of the sense signal, ω.sub.ref is the frequency of the reference signal, φ.sub.sense is the phase of the sense signal, φ.sub.ref is the phase of the reference signal, and Δφ is the difference between φ.sub.sense and φ.sub.ref.
[0114] Therefore, as can be seen, the result includes expressions proportional to amplitude, as well as the phase shift, and an intermodulation product (ω.sub.ref .square-solid. t). The intermodulation product represents the oscillations seen in the product (demodulator output) shown in
[0115] Assuming that ω.sub.ref = ω.sub.sense and that Aref = 1, the average of y(t), denoted Y, as obtained using suitable low-pass filtering can be mathematically represented as:
[0116] Likewise assuming that ω.sub.ref = ω.sub.sense and that Aref = 1, the average of x(t), denoted X, as obtained using suitable low-pass filtering can be mathematically represented as:
[0117] From this, using simple math, the amplitude of the sense signal can be recovered as:
[0118] Similarly, the phase shift between the sense signal and reference signal can be recovered as:
[0119] Hardware for use in implementing the estimation of the phase and amplitude of the sense signal, and then using that estimation in operating a laser scanning projector 100, is now described with additional reference to
[0120] The laser scanning projector 100 includes a laser source 99 operated and driven by a laser driver 98 to emit a modulated laser beam at a resonant MEMS mirror 11 (e.g., micromirror). The MEMS mirror 11 is driven at resonance by a drive signal Drv generated by drive circuitry 12. A sensor 13, such as a piezoresistive based sensor, is used to generate a sense signal Sns in response to the movements of the MEMS mirror 11. A reference generator 97 generates reference signals for use by feedback circuitry 101. The feedback circuitry 101 receives the reference signals from the reference generator 97 and the sense signal Sns as input, and from them estimates the amplitude Asense of the sense signal and the phase shift Δφ of the sense signal.
[0121] A first error amplifier 22 compares the phase shift Δφ to a target phase shift φtarget to determine a phase error φerror. A phase controller 23 generates a new frequency setpoint to be used for tuning the driving frequency which may be generated from a fractional phase locked loop 24, in which case such tuning is achieved by changing the fractional input (PLLfrac). It is understood anyway that even though PLL circuitry is referred to herein, the driving frequency could also be generated by any controllable oscillator (such as a Voltage-Controlled Oscillator VCO).
[0122] The reference generator 97 receives the frequency signal Fdrive from the PLL 24 so that the frequency of the reference signals generated by the reference generator 97 matches the frequency of the drive signal Drv.
[0123] A second error amplifier 32 compares the amplitude Asense to an amplitude target Atarget to determine an amplitude error Aerror. An amplitude controller 33 generates a voltage signal Vdrive instruction the drive circuitry 12 at what amplitude to generate the drive signal Drv.
[0124] An analog to digital converter (ADC) 96 digitizes the sense signal Sns. The feedback circuitry 101 includes a first multiplication circuit 102 (e.g., a modulator) that receives the digitized sense signal Sns, which is mathematically represented as
[0125] Here, with sense(t) and below with the following equations and expressions, since the operations are performed in the digital domain, t = nT, with T being the sampling period and n being the index of the nth sample. The first multiplication circuit 102 also receives a digital reference sine wave from the reference generator 97, which is mathematically represented as:
[0126] The first multiplication circuit 12 multiplies these two signals to yield:
[0127] The expression x(t) is filtered by low-pass filter 103 within the feedback circuit 101 to produce X, mathematically represented as:
[0128] The feedback circuit 101 includes a second multiplication circuit 104 (e.g., a modulator) that receives the digitized sense signal sense(t), and also receives a digital reference cosine wave, the reference cosine wave being mathematically represented as:
[0129] The second multiplication circuit 104 multiplies these two signals to yield:
[0130] The expression y(t) is filtered by low-pass filter 105 within the feedback circuit 101 to produce Y, mathematically represented as:
[0131] X and Y are passed to an amplitude and phase estimation block 106 within the feedback circuit 101. The amplitude and phase estimation block 106 calculates the amplitude Asense and phase Δφ of the sense signal sense(t) as:
[0132] Generation of the reference signals x.sub.ref and y.sub.ref by the reference generator 97 is now described with initial reference to
[0133] Referring to
[0134] The amount of rotation to be performed at each step can be calculated as:
[0135] Therefore, knowing the amount of rotation per step and the initial phase-point P.sub.0 calculated as:
[0136] This allows the calculation of the phase shift at each rotation and its use to calculate the sine and cosine waves as:
[0137] It is to be understood that cos(φ.sub.rot) = x.sub.rot and sin(φ.sub.rot) = y.sub.rot, keeping in mind that φ.sub.rot is known as being φ.sub.rot = 360°/ODR, with ODR being 16 in this example. Therefore, using the known values of cos(φ.sub.rot) and sin(φ.sub.rot), and the known initial point P.sub.0(x.sub.0;y.sub.0), the data points used to form the sine and cosine waves shown in
[0138] Additionally, the precision of this technique for calculating the values of the reference sine and cosine waves is high. Consider that if the output data rate ODR were to be infinite, there would be an infinite number of values produced for the reference cosine and sine waves, and therefore such waves would precisely mathematically match actual-continuous waves. On the other hand, if a prior art technique such as the Taylor series were to be used, such precision could never be achieved, as Taylor series always produces an approximation.
[0139] The spectrum of the generated reference sine wave may be observed in
[0140] Shown in
[0141] Estimation of the phase Δφ by the feedback circuitry 101 is now described. As a reminder, the sense signal Sns can be mathematically represented as:
[0142] Here, OS.sub.sense is the offset that might appear as an additive term in the sense signal Sns.
[0143] As explained above, the generation of the reference cosine and sine reference signals undesirably includes harmonics due to both quantization and limited ODR. As a result, for example, the cosine reference signal can be mathematically represented as:
[0144] Here, the A′ref .square-solid. cos(2ω.sub.ref .square-solid. t + φ′.sub.ref) term and those following represent the harmonics present due to quantization. The calculation of y(t) then yields:
[0145] This yields the desired fundamental components of the sense signal Sns, namely the
and sin(Δφ) terms, but also undesired intermodulation products (the other terms) that arise due to the difference between ω.sub.sense and ω.sub.ref, 2ω.sub.ref, etc.
[0146] Similarly, the sine reference signal can be mathematically represented as:
[0147] The calculation of x(t) then yields:
[0148] Here too, this yields the desired fundamental components of the sense signal Sns, namely the
and cos(Δφ) terms, but also undesired intermodulation products (the other terms) that arise due to the difference between ω.sub.sense and ω.sub.ref, 2ω.sub.ref, etc.
[0149] The results of the multiplications may be seen for the sample of the cosine reference wave in
[0150] It is desired to cancel out these resulting intermodulation components in x(t) and (y). To do this, the low-pass filters 103 and 105 should have zeroes at harmonics in the reference signals, as shown in
[0151] The inputs x(t) and y(t) to the filters 103 and 105 can be observed in
[0152] After filtering, Y thus becomes:
[0153] From X and Y, Asense and Δφ can be recovered. This could be performed mathematically in the digital domain as:
[0154] This would be easily performable in the case where the amplitude and phase estimation block 106 are implemented in a microprocessor. However, consider the case where the amplitude and phase estimation block 106 is to be implemented in a small application specific integrated circuit (ASIC) with low-power consumption and small area constraints, with poor computational abilities. In such a case, the above calculations of Asense and Δφ cannot be easily performed without modifying the constraints of the ASIC.
[0155] The implementation of the functions of the amplitude and phase estimation block 106 utilizing techniques easily performable by a small ASIC with low-power consumption and small area constraints is now described.
[0156] Consider the COordinate Rotation DIgital Computer (CORDIC) technique, a simple and efficient technique that can be used to calculate trigonometric functions, hyperbolic functions, square roots, multiplications, divisions, exponentials, and logarithms, using only computationally un-intensive subtraction and shift operations of the implementing ASIC. The starting point for the application of CORDIC to amplitude and phase estimation is the rotation matrix M, which is mathematically equivalent to X and Y described above, and can be represented as:
[0157] Starting from the rotation matrix M, factorization by cos (Δφ) can be performed to yield:
[0158] The idea is to achieve Δφ through successive approximations obtained by a linear combination of N precalculated angles θ.sub.i, with the angles θ.sub.i being chosen such that their tangent values are powers of 2, such that tan (θ.sub.i) = 2.sup.-i. This reduces the matrix to a form where iterations can be calculated using shifts rather than multiplications.
[0159] Through this technique, Δφ is ultimately computed as:
where σ.sub.i is +1 or -1 depending upon the sign of the y.sub.i-1 component of the rotation vector at the previous iteration.
[0160] This would work well if:
[0161] However, for a 4-quadrant application, modifications are to be made.
[0162] Refer now to the trigonometric circle shown in
The angular distance between the vector P.sub.0 and the x-axis is the Δφ that it is desired to recover.
[0163] This is performed by successive approximation using the rotation matrix M. For example, for iteration i=1, P.sub.0 can be rotated by θ.sub.1 to reach P.sub.1, as shown in
[0164] This has been a series of approximated rotations by ±θ.sub.i, ±θ.sub.i+1, ±θ.sub.i+2, ±θ.sub.i+3, etc (with the actual signs of each rotation depending on the starting point as well as being decided at each iteration), up until the last point which will have approximately a 0 phase with an accuracy that depends on the number of iterations N (algorithmic error) and the fixed-point implementation. If these rotations are summed, the result will be a composition of angles that yield Δφ.
[0165] Thus, the technique has started with a vector that is Δφ degrees away from the x-axis, and at each iteration (±θ.sub.i, ±θ.sub.i+1, ±θ.sub.i+2, ±θ.sub.i+3, etc), the resulting phase becomes closer to 0. Thus, Δφ is approximated by summation of σ.sub.iθ.sub.i from 0 to N-1, with σ.sub.i being +1 or -1 dependent upon the y.sub.i-1 component of the rotation vector at the previous iteration, and with θ.sub.i being the rotation angle at each iteration. So, θ.sub.i is the angle whose tangent is 2.sup.-i. Thus, Δφ is recomposed by as the series of smaller angles that when combined together with the appropriate sign, with the rotations being performed with the tangents of those angles, which are powers of 2 as explained. Therefore, this becomes multiplications by powers of 2, which are implemented as shifts, and shifts as explained above are efficient in terms of computational complexity and are capable of being performed by simple ASICS.
[0166] The successive approximation can be summed up as follows: [0167] 1. The starting point is the X, Y coordinates from the outputs of the filters 103 and 105, mathematically represented as as explained above [0168] 2. If X>=0, set Δθ=0 and go to the next step. Instead, If X<0, then if Y>0 set Δθ = +180, else set Δθ = -180. Also, rotate the starting X,Y coordinates by 180° by setting X=-X and Y=-Y. [0169] 3. Start from Δθ.sub.i from step 2., and repeat from i=0 to N-1:
[0170] The phase contributions of the partial angles Δθ are recorded in a lookup table. The lookup table is used together with the starting point X, Y and the described operations are performed at each iteration. After an infinite number of iterations, the phase will be exactly at 0. It has been found that 12 to 18 iterations provide sufficient accuracy for the laser scanning projector 100.
[0171] After the last iteration, Δφ and A.sub.sense are determined as:
[0172] Using the above techniques, because the phase and amplitude (which is indicative of the opening angle of the MEMS mirror) are known upon commencement of operation, proper settings for Fdrive and Vdrive are quickly determined, making calibration quick and easy. Thus, in addition to reducing the computational complexity utilized for proper control of the MEMS mirror 11, lock time is decreased due to the quick determination of proper settings for Fdrive and Vdrive. Moreover, the amplitude and phase estimation are run in parallel and so are both control loops. Additionally, since the phase estimation is not limited by the resolution of the PLL counts, the above techniques are usable even with mirrors having a high resonance frequency, and in fact, are usable with any resonance MEMS device and are not limited to MEMS mirrors. Still further, the stability of the output provided here is more stable than would be provided by any analog control because analog lock-in amplifiers, though still implemented, suffer from technological and physical limitations (e.g., temperature deviation from the transistors used for demodulation, non-linearities, etc) which digital implementations are insensitive to. In addition the reference signal generation is reliable as it is based on using the same clock source as other components within the device.
[0173] The described functions and blocks of the feedback circuit 101 may be performed by a field programmable gate array (FPGA) or application specific integrated circuit (ASIC), for example.
[0174] Note that the above scheme permits precise control of the MEMS mirror 11 through the described hardware performing the described functions, and that the above scheme reduces the computational resources utilized to obtain precise control of the MEMS mirror 11 (e.g., reduces computational intensity of the functions performed that are used to precisely control the MEMS mirror 11).
[0175] Finally, it is clear that modifications and variations may be made to what has been described and illustrated herein, without thereby departing from the scope of this disclosure, as defined in the annexed claims.
[0176] While the disclosure has been described with respect to a limited number of embodiments, those skilled in the art, having benefit of this disclosure, will appreciate that other embodiments can be envisioned that do not depart from the scope of the disclosure as disclosed herein. Accordingly, the scope of the disclosure shall be limited only by the attached claims.