Font Size: a A A

Research On Stepping Motor Lens Control Based On Dynamic Programming

Posted on:2022-03-13Degree:MasterType:Thesis
Country:ChinaCandidate:Y L ZhouFull Text:PDF
GTID:2492306524496704Subject:Control Engineering
Abstract/Summary:PDF Full Text Request
With the continuous development of image recognition technology,identification of train station personnel,QR code payment,facial unlocking and other applications have greatly improved the efficiency of related work.As one of the key technologies for image acquisition,autofocus technology has always been a hot spot for scholars at home and abroad.There are many factors that can increase the speed and accuracy of autofocus.One aspect is to improve the response speed and control accuracy of the autofocus lens,in other words,to improve the response speed and control accuracy of the focus motor.Stepping motor(STM)is a single-step controllable motor driven by electric pulses.It has the advantages of low price,low noise,start-stop and reverse response,and is widely used in the manufacture of low-end lenses.This article focuses on how to improve the focusing speed and focusing accuracy of STM autofocus lenses.A focus stepping motor control algorithm based on dynamic programming is proposed,and a set of lens software and hardware systems are designed.The main work is as follows:(1)The basic structure of the autofocus lens and the working principle of the stepping motor are introduced,and a focus motor control algorithm based on the trapezoidal acceleration and deceleration curve is designed.The internal structure and focusing process of the autofocus lens are studied,and several typical stepping motor acceleration and deceleration curves are analyzed and compared.Aiming at the characteristics of more complex and high-precision focusing control,a displacement control algorithm based on trapezoidal curve is designed.The algorithm can give a sequence of speed changes according to different target displacements,which improves the flexibility of STM lens control.(2)The control problem of stepper motor is transformed into a kind of knapsack problem.Define the step number of each control cycle as the "speed" of the motor,select some combination of "speed",use the least number of control cycles to run to the target position,and get the fastest running curve.Use dynamic programming algorithm to search for pulse output sequence,construct different acceleration and deceleration curves as the constraint conditions of the search process,by adjusting the constraint conditions,the control of arbitrary acceleration and deceleration curves can be realized.A computer is used to search the pulse output table,the pseudo-code implementation is given,and the search examples based on the parabolic and S-shaped curves are given.(3)The software and hardware system of the autofocus lens is realized,the noise elimination problem of the manual focus rotary encoder is studied,and the firmware upgrade system is designed.Select MS41929 as the focus stepper motor drive chip,combined with the control algorithm proposed in this article,designed a stack structure stepper motor drive mode.A de-shake algorithm is designed using Gray code and state transfer mechanism to solve the noise problem of lens manual focus encoder.Use the STM32F103CBU6 chip as the main controller of the system,write the firmware upgrade system,and simulate the lens as a U disk,which is used for the firmware update of the lens,so as to obtain better performance in the future.(4)The parameter range of the lens focusing component was measured,and different control algorithms were used to conduct a focus and photograph comparison experiment.Use Tenengrad function to analyze the sharpness of the experimental photo group and count the focus time.Compared with the conventional open-loop control,the experimental results show that the algorithm proposed in this paper has higher performance.Compared with the conventional openloop control algorithm,the focus speed is increased by 10%,and the focus definition is greatly improved,which meets the requirements of autofocus lenses.
Keywords/Search Tags:Auto focus lens, stepper motor, dynamic programming, motor drive, acceleration and deceleration curve, Encoder jitter elimination
PDF Full Text Request
Related items