You are on page 1of 35

.

Advance Control
Methods
Course Work.

27+32+33=92%
Advance Control Methods: Course Work

Contents
0 Introduction..............................................................................................................................................4
0.1 Types of Faults...................................................................................................................................4
0.2 Fault Detection..................................................................................................................................5
1 Task 1........................................................................................................................................................6
1.1 Solution.................................................................................................................................................6
1.1.1 System Identification......................................................................................................................6
1.1.2 Validation........................................................................................................................................8
2 Task 2......................................................................................................................................................11
2.1 Solution...............................................................................................................................................11
2.1.1 Input Fault (fu)..............................................................................................................................13
2.1.2 Output Fault (fy1).........................................................................................................................15
2.1.3 Output Fault (fy2).........................................................................................................................17
2.1.4 Fault Isolation Properties of This System......................................................................................19
2.1.5 Thresholding.................................................................................................................................19
2.1.6 Simulink Thresholding Function....................................................................................................20
2.1.7 Input Fault with thresholding.......................................................................................................20
2.1.8 Output Fault with thresholding....................................................................................................20
3 Task 3......................................................................................................................................................22
3.1 Solution (a)..........................................................................................................................................22
3.1.1 Implementation in Simulink:.........................................................................................................23
3.1.2 Input and output Fault (fu, fy1 and fy2):.......................................................................................24
3.1.3 Fault Isolation Properties of This System......................................................................................25
3.1.4 Thresholding.................................................................................................................................25
3.1.5 Simulink Thresholding Function....................................................................................................27
3.1.6 Input Fault with thresholding.......................................................................................................27
3.1.7 Output Fault with thresholding....................................................................................................28
3.2 Solution (b):.........................................................................................................................................30
3.2.1 Applying Faults both input and output.........................................................................................31
3.2.2 Fault Isolation Properties of This System......................................................................................32
3.2.3 Thresholding.................................................................................................................................33
3.2.4 Simulink Th_Limits Function.........................................................................................................33
Appendix:..................................................................................................................................................34
2 of 35
Advance Control Methods: Course Work

Thresholding function: Task no 2...........................................................................................................34


Th_Limits function: Task no. Extra Task.................................................................................................34
References.................................................................................................................................................35

3 of 35
Advance Control Methods: Course Work

0 Introduction:
Increasing demands on reliability and safety of technical plants require early detection of process faults.
Methods are developed that enable earlier detection of process faults than conventional limit and trend
checking based on single process variable. These methods encompass information from not just one
process variable but also include non-measurable variables as process state, parameters and
characteristics quantities. Some methods require accurate process models while others rely primarily on
available historical process data (Miljković, 2011).

It is important to familiarize our self with terminology of the field: fault, failure and malfunction, types of
faults and fault detection (Miljković, 2011).

 Faults: A fault is an undesired deviation of at least one characteristics property of the system
from the acceptable, usual or standard condition.
 Failure: A failure is a permanent interruption of a system’s ability to perform a require function
under specified operating conditions.
 Malfunction: A malfunction is an intermittent irregularity in the fulfilment of a system’s desired
function. Development of events “failure” or “malfunction” from a “fault” is shown in diagram
below.

Figure no. 1 (Miljković, 2011)

0.1 Types of Faults


 Fault may occur due to a component: actuator faults, plant component faults and sensor faults,
as shown in figure below.

Figure no. 2 (Miljković, 2011)

 The fault may be abrupt, incipient or intermittent fault as shown.

4 of 35
Advance Control Methods: Course Work

Figure no. 3 (Miljković, 2011)

 How a fault is added to a system: additive or multiplicative.

Figure no. 4 (Miljković, 2011)

Additive fault can be represented as:

𝑌(𝑡) = 𝑌𝑢(𝑡) + 𝑓(𝑡)

Multiplicative faults are given by:

𝑌(𝑡) = (𝑎 + 𝑓(𝑡))𝑈(𝑡)

Additive faults often is a result of offsets of sensors, on the other hand multiplicative faults are most
likely a parameter change within a process.

0.2 Fault Detection


