Download Institutionen för systemteknik

Document related concepts

Wien bridge oscillator wikipedia , lookup

Analog-to-digital converter wikipedia , lookup

Time-to-digital converter wikipedia , lookup

Oscilloscope history wikipedia , lookup

Opto-isolator wikipedia , lookup

Power electronics wikipedia , lookup

Phase-locked loop wikipedia , lookup

Regenerative circuit wikipedia , lookup

Rectiverter wikipedia , lookup

Radio transmitter design wikipedia , lookup

Valve RF amplifier wikipedia , lookup

RLC circuit wikipedia , lookup

Index of electronics articles wikipedia , lookup

Transcript
Institutionen för systemteknik
Department of Electrical Engineering
Examensarbete
Driver Circuit for an Ultrasonic Motor
Examensarbete utfört i Elektroniksystem vid Tekniska högskolan vid
Linköpings universitet
av
Henrik Ocklind
LiTH-ISY-EX–13/4659–SE
2013
TEKNSIKA HÖGSKOLAN
LINKÖPINGS UNIVERSITET
Department of Electrical Engineering
Linköpings tekniska högskola
Linköpings University
Institutionen för systemteknik
S-581 83 Linköping Sweden
581 83 Linköping
Driver Circuit for an Ultrasonic Motor
Master thesis performed in Electronics Systems
at Linköpings Institute of technology
By:
Henrik Ocklind
Supervisor: Ove Gustafsson
Flir Systems
Anders Wistrand
Flir Systems
Joakim Alvbrant
ES, ISY
Examiner: Oscar Gustafsson
ES, ISY
Linköping, 2013-02-01
Abstract
To make a camera more user friendly or let it operate without an user the
camera objective needs to be able to put the camera lens in focus. This
functionality requires a motor of some sort. Due to its many benefits the
ultrasonic motor is a preferred choice. The motor requires a driving circuit
to produce the appropriate signals and this is what this thesis is about. The
main difficulty that needs to be considered is the fact that the ultrasonic
motor is highly non-linear.
This report will give a brief walk through of how the ultrasonic motor works,
its pros and cons and how to control it. How the driving circuit is designed
and what role the various components fills. The regulator is implemented
in C-code and runs on a microprocessor while the actual signal generation
is done on a CPLD (Complex programmable logic device). The report ends
with a few suggestions of how to improve the system should the presented
solution not perform at a satisfactory level.
Acknowledgements
I would like to extend my gratitude to Flir Systems for the opportunity
to do this project, it has been very rewarding. Furthermore I would like to
thanks my supervisors at Flir, Ove Gustafsson and Anders Wistrand, for their
support and help to make things run smoothly. I would also like to thank
my supervisor at ISY, Joakim Alvbrant and my examiner Oscar Gustafsson
for their valuable insights. A special thanks goes out to my objector, Gustav
Wallin for having the patience of an angel.
Contents
1 Introduction
1.1 Background . . . . . . . . . . . . . .
1.2 Purpose . . . . . . . . . . . . . . . .
1.3 Goal . . . . . . . . . . . . . . . . . .
1.4 Delimitations . . . . . . . . . . . . .
1.5 Method . . . . . . . . . . . . . . . .
1.6 Devices . . . . . . . . . . . . . . . .
1.6.1 Micro Processor . . . . . . . .
1.6.2 Complex Programmable Logic
1.7 Environment . . . . . . . . . . . . . .
1.7.1 SDCC . . . . . . . . . . . . .
1.7.2 Modelsim . . . . . . . . . . .
1.7.3 ISE Webpack . . . . . . . . .
1.7.4 Matlab . . . . . . . . . . . . .
1.7.5 Other Tools . . . . . . . . . .
2 The
2.1
2.2
2.3
2.4
2.5
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
Device
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
Ultrasonic Motor
The Piezoelectric Effect . . . . . . . .
The Barth Motor . . . . . . . . . . . .
The Travelling Wave Motor . . . . . .
2.3.1 Architecture . . . . . . . . . . .
2.3.2 Operating Principle . . . . . . .
Advantages of the Ultrasonic Motor . .
2.4.1 No Influence of Magnetic Fields
2.4.2 Driving Properties . . . . . . .
2.4.3 Structural Properties . . . . . .
Disadvantages of the Ultrasonic Motor
2.5.1 Friction . . . . . . . . . . . . .
2.5.2 Non-Linear . . . . . . . . . . .
2
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
8
8
9
9
10
10
10
10
11
11
11
12
12
12
12
.
.
.
.
.
.
.
.
.
.
.
.
14
14
15
16
16
17
18
18
18
18
19
19
19
3 The System
3.1 Overview . . . . . . . . . . . . . . . .
3.2 Circuit Design . . . . . . . . . . . . .
3.2.1 Microprocessor . . . . . . . .
3.2.2 Complex Programmable Logic
3.2.3 The Inverter Stage . . . . . .
4 Driving the Motors
4.1 Speed Characteristics . . . . . . .
4.2 Motor Diameter and Performance
4.2.1 Torque . . . . . . . . . . .
4.2.2 Speed . . . . . . . . . . .
4.2.3 Output Power . . . . . . .
4.3 A Comparison of the Two Motors
4.3.1 Frequency . . . . . . . . .
4.3.2 Speed and Frequency . . .
4.3.3 Torque and Efficiency . . .
4.3.4 Mechanical Differences . .
4.4 Changes in the Circuit . . . . . .
4.5 End of Applied Study . . . . . . .
5 The Regulator
5.1 PID Controller . . . . . . . . .
5.1.1 Proportional Regulating
5.1.2 Integral Regulating . . .
5.1.3 Derivative Regulating . .
5.1.4 The whole regulator . .
5.2 Tuning the System . . . . . . .
5.2.1 Ziegler-Nichols Method .
5.2.2 Manual Tuning . . . . .
5.3 The Model . . . . . . . . . . . .
5.4 Regulating the Motor . . . . . .
5.5 Poles and Phase Margin . . . .
.
.
.
.
.
.
.
.
.
.
.
6 Improvements
6.1 Evaluation of the Current Circuit
6.1.1 Clock Doubler . . . . . . .
6.1.2 Double Counter . . . . . .
6.1.3 Results . . . . . . . . . . .
6.2 Ideas for the Regulator . . . . . .
6.2.1 Derivative Term . . . . . .
3
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
. . . .
. . . .
. . . .
Device
. . . .
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
20
20
21
21
22
23
.
.
.
.
.
.
.
.
.
.
.
.
26
26
28
28
28
28
29
30
30
32
32
33
34
.
.
.
.
.
.
.
.
.
.
.
36
36
37
37
37
38
38
38
39
39
40
43
.
.
.
.
.
.
46
46
47
48
49
49
50
6.2.2
Limiting the Error . . . . . . . . . . . . . . . . . . . . 50
7 Conclusion
52
4
Acronyms
ADC
CPLD
DAC
FPC
HT65
Hz
I 2C
MCU
P12
PID
USM
T
Tilo
Vrms
Analog to digital converter
Complex programmable logic device
Digital to analog converter
Flexible printed circuit
High torque, 65 mm, the larger motor
Hertz, SI unit for frequency
Inter-integrated circuit, a serial bus developed by Philips
Microcontroller, a simple processor with extra features
Pencil, 12 mm, the smaller motor
Proportional-integral-derivative, a type of regulator
Ultrasonic motor
Tesla, SI unit for magnetic flux density
Combinatorial logic delay
√
Voltage root mean square, for a sine wave the peak voltage divided by 2
6
Chapter 1
Introduction
This chapter presents the background, purpose, goals and delimitations of
the thesis along with the method and necessary tools.
1.1
Background
This thesis project was performed at Flir Systems. Flir is a company that
works with thermal imaging and more specifically they design and manufacture infrared cameras. A lens made out of germanium will look solid black
to the human eye, but to infrared light the lens is transparent. However
the rules of optics still apply so the lens needs to be in focus to get a clear
image. One way of doing that would be to let the user manually tune the
lens position, but this is time consuming and not always a practical solution
since some of the cameras made at Flir need to operate on its own or need
to be controlled remotely, for example in surveillance scenarios. That is why
the camera objective usually has a built in autofocusing system which is a
driving circuit paired with a regulator. The purpose of this system is to place
the lens at the appropriate position by controlling a motor that is connected
to the lens. In this case the motor used is an ultrasonic motor. These motors
are very popular for this kind of application because they are ring shaped
and thus fit very well into the design since most camera objectives are cylindrical. Other advantages include low noise, quick response and the fact that
it is a more durable solution compared to a regular electrical motor.
8
1.2
Purpose
Ultrasonic motors comes in different shapes and sizes as well as with different
properties. The company that makes the motors do not sell the associated
electronic driver circuits so it is up to customer to create their own. The
project presented in this report is a continuation of a previous project where
a driver circuit was developed for a motor with a diameter of 65 mm. Fukoku
is the company that made this motor and they also manufacture a motor
with a diameter of 12 mm. The smaller motor has a number of advantages,
for example, it requires less space (which can be seen in figure 1.1), weighs
less, has a lower power consumption and is cheaper. In theory it should be
possible to modify the existing circuit board for the larger motor to control
the smaller one. However, the motors works in different frequency ranges, has
different properties and ultrasonic motors (USM) suffers from non-linearities.
This project will find out if it is possible and how it is done.
Figure 1.1: Stators for the big and small motors.
1.3
Goal
The goal of this thesis is to develop a driving circuit for a 12 mm ultrasonic
motor that performs on the same level regarding speed and response time
as the circuit for the bigger motor. What this means is that new code for
the microprocessor and the complex programmable logic device (CPLD) will
be developed, specifically the code that regulates the system. Furthermore
there will be a theoretic study into possible improvements in the architecture
of the circuit board.
9
1.4
Delimitations
The circuit board is already made and the overall architecture will not be
altered, thus the components are predetermined. The microprocessor is
a Texas Instruments MSC1202Y2 which has a built in analogue to digital converter(ADC), it belongs to the 8051 family. The CPLD is a Xilinx
XCR3064XL, which has 64 macro cells. The whole circuit is synchronised by
a crystal oscillator which oscillates at 40 MHz, this clock will be referred to
as the system clock.
1.5
Method
The first phase of this project will be to get a basic understanding of how the
ultrasonic motor works. This will be followed by an analysis of the previous
project, in essence that means that all the written code (C++, assembler
and VHDL) and all the components in the circuit will be scrutinized and
analysed. There is no existing coding environment so as a part of the project
the necessary programming tools needs to be selected and then implemented
into the environment. These tools will be described later in this chapter. To
verify the code an I 2 C-communication between a computer and the circuit
needs to be established. Most of the work concerning the regulator will be
done through simulations in Matlabs Simulink.
1.6
Devices
This section gives a short explanation of the microprocessor and the CPLD.
1.6.1
Micro Processor
Texas Instrument MSC1202Y2 is the processor used in the circuit, it has a
built in ADC/DAC and a 4 kB flash memory The processor core is based
on the 8051 architecture which was developed by Intel in the early 1980s.
However, the processor used in this thesis is an improved version, it does
accept the same instruction set, but it processes data approximately three
times faster [1]. The 8051-architecture is a widely used standard and because
of this there exists a large number of different compilers and the generated
code can be downloaded to any 8051-controller if needed. Some properties
worth mentioning for the controller includes the 8 bit CPU, 8 bit data bus
and the 16 bit address bus [2] and the general core can be seen in figure 1.2.
10
Figure 1.2: The standard 8051 core.
Probably the most defining feature of this chip is the ADC and it is a
rather central part of this project, more on this later. The ADC utilizes a
Sigma delta converter with a 16 bit resolution.
1.6.2
Complex Programmable Logic Device
Xilinx XCR3064XL is the CPLD chip used. A CPLD unlike a FPGA does not
require an external configuration memory to boot and is therefore suitable
for this type of circuit. VHDL is the chosen language for programming the
CPLD.
1.7
Environment
This section will list the various programs and tools needed to for implementation, simulations and validation.
1.7.1
SDCC
SDCC is an abbreviation for Small device C compiler and as the name implies it is an ANSI C compiler and includes other functionalities as linker,
assembler, debugger and simulator [3]. It is an open source project and is
distributed under the GNU general public license. It is possible to use with
a wide variety of processors including processors of the 8051 architecture.
11
1.7.2
Modelsim
Used to debug and simulate VHDL code before it is downloaded to the CPLD.
1.7.3
ISE Webpack
ISE Webpack is a free of charge program developed by Xilinx. It is used to
synthesize and download code to the CPLD.
1.7.4
Matlab
The regulator will be tested and verified in Matlab before it is implemented
in the actual system.
1.7.5
Other Tools
In addition to previously mentioned tools there are some other required tools
which have no need to be described in detail. Those include an oscilloscope, a
voltage meter, some circuits developed by Flir to program the microprocessor
and the CPLD and also equipment needed to communicate with the driving
circuit through I 2 C.
12
Chapter 2
The Ultrasonic Motor
This chapter will explain how the ultrasonic motor (USM) works and how it
differs from a regular electromagnetic motor.
2.1
The Piezoelectric Effect
To get a grasp of how the USM works the principle of the piezoelectric effect
needs to be understood. The discovery of piezoelectricity is attributed to
the Curie brothers who made the discovery in the late 19th century while
studying Rochelle salt [5]. Piezo is Greek and translates into pressure so in
pure English the effect would be called pressure-electric. There are a number
of materials that exhibit piezoelectric properties, but they all work the same.
If pressure is applied to the material, or more specifically if the material is
deformed, an electric field is generated and thus an electric potential. For
this project the opposite is desired and since the effect is reversible that can
be achieved. An electric field with a positive potential will make the material
expand, this is illustrated in figure 2.1. The short version of the piezoelectric
effect would be that it describes a material that can convert mechanical to
electrical energy and vice versa.
14
Figure 2.1: How an applied voltage affects the piezoelectric material.
2.2
The Barth Motor
The human ear can detect sound waves ranging from 20 Hz to 20 kHz which
is commonly known as the audible frequency range. Signals with a higher
frequency operates in the ultrasonic region and those kind of signals are
rather easy to create using a piezoelectric vibrator of some sort. It has been
known for some time that the energy density of such a vibrator is higher than
that of an electromagnetic motor, up to ten times higher [4]. However there
would be a while before anyone attempted to construct a motor using the
piezoelectric principle. In 1973 H.V. Barth published his work on an USM, it
m
Figure 2.2: H.V. Barth’s motor
consisted of one rotor and two vibrators. It is a fairly straight forward design,
when the left vibrator is excited the rotor moves clockwise and in the opposite
direction when the right vibrator is excited [4], a model is illustrated in figure
2.2. Since then many different motors have been developed, including the
wedge-type, the twist coil, various linear motor designs and also the motor
used in this project, the travelling wave motor.
15
2.3
The Travelling Wave Motor
The travelling wave motor was developed by Toshiiku Sashida in 1982. There
are some variations of this type of motor and the one used in this project is
of ring type.
2.3.1
Architecture
The overall architecture of this motor is pretty similar to an ordinary electromagnetic motor. It consists of two main parts, the stator and the rotor.
The stator is stationary in the sense that it does not move along the rotation
axis (cylindrical coordinates), it does however move up and down, but more
on that in the next section. The stator is made by combining two parts, the
piezoelectric part and on top of that an elastic body which is recognisable
by its saw tooth silhouette.
Figure 2.3: Left: The different parts of the USM. Right: A motor, the stator
is clearly visible.
The rotor is the moving part of the motor, the spring pushes the stator
and rotor assembly together and the oscillations in the piezoelectric material
causes the rotor the rotate, hence the name. In an ordinary electromagnetic
motor the rotor is not in physical contact with the stator, however the driving principle of the USM depends on friction between the stator and rotor.
Therefore a thin lining is applied to the rotor to increase friction and thus
decrease sliding energy loss. Also the lining increases the durability of the
motor. Thus forming the rotor assembly.
For the motor to work the rotor and stator needs to be pressed together
16
and that is why there is a spring in the bottom. Then there are a number
of plates to equalize pressure in the design and some protective sheets to
protect against wear and tear. What the motor looks like under the hood is
illustrated in figure 2.3.
2.3.2
Operating Principle
The piezoelectric material is connected to a two-phase sinusoidal voltage with
a 90 degree phase shift, in other words a sine and a cosine phase. The unshifted voltage will be called phase A and the other one phase B henceforth.
As described in figure 2.4 there are alternating nodes with different polarization spread out around the ring, when a positive voltage is applied to a
node it will cause positive nodes to expand and negative nodes to shrink, the
opposite is true for a negative voltage.
If only one phase is active a standing wave will be created, even though the
voltage is only applied to a little less than half of the ring the wave will
propagate through the entire ring. When the other phase is activated the
wave will move which is called a travelling wave. Imagine a fixed point on
the surface of the piezoelectric disc, this point will move up and down in
an elliptical trajectory which is illustrated to the right in figure 2.4. There
are two main stages to convert the electrical energy to mechanical ditto. In
the first stage the piezoelectric electrodes becomes excited which causes vibrations in the material, in the later stage these vibrations are transmitted
through to the rotor which, given enough pressure, will move the rotor in the
opposite direction of the travelling wave.
Figure 2.4: Left: Piezoelectric disc. Right: Driving principle of an USM.
17
2.4
Advantages of the Ultrasonic Motor
This section will explain the various advantages of the USM.
2.4.1
No Influence of Magnetic Fields
This is perhaps one of the most important aspects of the USM since an
electromagnetic motor may not function properly while under the influence
of a magnetic field. The principle of electromagnetic induction states that a
fluctuation in the magnetic field will create an electric field and the USM is
no exception, however the effects are negligible. Assume a 1 T fluctuation in
the magnetic flux density at about 60 Hz, this will create an electric field of
about 100 V m−1 which is 100 times lower than the normal field strength of
the piezoelectric material [4]. Since the motor does not utilize a magnet nor
a coil it will not generate magnetic fields either.
2.4.2
Driving Properties
Since the motor operates at a frequency range above the audible range the
motor is very quiet. Compared to an electromagnetic motor the USM has
considerable higher torque, a factor of somewhere between 10 and 100 compared to a electromagnetic motor of a similar size [6]. The difference is largest
at low speeds. Moreover the drive does not need any gears and because of
this and the low inertia of the rotor the motor has a very quick response for
both start and stop (about 1 ms [4]). As soon as the ceramic starts to vibrate
the rotor will start moving and the moment it stops the stator will work as
a brake. This makes the motor easy to control and suitable for machines
where high precision is needed.
2.4.3
Structural Properties
The motor is ring shaped and thus hollow, this makes the motor easy to fit
in your design. Furthermore the USM is very light The structure is rather
simple and therefore easy to manufacture.
18
2.5
Disadvantages of the Ultrasonic Motor
Besides the listed advantages in section 2.4 the USM has its drawbacks.
2.5.1
Friction
The rotor is pressed down onto the stator and it is the friction between these
two parts that makes the motor work. However, this also generates a lot of
heat. The motor is therefore not suitable for a continuous workload since the
temperature would rise to extreme levels.
2.5.2
Non-Linear
It is hard to derive a mathematical model of the motor. This is due to the
fact that the motor parameters are hard to obtain. To complicate matters
further the values changes over time. As mentioned above the motor generates a lot of heat while running and the change in temperature will effect
the performance of the motor. Furthermore the travelling wave can only be
considered ideal at the resonance frequency (more on this in chapter 4), the
farther the driving frequency strides from resonance the harder it is to predict the motors behaviour. Finally the speed of the motor depends on the
input frequency, however the relation is not linear.[6]
19
Chapter 3
The System
This chapter will give a description of the driver circuit developed in the
previous project.
3.1
Overview
To get an understanding of the circuit the first thing that needs to be done
is to figure out what its role is in the system. The whole system can communicate through a I 2 C-bus, other signals include inputs to the circuit, current
position and wanted position. The output consists of the signals needed to
control the motor. In between the circuit converts the input signals to a
format that makes sense, put the signals through a regulating algorithm and
finally outputs a sinusoidal waveform.
Since the driving circuit is the last step before the motor and the only part
of the system that communicates directly with the USM, the circuit is placed
around the camera objective on top of the motor. This also means that the
circuit board is shaped like a ring. Its position relative to the camera can be
seen in figure 3.1.
20
Figure 3.1: A somewhat complete camera, the circuit is clearly visible around
the lens.
3.2
Circuit Design
This section will describe the three main parts of the system. Also present
in the design are a temperature indicator, electrostatic discharge protection
and a crystal oscillator that oscillates at 40 MHz and is the clock for the
CPLD.
Figure 3.2: The main blocks in the design.
3.2.1
Microprocessor
As in most embedded systems the microprocessor is responsible for most of
the computations in the system. In this case the MCU has a built in ADC
which comes in handy since the current position (labelled Pos in figure 3.2)
21
is an analogue signal. The signal is generated by a potentiometer that is
physically attached to the lens and thus will change value when the lens
moves. The signal is then converted to a discrete number and sent to the
regulator. The regulator in question is a traditional PID-regulator. The
regulator computes in which direction the motor needs to spin and how fast,
this is done by outputting a six bit number to the CPLD. This number tells
the CPLD at what frequency to run the motor, this is explained more in
section 3.2.2 This means that the speed of the motor, measured in Hz, can
only be one of 64 (26 ) predetermined values. So using a lookup table the
computed value is rounded to the nearest value.
The I 2 C-bus makes it possible for a user to communicate with the circuit
while the system is running. The bus makes it possible to manually set the
lens position or the running speed of the motor, it is also possible to change
the regulator’s coefficients, in essence the proportional (P), integral (I) and
derivative (D) coefficients.
3.2.2
Complex Programmable Logic Device
The CPLD block is basically a state machine with four states. When the
system is running and the wanted position does not equal the current position the CPLD loops through the states and each state means that one of
four output channels is set to logical one. The system clock runs at 40 MHz,
this means that one clock pulse has a time period of 25 ns. An easy way
of creating a square wave generator is to let the output signal be high for a
predetermined number of clock pulses. Let the square wave be logical one for
284 clock pulses and with 25% duty the that corresponds to a square wave
that runs at approximately 35 kHz. Add the six bit number from the MCU
and the output signal can range from 28 kHz to 35 kHz which is suitable for
the 65 mm motor. The output frequency can be expressed as a function of
this 6-bit number:
fout (n) =
1
,
(284+n)∗4∗25∗10−9
{n = 0, 1, 2, 3, ..., 63}
Figure 3.3 shows the output patterns generated from the CPLD while running, why this particular pattern is desired is covered in the next section. It
is also worth noting that if you reverse the order in which the signals goes
high, the motor will spin the other way.
22
Figure 3.3: Output signals from the CPLD while running.
3.2.3
The Inverter Stage
The CPLD will generate a digital signal, however the motor needs a analogue
signal to run. That is why there needs to be an inverter stage. There are
two identical inverters working in parallel where one generates phase A and
the other phase B.
The outputs from the CPLD are connected to the gate of a NMOS transistor,
in essence the transistor works as an ordinary switch. When the signal at the
gate is high the transistor is open and current flows through it. These drain of
these transistors are wired each respective end of a transformer with a middle
tap where the circuits power supply is connected. Consider the schematics
in figure 3.4, when channel 1 is logical one it will make current flow upwards
through the transformer and onwards through transistor N1. This will create
an amplified square wave in the right side of the transformer according to
the laws of inductance. When channel 2 is logical one the current will flow
downwards instead creating a negative square wave. The output can be seen
in figure 3.5.
23
Figure 3.4: The schematics of the inverter stage.
The outputs from the transformers are starting to resemble a sinusoidal
waveform and it will be more apparent once the motor is connected. As it
turns out the motor has a clear capacitive behaviour and will thus work as
a capacitive load, effectively creating a LC-filter. As mentioned in section
2.4.2 it is hard to pin point an exact value of this capacitance and it will
change overtime. However the closer the wave is to the resonance frequency
the more sinusoidal the inputs to the motor will become. Luckily the motor
does not require a perfect wave to run and with this set up the LC-filter is
good enough to provide a valid signal for all the relevant frequencies.
24
Figure 3.5: Inducted voltages at the secondary coil.
25
Chapter 4
Driving the Motors
This chapter will cover how the input frequency correlates with the speed of
the motor and as well similarities and differences between the two motors.
Furthermore it will also discuss the changes needed in the circuit design.
4.1
Speed Characteristics
Figure 4.1: Rotor speed versus drive frequency, fr marks the resonance frequency.
A typical frequency response of a non-specified USM is shown in figure
4.1. In other words, the graph will look like this no matter the properties
of the motor. However the exact numeric values will be unique for every
type of motor and to some degree even every individual motor. To get some
perspective, the range of input frequencies that will make the motor spin
allows 4f to range from somewhere between 2 to 6 kHz depending on the
specific motor. The resonance frequency can be at just the edge of the audible
sound (20 kHz) up to 5 MHz.
26
The speed of the motor is proportional to the amplitude of the vibrations
in the piezoelectric material. As mentioned in section 2.4.2 the generated
friction heat will affect the amplitude of these vibrations causing a drop off
in speed, it may be as much as 20%. To complicate matters further not only
do the speed decrease the resonance frequency (fr ) will change as well, it may
decrease by as much as 400 Hz [7]. Temperature will not decrease speed with
an equal amount over the whole frequency spectra, it will have a different
effect on each frequency level. Below is a rough illustration of how the rise
in temperature due to friction decreases the speed, the data was presented in
the Journal of power electronics [8]. The measurements have been performed
on a USM with a resonance frequency of around 40 KHz.
Figure 4.2: How temperature affect the output speed.
One further thing worth noting is that the load torque will also affect the
system. Load torque is the minimum amount of force the motor needs to
apply to the system to keep it stable. For example, imagine a motor in a crane
that lifts some kind of weight, the load torque is the force required to keep
the weight in place. If the load torque is increased the internal impedance
of the motor will increase and thus the input voltage needs to be increased
in order to make the system perform at the same level. The speed of the
motor will naturally decrease since the amount of work the motor has to do
has increased. This is however fairly linear, so it is possible to predict the
outcome beforehand with some accuracy. Since the required force to move
the camera objective is fairly predictable the load torque is constant for this
purpose.
27
4.2
Motor Diameter and Performance
This section will explain how the diameter of the ring motor affects the
performance. Figure 4.3 gives a graphic presentation of the results here.
4.2.1
Torque
The torque when the motor starts up is roughly some constant multiplied
with the diameter cubed. It can be assumed that the rated torque or in
other words the running torque is the starting torque times a constant. So
the torque is proportional to the diameter cubed [4].
T orque ∝ (Diameter)3
4.2.2
Speed
The speed is measured in revolutions per minutes (RPM). When there is no
load attached to the motor the speed is approximately inversely proportional
to the diameter. As in the previous section it is assumed that speed changes
due to different loads are the no-load speed times a constant. Hence the
speed is inversely proportional to the diameter.[4]
Speed ∝
4.2.3
1
Diameter
Output Power
The output power of an electrical motor is the product of the motors torque
and the angular speed. Given the results from the two previous sections the
output power in relation to the diameter of the motor will not be to difficult
to derive. The output power is proportional to the diameter squared. The
maximum output power is obtained at half the no-load speed since the motor
is most efficient then. Due to sliding and deformation the output power
decreases after this.
Output P ower ∝ Diameter2
28
Figure 4.3: The diameter of the motor and how it effects performance.
4.3
A Comparison of the Two Motors
This section will examine how the two motors differs. Both motors are manufactured by the Fukoku company. The larger motor bears the name High
torque 65 and will be referred to as HT65 in the following text, the other
motor is the Pencil 12 and will be labelled P12.
Specification
Diameter [mm]
Weight [g]
Resonance frequency [KHz]
Driving voltage [Vrms]
Power consumption [W]
Idling speed [rpm]
Rated speed [rpm]
Max torque [gcm]
Efficiency [%]
HT65
65
27
:31
30
≤1
≥ 65
≥ 60
≥ 800
≥ 20
P12
12
5
:59
70
≤ 1.2
≥ 500
≥ 400
≥ 50
≥ 10
Table 4.1: Some notable specifications for the two motors
29
4.3.1
Frequency
If the nodes in the piezoelectric material is placed with the same interval for
a smaller and a larger ring it falls naturally that the resonance frequency
will increase since the wavelength will decrease. The frequency range will
also increase if the stator thickness increases and since HT65 has a stator
thickness of 7 mm compared to the P12 which is 12 mm across the steep rise
of the resonance frequency is mitigated somewhat. In the end the value of
P12 is approximately double that of the HT65, this means that the CPLD
needs to work at double the speed compared to the original circuit. This
is not a problem per se, however it is an obstacle to overcome, especially
concerning the system clock. More on that in chapter 5.
4.3.2
Speed and Frequency
On the next page there are two graphs of motor speed and how it relates
to input frequency. Figure 4.1 showed a graph for a general motor, for the
purpose of this thesis the left side of the resonance frequency is not interesting. This is due to the fact that it is much harder to control the motor with
a regulator that works in that area. It has also been previously mentioned
that the resonance frequency is rather fickle and is prone to change while
running. Therefore it is advisable to only use frequencies 500 Hz or more
over the specified resonance frequency for your control algorithm. The motor
is fast enough without running it at maximum speed and the drawback of
having a situation arise where the regulator think it is increasing the speed
while it is in fact decreasing it makes it an unnecessary risk. Worth noting
about the graphs is that the one for HT65 was supplied by the manufacturer
and the one for P12 is measurements made during this project. Some immediate observations include the faster speed of P12 and that its active range
is about twice as large as for the HT65. The measurements where performed
with a minor load of a small metallic screw.
30
Figure 4.4: RPM vs. frequency, measurements of P12.
Figure 4.5: RPM vs. frequency, supplied by the manufacturer (HT65).
31
4.3.3
Torque and Efficiency
A look at table 4.1 shows that the torque is considerable smaller for P12 and
while this is a fact it does not have that large impact on the system. The
P12 has enough torque to move the camera lens however it will reduce the
speed of the motor by a larger fraction than for the HT65.
The power consumption is larger for the smaller motor and according to
figure 4.3 the output power is smaller. It follows that the power efficiency
will be worse than for the larger motor. Since the camera for which this
project is aimed at is a handheld device this is possible the biggest drawback
with P12.
4.3.4
Mechanical Differences
The P12 is lighter and smaller and while this looks good on paper the size
of the motor causes a mismatch in regards to the size of the motor and the
size of the camera lens. The HT65 is roughly the same size as the camera
lens and so they are assembled directly to each other. The P12 needs some
sort of mechanical help. While the HT65 is clearly a ring structure the P12
looks more like a disc at a first glance. There is a little hole though where a
screw can be fitted, this screw can be fastened directly to the camera lens or
it could be connected to a cog wheel, essentially creating a gear.
In the case without gears the inertia of the camera lens would be greater
than that of the motors rotor, this will reduce the motors acceleration and
retardation. In the other case where a gear is placed between the motor
and the camera lens it will reduce the overall speed of the system, but will
maximize the possible torque[4]. The latter case is preferred here since the
system will become quicker and stronger and that is more valuable than pure
speed. There is however another drawback with this design and that is space,
a gear will need more space which will force the motor to be placed outside
the ring and the camera objective.
32
Figure 4.6: A possible gear solution.
4.4
Changes in the Circuit
The driving voltage for the P12 is more than twice the amount of the required
voltage for HT65. This means that the transformers in the circuit will need
to be replaced by new ones with a larger ratio between the number of turns
on each coil. If for some reason it is desired to use the same circuit to drive
a number of different motors the new transformers will not stand in the way.
A higher Vrms will make the larger motor go faster, since the expansions and
contractions in the piezoelectric material will be stronger. So this will need
to be adjusted for, otherwise this is not a problem.
There is a small difference when it comes to the FPC. P12 has the three
normal inputs, phase A, phase B and ground, the same is true for HT65.
HT65 has one additional output as well, a feedback node which is used to
determine the speed of the rotor. This node is not connected in the original
design though so it will not make this project any harder. However the three
inputs are not in the same order on the two motors which means that some
rewiring is required.
Changes and additions in the VHDL- and C-code and the electronic design
will be discussed in later chapters.
33
Figure 4.7: The circuit board after the necessary changes.
4.5
End of Applied Study
Due to some restructuring at Flir Systems there has been a lack of necessary
equipment and material to finish the thesis as it was originally intended. Everything so far has been tested on a real camera objective and works well,
the motor can spin in either direction and the circuit board can communicate with the camera system. However, it has not been possible to test the
regulator while downloaded into the microprocessor and thus the rest of this
report is based on simulations and a theoretic study.
34
Chapter 5
The Regulator
At this point it is possible to drive the motor in both directions and at some
predetermined frequencies. Since the aim of the project is to develop a circuit
that can put the lens in focus without human intervention there needs to be
a regulator. This chapter will give a brief explanation of the PID controller
and how it was implemented.
5.1
PID Controller
PID stands for proportional, integral and derivative and is a common way
to regulate a system. One does not need to have complete knowledge about
the underlying system to create a working PID controller and that is one of
its strengths. Even if it is not possible to measure noise affecting the system
the controller will handle it since there is a feedback loop. The three parts of
the PID controller are more or less independent and it is possible to create a
working regulator with only one or two parts, in some cases it is even desired.
Figure 5.1: A general PID controller.
36
5.1.1
Proportional Regulating
u(t) is the desired output signal and y(t) is the actual one, subtract those
two signals and you get the current error signal e(t). Proportional regulating
simply means that the error signal is amplified by a constant Kp (or reduced).
This is the most commonly used feedback controller and have been around
since ancient times [9]. For the application of this thesis this part of the
regulator means that the farther away the lens is from the target position
the faster the motor spins. This type of regulating requires a non zero error
and thus the term P0 is introduced. The proportional part is given by:
Pout = Kp e(t) + P0
5.1.2
Integral Regulating
By just using proportional regulating it is not possible to completely eliminate noise or disturbance. The integral term is the sum of the past errors.
For the purpose of this thesis it calculates how much closer the lens is to the
target point now than it was in the beginning, compares that with how much
distance left and adjusts speed accordingly. The integral term speeds up the
system, but there are some dangers. Set the Ki value too high and there is a
risk that the regulator will overshoot its target, that is not necessarily a bad
thing, but if the overshoots becomes bigger and bigger that means trouble.
Overuse of past values will as a rule lead to instability [9]. Its greatest contribution is that it eliminates the steady state error, or the error when the
regulator has made its target. The integral term is given by:
Iout = Ki
5.1.3
Rt
0 e(t) dt.
Derivative Regulating
Relying too much on measured values can lead to instability, that is why
a derivative term is introduced. This term gives the regulator a chance to
predict future errors and therefore it can adjust for those errors before they
happen. What happens is that this term slows down the rate of change and
tries to decrease or eliminate overcompensating of the system. This term can
also cause instability, since the term is derivative it is sensitive to transients
caused by noise. This term is given by:
Dout = Kd dtd e(t)
37
If the proportional part is added the following terms are obtained through
Taylor series [9]:
x(t) = Kp e(t) + Kd dtd e(t) ≈ Kp e(t + τD )
Kd
τD = K
p
Where τD is how far the system can plan ahead.
5.1.4
The whole regulator
Figure 5.1 and the previous sections gives the following expression for the
whole regulator:
x(t) = Kp e(t) + Ki
5.2
Rt
0 e(t) dt.
+ Kd dtd e(t)
Tuning the System
The ground rules are now established, but we still need some way to determine the values of Kp , Ki and Kd . A good start is the Ziegler-Nichols
method.
5.2.1
Ziegler-Nichols Method
The Ziegler-Nichols method was developed by John G. Ziegler and Nathaniel
B. Nichols and was published in their book Optimum settings for automated
controllers from 1942. To determine appropriate values for the PID controllers coefficients begin by disconnecting the integral and derivative terms,
in essence setting Ki and Kd to zero. Now by set the value of Kp on the edge
of a stability or in other words make the signal oscillate at a constant amplitude around its target value. Note which value was obtained, in the table
denoted as Ku , and what the time period of the oscillation was, denoted Tu .
There is no guarantee that this will produce a good regulator, but in most
cases it will be a good starting point. At least one of the proposed set of
values will. [9]
Regulator
Normal PID
Some overshoot
No overshoot
Kp
3Ku
5
Ku
3
Ku
5
Ki
6Ku
5Tu
6Ku
5Tu
6Ku
5Tu
Kd
3Ku Tu
40
Ku Tu
5
Ku Tu
5
Table 5.1: Ziegler-Nichols coefficients for a few PID controllers
38
5.2.2
Manual Tuning
Chances are that the solution provided by Ziegler-Nichols is not perfect so
some tuning will be required. So below is a list of all the coefficients and how
an increase in the coefficients value will affect the system.
Coefficient
Kp
Ki
Kd
Coefficient
Kp
Ki
Kd
Rise time
Overshoot Settling time
Decrease
Increase
Small increase
Decrease
Increase
Increase
Minor increase
Decrease
Decrease
Steady state error
Stability
Decrease
Degrade
Eliminate
Degrade
No effect
Improve (if Kd is small)
Table 5.2: How an increase in a coefficients value will affect the system
5.3
The Model
The system was simulated in Simulink. However, to do that a model of
the system needs to be created. The model in itself is rather simple, just a
lookup table that outputs a certain speed given a certain frequency based
on figure 4.4. There are some complications however, since the regulator is
implemented on the MCU that regulator can not be continuously running
since the processor has other tasks that also needs be taken care of. This
means that the regulator needs to function in the discrete time domain, the
principle for the discrete PID-controller is the same as for time continues
controller. This is the obtained expression:
u[n] = Kp e[n] + Ki
n
P
i=−∞
e[i] + Kd (e[n] − e[n − 1])
Note that Kd is a coefficient divided by the sample time. In the frequency
domain the expression looks like:
z
+ Kd z−1
)
U [z] = E[z](Kp + Ki z−1
z
This type of expression can be handled by Simulink which will be used to
simulate the system. To directly translate this expression into C-code can
be quite awkward so the expression will be rewritten so the system can be
39
realized using only the input and output signals, adders, multipliers and unit
delays.
U [z]
E[z]
U [z] 2
(z
E[z]
=
Kp z(z−1)+Ki z 2 +Kd (z−1)2
z(z−1)
− z) = Kp (z 2 − z) + Ki z 2 + Kd (z 2 − 2z + 1)
U [z] = E[z](Kp (1 − z1 ) + Ki + Ki (1 −
2
z
+
1
))
z2
+
U [z]
z
From the above expression the model in figure 5.2 is obtained.
Figure 5.2: The model used for simulating the motors behaviour during
regulation.
5.4
Regulating the Motor
Ziegler-Nichols method can still be used even though the system operates in
the time discrete domain. By replacing Tu in table 5.1 with Td = TTus where
Ts is the sample time of the system making Td the number of samples in a
period. The sample time chosen for the simulation is 0.05 seconds and the
target signal for the regulator is the unit step. In reality the sample time
will be smaller than the one chosen, the reason for this rather large value is
to really test the performance of the regulator. It will therefore most likely
perform better than the results of these simulations indicate.
40
The first step is as previously mentioned to set Ki and Kd to zero and
find a value for Kp which makes the ouput signal oscillate at a constants
amplitude. The signal oscillates between zero and two and with the target
signal at one the amplitude has to be considered very large. This was obtained at Ku = 201.9 and the measured Td = 6 and can be seen in the figure
5.3.
Figure 5.3: The first stage of Ziegler-Nichols method.
Using the values for a normal PID-controller from table 5.1 the newly acquired values of Ku and Td will calculate the values of the controller coefficients. These values gives a raw regulator pictured in figure 5.4.
Figure 5.4: Result after Zeigler-Nichols method.
41
The result after Ziegler-Nichols is a crude regulator, it might be enough
for the purpose of this thesis, but there are a lot of room for improvement.
Table 5.2 explains how an increase in a coefficient affects the regulator, using
this the regulator can be improved. The performance values most in need of
a boost seems to be to decrease settling time and the overshoot. This can be
achieved by increasing Kd and maybe decreasing the other two coefficients.
Figure 5.5: The simulation result after some manual tuning.
The overshoot has been drastically improved, there are also some improvements regarding rise time and stability. The settling time seems to be about
the same and may be hindered by the system, in essence the motor, to improve beyond the current value.
42
5.5
Poles and Phase Margin
The pole placement and phase margin of the open loop system is of interest.
The feedback in figure 5.2 needs to be removed and then by using the linearisation tool provided in Simulink the poles and phase margin can easily
be computed. Simulink provides the following pole zero diagram in the continuous time domain: There is a pole in origin, since this model is based on
Figure 5.6: The pole zero diagram of the open loop.
approximations and ideal behaviour that means that there is a risk that the
real part of the pole is larger than zero and thus making the system unstable.
Simulink also provides a bode plot which is shown below.
Figure 5.7: The bode plot of the open loop.
43
The circuit amplifies signals with low frequencies, as the frequency increase the gain decreases and levels out at around 11 rad/s where the gain is
-18 dB. The phase margin is approximately 40 degrees, this paired with the
behaviour of the system makes it likely that the system is indeed stable.
44
Chapter 6
Improvements
At this point the system will be able to drive the motor and move the lens
to a specified position. In theory it will at least perform adequately. There
are still things that can be improved though which will be discussed in this
chapter along with advantages and disadvantages of different solutions.
6.1
Evaluation of the Current Circuit
All in all the current circuit is well designed and there is no solution that is
obviously better. The MCU lets the user interact with the system even while
the system is running thus making the system versatile. It simplifies the
development process since you can manually set position, motor frequency
and regulator coefficients and also read those values. Furthermore the user
is also capable of starting and stopping the system. Of course the MCU
could be programmed to read and write other information as well as per the
developers wishes. The CPLD is necessary since as mentioned in chapter 5,
the processor has other tasks that needs doing and the signal generation is
an ongoing process that should not be interrupted.
There is one thing that could use quite a lot of improvement in the current
design though and that is the system clock. With the way the signal generation works (explained in section 3.2.2) the period length of the driving signals
is an integer multiplied by the period length of the system clock. However,
since there are four signals that needs to be generated and only one can be
active at a single time it follows that the smallest amount the period length of
a given driving signal is 100 ns or in other words four times the system clock
period length. This is fine for larger motor where there is approximately
50 valid values between 30 and 35 kHz and they will all make HT65 spin.
46
Between 60 and 65 kHz which is the active frequency range for P12 there are
only 13. This will negatively affect the regulators performance. Probably
the best solution would be to just replace the crystal oscillator with one that
oscillates at a higher frequency. If the system clock can not be changed for
some reason there are other ways to mitigate this flaw. There are plenty of
room left on the CPLD and below two solutions to double the number of
valid values is presented.
6.1.1
Clock Doubler
Figure 6.1: The schematics for a simple clock doubler.
One way to solve the current problem is to create a new clock signal. The
model in figure 6.1 is bases upon the fact that there is a propagation delay
in every gate and flip-flop. When the system clock toggles it will take one
Combinatorial logic delay (Tilo ) for the new clock signal to go high, it will
remain high for the sum of the time clock to Q-delay on the flip-flop and
another two Tilo due to the inverter and XNOR gate and the result should
be around 2 ns. Since there is 12.5 ns between toggles on the system clock it
means that the duty cycle of the new clock signal will be small, but as long
as the clock edges are detected by the CPLD this will not be problematic.
To increase the duty cycle more inverters and flip-flops could be added to the
design. This solution is not considered pretty since the quality of the clock
signal will decrease and should therefore not be a designers first choice [10].
47
Figure 6.2: The signals and how they affect each other.
6.1.2
Double Counter
The purpose of the clock on CPLD chip is to count clock pulses, it only counts
the positive edges though. That means that a system could be designed where
two counters work in parallel, with one counter counting the positive edges,
one the negative edges and the add the results together. The CPLD can only
handle flip-flops that triggers on either the rising or falling edge so one have
to be chosen for the entire CPLD. This can be circumvented by introducing
an inverter in front of one of the counters at the cost of a small delay which
is manageable. The block diagram of the counter can be seen in figure 6.3,
the wave generator is just a state machine.
Figure 6.3: Block diagram of how the double counter is implemented.
48
6.1.3
Results
The effects of the solutions proposed in section 6.1.1 and 6.1.2 are the same
for the user. Figure 6.4 shows the results if one of these solutions are implemented, the solid line is the regular one and the dashed line is the output
when the counter works at double the speed. Everything seems to improve,
the rise time is slightly better, the overshoot is less and the settling time is decreased. Notice that this simulations differs from the one presented in figure
5.5, this simulation was performed to emphasise the difference between the
modified and the regular solution. These results may look a little better than
they will appear in reality, however the previously mentioned improvements
occurs for all simulations.
Figure 6.4: Solid line, unmodified; Dashed line, double counter speed.
6.2
Ideas for the Regulator
Simulations will only get you this far. The next step would be to hook up
the motor to the camera objective and get a lot of measurements of how the
system performs. The regular PID controller might not work at a satisfactory
level even after some tweaking of the coefficients so below are two quick fixes
that might improve the systems ability to regulate.
49
6.2.1
Derivative Term
The purpose of the derivative term is to improve stability, it does just that
in effect by dampening the system. However as a function of the regulator
error the term is vulnerable to sudden changes in the input value which will
create an abnormally large derivative term [11]. This can be remedied by
letting the term be dependent on the current position instead, thus making
the term measure the actual speed of the camera lens rather than by how
fast the error is decreasing. This should make the system more stable and
less erratic. So the new transfer function for the controller would be:
u[n] = Kp e[n] + Ki
n
P
i=−∞
e[i] + Kd (y[n] − y[n − 1])
U [z] = E[z](Kp (1 − z1 ) + Ki ) + Y [z]Kd ( z1 −
6.2.2
1
)
z2
+
U [z]
z
Limiting the Error
The integral term is the sum of all past errors, hence unusually large errors
can affect the system and decrease performance. Therefore it can be beneficially to set a maximum limit for the error. The position is given by a 16 bit
number and the error can potentially be of the same magnitude. By limiting
the error to a number with less than 16 bits the overall performance of the
system may improve.The regulator will experience a decrease in rise time,
but hopefully an increase in settling time and decrease in overshoot.
50
Chapter 7
Conclusion
The purpose of this thesis was to find it if it would be possible to modify an
existing autofocusing system to make it work for a smaller motor. With a
fair amount of certainty it can be concluded that, yes it is possible. The only
doubt would be that the since the smaller motor is not as powerful as the
larger one it may not be able to drive the lens at a satisfactory level. The
effects of how heat affects the motors performance is not entirely clear.
As long as the transformers are matched to the required input voltage of a
specific motor it would be fairly easy to configure the circuit board for any
motor, so the results are not just limited to the motors used in this thesis.
Regardless of the size of the motor it should probably be placed outside the
camera objective and thus make the motor drive geared. This will mean that
the system will be quicker and stronger at the cost of maximum speed. A
trade worth making in this case.
The goal on the horizon was to make a circuit that performs on the same level
as the original circuit, here the results are inconclusive. Due to limitations
in tools and no possibility to connect the motor to an actual camera lens the
results are in a large part theoretical. The concrete results have shown that
the circuit board can drive the motor, but the circuits ability to regulate
is not certain. The simulations and knowledge about the previous system
indicates that it will not be a problem, but there is no way to be sure before
real live tests.
52
Bibliography
[1] Texas
Instrument
MSC1202
data
sheet,
available
http://pdf1.alldatasheet.com/datasheet-pdf/view/104509/BURRBROWN/MSC1202.html (2012-07-15)
at
[2] MCS 51 Microcontroller Family User’s Guide, February 1994, Publication
number 121517, Intel Corporation
[3] Homepage of the SDCC project, http://sdcc.sourceforge.net/ (2012-0614)
[4] Toshiiku Sashida and Takashi Kenjo, An introduction to ultrasonic motors, Oxford university press, 2001
[5] Ilie Romaniuc, An introduction to ultrasonic piezoelectric motors, AGIR
bulletin nr. 4/2011, available at http://www.agir.ro/buletine/1048.pdf
(2012-07-16)
[6] Güngör Bal, A digitally controlled drive system for travelling-wave ultrasonic motor, Gazi University, 2003
[7] Tomonobu Senjyu, Katsumi Uezato and Hiroshi Miyazato, Adjustable
speed control of ultrasonic motors by adaptive control, IEEE Transactions
Power Electronics, vol. 10, no.5, 1995
[8] Tomohiro Yoshida, Tomonobu Senjyu, Mitsuru Nakamura, Naomitsu
Urasaki, Toshihisa Funabashi and Hideomi Sekine, Sensorless control of
ultrasonic motors using neural network, Journal of Power Electronics, vol.
6, no.1, 2006
[9] Torkel Glad and Lennart Ljung, Reglerteknik, Grundläggande teori, Studentlitteratur, 2006
[10] Peter Alfke, Six Easy Pieces,
http://www.pldworld.com/_xilinx/html/tip/sixeasypieces.htm
(2013-01-10)
53
[11] AVR221:
Discrete
PID
controller,
available
http://www.atmel.com/images/doc2558.pdf (2013-01-31)
54
at
Typ av publikation
Examensarbete
Institution och avdelning
ISY
Department of electrical engineering
ISBN (licentiatavhandling)
ISRN
LiTH-ISY-EX--13/4659--SE
Serietitel (licentiatavhandling)
Serienummer/ISSN
(licentiatavhandling)
Språk
Engelska/English
Antal sidor
54
Presentationsdatum
2013-04-25
Publiceringsdatum (elektronisk version)
URL för elektronisk version
http://urn.kb.se/resolve?urn=urn:nbn:se:liu:diva-4659 (Ersätt xxxx med det korrekta numret)
Publikationens titel
Driver circuit for an ultrasonic motor
Författare
Henrik Ocklind
Sammanfattning
To make a camera more user friendly or let it operate without an user the camera objective needs to be able to put the
camera lens in focus. This functionality requires a motor of some sort, due to its many benefits the ultrasonic motor is a
preferred choice. The motor requires a driving circuit to produce the appropriate signals and this is what this thesis is about.
The
main difficulty that needs to be considered is the fact that the ultrasonic motor is highly non-linear.
This paper will give a brief walk through of how the ultrasonic motor works,its pros and cons and how to control it. How the
driving circuit is designed and what role the various components fills. The regulator is implemented in C-code and runs on a
micro processor while the actual signal generation is done on a CPLD. The report ends with a few suggestions of how to
improve the system should the presented solution not perform at a satisfactory level.
Antal sidor:
54
Nyckelord
Ultrasonic motor, electronics, regulator, CPLD, micro processor, embedded system