Controller Design

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 6

Controller Design

Internal Model Control (IMC) controller design strategies allow for design based on the invertible
portions of a process transfer function. Terms such as time delays and right half plane zeros are not
invertible because they will cause discontinuities once inverted. Generally, this design results in only one
tuning parameter, allowing for the operator’s choice of aggressive or robust system control. However,
IMC design procedure requires preexisting knowledge of the order of the system’s behavior, as well as
process gain, denoted kp, and time constant, τp, information[2].

Figure 2: Open loop step response data from WDC=0 to various increments of the WDC percentage.

From a qualitative examination of the data, it is seen that this system effectively behaves as a first order
process, with a short time delay. The associated generalized continuous transfer function for a first
order process transfer function in the Laplace domain is,

𝑘𝑃 ∗ 𝑒 −𝜃𝑠
𝑔𝑃 (𝑠) = [1]
𝜏𝑃 𝑠 + 1
The time delay associated with this system is assumed to be insignificant because it is so short compared
to the overall behavior. Therefore, the time delay term Ѳ is set to zero and the resulting transfer
function takes the following form,
𝑘𝑃
𝑔𝑃 (𝑠) = [2]
𝜏𝑃 𝑠 + 1
Where kp is the process gain and τp is the process time constant. If From data analysis, a table of process
gains and time constants was determined as shown below in Table 1.
% WDC KP (%RH / %WDC) τP (s)
10 2.322 58.5
20 1.5289 46.5
30 1.2972 48.5
40 1.1601 50.5
50 1.0663 45
60 1.0048 51
70 0.9795 50.5
80 0.9216 46.5
90 0.8895 49.5
100 0.8321 41
Average: 1.2002 48.75
Table 1: Process gain and time constant values correlating to percentage of wet duty cycle.

For this initial, and most easily achievable controller design, the average process gain and time constant
values will be used in the process transfer function model. Thus,
1.2002
𝑔̃𝑝 (𝑠) = [3]
48.75𝑠 + 1
Development of the controller begins with a filter, f(s), multiplied by the inverted process transfer
function, 𝑔̃𝑝−1 (𝑠), resulting in a semi-proper transfer function, q(s),
𝜏𝑝 𝑠 + 1 1
𝑞(𝑠) = 𝑔̃𝑝−1 (𝑠)𝑓(𝑠) = ∗ [4]
𝑘𝑝 𝜆𝑠 + 1

Using the standard controller feedback transformation,


𝑞(𝑠)
𝑔𝑐 (𝑠) = [5]
1 − 𝑔̃𝑝 (𝑠)𝑞(𝑠)

Then,
𝜏𝑝 𝑠 + 1
𝑘𝑝 (𝜆𝑠 + 1) 𝜏𝑝 𝑠 + 1
𝑔𝑐 (𝑠) = = [6]
𝑘𝑝 𝜏𝑝 𝑠 + 1 𝑘𝑝 𝜆𝑠
1−𝜏 𝑠+1
𝑝 𝑘 𝑝 (𝜆𝑠 + 1)

Consider the standard PI controller form,


𝜏𝐼 𝑠 + 1
𝑔𝐶𝑃𝐼 (𝑠) = 𝑘𝑐 [7]
𝜏𝐼 𝑠
With the standard tuning parameters of, kc, as controller gain and integrator time, τI.

By rearranging [6] to fit the form of [7], the process model parameters and filter values are related to
the PI controller parameters. When this is done, the finalized IMC based PI controller equation becomes
𝜏𝑝 𝜏𝑝 𝑠 + 1
𝑔𝑐 (𝑠) = ( ) [8]
𝑘𝑝 𝜆 𝜏𝑝 𝑠
It is seen that for this controller, the tuning parameters, 𝑘𝑐 and 𝜏𝐼 are
𝜏𝑝
𝑘𝑐 = & 𝜏𝐼 = 𝜏𝑝 [9]
𝑘𝑝 𝜆

