Professional Documents
Culture Documents
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
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.
4 of 35
Advance Control Methods: Course Work
𝑌(𝑡) = (𝑎 + 𝑓(𝑡))𝑈(𝑡)
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.
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.
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.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% 1st Step System Identification
% (data given and consider the given model as real system)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
6 of 35
Advance Control Methods: Course Work
% data = iddata(y,u,Ts);
data1 = iddata(Y1,Uout,Ts);
data2 = iddata(Y2,Uout,Ts);
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
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.
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.
10 of 35
Advance Control Methods: Course Work
2 Task 2.
Apply sudden faults of a different magnitude to the "actual" input of plant, and afterward to the "actual" output of the
plant to identify residual shifts. Build a scheme of parity relations for the formation of residuals to use your own
extracted Task 1 models. Explore the properties of this scheme relevant to fault isolation.
2.1 Solution:
The tags of Signals are employed to minimize as much of the noise as necessary. The formed residuals
from the comparison of the actual plant output and the calculated models of the plant are demonstrated
in the diagram below.
By filtering it is quite easy to identify if the plant runs usually or not, it is easy to identify even a minor deviation. The
graph of the R1 and R2 residuals with or without filters and measurement without any output or input faults follows.
As shown in the graphs it would be very difficult to handle the residual data without filtering. x
11 of 35
Advance Control Methods: Course Work
12 of 35
Advance Control Methods: Course Work
Graph no. 5 (The magnitude of 1, 2 fault fu is 0.05, its magnitude is 0.1 in 3, 4 and its magnitude is 0.5 in 5, 6)
13 of 35
Advance Control Methods: Course Work
It is very evident from graph no. 6 that it is possible to distinguish and identify either positive and negative fault
magnitudes.
14 of 35
Advance Control Methods: Course Work
15 of 35
Advance Control Methods: Course Work
Graph no. 7 (The magnitude of 1, 2 fault fy1 is 1, its magnitude is 5 in 3, 4 and its magnitude is 10 in 5, 6)
16 of 35
Advance Control Methods: Course Work
Graph no. 8 (The magnitude of 1, 2 fault fy1 is -1, in 3, 4 its magnitude is -5, and its magnitude is -10 in 5, 6)
17 of 35
Advance Control Methods: Course Work
Graph no. 9 (The magnitude of 1, 2 fault fy2 is 1, its magnitude is 5 in 3, 4 and its magnitude is 10 in 5, 6)
18 of 35
Advance Control Methods: Course Work
Graph no. 10 (The magnitude of 1, 2 fault fy2 is -1, in 3, 4 its magnitude is -5, and its magnitude is -10 in 5, 6)
19 of 35
Advance Control Methods: Course Work
Even, whether the shift or fault is negative, the residuals represent the shift in their behavior. Residual "R1" is prone to
fault of "fu" input and fault of "fy1" output. As evident from all of the previous simulations, the residual magnitude is
directly proportional to the fault's magnitude. furthermore Residual "R2" is vulnerable to "fu" fault input and "fy2"
fault output.
2.1.4 The Properties of Fault Isolation of This System:
For instance, if "fy1" and "fy2" appear at about the same moment, it might indicate that the input fault is the
opposite. As shown through the tables, if or rather when one fault happens at a time we can isolate the input and
output faults. In particular, it would be poorly isolating, although "fy1" and "fy2" do not happen at the same time.
2.1.5 Thresholding:
In order to form a notification or alarm, if there is a fault, we must look up the values of residual against
thresholds whether or not their values are in the set threshold values. When the values are not within the
set or provided threshold values and after that alert or an alarm should be generated. The threshold
values for this method are —0.5 to + 0.4. Upon establishing a suitable value for the standard operating
range (-0.5 to + 0.4), the isolating matrix should be as shown below.
20 of 35
Advance Control Methods: Course Work
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?
Implementing 1.1 and -1.1-magnitude output fault (fy1 and fy2) with 0.4 to -0.5 threshold values. The output fault
after 5 sec was implemented, and the fault was observed for fy1 and fy2 simultaneously at 6.9 sec and 5.6 sec.
21 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 the magnitude of fault fy2 is 1.1, and its magnitude in 2 is -1.1)
As evident from the graphs that a minor deviation within input as well as output can be identified with filtering and
that without sorting the plant deviation from its usual values would be very difficult to detect through proper means.
32/35
22 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 the plant.
Let's just extract the residuals structured for the defined method.
From sys1:
From sys2:
𝑤𝑇 = [0 1] − − − − − − − − − −(𝑏)
𝑦1
𝑦2 = [1 0] − − − − − − − − − −(𝑐)
𝑤𝑇
𝑢 = [3.5551
𝑤𝑇 −2.1691] − − − − − (𝑑)
23 of 35
Advance Control Methods: Course Work
Why 0.2?
24 of 35
Advance Control Methods: Course Work
Graph no. 15 (Organized residuals r1, r2, and r3 with magnitude ±0.05 of the input fault fu)
Graph no. 16 (Structured residual r1, r2, and r3 along with fy1 magnitude ±2 fault output)
25 of 35
Advance Control Methods: Course Work
Graph no. 17 (Organized residues r1, r2 and r3 along with fy2 magnitude ±2 fault output)
It is as evident from the table above, clearly trying to isolate the matrix. This is shown on the tables, although the
magnitude is positive or negative, we can easily separate the faults of input and output.
3.1.3 Thresholding:
The isolating matrix may appear as demonstrated under after establishing correct values for the usual operating
range. When the values are not under the defined or specified threshold values, then warning or an alarm should be
raised. To create an alert or alarm when a fault appears, the specified residual values must be tested across the
thresholds whether or not their values are in the defined threshold values.
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 (Minimum operating threshold values)
26 of 35
Advance Control Methods: Course Work
27 of 35
Advance Control Methods: Course Work
after 5 secs, the input fault was implemented, and for both positive and negative values of fault, the fault
was found in only 1 second. Moreover, implementing 0.05 and -0.05 magnitude input faults (fu) with
specified values of threshold.
Graph no. 18 (Structured residuals r1, r2 and r3 with magnitude + 0.05 input fault fu)
Graph no. 19 (Structured residuals r1, r2 and r3 with magnitude -0.05 input fault fu)
28 of 35
Advance Control Methods: Course Work
The output fault was introduced within 5 secs, and both fy1 and fy2 recognized the fault in 1 second.
Implementing 1.1 and -5 magnitude output faults (fy1 and fy2) on provided threshold values.
Graph no. 20 (Structured residuals for instance 1 r1, r2 and r3 along with fy1 magnitude 1 output faults)
Graph no. 21 (Structured residuals such as r1, r2 and r3 along with fy1 magnitude -5's output fault)
29 of 35
Advance Control Methods: Course Work
Graph no. 22 (r1, r2 and r3 Structured residuals along with fy2 magnitude 1.1 output fault)
Graph no. 23 (r1, r2 and r3 Structured residuals along with fy2 magnitude -5's output fault)
Note:
It is best to produce an alert signal during a certain distance, and when the values continue to increase and exceed the
2nd threshold, then an alarm must be produced. Alarms must not be generated frequently and must be handled with
care, as per reports.
30 of 35
Advance Control Methods: Course Work
As u(s) are a unit phase for our system, so I substitute it with one for clarity.
𝑦1(𝑠) = 𝐺1(𝑠)
As u(s) for our model is unit phase, so I substitute it with one for clarity.
𝑦2(𝑠) = 𝐺2(𝑠)
𝑦1(𝑠) 𝐺1(𝑠)
𝑦2(𝑠) = 𝐺2(𝑠)
𝑦1(𝑠)𝐺2(𝑠) = 𝑦2(𝑠)𝐺1(𝑠)
𝑟∗ = 𝑦1(𝑠)𝐺2(𝑠)
3 − 𝑦2(𝑠)𝐺1(𝑠) − − − − − −(3)
31 of 35
Advance Control Methods: Course Work
Figure no. 14 (Limit monitoring and thresholding employed for improved structured residuals)
Figure no. 15 (The logic of Fault isolation is used for the setting of Lamp Indicator)
32 of 35
Advance Control Methods: Course Work
Graph no. 23 (esr1, esr2 and esr3 Structured residuals with magnitude ±0.05 for output fault fu)
Graph no. 23 (Esr1, esr2 and esr3 structured residuals with magnitude ±1 for output fault fy1)
Graph no. 23 (esr1, esr2 and esr3 Structured residuals with magnitude ±1 output fault fy2)
33 of 35
Advance Control Methods: Course Work
This is a rather isolating matrix, as evident from the above tables. It can be easily observed from the tables. Although
the magnitude is positive or negative, we can separate the input as well as output faults.
3.2.3 Thresholding:
When the values are not under the set or specified threshold values, then warning or an alarm should be raised. To
generate an alert or alarm when a fault happens, the values of structured residual must be tested against thresholds
whether or not their values are within the defined threshold values. Once a suitable value has been set for the usual
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 (Standard operating threshold values)
34 of 35
Advance Control Methods: Course Work
Appendix:
function y = Thresholding(u)
Up_Lmt = u(1);
Value = u(2);
Lw_Lmt = u(3);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
function y = Th_Limits(u)
Up_Lmt = u(1);
Value = u(2);
Lw_Lmt = u(3);
prValue = u(4);
if (prValue == 0)
Vave = Value;
y(1) = Vave;
else
Vave = (Value + prValue)/2;
y(1) = Vave;
end
prValue = Value;
y(3) = prValue;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
35 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.
Miljković, D. (2011). Fault Detection Methods: A Literature Survey., (pp. 750-755). Croatia.
36 of 35