Anda di halaman 1dari 14

Contents

I.

Introduction ..................................................................................................................................... 2

II.

Wind Turbine Plant .................................................................................................................... 3

III.

PID Controller Design ................................................................................................................. 4

A.

ZieglerNichols Method ............................................................................................................... 5

B.

Manual Tuning ............................................................................................................................ 7

C.

Auto-tune using Simulink ............................................................................................................ 7

D.

Comparison of the Different Plants output ................................................................................. 7

IV.

PID Controller Design ............................................................................................................... 10

E.

Digital Controller ...................................................................................................................... 10

F.

Sampling Time Effect on Digital Controller ............................................................................. 13

V.

Bibliography .............................................................................................................................. 15

I. Introduction
The following report is a resume of the work and findings done on the module Control Engineering.
The objective of the laboratory work was to carry the simulations required to investigate the more
appropriate controller design. This is done using different technical approaches, this initial report
covers two of the techniques used PID controller and Digital PID.
The model used represent an electric generator wind turbine, in order to maintain a steady state
speed on the rotation of the blades this are normally equipped with pitch angle control, hence the
rotor and generator speed can be controlled using the angle pitch of the blades[1]. The model given is
shown on Fig. 1 and represents the whole wind turbine system and controller with a close loop
feedback.

Fig. 1 Left is the block that represents the controller, Right is the model plant[2].

Page | 2

II. Wind Turbine Plant


Systems like the wind turbine, if not use with a controller that adjust the output can become
unstable. This could be due to multiple facts (noise, turbulences, disturbances of the system...etc.) can
lead to an output outside the operational margins of the model making a system unstable and the
model to fail in real life.
For this reason a controllers operates with a close loop where the output is subtracted from the input
in a close loop, and feed to the input of the controller. This way the controller can make the necessary
adjustments to maintain the system stable at any time. The plant given is defined by the following
transfer function model (1).

plant

K n2g
( s 1)(s 2 2ng s n2g )

(1)

The values of the different variables are given on the following table;
Pitch angle control for wind turbine rotor speed
CENo

Case
No

19

(time
constant)

(natural oscillation
frequency)

(constant)

0.8

2.1

2.3

ng
(damping ratio x natural
oscillation frequency)
1.0

Table 1. Values of the plant constants

By substituting the values of the constants with their value, the plant looks as follow(2).
plant

2.3 2.12
(0.8s 1)[ s 2 (2 1 s ) 2.12 ]

plant

10.143
0.8 s 3 2.6 s 2 5.528 s 4.41
(2)

All the simulation and control is done


using Simulink and Matlab. Through
the design of the controller different
files with the extension .m were
created to automatically calculate the
parameters of the controller and
display the behaviour of the plant with
the controller on cascade (series). After
modelling the plant in Matlab a step
response of the plant is created to
analyse the operation of the plant
Fig.1. From this graph can be observe
how the steady state error is
approximately of 1.3 which is
unacceptable, also there is no way to
hold the output on a set point without
feedback hence the next step is to add
the close loop.
Fig. 2 Plant output.

Page | 3

III.

PID Controller Design

Proportional Integral Derivative controller (PID) have been historically the choice of control
techniques starting as early as 1890s[3], although they become more popular later with the
introduction of semiconductor on the design of electronic PIDs.
PIDs are normally configured using the frequency domain for its simplicity, as it avoids dealing with
integration and derivatives. An equivalent to the following time domain can also be used.

Kp

Ki
de
K d s K p e(t) K i e(t)dt K d
s
dt

Fig. 3 Frequency domain and respective time domain[4]

Using PIDs provides the designer with a versatile control system that can be finely tune to adjust its
operation, providing a large number of options depending of the gain applied to one of the 3
components of the controller(Fig.4). They are the preferred close loop systems control over other
techniques because for is robustness[5]. The PID used on Simulink look like the following model, a
first order pole is added on the derivative branch to operate as a filter and reduce the effect of noise.