To determine the occurrences of faults in a system is called “Fault detection”. The process of “fault
detection” consists of detection of faults in the processes, actuators and sensors. Fault isolation and
fault identification are also related to fault detection. Fault isolation means to find the location and type
of the fault and fault identification mean to determine the magnitude of the fault. Fault diagnosis is the
combination of fault isolation and fault identification. In fault diagnosis type of the fault is determined,
with as many details as possible such as the fault size, location and time of detection etc. (Miljković,
2011).

In this course work we will concentrate on “Output Error Method” to obtain the estimated model of the
plant or process (System Identification). After obtaining the model we will relate the errors (difference
between the plant output and the model output) to various faults and to conclude that the system is
operating in normal mode or not. Afterwards structured residuals have to be obtained to identify and
isolate the faults i.e. fault diagnosis.

5 of 35
Advance Control Methods: Course Work

1 Task 1.
Use the “oe” function to estimate the parameters of the following single-input single-output models of
the plant from “recorded” input-output data.

𝑦1(𝑘 + 1) = 𝑎1𝑦1(𝑘) + 𝑏1𝑢(𝑘)

𝑦2(𝑘 + 1) = 𝑎2𝑦2(𝑘) + 𝑏2𝑢(𝑘)

Validate your obtained models by developing Simulink models using the parameters you obtained and
applying the same 'step' input to your models to compare the models' response with the response of
the “real” plant. Fully discuss result of your models validation.

1.1 Solution:
We are using model based fault detection technique. Which means that a model of the plant is
constructed and run in parallel with the plant the same input is fed to the plant and its estimated model
and the output is compared. They cannot match exactly but the error should be within a certain range.
So the main idea is if the plant output deviate from that of the model outside the permitted range then
there is something wrong.

Figure no. 5 (Given Model)

1.1.1 System Identification:


The recorded data will be fed to the “oe” function to obtain the estimated model of the real plant. The
following code is used to process the recorded data and to obtain the estimated model using “oe”
function which is well commented (MathWorks, 2019).

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% 1st Step System Identification
% (data given and consider the given model as real system)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% Order of the numerator +1 (1st order system is considered) nb = 0 + 1


nb = 1;
% Order of the denominator (1st order system is considered) nf = 1
nf = 1;

6 of 35
Advance Control Methods: Course Work

% Input delay, expressed as the number of samples. We are considering 1 here


but actually it should be zero.
nk = 1;
% Ts is the sampling time (sampling frequency is 40 Hz) 0.025 sec in our case
Ts = 0.025;

% separating y1 and y2;


Y1 = Yout(:,1);
Y2 = Yout(:,2);

% data = iddata(y,u,Ts);
data1 = iddata(Y1,Uout,Ts);
data2 = iddata(Y2,Uout,Ts);

% sys = oe(data,[nb nf nk])


sys1 = oe(data1,[nb nf nk])
sys2 = oe(data2,[nb nf nk])

% extracting numerator and denominator in Z domain (i.e. estimated models)


sys1B = sys1.B;
sys1F = sys1.F;

sys2B = sys2.B;
sys2F = sys2.F;

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

After running this code these are the two estimated models of the plant.
𝑦1(𝑧) 2.1691 𝑧−1
𝑠𝑦𝑠1 = = − − − − − − − − − − − (𝑠𝑦𝑠1)
𝑢(𝑧) 1 − 0.9829 𝑧−1
𝑦2(𝑧) 3.5551 𝑧−1
𝑠𝑦𝑠2 = = − − − − − − − − − − − (𝑠𝑦𝑠2)
𝑢(𝑧) 1 − 0.9824 𝑧−1

Figure no. 6 (Plant with Models)

7 of 35
Advance Control Methods: Course Work

The parameters of the models are directly taken from the Matlab environment without manually
entering their data into Simulink models.

Figure no. 7 (Model parameters from Matlab environment)

1.1.2 Validation:
From the estimated models of the plant another model was constructed in Simulink and the same input
was applied to it to check whether our estimated models are good enough as an estimates to be used
for fault detection. Which can be seen from the following response curves.

