0% found this document useful (0 votes)
25 views62 pages

FULLTEXT01

The document describes modeling and evaluating control methods for turret stabilization systems on main battle tanks. Three controllers - PID, sliding mode, and model predictive control - were implemented in a two-axis gimbal model of a tank turret. The controllers' performances were compared based on response to step changes in reference signals, attenuation of disturbances, and effects of uncertainties in turret mass properties. Results showed the sliding mode controller had the best performance overall, while PID worked best for reference changes but worst for disturbance rejection.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
25 views62 pages

FULLTEXT01

The document describes modeling and evaluating control methods for turret stabilization systems on main battle tanks. Three controllers - PID, sliding mode, and model predictive control - were implemented in a two-axis gimbal model of a tank turret. The controllers' performances were compared based on response to step changes in reference signals, attenuation of disturbances, and effects of uncertainties in turret mass properties. Results showed the sliding mode controller had the best performance overall, while PID worked best for reference changes but worst for disturbance rejection.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 62

DEGREE PROJECT IN ENGINEERING PHYSICS,

SECOND CYCLE, 30 CREDITS


STOCKHOLM, SWEDEN 2021

Modeling and Evaluation of Turret


Control Systems for Main Battle
Tanks

MIKAEL LYTH

KTH ROYAL INSTITUTE OF TECHNOLOGY


SCHOOL OF ELECTRICAL ENGINEERING AND COMPUTER SCIENCE
Abstract
The aim of the thesis was to implement and compare control
methods in a model of a main battle tank. Three controllers were
implemented in a two axis gimbal model and their performances were
compared. The comparisons were performed using step changes in the
reference signal, frequency analysis of an oscillating reference signal
and disturbances, and turret mass uncertainties. The results showed
that the sliding mode controller had the best performance for both
reference changes and disturbance attenuation. The PID controller had
a better performance for the change in reference, compared to the model
predictive controller, but a significantly worse disturbance attenuation.
Due to model approximations, such as assuming ideal engines and noise
reduction, the results likely show a better performance than what can
be expected if applied on a real main battle tank. Therefore, the results
show an upper limit of the stabilization performance of turret and barrel
control and should only be used to compare the controllers.

Keywords: Main Battle Tank, PID control, Sliding Mode Control,


Model Predictive Control, Two-axis gimbal system

Sammanfattning
Målet med uppsatsen var att implementera och jämföra reglermetoder
för en teoretisk modell av en modern stridsvagn. Tre metoder implement-
erades i ett tvåaxligt gimbalsystem och deras prestanda utvärderades.
Mer specifikt utvärderades regulatorernas respons för en referensändring,
en referensstörning och osäkerheter i tornets massa och massfördelning.
Utifrån dessa resultat jämfördes sedan reglermetoderna. Resultaten
visade att sliding mode regulatorn hade bäst prestanda för både
referensändring och referensstörningen när man tittar på frekvensanalys
av mät- och processstörningar. PID-regulatorn hade en bättre prestanda
än MPC-regulatorn för en referensändring men en sämre respons för
en referensstö-rning. På grund av modellförenklingar som till exempel
antaganden om ideala motorer och brusreduktion visar resultaten
troligen en något bättre prestanda än vad som kan uppnås på en
riktigt stridsvagn. Det medför att resultaten visar en övre gräns för
vad styrsystemet för en stridsvagns torn- och eldrörsrotation kan uppnå.

Nyckelord: Stridsvagn, PID reglering, SMC, Prediktionsreglering,


Tvåaxligt gimbalsystem

1
Contents
1 Introduction 10
1.1 Literature Review . . . . . . . . . . . . . . . . . . . . . . . . . . 10
1.2 Problem Description . . . . . . . . . . . . . . . . . . . . . . . . 12
1.3 Delimitations . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
1.4 Outline . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15

2 Theory 15
2.1 Vehicle Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
2.2 Equations of Motion – Two Axis Gimbal System . . . . . . . . . 17
2.2.1 Elevation Movement . . . . . . . . . . . . . . . . . . . . 19
2.2.2 Azimuth Movement . . . . . . . . . . . . . . . . . . . . . 19
2.3 Control Theory . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
2.3.1 Cross Coupling Effects . . . . . . . . . . . . . . . . . . . 22
2.3.2 PID Control . . . . . . . . . . . . . . . . . . . . . . . . . 23
2.3.3 Sliding Mode Control . . . . . . . . . . . . . . . . . . . . 24
2.3.4 Model Predictive Control . . . . . . . . . . . . . . . . . . 25

3 Method 26
3.1 Nominal Model . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
3.2 PID Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
3.3 Sliding Mode Control . . . . . . . . . . . . . . . . . . . . . . . . 31
3.3.1 Elevation Control . . . . . . . . . . . . . . . . . . . . . . 31
3.3.2 Azimuth Control . . . . . . . . . . . . . . . . . . . . . . 33
3.4 Model Predictive Control . . . . . . . . . . . . . . . . . . . . . . 34

4 Results and Analysis 37


4.1 Line of Sight Alignment . . . . . . . . . . . . . . . . . . . . . . 37
4.2 Disturbance Attenuation . . . . . . . . . . . . . . . . . . . . . . 39
4.3 Moment of Inertia Uncertainty . . . . . . . . . . . . . . . . . . . 42
4.4 Frequency Analysis . . . . . . . . . . . . . . . . . . . . . . . . . 43

5 Discussion 46
5.1 Tuning Process . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
5.2 Controller Comparison . . . . . . . . . . . . . . . . . . . . . . . 48
5.3 Alternative Applications . . . . . . . . . . . . . . . . . . . . . . 51
5.4 Ethical and Sustainability Considerations . . . . . . . . . . . . . 52
5.5 Future Work . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53

6 Conclusions 54

References 54

Acknowledgements 56

2
A Elevation 56

B Azimuth 57

C Sliding Mode Control Derivation 59

D Quadratic Optimization 60

3
List of Abbreviations
APS – Active Protection System
FOI – Swedish Defence Research Agency
LOS – Line of Sight
MBT – Main Battle Tank
MPC – Model Predictive Control
PID – Proportional, Integral, Derivative
RGA – Relative Gain Array
SMC – Sliding Mode Control

4
List of Symbols
A
J, B J – Inertia tensor of the barrel and the turret
Ar , Are , Ard , Ae , Ade , Ad – Moment of inertia for the barrel
a – SMC tuning parameter
Bn , Bne , Bnk , Be , Bek , Bk – Moment of inertia for the turret
B A
P C, B C – Transformation matrices from frame B to P and from A to B
e – MPC state error
F – PID - Transfer function
G – General transfer function
g – Gravitational constant
H – MPC optimization Hessian matrix
H̄ – Angular momentum
J – Moment of inertia
k – Sampling step
Kp – PID proportional constant
Ki – PID integral constant
Kd – PID derivative constant
Ku – PID ultimate gain Nichols Ziegler method
M – Overshoot
m – Barrel mass
N – PID filter constant
q – MPC error weight
R – MPC Reference signal
r – MPC signal weight
T – MPC sampling time
Tr – Rise time
Ts – Settling time
Tu – Oscillation period Nichols-Ziegler method
u – Control function
V – Lyapunov function
x̃1 – Angular error
x̃2 – Angular velocity error

α, α , α̃ – Barrel angle, barrel reference angle and barrel angular error
β, β ∗ , β̃ – Turret angle, turret reference angle and turret angular error
ε – Elevation angle of the barrel
η – Rotation angle of the turret
λ – Lagrange multiplier
ρ, ρAZ , ρEL – SMC maximum function
σ – SMC sliding surface
τ – Torque
τEL – Elevation control signal
τAZ – Azimuth control signal
τg – Gravitational torque

5
τD−EL – Component of the elevation torque
τd1 , τd2 , τd3 , τd0 – Components of the azimuthal torque
ωP , ωB , ωA – Angular velocity vector of the base, turret and barrel

6
List of Figures

1 The line of sight problem applied to the turret of an MBT. The


barrel or the APS should align to the threat/target direction. . . 13

2 The MBT model where P is the chassis, B the turret and A the
barrel. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16

3 A figure of a two axis gimbal system. The coordinate axles i, j


and k are the coordinate system for body P, the chassis. The
coordinate axles n, e and k are the coordinate system for body
B, the turret. The coordinate system for body A is the axles r,
e and d. The turret rotates around the yaw axis and the barrel
is elevated around the pitch axis. Elevation angle is ε and the
turret rotation angle is η. Source: [1] . . . . . . . . . . . . . . . 17

4 A description of rise time (Tr ), settling time (Ts ) and overshoot


(M ). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21

5 Control system using PID controllers. . . . . . . . . . . . . . . . 23

6 Control system based on SMC control. . . . . . . . . . . . . . . 25

7 Control system using a MPC controller. . . . . . . . . . . . . . . 26

8 An overview of the nominal system. . . . . . . . . . . . . . . . . 27

9 Side view of the MBT model. The coordinate systems are


defined according to Figure 3 and the angle α is the angle
between the barrel and the ground. . . . . . . . . . . . . . . . . 28

10 Top view of the MBT model where the coordinate systems are
defined according to Figure 3. . . . . . . . . . . . . . . . . . . . 28

11 Rotation response and control signal for a 30 degree reference


change when the controllers are tuned to optimize settling time. 38

12 Rotation response and control signal for a 30 degree reference


change when the PID and SMC controllers are tuned to optimize
rise time. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38

13 Elevation response and control signal for a 10 degree reference


change tuned for optimal settling time. . . . . . . . . . . . . . . 39

14 Turret response and control signal for a 30 degree, one second


turn. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40

7
15 Turret response and control signal for a 10 degree, one second
turn. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40

16 Barrel response and control signal for a 10 degree, 1 s disturbance. 41

17 Turret response to turret mass uncertainties using PID control. . 42

18 Turret response to turret mass uncertainties using SMC control. 42

19 Turret response to turret mass uncertainties using MPC control. 43

20 Frequency plot of an oscillating reference signal when measuring


the amplification of the output angle. . . . . . . . . . . . . . . . 44

21 Frequency plot of an oscillating disturbance signal when measuring


the amplification of the output angle. . . . . . . . . . . . . . . . 45

22 Frequency plot of an oscillating disturbance signal when measuring


the amplification of the output angular velocity. . . . . . . . . . 46

8
List of Tables

1 Model parameters of the MBT. Solid parts are noted with (S)
and hollow parts with (H). The weapons station is located on
top of the turret and the utility boxes are positioned at the back
of the turret. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16

2 The values of the tuning parameters of the PID controllers. . . . 31

3 The linearization states. . . . . . . . . . . . . . . . . . . . . . . 34

4 Rise time [s], settling time [s] and overshoot [%] for the reference
changes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39

5 Results for a disturbance in angular velocity. . . . . . . . . . . . 41

6 Results for an uncertainty in the moment of inertia for the


turret. The mass is described as percent of nominal mass and
the mass distribution uncertainty as distance from the center
line. The rise time [s], settling time [s] and overshoot [%] are
listed. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43

9
1 Introduction

The research performed by the Swedish Defence Research Agency (FOI)


contributes to the work of developing and assessing equipment used by the
Swedish civil and military defense. Developing models to evaluate future
and current technologies is a part of this assessment. These models are
used for improving the technology and to predict performance in real world
applications. This thesis studies the control system of turret and barrel
stabilization for Main Battle Tanks (MBT). The purpose is to expand and
assess a model that is able to predict the performance of controllers applied
to a given MBT. Comparisons of the performance of the different controllers
can then be performed using this model. Furthermore, the sensitivity and
robustness of the controllers are studied and compared to each other, using
frequency analysis to find any self-oscillatory behavior. This is important
since an MBT drives on rough terrain or may require sharp turns.

1.1 Literature Review

The control strategies are implemented in an existing model of the MBT


