• No results found

Servo-control of binoculars’ lensusing MATLAB automatic Code Generation

N/A
N/A
Protected

Academic year: 2022

Share "Servo-control of binoculars’ lensusing MATLAB automatic Code Generation"

Copied!
98
0
0

Loading.... (view fulltext now)

Full text

(1)

IN

DEGREE PROJECT ELECTRICAL ENGINEERING, SECOND CYCLE, 30 CREDITS

STOCKHOLM SWEDEN 2016,

Servo-control of binoculars’ lens using MATLAB automatic Code Generation

MAXIME FERREIRA

(2)

Abstract

(3)

Abstract

Abstract

Thales optronique SAS is a company specialized in the design of optronics equipment and missile electronics for air, naval or terrestrial forces. Among their products, the Infrared Cameras such as SOPHIE – for a soldier – or CATHERINE – for a vehicle – are crucial tools for target identification, location and tracking among other surveillance applications. Amid all the functions gathered in these cameras1, the system coping with the optical and electronic zoom is the thesis purpose.

Previous works on the zoom system design involved the use of stepper-motors enabling a low cost of production and providing satisfactory results. However, if performances requirements tightened up – a more accurate system, a quicker zoom or a position feedback for instance –, the stepping technology would hit its limits. A new approach providing greater control performances with equivalent size and interfaces – for an easy integration – is required, thus, a DC-motors based system coupled with position feedback sensors is explored.

The introduction details the IR cameras’ functionality and current technology: their limits and the alternative are exposed in the Problem statement and the thesis’ objective along with the methodology to complete it. A system description gives an insight of the zoom feature, especially regarding the hardware used and the setup. The third chapter is dedicated to explaining the model used for simulations. A model-based controller design relies on the previously introduced model and constitutes the fourth chapter: its choice is justified and its tuning is explained. It is followed by the whole program implementation on the microcontroller:

Matlab Code Generation is introduced and used. Tests are done to validate the goals in the dedicated section, the last chapters discusses the results and their possible improvements. A conclusion goes over the previous chapters and puts them into perspective.

1 For instance, the SOPHIE camera from the XF family is mainly composed of a thermal detector associated to

(4)

Abstract

Thales optronique SAS är ett företag specialiserat på konstruktion av optronik utrustning och missil elektronik för luft, sjö- eller landstyrkor. Bland deras produkter finns IR Kameror som SOPHIE - för soldater - eller CATHERINE - för fordon - som är viktiga verktyg för målidentifiering, lokalisering och spårning. Denna rapporten fokuserar på den optiska och elektroniska zoomen i dessa system.

Tidigare arbeten på zoom systemdesign har använd stegmotorer som möjliggör en låg tillverkningskostnad och tillhandahåller tillfredsställande resultat. Men om prestandakraven skärps, t.ex. genom krav på en mer exakt och snabbare zoom eller lägesretur, sätter stegmotortekniken hårda begränsningar. En ny ansats som ger bättre reglerprestanda med samma storlek och gränssnitt som tidigare krävs. För detta ändamål studeras här användningen av DC motorer kombinerat med positionsåterkoppling från sensorer.

Introduktionen ger detaljer kring IR kameraets funktionalitet och nuvarande teknologi; deras begränsningar och alternativa lösningar diskuteras och målet med examensarbetet samt vald metodik redovisas. En systembeskrivning ger insyn i zoom egenskaper, speciellt gällande hårdvara och uppsätt. Det 3:e kapitlet omhandlar modellen som används för simuleringar. En modell baserad regulator, baserat på nämnda modell, presenteras i kapitel 4. Valet av regulator och inställningen av denna motiveras. Efter detta redogörs för implementeringen i en mikrokontroller och Matlabs kodgenerator introduceras och används. Tester görs för att validera målen med regleringen och det sista kapitlet diskuterar resultaten och föreslår möjliga förbättringar. Slutligen dras slutsatser av arbetet och resultaten sätts in i ett perspektiv.

(5)

Foreword

Foreword

I would like to offer thanks to the company THALES OPTRONIQUE SAS for hosting my Master Thesis, especially the SSA department and its manager Pierre-Henry DALLE for the warm welcome. I really appreciated the time within its premises.

In particular, I would like to thank Vincent GAUTHERON and Elling W JACOBSEN who supervised me and shared their expertise throughout the project. Also BIDAUT Nicolas, who gave much of his time to answer all of my questions over the Matlab Code Generation handling.

FERREIRA Maxime Elancourt, February, 2016

(6)

Foreword

(7)

Table of Contents

Table of Contents

Abstract ... 3

Foreword ... 5

Table of Contents ... 7

1. Introduction ... 9

1.1. Background ... 9

1.2. Problem statement ... 9

1.3. Objective ... 10

1.4. Overview ... 10

2. System description ... 11

2.1. Operational principle ... 11

2.2. Electronic and motor’s interfaces ... 12

2.3. Communicating tools ... 15

2.4. Zoom library’s outputs ... 16

2.5. Overview and setup ... 17

3. Model of the system ... 19

3.1. DC-motor ... 19

3.2. Encoder ... 22

3.3. Mechanical transmission ... 23

3.4. Final model ... 29

3.5. Microcontroller’s effects ... 31

4. Control design ... 33

4.1. Objectives ... 33

4.2. Sampling frequencies ... 34

4.3. Controller choice ... 36

4.4. Speed estimators ... 38

4.5. Controller tuning ... 42

4.6. Simulations ... 51

4.7. Antiwindup ... 63

5. Implementation ... 67

5.1. Tools ... 67

5.2. Motor’s interfaces and controller implementation ... 68

5.3. Communication interfaces ... 70

6. Tests and validation ... 71

6.1. Speed estimator choice ... 71

6.2. Position performances with a step input ... 73

(8)

Table of Contents

7. Unmodelled phenomenon ... 79

7.1. Voltage behavior ... 79

7.2. Simulation with a dead zone ... 80

8. Discussion ... 84

9. Conclusion ... 87

Recommendations ... 89

References ... 91

Appendix ... 93

(9)

1. Introduction

1.1.Background

The thesis has been carried out in Thales Optronique SAS’ premises, part of the Thales group, a multinational specialized in designing and building Electronic and Electrical systems for both military and civil purposes [1]. The site of Elancourt gathers all means for developing, integrating and testing optronics and missile electronics activities of Thales in France: among their main products, there are infrared cameras, also called IR cameras, and which are composed of different parts such as an IR detector, a laser range finder and a zoom system among others [2]. The latter feature is the thesis’ focus.

The functionality is made possible notably thanks to a mechatronic system based on the linear motion of two aligned lenses. The camera’s library – called zoom library here – provides several types of linear trajectories: the user can either quickly zoom in – or out – on a non-mobile target and lose its sight in the process; or slowly focus a mobile one while tracking it.

As an optical system, control requirements such as precision or overshoot are crucial for the user’s sake. As a military equipment, jolts and external disturbances can occur on board of vehicles and the product has to react as quickly as possible on the battlefield.

1.2.Problem statement

The current technology used by the company is based on two stepper-motors: they have limited precision, set by their step angle, and angular velocity, caused by their torque drop after a given velocity2, which results in a less attractive product on the market.

