Sunteți pe pagina 1din 56

Nonlinear Controller Design for

Linear Motion Systems

T.M.P. Gommans
DCT 2008.073

Bachelor thesis

Thesis Committee:
prof. dr. ir. M. Steinbuch (supervisor)
dr. ir. M.J.G. van de Molengraft (coach)
ir. W.H.T.M. Aangenent (coach)

Technische Universiteit Eindhoven


Department Mechanical Engineering
Dynamics and Control Technology Group

Eindhoven, May, 2008


Abstract

Linear feedback control has fundamental limitations. An example of such a limitation is Bode’s
gain/phase relationship. This naturally rises the question whether these fundamental limitations
can be ameliorated by the use of nonlinear feedback. Introducing nonlinearities might seem dis-
advantageous, but in literature many nonlinear controller concepts are presented that enhance the
performance.

For the parameter tuning of these nonlinear controllers there are no rules-of-thumb, like there are
for tuning linear controllers. Therefore, the parameter optimization can become quite tedious. A
method to overcome this problem is the parameter optimization using an evolutionary algorithm.
These evolutionary algorithms require a function to obtain an objective value for the successfulness of
an individual. To be able to evaluate nonlinear controllers, this so-called fitness function is based on
time domain characteristics only.

The evolutionary algorithm uses the fitness function to optimize the step responses of a PID controller
and several nonlinear controller concepts. Each of the optimized nonlinear controllers can perform
better than the linear PID controller.
Contents

1 Introduction 3

1.1 Problem statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4

1.2 Report outline . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4

2 Genetic Algorithm 5

2.1 Background . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

2.2 Fitness function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

2.2.1 Performance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6

2.2.2 Stability robustness . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7

2.2.3 Actuator limit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8

2.2.4 Error handling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8

2.2.5 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9

2.3 Genetic Algorithm toolbox . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10

2.3.1 Population options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10

2.3.2 Fitness scaling and selection . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10

2.3.3 Genetic operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10

2.3.4 General remarks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11

3 Nonlinear controllers 13

3.1 SPAN filter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15

3.2 Driven limiter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16

3.3 Nonlinear gain element . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17

3.3.1 Saturated gain . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17

3.3.2 Gain divided in two parts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18

1
4 Controller optimization using GA 19

4.1 Controller optimization for linear systems . . . . . . . . . . . . . . . . . . . . . . . . . 19

4.1.1 PID controller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20

4.1.2 Controller with a SPAN filter . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22

4.1.3 Controller with a driven limiter . . . . . . . . . . . . . . . . . . . . . . . . . . . 24

4.1.4 Controller with a nonlinear gain element divided in two parts . . . . . . . . . . 26

4.1.5 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27

4.2 Controller optimization for nonlinear systems . . . . . . . . . . . . . . . . . . . . . . . 28

4.2.1 PID controller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28

4.2.2 Controller with a SPAN filter . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29

4.2.3 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31

5 Conclusions and recommendations 33

5.1 Conclusions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33

5.2 Recommendations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34

Bibliography 35

A Nomenclature 37

B Fitness function 39

C Describing functions 43

D PATO-system 45

D.1 Frequency response function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46

D.2 Coulomb and viscous friction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48

E Additional Figures 49

E.1 Simulink models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49

E.2 Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52

2
Chapter 1

Introduction

Since the seminal work of Bode [4], in literature there has been considerable interest on the topic of
fundamental limitations in feedback systems with known plant dynamics. Some of the limitations
do not depend on how the input is generated, because they are inherently linked to the plant. These
limitations cannot be ameliorated by a controller, regardless of whether the input is generated by lin-
ear, nonlinear, time invariant or time dependent feedback. Other limitations are introduced by using
linear time invariant (LTI) feedback.
To ensure a good response the open-loop system requires either one or both of the following proper-
ties: (i) a reduction of the gain with increasing frequency, or (ii) a phase lead with increasing frequency
[15]. This tradeoff can also be shown by the need for a high gain at low frequencies and sufficient band-
width. Contrarily, to suppress sensor noise and residual vibrations, the gain needs to be low at high
frequencies. This performance trade-off is defined by Bode’s gain/phase relation. This relation limits
how fast the open loop gain can cross unity gain, while maintaining sufficient phase lead to stabilize
the closed-loop system.
When use is made of linear networks for stabilization, a reduction in the gain is accompanied by a
phase lag, where phase lead is always accompanied by an increasing gain. Levinson shows that a com-
bination of high frequency gain reduction in combination with phase lead is impossible with linear
circuits [15].
The question arises whether or not it is possible to attenuate these limitations by using nonlinear or
time varying feedback instead of LTI feedback. Due to the difficulties and bad effects normally as-
sociated with the presence of nonlinearities it may seem like a step back to intentionally introduce
nonlinearities into an otherwise essentially linear system. The principle of superposition no longer
holds, so it becomes a problem to predict the system response for various inputs. However, in litera-
ture, [1], [3], [5], [7], [8], [13], [16], [17] and [19], good reasons for intentionally introducing nonlinearities
are given. Such as the possibility of phase lead with gain reduction.
Designing nonlinear feedback controllers can become quite tedious, since the classic rules-of-thumb
used to design linear controllers no longer apply. The last decades, some promising results have been
achieved in the field of controller optimization based on evolutionary algorithms. Therefore it is in-
teresting to know whether a Genetic Algorithm (GA) can be used to design nonlinear controllers. The
algorithm will search for an optimal solution to meet the requirements specified in the fitness func-
tion.
The controllers designed in this thesis belong to the class of servo or positioning systems. These con-
trollers act on the difference in desired and actual measured position of a moving mass in order to
track a reference signal. The used reference signals are step functions.

3
1.1 Problem statement

The problem statement can be summarized as follows:

Investigate the possibilities of designing high-performance nonlinear controllers which outperform classical
linear controllers for linear motion systems using a genetic algorithm.

1.2 Report outline

To solve the problem stated above, the genetic algorithm is introduced in Chapter 2. This chapter also
discusses every aspect of the fitness function and the settings of the evolutionary algorithm. Three
concepts of nonlinear controllers are introduced and discussed in Chapter 3. Chapter 4 is split in two
parts. Section 4.1 discusses the optimization of nonlinear controllers for linear motion systems. Due
to problems with friction this did not give any experimental verification of the optimized nonlinear
controllers. Therefore friction is added to the model and the nonlinear controllers are optimized for a
nonlinear motion system in Section 4.2.

4
Chapter 2

Genetic Algorithm

2.1 Background

A genetic algorithm is a stochastic global search and optimization method that mimics the metaphor
of natural biological evolution [12]. The GA is operated on a population of potential solutions. By
applying the principle of "survival of the fittest" it produces successively better approximations of a
solution. The successfulness of all the individuals is taken into account when the next generation is
created. Each new generation consists of a new set of approximations. This set is based on selection
of individuals according to their fitness in the problem domain and reproducing them using operators
borrowed from natural genetics. This process leads to the evolution of the population, so that the in-
dividuals in this population are better suited to their environment than the individuals they originated
from. With the continuing performance improvements of computational systems genetic algorithms
become a more and more powerful tool.

2.2 Fitness function

The genetic algorithm has to find the "best" solution to a problem. To do this it needs to be able to
objectively "measure" the quality of an individual. This measure is called the fitness of the individual.
The fitness function is responsible for testing the individual as a solution to the problem, interpreting
the results and assigning the fitness score f . It is common to define zero as the optimal fitness score.

Creating a fitness function for controller design has to be done carefully. Each controller has to be
judged properly, otherwise the GA will create bad performing controllers with an apparently good
fitness value. The GA optimizes what the user specifies, no more, no less. So it is important that the
judging criteria are well formulated.
The criteria in the fitness function are based on the time domain. Frequency domain criteria (e.g.
bandwidth, maximum sensitivity) will not be used. This way it is possible to evaluate linear and
nonlinear controllers with the same fitness function and compare the results.

The criteria for a controller, in a system that follows a step reference, are merged in groups depending
on their goal. These groups will be discussed below.

5
2.2.1 Performance