geometry in this thesis. The turret and barrel are modeled as a two-axis
gimbal system mounted on a moving base, the chassis. Gimbal models have
been studied extensively in research literature. Usually, the system’s equations
of motion are derived using either Newton’s or Lagrange’s equations. Based
on these equations, the dynamics of the system are found and a model is
created. Common control techniques that have been applied to control of
a gimbal system are Proportional, Integral and Derivative control (PID) [1],
state feedback control [2] and sliding mode control [3]. Specifically, PID-based
controllers are commonly used in many applications, for instance in the process
industry [4]. The authors of [1, 5, 6] use a common PID controller, PID cascade
control, and a PID controller based on fuzzy control techniques, respectively,
to control the angular velocity of their gimbal system. They evaluate and
show that it is possible to maintain a stable angular velocity. Furthermore,
they study the effect of a disturbance in the angular velocity of the gimbal
base to test the attenuation abilities of their controllers.

The PID controllers mentioned above are an important foundation of this


thesis since the authors of [1, 5, 6] use a similar gimbal system and show the
possibilities of PID control. However, there are some differences. The focus of
this thesis is to study reference tracking, following the angle, using different
controllers while the objective of [1, 5, 6] was to control the angular velocities
of their system. Furthermore, an aim of this thesis is to stabilize and evaluate
disturbances due to movement of the MBT. There are also large differences

10
between the control requirements of an MBT and the system used in [1, 5, 6]
due to the different mechanical structures.

The authors of [1, 5] also study the effect of mass unbalance on the system.
They show that the mass distribution can affect the performance of a gimbal
system by increasing the overshoot with up to 16 %, which is of importance for
this thesis. This importance arises because of the objective of this thesis, which
is to evaluate the performance of an MBT with given parameters that are not
necessarily accurate. Therefore, the effects of an uncertain mass distribution
is considered on the MBT system.

There are numerous studies using more advanced controllers for nonlinear
systems. One study implements a controller based on Sliding Mode Control
(SMC) on a two axis gimbal system [3]. The authors derive the equations
of motion to stabilize the system at a specified angle. Furthermore, they
study the effect of a disturbance in a parameter controlling an actuator. They
show that SMC is an efficient method for reducing disturbances. Their model
however, differs from the model of an MBT. They study the control of flat
planar antennas, which are geometrically different compared to the geometry
of an MBT. Additionally, in this thesis, there are more types of disturbances
that will be considered. The authors of [3] do, however, show the possibility
of using SMC to control a gimbal system, and its ability to manage uncertain
parameter values.

A study that focuses on an MBT and uses Model Predictive Control (MPC)
is considered in [7]. The authors develop a controller using MPC to control
the elevation of the barrel. They use the MPC’s ability to include constraints
in the derivation of the optimal controller to take into account the physical
limitations of an MBT. Physical limitations will not be considered in this
thesis but the MPC structure is interesting and an implementation of a MPC
based controller can still provide important comparisons. Their model is based
on a linear description of the system with the exception of the inclusion of
friction, which makes it different from the model considered in this thesis.
However, their paper could serve as an interesting comparison since they show
the possibility of implementing MPC in an MBT system.

Comparisons of PID, SMC and MPC have been done before, however, they are
often model dependent. Therefore, it is important to compare the controllers
for a specific system. A study comparing PID, SMC and MPC for a twin rotor
system is performed by [8] and could serve as a useful comparison to this thesis.
Although the twin rotor system is different compared to the MBT and the
tuning process might differ, the authors of [8] have developed a methodology
for comparing the performances of different controllers. The authors tuned the
SMC controller using a PID based structure and the Ziegler-Nichols method.
The MPC optimization problem was defined using a cost function penalizing

11
position error and change in control signal. A similar comparison will be
performed in this thesis, but with some differences in the tuning method where,
for example, the control signal size is not penalized. It will be an interesting
comparison if the performances of the controllers show similar behavior despite
the different systems.

The aforementioned articles show that the theory behind the gimbal model
is well studied and that there are multiple methods available to control it.
The papers are important since the focus of this thesis is implementing and
comparing control methods. Even though implementation of the control
methods are well explored, there are several questions remaining regarding
the analysis of the methods and for what situations they should be used. In
this thesis, the performance of the control methods PID, SMC and MPC will
be analyzed for a reference change, disturbances and parameter uncertainties.
Furthermore, much of the work performed by [1, 3, 5, 6, 8] focuses on a system
that is designed for smaller applications. Even though the gimbal theory for
different applications is largely the same, the MBT system differs from common
applications due to its weight distribution. This key difference requires further
investigation into the performance of the controllers.

1.2 Problem Description

The problem of stabilizing the barrel or aligning the Active Protection System
(APS) can be described as a line of sight problem (LOS), which is a general
term for the problem of aligning a system along a specified direction. Figure 1
shows a schematic illustrating the problem. The objective is to stabilize the
system by controlling the rotation of the turret and the elevation of the barrel.
To solve the problem in Figure 1 the barrel should be aligned in the target
direction. A similar problem occurs when using the APS and a threat is
detected. The problem of rotating the barrel to the correct position is the
same but the control requirements differ. When aligning the barrel towards a
target the stabilization requirements are high. If the APS is used to negate a
threat the stabilization is not as important but the necessity of a large rotation
speed is greater.

12
Figure 1: The line of sight problem applied to the turret of an MBT. The
barrel or the APS should align to the threat/target direction.

In general, a two dimensional gimbal is controlled by separately controlling the


elevation and azimuth movements. The controllers are therefore often assumed
to be decoupled even though there could be some cross-coupling effects, which
reduce the effectiveness of decoupled controllers. Therefore, the cross-coupling
of the system will be evaluated. The controllers should be able to quickly
stabilize the barrel or APS according to specified angles while attenuating
disturbances due to the movement of the gimbal base.

Care should be taken when choosing the controllers that will be compared.
A basic PID controller will be used as a reference since it is relatively easy
to implement and it is commonly used in many control applications. Because
of the nonlinear properties of the model and its complexity, more advanced
controllers will be implemented as well. The SMC is an interesting type of
controller because of its robustness property [9]. Another type of controller
is MPC. As was shown by [7], MPC is an effective method that supports the
implementation of constraints, which makes it an attractive method to test.
Possible constraints that are relevant for the MBT are, for example, limitations
to the control signal and limited movement of the barrel and turret.

When analyzing the performances of the controllers, the stabilization properties


are important. Therefore the properties of rise time, settling time and
overshoot will be studied. Furthermore, the sensitivity is tested partly by
changing the angular velocity and acceleration of the gimbal base, partly by

13
changing the moment of inertia of the turret. The tests are chosen to simulate
common use of an MBT and the effect of parameter uncertainties.

The objective of this thesis is to implement and compare three control


strategies: PID, SMC and MPC. The three test scenarios are

1. a 30 degree change in reference signal for turret rotation and a ten degree
change in elevation reference,
2. a ten and 30 degree disturbance in turret rotation and a ten degree
disturbance in elevation,
3. uncertainty of turret mass and mass distribution. The mass of the turret
is decreased and increased by 25 % respectively and the center of mass
is moved 0.25 m and 0.5 m off the center line. The results are compared
for a 30 degree reference change in turret rotation.

A frequency analysis is also performed to test if the system is sensitive to any


range of frequencies. This is done by applying a sine function with varying
frequencies as a reference signal and as a disturbance, respectively. These
tests are important because it provides a method to evaluate any oscillatory
behavior of the MBT, which there are few previous studies on.

In this thesis the following assumptions are made.

1. The maximum torque used to rotate the turret or elevate the barrel is
30 000 Nm.
2. The turret can rotate 360 degrees.
3. The barrel can be elevated 45 degrees.

1.3 Delimitations

To keep the thesis within the scope and requirements of a thesis project,
the number of control strategies and parameter uncertainties studied in the
sensitivity analysis will be limited. Three control strategies, PID, SMC and
MPC are implemented and analyzed for two specific cases; a 30 degree rotation
of the turret and a ten degree elevation of the barrel. The sensitivity analysis
is focused on parameter uncertainties and disturbances from a moving chassis.
Furthermore, the chassis movement is assumed to only consist of rotations,
since the disturbances on the LOS will only manifest themselves as rotations
for the purposes considered here. This enables a thorough analysis of the
selected disturbances.

14
1.4 Outline

The thesis is divided into sections where Section 1 introduces the subject and
the purpose of this thesis. Section 2 describes the theory and background that
is needed to understand the vehicle model and the gimbal system. This part
is followed by Section 3 where the controllers are developed and implemented
into the system. In Section 4, the results are presented based on simulations of
the controllers. These simulations are then used in Section 5 where the results
are compared and ethical considerations and future work are discussed. The
thesis is concluded in Section 6 with a summary.

2 Theory

This section explains the background theory that is needed to understand the
problem and the model. It covers the physical properties of the MBT, the
model of the MBT by deriving the equations of motion and the controllers
that are used in this thesis.

2.1 Vehicle Model

A modern main battle tank is a vehicle designed to have the highest level of
protection and firepower on the battle field while not impeding on its movement
capabilities [10]. Therefore, an MBT is used in a wide range of terrain types,
which increases the complexity of designing controllers. The combination of
these requirements makes the MBT an unique vehicle to design and control.

To understand the system, one should look at the three main parts of the
MBT, shown in Figure 2. These are the chassis, turret and barrel. The chassis,
which is given by part P in the figure, translates the vehicles movement and
the effects of terrain to the turret and barrel. The base of the gimbal system is
the chassis. The turret, part B, is mounted on the chassis and can be rotated
by using servo motors or actuators. Using servo motors to control the system,
the barrel can be stabilized in the direction that is vertical to the chassis. The
barrel is mounted on the turret and is denoted as part A of the figure. It
can be rotated along the lateral direction of the turret, which is the elevation
control. Due to these two types of movement, of the turret and barrel, they
are modeled as the two-axis gimbal.

15
Figure 2: The MBT model where P is the chassis, B the turret and A the
barrel.

The chassis and turret in turn consist of multiple parts, which affect the
dynamics of the system. All parts included in the model are listed in Table 1
with their respective mass and dimensions. These parts are included because
they are an important part of the operation of an MBT or they have a large
mass and therefore affect the moment of inertia.

Table 1: Model parameters of the MBT. Solid parts are noted with (S) and
hollow parts with (H). The weapons station is located on top of the turret and
the utility boxes are positioned at the back of the turret.
Component Mass (kg) Length (m) Width (m) Height (m) Diameter (m) Thickness (m)
Chassis (H) 35 600 8.5 3.9 1.2 - 0.08
Turret (H) 2 400 - - 0.76 2.6 0.08
Weapons station (S) 100 - - 0.70 0.84 -
Utility boxes (S) 1 300 1.6 2.1 0.43 - -
Barrel (H) 2 500 7 - - 0.2 0.038

The APS is built into the turret and is used by rotating the turret to a required
position. When a threat is detected, the turret rotates in such a way that the
APS maximizes the probability of success. To fulfill the requirements of the
APS, and enable the MBT to aim along any relevant direction, the turret
should be able to rotate 360 degrees and the barrel should be possible to
elevate between -10 and 45 degrees.

The servo motors, or actuators, used to rotate the turret and elevate the barrel
are assumed to be ideal in this thesis. Instead a saturation is added to the
model that limits the maximum control signals. This captures the implicit
saturation of non-ideal servo motors and is important to make sure that the
control methods can be properly compared. Without this saturation, and
the assumption of ideal servo motors, there would be no limitations to the

16
control signals, which are both unreasonable and a problem when comparing
different controllers. The problem occurs because it would then be possible to
tune the controllers to an arbitrary size of the control signal and therefore, an
unreasonable performance.

2.2 Equations of Motion – Two Axis Gimbal System