Also, as an open loop technology, they do not provide any position feedback which constitutes a hurdle to improve the robustness of the Infrared Cameras: there is a risk of position deviation which could alter the image quality.

A solution explored by the company is the use of two DC-motor based systems, each including a DC-motor and its magnetic encoder – an angular position sensor. Compared to the stepper- motor, the DC-motor’s torque-velocity behavior indicates that a higher velocity is achievable for a similar torque3 and above all, for the same size – crucial for an embedded product. The magnetic encoder’s resolution is much higher than the step angle, making possible a greater precision.

A position feedback enables a “continuous” control over the lens motion which would improve the IR camera’s robustness.

2 Example of stepper-motor in the appendix, Figure 73

3 Example of DC-motor in the appendix, Figure 75

(10)

1.3.Objective

The aim of this thesis is to design and implement a controller for this DC-motor based zoom feature: it should outperform the previous technology used by the company to prove its relevance. This thesis is a part of a wider scheme which consists in the design of a whole and new mechatronic system: a brand new zoom system, involving both the hardware and software part. Eventually, the new products should give the company an edge in the thermographic cameras military market.

1.4.Overview

Thanks to the work produced by a previous intern, the hardware part of the new zoom system already exists [3]: its description and handling is explained in the second chapter.

Based on both technical and theoretical documentation, a model of one half of the zoom system is established for reasons of symmetry. A model-based design follows, it enables simulations and makes possible an appropriate controller choice. It turns out that a velocity loop is needed and two different speed estimators are considered: one is simply based on a first order filter using Euler forward approximation to compute the velocity; the second one takes the time- derivative of a mathematical function representing the angular position in order to avoid the quantization effect produced by the rotary encoder.

A controller is designed according to the worst-case speed estimator with respect to the phase margins, that is to say the Euler approximation, and its tuning is detailed.

The implementation medium, the Matlab Code Generation, follows and is briefly explained:

from the software point of view, the motor’s interfaces are configured and the controller is adapted on the target.

A series of experiments is conducted on the system in order to evaluate the controller’s performances in accordance with the zoom objectives. The speed estimators’ feedback effect on the system is observed: one of them is chosen in order to fulfill the specifications.

The results are explained in the discussion parts, summarized in the conclusion and suggestions for future works are given in the recommendations.

(11)

2. System description

This second chapter provides a practical description of the zoom system in order to grasp its functioning. The first two sections introduce the zoom system and its hardware: they provide a starting point for the mathematical model inferred in chapter 3 and for the implementation requirements detailed in chapter 5. The third section specifies the means of communication used by the zoom system to receive inputs and to send measurements data. The type of inputs that are to be received correspond to positions or trajectories that have to be followed: they are described in the fourth section. The data sent contains information coming from the sensors or the microcontroller, which is of help for evaluating the zoom system’s control performances.

The fifth section puts together the different elements described in the previous sections and exposes the actual setup used for the different experiments.

2.1.Operational principle

The zoom system consists of two parts: the variator and the compensator. The former varies the magnifying power of the optical system, the latter ensures the focus during a zoom [4] [5]. Two aligned home-made lenses carriers are used: their positions and relative distances enable several fields of view4 – from narrow to wide – and different magnifications5. They also have to follow two kind of trajectories to make possible a quick or a continuous zoom (see section 2.4): the zoom library is the part processing the user’s inputs. Designed by the company, it selects the

4 Quantity of information coming from the observable world a detector can received: in the zoom system’s case, it is an angle of vision.

5 Ratio between the image size and the object size. If the magnification is higher than one, the image appears larger than the physical associated object.

Motor 1 Motor 2 Motor 1’s interface

Motor 2’s interface Motor 2’s mounting part Motor 1’s mounting part

Lens carrier 1 1

Lens carrier 2 2 Leadscrew 1

Leadscrew 2 Rail

Antibackslash nut 2

Figure 1 A 3D model of the moving part of a zoom system. 1: Variator; 2: Compensator

(12)

appropriate lens positions and trajectories according to modes – bytes – sent by the user, and should send them to the controller.

The DC motors enable the lens carriers’ linear motion thanks to two leadscrews and one rail.

Two bellows coupling are used to couple each motor’s shaft to each leadscrew: the latter are supported by two ball bearings. The rail guides and bears the two lens carriers.

Anti-backslash nuts are used in order to remove the backlash effect from the leadscrews thanks to a spring which constantly pushes the carrier on the thread.

The zoom system has two dedicated mechanical stops enabling to set the linear position origin of each lens carrier: this process will not be discussed in the thesis though.

Models of the DC-motors and of the mechanical transmission are inferred in section 3.1 and 3.3.

2.2.Electronic and motor’s interfaces

Each DC-motor integrates a rotary sensor in order to determine a single turn absolute value of the motor’s angular position. A magnetic encoder6 is employed: it is composed of a special shaft which basically has 𝑁𝑒𝑛𝑐𝑜𝑑𝑒𝑟_𝑟𝑒𝑠𝑜𝑙𝑢𝑡𝑖𝑜𝑛 magnets equally separated around it, and a combination of Hall sensors [6]. Each magnet creates a magnetic field, the Hall effect produces a voltage proportional to this field: if a hall sensor has a voltage peak, a magnet is in front of it and the encoder’s angular position can be deduced. The encoder’s shaft is connected to the motor’s, thus they share the same angular position. Two Hall sensors set 90° apart from one to another are used to determine the rotation’s direction and the absolute position: two square and quadratic signals are created as a result. Counting every signals’ edges improve the resolution by four:

𝑁𝑟𝑒𝑠𝑜𝑙𝑢𝑡𝑖𝑜𝑛 = 4𝑁𝑒𝑛𝑐𝑜𝑑𝑒𝑟_𝑟𝑒𝑠𝑜𝑙𝑢𝑡𝑖𝑜𝑛7 (1)

6 Example of a magnetic encoder in the appendix, Figure 74

7

Figure 2 Magnetic-encoder scheme. Adapted from electronicdesign [37]

(13)

The motors used are brushed micro motors – with the encoder option – from the constructor’s catalog8 with a sufficiently high rated torque. They are chosen for their sizes – as large as the previous stepper-motors –, their ability to overcome the friction and their response time high enough to follow the desired position references.

A DC-motor is controlled through a voltage input which acts on its angular velocity: an analog input is required. However, a microcontroller is used to process and control the system, it only uses numerical signals. In order to transform a numerical signal into an analog, a Pulse-Width Modulation command signal is used.

To sum-up its functioning, a square signal running at 𝑓𝑃𝑊𝑀 with a modulated width is sent to a switching system called H-bridge which links the motor’s input either to the ground or to its DC power supply.

The larger the square’s width, the higher the motor’s voltage input: the ratio between the actual square width 𝑇𝑝𝑤𝑚_𝑤𝑖𝑑𝑡ℎand the signal period 𝑇𝑃𝑊𝑀 is called the duty cycle and is expressed in percentage:

𝐷𝑝𝑤𝑚 =𝑇𝑝𝑤𝑚𝑤𝑖𝑑𝑡ℎ

𝑇𝑃𝑊𝑀 × 100 % (2)