Direct performance requirements for a unit step response are time-domain based, such as rise time,
settling time, and overshoot (see Figure 2.1). The rise time Tr is the time it takes to get from 10% to
90% of the step value. The settling time (Ts ) is specified as the time after which the difference between
the plant output and the reference trajectory stays within a specified tolerance band. This tolerance
band is here chosen ±0.5% of the step value. The overshoot (Os ) is defined as the maximum value
minus the step value, divided by the stap value. This value for the overshoot is usually displayed as a
percentage by multiplying with one hundred. Another measure of performance is the integral of the
absolute error (IAE). Keeping this low means a fast response, low overshoot and a fast settling time.
The amplitude of the step reference is defined as samp and the total simulation time as Tsim . Using
y(t) as the plant output and r (t) as the reference signal the error is defined as e(t) = r (t) − y(t). With
these definitions the performance criteria can be summarized by:

Tr = max(T |y(t) ≤ 0.9 · samp ) − max(T |y(t) ≤ 0.1 · samp )

Ts = max(T |abs(e(t)) ≥ 0.002 · samp )

max(y(t))
Os = · 100%
samp
Z Tsim
I AE = |e(t)|dt
0

Figure 2.1: Performance criteria

6
2.2.2 Stability robustness

The maximum value of the sensitivity function is a measure for the stability robustness. This can be
interpreted as the reciprocal of the distance to the point −1 in a Nyquist plot. Stability robustness is
defined as the property that the closed-loop system remains stable under small changes of the plant
and compensator dynamics. The vector margin (see Figure 2.2) can be approximated by a combination
of two other margins: the gain margin and the delay margin. The gain margin κm is the smallest
positive number by which the Nyquist plot must be multiplied to pass the critical point −1. The
delay margin τm is the largest time delay such that, for any delay less than or equal to this value, the
closed-loop system remains stable.

Figure 2.2: The vector margin

When designing nonlinear controllers, the maximum sensitivity value can not be used as a measure
for stability robustness since it is not well-defined. A time domain based measure is introduced by
Dolsma [6]. The delay margin τm and the phase margin φm are linked by the frequency w ∗ at which
the phase margin is determined, see Eq. 2.1.
φm
τm = ∗ (2.1)
w
In order to determine the delay margin τm , both φm and w ∗ must be known. For φm the desired
phase margin is chosen (e.g. 30◦ = π6 rad). In the frequency domain, w ∗ is simply defined as
the bandwidth. Roughly speaking, the bandwidth is related to the rise time by w ∗ = T1r when the
nominal closed-loop system tracks a step signal. In other words, a system with a high bandwidth has
a good tracking performance, and therefore a short rise time. By relating the bandwidth to the rise
time Dolsma proposes τm = φm · Tr . By applying the delay perturbation τm and gain perturbation
κm simultaneously the perturbed closed-loop system is obtained. A bounded plant output is seen as
a stable system, a typical bound is defined by |y(t)| ≤ 2 samp . So if the perturbed closed-loop system
exceeds this bound, it has to be rejected because it is not robust enough. The bound check is done from
0.8T < t < T , with T the simulation time. This way it only rejects instability and not robust systems
with a large overshoot. Rejecting systems that do not pass the robustness test, is done by assigning the
maximum fitness value of f = 1010 , the individual then becomes the worst of the generation. This
minimizes the chance of these bad designs being selected for future generations.

At first a phase margin φm = 30◦ was applied, but all controllers got rejected and were assigned the
maximum fitness value. This occurred even for controllers that were successfully implemented on
the physical system. The problem was due to the large delay margin. When a phase margin φm = 6◦
is applied, the controllers successfully implemented on the physical system are accepted. The time
by which the nominal plant is delayed by this perturbation is reduced by a factor five. To see if this
did not attenuate the robustness by too much, the model based controller designs are tested on the
physical system.

7
Dolsma also shows (Figure 2.3) that although the response of the perturbed plant remains bounded
for the length of the simulation (which is two seconds), the system can still be unstable. If the length
of the simulation is extended, the response exceeds the 2 samp bound and is actually unstable. The GA
does not notice this and the system passes the stability robustness test of the fitness function. So the
GA is only able to identify robustness problems if they occur within the simulation time.

Figure 2.3: Trajectory response with a perturbed plant

2.2.3 Actuator limit

Every actuator can provide a finite amount of power. The plant input is limited to prevent the creation
of unrealistic controllers with too high gains. Applying these high gain controllers would result in
performance and stability issues. The used amplifier in the PATO setup (see Appendix D) has an
actuator limit u max of 2.5 Volts.

2.2.4 Error handling

Controllers represented by stiff differential equations often consume a lot of simulation time. If after
a user specified time the simulation is still running due to these problems, the simulation is aborted,
and the maximum fitness value is returned. When any other type of error occurs, the simulation is
also aborted and the maximum fitness value returned. This minimizes the chance of these designs
being selected for future generations.

8
2.2.5 Summary

The total design of the fitness function can be dived in three parts: (I) Determine step rise time of the
closed-loop system to calculate the delay perturbation. (II) Determine performance for the nominal
plant. (III) Test if the perturbed plant remains bounded. Parts I and II are done in one simulation
with the nominal plant, part (III) is done with a second simulation. In both simulations the system
follows a step reference. Since part (I) and (II) consist of only one simulation, the simulation error
penalty is only applied once.

In order to obtain a good balance in penalty between overshoot and settling time, these penalties are
scaled by a and b respectively. The parameters a and b are tuned by trial and error to obtain a good
result.

• Part I: Determine the rise time of the closed-loop system to calculate the delay perturbation.
- If simulation error then abort simulation: f = 1010
- Calculate delay: τm = φm · Tr
• Part II: Determine performance for the nominal plant with step reference.
- Settling time penalty: f = f + Ts /a
- Overshoot penalty: f = f + Os /b
- Integral absolute error penalty: f = f + I AE
- Actuator limit penalty: if |u| > u max then f = f + 105
• Part III: Determine whether the perturbed closed-loop system remains bounded.
- If simulation error then abort simulation: f = 1010
- Robustness test: if |y(t)| > 2 samp with 0.8T < t < T then f = 1010

For an example of the fitness function code see Appendix B.

9
2.3 Genetic Algorithm toolbox

To be able to use a GA, a measure for the quality of an individual is needed. By introducing the fitness
function this measure is available. Using the information on the successfulness of the individuals of
the current generation, the GA creates a new generation. Matlab contains a graphical user interface
(GUI) for the Genetic Algorithm Toolbox, which is opened by the command gatool. The evolutionary
settings will be discussed below. The GUI also contains several options for plotting progress and
writing output, these do not contribute to the evolutionary effectiveness and will therefore not be
discussed.

2.3.1 Population options

A GA run starts with the creation of a population. A population is a group of individuals, where each
individual contains the parameters of the controller that will be optimized. The number of parameters
depends on the type of controller and can vary. The population type is set to be a double vector. The
population size specifies how many individuals are in each generation. This population size is a key
parameter in a GA run, it can determine whether a simulation is successful or not. The creation func-
tion specifies the function that creates the initial population. The default creation function Uniform
creates a random initial population with a uniform distribution. With the initial population option
a user defined initial population can be used. This option can be used to put so called seeds in the
optimization. These seeds can contain a priori knowledge.

2.3.2 Fitness scaling and selection

The fitness scaling function converts raw fitness scores returned by the fitness function to values in
a range that is suitable for the selection function. The fitness function is designed with high fitness
scores for erroneous individuals so they have a minimum chance of reaching te next generation. The
selection method explained below is tournament selection. For this method it is irrelevant if the
fitness scores are scaled by rank (rank of the fittest individual is 1, rank of the second fittest is 2 etc),
or proportional to the fitness value.

The quality of each individual is objectively determined by the scaled fitness function. To produce
offspring for the next generation a selection criterium has to be used. The selection function chooses
parents for the next generation based on their scaled values from the fitness scaling function. A
common used approach is the tournament selection method. This function randomly selects a group
of individuals, the size of this group can be determined by the tournament size. The individual with
the lowest fitness value is chosen as a parent for the next generation. This proces is continued until
population size of the next generation is reached. The tournament size is a key parameter, with a large
tournament size only the best individuals are selected. This results in a fast decay of the population
diversity and increased risk of aiming at local optimum.