The movement of the turret and the barrel on top of the MBT chassis is
modeled as a two-axis gimbal system, as mentioned in the previous subsection.
A gimbal system is illustrated in Figure 3 where the gimbal pointing direction
should be aligned with the required line of sight.

Figure 3: A figure of a two axis gimbal system. The coordinate axles i, j and
k are the coordinate system for body P, the chassis. The coordinate axles n,
e and k are the coordinate system for body B, the turret. The coordinate
system for body A is the axles r, e and d. The turret rotates around the yaw
axis and the barrel is elevated around the pitch axis. Elevation angle is ε and
the turret rotation angle is η. Source: [1]

The equations of motion for the angular velocities are derived according to

17
the steps performed by the authors of [1]. The fundamental steps and the
resulting equations are summarized in this section, but the full derivations are
shown in Appendix A and B. The authors start by introducing variables for the
dynamics of the system and transformation matrices to relate the movement
between the MBT parts. Matrix B P C is the transformation matrix between the
turret (B) and the chassis (P) where η is the angle of rotation. It translates the
movement of the MBT from P’s frame to B’s frame. The second transformation
matrix is A
B C between the barrel (A) and the turret (B). The angle ε describes
the elevation of the barrel.
 
cos η sin η 0
B
P C = − sin η cos η 0 (1)
 
0 0 1
 
cos ε 0 − sin ε
A
BC =  0 1 0  (2)
 
sin ε 0 cos ε
The following vectors describe the angular velocities in their respective
coordinate systems.
     
ωP i ωBn ωAr
ω P =  ωP j  , ω B =  ωBe  , ω A = ωAe  . (3)
     
ωP k ωBk ωAd

The moment of inertia is calculated using the mass and the geometry specified
in Table 1. Using these values and the standard formulas for the moment
of inertia for a cuboid and a cylinder, the moment of inertia for the MBT is
calculated.  
Ar Are Ard
A
J = Are Ae Ade  (4)
 
Ard Ade Ad
 
Bn Bne Bnk
B
J = Bne Be Bek  (5)
 
Bnk Bek Bk
Using the transfer matrix (1) for the turret frame (B) to the chassis frame (P)
the authors of [1] state the following relations for the angular velocities

ωBn = ωP i cos η + ωP j sin η


ωBe = −ωP i sin η + ωP j cos η (6)
ωBk = ωP k + η̇,

where η̇ is the angular velocity contribution from the turret rotation actuator.
The angular velocities in the barrel frame (A) expressed in the turret frame

18
(B) is derived using (2)

ωAr = ωBn cos ε − ωBk sin ε


ωAe = ωBe + ε̇ (7)
ωAd = ωBn sin ε + ωBk cos ε,

where ε̇ is the angular velocity contribution from the barrel elevation actuator.
In the following subsections, the effect of the torques provided by the actuators
will be derived.

2.2.1 Elevation Movement

The equation of motion for the elevation movement is derived following the
steps in Appendix A. The resulting equation is

Ae ω̇Ae = τEL + τg + τD−EL , (8)

where τEL is the elevation control signal,

τD−EL = τD−EL (ω A ), (9)

which is a polynomial function of order two, and τg is the torque produced by


the gravitational force. It is calculated by

τg = rgm

where r is the length of the lever, g is the gravitational constant, and m is


the mass of the barrel. The elevation is controlled using the signal τEL , which
provides a torque affecting the angular velocity of the barrel (ωAe ).

2.2.2 Azimuth Movement

Following the steps in Appendix B the equation of motion for the azimuth
movement is

Jeq ω̇Ad = τAZ cos ε + (τd1 + τd2 + τd3 ) cos ε + τd0 , (10)

where τd1 , τd2 , τd3 and τd0 are torques relating the kinematics of the system.
Their specific expressions are derived in Appendix B. The control signal used to
control the turret rotation is τAZ . This controls the azimuth rotation velocity
of the barrel (ωAd ), which can be translated to the azimuth angle.

19
2.3 Control Theory

The objective of a control system is to move and maintain a system into a


desired state while attenuating disturbances, minimizing delay and overshoot.
This is in principal done by creating a model of the system that represents the
system dynamics, which is shown in previous sections. A controller is added
to make the system follow a predefined reference signal. For any system, there
are often multiple controllers that can generate the desired behavior. However,
finding a good controller with respect to system requirements can be hard. It
is therefore often necessary to study the system in order to find a good control
strategy. The suitable control strategies for the problem addressed in this
thesis will be outlined in Section 3.

When designing a controller it is important to define the requirements that


the controlled system should fulfill. Three common factors for evaluating
controllers are shown in Figure 4. These are rise time (Tr ), settling time (Ts )
and overshoot (M ). The rise time, in this thesis, is defined as the time it takes
for the system to go from 10 % to 90 % of the reference value (yref ). Settling
time is the time it takes for the system to settle close to the reference signal.
A common definition is when the signal remains within 2 % of the reference
signal. For this thesis, it is more suitable to measure the settling time based on
a fixed value because of the aiming requirements. The definition used is that
the signal should remain within 1.5 degrees from the reference signal. This was
specified by FOI and corresponds to an accuracy error of ± 2.6 m for targets
at a distance of 100 meters. A common property of control systems is that
the size of the output signal, which here is the angle, increases so fast that it
passes the reference signal. The ratio of the maximum signal strength and the
reference is defined as the overshoot.

20
Figure 4: A description of rise time (Tr ), settling time (Ts ) and overshoot (M ).

Relating the rise time, settling time and overshoot to the MBT model, the rise
time is represented by the time it takes the barrel to rotate or elevate close to
the specified angle. However, depending on the controller, the overshoot might
be large causing the barrel to rotate past the specified angle. Therefore, settling
time is here taken as the time it takes to aim along the desired angle. The
settling time is therefore important when comparing the time it takes to aim.
However, when comparing the use of the APS, the stabilization requirements
are lower. This is because the APS does not require the turret to be still at the
specified angle in order to work. Therefore the rise time is more important,
when considering the APS, since the transition time is the relevant factor.

The controllers used in this thesis are chosen because of their different
properties. PID controllers are relatively easy to implement and are therefore
a good first choice when designing a control system. They are often sufficient
for a given task, cheap and quick to implement compared to other types of
controllers. However, if time and costs are not limiting factors, other controllers
would be of interest as well, which is why it is important to compare them.
The SMC is often chosen because of its robustness properties, which means
it is effective even though the parameters of the model might be uncertain.
The MPC controller is studied because of its optimization properties; where
it optimizes a utility function, and its built-in ability to take constraints into
consideration. It is a method that requires more work to implement compared

21
to especially the PID controller because of the need to define both the controller
and the optimization problem. Depending on the system, there might be some
limitations caused by the optimization time. However, it is often possible
to find an optimal solution quickly given a correct model and optimization
problem.

2.3.1 Cross Coupling Effects

The two rotation axles of the gimbal system are largely decoupled and therefore
the controllers will be implemented in a decoupled fashion as well. However,
the equations of motion show some cross coupling between the elevation and
azimuth movements through the τd1 , τd2 , τd3 and τd0 terms in (10). This
means that the control signal used to control one axis might affect the other
as well. Therefore, before implementation and tuning of the controllers, the
cross coupling of the system is evaluated. If the cross coupling is strong it
is hard to control the system using two separate controllers for the elevation
and azimuth movements, but if the cross coupling is weak, it is possible to
achieve good performance. To measure the cross coupling effect, the transfer
function of the linearized system, G, is derived. The transfer function is state
dependent, which means it is calculated for each state of the linearized system
equations. To calculate the cross coupling the Relative Gain Array (RGA) is
introduced. The RGA is given by

RGA(G) = G ◦ (G−1 )> , (11)

where “◦” is the element wise Hadamard product [11]. The array describes
the effect each input has on each output respectively. In a system with two
inputs and two outputs it is a two by two array where each element describes
the effect of the respective input on each output. If the cross coupling effects
are small, and therefore reasonable to neglect, the RGA array should have
positive diagonal elements close to one. At zero frequency, this is important in
order to make sure that the controller is able to control the system to desired
steady-state when including integral action in the controller.

Calculations show that for pure rotation and elevation movement the RGA is
diagonal. Adding chassis movement combined with rotation or elevation the
RGA changes and is no longer perfectly decoupled. It is however approximately
diagonal with only small deviations with the size of 10−4 . For some cases there
could be some effect on the performance but the system should still be possible
to control assuming decoupled controllers. The RGA is also dependent on the
frequency. For low frequencies (≈ 0.1 s−1 ) the diagonal structure of the RGA
decreases and the diagonal elements start to differ from one. Therefore, for
some frequencies it could be challenging to control the system using decoupled
controllers.

22
Intuitively, it is possible to understand the RGA results. For a general gimbal
the rotation of one axis could cause the second axis to change position.
However, when this is applied to the MBT structure the effect should be small
because the large mass of the barrel requires a large rotation speed in order to
be affected.

2.3.2 PID Control

PID-controllers are the most common type of controllers and are used in a wide
array of applications [4]. This is because of their relative ease to implement
and the fact that they don’t require much information about the system to
be effective. Rather, the controller operates by comparing the output to
a reference signal. The typical PID-controller is described by the transfer
function
Ki N
F (s) = Kp + + Kd , (12)
s 1 + Ns
where Kp is the gain of the proportional part of the controller, Ki is the
gain of the integral part, Kd is the gain of the derivative part, and N is a
filter coefficient. The integral part of the controller reduces the static error
of a step input and the derivative part reduces oscillations. Implementing
PID-controllers in the nominal system requires a tuning process, which is
described in Section 3.2. Figure 5 shows an implementation of PID-control
in the gimbal system, which will be used in this thesis. The controllers are
assumed decentralized even though there are some cross-coupling effect in
theory. As was discussed in the previous section, the cross-coupling effect
is negligible.

Figure 5: Control system using PID controllers.

23
2.3.3 Sliding Mode Control

Sliding mode control is a state feedback stabilization technique. While the


standard form of state feedback control negates the nonlinear terms of a
system, the objective of SMC is to construct a controller that preserves the
state feedback structure but provides more robust control [12]. The advantage
is that while state feedback stabilization requires exact knowledge of the
parameters, SMC only needs a maximum value. Lyapunov theory is used to
derive a function that can be proved to be larger than the possible disturbances.
A sliding surface is then constructed using this function.

The sliding surface is an expression designed to describe the state error, which
the controller should minimize. Often this is a combination of reducing the
errors in position and velocity. If x̃1 is the angular error and x̃2 is the error in
angular velocity the sliding surface can be written

σ = ax̃1 + x̃2 = 0, (13)

where a ≥ 0 is a tuning parameter describing the relative importance of


the errors. The controller is then designed using Lyapunov theory, which
guarantees that a control function can be found that stabilizes the system
along the sliding surface. If the function and the sliding surface are properly
designed the controller will force the system to the equilibrium minimizing the
errors. The Lyapunov function is written
1
V = σ2, (14)
2
where the equilibrium is σ = x̃1 = x̃2 = 0. The necessary requirement to
guarantee stability is
V̇ ≤ −ρ|σ| < 0, if σ 6= 0,
where the derivative of the Lyapunov function is

V̇ = σ σ̇, (15)

and ρ is a function that is certain to be larger than the disturbances.


The function is calculated by studying the system equations and estimating
their maximum values. The derivation of an appropriate ρ is presented in
Section 3.3. The control is chosen such that when |σ| 6= 0, the control forces
the system to |σ| = 0 in finite time. This is achieved by taking

u = −ρ · sign(σ), (16)

where u is the control function. Figure 6 shows the structure of the system
using SMC based controllers, where the controllers once again are assumed
decentralized.

24
Figure 6: Control system based on SMC control.

2.3.4 Model Predictive Control