Graph no. 1a (Real Plant Y1 and estimated model MY1 without noise)
8 of 35
Advance Control Methods: Course Work

Graph no. 2a (Real Plant Y2 and estimated model MY2 without noise)

Graph no. 1b (Real Plant Y1 and estimated model MY1 with noise)
9 of 35
Advance Control Methods: Course Work

Graph no. 2b (Real Plant Y2 and estimated model MY2 with noise)

The first set of response curves i.e. 1a and 2a are without noise and the estimated models follows the
actuals plant output very closely. The second set of response curves i.e. 1b and 2b are with noise and
still the estimated models closely follow their counterparts. The noise power level is 0.01 for input and
0.1 for both outputs and kept the same as given to mimic the real plant or process scenario. From this
tasks onwards the same noise levels will be used. Also, it is worth mentioning that Y1 and Y2 are the real
plant outputs and MY1 and MY2 are their estimates.

It is quite clear from the response of the two outputs i.e. Y1 and Y2 and their respective models i.e. MY1
and MY2 that it is quite a good approximation of the real plant. Also, it is clear from the two graphs that
there is some error but it is quite small and hence the estimated models can be used for fault detection
and isolation purposes i.e. fault diagnosis.

Note: Both real plant output (Y1 and Y2) and its model (MY1 and MY2) are plotted on the same graph to
show that the model follows and matches closely its real plant output response.

Analysis of error signals?


27/30

10 of 35
Advance Control Methods: Course Work

2 Task 2.
Create a parity relations scheme using your obtained models from Task 1 for the residuals generation.
Apply abrupt faults of various magnitude to the “real” plant input, and then to the “real” plant output to
observe changes in the residuals. Discuss fault isolation properties of this scheme.

2.1 Solution:
The residuals generated from comparing the output of the real plant and estimated plant models are
shown as in the following diagram. Signals tags are used in order to reduce clutter as much as possible.

Figure no. 8 (Given Real Plant Model)

Figure no. 9 (Plant Models and residuals generation)

Following are the graph of the residuals R1 and R2 with and without filtering and weightage with no
input or output faults. As can be seen from the graphs that without filtering it will be very difficult to
process the residual data. With filtering it is very easy to make a decision whether the plant is operating
normally or not even a small deviation can be detected easily. A simple 2nd order low-pass filter is used
to filter out the noise.

11 of 35
Advance Control Methods: Course Work

Graph no. 3 (R1 generation with and without filtering)

Graph no. 4 (R2 generation with and without filtering)

12 of 35
Advance Control Methods: Course Work

2.1.1 Input Fault (fu):


Applying input fault of various magnitude.

Graph no. 5 (In 1, 2 fault fu magnitude is 0.05, in 3, 4 its magnitude is 0.1 and in 5, 6 its magnitude is 0.5)

13 of 35
Advance Control Methods: Course Work

Graph no. 6 (In 1, 2 fault fu magnitude is 1 and in 3, 4 its magnitude is -1)

It is quite clear from the graph no. 6 that both positive and negative fault magnitudes can be
differentiated and detected.

14 of 35
Advance Control Methods: Course Work

2.1.2 Output Fault (fy1):


Applying output fault of various magnitude both positive and negative.

Graph no. 7 (In 1, 2 fault fy1 magnitude is 1, in 3, 4 its magnitude is 5 and in 5, 6 its magnitude is 10)

15 of 35
Advance Control Methods: Course Work

Graph no. 8 (In 1, 2 fault fy1 magnitude is -1, in 3, 4 its magnitude is -5 and in 5, 6 its magnitude is -10)

16 of 35
Advance Control Methods: Course Work

2.1.3 Output Fault (fy2):


Applying output fault of various magnitude both positive and negative.

Graph no. 9 (In 1, 2 fault fy2 magnitude is 1, in 3, 4 its magnitude is 5 and in 5, 6 its magnitude is 10)

17 of 35
Advance Control Methods: Course Work

Graph no. 10 (In 1, 2 fault fy2 magnitude is -1, in 3, 4 its magnitude is -5 and in 5, 6 its magnitude is -10)