2.3.3 Genetic operators

To produce the next generation, the selected parents are reproduced using operators known from natu-
ral genetics, such as: crossover, mutation and migration. It is possible to preserve the best individuals
of the generation, this is called elitism. Elites do not undergo any genetic operations. The parameter
elite count determines the number of elites.
The crossover operator combines genetic material of two parents by swapping a part of one parent
with the other. If the population has a high diversity this allows large jumps in the search space. The

10
crossover fraction specifies the fraction of the next generation, other than elite individuals, that are
produced by crossover. The remaining individuals, other than elite individuals, in the next generation
are produced by mutation.
Mutation functions make small random changes in the parameters of parents, which provide genetic
diversity and enable the GA to search a broader space. The mutation function is set to Gaussian.
Gaussian mutation adds a random number to each vector entry of an individual. This random num-
ber is taken from a Gaussian distribution centered on zero. The variance of this distribution can be
controlled with two parameters. The Scale parameter determines the variance at the first generation.
The Shrink parameter controls how variance shrinks as generations go by. If the Shrink parameter is
0, the variance is constant. If the Shrink parameter is 1, the variance shrinks linearly to a variance of
zero in the last generation.
Migration is the movement of individuals between subpopulations, that are created by the algorithm
if the option Population Size is set to be a vector of length greater than 1. Every so often, the best
individuals from one subpopulation replace the worst individuals in another subpopulation. In this
report no subpopulations are used, so no migration occurred.

2.3.4 General remarks

When designing controllers for systems that become unstable if unity feedback (or any other feedback
that does not give the required phase lead at the bandwidth) is applied, the GA was not able to find
any good controllers. An example of such a system is the PATO system discussed in Appendix D. A
random initial population was created by the GA, but after two days of "evolution" the "best" individual
was still one with the maximum fitness score. The algorithm keeps reproducing unstable and bad
controllers, resulting in new unstable and bad controllers. This occurs because the set of parameters
needed to create a stabilizing controller, with a good fitness score, is only a very small subset of the
entire search space. Because the system also has to pass the stability robustness test, the solution
space becomes even smaller. Consequently the GA cannot find a stable solution.
To solve this problem the initial generation is seeded with manually designed controllers that have a
"proper" fitness value. With "proper" being anything but the maximum fitness value.

Mutation is very important for evolving towards better individuals. The power of a GA is to manipulate
all parameters of an individual at the same time. But if the values of an individual’s parameters
differ one or more orders of magnitude a problem arises. The mutations are still based on the same
Gaussian distribution. This distribution has a user specified variance in the first generation. This
variance decreases as generations go by, and this decrease is controlled by the shrink parameter. An
important problem is that the distribution is the same for each of the parameters, no matter what their
order of magnitude is. This way mutation is only relevant in the beginning of the evolution for the
"large" parameters, while it is only relevant for the "small" parameters near the end of the evolution.
Therefore not all parameters are optimized at the same time.
This is solved by adjusting the fitness function in a way that all parameters the GA manipulates are
normalized to one at the start of a run. To do this, in the fitness function the manipulated parameters
are multiplied by the parameter values of the seed. For the initial generation, this results in exactly
the seed individual because all parameters are one. The idea behind this is that if the seed results in a
controller with a proper fitness value, the parameters of the optimal solution will have approximately
the same difference in order of magnitude. The parameters optimized by the GA are now all of the
same order of magnitude, and therefore mutations are relevant for all parameters simultaneously.

Finally, there has to be a balance between the population size and the total number of generations.
Both influence the result, as wel as the running time. A small population size might lead to a local
optimal solution, where a small number of generations might not give the mutations enough time to
provide genetic diversity.

11
12
Chapter 3

Nonlinear controllers

In feedback control of servo and positioning systems, the most commonly used controller is a PID
(Proportional, Integral, Derivative) controller. The proportional term makes a change to the output that
is proportional to the current error value. The proportional response can be adjusted by multiplying
the error by a constant called the proportional gain (K p ). The contribution from the integral term
is proportional to both the magnitude of the error and the duration of the error. Summarizing the
instantaneous error over time (integrating the error) gives the accumulated offset that should have
been corrected previously. The accumulated error is then multiplied by the integral gain (K i ) and
added to the controller output. The rate of change of the process error is calculated by determining
the slope of the error over time (i.e. its first derivative with respect to time) and multiplying this rate
of change by the derivative gain (K d ).

Servo systems are often stabilized by phase lead compensation filters around the bandwidth. The
derivative action in a PID controller is used to give phase lead. However it also results in magnitude
amplification for higher frequencies. These high gains often cause robustness problems at higher
frequencies and noise amplification. By using a lead filter ( ττ12 s+1
s+1 ) the magnitude amplification can be
reduced, but not completely removed. Levinson [15] searched for systems that are free of these gain-
phase relations. He narrows his search to circuits that have gain reduction with increasing frequency
but no phase change and states that: "By appropriate tandem combination of such a circuit with the usual
passive networks, any conceivable gain and phase performance with frequency could be obtained". In order
to investigate this he answers three questions, these will be discussed below.

In the search for a gain reduction without phase change circuit, the first question to be answered is:
"Can a linear circuit exhibit this behavior?". For linear networks, Bode [4] has developed a relationship
for obtaining the attenuation characteristic corresponding to a given phase characteristic. Using this
relationship Levinson [15] shows that a system that has 0 phase everywhere in the desired network, it
must have a constant gain value. Therefore the answer to the question is: no, a linear circuit cannot
exhibit this behavior.

The second question Levinson answers is: "can a nonlinear circuit be constructed to exhibit the desired
characteristics in the "linear sense"?". By "linear sense" it is meant that the superposition principle
is valid. Levinson shows that the answer to this second question is also negative, however this proof
is quite elaborate and therefore it is omitted. The third and final question to be answered is: "can
a nonlinear circuit be constructed to exhibit gain reduction with increasing frequency without phase
change in a "nonlinear sense" where the superposition principle is not valid?". The answer to this
question is yes. As a matter of fact, an infinity of such circuits can be constructed.

13
So it should be possible to create a lead filter with magnitude attenuation using nonlinear controllers.
Two nonlinear controllers designed for this purpose are discussed in this chapter. The SPAN filter [8]
is discussed in Section 3.1 and the driven limiter [3] in Section 3.2.

r(t) e(t) y(t)


+_ P I D G

Figure 3.1: Block diagram of the closed-loop system

Figure 3.1 shows a block diagram of the closed-loop system, where y(t) is the plant output and r (t)
is the reference signal, and the error is defined as e(t) = r (t) − y(t). In this figure the block with G
contains the plant. The blocks P, I and D stand for respectively the proportional, integral and derivative
parts of the controller. Both the SPAN filter and the driven limiter replace the linear lead filter in the
D block.

It is also possible replace the P and I elements by nonlinear concepts. To improve the systems perfor-
mance the linear proportional block P can be replaced by a piecewise linear (PWL) gain [13]. Usually
high gains lead to short rise times, but they result in large overshoots. In contrary, low gains lead to
long rise times, but have the advantage of resulting in a small overshoot. By using a piecewise linear
gain, the gain values can be different for small and large errors. This way a high gain can be used
for large errors to have a short rise time and small gains can be used for small errors to reduce the
overshoot. These nonlinear gain elements are discussed in paragraph 3.3. For the integrative block I
a nonlinear controller concept has been introduced by Clegg [5] to improve performance, this concept
will not be further discussed in this thesis. For the linear I block an integrator with a cutoff frequency
( τ3 s+1
s ) is used. It should be noted that no combinations of nonlinear controller concepts (e.g. a non-
linear gain element and a SPAN filter) have been used. Only one of the PID blocks is replaced by a
nonlinear concept at the same time.

14
3.1 SPAN filter