MPC uses optimization techniques to find the optimal control strategy. The
period during which the system should be controlled is called the prediction
horizon. For a rotation of the turret, or an elevation of the barrel, the
prediction horizon is the time it takes for the movement to be performed. For
each time step of this movement the optimal control strategy is calculated.
To reduce the calculation time the optimization is performed for a predefined
number of time steps. This is called the control horizon. The optimal control
signal is calculated for each step of the control horizon but only the first is
selected and used in the system. At the next time step the optimization is
performed for the control horizon again and a second control value is calculated.
This is reiterated through the prediction horizon and the optimal control
strategy is obtained.

The MPC algorithm used in this thesis is described as follows.

1. Define the dynamical system

2. Linearize the system

3. Discretize the system using a sampling method

4. Define the optimization problem

5. Calculate the optimal control strategy within the control horizon

6. Apply the first step of the optimal control strategy

7. Measure the current state of the system and return to 2 for each step of
the prediction horizon.

25
First, if the physical system is time continuous, one defines the time continuous
dynamical system as presented in Section 2.2. The system is then linearized
and discretized using some sampling method. Based on the discretized system,
the constraints of the optimization problem are defined. A practical approach
when defining the cost function of the optimization problem is to minimize
the quadratic error of the state of the system and the size of the control
signal. This can be described as a quadratic program, which consists of an
optimization problem defined by a quadratic function and linear constraints.
This formulation is useful since there are well developed solving methods for
these types of problems, which are typically convex [13]. There are nonlinear
MPC methods but the linear variant is chosen to enable the definition of a
convex optimization problem, which is easier to solve. The optimization is
performed for the control horizon of each step in the prediction horizon. The
state of the system is measured and the process returns to step 2. Returning
to step 2 completes the feedback loop, which enables the process to take into
account any changes in the state of the system before finding the optimal new
value of the control signal. The structure of the system with an implemented
MPC controller is shown in Figure 7.

Figure 7: Control system using a MPC controller.

3 Method

This section describes the implementation of the controllers and the method
of analysis. The implemented controllers are PID, SMC and MPC.

26
3.1 Nominal Model

There are three important parts of the nominal system, shown in Figure 8.
The controllers, which are the focus of this thesis, the actuators that drive
the two main axles of the system, and the dynamics of the gimbal system
itself, which describes its physical and dynamic properties. To understand the
control problem, one must look at the different forces and torques required
to establish a stabilized line of sight. For a stationary tank, the rotation of
the turret is primarily dependent on the actuator while the elevation depends
both on the actuator and the gravitational force. Furthermore the vehicle’s
movement can cause disturbances, both due to its acceleration and driving on
uneven surfaces, that both control systems should be able to attenuate.

Figure 8: An overview of the nominal system.

The equations derived in Section 2.2 describe the relationship between the
elevation (ε) and azimuth (η) angles and the angular velocities of the barrel
(ωAe , ωAd ). However, these equations have to be modified in order to attenuate
disturbances due to rotation of the chassis. To write the system on an
appropriate form the angles α and β are introduced. The relationships between
these angles and the elevation and rotation angles are shown in Figures 9 and
10.

27
Figure 9: Side view of the MBT model. The coordinate systems are defined
according to Figure 3 and the angle α is the angle between the barrel and the
ground.

Figure 10: Top view of the MBT model where the coordinate systems are
defined according to Figure 3.

Two differential equations can be defined connecting the angles α and β to the
angular velocities

α̇ = ωAe ,
β̇ = ωAd .

To describe the motion of the turret and barrel (6) and (7) are used to express

28
the angles ε and η
ε̇ = ωAe − ωBe ,
η̇ = ωBk − ωP k .
These equations, together with (8) and (10) describe the movement of the
barrel. Since the barrel is a symmetric cylinder the equations can be simplified
by writing the inertia tensor as
   
Ar Are Ard Ar 0 0
A
J = Are Ae Ade  = 0 Ae 0  .
   
Ard Ade Ad 0 0 Ad
Using this simplification in (8) and (10) the elevation movement is written,
Ae ω̇Ae = τEL + τg + (Ad − Ar )ωAr ωAd ,
and the azimuth movement
Jeq ω̇Ad = τAZ cos ε + (τd1 + τd2 + τd3 ) cos ε + τd0 ,
with
Jeq = Bk + Ar sin2 ε + Ad cos2 ε
τd1 = (Bn + Ar cos2 ε + Ad sin2 ε − (Be + Ae ))ωBn ωBe
τd2 = −(Bnk + (Ad − Ar ) sin ε cos ε)(ω̇Bn − ωBe ωBk )
2 2
− Bke (ω̇Be + ωBn ωBk ) − Bne (ωBn − ωBe )
τd3 = ((Ar − Ad ) cos (2ε) − Ae )ε̇ωBn + (Ad − Ar ) sin (2ε)ωAe ωBk
+ (Ar − Ad ) sin (2ε)ωBe ωBk
0
τd = Jeq (ω̇Bn sin ε + ωAr (ωAe − ωBe )).
The equations also have to be defined using only known variables. Since ωAr ,
ωBn , ωBe , ωBk , ω̇Bn , and ω̇Be are unknown and affected by the rotation of
the chassis, they have to be expressed using either the variables α, β, ε, η,
ωAe , ωAd , or through the predefined base movement given by ω P . The angular
velocity ω P and the angular acceleration ω̇ P are assumed to be known inputs
or disturbances to the system. The rewriting of the unknown variables are
performed using (6) and (7). The unknown variables are expressed as
ωAr = ωBn cos ε − ωBk sin ε (17)
ωBn = ωP i cos η + ωP j sin η (18)
ωBe = −ωP i sin η + ωP j cos η (19)
ωAd − ωBn sin ε
ωBk = (20)
cos ε
ω̇Bn = ω̇P i cos η − ωP i sin η(ωBk − ωP k ) + ω̇P j sin η (21)
+ ωP j cos η(ωBk − ωP k ) (22)
ω̇Be = −ω̇P i sin η − ωP i cos η(ωBk − ωP k ) + ω̇P j cos η (23)
− ωP j sin η(ωBk − ωP k ) (24)

29
Finally the system of equations is written

ε̇ = ωAe − ωBe (25)


η̇ = ωBk − ωP k (26)
α̇ = ωAe (27)
β̇ = ωAd (28)
Ae ω̇Ae = τEL + τg + (Ad − Ar )ωAr ωAd (29)
Jeq ω̇Ad = τAZ cos ε + (τd1 + τd2 + τd3 ) cos ε + τd0 (30)

The control inputs are τEL and τAZ and in the following sections the tuning
process of the controllers are presented.

3.2 PID Control

The tuning of the PID controller consists of two steps. First the controller is
tuned so that the system is stabilized by the Ziegler-Nichols method. Secondly,
the controller is tuned by using a gradient descent method. Tuning by the
Ziegler-Nichols method consists of finding the ultimate gain (Ku ) where the
output starts oscillating and then use the ultimate gain and the period of
the oscillations (Tu ) to find the tuning parameters in (12) [14]. Based on the
ultimate gain and the oscillation period the parameters are

Kp = 0.6Ku , Ki = 1.2Ku /Tu , Kd = 0.075Ku Tu . (31)

These relations were chosen because they are often used for the classical PID
controller. There are other relations, which have qualities to for example reduce
overshoot or increase stability. However, the reason for using the Ziegler-
Nichols method is to use the resulting parameters as the initial values of the
gradient descent method. Thus, the exact parameters are not necessarily
important but it is enough that the system is stable with the resulting
parameters. To optimize the controller a gradient descent method is used.
For each step of the tuning process the response time is evaluated, based
on the settling or rise time, using a step change of the three parameters
respectively. The parameters are then updated proportionally to the change
in response time. The process then continues until a satisfactory response is
reached. Also, a built-in anti-windup method in Simulink is used to remove
the problem of integral windup, which would cause excessive overshoot. The
resulting parameters are listed in Table 2.

30
Table 2: The values of the tuning parameters of the PID controllers.

Azimuth

Reference [ ] Optimized for KP KI KD
30 Settling time 384 000 19 000 150 000
30 Rise time 195 000 51 000 120 000
Elevation
10 Settling time 240 000 190 000 74 000

3.3 Sliding Mode Control

To find the appropriate function ρ in (16), the maximum values of the


parameters in the equations of motion must be estimated. Even though the
true maximum values of the parameters are difficult to find, it is possible to
estimate an upper bound. Then values that are certain to be larger than or
equal to the true values can be set. In collaboration with FOI the estimated
maximum values were set to
max |ωP i | = 0.5 rad/s
max ωP j = 0.5 rad/s
max |ω̇P i | = 0.5 rad/s
max ω̇P j = 0.5 rad/s.

An important prerequisite for the derivation of the controller is the triangle


inequality [15]
|x ± y| ≤ |x| + |y|,
where x and y are arbitrary numbers, and the following pair of relations
1 1
0 ≤ |sin ε| ≤ √ , √ ≤ |cos ε| ≤ 1,
2 2
where the elevation ε has been assumed to be less than or equal to 45 degrees.
Utilizing these relations and the estimated maximum parameter values the
controllers can be derived.

3.3.1 Elevation Control

The dynamics describing the elevation are given by (27) and (29).

α̇ = ωAe
Ae ω̇Ae = τEL + τg + (Ad − Ar )ωAr ωAd .

31
If α∗ and ωAe

are the desired outputs the errors can be written as

α̃ = α − α∗

ω̃Ae = ωAe − ωAe .

The sliding surface is defined according to the structure of (13) as

σ = aα̃ + ω̃Ae = 0,

with a as a tuning parameter. To find an optimal value of a multiple


simulations are performed and the value resulting in the best response is
chosen. The value of a is set to 8.2 when minimizing the settling time. This
sliding surface is chosen to make sure that the error of the angle and angular
velocity tends to zero. This can be proved by studying when the sliding surface
is equal to zero.

σ = aα̃ + ω̃Ae = a(α − α∗ ) + ωAe − ωAe



=0
∗ ∗ ∗ ∗
α̇ = ωAe = −a(α − α ) + ωAe ⇒ α → α , if ωAe =0

A Lyapunov function and its derivative is defined following the structure of


(14) and (15). The Lyapunov function should be less than zero and the sliding
surface derivative is
τEL + τg + (Ad − Ar )ωAr ωAd
σ̇ = aα̃˙ + ω̃˙ Ae = aα̇ + ω̇Ae = aωAe + .
Ae
To fulfill inequality (16) the following must hold.

−aAe ωAe − τg − (Ad − Ar )ωAr ωAd ≤ τEL

Using the triangle inequality this is simplified to

aAe |ωAe | + τg + (Ad − Ar )|ωAr ωAd | ≤ τEL , (32)

assuming Ad > Ar . The angular velocity ωAr can be rewritten using (17), (18)
and (20) as
ωAd − (ωP i cos η + ωP j sin η) sin ε
ωAr = (ωP i cos η + ωP j sin η) cos ε − sin ε.
cos ε
Utilizing the boundaries for sine and cosine this is rewritten to
   
1 1
|ωAr | ≤ 1 + √ ωP i + 1 + √ ωP j + |ωAd |.
2 2
The function ρ in (16) is taken as the minimum value of (32)
    !
1 1
ρEL = aAe |ωAe |+τg +(Ad −Ar ) 1 + √ ωP i + 1 + √ ωP j + |ωAd | |ωAd |.
2 2

32
The final control is
τEL = −ρEL · sign(σ).
To reduce chattering the sign function is replaced with a saturation [3]. The
resulting controller is
τEL = −ρEL · sat(σ),
where the saturation is defined as

1, if σ > 0.01


sat(σ) = −1, if σ < −0.01 (33)

σ,

otherwise.

3.3.2 Azimuth Control