Substituting the now known physical process constants we arrive at the first controller design,
40.618 48.75𝑠 + 1
𝑔𝑐 (𝑠) = ( ) [10]
𝜆 48.75𝑠
It is noted that controller also has only one tunable parameter, λ, as the controller time constant is
equal to the process time constant. This PI controller must be discretized and made implementable into
the existing Arduino code to test the level of control achievable by this “averaged” controller.

Disturbance Rejection Controller Design

Although the averaged PI controller demonstrated control over the system, averaging the process gain
values resulted in less accurate control of the system at the limits of the WDC (0-20% and 80-100%). To
account for this non-ideal behavior, the process gain was fit to a power law as a function of WDC. With
this the process gain function could be implemented as a function of the WDC needed to reach the
desired set point. This was implemented using the linear relationship created from Table 1.
𝑅𝐻𝑠𝑝 − 9.9
𝑊𝐷𝐶𝑡𝑎𝑟 = [11]
0.6903
Equation 11 shows the calculation of expected relative humidity for a given wet duty cycle where RHsp is
the set point, this linear equation is an expression of a power law fit of the data presented in Table 1.
−0.417
𝑘𝑝 (𝑊𝐷𝐶𝑡𝑎𝑟 ) = 5.6178 ∗ 𝑊𝐷𝐶𝑡𝑎𝑟 [12]

Once a WDCtar is determined using Equation 11, Equation 12 is used to determine the process gain of
the system at the desired set point. This is the power law equation derived from table 1, and with these
relationships implemented into the controller calculation, the model of the system proves more
accurate across the entire regime of function.

Another issue with the original PI controller design was that even with the added process gain, the
system was highly sensitive to unmeasured disturbances such as water holding samples, changes in
desiccant efficacy, and other changes in the ambient environment such as relative humidity of the room.
To account for this uncertainty of the system a new IMC-based controller with focus on improved
disturbance rejection was designed. The design process begins the same way with the process transfer
function
𝑘𝑃 (𝑊𝐷𝐶𝑡𝑎𝑟 )
𝑔𝑃 (𝑠) = [13]
𝜏𝑃 𝑠 + 1
Which now is a function of Equations 11 and 12 while still neglecting any time delays in the system.
From here the controller design uses what is known as a gamma (γ) filter which produces better overall
disturbance rejection[1]. The filter form for this controller design is
𝛾𝑠 + 1
𝑓(𝑠) = [14]
(𝜆𝑠 + 1)𝑛
Where n is chosen to make the overall controller semi-proper again to meet the requirements
of a standard PI form controller. For this first order system n is chosen to be 2 which leads to
the following IMC controller transfer function

−1 (𝑠)𝑓(𝑠)
𝜏𝑝 𝑠 + 1 𝛾𝑠 + 1
𝑞(𝑠) = 𝑞̃(𝑠)𝑓(𝑠) = 𝑔̃𝑝− = [15]
𝑘𝑝 (𝜆𝑠 + 1)2

The standard feedback controller transformation remains the for this design
𝑞(𝑠)
𝑔𝑐 (𝑠) = [4]
1 − 𝑔̃𝑝 (𝑠)𝑞(𝑠)

Then
𝜏𝑝 𝑠 + 1 𝛾𝑠 + 1
𝑘𝑝 (𝑊𝐷𝐶𝑡𝑎𝑟 ) (𝜆𝑠 + 1)2
𝑔𝑐 (𝑠) = [16]
𝑘 (𝑊𝐷𝐶 ) 𝜏𝑝 𝑠 + 1 𝛾𝑠 + 1
1 − 𝑃𝜏 𝑠 + 𝑡𝑎𝑟
𝑃 1 𝑘 𝑝 (𝑊𝐷𝐶 𝑡𝑎𝑟 ) (𝜆𝑠 + 1)2

Now this must be simplified to fit the PI control form which remains
𝜏𝐼 𝑠 + 1
𝑔𝐶𝑃𝐼 (𝑠) = 𝑘𝑐 [6]
𝜏𝐼 𝑠
With Equation 16 simplified the control parameters become

2𝜏𝑝 𝑠 − 𝜆 2𝜏𝑝 𝜆 − 𝜆2
𝑘𝑐 = & 𝜏𝐼 = [17]
𝑘𝑝 (𝑊𝐷𝐶𝑡𝑎𝑟 )𝜆 𝜏𝑝