18 of 35
Advance Control Methods: Course Work

As clear from all the simulations above that the magnitude of the residual is directly proportional to the
magnitude of the fault. Also if the change or to be specific fault is negative the residuals reflect that
change in its behaviour. Residual “R1” is sensitive to the input “fu” fault and output “fy1” fault. Residual
“R2” is sensitive to the input “fu” fault and output “fy2” fault.

2.1.4 Fault Isolation Properties of This System:


The fault isolation of this system can be given as:

+ FU + FY1 + FY2 - FU - FY1 - FY2


RESIDUAL R1 + + 0 - - 0
RESIDUAL R2 + 0 + - 0 -
Table no. 1 (For positive and negative values of faults)

As can be seen from the tables that we can isolate the input and output faults if and only if one fault
occur at a time. For example if “fy1” and “fy2” occur at the same point it may appear as it is input fault
on the contrary there will be no input fault “fu”. In short it is weakly isolating even if “fy1” and “fy2”
don’t occur at the same time.

2.1.5 Thresholding:
To generate a warning or alarm if fault occurs we have to check the residuals values against thresholds
whether their values are within the set threshold values or not. If the values are not within the set or
given threshold values then we should generate warning or an alarm. For this system the threshold
values are -
0.5 to +0.4. After setting an appropriate value (-0.5 to +0.4) for the normal operating range the isolating
matrix will become as shown below. Are these thresholds for filtered residuals?

Figure no. 10 (Plant Models, residuals generation and thresholding)

+ FU + FY1 + FY2 - FU - FY1 - FY2


RESIDUAL R1 1 1 0 -1 -1 0
RESIDUAL R2 1 0 1 -1 0 -1
Table no. 2 (For positive and negative values of faults)

19 of 35
Advance Control Methods: Course Work

2.1.6 Simulink Thresholding Function:


I have used user defined Simulink block for thresholding i.e. custom block. The code used for this block is
given in the appendix.

2.1.7 Input Fault with thresholding:


Applying input fault (fu) of 0.05 and -0.05 magnitude with thresholding values of 0.4 to -0.5. The input
fault was applied after 5 sec and the fault was detected at 6.3 sec and 5.5 sec i.e. after 1.3 seconds.

Graph no. 11 (In 1, 2 fault fu magnitude is 0.05 and in 3, 4 its magnitude is -0.05)
Is filtering makes your fault detection
2.1.8 Output Fault with thresholding: slower?
Applying output fault (fy1 and fy2) of 1.1 and -1.1 magnitude with thresholding values of 0.4 to -0.5. The
output fault was applied after 5 sec and the fault was detected at 6.9 sec and 5.6 sec for fy1 and fy2
respectively.

20 of 35
Advance Control Methods: Course Work

Graph no. 12 (In 1, fault fy1 magnitude is 1.1 and in 2 its magnitude is -1.1)

Graph no. 13 (In 1, fault fy2 magnitude is 1.1 and in 2 its magnitude is -1.1)

As clear from the graphs that with filtering it is possible to detect a small deviation in input or output
and without filtering it will be very hard to detect the deviation of the plant from its normal values by
simple means.
32/35

21 of 35
Advance Control Methods: Course Work

3 Task 3.
Explore the scheme's fault-isolation features employing organized residuals. Develop organized residual and also
models of Simulink for the development of structured residuals. To recognize alteration in the residuals, add rapid
defects of the same degree to the "true “input of plant, and afterwards to the real production of plant.

3.1 Solution (a):


Models of the given plant are as identified in the first task.
𝑦1(𝑧) 2.1691 𝑧−1
𝑠𝑦𝑠1 = =
𝑢(𝑧) 1 − 0.9829 𝑧−1
𝑦2(𝑧) 3.5551 𝑧−1
𝑠𝑦𝑠2 = =
𝑢(𝑧) 1 − 0.9824 𝑧−1

Now, let’s derive the structured residuals for the given system.

From sys1:

𝑦1(𝑧)(1 − 0.9829 𝑧−1) = 𝑢(𝑧)(2.1691 𝑧−1)

0 = 𝑦1(𝑧)(1 − 0.9829 𝑧−1) − 𝑢(𝑧)(2.1691 𝑧−1) − − − − − − − (1)

From sys2:

𝑦2(𝑧)(1 − 0.9824 𝑧−1) = 𝑢(𝑧)(3.5551 𝑧−1)

0 = 𝑦2(𝑧)(1 − 0.9824 𝑧−1) − 𝑢(𝑧)(3.5551 𝑧−1) − − − − − − − (2)

Now From (1) and (2)

0 1 − 0.9829 𝑧 −1 𝑦 (𝑧) + 0 −2.1691 𝑧−1


[ ]=[ ] [ ] 𝑦 (𝑧) + [ ] 𝑢(𝑧) − − − −(𝑎)
0 0 1
1 − 0.9824 𝑧−1 2
−3.5551 𝑧−1

𝑤𝑇 = [0 1] − − − − − − − − − −(𝑏)
𝑦1

𝑦2 = [1 0] − − − − − − − − − −(𝑐)
𝑤𝑇

𝑢 = [3.5551
𝑤𝑇 −2.1691] − − − − − (𝑑)

From (a), (b), (c) and (d)

𝑟1 = 𝑦2(𝑧)(1 − 0.9824 𝑧 −1) − 𝑢(𝑧)(3.5551 𝑧 −1) − − − − − − − − − − − −(𝑅1)

𝑟2 = 𝑦1(𝑧)(1 − 0.9829 𝑧 −1) − 𝑢(𝑧)(2.1691 𝑧 −1) − − − − − − − − − − − −(𝑅2)

𝑟3 = 𝑦1(𝑧)(1 − 0.9829 𝑧−1)(3.5551) − 𝑦2(𝑧)(1 − 0.9824 𝑧−1)(2.1691) − −(𝑅3)

(R1), (R2) and (R3) are the structured residuals. “R1” is insensitive to “fy1”, “R2” is insensitive to “fy2”
and “R3” is insensitive to “fu”.

22 of 35
Advance Control Methods: Course Work

3.1.1 Implementation in Simulink:


Structured residuals implementation in Matlab using tags to reduce cluttering and to make it clearer. Also
filtering is applied here as we have seen the results in task 2 (low-pass 2 nd order filter).

Why 0.2?

Figure no. 11 (Implementation of structured residuals with filtering and attenuation)

Graph no. 14 (Structured residuals r1, r2 and r3 without faults)

23 of 35
Advance Control Methods: Course Work

3.1.2 Input and output Fault (fu, fy1 and fy2):


Applying input and output fault of various magnitude.

Graph no. 15 (Structured residuals r1, r2 and r3 with input fault fu magnitude ±0.05)

Graph no. 16 (Structured residuals r1, r2 and r3 with output fault fy1 magnitude ±2)

24 of 35
Advance Control Methods: Course Work

Graph no. 17 (Structured residuals r1, r2 and r3 with output fault fy2 magnitude ±2)

3.1.3 Fault Isolation Properties of This System:


The fault isolation of this system can be given as:

+ FY1 + FY2 + FU - FY1 - FY2 - FU


RESIDUAL SR1 0 + + 0 - -
RESIDUAL SR2 + 0 + - 0 -
RESIDUAL SR3 + - 0 - + 0
Table no. 3 (For positive and negative values of faults)

As can be seen from the tables that we can isolate the input and output faults even if the magnitude is
positive or negative. This is strongly isolating matrix as clear from the table above.

3.1.4 Thresholding:
To raise a warning or alarm if fault occurs we have to check the structured residuals values against
thresholds whether their values are within the set threshold values or not. If the values are not within
the set or given threshold values then we should raise warning or an alarm. After setting appropriate
values for the normal operating range the isolating matrix will become as shown below.

THRESHOLDING AND LIMIT CHECKING


STRUCTURED RESIDUAL Lower Limit Upper Limit
SR1 -0.005 0.0022
SR2 -0.006 0.002
SR3 -0.01025 0.0065
Table no. 4 (Thresholding values for normal operation)