Utilizing the same structure as for elevation control the sliding surface can be
written
σ = aβ̃ + ω̃Ad .
When settling time is minimized the value of a is set to 2.8 and when rise time
is minimized the value is set to 5.6. Using the previously introduced structure
for the Lyapunov function and its derivative the sliding surface derivative is
τAZ cos ε + (τd1 + τd2 + τd3 ) cos ε + τd0
σ̇ = aβ̃˙ + ω̃˙ Ad = aβ̇ + ω̇Ad = aωAd + .
Jeq
The following inequality must hold
−Jeq aωAd − (τd1 + τd2 + τd3 ) cos ε − τd0
≤ τAZ .
cos ε
Using the triangle inequality and the limits of sine and cosine this can be
simplified to
√  
2 Jeq aωAd + |τd1 | + |τd2 | + |τd3 | + τd0 ≤ τAZ . (34)
The steps used to derive the control function are presented in Appendix C.
The resulting controller is
τAZ = −ρAZ · sign(σ),
where ρAZ is the minimum value of (34). To reduce chattering the sign function
is replaced with a saturation. The final controller is
τAZ = −ρAZ · sat(σ/10).
The saturation is defined similarly to (33) with the difference that the value
of the sliding surface is divided by ten. This is to improve the chattering
reduction at σ = 0, but this has to be balanced to the decrease of the control
signal during the saturation and the possible increase of chattering at the
saturation boundaries.

33
3.4 Model Predictive Control

Using the standard state space notation the linearized system is

ẋ = Ax + Bu
y = Cx,

where A is a 6 × 6 matrix of the linearized description of the equations


of motion, B is a 6 × 2 matrix describing where the actuators affect the
system, and C is a 2 × 6 matrix defining the output, where the angles α
and β are measured. A is obtained by taking the Jacobian of the system of
equations. This is done by using predefined linearization points providing a
general description of the relevant states. B is obtained by linearizing the
system with respect to the control and C is defined as the measured output.
Table 3 shows the states where linearization is performed.

Table 3: The linearization states.

State ε [◦ ] η [◦ ] ωP i [◦ /s] ωP j [◦ /s] ωP k [◦ /s] ωAe [◦ /s] ωAd [◦ /s]


1 -10 0 0 0 0 0 0
2 0 0 0 0 0 0 0
3 0 0 0 10 0 0 0
4 10 0 0 0 0 0 0
5 10 0 0 0 0 10 0
6 10 0 0 10 0 0 0
7 10 0 0 10 0 10 0

The linearized states are limited to the necessary states of the performed
simulations. Note that the turret rotation angle does not affect the simulations.
Linearizing the system defined in (27)-(30) at the origin, state 2, yields
 
0 0 0 0 1 0
0 0 0 0 0 1
 
0 0 0 0 1 0
 
A=
0 0 0 0 0 1

0 0 0 0 0 0
 
0 0 0 0 0 0
 
0 0
0 0 
 
 " #
0 0  0 0 1 0 0 0
 
−4 
B = 10  , C= .
 0 0  0 0 0 1 0 0
0.9788 0 
 
0 0.5755

34
The system is then discretized using a zero-order hold sampling method.
Sampling results in a system on the form

x(kT + T ) = Φx(kT ) + Γu(kT )


y(kT ) = Cx(kT ),

where Z T
AT
Φ=e , Γ= eAt Bdt,
0
k is the discretized step and T is the sampling time, set to 0.01 s. For state 2
in Table 3 the discretized system is
 
1 0 0 0 0.01 0
0 1 0 0 0 0.01
 
0 0 1 0 0.01 0 
 
Φ=
0 0 0 1 0 0.01

0 0 0 0 1 0 
 
0 0 0 0 0 1
 
0.0049 0
 0 0.0016
 
" #
0.0049 0  0 0 1 0 0 0
 
Γ = 10−6  , C= .
 0 0.0016 0 0 0 1 0 0
0.9788 0 
 
0 0.3243
The objective is to minimize the reference error and taking the input amplitude
into consideration the optimization problem can be written as
N
X −1
2
min q|et+N | + (q|Cet+k |2 + ru2t+k ),
e,u
k=0
s.t. xt+k+1 = Φxt+k + Γut+k ,
et+k+1 = xt+k − R,
xt = Current measured state,

where q and r are weights describing the importance of state and input strength
respectively, e is the error, u is the signal strength, R is the reference, and xt is
the current state. The q and r variables are tuning parameters used to define
the proper optimization problem. Since a saturation on the control signal was
added the need to control the size of the control signal decreased. Therefore,
the parameters were set to only penalize state error; q = 1 and r = 0. This
might however, result in a solution that can be improved by defining a different
optimization problem, which will be further discussed in Section 5.

35
An efficient method to solve the optimization problem is by rewriting it on the
standard form of a quadratic program.
1 >
min z Hz
z 2
s.t. Ez = b.

Here H is the Hessian matrix, which describes the cost function used for the
optimization, b is a constant vector defined in (36), and z is a vector containing
all states and controls for the control horizon
h i
z = e1 . . . eN u1 . . . uN −1 .

The Hessian matrix can be described as a block matrix where the diagonal
consists of the two submatrices H1 and H2
 
H1 0 0 0 0 0
 0 ... 0
 
 0 0 0
0 0 H 1 0 0 0 
H=0
, (35)
 0 0 H2 0 0
 ... 
0 0 0 0 0
0 0 0 0 0 H2

where
 
0 0 0 0 0 0
0 0 0 0 0 0
 
" #
0 0 1 0 0 0 1 0
 
H1 = 2q  , H2 = 2r .
0 0 0 1 0 0 0 1
0 0 0 0 0 0
 
0 0 0 0 0 0

The first part of the block matrix consists of N H1 -matrices on the diagonal
and the second part consists of N − 1 H2 -matrices. Matrix H1 defines the cost
due to a state error as the difference between the specified angle of the barrel
and turret. Specifically it is the error of α and β defined in Figures 9 and 10.
Matrix H2 specifies the cost due to the input energy. To find the E and b
matrices the recursion of et must be found. This can be calculated as

et+1 = Φet + Γut


et+2 = Φet+1 + Γut+1 = Φ2 et + ΦΓut + Γut+1
..
.
et+n = Φet+n−1 + Γut+n−1 = Φn et + Φn−1 Γut + · · · + Γut+n−1

36
Based on the above equations the vector b is written as
 
Φ
 Φ2 
b =  ..  et , (36)
 
 . 
Φn

where et is known since it is the last measured state and E is written as


 
1 0 0 0 ... −Γ 0 0 ... 0
0 1 0 0 . . . −ΦΓ −Γ 0 ... 0 
 
0 0 1 0 . . . −Φ2 Γ −ΦΓ −Γ . . . 0
E= .

 .. 
. 
N N −1 N −2 N −3
0 0 0 0 . . . −Φ Γ −Φ Γ −Φ Γ . . . −Φ Γ

The optimization problem can then be solved using a standard method for
quadratic programming. The method used in this thesis is described in
Appendix D.

4 Results and Analysis

This section shows the results and analysis of the simulations. It describes
the response to a reference change, a reference disturbance, the effect of an
uncertain mass distribution of the turret and the frequency analysis.

4.1 Line of Sight Alignment

Figure 11 shows the results of a reference change from zero to 30 degrees


of the turret rotation around the k-axis. The PID and SMC controllers
show similar responses, but where the PID controller shows a slightly larger
overshoot causing its settling time to increase. The settling time of the MPC
controller is approximately 0.5 seconds slower compared to the SMC controller
and 0.1 seconds slower than the PID controller. Studying the control signals
it is clear that especially the SMC controller follows the Bang-bang control
structure. This means that the control signal tends to the maximum control
value when the velocity should be increased and to the minimum value when
the velocity should be decreased. Both the PID and MPC controllers show
similar responses, especially at the beginning when all controllers have the
same response, but with a weaker correspondence to the Bang-bang structure.

37
(a) (b)

Figure 11: Rotation response and control signal for a 30 degree reference
change when the controllers are tuned to optimize settling time.

The response to a 30 degree change in reference when the PID and SMC
controllers are tuned to minimize the rise time is shown in Figure 12.
Compared to the results when minimizing the settling time there are now clear
overshoots for both the PID and SMC controllers. The SMC controller has a
slightly better rise time as well as an approximately 0.5 seconds faster settling
time, compared to the PID controller. Due to the complexity of implementing
the MPC controller and the definition of the optimization problem, it was
not specifically tuned to optimize the rise time. Therefore it shows the same
response as for the settling time.

(a) (b)

Figure 12: Rotation response and control signal for a 30 degree reference
change when the PID and SMC controllers are tuned to optimize rise time.

Figure 13 shows the response to a 10 degree reference change for the elevation.
The SMC controller has the best performance with an approximately 0.2
seconds faster settling time compared to the PID and MPC controllers as well

38
as minimal overshoot. The PID controller has a better settling time compared
to the MPC controller but a slightly larger overshoot. The MPC controller has
the slowest settling time but no overshoot. Furthermore, the MPC controller
has a steady-state error, which means that there is a difference between the
final angle and the reference. A method to remove this error is discussed
in Section 5.2. By studying the control signal, one can see that there are
significant differences. The SMC controller shows a bang-bang behavior for
a relatively long time, while both the PID and MPC controllers, which have
smaller control signals, end the bang-bang behavior earlier.

(a) (b)

Figure 13: Elevation response and control signal for a 10 degree reference
change tuned for optimal settling time.

A summary of the rise time, settling time and overshoot is listed in Table 4.

Table 4: Rise time [s], settling time [s] and overshoot [%] for the reference
changes.
Azimuth (settling time) Azimuth (rise time) Elevation (settling time)
Controller Tr Ts M Tr Ts M Tr Ts M
PID 0.789 1.669 5.04 0.718 3.417 28.2 0.594 0.667 1.33
SMC 0.796 1.21 1.87 0.673 2.953 41.93 0.372 0.467 0
MPC 1.12 1.75 0 1.12 1.75 0 0.67 0.7 0

4.2 Disturbance Attenuation

Figure 14 shows the effect of a 30 degree turn of the chassis, when the turret
should be stabilized at a constant angle. Using the same tuning parameters
as for the reference change the response of the controllers are similar. At the
beginning of the turn, at 1 s, all controllers show very similar performances.
At the end of the turn, after 2 s, the controllers show similar behavior but

39
the MPC controller shows a slightly better performance than the SMC, which
in turn shows better performance than the PID controller. The control signal
shows a similar response as for the change in reference in the previous section
when it quickly switches to either the maximal or minimal saturation level. At
approximately 1.8 seconds the controllers have adjusted the control signal to
the turn and are returning to a steady state. After 2 seconds the turn ends,
which causes a new disturbance to the controllers and they readjust to stabilize
the turret for the non-rotating MBT.

(a) (b)

Figure 14: Turret response and control signal for a 30 degree, one second turn.

Figure 15 shows the response to a ten degree turn of the chassis when the angle
of the turret should be constant. Compared to the 30 degree turn there is a
significant performance difference between the controllers. The SMC and MPC
controllers show smaller deviation from the reference signal compared to the
PID controller. Studying the control signal, the SMC and MPC controllers still
show the Bang-bang structure while the control signal for the PID controller
doesn’t reach the saturation level.

(a) (b)

Figure 15: Turret response and control signal for a 10 degree, one second turn.

40
The effect of a ten degree disturbance in elevation, when the barrel should be
aligned at a constant angle, is shown in Figure 16. The performance of the
PID controller is significantly worse than the SMC and MPC controllers. Both
the SMC and MPC controllers have similar disturbance attenuation but the
SMC controller returns slightly faster to the reference angle. Similarly to the
ten degree disturbance in turret rotation the control signals show that the PID
controller does not reach the saturation level while both the SMC and MPC
controllers follow the Bang-bang structure.

(a) (b)

Figure 16: Barrel response and control signal for a 10 degree, 1 s disturbance.