With the condition that λ<2τp, the closed loop transfer function becomes
𝛾𝑠 + 1
𝑔𝐶𝐿 (𝑠) = [18]
(𝜆𝑠 + 1)2
And the two parameters shown become λ and γ. With this the final algebraic manipulation shows that
the gamma filter can be solved as

2𝜏𝑝 𝜆 − 𝜆2
𝛾= [19]
𝜏𝑝

Leaving a final controller design of

2𝜏𝑝 𝜆 − 𝜆2
2𝜏𝑝 𝑠 − 𝜆 𝜏𝑝 𝑠+1
𝑔𝑐 (𝑠) = [20]
𝑘𝑝 (𝑊𝐷𝐶𝑡𝑎𝑟 )𝜆 2𝜏𝑝 𝜆 − 𝜆2
𝜏𝑝 𝑠

So as before, the system here has only λ as a tuning parameter, but now the physical constant kp is
adjusted for each change to the set point and τp is left as the averaged constant value of 48.75s found in
the previous controller design. This controller was then discretized and implemented as a standard
feedback PI controller.
Discretization of a Feedback Controller

A feedback controller utilizes the error between a set-point and a measured output to adjust the
manipulated input and achieve the desired output. For this system a PI controller having two control
parameters was to be implemented into the microcontroller. First the output signal must be calculated

𝑒(𝑡) = 𝑦𝑠𝑝 (𝑡) − 𝑦𝑚 (𝑡) [21]

Where e(t) is the measured error signal, ysp is the desired set-point and ym is the measured output[4].
This error signal is then put into the controller shown in Equation 21, because equation 18 is in the
Laplace Domain, the conversion here is a simple Laplace transform
1
𝐿[𝑡] = [22]
𝑠2
Working in the Laplace domain the output can be represented as
𝑔𝑐 (𝑠)𝑔𝑝 (𝑠)
𝑦𝑚 (𝑠) = 𝑦 (𝑠) [23]
1 + 𝑔𝑐 (𝑠)𝑔𝑚 (𝑠) 𝑠𝑝
Where gc(s) and gp(s) are the controller and process transfer functions respectively and any unmeasured
disturbances from the valve, sensor and ambient environment are neglected. With this Equation 21 can
be represented in the Laplace domain as well. Now to consider the action of the controller
𝜏𝐼 𝑠 + 1
𝑢(𝑠) = 𝑘𝑐 𝑒(𝑠) [24]
𝜏𝐼 𝑠
Where u(s) is the calculated controller input into the controller. For this calculation it is useful to modify
the controller transfer function in Equation 6 to fit the input to the equivalent form of
1
𝑢(𝑠) = 𝑘𝑐 (1 + ) 𝑒(𝑠) [25]
𝜏𝐼 𝑠
Using this form the proportional and integral actions of the controller can be represented
independently. First the proportional control can be taken into the time domain using

𝐿−1 [𝑘𝑐 𝑒(𝑠)] = 𝑘𝑐 𝑒(𝑡) [26]


Where e(t) is the measured error shown in Equation 19. The integral action can be taken to the time
domain as well with

𝑒(𝑠) 1 𝑡
𝐿−1 [ ] = ∫ 𝑒(𝜎)𝑑𝜎 [27]
𝜏𝐼 𝑠 𝜏𝐼 0

Using Equations 25-27, the time domain input of the controller can be represented as

1 𝑡
𝑢(𝑡) = 𝑘𝑐 𝑒(𝑡) + ∫ 𝑒(𝜎)𝑑𝜎 [28]
𝜏𝐼 0
To implement this continuous input change on the physical system the time of this system must be
discretized to independent time steps represented by Δt
1
𝑢(Δ𝑡 + 1) = 𝑘𝑐 𝑒(Δ𝑡) + 𝑒(Δ𝑡) [29]
𝜏𝐼
Where u(Δt+1) is the controller input based on the previous error from the set-point. This then becomes
the implementation into the physically measured system[3].

You might also like