Главная | Обратная связь | Поможем написать вашу работу!
МегаЛекции

Алгоритм определения границ фаз с помощью нечеткой логики.




Алгоритм определения границ фаз с помощью четкой логики:

1. Считать из файла массив данных для КТО;

2. Определить точки начала и конца кристаллизации;

3. Определить границы первой фазы:

4. Найти следующий участок, подозрительный на фазу;

5. Определить для него значения пяти параметров, описанных в п. 1.2;

6. Полученные значения пяти параметров подаются на вход системы с нечеткими выводами (СНВ), где они проходят этапы фазификации, оценивания по правилу и дефазификацию. В результате получаем значение выходного параметра.

7. Если значение выходного параметра СНВ не меньше значения 0.5, то анализируемый участок принимается как фаза и для него строятся границы. В противном случае принимается решение о том, что анализируемый участок является шумом и пропускается.

8. Операции по пп. 4-7 повторять для тех пор, пока не будет достигнута точка конца кристаллизации.

Как видно, для использования этого алгоритма сначала нужно создать СНВ. Причем, СНВ должна быть представлена в виде файла, который загружается в само началу работы программы по обнаружению границ фаз с помощью нечеткой логики. Вычисление значения выходного параметра необходимо реализовать с помощью соответствующей функции из пакета Fuzzy Logic Toolbox.

Для создания СНВ в первую очередь необходимо определить количество входных и выходных параметров, а также диапазоны изменения их значений. Как было описано в п. 1.2, имеем следующие входные переменные для СНВ:

- Параметр L1, с диапазоном изменения значений [0; 0.0055]:

- Параметр L2, с диапазоном изменения значений [0; 0.012]:

- Параметр t1, с диапазоном изменения значений [0; 90]:

- Параметр t2, с диапазоном изменения значений [0; 90]:

- Параметр location, с диапазоном изменения значений [0; 260].

Выходной параметр – решение о том, является ли анализируемый участок фазой или шумом. Этот параметр имеет имя Dicision и изменяется в пределах [0; 1].

Примечание. Параметры t1 и t2 могут определяться как арктангенсы соответствующих углов наклона параметров L1 и L2. Тангенс угла в прямоугольном треугольнике определяется как отношение противолежащего катета к прилежащему (рисунок 1.4). При вычислении тангенсов углов и гипотенуз L1 и L2 необходимо учесть несоответствие порядков временных переменных (по оси Х) и переменных темпа охлаждения (по оси Y). Было установлено, что для корректного вычисления значений параметров L1, L2, t1, t2 необходимо значение временного промежутка (координата Х) разделить на 20000.

(Примечание. Поскольку тангенс угла в прямоугольном треугольнике определяется как соотношение прилежащего катета к противолежащему катету (см. рисунок 4), т.е. это отношение временного промежутка, соответствующего получению параметра L1 (для угла t1) или параметра L2 (для угла t2), к самому параметру L1 или параметру L2, соответственно, то необходимо учесть несоответствие порядков временных переменных и параметров L1 и L2. Было установлено, что для корректного вычисления угла необходимо значение временного промежутка перед делением на параметр L1 или L2 разделить на 20000.)

Следующий этап – определение оптимального количества ФП и определение их границ. Экспериментальным путем были получены следующее количество ФП для входных и выходных переменных:

- Для параметра L1 – 4 ФП, две из которых (крайние) – трапециевидные, две – треугольные, с границами:

1. [0 0 0.0001035 0.0001265],

2. [0.0000945 0.00030975 0.000525],

3. [0.00046 0.000805 0.00115],

4. [0.0007075 0.00115 0.0055 0.0055].

- Для параметра L2 – 3 ФП, две из которых (крайние) – трапециевидные, одна – треугольная, с границами:

1. [0 0 0.0001725 0.0002875],

2. [0.0001575 0.00060375 0.00105],

3. [0.00092 0.00115 0.012 0.012].

- Для параметра t1 – 2 трапециевидных ФП с границами:

[0 0 3.3 7.15];

[3.6 7.8 90 90].

- Для параметра t2 – 2 трапециевидных ФП с границами:

[0 0 31.5 33.6];

[33 35.2 90 90].

- Для параметра Location – 2 трапециевидных ФП с границами:

1. [0 0 80 85];

2. [80 85 260 260].

Для выходного параметра были выбраны Две трапециевидными ФП с границами [0 0 0.4 0.6] и [0.4 0.6 1 1].

Правила и их веса также подбирались экспериментально и были получены следующие правила (рисунок 1.5).

 

1. If (L1 is small) and (L2 is small) and (t1 is small) and (t2 is small) and (loc is left) then (decis is No) (0.9)