Fig. 4 PID model used on Simulink with 3 constants P,I and D.

Three values are used to configure it, under a close loop system the characteristics of each module are;

Proportional cannot eliminate state error.


Integral slows down transient response but eliminates the steady state error.
Derivative reduce overshoot, increase stability and improve transient response.

Cl Response
Kp
Ki
Kd

Rise Time
Decrease
Decrease
Small Change

Overshoot
Increase
Increase
Decrease

Settling Time
Small Change
Increase
Decrease

S-S Error
Decrease
Eliminate
No Change

Table 2. Output of increasing any of the values of the PID [1]

Page | 4

Three different techniques were used to create and tune a PID; ZieglerNichols method, manual
tuning and auto-tune of Simulink.

A. ZieglerNichols Method
The Ziegler-Nichols method has several variations, the one used is known as Ziegler-Nichols PID
Controller Gain Tuning Using Closed-loop Concepts. It provides with a good disturbance rejection,
intending a fast close-loop response without much oscillation.
First step to proceed on building the controller was creating a close loop (CL) model in Simulink to
test the system Fig. 5.

Figure 5 Wind turbine Simulink model with critical gain.

The proportional gain is increased to the point where the system starts
P 2.6287, kcr 1.3365
oscillating Fig. 6, this gain value is the critical gain (Kcr) , initially this value was cr
found by trial and error modifying the value and testing, ultimately the
(3)
allmargin() Matlab function was used to obtain this value, alternatively the
To find required
rlocus() and rlocfind() can also be used to identify the gain in which the
values of each of the
system become unstable [6]. The period of the sine wave output is call the
critical period Pcr. This response is characteristic of a 0 damping ratio expressed PID components the
on the s domain as a system with two imaginary poles on the 0 x axis. Running ZieglerNichols
Tuning Rule is
the .m file initialization declares the transfer function and calculates both
applied, this is based
values (3).
on the table 3 and
uses the previous calculate Kcr and Pcr. This
table uses the following PID form:

K p (1

1
Td s)
Ti s

(4)

The values are input on the table and the final


value of each component is calculated, table 4.

Fig. 6 Kcr Gain output of Simulink model.

Type of controller

Kp

Ti

Td

0.5Kcr

PI

0.45kcr

Pcr / 1.2

PID

0.6kcr

0.5Pcr

0.125Pcr

Page | 5

Table 3. ZieglerNichols Tuning Table

Type of controller

Kp

Ti

Td

0.5 1.337 0.6685

PI

0.45 1.337 0.6017

2.5 / 1.2 2.0833

PID

0.6 1.337 0.8022

0.5 2.5 1.25

0.125 2.5 0.3125

Table 4. ZieglerNichols Tuning Table Components Value.

This ZieglerNichols Tuning Table is on the format of K p (1

1
Td s) which doesnt match the
Ti s

1
Simulink PID form P I Ds , the conversion is done on the .m file PID calc.m. Executing the
s
script will calculate the values of each component (table 5) and displays two tables with the values
presented and the output of the different Simulink models.
Type of controller

0.6685

PI

0.60165

0.28879

PID

0.8022

0.64176

0.25069

Table 5. PID values for a P, PI and a PID controller.

A model is created in Simulink to input the values of the different PIDs and compare their output
(Fig 7);

Fig. 7 P, PI and PID controller in series with the wind turbine plant model.

The output is transferred to the workspace by ticking the save data to workspace box in the scope
settings, and plotted using the Simplot() function from Matlab Fig(8).

The P controller outputs a signal with a high steady state error, the gain is too low to reach
the value of the input, in this case is not appropriated. A proportional controller has the
advantage of being cheap and has a fast response but could lead to overshoot and a high
steady state error.
Page | 6

PI controller provides a more suitable solution but in this case the output takes too long to
stabilize oscillating several times before reaching settling time
PID is of the three systems the one that respond with a faster rise time, have a slightly large
overshoot but a significant better settling time as table 2 indicates.

