Deep Learning
الشبكات العصبية العميقة وReLU وCNN وRNN وتطبيقاتها في نظم الطاقة
🎯 Learning Objectives
- Understand what makes a neural network “deep”.
- Distinguish shallow and deep neural networks.
- Understand why deep networks can learn hierarchical features.
- Explain the ReLU activation function.
- Understand the vanishing-gradient problem.
- Understand the basic ideas of CNNs and RNNs.
- Identify important Deep Learning applications in power systems.
🎯 أهداف التعلم
- فهم المقصود بالشبكة العصبية العميقة.
- التمييز بين الشبكات الضحلة والعميقة.
- فهم كيف تتعلم الشبكات العميقة ميزات هرمية.
- فهم دالة التنشيط ReLU.
- فهم مشكلة تلاشي التدرج.
- فهم الفكرة الأساسية لـ CNN وRNN.
- التعرف على أهم تطبيقات التعلم العميق في نظم الطاقة الكهربائية.
1. What is Deep Learning?
Deep Learning is a branch of Machine Learning based mainly on neural networks containing multiple hidden layers.
1. ما هو التعلم العميق؟
التعلم العميق هو فرع من التعلم الآلي يعتمد بصورة أساسية على الشبكات العصبية متعددة الطبقات المخفية.
2. Shallow vs Deep Neural Networks
Usually one hidden layer or only a few layers.
Multiple hidden layers arranged hierarchically.
2. الشبكات الضحلة مقابل الشبكات العميقة
تحتوي عادةً على طبقة مخفية واحدة أو عدد قليل من الطبقات.
تحتوي على عدة طبقات مخفية مرتبة بصورة هرمية.
3. Why Can Deep Networks Learn More?
Each layer transforms the representation produced by the previous layer.
3. لماذا تستطيع الشبكات العميقة تعلم علاقات أكثر تعقيدًا؟
تقوم كل طبقة بتحويل التمثيل القادم من الطبقة السابقة إلى تمثيل جديد.
4. Mathematical Form of a Deep Network
For layer l:
where:
- W⁽ˡ⁾ = weight matrix of layer l
- b⁽ˡ⁾ = bias vector
- a⁽ˡ⁻¹⁾ = input from previous layer
- φ = activation function
4. الصيغة الرياضية للشبكة العميقة
في كل طبقة l نحسب أولًا:
ثم:
أي أن كل طبقة تستقبل خرج الطبقة السابقة وتطبّق عليه تحويلًا خطيًا ثم دالة تنشيط.
5. Visual Structure of a Deep Network
The essential difference is not the symbol used, but the number of sequential nonlinear transformations.
5. البنية البصرية للشبكة العميقة
الفرق الأساسي هو وجود عدة تحويلات غير خطية متتابعة بين المدخلات والخرج.
6. The ReLU Activation Function
Therefore:
z, z≥0
Its derivative is:
1, z>0
6. دالة التنشيط ReLU
أي أن القيم السالبة تتحول إلى صفر، بينما تمر القيم الموجبة كما هي.
7. Why Not Use Sigmoid Everywhere?
Sigmoid is useful, but in deep networks its derivative can become very small.
Since:
multiplying many such derivatives during backpropagation can make the gradient extremely small.
7. لماذا لا نستخدم Sigmoid في جميع الطبقات العميقة؟
مشتقة Sigmoid صغيرة نسبيًا، ومع تكرار الضرب عبر طبقات كثيرة قد يصبح التدرج صغيرًا جدًا.
8. Vanishing Gradient
During backpropagation, gradients are multiplied across layers.
If many factors are smaller than 1, the final gradient may approach zero.
8. مشكلة تلاشي التدرج
أثناء الانتشار الخلفي يتم ضرب العديد من المشتقات عبر الطبقات.
إذا كانت معظم هذه القيم أصغر من الواحد، فقد يصبح التدرج في الطبقات الأولى قريبًا جدًا من الصفر.
9. Why ReLU Helps
For positive inputs:
so the gradient can pass through the layer without being repeatedly multiplied by a small number such as 0.1 or 0.2.
9. كيف تساعد ReLU؟
عندما يكون الدخل موجبًا تكون المشتقة مساوية للواحد:
وهذا يساعد على انتقال التدرج عبر الشبكة بصورة أفضل.
10. Deep Learning Training Cycle
10. دورة تدريب التعلم العميق
11. What is a Mini-Batch?
Instead of using the whole dataset at every update, Deep Learning usually processes a small subset called a mini-batch.
11. ما المقصود بـ Mini-Batch؟
بدل استخدام كامل بيانات التدريب في كل تحديث، يتم استخدام مجموعة صغيرة من العينات في كل خطوة.
12. Epoch
One epoch means that the complete training dataset has been processed once.
12. ما هو Epoch؟
يعني Epoch واحد أن جميع عينات بيانات التدريب قد مرت عبر الشبكة مرة واحدة.
13. Convolutional Neural Networks — CNN
CNNs are designed to detect local patterns using filters or kernels.
This operation is a simplified discrete convolution.
13. الشبكات العصبية الالتفافية CNN
تستخدم CNN مرشحات صغيرة لاكتشاف الأنماط المحلية داخل البيانات.
يتم استخدام المرشح نفسه في مواقع مختلفة، وهذا يقلل عدد المعاملات.
14. CNN for Power-System Signals
CNNs are not limited to images. A one-dimensional CNN can process electrical time-series signals.
14. استخدام CNN مع إشارات نظم الطاقة
يمكن استخدام CNN أحادية البعد لمعالجة إشارات الجهد أو التيار الزمنية.
15. Recurrent Neural Networks — RNN
RNNs are designed for sequential data where past information matters.
The hidden state hₜ depends on both the current input and the previous hidden state.
15. الشبكات العصبية المتكررة RNN
تستخدم RNN للبيانات المتسلسلة زمنيًا، حيث تكون المعلومات السابقة مهمة.
أي أن الحالة الحالية تعتمد على الدخل الحالي والحالة السابقة.
16. Why RNNs are Useful for Energy Forecasting
Electrical load and renewable generation are time-dependent.
16. لماذا تعد RNN مناسبة للتنبؤ بالطاقة؟
الحمل الكهربائي وتوليد الطاقة المتجددة يعتمدان على القيم السابقة زمنيًا.
17. LSTM — Basic Idea
Long Short-Term Memory networks are a special form of recurrent network designed to retain useful information over longer time intervals.
17. الفكرة الأساسية لـ LSTM
LSTM هي بنية متقدمة من الشبكات المتكررة تساعد على الاحتفاظ بالمعلومات المهمة عبر فترات زمنية أطول.
18. Deep Learning vs Classical Machine Learning
| Aspect | Classical ML | Deep Learning |
|---|---|---|
| Feature Engineering | Often manual | Often learned automatically |
| Data Requirement | Moderate | Often large |
| Model Complexity | Lower | Higher |
| Interpretability | Often easier | Often more difficult |
| Computation | Lower | Higher |
18. التعلم العميق مقابل التعلم الآلي التقليدي
يحتاج التعلم العميق عادةً إلى بيانات وقدرة حسابية أكبر، لكنه يستطيع تعلم الميزات تلقائيًا وبناء تمثيلات معقدة.
19. Power-System Application: Load Forecasting
A deep network may receive:
and predict:
19. تطبيق في نظم الطاقة: التنبؤ بالحمل
يمكن للشبكة العميقة استخدام الحمل التاريخي والطقس والوقت ونوع اليوم للتنبؤ بالحمل المستقبلي.
20. Renewable-Energy Forecasting
Solar irradiance, temperature, cloud information, and historical PV power.
Wind speed, wind direction, weather data, and historical turbine output.
20. التنبؤ بالطاقة المتجددة
يمكن استخدام التعلم العميق للتنبؤ بالطاقة الشمسية وطاقة الرياح اعتمادًا على البيانات الجوية والتاريخية.
21. Fault Detection and Classification
Deep networks can learn characteristic fault patterns from measurements.
21. اكتشاف الأعطال وتصنيفها
تستطيع الشبكات العميقة تعلم أنماط الأعطال من بيانات الجهد والتيار ثم تحديد نوع العطل.
22. Condition Monitoring
Deep Learning can analyze large streams of sensor data for equipment such as transformers, generators, and converters.
22. مراقبة الحالة
يمكن تحليل بيانات الحساسات للمحولات والمولدات والمحولات الإلكترونية لاكتشاف السلوك غير الطبيعي مبكرًا.
23. Challenges of Deep Learning
- Large data requirements.
- High computational cost.
- Difficult model interpretation.
- Risk of overfitting.
- Data quality and distribution shifts.
- Cybersecurity and safety considerations.
23. تحديات التعلم العميق
- الحاجة إلى كميات كبيرة من البيانات.
- ارتفاع الكلفة الحسابية.
- صعوبة تفسير بعض النماذج.
- احتمال فرط المطابقة.
- تأثر الأداء بجودة البيانات وتغير توزيعها.
- ضرورة مراعاة الأمن السيبراني والسلامة.
24. MATLAB / Deep Learning Concept
At a conceptual level, a deep network still repeats the same basic layer operation:
The key difference is that this operation is repeated through many layers.
24. الفكرة البرمجية في MATLAB
ما زالت الشبكة العميقة تعتمد على العملية الأساسية نفسها:
لكن هذه العملية تتكرر عبر عدد أكبر من الطبقات.
25. Summary
- Deep Learning uses neural networks with multiple hidden layers.
- Each layer learns a new representation of the data.
- ReLU is widely used in deep networks.
- Vanishing gradients can make early layers learn slowly.
- CNNs are useful for local patterns and waveform analysis.
- RNNs and LSTMs are useful for sequential and time-series data.
- Power-system applications include forecasting, fault diagnosis, and condition monitoring.
25. الخلاصة
- يعتمد التعلم العميق على شبكات عصبية متعددة الطبقات.
- تتعلم كل طبقة تمثيلًا جديدًا للبيانات.
- تستخدم ReLU بكثرة في الشبكات العميقة.
- يمكن أن تسبب مشكلة تلاشي التدرج بطئًا في تعلم الطبقات الأولى.
- تعد CNN مناسبة لاكتشاف الأنماط المحلية وتحليل الإشارات.
- تعد RNN وLSTM مناسبة للبيانات المتسلسلة زمنيًا.
- تشمل التطبيقات التنبؤ وتشخيص الأعطال ومراقبة الحالة.
📝 Review Questions
- What makes a neural network deep?
- Why can deep networks learn hierarchical features?
- Write the mathematical equation of one deep-network layer.
- What is the ReLU activation function?
- Why can Sigmoid cause vanishing gradients?
- What is the main idea of CNN?
- What is the main idea of RNN?
- Why are RNN/LSTM models useful for load forecasting?
- Give three Deep Learning applications in power systems.
📝 أسئلة المراجعة
- متى نطلق على الشبكة العصبية اسم شبكة عميقة؟
- لماذا تستطيع الشبكات العميقة تعلم ميزات هرمية؟
- اكتب المعادلة الرياضية لطبقة واحدة في شبكة عميقة.
- ما هي دالة ReLU؟
- لماذا قد تؤدي Sigmoid إلى تلاشي التدرج؟
- ما الفكرة الأساسية لـ CNN؟
- ما الفكرة الأساسية لـ RNN؟
- لماذا تعد RNN وLSTM مناسبة للتنبؤ بالحمل؟
- اذكر ثلاثة تطبيقات للتعلم العميق في نظم الطاقة الكهربائية.