Basically, the resulting continuous voltage coming out of the H-bridge is a mean of the PWM signal from the motor’s point of view, acting as a filter when 𝑇𝑃𝑊𝑀 is high enough:

𝑈𝑀2≈ 𝐷𝑝𝑤𝑚

100 𝑈𝐷𝐶−𝑠𝑢𝑝𝑝𝑙𝑦 (3)

8 Example of a DC micromotor in the appendix, Figure 75

Figure 3 PWM and H-bridge functioning. Adapted from “Autocodage d’une commande zoom” [3]

𝑈𝑀2

𝐼𝑀2 𝑈𝐷𝐶−𝑠𝑢𝑝𝑝𝑙𝑦

(14)

The H-bridge used is a Dual H-bridge DC motor driver9 which is able to drive 2 brushed DC motors. Its configuration is such that there is a hard current limitation of 2 𝐴 in the motors’

windings, which is roughly equal the motors’ thermal limits.

The processing unit used belongs to the Texas InstrumentTM’s microcontroller sets [7]. As such, it has integrated modules which make it able to produce PWM signals, with its dedicated ePWM module, or process encoders’ signals, with its eQEP module. These modules are configured through the microcontroller’s corresponding registers, this part is addressed in chapter 5. These microcontrollers combine great performances, possess a large number of GPIOs – General Purpose Input Output – and communicating modules, and they also have a great synergy with the implementing tool that is used (see section 5.1).

9

Figure 4 Dual H-brige scheme. Adapted from TI [38]

Figure 5 Microcontroller's features belonging to the same set of microcontrollers, adapted from TI [7]

(15)

2.3.Communicating tools

Two means of communication between the microcontroller and the debugging PC – called supervisor – are employed: the I2C – Inter-integrated Circuit [8] – and the SC [9] – Serial Communication.

The I2C consists of 2 wires, a data line called SDA and a clock line called SCL: this external clock signal enables a synchronous communication without specifying the clock on both devices. Here it is essentially used to send bytes, corresponding to modes, to the library’s program running within the microcontroller. Depending on the mode sent by the user, the embedded zoom library translates them into different positions and trajectories references sent to the controller.

The Serial Communication – using the RS232 standard more precisely – is an asynchronous tool for communication: it relies on two wires as well, one for the data transmission called Tx and the other for the data reception called Rx. The absence of an external clock signal requires an extra software layer has to enable the data exchange which results in lower baud rates10, and only two devices can communicate with this means. However, a full-duplex communication is possible with 2 I/O ports. The SC’s purpose in the thesis is to – only – transmit measurements to the supervisor. They are mainly composed of the microcontroller’s time, the sensor’s position and sometimes the estimated motor’s angular velocity or the output voltage, both computed within the microcontroller. Such way of communication has an extreme computational cost since it continuously sends multiple floating numbers. As a result, the position and the time are often the only one to be output during the experiments.

10 Number of bits per seconds

(16)

2.4.Zoom library’s outputs

The zoom library is a function belonging to the zoom system’s microcontroller that converts a byte received from the I2C communicating channel – called mode – into two positions and a trajectory reference. The mode determines where the lens should be and how they should reach their final positions.

The focus is set on the latter, that is to say the two types of position trajectories the lens should follow, which sets the inputs for the control design study.

Both trajectories can be seen below:

The initial and final positions change depending on the mode sent to the library and the current position of the lens carriers.

A position reference can be a step input. It is used in particular for non-moving targets and if the user wants the narrow or wide field zoom completed as fast as possible.

Another position reference can be a continuous zoom. Its purpose is to focus a target without losing track of it in the process. It achieves the same “zoom” though eventually. It consists in a series of small step inputs and runs at 𝑓𝑙𝑖𝑏𝑟𝑎𝑟𝑦 to provide the eye a smooth tracking: it sets the position’s cutoff frequency criterion (see section 4.1 for more details about the control criteria).

Figure 6 Type of references computed by the zoom library and sent to the controller Step input

Continuous input

(17)

2.5.Overview and setup

A quick recapitulation of the zoom system’s components and interactions is given below: the actual setup is introduced to make the reader aware of the technical context.

The first zoom board prototype of the DC-motor-based zoom system prototype is divided into two main parts: the microcontroller and the dual H-bridge.

 The microcontroller part is mounted on an experimenter kit provided by TI11: it is used as an interface between the microcontroller and the rest of the electronic devices to easily access its GPIO (General Purpose Input Output), PWM and encoder’s signals. It also enables the supervisor to communicate with the chip, via the serial communication and the I2C, and to upload the program. The whole formed by the experimenter kit and the microcontroller is called the Demo board.

 The dual H-bridge part is mounted on an interfacing board called Power board. Apart from its dual H-bridge function, the Power board is essentially used as a bridge between the motors and the microcontrollers.

The program is loaded through the USB cable connected to the Demo board via CCSV5 – Code Composer Studio V5.

The Demo board is supplied through the USB-cable and the Power Board with the regulated power supply.

Once loaded, the program sends PWM signals to the dual H-Bridge which supplies the motors in accordance with the microcontroller’s ePWM. Both the motor’s supply – input – and the encoder’s data – output – are transferred through the motor’s cable. The microcontroller’s eQEP modules retrieves the positions data with it.

The I2C communication is done by way of a I2C Host Adapter [10] and is configured as a Master.

The serial communication can be achieved either via the FTDI 3V3 USB to TTL cable, or directly with the USB loading cable connected to the experimenter kit.

11 Example of an experimenter kit [39]

Command part

Modes

I2C Zoom Board

Lens carrier

Antibackslash nut Leadscrew

DC-motor + encoder Motor’s

support

Operating part

Supervisor via

a PC or

the camera’s program

I2C

Modes State flags Instrumentation

SCI

Figure 7 Final version of the zoom system

Rail Zoom board

Microcontroller (interfaces processing modules, zoom library, controller)

Dual H-Bridge

Connectors (Power supply, motors, encoders, I2C, SCI)

(18)

The whole setup with the demo board is visible on Figure 8. Beside, a second – and home-made – zoom board prototype has been designed to integrate both the dual H-bridge and the microcontroller since its purpose is to fit in an IR camera eventually. It has a current-limitation that is translated into a voltage saturation of 𝑈𝑚𝑎𝑥 (see voltage criterion in section 4.1).The corresponding setup is available in the appendix – see Figure 76 in the Appendix.

This chapter has introduced the hardware and interfaces featuring in the zoom system, as well as the type of trajectories that need to be followed by each lens carriers.

Based on this description, a model of the zoom system is detailed in chapter 3 which enables the model-based control design.

The types of input trajectories partially determine the control specifications (see section 4.1), which guides the control design.

The interfaces mentioned in the first three sections set a technical requirement for the implementation (see chapter 5), which is a necessary conditions for the experiments.

12V regulated power supply

Figure 8 Demo board setup

Other regulated power supply

ZOOM system’s platform ZOOM system’s mechanical

Aardvark I2C/SPI Host Adapter

Test and power board

(H-bridge, Temperature, Pressure, Motors’ connectors) Flat cable 14pts SPI/ADC Flat cable 14pts ePWM/