Fig. 8 Scope output of the P, PI and PID controller in cascade with the wind turbine plant model.

At a glance all of the systems are stable; in terms of the overshoot all of the system have a moderate
overshoot of approximately 0.2; the P controller is the only one with steady-state error while the other
controllers have almost none; settling time is reduce to half in the PID in comparison with the PI and
P controller.

B. Manual Tuning
After tuning the PID on the previous exercise and having gained some experience on the operation of
the controller. Two techniques were used [7]but the result were not really good, so at the end based on
previous experiment the next steps were followed.
1.
2.
3.

Incremented P to obtain a good raising time and not a very oscillatory system.
Adjusted D to reduce the oscillation by a factor of 2-4.
Adjust I to remove the steady state error without compromising the overshoot.

The output was slightly better than the one obtained on the previous technique but the trial and error
resulted being somewhat time consuming.

C. Auto-tune using Simulink


Simulink has a PID tuner that can be access from the tune button on the configuration window of the
PID block. This interface offers auto-tune or tuning based on two sliders. Some modifications were
done and finally the auto-tune settings were saved on the script in order to compare it against the
other step functions.

D. Comparison of the Different Plants output


The different PID controllers were set on a Simulink file (Fig.9) in order to compare them. As no
constrains were given of the design is not very clear which would suit best the plant, but given the
improvement of the manually tuned PID on time this seems the more feasible and interesting option.

Page | 7

Figure 9. Multiple plant controller system in order to compare output.

The comparison of the 3 PIDs are plotted on Fig.10, The Auto-tune system offer small overshoot but
the settling time differs almost 3 seconds with the manual tune while the ZieglerNichols PID is in
between them. Rise time is slightly better in the manual tune PID, specially compared with the autotune.

Fig. 10 step output of the different PIDs with the settling time markers.

Page | 8

Using the function stepinfo(sys) the characteristics of each system were obtained and plotted on
table 6 for an easy comparison, with a given set of constrains a decision of the most suitable could be
made, although as state the manually tuned PID seems the more appropriated.

Rise Time
Settling Time
Settling Min
Settling Max
Overshoot
Peak
PeakTime
RiseTime
Steady state error

ZieglerNichols Method
0.7137
5.5031
0.8175
1.1192
11.9196
1.1192
1.4360
0.7137
0.0013

Manual Tune
0.5359
4.1028
0.8080
1.1262
12.6206
1.1262
1.1122
0.5359
0.0016

Auto-tune
2.0075
6.6185
0.9107
1.0652
6.5240
1.0652
4.5450
2.0075
0.0027

Table 6. PID characteristics of the different systems.

To obtain the steady state error the following Matlab code was used.
% get the response of the system to a step
[y,t]=step(sys);
% calculate the steady state error
sserror=abs(1-y(end))

Fig. 11 Matlab code used to obtain the steady state error.

Page | 9

IV.

PID Controller Design

Analog PIDs have been use for many years but are hard to reconfigure as well as having other
downfalls, nowadays technology allow to produce digital PIDs which are not only cheaper, easy to
produce and to configure, improve sensibility results, are less sensible to noise, offers the benefit of
digital signals as logging and transmission and also can add extra functionality and can be reprogram
without incurring in any hardware cost[1].

E. Digital Controller
To simulate a digital controller in Simulink a few modifications are required on the model;

Fig. 12 Simulink model of the digital controllers with a P, PI, PID Zeigler-Nichols,
Manually Tune PID and a Auto tune PID.

Firstly an analog to digital (A/D) and a digital to analog (D/A) converter have to be added at each
side of the controller, this converts signal to data the controller can process. The data is sampled and
sent to the PID. This is replaced by a discrete transfer function block, as previously the variable
names are assigned to the blocks and the values are calculated in a .m script.
Formulae used to input the values on Simulink have to be converted from the continuous-time system
to a discreet domain, in order to do so the PID formulae used previously (5)
PI