2. If (L1 is small) and (L2 is small) and (t1 is small) and (t2 is big) and (loc is left) then (decis is No) (0.9)

3. If (L1 is small) and (L2 is small) and (t1 is big) and (t2 is small) and (loc is left) then (decis is No) (0.9)

4. If (L1 is small) and (L2 is small) and (t1 is big) and (t2 is big) and (loc is left) then (decis is No) (0.9)

5. If (L1 is small) and (L2 is small) and (t1 is small) and (t2 is small) and (loc is right) then (decis is No) (0.9)

6. If (L1 is small) and (L2 is small) and (t1 is small) and (t2 is big) and (loc is right) then (decis is No) (0.9)

7. If (L1 is small) and (L2 is small) and (t1 is big) and (t2 is small) and (loc is right) then (decis is No) (0.9)

8. If (L1 is small) and (L2 is small) and (t1 is big) and (t2 is big) and (loc is right) then (decis is No) (0.9)

9. If (L1 is small) and (L2 is middle) and (t1 is small) and (t2 is small) and (loc is left) then (decis is No) (0.9)

10. If (L1 is small) and (L2 is middle) and (t1 is small) and (t2 is big) and (loc is left) then (decis is No) (0.9)

11. If (L1 is small) and (L2 is middle) and (t1 is big) and (t2 is small) and (loc is left) then (decis is No) (0.9)

12. If (L1 is small) and (L2 is middle) and (t1 is big) and (t2 is big) and (loc is left) then (decis is No) (0.9)

13. If (L1 is small) and (L2 is middle) and (t1 is small) and (t2 is small) and (loc is right) then (decis is No) (0.9)

14. If (L1 is small) and (L2 is middle) and (t1 is small) and (t2 is big) and (loc is right) then (decis is No) (0.9)

15. If (L1 is small) and (L2 is middle) and (t1 is big) and (t2 is small) and (loc is right) then (decis is No) (0.9)

16. If (L1 is small) and (L2 is middle) and (t1 is big) and (t2 is big) and (loc is right) then (decis is No) (0.9)

17. If (L1 is small) and (L2 is big) and (t1 is small) and (t2 is small) and (loc is left) then (decis is No) (0.9)

18. If (L1 is small) and (L2 is big) and (t1 is small) and (t2 is big) and (loc is left) then (decis is No) (0.9)

19. If (L1 is small) and (L2 is big) and (t1 is big) and (t2 is small) and (loc is left) then (decis is No) (1)

20. If (L1 is small) and (L2 is big) and (t1 is big) and (t2 is big) and (loc is left) then (decis is No) (0.9)

21. If (L1 is small) and (L2 is big) and (t1 is small) and (t2 is small) and (loc is right) then (decis is No) (0.9)

22. If (L1 is small) and (L2 is big) and (t1 is small) and (t2 is big) and (loc is right) then (decis is No) (0.9)

23. If (L1 is small) and (L2 is big) and (t1 is big) and (t2 is small) and (loc is right) then (decis is No) (1)

24. If (L1 is small) and (L2 is big) and (t1 is big) and (t2 is big) and (loc is right) then (decis is Yes) (0.3)

25. If (L1 is mid_left) and (L2 is small) and (t1 is small) and (t2 is small) and (loc is left) then (decis is No) (0.9)

26. If (L1 is mid_left) and (L2 is small) and (t1 is small) and (t2 is big) and (loc is left) then (decis is No) (0.9)

27. If (L1 is mid_left) and (L2 is small) and (t1 is big) and (t2 is small) and (loc is left) then (decis is No) (0.6)

28. If (L1 is mid_left) and (L2 is small) and (t1 is big) and (t2 is big) and (loc is left) then (decis is No) (0.9)

29. If (L1 is mid_left) and (L2 is small) and (t1 is small) and (t2 is small) and (loc is right) then (decis is No) (1)

30. If (L1 is mid_left) and (L2 is small) and (t1 is small) and (t2 is big) and (loc is right) then (decis is No) (1)

31. If (L1 is mid_left) and (L2 is small) and (t1 is big) and (t2 is small) and (loc is right) then (decis is No) (1)

32. If (L1 is mid_left) and (L2 is small) and (t1 is big) and (t2 is big) and (loc is right) then (decis is No) (0.9)

33. If (L1 is mid_left) and (L2 is middle) and (t1 is small) and (t2 is small) and (loc is left) then (decis is No) (0.9)

34. If (L1 is mid_left) and (L2 is middle) and (t1 is small) and (t2 is big) and (loc is left) then (decis is No) (0.9)