GPIO 65-71 Flat cable 10pts eQEP/ADC

DC motor

Demo board:

TMS320 Experimenter Kit FTDI 3V3 USB to

TTL for SCI

A mechanical stop

(19)

3. Model of the system

This part provides a mathematical model of the actuators, sensors and the mechanical transmission mentioned in chapter 2. Due to the complete symmetry of the zoom system, only one half of it is modelled.

The first section deals with the DC-motor’s model. A linear model is considered at first but saturations mentioned in the constructor’s datasheet are added: the motor’s friction is taken into account in section 3.

The second section models the quantization of the sensor.

The third section determines a mathematical model of the mechanical transmission, which represents the main source of friction in the zoom system. Based on a previous work [11] and the friction models recapitulated in the sub-section 3.3.1, a complex model of the transmission is inferred. Adapting the previous work to the zoom system leads to a great deal of simplification, which is explained in sub-sections 3.3.3 and 3.3.4.

The fourth section summarizes the different models and gathers them in a single Simulink diagram of the zoom system.

The fifth section considers the issues produced by the microcontroller processing, in particular the computational delay, and adds them to the zoom system model.

3.1.DC-motor

After reminding the DC-motor’s working principle, its linear model is presented. The second subsection introduces nonlinearities in the model through signal saturations, the motor’s friction is dealt with in section 3.3 along with the transmission friction.

3.1.1.LINEAR DC-MOTOR

Its working principle can be briefly described as follow (see Figure 9): a DC motor is composed of a stator and a rotor like every other kind of motors. The stator uses a permanent magnet and the rotor is made of an armature – windings – and commutator segments enabling the current to flow in the reverse direction.

The stator’s magnetic field and the current flowing in the rotor’s armature create the Lorentz Force. This force makes the rotor move halfway: the commutation completes the rotation, and so on [12].

Let us call the motor involved 𝑀2.

The rotor has a resistance 𝑅𝑀2 and an inductance 𝐿𝑀2. From electrical and mechanical laws [12], it can be inferred an electromotive force proportional to the rotor’s angular velocity 𝜔𝑀2 (𝐸𝑀2 = 𝐾𝑒𝑀2𝜔𝑀2)

(20)

From Figure 10 the electrical equation is:

𝑈𝑀2 = 𝑅𝑀2𝐼𝑀2+ 𝐿𝑀2𝑑𝐼𝑀2

𝑑𝑡 + 𝐾𝑒𝑀2𝜔𝑀2 with 𝐼𝑀2(0) = 0 𝐴 (4) From Euler-Newton’s law of motion applied to the load less and linear DC , it yields:

𝐽𝑀2𝑑𝜔𝑀2

𝑑𝑡 = 𝐾𝑐𝑀2𝐼𝑀2 with 𝜔𝑀2(0) = 0 𝑟𝑎𝑑. 𝑠−1 (5) where 𝐽𝑀2 is the rotor’s inertia and 𝐾𝑐𝑀2 = 𝐾𝑒𝑀2 (4)

The initial angular position 𝜃𝑀2(0) starts at 0 𝑟𝑎𝑑 (𝜔𝑀2=𝑑𝜃𝑀2

𝑑𝑡 )

Using Laplace operator, a first Simulink model of the DC motor can be drawn from (4) and (5) (see Figure 11).

Figure 9 DC-motor functioning illustration. Adapted from electrical4u [40]

𝐿𝑀2 𝐿𝑀2

𝑅𝑀2 𝑅𝑀2

𝐸𝑀2= 𝐾𝑒𝑀2𝜔𝑀2 𝐸𝑀2= 𝐾𝑒𝑀2𝜔𝑀2

𝑈𝑀2

𝑈𝑀2 𝐼𝑀2

𝐼𝑀2

Figure 10 DC-motor electrical schematic

(21)

3.1.2.SATURATIONS

According to the constructor’s datasheet12, the motor suffers from several saturations depending on the voltage nominal value 𝑈𝐷𝐶−𝑠𝑢𝑝𝑝𝑙𝑦 (see Figure 3). Different values are available for each saturation, for instance the torque can either be saturated by its rated value or its stall value.

Table 1 DC-motor saturations

𝜔𝑀2∈ [−𝜔𝑀2𝑚𝑎𝑥, 𝜔𝑀2𝑚𝑎𝑥] Rated value for continuous operation

𝐼𝑀2 ∈ [−𝐼𝑀2𝑚𝑎𝑥, 𝐼𝑀2𝑚𝑎𝑥] Rated value for continuous operation (thermal limit), corresponds to the PWM’s current limitation

𝑇𝑀2∈ [−𝑇𝑀2𝑚𝑎𝑥, 𝑇𝑀2𝑚𝑎𝑥] Stall torque

𝐴𝑐𝑐𝑀2 ∈ [−𝐴𝑐𝑐𝑀2𝑚𝑎𝑥, 𝐴𝑐𝑐𝑀2𝑚𝑎𝑥] Maximum, only one value provided

The velocity’s maximum value is either its no-load value, its maximum value or its rated value:

they are quite close and they are not to be reached in any case since a speed limitation far from their values is set. The rated value is chosen by default.

The highest torque value is reached at start, it decreases until reaching a rated value during a constant rotation. It is natural to choose the starting torque as a limit, but an eye has to be kept on the torque rated value during simulations though.

Also, the smallest value between the current saturation and the torque’s happens to be the former. The latter could be removed since it has no mathematical impact but is kept for clarity.

12 The motor example datasheet is available in the appendix, Figure 75

T_M2

T_M2

Figure 11 Linear DC-motor Simulink diagram

(22)

From Table 1, an updated Simulink model can be introduced:

Note that the motor’s inner angular velocity saturation is included in the integrator.

This provides a frictionless model of the actuator. Models of the position sensor and the mechanical transmission – along with the overall friction – need to complete this one in order to design and simulate a controller for the zoom system.

3.2.Encoder

The encoder’s block models the encoder’s quantization effect. It basically translates the position, expressed in radian, in encoder’s steps – according to the encoder’s resolution.

It takes the previous value of the number of encoder’s steps with a floor function –the speed value is positive – to model the quantization effect on the position (see Figure 14).

The position is translated back to radian to be handled by the controller – working in radian.

A sign function has not been used to treat the change in rotation direction. The position references and the control objectives described in section 4.1 ensure that motor rotation direction should rarely vary during an experiment. Also, numerical problems occur with a sign function and the encoder’s resolution is high enough to reduce this impact on the position estimation.

The encoder’s noise has not been observed so it has not been modelled.

T_M2 T_M2_sat

Figure 12 DC-motor Simulink diagram with saturations

Figure 13 Encoder’s block using a floor function – positive angular velocity case.

𝜃𝑖𝑛𝑐_𝑀2 𝜃𝑀2

(23)

3.3.Mechanical transmission

After a brief description of the transmission, a recapitulation of common friction models is given: it enables to understand a transmission model derived by Orang Vahid Araghi’s work [11]. Adapting this comprehensive model to the zoom system’s prototype leads to a simplified model gathering the transmission and the actuator: indeed, slightly differences in the friction models and the working context give birth to an easy-to-simulate model on which linear control theory can be applied as long as nonlinearities, mainly made of saturations, are not hit.