1
s

N
1 N

1
s

( N 100)
(5)

Page | 10

Have to be convert to a single fraction is order to convert it using Matlab c2d functions, to do so
substitute the terms into the following equation:
( P DN ) s 2 ( PN I ) s IN
s 2 sN 0
(0.83778 0.25133 100) s 2 (0.83778 100 0.69815) s 0.69815 100
s 2 100 s 0

27.15 s 2 80.8 s 61.01


s 2 100 s
(6)

Using Matlab the system (6) is converted from the continuous-time (s) into a discrete function on the
z domain (8). A sampling time have to be specify, to find T value the formulae (7) is used, where nr is
10<nr<20. Tests were done and using 20 as denominator provided a more satisfactory response, hence
this is used as a reference.
T

tr
nr

(7)

Using the obtained T, the values are replace for the 3 systems, using a digital P, PI and a PID, the
conversion to the z domain result on the following formulae on the case of the digital PID.
25.97 z 2 50.41z 25.13
z 2 z 3.72e 44
(8)

The operation of the three systems was compare with their correspondent counterparts of the analog
system (13). The P and the PI system did not change significantly on the conversion, nor the autotune system. On the other hand the manually tune and the Ziegler-Nichols demonstrate a more fast
response and short settling time.
The PID values used to convert the controller where the ZieglerNichols Method controller, the
manual tune had a significant higher overshoot when converted to the z domain.

Page | 11

Fig. 13 multiple graphs output form

Page | 12

F. Sampling Time Effect on Digital Controller


The conversion from analog to digital is condition for the sampling time, the smallest is the sampling
time the higher accuracy the controller has, but it also increases the computational power required.
When data is sampled it can be considered as if a switch is close momentarily and a measurement of
the signal is taken, by doing so every T sec. a discrete signal is obtained(Fig.14). Hence if the
sampling time is too high the system will become unstable as the controller will not receive enough
data to correct the output if turbulences or noise are present.

Fig. 14 Analogy of the operation of the sampling of a signal. Left raw signal, right sampled data.

To explore the effect the sampling time has on a system a new Simulink model was created and
different times (Tr=0.02 and Tr=0.05) were used to calculate the z domain model.

Fig. 15

The output Fig.16 shows how a higher value on the sampling time means a delay is introduce on the
control and hence the more it takes to stabilize the output. Also a small T r seems to produce and over
damping effect on the output of the system.

Page | 13

Fig. 16

Page | 14

V. Bibliography
[1] R. C. Dorf and R. H. Bishop, Modern Control Systems, vol. 1. Prentice Hall, 2010.
[2] C. Y. Tay, Lecture Slides - 4 Your design case study. Oct-2014.
[3] PID controller, Wikipedia, the free encyclopedia. 10-Nov-2014.
[4] Control Tutorials for MATLAB and Simulink - Introduction: PID Controller Design. [Online].
Available:
http://ctms.engin.umich.edu/CTMS/index.php?example=Introduction&section=ControlPID.
[Accessed: 1-Nov-2014].
[5] N. S. Nise, Control Systems Engineering, vol. 1. Wiley, 2010.
[6] D. Gu, P. H. Petkov, and M. M. Konstantinov, Robust Control Design With MATLAB, vol. 1.
Springer, 2005.
[7] control - What are good strategies for tuning PID loops? - Robotics Stack Exchange. [Online].
Available: http://robotics.stackexchange.com/questions/167/what-are-good-strategies-for-tuningpid-loops. [Accessed: 19-Nov-2014].
[8] PID Controllers. [Online]. Available:
http://www.facstaff.bucknell.edu/mastascu/econtrolhtml/pid/pid3.html. [Accessed: 19-Oct-2014].
[9] A. Knight, Basics of MATLAB and Beyond, vol. 1. CRC Press, 1999.

Page | 15

Anda mungkin juga menyukai