-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmodel_architecture.txt
More file actions
252 lines (221 loc) · 7.59 KB
/
model_architecture.txt
File metadata and controls
252 lines (221 loc) · 7.59 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
================================================================================
CNN-LSTM MODEL ARCHITECTURE
Electrical Fault Classification System
================================================================================
MODEL OVERVIEW
--------------
Name: CNN_LSTM_FaultClassifier
Type: Hybrid Deep Learning Model (CNN + LSTM)
Task: Multiclass Time-Series Classification
Classes: 6 (No Fault, LG, LL, LLG, LLL, LLLG)
Input: (10 timesteps, 6 features)
Output: 6-class probability distribution
================================================================================
LAYER-BY-LAYER ARCHITECTURE
================================================================================
Layer 1: Conv1D (conv1d_1)
--------------------------
Type: 1D Convolutional Layer
Filters: 64
Kernel Size: 3
Activation: ReLU
Padding: Same
Input Shape: (10, 6)
Output Shape: (10, 64)
Parameters: 1,216
Layer 2: BatchNormalization (batch_norm_1)
-------------------------------------------
Type: Batch Normalization
Output Shape: (10, 64)
Parameters: 256
Layer 3: MaxPooling1D (maxpool_1)
----------------------------------
Type: Max Pooling
Pool Size: 2
Output Shape: (5, 64)
Parameters: 0
Layer 4: Dropout (dropout_1)
-----------------------------
Type: Dropout Regularization
Rate: 0.3 (30%)
Output Shape: (5, 64)
Parameters: 0
Layer 5: Conv1D (conv1d_2)
--------------------------
Type: 1D Convolutional Layer
Filters: 128
Kernel Size: 3
Activation: ReLU
Padding: Same
Input Shape: (5, 64)
Output Shape: (5, 128)
Parameters: 24,704
Layer 6: BatchNormalization (batch_norm_2)
-------------------------------------------
Type: Batch Normalization
Output Shape: (5, 128)
Parameters: 512
Layer 7: MaxPooling1D (maxpool_2)
----------------------------------
Type: Max Pooling
Pool Size: 2
Output Shape: (2, 128)
Parameters: 0
Layer 8: Dropout (dropout_2)
-----------------------------
Type: Dropout Regularization
Rate: 0.3 (30%)
Output Shape: (2, 128)
Parameters: 0
Layer 9: LSTM (lstm)
--------------------
Type: Long Short-Term Memory
Units: 100
Return Sequences: False
Dropout: 0.3
Recurrent Dropout: 0.2
Input Shape: (2, 128)
Output Shape: (100,)
Parameters: 91,600
Layer 10: Dense (dense_1)
-------------------------
Type: Fully Connected Layer
Units: 64
Activation: ReLU
Input Shape: (100,)
Output Shape: (64,)
Parameters: 6,464
Layer 11: Dropout (dropout_3)
------------------------------
Type: Dropout Regularization
Rate: 0.4 (40%)
Output Shape: (64,)
Parameters: 0
Layer 12: Dense (output)
------------------------
Type: Output Layer (Fully Connected)
Units: 6
Activation: Softmax
Input Shape: (64,)
Output Shape: (6,)
Parameters: 390
================================================================================
MODEL SUMMARY
================================================================================
Total Parameters: 125,142
Trainable Parameters: 125,142
Non-trainable Parameters: 0
Model Size: ~488 KB (saved as .h5)
================================================================================
HYPERPARAMETERS
================================================================================
Architecture Hyperparameters:
-----------------------------
- CNN Filters (Layer 1): 64
- CNN Filters (Layer 2): 128
- CNN Kernel Size: 3
- LSTM Units: 100
- Dense Layer Units: 64
- Dropout Rate (CNN): 0.3
- Dropout Rate (Dense): 0.4
- Recurrent Dropout: 0.2
Training Hyperparameters:
-------------------------
- Optimizer: Adam
- Learning Rate: 0.001
- Loss Function: Sparse Categorical Crossentropy
- Batch Size: 32
- Epochs: 50 (with early stopping)
- Validation Split: 0.2
Preprocessing:
--------------
- Normalization: StandardScaler (z-score normalization)
- Sequence Length: 10 timesteps
- Features: 6 (Ia, Ib, Ic, Va, Vb, Vc)
================================================================================
ARCHITECTURE FLOW DIAGRAM
================================================================================
Input Data (Raw CSV)
|
v
[Preprocessing & Normalization]
|
v
Time-Series Sequences (10 timesteps × 6 features)
|
v
┌───────────────────────────────────────┐
│ CNN FEATURE EXTRACTION BLOCK │
├───────────────────────────────────────┤
│ Conv1D(64) → BatchNorm → MaxPool │
│ ↓ │
│ Dropout(0.3) │
│ ↓ │
│ Conv1D(128) → BatchNorm → MaxPool │
│ ↓ │
│ Dropout(0.3) │
└───────────────────────────────────────┘
|
v
┌───────────────────────────────────────┐
│ LSTM TEMPORAL LEARNING BLOCK │
├───────────────────────────────────────┤
│ LSTM(100 units) │
│ dropout=0.3, recurrent_dropout=0.2 │
└───────────────────────────────────────┘
|
v
┌───────────────────────────────────────┐
│ DENSE CLASSIFICATION BLOCK │
├───────────────────────────────────────┤
│ Dense(64, ReLU) │
│ ↓ │
│ Dropout(0.4) │
│ ↓ │
│ Dense(6, Softmax) │
└───────────────────────────────────────┘
|
v
Output: Fault Class Probabilities [6 classes]
|
v
Predicted Fault Type
================================================================================
PERFORMANCE METRICS
================================================================================
Overall Performance:
-------------------
- Accuracy: 78.01%
- Precision: 77.53%
- Recall: 78.01%
- F1-Score: 77.47%
Class-wise Performance:
----------------------
| Fault Type | Accuracy | F1-Score |
|-----------------|----------|----------|
| No Fault (0000) | 97.01% | 95.18% |
| LG Fault (1001) | 93.33% | 88.24% |
| LLG Fault (1011)| 88.50% | 88.11% |
| LL Fault (0110) | 80.50% | 86.10% |
| LLL Fault (0111)| 55.05% | 50.21% |
| LLLG Fault (1111)| 33.04% | 38.27% |
================================================================================
KEY FEATURES
================================================================================
1. Temporal Awareness
- LSTM layer captures time-series dependencies
- Learns patterns across 10 timesteps
2. Automatic Feature Extraction
- CNN layers extract relevant spatial features
- Hierarchical feature learning (64 → 128 filters)
3. Regularization
- Batch Normalization for stable training
- Dropout layers prevent overfitting
- Early stopping with patience=10
4. Production Ready
- Saved model weights (.h5)
- Preprocessing artifacts (scaler, label encoder)
- Comprehensive evaluation metrics
================================================================================
END OF ARCHITECTURE DOCUMENT
================================================================================