Table 5 lists the results of the disturbances. The maximum and minimum
errors are shown as well as the settling time for the cases where it is relevant.
The entries where the settling time is marked by “-” are where the error never
passes the defined limit of the settling time set to 1.5 degrees.

Table 5: Results for a disturbance in angular velocity.

Azimuth

Controller Disturbance [ /s] Ts [s] Max [◦ ] Min [◦ ]
PID 30 3.856 8.137 -12.497
SMC 30 3.635 8.073 -10.778
MPC 30 3.7 8.073 -9.732
PID 10 - 1.326 -1.396
SMC 10 - 0.897 -0.850
MPC 10 - 0.899 -0.806
Elevation
PID 10 - 0.919 -1.205
SMC 10 - 0.182 -0.526
MPC 10 - 0.0697 -0.634

41
4.3 Moment of Inertia Uncertainty

The effects of an uncertain mass and mass distribution of the turret was tested
using the controllers used for the reference change test case. The mass of the
turret was varied between 75 % and 125 % of the nominal mass. Using the same
tuning parameters as for the reference and disturbance cases, all controllers
show only slight effects of this parameter uncertainty. The MPC controller
does however, show the least disturbance. Even though the effects are small
the results show that a larger mass reduces the performance of the controllers.

The effects of an uncertain mass distribution were tested as well where the
center of gravity of the turret was shifted 0.25 m and 0.5 m from the center line
of the MBT. The results for all controllers show approximately no effect. The
performance however, decreases when the center of gravity is shifted further to
the side of the MBT. The results for the controllers are shown in Figures 17-19.

(a) Turret mass uncertainty. (b) Turret mass distribution uncertainty.

Figure 17: Turret response to turret mass uncertainties using PID control.

(a) Turret mass uncertainty. (b) Turret mass distribution uncertainty.

Figure 18: Turret response to turret mass uncertainties using SMC control.

42
(a) Turret mass uncertainty. (b) Turret mass distribution uncertainty.

Figure 19: Turret response to turret mass uncertainties using MPC control.

The results are listed in Table 6. The seemingly large difference, using the
PID controller, for the nominal mass and 75 % of the mass occurs because
the overshoot for the larger masses causes the system to pass the 1.5 degree
threshold defined for the settling time. It is because of this the difference
between the settling times seems large but is mostly due to the definition of
the settling time.

Table 6: Results for an uncertainty in the moment of inertia for the turret.
The mass is described as percent of nominal mass and the mass distribution
uncertainty as distance from the center line. The rise time [s], settling time [s]
and overshoot [%] are listed.
Mass Mass distribution
Controller Uncertainty [%] Tr Ts M Uncertainty [m] Tr Ts M
PID 75 0.783 1.186 4.47 0 0.789 1.669 5.04
PID 100 0.789 1.669 5.04 0.25 0.79 1.702 5.13
PID 125 0.795 1.804 5.66 0.5 0.793 1.765 5.42
SMC 75 0.792 1.205 0.76 0 0.796 1.21 1.87
SMC 100 0.796 1.21 1.87 0.25 0.797 1.212 1.91
SMC 125 0.8 1.216 2.86 0.5 0.799 1.215 2.38
MPC 75 1.11 1.75 0 0 1.12 1.75 0
MPC 100 1.12 1.75 0 0.25 1.12 1.75 0
MPC 125 1.11 1.76 0 0.5 1.12 1.75 0

4.4 Frequency Analysis

When applying an oscillating reference signal the results show some differences
between the controllers. The magnitude of the signal amplification, for
different frequencies, is shown in Figure 20. The responses of the controllers
describe their ability to follow an oscillating reference signal. Comparing

43
the controllers, one difference is the peak shown by the PID controller at
approximately 0.7 Hz. This behavior is not shown for the SMC and MPC
controllers, which suggests that the PID controller might be ineffective at
frequencies around the peak frequency. The MPC controller, where each time
step in the sampling is 0.01 s instead of 0.001 s, shows an anomaly at higher
frequencies. The anomaly is likely due to the frequency being larger than
the Nyquist frequency, which is half of the sampling frequency. For the MPC
controller this is 50 Hz. This limitation suggests that the MPC controller will
not be able to control a system where the frequency is larger than 50 Hz.
The PID controller shows similar problems as the MPC controller at higher
frequencies, which is unexpected since the time step for the PID controller is
0.001 s. This should be further studied.

The analysis is also useful to determine how measurement noise affects the
system, since the effect of noise is similar to the effect of an oscillating reference
signal. Therefore, the results suggest that the PID controller may have bad
noise cancellation performance around the peak value at 0.7 Hz. Furthermore,
the MPC controller will not be able to attenuate noise disturbances effectively
with frequencies above the Nyquist frequency at 50 Hz.

Figure 20: Frequency plot of an oscillating reference signal when measuring


the amplification of the output angle.

Figures 21 and 22 show the result of applying an oscillating disturbance on the


chassis elevation axis, signifying driving on rough terrain. Figure 21 describes

44
the effect on the output angle, where a smaller value on the decibel scale
signifies a better disturbance attenuation. The figure shows that disturbance
at all frequencies are attenuated by the controllers. There are however, some
differences in their ability to attenuate the disturbances. The PID controller
shows a large peak at approximately 1 Hz suggesting a worse performance.
The result, that the controllers behave differently at different frequencies,
might be explained by Bode’s integral theorem. The theorem states that
the cost of having a good disturbance attenuation at some frequencies, are
worse attenuation at other frequencies [11]. The exact cost is determined
by the system’s transfer function but taking this theorem into account it is
a reasonable result that all controllers show varying disturbance attenuation
performances in Figures 21 and 22. The theorem, however, also states that if
the magnitude is smaller than one for some frequencies, the magnitude must be
larger than one for other frequencies. This behavior is not seen in the studied
frequency span and therefore there might be difficulties in applying the Bode
integral theorem directly.

Figure 21: Frequency plot of an oscillating disturbance signal when measuring


the amplification of the output angle.

Figure 22 shows the effect on the output angular velocity. The performances
of the SMC and MPC controllers are similar but there are some differences
when comparing their attenuation performances. For low frequencies the
MPC controller has slightly worse attenuation than the SMC controller. At
approximately 5 Hz the PID controller shows a smaller bandwidth and a peak

45
similar to its behavior in Figure 20. This suggests it is not as quick as the
SMC and MPC controllers when attenuating disturbances.

Figure 22: Frequency plot of an oscillating disturbance signal when measuring


the amplification of the output angular velocity.

5 Discussion

This part discusses the results and evaluates the method used to standardize
the comparisons. It discusses the strengths and weaknesses of the thesis as
well as other uses of the work, ethical considerations and future work.

5.1 Tuning Process

Tuning the controllers according to a standardized method is important in


order to draw any conclusions from the comparisons. The standardization
method depends on which property is considered important to study. In this
thesis the actuators are assumed to be ideal. Therefore there are no limits to
the size of the control signal. However, in order to standardize the tests and
make it more realistic a saturation was added to limit the maximum amplitude
of the control signal.

46
The method of using a saturation is useful to compare the response times.
However, it removes the possibility to evaluate the size of the control signal, if it
is larger than the saturation level. For a step reference change the control signal
of all controllers tends to turn into a Bang-bang controller. This is reasonable
since that is the theoretical optimal solution to the problem assuming no
cost on the input signal. It does however remove some information of the
step responses since all controllers show similar control signals. To get more
information another method could have been used to set a maximum limit to
the control signal instead of a saturation. This would provide information of
the control signal size each controller requires. For the MBT application it is
however more reasonable to compare the results assuming a saturation. The
saturation provides an approximation of the actuators, which in practice are
not ideal.

A drawback of the method used in this thesis is that the controllers can be
tuned very aggressively due to the lack of accurate actuator models and noise
disturbances. This means that the true performance of the controllers might
be lower than what is suggested in this thesis since the inclusion of noise could
cause controllers that are too aggressively tuned to become unstable. However,
the frequency analysis shows that noise disturbances should not affect the
system significantly. The inclusion of non-ideal actuators should however, be
considered in future work. Therefore, the results of this thesis provide an upper
ceiling of the performances that are useful in the evaluation of an MBT.

A second challenge regarding the tuning process is to make sure that the
controllers are similarly tuned to enable accurate comparisons. The tuning
process of the controllers differs, which complicates the standardization. A
gradient descent method was used to optimize the tuning. This was especially
important when tuning the PID controller since it contains three variables
that affect the results. The gradient descent method was used for the SMC
as well but the advantage was limited since the performance of the controller
largely depends on how accurately the system is modeled. MPC is tuned by
the definition of the optimization problem, but the performance also depends
on the accuracy of the model. The tuning process for the three controllers
does not guarantee that they are similarly tuned but it is a systematic process
that reduces the differences. An additional complexity when comparing the
tuning processes is that SMC and especially the MPC methods depend on the
accuracy of the model. This is not considered when using the gradient descent
method but instead has to be modeled as accurately as possible.

The gradient descent method itself provides a possibility to optimize the tuning
but it has some drawbacks. The obtained result is not necessarily a global
optimum. This means that the tuning process has to be performed for different
settings of initial values in order to make sure that the final settings are
optimal. The method used in this thesis does not guarantee a globally optimal

47
solution but the process is iterated until the improvement is negligible, which
gives a locally optimal solution.

Comparing the complexity of tuning the controllers is important. PID is


relatively easy to implement, which makes it an attractive method to use. SMC
requires more knowledge of the system when defining the control law. This
puts some limitations on the method since it is not always possible to derive the
equations of motion of a system. While SMC only requires estimated maximum
values of the equations of motion, MPC requires a more exact representation
of the system. This makes MPC the hardest to implement of the methods
used in this thesis. These differences in implementation methods and tuning
complexity should be taken into account when designing a system and choosing
control methods. Furthermore, both the PID and MPC controllers require
some form of gain scheduling or linearization schedule. For MPC it is largely
a mathematical task to implement more linearized states and as long as the
cost function is not affected this does not require significantly more work.
The PID controller however, requires tuning at each added state in the gain
schedule, which depending on the system can be time consuming. States, in
this context, refers to the possible values of the variables of the equations of
motion, for example, the angles or angular velocities of the turret and barrel,
as well as movement of the MBT chassis.

5.2 Controller Comparison

The controllers have been simulated to analyze their response times, abilities
to attenuate disturbances and sensitivities to mass uncertainty. The behavior
of the PID and SMC controllers for the turret rotation are similar when the
settling times are compared. This is reasonable when studying the control
signals, which all follow the structure of Bang-bang control. For a linear system
with input constraints, this is the optimal solution. The MBT system is not
necessarily linear but can be approximated as linear for small deviations from
the steady state. With the added constraints on the control signal the Bang-
bang structure is a reasonable result. Since the responses are very similar this
does not provide much information. It does however show that the controllers
behave reasonably.

The results also show an estimation of the rotation time that is important in
the evaluation of the system. The MPC controller, especially for the turret
rotation case, shows a slightly worse settling time compared to the PID and
SMC controllers. This result is similar to the results of [8], which also compares
PID, SMC and MPC control methods. A difference between the results is that
in this thesis neither the PID or SMC controllers have any major overshoot
compared to the results in [8]. This could be because of the different models

48
used. It is also possible that the performance of the MPC controller could
be increased if the control signal saturation was included in the optimization
problem as an input constraint.

When the controllers are tuned to minimize the rise time of the system the
improvement of the rise time is small. It does however incur a large overshoot
both for the PID and SMC controllers. The reason rise time is considered is
because it is a good measurement of the limits of the APS. An alternative
approach to simulate this could have been to remove the constraint that the
turret should be stabilized at the reference. Instead the objective could have
been to turn as quickly as possible to an angle without the requirement to
stabilize at that position. This would give a lower limit to the rise time but
this is not necessarily the most efficient requirement in practice. For example,
there could be limits considering the equipment and the crew of the MBT.
Furthermore, the procedure used in this thesis was chosen because there could
be an advantage having the turret stabilize at the given angle. This is because
it could be favorable to be able to quickly stabilize the barrel in the direction
of the threat detected by the APS. Whether or not the increase of performance
is worth the additional overshoot and reduction of settling time is a question
of the practical use of the MBT, which is not further discussed in this thesis.