The mechanical part coupled with the motor’s shaft is composed of the leadscrew, the bellows coupling between the motor’s shaft and the screw, and the nut. The nut is translated of a screw thread (𝑝𝑡ℎ𝑟𝑒𝑎𝑑 mm) for each motor’s rotation, but the working unit is in radian so it will not be used in simulation eventually – only in the implementation.

Nut Nut

Motor and its shaft

Leadscrew

Lens carrier

Ball bearing 1 Ball bearing 2

Bellows coupling

Screw thread of 𝑝𝑀2

Rail 𝑝

Figure 15 Zoom system's mechanical part illustration

Figure 14 Quantization with a floor function (encoder resolution of 10 encoder’s steps in this example)

(24)

3.3.1.FRICTION MODELS

Friction is involved in the ball-bearings, the leadscrew-nut system, the rail and the DC-motor.

Depending on the field of study, numerous friction models have been investigated in the literature, those relevant here focus on the effect of friction in a dynamical system. The most common approximated friction is given by [11]:

𝐹𝑓 = 𝜇(𝑣)𝑁𝑠𝑔𝑛(𝑣) (6)

Where 𝐹𝑓 is the friction force, 𝑣 is the relative sliding velocity, 𝜇(𝑣) is the velocity-dependent coefficient of friction, and 𝑁 is the normal force pressing two sliding surfaces together.

Coulomb friction is a simple way to model the friction, the friction is constant whatever the velocity. A more accurate model considers different the Coulomb friction’s value depending on the velocity’s sign.

This model is accurate for systems operating at relatively high and constant speeds.

The viscous friction models a friction proportional to the velocity, it is involved when an object is moving in a fluid or when two lubricated objects are in contact: depending on the lubrication level, it follows a Stribeck law [13].

The static friction completes the Coulomb’s friction by taking into account the behavior around zero. The system does not move (𝑣 = 0) until the static friction is overcome, then the friction decreases until it equals the Coulomb friction. It has a great effect in systems which often change directions or move at very low speeds [14] [15].

Coulomb friction

Coulomb friction +

Viscous friction

Coulomb friction

Coulomb friction +

Viscous friction +

Static friction

Coulomb friction +

Stribeck friction 𝑣

𝜔

𝐹𝑓𝑜𝑟 𝜇

𝑣 𝜔

𝐹𝑓𝑜𝑟 𝜇

𝑇𝑓

𝑣

𝐹𝑓𝑜𝑟 𝜇

𝑇𝑓

𝑣

𝑣

𝜔 𝐹𝑓𝑜𝑟 𝜇

𝑇𝑓

Figure 16 Most common friction or coefficient (6) of friction models. Adapted from [36]

(25)

Resulting from the static and Coulomb friction and the motor’s inner nonlinearities, a voltage dead zone exists within the DC motor [15]. Due to its mixed nature, it is a very difficult parameter to estimate and will not be theoretically computed in this thesis.

3.3.2.MECHANICAL MODEL

In Orang Vahid Araghi’s work over Friction-induced Vibration In Lead Screw Systems [11], a similar leadscrew system is translated into geometric and dynamical equations thanks to Newton-Euler’s equations applied to the leadscrew and to the nut – including the lens-carrier:

Geometric equations:

𝑥𝑛𝑢𝑡 = 𝑟𝑚tan(𝜆) 𝜃 (7)

Where 𝑥𝑛𝑢𝑡 is the linear position of the nut; 𝑟𝑚 is the leadscrew’s pitch circle radius;