The SPAN (split-path nonlinear) filter ([1], [7], [8], [17] and [19]) is an attempt to obtain a filter which
has independent gain and phase characteristics. Figure 3.2 shows a block scheme of a SPAN filter.
This filter processes two paths and multiplies the output of the two branches. The path resulting in
the absolute value destroys all the sign information and controls the magnitude information. The
path resulting in the sign destroys all the magnitude information (since the output is ± 1), however
the phase information will be maintained. Both paths contain a linear transfer function. A low-pass
filter is placed in the absolute value path, and a lead filter is placed in the sign path. By doing this it
is possible to have a low gain at high frequencies due to the low-pass filter in the absolute value path.
But at the same time it is possible to use the lead filter in the sign path to create phase lead.

In figure 3.1 the SPAN filter takes the place of the D element. The SPAN filter gives a phase lead, just
like a regular lead filter usually placed in PID controllers for the derivative action. The only difference
is, a SPAN filter’s magnitude is not directly linked to this phase lead. It may be possible to create a
controller that can be superior to a regular PID controller, since the SPAN filter does not have limita-
tions due to gain-phase relations. The simulink model of the total controller (P, I and SPAN filter) is
shown in Appendix E.1.

1 y1(t) |y1(t)|
ABS
1 + t 1s
u(t) y(t)
X

1+t 2s y2(t) sign(y2(t))


SIGN
1 + t 3s

Figure 3.2: Block diagram of a SPAN filter

15
signal to
1 + t 1s be limited y1(t)

1+t 2s
u(t) y(t)
limiter
limiting
signal
K
y2(t)

Figure 3.3: Block diagram of a driven limiter

3.2 Driven limiter

The driven limiter ([3], [17]) is another attempt to obtain independent gain and phase characteristics.
In a driven limiter, the input is again split in two paths, one resulting in the limiting signal, the other
in the signal to be limited. The output y is limited as:

y = |y2 | sign(y1 ) if |y2 | ≤ |y1 |


= y1 if |y2 | > |y1 | (3.1)

To achieve phase lead, a linear lead filter is placed in the path constructing the signal to be limited.
In the limiting path a gain is placed, the value of which should be between the low and high frequent
gain of the lead filter. Figure 3.4 shows an example of how the signal could be limited for the chosen
linear functions in both paths. Until limiting occurs the system has the modulus, as well as the phase
characteristics of the lead filter. When limiting occurs the modulus is limited to the gain K in the
limiting path, where the phase data is still that of the lead filter. Hereby it is possible to create phase
lead, without increase in modulus for higher frequencies. Because the limiting value is not a fixed
value, the limiter is called driven limiter.

Just like the SPAN filter from Section 3.1 the driven limiter takes the place of de D element in figure
3.1. The simulink model of the total controller (P, I and driven limiter) is shown in Appendix E.1.
Magnitude

1 + t 1s
1+t 2s

Frequency

no limiting limiting

Figure 3.4: Magnitude plot of the linear filters in both paths

16
3.3 Nonlinear gain element

The nonlinear gain elements ([1], [13] and [17]) used here are all piecewise linear (PWL) gains that are
a function of the error. In the block diagram 3.1 the nonlinear gain element replaces the linear gain in
the P block.

High gains usually lead to short rise times, but on the downside they result in large overshoots. In
contrary, low gains lead to a long rise time, but have the advantage of resulting in small overshoots. Is
it possible to diminish the overshoot without increasing the settling time, using nonlinear gains? To
answer this question two types of nonlinear gains will be analyzed.

3.3.1 Saturated gain

A saturated gain is shown in figure 3.5. The gain K 1 is linear for errors smaller than the threshold
value of e0 . For errors larger than the threshold value the gain K 2 is constant, so the output of the
element f(e) is saturated. This results in the following equation:

f (e) = −K 2 if e < −e0


= K1e if |e| ≤ e0 (3.2)
= K2 if e > e0

The gain K 1 determines the settling behavior and gain K 2 determines the rise time of the system. The
idea of this nonlinear gain element is to have a small gain for small errors and a high gain for large
errors. This nonlinear gain setup has only two independent variables (since K 2 = K 1 e0 ). This is also
a disadvantage of this nonlinear gain model, by determining K 1 and K 2 the threshold value (e0 ) for
the error where the switch occurs is fixed. A nonlinear gain without this disadvantage is presented in
the next paragraph.

f(e)

K2
K1

e0 e

Figure 3.5: A saturated gain element

17
3.3.2 Gain divided in two parts

Another piecewise linear gain as function of the error is a gain divided in two parts (Figure 3.6). For
large errors a high gain is used and for small errors a small gain is used. The equations for this
nonlinear gain are:

f (e) = K 2 e + (K 2 − K 1 )e0 if e < −e0


= K1e if |e| ≤ e0 (3.3)
= K 2 e − (K 2 − K 1 )e0 if e > e0

f(e)
K2

K1
e0 e

Figure 3.6: A nonlinear gain divided in two parts

Again, the gain K 1 determines the settling behavior and the gain K 2 determines the rise time of a step
response. This nonlinear gain has three independent parameters. So the choice of e0 is irrespective of
the gains K 1 and K 2 . This is the gain that will be optimized in Chapter 4.

Obviously an infinity of nonlinear gain configurations can be obtained by creating a piecewise linear
gain consisting of more parts. However, the more complex the nonlinear gain becomes the harder it
will be to find the correct parameters. As powerful tool to help optimizing such complex nonlinear
gains a genetic algorithm can be used.

18
Chapter 4

Controller optimization using GA

The previous chapters introduced the GA approach for optimizing step responses (Chapter 2) and
nonlinear controller concepts (Chapter 3). These nonlinear controllers will now be optimized by the
GA. To be able to draw conclusions regarding the quality of the nonlinear controllers compared to
linear controllers, a PID controller is optimized with the same fitness function. This PID controller
τ3 s+1
consists of a lead filter ( ττ12 s+1
s+1 ) as derivative action, an integrator with a cutoff frequency ( s ) as
integrative action and a gain (K p ) as proportional action. Since a fitness value is only relative, the
fitness value of the PID controller provides a reference value. The system for which the controllers are
optimized is the PATO system. This system is introduced and modeled in Appendix D.
The model derived in this appendix is a linear model, since the topic of this thesis is to develop
nonlinear controllers for linear systems. Applying the controllers optimized for this linear system to
the experimental setup resulted in problems due to the presence of nonlinearities in this experimental
setup. The controller optimization for the linear system model, and the problems that occur are
discussed in the first part of this chapter (Section 4.1). In order to obtain experimental verification of
the optimized controllers, an attempt is made to take the nonlinearities in account by extending the
model. The optimization of controllers for this nonlinear model is discussed in the second part of this
chapter (Section 4.2).

All controllers are optimized using a simulation time of five seconds. Most responses however have
already settled within the first two seconds. So the results are all plotted for the first two seconds of
the response, since these give the most valuable information.

4.1 Controller optimization for linear systems

In this section four controllers are optimized for the linear PATO model. The parameters a and b from
Section 2.2.5 are changed by trial and error to balance the fitness function. This resulted in a = 1 and
b = 5. The used fitness function is the same for each controller so the results can be compared.
The first optimized controller is a linear PID controller. Next the nonlinear controllers introduced in
Chapter 3 are optimized, using the PID controller as a reference.

19
4.1.1 PID controller

The simulink model for the PID controller is given in figure E.5. The optimized PID controller has
the following performance characteristics:

fitness rise time [s] settling time [s] overshoot [%]


PID controller 2.1004 0.0603 2.5304 7.4851

Applying this controller to the experimental setup caused a problem, due to the Coulomb friction
present in the setup. Since this controller is still linear, the principle of superposition holds. So to
avoid the Coulomb friction, two input signals are applied. The first one is a fixed velocity. After this
velocity reaches its steady state value, a second input is added to the first. This second input is the step
for which the PID controller is optimized. By subtracting the first input signal from the output the
experimental step response is obtained. The simulated and experimental step response are shown in
figure 4.1. It can be seen that the responses match. The optimization resulted in a tradeoff between
the overshoot and the settling time.

1.2

0.8
Stepresponse

0.6

0.4

0.2
Simulation PID controller
Experiment PID controller
0
0 0.25 0.5 0.75 1 1.25 1.5 1.75 2
Time

Figure 4.1: Simulated and experimental step response of the optimized PID controller

1.15

1.1
Stepresponse