35. If (L1 is mid_left) and (L2 is middle) and (t1 is big) and (t2 is small) and (loc is left) then (decis is No) (1)

36. If (L1 is mid_left) and (L2 is middle) and (t1 is big) and (t2 is big) and (loc is left) then (decis is No) (1)

37. If (L1 is mid_left) and (L2 is middle) and (t1 is small) and (t2 is small) and (loc is right) then (decis is No) (0.9)

38. If (L1 is mid_left) and (L2 is middle) and (t1 is small) and (t2 is big) and (loc is right) then (decis is No) (0.9)

39. If (L1 is mid_left) and (L2 is middle) and (t1 is big) and (t2 is small) and (loc is right) then (decis is No) (1)

40. If (L1 is mid_left) and (L2 is middle) and (t1 is big) and (t2 is big) and (loc is right) then (decis is No) (1)

41. If (L1 is mid_left) and (L2 is big) and (t1 is small) and (t2 is small) and (loc is left) then (decis is No) (1)

42. If (L1 is mid_left) and (L2 is big) and (t1 is small) and (t2 is big) and (loc is left) then (decis is No) (1)

43. If (L1 is mid_left) and (L2 is big) and (t1 is big) and (t2 is small) and (loc is left) then (decis is No) (1)

44. If (L1 is mid_left) and (L2 is big) and (t1 is big) and (t2 is big) and (loc is left) then (decis is No) (1)

45. If (L1 is mid_left) and (L2 is big) and (t1 is small) and (t2 is small) and (loc is right) then (decis is No) (1)

46. If (L1 is mid_left) and (L2 is big) and (t1 is small) and (t2 is big) and (loc is right) then (decis is No) (1)

47. If (L1 is mid_left) and (L2 is big) and (t1 is big) and (t2 is small) and (loc is right) then (decis is Yes) (0.6)

48. If (L1 is mid_left) and (L2 is big) and (t1 is big) and (t2 is big) and (loc is right) then (decis is Yes) (0.1)

49. If (L1 is mid_rig) and (L2 is small) and (t1 is small) and (t2 is small) and (loc is left) then (decis is No) (0.9)

50. If (L1 is mid_rig) and (L2 is small) and (t1 is small) and (t2 is big) and (loc is left) then (decis is No) (0.9)

51. If (L1 is mid_rig) and (L2 is small) and (t1 is big) and (t2 is small) and (loc is left) then (decis is No) (0.6)

52. If (L1 is mid_rig) and (L2 is small) and (t1 is big) and (t2 is big) and (loc is left) then (decis is No) (0.9)

53. If (L1 is mid_rig) and (L2 is small) and (t1 is small) and (t2 is small) and (loc is right) then (decis is No) (0.9)

54. If (L1 is mid_rig) and (L2 is small) and (t1 is small) and (t2 is big) and (loc is right) then (decis is No) (0.9)

55. If (L1 is mid_rig) and (L2 is small) and (t1 is big) and (t2 is small) and (loc is right) then (decis is Yes) (0.2)

56. If (L1 is mid_rig) and (L2 is small) and (t1 is big) and (t2 is big) and (loc is right) then (decis is No) (0.9)

57. If (L1 is mid_rig) and (L2 is middle) and (t1 is small) and (t2 is small) and (loc is left) then (decis is No) (1)

58. If (L1 is mid_rig) and (L2 is middle) and (t1 is small) and (t2 is big) and (loc is left) then (decis is No) (1)

59. If (L1 is mid_rig) and (L2 is middle) and (t1 is big) and (t2 is small) and (loc is left) then (decis is No) (1)

60. If (L1 is mid_rig) and (L2 is middle) and (t1 is big) and (t2 is big) and (loc is left) then (decis is No) (1)

61. If (L1 is mid_rig) and (L2 is middle) and (t1 is small) and (t2 is small) and (loc is right) then (decis is No) (1)

62. If (L1 is mid_rig) and (L2 is middle) and (t1 is small) and (t2 is big) and (loc is right) then (decis is No) (1)

63. If (L1 is mid_rig) and (L2 is middle) and (t1 is big) and (t2 is small) and (loc is right) then (decis is No) (1)

64. If (L1 is mid_rig) and (L2 is middle) and (t1 is big) and (t2 is big) and (loc is right) then (decis is No) (1)

65. If (L1 is mid_rig) and (L2 is big) and (t1 is small) and (t2 is small) and (loc is left) then (decis is No) (0.7)

66. If (L1 is mid_rig) and (L2 is big) and (t1 is small) and (t2 is big) and (loc is left) then (decis is No) (1)

67. If (L1 is mid_rig) and (L2 is big) and (t1 is big) and (t2 is small) and (loc is left) then (decis is No) (1)