The settling time for a change in the elevation reference was tested as well. The
results are similar to the effects of a reference change in turret rotation with
some differences. The performance of the MPC controller is more similar to
the PID and SMC controllers. It is however the slowest of the three controllers.
Comparing the results to the study [8] shows some differences. In [8] the MPC
controller for the elevation movement is slower compared to the PID and SMC
controllers and the rotation case. This difference might be because of the
model differences. If the relative mass of the two gimbal axes differs it would
affect the results when comparing the systems.

The MPC controller implemented in this thesis also has a steady state error
that could affect its performance. This is likely due to the difficulty of properly
modeling the system affected by the gravitational force. Depending on the
required accuracy of the controller this error can be corrected by introducing
integral action. One method to introduce it is presented in [16]. They add
an additional term in the cost function that penalizes the steady-state error.
This is not implemented in the model considered in this thesis since the
acquired accuracy was deemed sufficient for the objective. However, different
formulations of the optimization problem were tested. Instead of penalizing
the size of the control signal the problem were rewritten to take into account
the rate of change of the control signal. This method was studied in [17].
Implementing the method in this thesis did however, not show any significant
improvement and the original formulation was kept. It is likely that further
improvement of the MPC can be made by, for example, including integral

49
action but this is not further studied in this thesis.

The disturbance attenuation shows some interesting results. For a 30 degree


disturbance rotation of the turret the controllers behave similarly with only
a slight difference at the end as seen in Figure 14. The controller settings
are the same as for the step change response, which enables comparisons.
For the reference change in Figure 11 the response of all controllers at the
beginning of the movement are very similar. This is similar to the response
for the disturbance shown in Figure 14 where the controller output is similar.
The interesting results are obtained when this is compared to the attenuation
of a ten degree disturbance as seen in Figures 15 and 16. The SMC and
MPC controllers are more effective at reducing the disturbance. The controller
settings are still the same as for the settling time step response. A conclusion is
therefore that the tuning of the PID controller is more sensitive to disturbances,
that it was not defined to attenuate, compared to the SMC and MPC
controllers.

In theory, if the controllers could be tuned according to an unlimited


number of system states, the controllers should not be affected by the tuning
imperfections by not being adjusted for each possible state of the system. In
practice however, this is hard to accomplish since there are many possible states
that should be considered. It might also be inadvisable since a too aggressively
tuned controller might become unstable in the presence of noise disturbances.
It is therefore important to know the effect of model imperfections. It should
be further studied how sensitive the tuning of the controllers are for multiple
states of the MBT.

An aspect of the thesis was to study the effect of uncertain parameter values
in the model. The model dependence of the turret mass and the turret
mass distribution was tested and the results show slight to no effect. The
results show that the rotation performance is increased when the turret mass
is decreased. This is reasonable since it is then a smaller mass that requires
control. There could possibly be some instability if the mass is largely reduced,
but considering the practical aspects of the MBT, such a reduction of mass is
likely unreasonable. A smaller mass could however, induce oscillation, which
would require retuning of the controllers. It is however, still an interesting
result. If the mass is exaggerated the performance of the system could be
underestimated. Since it can be difficult to estimate the correct parameters
this is an important result. It shows that there are some effect on the system
but the difference is small and the results are not largely dependent of the
estimated value of the turret mass.

The frequency analysis shows some similarities and differences between the
controllers. For an oscillating reference signal the PID controller has a peak
at approximately 0.7 Hz. This behavior is not present for the SMC and MPC

50
controllers. The performance when applying an oscillating disturbance also
shows some differences. The PID controller shows the worst performance
around the peak at approximately 0.7 Hz, where the reduction of the
disturbance is not as large as for the SMC and MPC controllers. At higher
frequencies the PID controller behaves significantly different compared to the
SMC and MPC controllers. The PID controller shows a larger attenuation
of the disturbances but also a smaller bandwidth suggesting that it is slower
than the SMC and MPC controllers. This implies that the SMC and MPC
controllers should be chosen when following a reference or attenuating a
disturbance with an approximate frequency of 0.7 Hz.

5.3 Alternative Applications

The focus of this thesis has been comparing control strategies for stabilizing
the turret and barrel of a main battle tank. Even though the MBT is an unique
vehicle with specific requirements the results are interesting for other types of
applications as well. The model, which was based on a two-axis gimbal on a
moving base, could with minor alterations be used to describe, for example,
fire fighting vehicles and equipment used to stabilize cameras or measurement
tools. The method and results of this thesis could therefore be generalized to
be used on other systems.

Modern fire fighting trucks used at airports to combat engine fires have a
water cannon on the roof that can be modeled as a gimbal system. One can
assume that the disturbance rejection requirements, due to movement, are not
as large as for an MBT but the alignment requirements are the same. An
added complexity of the water cannon is the effect of a continuous flow of
water, which could cause some disturbances. This might be modeled similarly
to an oscillating disturbance on the MBT.

A second alternative application is the gimbal systems used to stabilize cameras


and measurement equipment. The dimensions and mass are significantly
different between such a system and the MBT studied in this thesis but
the process and implementation should be fairly similar. In general, the
MBT system differs from many other gimbal systems due to the mass of the
MBT parts. This could largely be compensated for by designing appropriate
actuators but, as mentioned in the RGA analysis, the large mass of the MBT
reduces the effect of cross coupling, which might be more significant in smaller
sized and lighter gimbal systems.

An interesting part of this thesis is the comparison method of the controllers.


Comparing controllers can be difficult and there does not seem to be any
general method. Rather, it largely depends on the system requirements and the

51
intended applications. Regardless of what parameters one wants to compare
it is important to make sure that the result is dependent on the properties
of the controllers, not on the efficiency of their tuning. In order to get an
accurate result the controllers should be tuned according to a standardized
method. Since the method of tuning the controllers depends on the controller
and is therefore different for each type of controller this is not a trivial problem.
This thesis tries to circumvent this problem by using a saturation in the control
signal to make sure that it is the properties of the controllers that are compared.
Furthermore, a gradient descent method is used to tune the controllers to a
similar precision. This shows a possible method for standardized comparisons.

5.4 Ethical and Sustainability Considerations

In any scientific project the ethical aspects of the study should be considered.
In a project related to military technology the ethical aspects are even more
important. Even though the aim of this project is not to improve weapon
performance there are a lot of scientific research that could potentially be used
in a military application. Therefore it is necessary to discuss the ethical aspects
of this thesis.

This thesis studies control methods of an MBT. Even though one could argue
that this could lead to the development of better weapons that is not the
objective of the thesis. The objective is to build a framework for analyzing the
properties of existing and future systems. In order to create the framework
a thorough understanding of the equipment is necessary and this can only be
achieved by studying the system. The methods to compare different control
strategies are also an important research question.

The results of this thesis can also be used in a wide array of civilian
applications. For example, firetrucks and camera stabilization equipment,
which was mentioned in the previous section. It is also important to remember
that civilian research on control systems and gimbal theory can be used in the
weapons industry. Control theory is a part of all military vehicles, from ground
vehicles to airplanes. It can therefore be hard to make any clear distinction
between civilian and military research. This raises the question of who it is
that is responsible for the consequences of technology development. This is
a complicated question where maybe the debate is more important than the
answer.

Sustainability is important to consider in any scientific project. Three relevant


aspects are social, economical and ecological sustainability. The social impact
is discussed in the introduction but can be summarized as improving the
ability to evaluate military systems for defensive purposes. The economic and

52
ecological aspects of this thesis are mainly a part of the choice of methods.
Simulations are, compared to experiments, both cheap and reduces pollution.
Experiments are an important part of validating the results but the use of
simulations can both reduce the cost and unnecessary pollution.

5.5 Future Work

When studying the results of this thesis and the method there are several
interesting aspects that should be further researched. The results for the
disturbance attenuation show that there are differences between the controllers
in their abilities to reduce disturbances. Theoretically they might have equal
performances but when implemented the number of possible operational states
must be considered, which affect the performance of the controllers. Especially
the PID and MPC controllers are sensitive to the number of system states
since they are tuned for a selection of those states. Therefore an important
future research question is how the number of tuning states affect the controller
performances. Furthermore, it would be interesting to study other definitions
of the MPC optimization problem.

A second important question for future work is the effect of noise disturbances
on the controllers. The controllers in this thesis are aggressively tuned, which
is possible because of the lack of noise disturbances. With such disturbances
the risk of unstable control increases. The results of this thesis give an upper
limit of the performances but including noise in the derivation of the controllers
would likely provide a more accurate estimation.

Finally an interesting future study would be to find an efficient method to


compare different types of controllers. The performances can be compared
using any relevant measurement, but the performance comparison is only
accurate if the controllers are tuned to a similar precision, or if a limit on
the performance can be defined. If for example one controller happens to
be tuned more efficiently than the other controllers the result might depend
more on ones ability to tune the controllers. If a controller is complicated to
implement and tune this is an important drawback of that type of controller
but it is still important to make sure that the controllers are tuned in such
a way that they are comparable. There seems to be a lack of this kind of
research and should therefore be further studied.

53
6 Conclusions

The objective of this thesis was to implement and evaluate three controllers
in an MBT where the turret and barrel were modeled as a two axis gimbal.
The control methods selected were PID, SMC and MPC. They were compared
based on a reference change in required turret and barrel angle, a disturbance
of the reference angle and the effects of an uncertainty in the mass and
mass distribution of the turret. The results show that the PID controller
has a relatively good response to a reference change but a bad disturbance
attenuation. The SMC controller shows the best performance for the reference
change and the disturbance attenuation. The MPC controller has the slowest
response to a reference change but similar performance as the SMC when
attenuating disturbances. The frequency analysis suggests that the PID
controller has a weaker disturbance attenuation than the SMC and MPC
controllers at approximately 0.7 Hz, most likely due to the introduction of
a self-oscillatory mode at that frequency.

The slow response of the MPC compared to the PID and SMC controllers is
surprising and probably due to an inefficient choice of optimization criterion.
In theory, the MPC controller should provide an optimal solution but that is
dependent on the optimization problem and the defined model. The effects
of an uncertain mass or mass distribution of the turret are for all controllers
small.

The complexity of implementing the controllers varies. The PID controller is


relatively simple to implement but, as the results show, it requires tuning
at more operational states than the other controllers. The SMC method
requires more work compared to the PID controller since the equations of
motion must be derived and their maximum values estimated. This increases
the implementation cost. The hardest controller to implement is however the
controller based on MPC. It requires a more exact representation of the system
than SMC and the definition of the optimization problem requires work in
itself.

To summarize the results the SMC controller show the best performance
but is harder to implement than the PID controller. The PID controller
show better performance for reference changes than the MPC controller but
significantly worse performance when attenuating disturbances. The MPC
controller, however, is hard to implement and requires good knowledge of the
system and the requirements. This shows that the analysis of the control
system can affect the estimated performance of an MBT.