𝜆 ∈]0, 𝜋/2 [ is the leadscrew’s pitch angle; 𝜃 is the leadscrew’s angular position.

From the dynamic equations of motion – anti-backlash nut’s dynamical effects neglected – it yields:

𝐽𝑡𝑜𝑡′𝜃̈ = 𝑇𝑏𝑒𝑙𝑙𝑜𝑤+ 𝑇𝑓𝑏𝑒𝑎𝑟𝑖𝑛𝑔𝑠+ 𝑇𝑓𝑟𝑎𝑖𝑙 where

(8)

𝐽𝑡𝑜𝑡′ = 𝐽𝑙𝑒𝑎𝑑𝑠𝑐𝑟𝑒𝑤− 𝑟𝑚tan(𝜆) 𝜉𝑀𝑛𝑢𝑡 𝑇𝑏𝑒𝑙𝑙𝑜𝑤 = 𝑘𝑏𝑒𝑙𝑙𝑜𝑤𝑠(𝜃𝑀2− 𝜃)

𝑇𝑓𝑏𝑒𝑎𝑟𝑖𝑛𝑔𝑠 = −𝑓𝑏𝑒𝑎𝑟𝑖𝑛𝑔𝑠𝜃̇ − 𝑇𝑏𝑒𝑎𝑟𝑖𝑛𝑔𝑠𝑓𝑠𝑔𝑛(𝜃̇) 𝑇𝑓𝑟𝑎𝑖𝑙 = 𝜉𝐹𝑟𝑎𝑖𝑙𝑓 𝑠𝑔𝑛(𝜃̇)

Figure 17 Deadzone non-linearity

(26)

𝜉 = 𝑟𝑚 𝜇𝑠 − tan(𝜆) 1 + 𝜇𝑠tan(𝜆)

(9)

𝜇𝑠 = 𝜇. 𝑠𝑔𝑛(𝜃̇𝑁) (10)

𝑁 = −𝐹𝑟𝑎𝑖𝑙𝑓 𝑠𝑔𝑛(𝜃̇)𝐽𝑙𝑒𝑎𝑑𝑠𝑐𝑟𝑒𝑤+ 𝑀𝑛𝑢𝑡𝑟𝑚tan (𝜆)(𝑇𝑏𝑒𝑙𝑙𝑜𝑤+ 𝑇𝑓𝑏𝑒𝑎𝑟𝑖𝑛𝑔𝑠) (cos(𝜆) + 𝜇𝑠sin(𝜆))𝐽𝑡𝑜𝑡′

(11)

Where 𝜃𝑀2 is the motor’s angular position; 𝐽𝑙𝑒𝑎𝑑𝑠𝑐𝑟𝑒𝑤 is the leadscrew’s inertia; 𝑀𝑛𝑢𝑡 is the system {nut,lens carrier}’s mass; 𝑘𝑏𝑒𝑙𝑙𝑜𝑤𝑠 is the bellows coupling torsion coefficient; 𝑓𝑏𝑒𝑎𝑟𝑖𝑛𝑔𝑠 is the ball-bearings’ viscous coefficient; 𝑇𝑏𝑒𝑎𝑟𝑖𝑛𝑔𝑠𝑓 and 𝐹𝑟𝑎𝑖𝑙𝑓 are respectively the ball-bearings’

and the rail’s friction; N is the normal force the nut applies to the leadscrew’s thread and is linked to the leadscrew’s friction force according to (6) with 𝜇 the friction coefficient.

This model is highly nonlinear and would require much effort to simulate and nonlinear theory to determine an appropriate controller. Hopefully, appropriate simplifications can be done to get the transmission model closer to a linear model, easier to control.

3.3.3.FRICTION AND MODELS SIMPLIFICATIONS

The bellow’s coupling is considered infinitely stiff so that the motor’s shaft and the leadscrew form a rigid body:

𝜃 = 𝜃𝑀2 (12)

𝐽{𝑀2,𝑠𝑐𝑟𝑒𝑤} = 𝐽𝑙𝑒𝑎𝑑𝑠𝑐𝑟𝑒𝑤 + 𝐽𝑀2 (13) NB: The motor is called M2.

According the the constructor’s datasheet on Figure 75 (see appendix), the DC-motor suffers from Coulomb and static friction 𝑻𝒎𝒐𝒕𝒇 .

The ball-bearings used are slightly lubricated, given that the velocities involved are actually are low, any viscous or Stribeck effect is neglected [16], their friction is gathered into 𝑻𝒃𝒆𝒂𝒓𝒊𝒏𝒈𝒔𝒇, a Coulomb and a static torque friction [17].

𝑓𝑏𝑒𝑎𝑟𝑖𝑛𝑔𝑠 ≈ 0 𝑁𝑚𝑠 (14)

The leadscrew used is not lubricated so the friction coefficient 𝝁 follows a Coulomb and static law.

(27)

From (5), the motor’s dry friction, (8), (11), (12), (13), (14, it yields:

𝐽{𝑡𝑜𝑡,𝑀2}𝜃̈ = 𝑇𝑀2− (𝑇{𝑏𝑏𝑠,𝑀2}𝑓+ 𝜉𝐹𝑟𝑎𝑖𝑙𝑓 )𝑠𝑔𝑛(𝜃̇) Where

(15)

𝐽{𝑡𝑜𝑡,𝑀2} = 𝐽{𝑚𝑜𝑡,𝑠𝑐𝑟𝑒𝑤}− 𝑟𝑚tan(𝜆) 𝜉𝑀𝑛𝑢𝑡 𝑇𝑀2 = 𝐾𝑐𝑀2𝐼𝑀2

𝑇{𝑏𝑏𝑠,𝑀2}𝑓 = 𝑇𝑏𝑒𝑎𝑟𝑖𝑛𝑔𝑠𝑓+ 𝑇𝑀2𝑓

𝑁 = −𝐹𝑟𝑎𝑖𝑙𝑓𝐽{𝑀2,𝑠𝑐𝑟𝑒𝑤}𝑠𝑔𝑛(𝜃̇) + 𝑀𝑛𝑢𝑡𝑟𝑚tan (𝜆)(𝑇𝑀2− 𝑇{𝑏𝑏𝑠,𝑀2}𝑓𝑠𝑔𝑛(𝜃̇)) (cos(𝜆) + 𝜇𝑠sin(𝜆))𝐽{𝑡𝑜𝑡,𝑀2}

(16)

From data, generally |𝜇| ∈ [0,1]; 𝜆 is close to zero leading to cos(𝜆) > 0, and cos(𝜆) > |sin(𝜆)|, then

 cos(𝜆) > | 𝜇𝑠sin(𝜆) |

From (15) and considering one direction of rotation, one can verify that

 𝐽{𝑡𝑜𝑡,𝑀2}> 0, inertia always positive in normal circumstances13.

 𝑇𝑀2> 𝑇{𝑏𝑏𝑠,𝑀2}𝑓, otherwise there would be no motion.

One can infer then with (16) and the conditions above:

𝑁 < 0 if 𝜃̇ > 0 and 𝑁 > 0 if 𝜃̇ < 0

(17)

From (17), (9), (10) and given that 0 < 𝜆 ≪𝜋

2 and 0 < 𝜇 < 1 [18] [19]:

𝜉 = −𝑟𝑚 𝜇 + tan(𝜆)

1 − 𝜇 tan(𝜆)< 0 (18)

𝜉𝑓= −𝜉 > 0 (19)

Eventually, from (15), (18) and (19) it yields:

(𝐽{𝑀2,𝑠𝑐𝑟𝑒𝑤}+ 𝑟𝑚tan(𝜆) 𝜉𝑓𝑀𝑛𝑢𝑡)𝜃̈ = 𝐾𝑐𝑀2. 𝐼𝑀2 (20)

−(𝑇𝑏𝑒𝑎𝑟𝑖𝑛𝑔𝑠𝑓+ 𝑇𝑀2𝑓)𝑠𝑔𝑛(𝜃̇)

− 𝜉𝑓𝐹𝑟𝑎𝑖𝑙𝑓 𝑠𝑔𝑛(𝜃̇)

Let us call 𝐽𝑡𝑜𝑡 the resulting actuator-transmission inertia and 𝑇𝑓 the associated torque friction.

𝐽𝑡𝑜𝑡 = 𝐽𝑀2+ 𝐽𝑠𝑐𝑟𝑒𝑤+ 𝐽{𝑛𝑢𝑡,𝑙𝑒𝑛𝑠−𝑐𝑎𝑟𝑟𝑖𝑒𝑟} (21)

13 See the end of this section and (25) for additional numerical proof.

(28)

𝑇𝑓= (𝑇𝑀2𝑓+ 𝑇𝑏𝑒𝑎𝑟𝑖𝑛𝑔𝑠𝑓+ 𝜉𝑓𝐹𝑟𝑎𝑖𝑙𝑓) 𝑠𝑔𝑛(𝜃̇) (22)

The motor’s shaft inertia is provided by the constructor on Figure 75 (see appendix). A cylindrical approximation is used to compute the screw’s inertia, the mass and inertia definitions [20] lead to the following equations:

𝑀𝑠𝑐𝑟𝑒𝑤 = 𝜌𝑠𝑡𝑒𝑒𝑙. 𝜋. (𝐷𝑚𝑠𝑐𝑟𝑒𝑤

2 )

2

. 𝐿𝑠𝑐𝑟𝑒𝑤 (23)

𝐽𝑠𝑐𝑟𝑒𝑤 = (1

2) . 𝑀𝑠𝑐𝑟𝑒𝑤. (𝐷𝑚𝑠𝑐𝑟𝑒𝑤

2 )

2 (24)

𝐽{𝑛𝑢𝑡,𝑙𝑒𝑛𝑠−𝑐𝑎𝑟𝑟𝑖𝑒𝑟} is computed from (18) and (20):

𝐽{𝑛𝑢𝑡,𝑙𝑒𝑛𝑠−𝑐𝑎𝑟𝑟𝑖𝑒𝑟} = 𝑀𝑛𝑢𝑡𝑟𝑚2 tan(𝜆)1+𝜇 tan𝜇+tan(𝜆(𝜆)) (25)

 Regarding the friction parameters, the mechanical system’s friction (22) value 𝑻𝒃𝒆𝒂𝒓𝒊𝒏𝒈𝒔𝒇+ 𝝃𝒇𝑭𝒓𝒂𝒊𝒍𝒇≈ 𝟕. 𝟖 𝒎𝑵𝒎 has been estimated experimentally by the company.

The constructor’s datasheet (Figure 75) gives 𝑻𝑴𝟐𝒇 so according to (22) 𝑇𝑓 is determined.

 𝜇 is unknown but according to the literature [18] [19] 𝜇 ∈ [0.15,0.25] for dry steel materials in contact so 𝝁 = 𝟎. 𝟐𝟎 is chosen as a mean. Eventually, 𝐽{𝑛𝑢𝑡,𝑙𝑒𝑛𝑠−𝑐𝑎𝑟𝑟𝑖𝑒𝑟}

represents less than 4% of 𝐽𝑡𝑜𝑡 so errors on this inertia are not critical.

𝑻𝒇 and 𝝁 static behavior is neglected and a justification is given in the next section.

3.3.4.STATIC FRICTION SIMPLIFICATION

The discontinuity at a zero speed cause by the sign function 𝒔𝒈𝒏(. ) leads to derivation issues and a model simplification is needed. A Karnnop model could prevent this numerical issue but adds a small velocity error around the zero [21]. Moreover, a second numerical issue appears in the shape of an algebraic loop with the static friction due to the velocity equals to 0.

(29)

The zoom system’s inputs are steps and continuous zooms which does not directly involve change of directions and very small velocities [14] [15]. The system’s velocity is to be moderately high and constant, and a model-based approach is to be used to design a controller and simulate the resulting behavior.

An appropriate friction model is an external step disturbance 𝑇𝑓 starting at 𝑡 = 0𝑠 which is opposed to the movement. It both models the friction resistance when the system is in motion or at the steady-state if it has not fulfilled the desired precision, which is enough for completing the precision requirement. It is also compatible with the Linear System’s theory and enables a relation between the friction and a precision criterion (see section 4.5.1).

Small differences in terms of motion between the simulation and the real system are expected at the very beginning with the sticking and delaying effect of the static friction, or at the end of each trajectory due to the stick-slip [22] phenomenon.

3.4.Final model

From the equations (12), (20), (21), (22), it yields:

𝐽𝑡𝑜𝑡.𝑑𝜔𝑀2

𝑑𝑡 = 𝐾𝑐𝑀2. 𝐼𝑀2− 𝑇𝑓 with 𝜔𝑀2(0) = 0 𝑟𝑎𝑑. 𝑠−1 (26)

The final Simulink model of the Zoom system is displayed on Figure 19.

The electrical part (red rectangle) is based on (4). The mechanical part (blue rectangle) uses (26) and the external step disturbances approximating the Coulomb friction mentioned in section 3.3.4.

The encoder (green rectangle) is defined in Figure 13; the electrical and mechanical parts use the motor’s saturations drawn from Table 1.

Figure 18 Karnopp stick-slip model

(30)

NB: A position saturation could be added because the zoom system can only move up to 200 mm – on this prototype – before reaching a mechanical stop. However it is unnecessary since the position’s inputs and the overshoot criteria take this risk into account, furthermore the simulation can tell whether there is a risk or not.

Figure 19 Final zoom system half model with a voltage step input as an example

T_M2_sat

T_M2 T_tot

T_f

T_M2_sat T_M2_sat T_M2

T_M2

T_tot T_tot T_f

T_f

(31)

3.5.Microcontroller’s effects

From a hardware perspective, half of the zoom system is modelled. However the microcontroller takes part in the zoom system’s behavior. What follows completes half of the zoom system’s model with the microcontroller’s sampling and delaying effect.

The program’s computation requires a time proportional to the number of its instructions. Each instruction needs a given number of CPU cycles in order to complete the task. The higher the CPU clock, the faster the computation is.

A CPU interruption occurs every max(𝑇𝑠𝑎𝑚𝑝𝑙𝑒−𝑡𝑖𝑚𝑒𝑖) = 𝑇𝑒𝑛𝑐𝑜𝑑𝑒𝑟 = 𝑇𝑐𝑜𝑛𝑡𝑟𝑜𝑙

8 for the subsystems running at the highest frequency. The other subsystems’ running frequencies are an even division of 𝑓𝑒𝑛𝑐𝑜𝑑𝑒𝑟 [23]: their computational times are all added during the smallest frequency occurrence 𝑓𝑙𝑖𝑏𝑟𝑎𝑟𝑦. As a result, a condition to avoid computational time overlay is the following:

∑ 𝐶𝑜𝑚𝑝𝑢𝑡𝑎𝑡𝑖𝑜𝑛𝑛𝑎𝑙 𝑡𝑖𝑚𝑒 𝑠𝑢𝑏𝑠𝑦𝑠𝑡𝑒𝑚𝑖

𝑖 𝑠𝑢𝑏𝑠𝑦𝑠𝑡𝑒𝑚

< 𝑇𝑒𝑛𝑐𝑜𝑑𝑒𝑟 = 𝑇𝑐𝑜𝑛𝑡𝑟𝑜𝑙 8

(27)

A constant watch over the largest computational time is required to ensure this criterion, but the worst-case scenario suggests that max (𝑇𝑑𝑒𝑙𝑎𝑦) =𝑇𝑐𝑜𝑛𝑡𝑟𝑜𝑙

8 which still leads to a working system.

A delay can be either modelled in the discrete or in the continuous space.

The former requires a sampling time small enough to model the delay, and is harder to simulate.

The latter needs a linearization for the simulations, but is easier to tune which makes it suitable for a model-based design.

A continuous Padé’s approximant of order 2 [24] with a 𝜏µ𝑐𝑑𝑒𝑙𝑎𝑦 = 𝑇𝑐𝑜𝑛𝑡𝑟𝑜𝑙

8 delay has been chosen in order to consider the worst-case scenario: the second order approximation provides an appropriate trade-off between “noise” and response time.

𝐻𝑝𝑎𝑑𝑒(𝑠) =1 −𝜏µ𝑐𝑑𝑒𝑙𝑎𝑦

2 𝑠 +𝜏µ𝑐𝑑𝑒𝑙𝑎𝑦2 12 𝑠2 1 +𝜏µ𝑐𝑑𝑒𝑙𝑎𝑦

2 𝑠 +𝜏µ𝑐𝑑𝑒𝑙𝑎𝑦2 12 𝑠2

(28)

Figure 20 Padé's delay and the zoom system’s block

𝐻𝑝𝑎𝑑𝑒(𝑠)

(32)

The zero order hold effect produced by the microcontroller will be modelled within the rate transition Simulink blocks [25].

The PWM command also has an effect on the voltage accuracy and the current variation inside the motor’s windings. However 𝑇𝑃𝑊𝑀 has been chosen small enough to be neglected compared to the motor’s electrical constant and high enough to limit heat dissipation and loss [26]: as a result, the PWM command is not modelled and the voltage input is considered continuous and constant during a control sample time 𝑇𝑐𝑜𝑛𝑡𝑟𝑜𝑙.

A mathematical model of one half of the zoom system has been inferred since the other half is strictly similar. The actuator’s model is based on the classic DC-motor linear model on which saturations such as the maximum current, torque or angular velocity have been added. The encoder’s effect has been approximated by a 𝑓𝑙𝑜𝑜𝑟 function which partially models the quantization: it is enough for our need given the trajectories involved. Based on a previous complex leadscrew model, the zoom system’s mechanical transmission has been determined and simplified according to the actual friction the zoom system undergoes and the input trajectories: the transmission’s effect on the zoom system can be gathered into an additional inertia and Coulomb friction, the latter is modelled by an external step function. The microcontroller’s delaying on the system is modelled with a linear delaying function based on Padé’s approximant of order 2 whose delay considers the worst case scenario, whereas its sampling effect is modelled using a zero-order hold – automatically included within Simulink’s rate transition blocks.

Such model enables both the zoom control design (see chapter 4), through control theory, and the simulations (see section 4.6), thanks to a simulating tools.

(33)

4. Control design

This part deals with the determination of a controller in order to fulfill the company’s requirements. Once again, the symmetrical property of the zoom system enables to focus on only one half of it: the resulting controller should theoretically be able to offer the same performances whatever the zoom system’s half. The first two sections expose the control performances aimed for the zoom system and its constraints, which translates into controller’s requirements in section three: the type of controller is settled.

In addition to a position feedback, a velocity feedback turns out to be needed to achieve the objectives: two types of speed estimations are detailed in section four, both are used and their performance are compared.

The cascaded controller tuning is dealt with in section five in accordance with the control objectives defined in section 4.1 and 4.2, and its performances are evaluated through simulations in section six.

A windup issue is revealed in case of a jam and an antiwindup strategy is employed in section seven: complementary simulations are carried out to verify if the windup is removed without disturbing the controller’s performances.

4.1.Objectives

The specifications are established by the camera’s working context, the optical system requirements, the user’s comfort and the library’s output signals.

o The type of inputs consist of position references through a step and a continuous zoom, both described in section 2.4: a position feedback is required.

o The camera has to work in a broad range of operating conditions such as onboard vehicles for instance. Thus, the zoom system can undergo jolts which briefly disturb the lens carrier’s motion or even jam the lens carriers: a criterion of robustness in case of jamming is set: the control objectives must be fulfilled even after a jerky motion, in particular no position overshoot should be added. Also, the embedded board prototype (see Figure 76 and section 2.5) has a voltage limit of 𝑼𝒎𝒂𝒙 which sets a voltage saturation.

o The optical system sets a precision criterion of 𝟒𝜺𝒎𝒂𝒙 𝑚𝑚 according to the company’s optical department. It is tightened at 𝜺𝒎𝒂𝒙 𝑚𝑚 here in order to improve the system’s precision. Since the working unit is in radian, the precision criterion becomes angular 𝜺𝜽𝒎𝒂𝒙= 𝜺𝒎𝒂𝒙 𝟐𝝅

𝒑𝒕𝒉𝒓𝒆𝒂𝒅 .

o The user’s comfort implies a very small overshoot and a smooth trajectory so that the user does not feel sick, especially for continuous zoom inputs. Also, a speed limit of 𝑽𝒎𝒂𝒙 is needed to prevent the nut from producing noise from the leadscrew’s friction- induced vibrations [11]. Which leads to 𝝎𝒎𝒂𝒙 = 𝑽𝒎𝒂𝒙 𝟐𝝅

𝒑𝒕𝒉𝒓𝒆𝒂𝒅 .

(34)

o The continuous zoom input runs at 𝑇𝑙𝑖𝑏𝑟𝑎𝑟𝑦, which means that if the position’s loop acts as a 1st order model with a dominant pole at 1

𝜏𝑝𝑜𝑠𝑝𝑜𝑙𝑒, then reaching 95% of the final value is translated into

3𝜏𝑝𝑜𝑠𝑝𝑜𝑙𝑒 = 𝑇𝑙𝑖𝑏𝑟𝑎𝑟𝑦 [27]. It leads to

𝑓𝑝𝑜𝑠𝑑𝑜𝑚𝑖𝑛𝑎𝑛𝑡−𝑝𝑜𝑙𝑒 = 3𝑓𝑙𝑖𝑏𝑟𝑎𝑟𝑦 2𝜋

(29)

These requirements are summarized in Table 2.

Table 2 Control specifications

Criteria Specifications

Maximum steady-state error 𝜺𝜽𝒎𝒂𝒙

Maximum overshoot 𝜺𝜽𝒎𝒂𝒙

Transient behavior Close to a 1st order linear system

Control frequency 𝒇𝒄𝒐𝒏𝒕𝒓𝒐𝒍

ZOOM trajectory following  Frequency of 𝒇𝒍𝒊𝒃𝒓𝒂𝒓𝒚

 Delay smaller than 1 sample time 𝑻𝒍𝒊𝒃𝒓𝒂𝒓𝒚 (Position’s cutoff frequency as close as possible to 𝒇𝒑𝒐𝒔𝒐𝒃𝒋𝒆𝒄𝒕𝒊𝒗𝒆 = 𝟑𝒇𝒍𝒊𝒃𝒓𝒂𝒓𝒚

𝟐𝝅𝒇𝒍𝒊𝒃𝒓𝒂𝒓𝒚

𝟐

(29))

H-bridge input voltage Inferior to 𝑼𝒎𝒂𝒙 (voltage saturation)

Linear velocity control  Inferior to 𝝎𝒎𝒂𝒙 with 𝝎(𝑼𝒎𝒂𝒙) > 𝝎𝒎𝒂𝒙 with a 𝟏𝟓% relative error tolerated.

 The command saturation is possible, it sets the reach velocity to 𝝎𝒎𝒂𝒙

Disturbance rejection  Types of disturbances:

o lens carrier manually jammed during a step-input for approximately 𝟎. 𝟓𝒔

 Behavior asked:

o Reach the aimed position after the jolt o No overshoot added

From a continuous perspective, all the control criteria are determined and will be used for the controller choice and tuning in sections 4.3 and 4.5. However, the use of a microcontroller involves a digital processing of the controller: the sampling frequencies are exposed and justify in the next subsection.

4.2.Sampling frequencies

The microcontroller needs to successively trigger the zoom system’s tasks in accordance with their respective sampling times. The tasks associated to the signal processing of the encoder and the PWM are respectively labelled “encoder” and “PWM”; the “control” label

corresponds to the forthcoming controller and the “library” label corresponds to the zoom library described in section 2.4.

References

Related documents

Det vi tillsammans med Grankvist (2012, s. 16) förespråkar i vår studie är att logistikföretagen kan implementera alla dessa tre aspekter i sin verksamhet och inte utesluta någon

The Step-wise reconstruction method is based on independent values generation from a known probability distribution, rearrangement of random values and segmentation processes,

• Is real-time simulation of the existing SimMechanics model possible when the control system has a 200µs loop time.. • If the control system loop is 200µs, how fast should the

4.37 Estimation errors of discrete MRAS controller running test cases 4 and 5 com- bined with different values for the start load... List

A RDS is a document that describes the client´s needs from an early stage in terms of functional requirements for every room in the building and can be seen as an information

Första tanken är att man gör en insats för miljön och det kanske lättar ens samvete, men vid vidare eftertanke får man fråga sig: Är det mer logiskt att köpa ekologisk

The input parameters in the simulations carried through in this work are the number of emitted electrons from the hot cathode (the electron current I e ), the pressure inside

Om man till exempel skapar ett index på en primärnyckel i en tabell och sedan söker data baserad på det kommer SQL Service först att hitta de värdet i indextabellen och