1.05

0.95

Simulation PID controller


Experiment PID controller
0.9
0.05 0.1 0.15 0.2 0.25 0.3
Time

Figure 4.2: Closeup of the simulated and experimental step response of the optimized PID controller

20
In the closeup in figure 4.2 it is clear that both curves show a same high frequent response. The power
spectral density (see Figure 4.3 of the simulated response clearly shows a peek around 50 Hz. This is
the frequency of the high frequent response in figure 4.2. It can be seen in the frequency response of
the PATO system (Figures D.2 and D.3) that this is te resonance frequency for both the masses .

50

Power Spectrum Magnitude (dB)

−50

−100
0 25 50 75 100 125 150
Frequency

Figure 4.3: Power spectral density of the simulated step response

21
4.1.2 Controller with a SPAN filter

The fitness function used for optimizing the PID is also used for optimizing the controller with a
SPAN filter. The simulink model for this controller is given in figure E.2. The optimized SPAN filter
has the following performance characteristics:

fitness rise time [s] settling time [s] overshoot [%]


Controller with a SPAN filter 0.3946 0.1186 1.4557 0.0088

This is a significant improvement in comparison with the reference PID controller. The overshoot
almost completely vanished. The settling time is reduced by roughly a factor two. The rise time
however increased. There is no direct fitness penalty for the rise time, therefore it is not directly
minimized by the algorithm. The rise time is only used for the calculation of the delay in the stability
robustness check (see Section 2.2.2). The improved results can also be seen in figure 4.4.

1.2

0.8
Stepresponse

0.6

0.4

0.2
Simulation PID controller
Simulation controller with SPAN filter
0
0 0.25 0.5 0.75 1 1.25 1.5 1.75 2
Time

Figure 4.4: Simulated step response of the optimized controller with a SPAN filter, and the PID reference

In this figure it can also be seen that the controller with a SPAN filter does not show the same high
frequent response as observed when using a PID controller. The explanation for this may be found
in the fact that the SPAN filter gives more phase lead. This stronger derivative action may lead to
more damping, which reduces the high frequent behavior. Another possible explanation is that the
controller with a SPAN filter does not excite the resonance frequencies.

Note that these results are simulations only. Applying this nonlinear controller to the experimental
setup resulted in the same problems with Coulomb friction as discussed before. Unfortunately the
principle of superposition no longer holds, due to the present nonlinearities. The response obtained
from the experiments is shown in figure 4.5. The influence of friction in this PATO system is of great
importance. In an attempt to implement a nonlinear controller to the experimental setup successfully,
a model with friction will be used in Section 4.2.

22
1.2

Stepresponse 0.8

0.6

0.4

0.2

Experiment controller with SPAN filter


0
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5
Time

Figure 4.5: Experimental step response of the optimized controller with a SPAN filter

Describing function of the SPAN filter

The controller with SPAN filter performs significantly better than the PID reference. In what con-
troller did the GA optimization result? To gain more understanding of the SPAN element, the de-
scribing function theory is used (see Appendix C).

−5
Magnitude [dB]

−10

−15

−20

−25
−1 0 1 2
10 10 10 10

40
Phase [degrees]

30

20

10

−10
−1 0 1 2
10 10 10 10
Frequency [Hz]

Figure 4.6: Describing function of the SPAN filter optimized for the linear model

Figure 4.6 shows the describing function of the SPAN filter. The filter has a reduction of the gain
with increasing frequency and phase lead with increasing frequency. This is impossible for linear
controllers. The advantages of a SPAN filter introduced in Section 3.1 are also found and used by the
genetic algorithm.

23
4.1.3 Controller with a driven limiter

The controller with a driven limiter is also optimized for the same fitness function. The simulink
model of the controller with a driven limiter is given in figure E.3. The controller with a driven limiter
has the following performance characteristics:

fitness rise time [s] settling time [s] overshoot [%]


Controller with a driven limiter 1.0877 0.0511 2.1802 2.9164

The driven limiter reduces the settling time by ±0.35 seconds, and the overshoot roughly a factor
2.5. The rise time is also shorter, although this does not directly result in a lower fitness value. The
response of the controller with the driven limiter, and that of the PID reference is shown in figure 4.7.

1.2

0.8
Stepresponse

0.6

0.4

0.2
Simulation PID controller
Simulation controller with a driven limiter
0
0 0.25 0.5 0.75 1 1.25 1.5 1.75 2
Time

Figure 4.7: Simulated step response of the optimized controller with a driven limiter, and the PID reference

Just like the controller with a SPAN filter, the controller with a driven limiter does not show the high
frequent response observed when using the PID controller. The reasons for this are likely the same as
in Section 4.1.2.

24
Describing function of the driven limiter

The describing function of the driven limiter is shown in figure 4.8. The element gives phase lead,
however it has a gain that increases with frequency. Bode [4] postulated a relationship between the
phase and modulus for linear networks. So it is possible to use the phase data from the driven limiter
to construct the magnitude data that would have been given by a linear filter. This "linear" magnitude
is also plotted in figure 4.8. From this it can be observed that the driven limiter has less increase in
gain with increasing frequency, compared to a linear lead filter with the same phase characteristic.

15
Magnitude nonlinear
Magnitude [dB]

Magnitude linear
10

0
−1 0 1 2
10 10 10 10

50
Phase [degrees]

40

30

20

10

0
−1 0 1 2
10 10 10 10
Frequency [Hz]

Figure 4.8: Describing function of the driven limiter optimized for the linear model

25
4.1.4 Controller with a nonlinear gain element divided in two parts

The controller with the nonlinear gain element from Section 3.3.2 is also optimized for the same fitness
function. The simulink model of the controller with a nonlinear gain element is given in figure E.4.
The controller with a nonlinear gain element has the following performance characteristics:

fitness rise time [s] settling time [s] overshoot [%]


Controller with a nonlinear gain element 0.7602 0.2862 0.4259 2.3744

The controller with a nonlinear gain element reduces the overshoot by roughly a factor 2.5 and the
settling time by roughly a factor 6. However, the system rises slowly, the rise time is four times that
of the PID reference. Since this does not directly lead to a fitness penalty, the fitness score is still low.
The step response of the controller with a nonlinear gain, and that of the PID reference is shown in
figure 4.9.

1.2

0.8
Stepresponse

0.6

0.4

0.2
Simulation PID controller
Simulation controller with a nonlinear gain element
0
0 0.25 0.5 0.75 1 1.25 1.5 1.75 2
Time

Figure 4.9: Simulated step response of the optimized controller with a nonlinear gain element, and the PID reference

The slow rise time can be explained by the small value of the gain K 2 = 1.08 · 10−4 at larger errors.
The other optimized parameters are: K 1 = 5.53 · 10−3 and e0 = 1.27 · 10−2 . This in contrast to what
is expected in section 3.3.2. The GA optimization is performed several times, with similar results.
So instead of using a large gain for large errors and a small gain for small errors, the GA finds an
optimum controller for this fitness function that has a small gain for large errors and a large gain for
small errors. By slowly approaching the reference value there will not be a large overshoot. When
the threshold value is passed, the gain is made higher so that the system remains rigidly fixed at the
reference value.

The results from the previous tests did not match the expectations of a small gain for small errors and
a high gain for large errors. To see if the outcome does match the expectations when a faster rise time
is required, the rise time is added to the fitness function. By changing the fitness function, the results
can no longer directly be compared to the other results so no conclusions will be drawn regarding
comparison with other controller concepts. The rise time penalty is added to the fitness function:
f = f + Tr /c. Where c can be used just like a and b from Section 2.2.5 to balance the fitness function
by trail and error. This resulted in: a = 1, b = 5 and c = 0.2.

26
Performing a run with the adjusted fitness function resulted in the following performance character-
istics:

fitness rise time [s] settling time [s] overshoot [%]


Controller with a nonlinear gain element 2.6688 0.0523 1.1205 5.8836

1.2

0.8
Stepresponse

0.6

0.4

0.2

Simulation controller with a nonlinear gain element


0
0 0.25 0.5 0.75 1 1.25 1.5 1.75 2
Time

Figure 4.10: Simulated step response of the optimized controller with a nonlinear gain element

By adding a penalty for the rise time to the fitness function, the GA is encouraged to optimize it. The
controller developed here does have a high gain for large errors and a small gain for small errors:
K 1 = 6.119 · 10−3 and K 2 = 0.2217. So this controller does match the expectations.

4.1.5 Summary

Each of the presented nonlinear controllers can outperform the reference PID controller, they can
improve the response and result in a better fitness value. However one controller can improve a certain
performance criteria significantly more than the other. The controller with a SPAN filter makes the
overshoot almost vanish. The nonlinear gain element shows the best results regarding the settling
time. The controller with a driven limiter improves every performance aspect. For this fitness criteria
the controller with SPAN filter has the lowest fitness value and therefore the best performance.

fitness rise time [s] settling time [s] overshoot [%]


PID controller 2.1004 0.0603 2.5304 7.4851
Controller with a SPAN filter 0.3946 0.1186 1.4557 0.0088
Controller with a driven limiter 1.0877 0.0511 2.1802 2.9164
Controller with a nonlinear gain element 0.7602 0.2862 0.4259 2.3744

27
4.2 Controller optimization for nonlinear systems

Due to the nonlinearities present in the experimental PATO setup, the step responses for nonlinear
controllers cannot be verified. In order to make this verification possible, the nonlinearities are mod-
eled in Appendix D.2. By adding these friction properties, the model is no longer linear. Another
attempt to reduce the effect of friction is made by increasing the step value from 1 to 10 rad. A more
aggressive input signal leads to higher actuator voltages (still limited by u max ). In the fitness func-
tion parameters such as the tolerance band and the overshoot where already scaled with respect to the
step size. The parameters a and b from Section 2.2.5 are again used to balance the fitness function,
resulting in a = 1 and b = 10.

4.2.1 PID controller

Optimizing the reference PID controller for this new model resulted in the following performance
characteristics:

fitness rise time [s] settling time [s] overshoot [%]


PID controller 8.7282 0.1651 2.0053 17.0513

Again there is a tradeoff between overshoot and settling time. Even though the step size is larger,
the settling time is shorter than for the controller optimized in Section 4.1.1. The downside is the
overshoot, that is 10% higher. So when the fitness function was balanced by changing the parameters
a and b from Section 2.2.5 the weight shifted towards settling time. The simulated and experimental
responses are shown in figure 4.11. Note that these results have been obtained without using the prin-
ciple of superposition which was required in Section 4.1.1. The experimental response starts faster and
shows a smaller overshoot, but a larger settling time than the simulated response. The experimental
response also shows oscillations, these are probably caused by the friction, resulting in a limit cycle.

12

10

8
Stepresponse

2
Simulation PID controller
Experiment PID controller
0
0 0.25 0.5 0.75 1 1.25 1.5 1.75 2
Time

Figure 4.11: Simulated and experimental step response of the optimized PID controller

28
4.2.2 Controller with a SPAN filter

Optimizing the controller with a SPAN filter for the new model using the same fitness function as in
Section 4.2.1 resulted in the following performance characteristics:

fitness rise time [s] settling time [s] overshoot [%]


Controller with a SPAN filter 2.2678 0.1841 0.2981 0.6177

The settling time is significantly shorter than for the controller optimized in Section 4.1.1, the over-
shoot is a bit higher but still below 1%. So again it is clear the weight of the fitness function has shifted
towards settling time.
The simulated and experimental response are shown in figure 4.12. With the friction modeled it is
possible to obtain a step response similar to the simulated response. This experimental response also
starts faster and shows a smaller overshoot, it also shows oscillations like the experimental response
of the PID controller. These are probably also caused by limit cycling due to friction.

12

10

8
Stepresponse

2
Simulation controller with SPAN filter
Experiment controller with SPAN filter
0
0 0.25 0.5 0.75 1 1.25 1.5 1.75 2
Time

Figure 4.12: Simulated and experimental step response of the optimized controller with a SPAN filter

The measured response of the controller with SPAN filter and the reference PID controller are shown
in figure 4.13. The rise times of both responses is similar, but the controller with a SPAN filter clearly
outperforms the reference PID controller on the criteria settling time and overshoot. The simulated
response of the controller with a SPAN filter and the PID reference is shown in figure E.2.

29
12

10

8
Stepresponse

2
Experiment PID controller
Experiment controller with SPAN filter
0
0 0.25 0.5 0.75 1 1.25 1.5 1.75 2
Time

Figure 4.13: Experimental step responses of the optimized controller with a SPAN filter, and the PID reference

Describing function of the SPAN filter

Figure 4.14 shows the describing function of the SPAN filter optimized for the nonlinear model. The
filter again has a reduction of the gain with increasing frequency and phase lead with increasing
frequency.

−10
Magnitude [dB]

−20

−30

−40

−50
−1 0 1 2
10 10 10 10

60
Phase [degrees]

40

20

−20
−1 0 1 2
10 10 10 10
Frequency [Hz]

Figure 4.14: Describing function of the SPAN filter optimized for the nonlinear model

30
4.2.3 Summary

The weight of the fitness function is shifted slightly towards the settling time. This however is not a
problem, since both compared controllers are still optimized according to the same fitness function.
Both the experimental results show a similar rise time, but the controller with a SPAN filter signifi-
cantly outperforms the reference PID controller on the criteria settling time and overshoot.
The friction model is probably too simple to give an accurate friction estimation. That is why the ex-
perimental responses both show the same sort of deviation from the simulated responses. Although
the model for the friction is simple, it still allows us to experimentally verify that the controller with a
SPAN filter outperforms the linear PID controller.
The rise times of both responses is similar, but the controller with SPAN filter clearly outperforms the
reference PID controller on the criteria settling time and overshoot.

fitness rise time [s] settling time [s] overshoot [%]


PID controller 8.7282 0.1651 2.0053 17.0513
Controller with a SPAN filter 2.2678 0.1841 0.2981 0.6177

31
32
Chapter 5

Conclusions and recommendations

5.1 Conclusions

In this thesis, a fitness function based on time domain characteristics is discussed. By using this
fitness function as a quality measure in an evolutionary algorithm it is possible to optimize controllers
with the weight of the different criteria specified by the user.
Three concepts of nonlinear controllers have been discussed and optimized. Since the fitness values
are relative, a PID controller is optimized for the same criteria. This PID controller is used as a
reference.
Each of the presented nonlinear controllers is capable to outperform the reference PID controller. They
can all improve the simulated response and result in a better fitness value. However, one controller
concept may improve a certain performance criteria significantly more than the other.
The describing function of the SPAN filter shows that it is possible to create phase lead with magnitude
attenuation. The step responses of the controller with a SPAN filter are superior to that of the reference
PID controller, so as expected, the combination of phase lead with magnitude attenuation results in
good performance.
The describing function of the driven limiter shows phase lead, but with magnitude increase with
increasing frequency. It is shown that this magnitude increase is less then the magnitude increase
given by the a linear lead filter that has the same phase characteristics.
By adding friction to the model it is possible to experimentally verify the performance of a nonlinear
controller. The used friction model is probably too simple to give an accurate friction estimation.
This is why the experimental responses of the controller with SPAN filter and the PID controller both
show the same sort of deviation from the simulated responses. Although the model for the friction is
simple, it still allows experimental verification of the simulated responses. The experimental response
of the controller with a SPAN filter and the PID controller both show similar rise times. A nice result
is that the SPAN filter performs significantly better on the criteria settling time and overshoot.

33
5.2 Recommendations
• The friction model used in this thesis was perhaps too simple. Using a more detailed friction
model should lead to more correspondence between the simulated and experimental data. An-
other option is of course to use a system that has neglectable nonlinear characteristics, e.g. no
Coulomb friction.
• Besides the controller with a SPAN filter, driven limiter or nonlinear gain element also other
nonlinear controller concepts can be tested, such as the Lewis servo or the Clegg integrator.
• The nonlinear gain element is here split in two parts. This can be extended to more parts with
more design parameters to see if a better result can be obtained. Manual tuning will be tedious,
but with an evolutionary algorithm tuning should be no problem.
• Not the application of the genetic operators, but the evaluation of the controllers by simulations
consumes by far the most of the computation time. The evolution speed can be considerably
increased when parallel computing is applied.
• The fitness function contains only a rather limited stability robustness test. By increasing the
number of simulations the stability robustness can be tested for a variety of step reference sig-
nals, gain perturbations and delay perturbations. This would give more insight in the stability
robustness, but at the cost of more computation time.
• Because the entire first generation is populated by the same seed file, the outcome of the evolu-
tionary algorithm might be only a local optimum. To prevent this, long runs are used and a lot
of genetic diversity is added (e.g. by starting with large mutations, linearly shrinking to zero).
However, this gives no guarantee of finding a global optimum. Therefore methods could be
studied that help the GA narrow the search space, so inserting a seed file is no longer necessary.
• To see how well these nonlinear controller concepts perform compared to other controllers, they
could be used as seeds for a Genetic Programming run. Here not only the parameters, but also
the controller structure can be altered.

34
Bibliography

[1] W. Aangenent, R. v.d. Molengraft, M. Steinbuch, Nonlinear Control of a Linear Motion System,
Technical University Eindhoven, Eindhoven, 2005.
[2] D.P. Atherton, Nonlinear control engineering, Van Nostrand Reinhold Co., London & New York,
1975.
[3] A.R. Bailey, Stabilisation of control systems by use of driven limiters, IEE, 1966.
[4] H. Bode, Network analysis and feedback amplifier design, D. van Nostrand, New York, 1945.
[5] J.C. Clegg, A Nonlinear Integrator for Servomechanisms, AIEE, 1958.
[6] J.M. Dolsma, Nonlinear controller design based on genetic programming, DCT 2007.107, Technische
Universiteit Eindhoven, 2007.
[7] M.H. Fong, and W.W. Szeto, Application of a nonlinear filter to a conditionally stable system, Lock-
heed Missiles & Space Company, Sunnyvale, 1980.
[8] W.C. Foster, D.L. Gieseking, and W.K. Waymeyer, A Nonlinear Filter for Independent Gain and
Phase, Douglas Aircraft Company, Santa Monica, 1966.
[9] A. Gelb, and W.E. Van der Velde, Multiple-input describing functions and nonlinear system design,
McGraw-Hill Book Co., New York, 1968.
[10] A. Gelb, and R.S. Warren, Direct statistical analysis of nonlinear systems: CADET, AIAA Journal
Vol. 11, No. 5, 1973, 689–694.
[11] D.N. Hannebrink, H.S. Lee, H. Weinstock, and J.K. Hedrick, Influence of axle load, track gauge,
and wheel profile on rail vehicle hunting, Trans. ASME J. Eng. Ind., 1977, 186–195.
[12] J. Holland, Adaption in Natural and Artificial Systems, The University of Michigan Press, Ann
Arbor, 1975.
[13] R.E. Kalman, Phase-Plane Analysis of Automatic Control Systems with Nonlinear Gain Elements,
AIEE, 1955.
[14] I.E. Kazakaov, Generalization of the method of statistical linearization to multidimensional systems,
Automatika i Telemekhanika, Vol. 26, 1965, 1210–1215.
[15] E. Levinson, Gain reduction without phase change, a property of non-linear circuits, Polytechnic In-
stitute of Brooklyn, Brooklyn, 1956.
[16] J.B. Lewis, The Use of Nonlinear Feedback to Improve the Transient Response of a Servomechanism,
AIEE, 1953.
[17] R. Mulder, Nonlinear Control for Linear Systems, Philips Electronics, Nat.Lab., Eindhoven, 1995.
[18] J.H. Taylor, An algortithmic state-space/describing function technique for limit cycle analysis, TIM-
612-1 for the office of naval research, the analytic sciences corporation (TASC), Reading, Mas-
sachusetts, 1975
[19] L.M. Zoss, A.G. White, and J.E. Marsch, A nonlinear three response controller with two response
adjustment, Instrument Society of America, 1968.

35
36
Appendix A

Nomenclature

Symbols
f Fitness value
Os Overshoot
samp Step amplitude
t Time
Tr Rise time
Ts Settling time
u max Actuator limit

Greek symbols
δ Tolerance band
κm Gain margin
τm Delay margin
φm Phase margin

Abbreviations
C Linear part of the controller
DF Describing Function
FRF Frequency Response Function
GA Genetic Algorithm
GUI Graphical User Interface
HOSIDF Higher Order Sinusoidal-Input Describing Function
IAE Integral of the absolute error
LTI Linear Time Invariant
NL Nonlinear
PID Proportional, Integral, Derivative
PSD Power Spectral Density
PWL Piecewise Linear
RIDF Random-Input Describing Function
SIDF Sinusoidal-Input Describing Function
SPAN Split Path Nonlinear

37
38
Appendix B

Fitness function

function f = fitness(par)

%FITNESS - Return a objective fitness value which indicates the performance


% of a controller design.

% Bachelor Thesis
% 2008 - T.M.P. Gommans
% Based on code by ir. J.M. Dolsma

%--------------------------------------------------------------------------
% PARAMETERS
%--------------------------------------------------------------------------

% par(1) = par(1)*seed(1);
% par(2) = par(2)*seed(2);
% par(3) = par(3)*seed(3);
% par(4) = par(4)*seed(4);
% par(5) = par(5)*seed(5);

%assign controller parameters


assignin(’base’, ’tau1’, par(1));
assignin(’base’, ’tau2’, par(2));
assignin(’base’, ’tau3’, par(3));
assignin(’base’, ’tau4’, par(4));
assignin(’base’, ’Kp’, par(5));

%reference trajectory parameters


dt = .005; %sample time for reference
T = 5; %simulation time
Ampl = 1; %amplitude of step

%requirement parameters
phasemargin = (pi/30); %to compute extra delay [-]
gainmargin = 1.3; %add gain perturbation (no perturbation = 1)

%load settings
s = load(’Settings.mat’);
settings = s.opts;

%load controller
ga_controller = ’controller’;

%--------------------------------------------------------------------------
% SETUP SIMULINK MODEL
%--------------------------------------------------------------------------

% SETUP CLOSED-LOOP SYSTEM


setup_closedloop(settings.SystemModel, ga_controller);

%--------------------------------------------------------------------------
% DETERMINE FITNESS VALUE
%--------------------------------------------------------------------------

39
%reset parameters
f = 0;
delay = 0;

%time vector
t = [0:dt:T]’; %time vector (n-by-1 matrix)

%------ Determine step response (without delay and gain pertubation) ------

%step reference
ur = ones(length(t),1).*Ampl;
dur = zeros(length(t),1);
ddur = zeros(length(t),1);

%sensor noise and disturbances


un = (2*rand(length(t),1))*settings.NoiseAmplitude;
ud = (2*rand(length(t),1))*settings.DisturbanceAmplitude;

%remove disturbances
set_param([settings.SystemModel,’/SimpleMass/Gain’], ’Gain’, ’1’);
set_param([settings.SystemModel,’/SimpleMass/Delay’],’DelayTime’,’0’)

%create input vectors


inputs(:,settings.ModelIn.PlantOut) = un;
inputs(:,settings.ModelIn.ContrOut) = ud;
inputs(:,settings.ModelIn.RefAcc) = ddur;
inputs(:,settings.ModelIn.RefVel) = dur;
inputs(:,settings.ModelIn.RefPos) = ur; %only position input is used
%(feedback only)

%calculate step response of closed-loop


[y1, sim_error] = simmodel(settings, t, inputs);

if sim_error
f = settings.BadSimPenalty;
OsStep = 100; TsStep = T; TrStep = T;
else
[Os, Ts, Tr] = stepspecs(t, y1(:,1),ur(end),settings.SettlingAccuracy);
absE = abs(y1(:,1)-ur);

% plot(t,y1(:,1)) %plot stepresponse of the nominal


% %closed-loop system

%estimation of delay to achieve sufficient phase margin


delay = phasemargin*Tr;

%integral of absolute error


IAE = sum(absE)*dt;
f = f + IAE;

%settling time constraint


f = f + Ts/a;

%add extra overshoot penalty


f = f + Os/b;

% Limit controller output


maxU = max(abs(y1(:,settings.ModelOut.ContrOut)));
if maxU > settings.ActuatorLimit
f = f + settings.ConstraintPenalty;
end

%------ step response (with delay and gain perturbation) ------


% goal: stability robustness (based on delay margin and gain margin)

%add time delay (based on step response rise time)


set_param([settings.SystemModel,’/SimpleMass/Gain’], ’Gain’, num2str(gainmargin));
set_param([settings.SystemModel,’/SimpleMass/Delay’],’DelayTime’,num2str(delay));

%calculate response of the closed-loop


[y2, sim_error] = simmodel(settings, t, inputs);

if sim_error
f = settings.BadSimPenalty;
else

% plot(t,y2(:,1)) %plot stepresponse of the


% %perturbed closed-loop system

Abserror = abs(y2(:,1) - ur);

40
index = length(Abserror)-(0.2*T/dt);
Abserror = Abserror(index:end);
Unstable = find(Abserror > Ampl);
if length(Unstable)>0
f = settings.BadSimPenalty;
end
end % sim_error step response (with delay/gain)
end % sim_error step response (without gain/delay)

%check validity of f
if not(exist(’f’))
f = settings.BadSimPenalty;
elseif not(isfinite(f)) | f > settings.BadSimPenalty | f < 0 | not(imag(f) == 0)
f = settings.BadSimPenalty;
end

%--------------------------------------------------------------------------
% TERMINATION
%--------------------------------------------------------------------------

%Save best controllers to list.mat, close opened simulink files for next
%fitness function evaluation.
global A
if isempty(A) & (f < 1e10)
A(size(A,1)+1,:) = [ f par ];
save list A
elseif isempty(A) & (f >= 1e10)
bdclose(’all’);
return
elseif (f < A(size(A,1),1))
A(size(A,1)+1,:) = [ f par ];
save list A
end

bdclose(’all’);

41
42
Appendix C

Describing functions

Describing functions and theory represent a powerful mathematical approach for understanding (ana-
lyzing) and improving (designing) the behavior of nonlinear systems. The basic idea of the describing
function (DF) approach for modeling and studying nonlinear system behavior is to replace each non-
linear element with a quasilinear descriptor or describing function whose gain is a function of input
amplitude. The functional form of such a descriptor is governed by several factors, including the type
of input signal, which is assumed in advance, and the approximation criterion (minimization of the
mean squared error). Two categories of DFs have been particularly successful, namely sinusoidal-
input describing functions (SIDFs) and random-input describing functions (RIDFs), depending upon
the class of input signals under consideration. This technique is dealt with in various texts for the case
of systems with a single nonlinearity, see [9] and [2]. For systems with multiple nonlinearities in arbi-
trary configurations, see [14] and [10] in the case of RIDFs and [18], [11] for SIDFs. The SIDF approach
can be generally used to study periodic phenomena. It is applied for two primary purposes: limit
cycle analysis and characterizing the input/output behavior of a nonlinear element in the frequency
domain. This latter application can serve as as the basis for a variety of control system analysis and
design methods. The types of nonlinearities that can be studied via the DF approach are very general,
nonlinearities that are discontinuous and even multivalued can be considered, the order of the system
is also not a serious limitation. It is not necessary to limit the analysis to only first order describing
functions. Higher order sinusoidal input describing functions (HOSIDF) give information about the
presence of higher harmonics of the driving signal in the output of the system.

For this project describing function theory is not a research topic, it is merely used for analyzing the
controllers constructed by the GA. Therefore it suffices to mention that first order sinusoidal-input
describing functions are used.

43
44
Appendix D

PATO-system

The PATO system is a dual rotary 4th order motion system. It consists of a load which is connected
to a motor by a thin, flexible bar. The system can be modeled as two double integrators connected by
a spring and a damper. A dynamical model of the PATO system is fit on the frequency response data.
A picture of the system, and an illustration of the model are shown in figure D.1.

Figure D.1: A picture of the PATO system (left) and an illustration of the dynamical model (right)

The dynamical model consists of two differential equations, one for each mass:

J1 x¨1 = c(x2 − x1 ) + d(x˙2 − x˙1 ) + u (D.1)


J2 x¨2 = c(x1 − x2 ) + d(x˙1 − x˙2 ) (D.2)

This dynamical model is written in state space form, resulting in:

ẋ = Ax + Bu (D.3)
y = C x + Du (D.4)

45
With x = [x1 x2 ]T and:

   
0 1 0 0 0
 −c/J 1 −d/J 1 c/J 1 d/J 1   1/J 1 
A=


 B= 
0 0 0 1  0 
c/J 2 d/J 2 −c/J 2 −d/J 2 0

 
1 0 0 0  
C= D= 0
0 0 1 0

There are two encoders (x1 and x2 ) in the system, one on each mass. The system can be controlled
in the side of the motor and on the side of the load. The load side is the most interesting side from a
control point of view, therefore this side is chosen for the controller design.

D.1 Frequency response function

The frequency response is the spectrum of the vibration of the mechanical system divided by the
spectrum of the input force to the system. This frequency response data is used to fit the models
parameters. Since this fitting is considered irrelevant regarding the subject of this report, the details
are omitted. During the frequency response measurement the system is rotating at a fixed speed, with
additional noise added to the controller output. By rotating the system at a fixed speed there is no
Coulomb friction present.

This resulted in the following frequency response data:

Figure D.2: Frequency response data and the fitted model at the motor side

Due to heavy fluctuations in the phase plot of the experimental data, it is omitted for clarity reasons.

46
Figure D.3: Frequency response data and the fitted model at the load side

The parameters of the fitted model are:

J1 = 0.00020492
J2 = 0.00016033
d = 0.00016405
c = 9.8012

47
D.2 Coulomb and viscous friction

The controllers optimized on the linear model presented above did not show the same response on
the experimental PATO system. This is due to the Coulomb and viscous friction that are present in the
physical system, but not accounted for in the model. Due to this difference experiments on the model
and on the actual system can not be compared. In order to make this comparison possible, the friction
has to be accounted for in the model. By introducing friction in the model, it will become nonlinear.

To account for the friction in the model, the open loop system is tested for several input voltages.
These input voltages are plotted against the steady state rotational speed. The curve in equation D.5 is
fitted on the experimental results (see Figure D.4).

y = sign(x) · (Gain · abs(x) + O f f set) (D.5)

Figure D.4: Experimental friction data and fitted curve

The offset (equation D.5) represents the Coulomb friction, the system wont start rotating until it can
overcome this friction. As soon as it does overcome this friction (± 0.13 Volt input) it accelerates to the
maximum rotational speed. The rotational speed is about constant for any voltage above the voltage
needed to overcome the Coulomb friction. Consequently the gain (equation D.5) is almost zero. So
there is hardly any viscous friction.

To add the friction to the model, the simulink block "Coulomb and Viscous Friction" is used. This
block is placed on the output of the controller. The parameters of this block are the Offset and Gain
value from equation D.5, they are determined by fitting the curve onto the experimental data and are
0.1297 and 0.000032333 respectively.

48
Appendix E

Additional Figures

E.1 Simulink models

Simulink model of the closed-loop system

The feedback system (Figure E.1) is used for the GA optimization. The two feedforward ports are not
used. The controller block contains the specific controller model. The Plant block contains the model
of a system for which the controller is optimized.

Figure E.1: Simulink model of the closed-loop system

49
Simulink model for controller with a SPAN filter

Figure E.2: Simulink model for a controller with a SPAN filter

Simulink model for controller with a driven limiter

Figure E.3: Simulink model for a controller with a driven limiter

50
Simulink model for controller with a nonlinear gain element

Figure E.4: Simulink model for a controller with a nonlinear gain element

Simulink model for a PID controller

Figure E.5: Simulink model for a PID controller

51
E.2 Results

12

10

Stepresponse 8

2
Simulation PID controller
Simulation controller with SPAN filter
0
0 0.25 0.5 0.75 1 1.25 1.5 1.75 2
Time

Figure E.6: Simulated step responses of the optimized controller with a SPAN filter, and the PID reference

52

S-ar putea să vă placă și