68. If (L1 is mid_rig) and (L2 is big) and (t1 is big) and (t2 is big) and (loc is left) then (decis is No) (1)

69. If (L1 is mid_rig) and (L2 is big) and (t1 is small) and (t2 is small) and (loc is right) then (decis is No) (0.7)

70. If (L1 is mid_rig) and (L2 is big) and (t1 is small) and (t2 is big) and (loc is right) then (decis is No) (1)

71. If (L1 is mid_rig) and (L2 is big) and (t1 is big) and (t2 is small) and (loc is right) then (decis is No) (0.1)

72. If (L1 is mid_rig) and (L2 is big) and (t1 is big) and (t2 is big) and (loc is right) then (decis is Yes) (0.5)

73. If (L1 is big) and (L2 is small) and (t1 is small) and (t2 is small) and (loc is left) then (decis is No) (0.2)

74. If (L1 is big) and (L2 is small) and (t1 is small) and (t2 is big) and (loc is left) then (decis is No) (0.2)

75. If (L1 is big) and (L2 is small) and (t1 is big) and (t2 is small) and (loc is left) then (decis is No) (0.1)

76. If (L1 is big) and (L2 is small) and (t1 is big) and (t2 is big) and (loc is left) then (decis is No) (0.2)

77. If (L1 is big) and (L2 is small) and (t1 is small) and (t2 is small) and (loc is right) then (decis is No) (1)

78. If (L1 is big) and (L2 is small) and (t1 is small) and (t2 is big) and (loc is right) then (decis is No) (1)

79. If (L1 is big) and (L2 is small) and (t1 is big) and (t2 is small) and (loc is right) then (decis is No) (0.1)

80. If (L1 is big) and (L2 is small) and (t1 is big) and (t2 is big) and (loc is right) then (decis is No) (1)

81. If (L1 is big) and (L2 is middle) and (t1 is small) and (t2 is small) and (loc is left) then (decis is No) (0.9)

82. If (L1 is big) and (L2 is middle) and (t1 is small) and (t2 is big) and (loc is left) then (decis is No) (1)

83. If (L1 is big) and (L2 is middle) and (t1 is big) and (t2 is small) and (loc is left) then (decis is No) (0.1)

84. If (L1 is big) and (L2 is middle) and (t1 is big) and (t2 is big) and (loc is left) then (decis is No) (1)

85. If (L1 is big) and (L2 is middle) and (t1 is small) and (t2 is small) and (loc is right) then (decis is No) (0.9)

86. If (L1 is big) and (L2 is middle) and (t1 is small) and (t2 is big) and (loc is right) then (decis is No) (1)

87. If (L1 is big) and (L2 is middle) and (t1 is big) and (t2 is small) and (loc is right) then (decis is Yes) (1)

88. If (L1 is big) and (L2 is middle) and (t1 is big) and (t2 is big) and (loc is right) then (decis is Yes) (1)

89. If (L1 is big) and (L2 is big) and (t1 is small) and (t2 is small) and (loc is left) then (decis is No) (0.9)

90. If (L1 is big) and (L2 is big) and (t1 is small) and (t2 is big) and (loc is left) then (decis is No) (1)

91. If (L1 is big) and (L2 is big) and (t1 is big) and (t2 is small) and (loc is left) then (decis is Yes) (1)

92. If (L1 is big) and (L2 is big) and (t1 is big) and (t2 is big) and (loc is left) then (decis is No) (1)

93. If (L1 is big) and (L2 is big) and (t1 is small) and (t2 is small) and (loc is right) then (decis is No) (0.9)

94. If (L1 is big) and (L2 is big) and (t1 is small) and (t2 is big) and (loc is right) then (decis is No) (1)

95. If (L1 is big) and (L2 is big) and (t1 is big) and (t2 is small) and (loc is right) then (decis is Yes) (1)

96. If (L1 is big) and (L2 is big) and (t1 is big) and (t2 is big) and (loc is right) then (decis is Yes) (1)

Наиболее удачным методом дефазификации был определен метод МОМ (средний-из-максимальных).

По этим данным необходимо сгенерировать СНВ и записать ее ф фиде файла.

Как уже отмечалось, участок считается фазой, если Decision > 0.5.

Если кривых больше одной и если имена файлов, содержащих данные по кривым, содержат числа, то перебор всех кривых достаточно просто осуществить с помощью оператора int2str(х), позволяющего перевести строковую переменную х в число.

Поделиться:





Воспользуйтесь поиском по сайту:



©2015 - 2024 megalektsii.ru Все авторские права принадлежат авторам лекционных материалов. Обратная связь с нами...