54
References
[1] Maher Abdo, Ahmad Reza Vali, Alireza Toloei, and Mohammad Reza
Arvan. “Research on the Cross-Coupling of a Two Axes Gimbal System
with Dynamic Unbalance”. International Journal of Advanced Robotic
Systems 10 (2013), pp. 1–13. doi: 10.5772/56963.
[2] Haitao Li, Shan Yang, and Hongliang Ren. “Dynamic decoupling
control of DGCMG gimbal system via state feedback linearization”.
Mechatronics 36 (2016), pp. 127–135. issn: 0957-4158.
[3] Brian J Smith, William J Schrenk, William B Gass, and Yuri B Shtessel.
“Sliding Mode Control in a Two Axis Gimbal System”. Solid State
Sciences 5 (1999), pp. 457–470. doi: 10.1109/AERO/.1999.790222.
[4] G M van der Zalm. “Tuning of PID-type controllers”. 2004.054 (2004).
[5] Maher Abdo, Ali Reza Toloei, Ahmad Reza Vali, and Mohammad Reza
Arvan. “Cascade Control System for Two Axes Gimbal System with
Mass Unbalance”. International Journal of Scientific & Engineering
Research 4 (2013), pp. 903–912. issn: 2229-5518.
[6] Maher Mahmoud Abdo, Ahmad Reza Vali, Ali Reza Toloei, and
Mohammad Reza Arvan. “Stabilization loop of a two axes gimbal system
using self-tuning PID type fuzzy controller”. ISA Transactions 53 (2013),
pp. 591–602.
[7] Gautam Kumar, Pradeep Y. Tiwari, Vincent Marcopoli, and Mayuresh
V. Kothare. “A Study of a Gun-Turret Assembly in an Armored Tank
using Model Predictive Control”. American Control Conference (2009).
doi: 10.1109/ACC.2009.5160524.
[8] Byron Zapata, Jamie Heredia, and Julio Proaño. “Design and Evaluation
of the PID, SMC and MPC Controllers by State Estimation by Kalman
Filter in the TRMS System”. AISC (2021), pp. 531–544. doi: 10.1007/
978-3-030-60467-7\_43.
[9] Kemalettin Erbatur, M Okyay Kaynak, and Asif Sabonovic. “A Study
on Robustness Property of Sliding-Mode Controllers: A Novel Design
and Experimental Investigations”. IEEE Transactions on Industrial
Electronics 46 (1999), pp. 1012–1018. doi: 10.1109/41.793350.
[10] Nils Bruzelius, Peter Bull, Lars Bäck, Jonas Eklund, Kenny Heilert,
Hans Liwång, Patrik Stensson, and Carl-Gustaf Svantesson. Lärobok i
Militärteknik, vol. 5. Försvarshögskolan, 2012. isbn: 978-91-86137-02-1.
[11] Torkel Glad and Lennart Ljung. Reglerteori flervariabla och olinjära
metoder. Studentlitteratur, 2003.
[12] Hassan K. Khalil. Nonlinear Control. Pearson, 2015.
[13] Igor Griva, Stephen G. Nash, and Ariela Sofer. Linear and Nonlinear
Optimization. 2009.

55
[14] Torkel Glad and Lennart Ljung. Reglerteknik grundläggande teori.
Studentlitteratur, 2006.
[15] Lennart Råde and Bertil Westergren. Mathematics Handbook for Science
and Engineering. Studentlitteratur, 2004. isbn: 978-91-44-03109-5.
[16] Margarita Norambuena, Pablo Lezana, and Jose Rodriguez. “A Method
to Eliminate Steady-State Error of Model Predictive Control in Power
Electronics”. IEEE Journal of Emerging and Selected Topics in Power
Electronics 7 (2019), pp. 2525–2530. doi: 10 . 1109 / JESTPE . 2019 .
2894993.
[17] Ylva Lindberg. “A Comparison Between MPC and PID Controllers for
Education and Steam Reformers”. MA thesis. Chalmers University of
Technology, 2017.

Acknowledgments

First of all, I would like to express my gratitude to Ekaterina Fedina, my


supervisor at FOI, for her support and the opportunity to do this project at
FOI. I would also like to thank my supervisor at KTH, Rijad Alisic, and my
examiner, Henrik Sandberg, for their technical input and valuable tips during
the project.

A Elevation

The authors of [1] derive the equation of motion for the elevation using
Newton’s second law where the torque, in an inertial frame of reference, is
written
τ = J ω̇,
where J is the moment of inertia and ω̇ is the angular acceleration. Euler’s
moment equation is then used to express the torque for the elevation frame as

τ A = A Ḣ + ω A × A H, (37)

where A H is the angular momentum of the barrel. The angular momentum is


then calculated using (3) and (4).
   
Ar ωAr + Are ωAe + Ard ωAd Hr
A A
A
H = Jω =  re Ar ω + A ω + A de Ad  = He 
ω
   
e Ae
Ard ωAr + Ade ωAe + Ad ωAd Hd

56
Note that the angular momentum is calculated using only the moment of
inertia of the barrel. This is dependent on the movement of the chassis, which
is considered only as an input value. Using the expression for the angular
momentum (37) the expression for the torque is
 
Ḣr + ωAe Hd − ωAd He
τ = Ḣe + ωAd Hr − ωAr Hd  ,
 
Ḣd + ωAr He − ωAe Hr

and the torque about the elevation axis is

τEL = Ḣe + ωAd Hr − ωAr Hd .

This is rewritten using the expressions for the angular momentum. This results
in the differential equation

Ae ω̇Ae = τEL + τD−EL ,

with
2 2
τD−EL = (Ad − Ar )ωAr ωAd − Are (ω̇Ar + ωAe ωAd ) + Ard (ωAr − ωAd )
− Ade (ω̇Ad − ωAe ωAr ).

The resulting equation is the general expression describing the elevation


movement of a gimbal system. In Section 3.1 however, it is further developed
to include the special case of the MBT where the symmetry of the barrel is
taken into account. Taking the symmetry into account a simplification can be
done since the variables Are , Ard and Ade are equal to zero.

B Azimuth

The authors of [1] derive the equation of motion for the azimuth movement
using the angular momentum
 
Hn
B   B >
H =  He  = Jω B +A B C Jω A .
Hk

The torque is defined as


τ = Ḣ + ω B × H.

57
The authors continue by studying the rotation along the k-axis defined in
Figure 3.
Hk = Bnk ωBn + Bke ωBe + Bk ωBk
− (Ar ωAr + Are ωAe + Ard ωAd ) sin ε
+ (Ard ωAr + Ade ωAe + Ad ωAd ) cos ε
Ḣk = (Bk + Ar sin2 ε − Ard sin 2ε + Ad cos2 ε)ω̇Bk
+ (Bnk + (Ad − Ar ) sin ε cos ε + Ard cos 2ε)ω̇Bn
+ (Bke − Are sin ε + Ade cos ε)ω̇Be
+ ((Ad − Ar ) cos 2ε − 2Ard sin 2ε)ωBn ε̇
+ (Ar sin 2ε − 2Ard cos 2ε − Ad sin 2ε)ωBk ε̇
− (Are cos ε + Ade sin ε)ωBe ε̇ + (Ade cos ε − Are sin ε)ε̈
− (Are cos ε + Ade sin ε)ε̇2
(ωB × H)k = ωBn (Bne ωBn + Be ωBe + Bke ωBk
+ Are ωAr + Ae ωAe + Ade ωAd )
− ωBe (Bn ωBn + Bne ωBe + Bnk ωBk )
− ωBe (Ar ωAr + Are ωAe + Ard ωAd ) cos ε
− ωBe (Ad ωAr + Ade ωAe + Ad ωAd ) sin ε
The resulting equation is
Jeq ω̇Bk = τAZ + τd1 + τd2 + τd3 ,
where
Jeq = Bk + Ar sin2 ε − Ard sin 2ε + Ad cos2 ε
τd1 = (Bn + Ar cos2 ε + Ad sin2 ε + Ard cos 2ε − (Be + Ae ))ωBn ωBe
τd2 = −(Bnk + (Ad − Ar ) sin ε cos ε + Ard cos 2ε)(ω̇Bn − ωBe ωBk )
− (Bke + Ade cos ε − Are sin ε)(ω̇Be + ωBn ωBk )
2 2
− (Bne + Are cos ε + Ade sin ε)(ωBn − ωBe )
τd3 = (Are sin ε − Ade cos ε)ω̇Ae + (Ade cos ε − Are sin ε)ω̇Be
+ ((Ar − Ad ) cos 2ε + 2Ard sin 2ε)ε̇ωBn
+ ((Ad − Ar ) sin 2ε + 2Ard cos 2ε)ωAe ωBk
+ ((Ar − Ad ) sin 2ε − 2Ard cos 2ε)ωBe ωBk
2
− (Ade sin ε + Are cos ε)ωAe ωBe + (Ade sin ε + Are cos ε)ωAe .
This is then converted to describe the motion of the barrel by writing
ω̇Ad − ω̇Bn sin ε − ωAr (ωAe − ωBe )
ω̇Bk = .
cos ε
The equation of motion is
Jeq ω̇Ad = TAZ cos ε + (τd1 + τd2 + τd3 ) cos ε + τd0 ,

58
with
τd0 = Jeq (ω̇Bn sin ε + ωAr (ωAe − ωBe )).

C Sliding Mode Control Derivation

The following expression must be simplified,


√  
2 Jeq aωAd + |τd1 | + |τd2 | + |τd3 | + τd0 ≤ τAZ .

Starting with Jeq aωAd ,


 
1
Jeq aωAd ≤ Bk + Ar + Ad a|ωAd |. (38)
2

Simplifying |τd1 |,
1
|τd1 | ≤ (Bn + Ar + Ad + (Be + Ae ))|ωBn ωBe |. (39)
2
The factor |ωBn ωBe | is simplified to

|ωBn ωBe | = (ωP i cos η + ωP j sin η)(−ωP i sin η + ωP j cos η) (40)


≤ (ωP i + ωP j )(ωP i + ωP j ). (41)

Using this in (39),


 
1
|τd1 | ≤ Bn + Ar + Ad + Be + Ae (ωP i + ωP j )2 . (42)
2

Simplifying |τd2 |,
1
|τd2 | ≤ (Bnk + (Ad − Ar ))(|ω̇Bn | + |ωBe ωBk |)+ (43)
2
2 2
Bke (|ω̇Be | + |ωBn ωBk |) + Bne (ωBn + ωBe ).

The maximum values of the components of |τd2 | are



|ω̇Bn | ≤ ω̇P i + ω̇P j + ( 2(|ωAd | + ωP i + ωP j ) + ωP k )(ωP i + ωP j ) (44)

|ω̇Be | ≤ ω̇P i + ω̇P j + ( 2(|ωAd | + ωP i + ωP j ) + ωP k )(ωP i + ωP j ) (45)

|ωBe ωBk | ≤ (ωP i + ωP j )( 2( ωAd + ωP i + ωP j )) (46)

|ωBn ωBk | ≤ (ωP i + ωP j )( 2( ωAd + ωP i + ωP j )) (47)
2
ωBn ≤ (ωP i + ωP j )2 (48)
2
ωBe ≤ (ωP i + ωP j )2 . (49)

59
Simplifying |τd3 |,

|τd3 | ≤ ((Ar − Ad ) + Ae )|ε̇ωBn | + (Ad − Ar )|ωAe ωBk | (50)


+ (Ar − Ad )|ωBe ωBk |. (51)

The maximum values of the components of |τd3 | are

|ε̇ωBn | ≤ (|ωAe | + ωP i + ωP j )(ωP i + ωP j ) (52)



|ωAe ωBk | ≤ |ωAe |( 2( ωAd + ωP i + ωP j )). (53)

Simplifying τd0 ,
1
τd0 ≤ Jeq ( |ω̇Bn | + |ωAr |(|ωAe | + |ωBe |)). (54)
2

D Quadratic Optimization

The optimization problem is on the form


1 >
min x Hx, H  0,
2
s.t. Ax = b.

If there are no inequalities the problem can be solved using Lagrange


multipliers and solving the following system of equations.
" #" # " #
H A> x 0
=
A 0 λ 0

The solution is the vector x and the Lagrange multipliers are λ.

60
TRITA-EECS-EX-2021:892

www.kth.se

You might also like