25 of 35
Advance Control Methods: Course Work

Figure no. 12 (Implementation of structured residuals and signal tagging)

Figure no. 12 (Implementation of structured residuals, limit checking and thresholding)

+ FY1 + FY2 + FU - FY1 - FY2 - FU


RESIDUAL SR1 0 1 1 0 -1 -1
RESIDUAL SR2 1 0 1 -1 0 -1
RESIDUAL SR3 1 -1 0 -1 1 0
Table no. 5 (For positive and negative values of faults isolation)

26 of 35
Advance Control Methods: Course Work

3.1.5 Simulink Thresholding Function:


I have used user defined Simulink block for thresholding i.e. custom block. The code used for this block is
given in the appendix.

3.1.6 Input Fault with thresholding:


Applying input fault (fu) of 0.05 and -0.05 magnitude with given thresholding values. The input fault was
applied after 5 sec and the fault was detected within 1 second for both positive and negative fault values.

Graph no. 18 (Structured residuals r1, r2 and r3 with input fault fu magnitude +0.05)

Graph no. 19 (Structured residuals r1, r2 and r3 with input fault fu magnitude -0.05)

27 of 35
Advance Control Methods: Course Work

3.1.7 Output Fault with thresholding:


Applying output fault (fy1 and fy2) of 1.1 and -5 magnitude with given thresholding values. The output
fault was applied after 5 sec and the fault was detected within 1 seconds for both fy1 and fy2.

Graph no. 20 (Structured residuals r1, r2 and r3 with output fault fy1 magnitude 1)

Graph no. 21 (Structured residuals r1, r2 and r3 with output fault fy1 magnitude -5)

28 of 35
Advance Control Methods: Course Work

Graph no. 22 (Structured residuals r1, r2 and r3 with output fault fy2 magnitude 1.1)

Graph no. 23 (Structured residuals r1, r2 and r3 with output fault fy2 magnitude -5)

Note:
Alarms should not be generated according to studies very often and should be avoided if possible. So
within a certain range it is better to generate a warning signal and if the values keep on increasing and
cross the 2nd threshold then an alarm should be generated.

29 of 35
Advance Control Methods: Course Work

3.2 Solution (b):


To distinguish the structured residuals in this section from those used in task 3 solution (a) enhanced
structured residuals name will be used. The derivation and implementation of ESR is shown below
(Isermann, 2011, p. 215):
𝑦1(𝑠)
= 𝐺 (𝑠)
𝑢 (𝑠 ) 1

As u(s) for our system is unit step so for simplicity I replace it by one.

𝑦1(𝑠) = 𝐺1(𝑠)

𝑟1∗ = 𝑦1(𝑠) − 𝐺1(𝑠) − − − − − − − − − − − (1)


𝑦2(𝑠)
= 𝐺 (𝑠)
𝑢 (𝑠 ) 2

As u(s) for our system is unit step so for simplicity I replace it by one.

𝑦2(𝑠) = 𝐺2(𝑠)

𝑟2∗ = 𝑦2(𝑠) − 𝐺2(𝑠) − − − − − − − − − − − (2)

𝑦1(𝑠) 𝐺1(𝑠)
𝑦2(𝑠) = 𝐺2(𝑠)

𝑦1(𝑠)𝐺2(𝑠) = 𝑦2(𝑠)𝐺1(𝑠)

𝑟∗ = 𝑦1(𝑠)𝐺2(𝑠)
3 − 𝑦2(𝑠)𝐺1(𝑠) − − − − − −(3)

Figure no. 13 (Implementation of enhanced structured residuals)


30 of 35
Advance Control Methods: Course Work

Figure no. 14 (Limit checking and thresholding used for enhanced structured residuals)

Figure no. 15 (Fault Isolation logic used for Lamp Indicator and its setting)

3.2.1 Applying Faults both input and output:


Applying input and output faults “fu”, “fy1” and “fy2” of ±0.05, ±1 and ±1 magnitude respectively with
thresholding values shown in the table. All faults were applied after 5 sec and the faults were detected
within 1 seconds. Also it is worth mentioning that even smaller magnitude faults can be detected using
these residuals as can be seen clearly from the graphs shown below.

31 of 35
Advance Control Methods: Course Work

Graph no. 23 (Structured residuals esr1, esr2 and esr3 with output fault fu magnitude ±0.05)

Graph no. 23 (Structured residuals esr1, esr2 and esr3 with output fault fy1 magnitude ±1)

Graph no. 23 (Structured residuals esr1, esr2 and esr3 with output fault fy2 magnitude ±1)

3.2.2 Fault Isolation Properties of This System:


In this system the average value of the residuals are also provided to show the magnitude of the fault. A
lamp indicator is also used to indicate where the fault occurred. Isolation Logic is used based on
thresholding values as shown above. The fault isolation of this system can be given as:

32 of 35
Advance Control Methods: Course Work

+ FY2 + FY1 + FU - FY2 - FY1 - FU


ESR1 0 + + 0 - -
ESR2 + 0 + - 0 -
ESR3 - + 0 + - 0
Table no. 6 (For positive and negative values of faults)

As can be seen from the tables that we can isolate the input and output faults even if the magnitude is
positive or negative. This is strongly isolating matrix as clear from the tables above.

3.2.3 Thresholding:
To raise a warning or alarm if fault occurs we have to check the structured residuals values against
thresholds whether their values are within the set threshold values or not. If the values are not within
the set or given threshold values then we should raise warning or an alarm. After setting an appropriate
value for the normal operating range the isolating matrix will become as shown below.

THRESHOLDING AND LIMIT CHECKING


STRUCTURED RESIDUAL Lower Limit Upper Limit
ESR1 -1 0.8
ESR2 -1 0.8
ESR3 -1.1 0.8
Table no. 7 (Thresholding values for normal operation)

+ FY2 + FY1 + FU - FY2 - FY1 - FU


ESR1 0 +1 +1 0 -1 -1
ESR2 +1 0 +1 -1 0 -1
ESR3 -1 +1 0 +1 -1 0
Table no. 8 (For positive and negative values of faults)

3.2.4 Simulink Th_Limits Function:


So, what solution is better?
I have used user defined Simulink block for thresholding i.e. custom block. The code used for this block is
given in the appendix.

33/35

33 of 35
Advance Control Methods: Course Work

Appendix:

Thresholding function: Task no 2.


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Thresholding Function defined for ACM assignment task 2.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

function y = Thresholding(u)
Up_Lmt = u(1);
Value = u(2);
Lw_Lmt = u(3);

if ((Value < Up_Lmt) && (Value > Lw_Lmt))


y = 0;
elseif (Value >= Up_Lmt)
y = 1;
elseif (Value <= Lw_Lmt)
y = -1;
end

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

Th_Limits function: Task no. Extra Task.


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Th_Limits Function defined for ACM assignment task 3.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

function y = Th_Limits(u)
Up_Lmt = u(1);
Value = u(2);
Lw_Lmt = u(3);
prValue = u(4);

if ((Value < Up_Lmt) && (Value > Lw_Lmt))


y(2) = 0;
elseif (Value > Up_Lmt)
y(2) = 1;
elseif (Value < Lw_Lmt)
y(2) = -1;
end

if (prValue == 0)
Vave = Value;
y(1) = Vave;
else
Vave = (Value + prValue)/2;
y(1) = Vave;
end

prValue = Value;
y(3) = prValue;

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

34 of 35
Advance Control Methods: Course Work

References
Isermann, R. (2011). Fault diagnosis applications model based condition monitoring: actuators, drives,
machinery, plants, sensors, and fault-tolerant systems. Berlin: Springer.

MathWorks. (2019, 03 10). OE Function. Retrieved from Mathwork Documentation:


https://uk.mathworks.com/help/ident/ref/oe.html

Miljković, D. (2011). Fault Detection Methods: A Literature Survey., (pp. 750-755). Croatia.

35 of 35

You might also like