A resource-efficient machine learning framework for real-time non-intrusive load monitoring and performance optimization in solar-powered aviation systems Authors: Aguida Mohammed Echarif, Yanbo Che, El Moundher Aouiche, Abdrabbi Bourezg, Muhammad Zain Yousaf, Wajid Khan, Mohit Bajaj, Oleksandr Rubanenko Published: 2025 ABSTRACT The integration of non-intrusive load monitoring (NILM) into solar-powered aviation systems presents a transformative approach for achieving sustainable, lightweight, and intelligent flight operations. However, the sector’s stringent constraints on weight, latency, and computational resources pose critical challenges to real-time NILM deployment. This study develops a resource-efficient machine learning framework that systematically evaluates six machine learning (ML) and deep learning (DL) models using high-resolution (200 kHz) power data that capture both transient and steady-state load characteristics across all flight phases. Advanced preprocessing techniques—comprising moving average smoothing and non-overlapping downsampling—were applied to suppress noise while preserving essential features. The comparative analysis reveals that K-Nearest neighbors (KNN) delivers the most effective balance between accuracy and computational cost, achieving an R² of 0.9403 with an execution time of 0.20 s, substantially outperforming ensemble models such as random forest (RF) and XGBoost in real-time feasibility. Conversely, the hybrid CNN-LSTM architecture attained the lowest mean squared error (MSE = 0.0048) and superior temporal sensitivity but required 271.53 s, demonstrating its suitability for offline analysis rather than onboard deployment. Through comprehensive hardware-in-the-loop validation using Opal-RT and Launchpad-F28379D DSP controllers, the framework verified appliance-level disaggregation accuracy under dynamic flight scenarios. The findings underscore a critical accuracy–efficiency trade-off in NILM model selection, establishing that traditional ML algorithms can outperform complex DL models when optimized for real-time, resource-constrained environments. This research provides actionable design insights for next-generation solar-powered aircraft energy management systems, demonstrating that model selection must prioritize computational efficiency, predictive reliability, and real-time responsiveness to enable sustainable and intelligent aviation energy control. Introduction Solar-powered aviation represents a significant advancement in eco-friendly flight technology, utilizing solar energy to power aircraft and reduce reliance on fossil fuels. By harnessing solar energy, this approach can significantly lower operational costs, extend flight durations often exceeding 24 h for UAVs and enable sustainable multi-day operations1. However, this rapid expansion has intensified the demand for advanced power management systems capable of balancing variable energy supply and demand under the sector stringent weight and reliability constraints2. A primary challenge lies in managing the highly variable power requirements across different flight phases, which peak during takeoff and stabilize during cruising, while also accurately detecting transient load events3. A multi-layered strategy has emerged to address these challenges. Fundamentally, photovoltaic (PV) systems are strengthened through modeling and simulation to improve solar energy utilization and overall efficiency4,5. Operationally, performance is enhanced by aligning flight schedules with periods of optimal solar availability a strategy shown to reduce consumption by up to 30.84% and by directing solar power towards climbing and charging during peak sunlight hours3,6. These tactics are integrated through flight-phase-dependent Energy Management Systems (EMS) that optimize allocation across distinct operational phases, achieving outcomes like a 22.9% energy surplus and enabling lighter battery configurations7. This is complemented by optimizing the electrical system design to minimize excess capacity, further reducing aircraft weight, which is a decisive factor for efficiency8. At the system control level, solutions such as the integration of state machine control with droop control have been proposed to manage power allocation and ensure stable voltage in solar UAVs9. Despite these advancements, key challenges persist in scaling these systems for larger aircraft and maintaining efficiency under diverse environmental conditions. While EMS focuses on macro-level energy allocation, effective load monitoring at the component level is equally crucial for reliable power management. NILM is particularly advantageous in this context, as it estimates individual component consumption from aggregate system data without invasive sensors10. This can reduce wiring requirements by up to 30%, directly supporting the critical goal of weight minimization3. However, adapting NILM to aviation demands advanced time-series analysis to address variable equipment behavior, transient loads, and dynamic operational conditions10,11. This requirement is becoming increasingly critical with the growing complexity of modern hybrid-electric aircraft power systems, which necessitate advanced NILM frameworks to manage diverse energy sources and highly dynamic load profiles12. The adoption of NILM in aviation faces significant challenges related to computational weight, latency, and reliability. A principal hurdle is developing robust algorithms that maintain accuracy under dynamic operating conditions and with diverse load signatures13. This is particularly acute for DL models, which struggle to adapt to unpredictable environments due to their dependence on large, high-quality datasets and substantial computational resources14. Latency is another critical constraint, as the complex architectures of many NILM models are unsuitable for aviation real-time processing demands. To address these limitations, research has explored several pathways. Lightweight models, such as GraphNILM, utilize graph neural networks to reduce memory usage while maintaining performance, making them more suitable for aviation applications15. The successful deployment of NILM in aviation hinges on overcoming key challenges, including the exploration of promising but underutilized approaches like Federated Learning (FL), which could mitigate latency through decentralized, local data processing16. ML techniques, particularly robust traditional methods like Random Forest and XGBoost, significantly enhance NILM accuracy for precise energy management in real-world aviation scenarios17,18. RF has demonstrated high effectiveness, achieving an identification accuracy of 96.8% for multiple load states19 and an R-squared value of 0.87 in energy applications20, with performance further enhanced when combined with optimization techniques19. Similarly, XGBoost exhibits strong predictive capability for energy consumption17 and superior performance in short-term load forecasting, achieving a lower mean average percentage error than traditional methods21. Its efficiency in handling large datasets and integrating historical data features makes it highly valuable for predicting load patterns and optimizing resource allocation in complex systems like aviation22,23. In contrast, KNN is utilized for classifying loads based on active and reactive power characteristics. While it can enable effective energy consumption disaggregation potentially leading to behavioral changes that improve energy efficiency by up to 15%20 and can be adapted to forecast low-voltage loads under decentralized supply conditions24, it is generally less suited than RF or XGBoost for the high-dimensional and dynamic data typical of complex aviation environments. DL has been applied to NILM to capture time-dependent load variations, which are particularly significant in complex systems such as aviation25. Among DL models, Long Short-Term Memory (LSTM) networks are effective in modeling temporal dependencies in sequential data; however, their high computational requirements often limit real-time deployment26,27. To address these limitations, hybrid architectures have emerged. The CNN-LSTM framework, for instance, combines Convolutional Neural Networks (CNNs) for extracting local spatial features with LSTMs for modeling long-term temporal dependencies, achieving strong results such as 93.27% accuracy on benchmark datasets28. The selection of models in this comparative study was guided by the goal of evaluating a diverse range of algorithms under strict real-time constraints. Accordingly, both tree-based ensemble ML models and a hybrid DL model (CNN-LSTM) were included. The CNN-LSTM was chosen as the representative hybrid approach due to its proven ability to concurrently extract spatial and temporal features from time-series data, making it well-suited for NILM applications28. Although advanced sequence models such as Gated Recurrent Units (GRUs) and Transformers are also relevant, their investigation is deferred to future work to maintain the focus and scope of this benchmarking study. Recent advancements in NILM have incorporated sophisticated architectures to improve performance. The integration of attention mechanisms, such as bidirectional LSTM with attention, allows models to focus on critical time steps, thereby refining outputs and enhancing estimation accuracy29. Similarly, the use of multi-head attention to capture complex patterns and Focal Loss to address class imbalance has significantly boosted accuracy and F1-scores on low-frequency data24. More recently, transformer-based models and their hybrid variants have surpassed the performance of LSTMs, GRUs, and CNNs, achieving significant reductions in error metrics. To mitigate the computational demands of these complex models, techniques like structured pruning have been employed, reducing model size and computational load by up to 48.85%30. Despite these advancements, significant challenges persist. The effectiveness of advanced models is highly dependent on the availability of large volumes of high-quality training data. Furthermore, issues of generalizability across different datasets and the inherent complexity of decomposing multi-state appliance loads remain active research problems31. To address the unresolved challenge of modeling time-dependent appliance usage, the present study evaluates a hybrid CNN-LSTM framework against traditional ML for NILM in solar-powered aviation, leveraging its combined spatial and temporal modeling capabilities. The main contributions of this study are as follows: A systematic evaluation of six ML and DL models identifies KNN as the optimal solution for real-time applications, achieving an R² of 0.9403 with an execution time of just 0.20 s, thereby establishing a performance benchmark based on its superior accuracy-speed trade-off.Extensive hyperparameter tuning via GridSearchCV demonstrates that optimized traditional models like KNN can outperform complex DL architectures within real-time aviation environments, with KNN delivering higher accuracy at a fraction of the computational cost of the CNN-LSTM model (271.53 s), validating the proposed resource-aware methodology.The rigorous quantification of performance trade-offs in this study yields a critical insight for system designers, DL models despite excelling at complex patterns, are prohibitively costly for real-time deployment, providing a clear framework for model selection. A systematic evaluation of six ML and DL models identifies KNN as the optimal solution for real-time applications, achieving an R² of 0.9403 with an execution time of just 0.20 s, thereby establishing a performance benchmark based on its superior accuracy-speed trade-off. A systematic evaluation of six ML and DL models identifies KNN as the optimal solution for real-time applications, achieving an R² of 0.9403 with an execution time of just 0.20 s, thereby establishing a performance benchmark based on its superior accuracy-speed trade-off. Extensive hyperparameter tuning via GridSearchCV demonstrates that optimized traditional models like KNN can outperform complex DL architectures within real-time aviation environments, with KNN delivering higher accuracy at a fraction of the computational cost of the CNN-LSTM model (271.53 s), validating the proposed resource-aware methodology. Extensive hyperparameter tuning via GridSearchCV demonstrates that optimized traditional models like KNN can outperform complex DL architectures within real-time aviation environments, with KNN delivering higher accuracy at a fraction of the computational cost of the CNN-LSTM model (271.53 s), validating the proposed resource-aware methodology. The rigorous quantification of performance trade-offs in this study yields a critical insight for system designers, DL models despite excelling at complex patterns, are prohibitively costly for real-time deployment, providing a clear framework for model selection. The rigorous quantification of performance trade-offs in this study yields a critical insight for system designers, DL models despite excelling at complex patterns, are prohibitively costly for real-time deployment, providing a clear framework for model selection. Experiment The bus power control unit (BPCU) serves as a critical hub within the Aircraft Electrical Power System (EPS), engineered to consolidate heterogeneous power electronics to ensure stable and optimized energy distribution from generation sources. Its architecture incorporates DC/DC converters, DC/AC inverters, transformer rectifier units (TRUs), and energy storage subsystems, alongside advanced load regulation capabilities tailored for aviation operational demands. To address the unique challenges of solar-powered aircraft, a cable weight minimization strategy is proposed, leveraging Remote Power Distribution Units (RPDUs). These RPDUs are strategically positioned and energized via redundant three-phase feeders from the secondary power distribution unit (SPDU), optimizing spatial efficiency while accounting for distributed generation (DG) integration, system resilience, and mission-specific constraints32. To evaluate and refine this optimization, a sophisticated HIL simulation framework is employed to analyze both the overall active power output and the specific energy consumption patterns of individual appliances. This investigation combines real-time system modeling with physical control mechanisms by integrating Launchpad-F28379D DSP controllers and the advanced simulation capabilities of the Opal-RT simulator software. This setup enables an accurate and detailed examination of the PDS, providing insights into dynamic power demands and real-time load variations during aircraft operations. Figure 1 illustrates the experimental setup, showcasing the integration of the DSP controller with the Opal-RT system for real-time analysis. By replicating the dynamic power demands and load variations encountered during flight, this combined approach supports the development of more efficient and reliable solar-powered aircraft systems. The HIL environment was configured using the TI Launchpad-F28379D DSP coupled with a real-time simulation platform to emulate solar irradiance and electrical transients. The trained NILM models were executed on the DSP, receiving real-time sensor data streams (irradiance, voltage, current) identical to those in the simulated PV system. The HIL validation demonstrated close alignment between predicted and actual load power traces under dynamic irradiance levels at 0.5, 1.4, and 1.7 s, confirming model reliability and real-time consistency between software training and hardware operation. Fig. 1Experimental test: RT-lab real time simulator architecture. Experimental test: RT-lab real time simulator architecture. The implementation utilized the Texas instruments launchpad-F28379D DSPs, shown in Fig. 2, chosen for their dual-core C28x architecture and ability to support deterministic real-time execution. This platform offers the computational capability necessary for advanced control algorithms, aided by a built-in floating-point unit for efficient handling of complex operations and 150 ps high-resolution PWM modules that enable precise power converter regulation under dynamic flight conditions. System reliability was strengthened through a synchronized time-triggered architecture that employed the enhanced PWM modules as timing masters, while the analog interfaces incorporated anti-aliasing filters tailored to the aircraft’s sensor characteristics. Model training and evaluation for the intelligent control components were conducted on a desktop workstation (Intel Core i9, 3.8 GHz, 32 GB RAM) using Python 3.10, TensorFlow 2.12, and scikit-learn 1.3. The resulting trained models were deployed to the TI Launchpad-F28379D DSP for inference testing, where they produced consistent outputs with sub-2 ms latency. These results confirm the feasibility of integrating the proposed algorithms into embedded flight control hardware for real-time onboard energy management in solar-powered aviation. Fig. 2Texas instruments launchpad-F28379D DSPs. Texas instruments launchpad-F28379D DSPs. The meticulously regulated experimental setting is of paramount importance for the comprehensive validation of a multitude of power distribution methodologies, thereby ensuring that performance remains consistent and reliable across a diverse array of operational scenarios and conditions that may be encountered in practical applications. Furthermore, within the scope of this research, a systematic classification of six distinct onboard electrical appliances is undertaken, meticulously categorized based on their unique operational characteristics and load profiles, which facilitates an in-depth examination of the evolution of energy demand that occurs throughout the various phases of flight operations. This systematic approach not only augments the existing body of knowledge regarding the intricate behaviors associated with power consumption but also plays a significant role in informing and enhancing the strategies employed for effective power management within solar-powered aviation systems that are increasingly being developed and deployed in contemporary aeronautical engineering. Figure 2 provides a visual representation of the NILM system used to monitor aircraft power distribution and appliance analysis within aircraft PDS. The implementation of NILM within the aviation sector affords immediate analytics concerning energy consumption, thereby facilitating effective energy management and fault identification without necessitating extensive physical alterations. By curtailing the amount of wiring, NILM contributes to a reduction in the overall weight of the aircraft, encourages predictive maintenance through the early identification of faults, enhances safety measures, optimizes power allocation, and diminishes operational expenses10. Its compatibility with pre-existing monitoring frameworks ensures a fluid data gathering process, providing critical insights that can enhance system performance and maintenance strategy. These benefits render NILM a viable approach to augmenting the dependability and efficiency of contemporary aviation systems. Fig. 3NILM system for aircraft power distribution and appliance analysis. NILM system for aircraft power distribution and appliance analysis. Based on a comprehensive and meticulous analysis of the intricate patterns associated with power consumption in solar-powered aircraft, it is noteworthy that Fig. 3 serves as a visual representation that illustrates the total active power consumption throughout a simulated flight duration of 240 min, effectively capturing the major flight phases which include but are not limited to: engine start, taxi, takeoff, cruise, and landing. During the initial engine start phase, it is observed that power consumption commences at a relatively low level; however, it subsequently experiences a sharp and significant increase as various on-board systems are activated in conjunction with the firing of the engine, leading to a heightened demand for power. The taxing phase, in contrast, displays a stabilization of power consumption at an intermediate level, which is principally driven by the operational requirements of taxi and navigation lights that are essential for safe ground movement. As the aircraft transitions into the takeoff phase, a considerable and pronounced increase in power demand is observed, which is indicative of the maximum engine thrust being exerted and the activation of critical systems that are vital for flight safety, such as landing lights and essential control mechanisms. During the cruise phase, the power consumption appears to stabilize at a higher plateau, which represents the continuous operational demands of various systems including air conditioning, avionics, and propulsion systems that are integral to maintaining flight conditions. Lastly, throughout the landing phase, power consumption exhibits fluctuations as numerous systems, including but not limited to landing gear, lights, and braking mechanisms, engage sequentially; a detailed analysis reveals the variations in power demand across the different flight phases, thereby emphasizing the critical necessity for precise distribution strategies to ensure reliable and optimal aircraft performance. Fig. 4Total active power profile during flight scenario. Total active power profile during flight scenario. The normalized active power consumption profiles in Fig. 4 illustrate the distinct operational dynamics and characteristic behaviors of six onboard appliances. The Air Conditioner and Heater exhibit relatively smooth power curves, indicating steady-state behavior with gradual changes. In contrast, appliances such as the Landing Gear and Taxi Light show sharp, short-duration spikes, reflecting abrupt transitions typical of mechanical actuation or simple ON/OFF switching. The Navigation Light presents intermittent yet consistent patterns, while the Landing Light maintains a stable signal with minor fluctuations. These signatures form the foundation for effective NILM, as they provide identifiable patterns that models can exploit for appliance-level disaggregation. The clear temporal and amplitude variations across appliances support the argument for using ML techniques that can capture both transient and steady-state characteristics in power signals. Fig. 5Appliance-specific active power signatures. Appliance-specific active power signatures. Methodology Time-series data and appliance profiling The choice of algorithm in NILM systems depends on several factors, including the complexity of the task, the number and types of onboard appliances, the variability of their power consumption patterns, and the availability of labeled training data for effective model learning and classification. In the context of solar-powered aircraft, this study categorizes six onboard appliances into four distinct types based on their operational characteristics and energy usage profiles within the aircraft energy management system23: Type I: Landing and taxi lights, which function in simple ON/OFF modes without requiring complex power modulation.Type II: Air conditioners and heaters, which operate in multiple discrete modes with varying energy demands depending on environmental conditions and control settings.Type III: Navigation lights, which exhibit continuously variable power consumption, allowing dynamic adjustment based on operational requirements.Type IV: Landing gear systems, characterized by changing energy demands throughout continuous operational phases, particularly during deployment and retraction. Type I: Landing and taxi lights, which function in simple ON/OFF modes without requiring complex power modulation. Type I: Landing and taxi lights, which function in simple ON/OFF modes without requiring complex power modulation. Type II: Air conditioners and heaters, which operate in multiple discrete modes with varying energy demands depending on environmental conditions and control settings. Type II: Air conditioners and heaters, which operate in multiple discrete modes with varying energy demands depending on environmental conditions and control settings. Type III: Navigation lights, which exhibit continuously variable power consumption, allowing dynamic adjustment based on operational requirements. Type III: Navigation lights, which exhibit continuously variable power consumption, allowing dynamic adjustment based on operational requirements. Type IV: Landing gear systems, characterized by changing energy demands throughout continuous operational phases, particularly during deployment and retraction. Type IV: Landing gear systems, characterized by changing energy demands throughout continuous operational phases, particularly during deployment and retraction. High-resolution power data was collected over a simulated 4-hour flight using a HIL setup operating at a 200 kHz sampling rate. This configuration provided precise synchronization and enabled the capture of transient behaviors essential for detecting state transitions and distinguishing appliances with overlapping power profiles. The analysis examined both transient features associated with mode changes and steady-state variables such as active power, reactive power, current, and voltage. Among these, active power showed the strongest linear correlation with total power consumption and consistently ranked highest in feature importance across tree-based models. Although harmonics and phase angle offered limited discriminative value for some appliances, their overall contribution was marginal and introduced unnecessary complexity. To maintain simplicity and computational efficiency—key requirements for real-time deployment—the final models were developed using active power as the primary feature. The total aggregated power consumption, Ptotal(t) measured at the main power line, served as the input for the disaggregation process, as defined in Eqs. (1) − (5)33.1\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${P_{total}}\left( t \right)=\sum\limits_{{i=1}}^{N} {Pi\left( t \right)} + \in \left( t \right)$$\end{document} In this process, the total power Ptotal(t) is modeled as the sum of the power consumption of individual appliances Pi(t), and a noise component ϵ(t), which accounts for measurement noise or unmodeled loads. Mode changes in appliances, such as start-up events, provide critical data for identifying energy consumption patterns. High-frequency energy data can reveal distinct signatures for different appliances event detection methodologies were used to identify significant transitions in power, such as ON/OFF states and variations in intensity indicative of appliance activity34. This was achieved by analyzing the instantaneous power difference, as described in Eqs. (2 )− (5):2\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\Delta P\left( t \right)=P\left( {t+\Delta t} \right)-P\left( {t-\Delta t} \right)$$\end{document} Where Δt represents the sampling interval, and an event was flagged when the power difference ΔP (t) exceeded a predefined threshold θ. To reduce false positives caused by noise, hysteresis thresholds or ML classifiers were applied. High-frequency data acquisition has proven essential for accurate event detection, especially for appliances that exhibit rapid switching or sharp fluctuations in power consumption. The increased sampling resolution enables the precise identification of transient events such as on/off switching and sudden power surges in high-power devices like motors or compressors that may be missed with lower sampling rates. By providing more data points per cycle, high-sampled data improves the detection of abrupt changes in the power signal, which is critical for effective load identification and disaggregation in NILM systems, particularly in environments with dynamic or high-frequency switching loads. This fine-grained data not only enhances event detection but also supports ML and DL models in capturing complex appliance behaviors during model training. The ability to accurately track transient states enables better differentiation between appliances with similar power signatures, thereby increasing disaggregation accuracy. Furthermore, a detailed correlation analysis identified active power as the feature most closely related to total power consumption, guiding effective feature selection for model development. This analysis also revealed the limitations of basic models, such as linear regression, in capturing nonlinear and time-dependent patterns of energy use, especially when dealing with overlapping load profiles. These findings underscore the need for more sophisticated modeling techniques capable of handling the complexities inherent in real-world energy monitoring systems33. Data preprocessing and feature selection This specific section carefully outlines the advanced preprocessing and feature extraction techniques utilized to comprehensively examine both transient and steady-state behaviors, which play a vital role in enhancing the precision and dependability of power management systems. The thorough process involves several distinct steps, including the critical stages of data collection, preprocessing, and the application of smoothing methods designed to refine the dataset, thereby enabling the efficient training of the NILM model. To accurately capture the complex variations found in active power measurements, the dataset is meticulously collected at a significantly high sampling rate, ensuring that the subtleties of the data are maintained. High-resolution data acquisition frequently brings forth significant noise and unnecessary variations, which conceal the true performance of the monitored devices. To tackle these obstacles, a preprocessing phase is employed to minimize noise and streamline the dataset, improving its readiness for subsequent analysis and interpretation. This preprocessing encompasses two primary techniques: data smoothing and non-overlapping moving average down sampling, both executed using MATLAB. The smoothing technique mitigates high-frequency noise and anomalies in the raw signal, enabling the fundamental device behavior to become more apparent. A particularly effective approach for smoothing active power measurements is the moving average, mathematically representing the output signal y (t) as the average of values within a specified window.3\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$y\left( t \right)=\frac{1}{N}\sum\limits_{{i=1}}^{{N-1}} {x\left( {t-i} \right)}$$\end{document} Where y (t) represents the smoothed output signal at time t, while x (t) denotes the original input signal at the same time. N refers to the window size, or the number of samples to be averaged, and i is the index of the data points within the window. The choice of window size N affects how much the signal is smoothed. A smaller window allows the method to follow quick variations in the signal, which is useful when detailed transitions are important, though some noise will remain. While a larger window offers greater noise reduction, it can blur sharp transitions and cause a delay, as exemplified by a 5-sample window on a 200 kHz signal, which creates a 25 µs average that provides slight smoothing without sacrificing the tracking of rapid variations. Following smoothing, the dataset is downsampled via a non-overlapping moving average, a technique that refines the signal by dividing it into fixed-size segments, computing each segment average without overlap to suppress high-frequency noise while preserving the underlying signal trend.4\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${y_d}\left( t \right)=\frac{1}{M}\sum\limits_{{J=1}}^{{M-1}} {x\left( {nM+j} \right)}$$\end{document} Where yd (n) is the down sampled output, x represents the smoothed signal, M is the down sampling factor (number of samples to average), and n indicates the new time index after down sampling. This down sampling step reduces the size of the dataset, which helps speed up processing without losing the key timing information needed for analysis. Because the moving average has linear time complexity, it remains efficient even for large datasets making it practical for real-time monitoring. In NILM tasks, preprocessing in this way improves appliance detection by reducing the impact of noise during feature extraction. The integration of smoothing and downsampling produces a refined dataset that enhances grid stability analysis through reliable power demand tracking, provides a stable basis for energy consumption modeling, and improves the accuracy of appliance-level estimation to support efficient real-time system performance. The downsampling step reduces dataset size, accelerating processing while preserving the essential timing information required for analysis. Combined with a moving average filter—whose linear time complexity ensures computational efficiency even for large datasets—this approach remains suitable for real-time monitoring. In NILM applications, such preprocessing enhances appliance detection by minimizing noise during feature extraction. The integration of smoothing and downsampling produces a refined dataset that supports accurate power demand tracking, strengthens grid stability analysis, and provides a reliable basis for energy consumption modeling and appliance-level estimation. The preprocessing pipeline was quantitatively evaluated by measuring its effect on transient preservation through event detection rates. In the raw 200 kHz signal, approximately 98% of appliance state transitions were detected, and after applying the moving average filter and downsampling, the detection rate remained high at 95%. This confirms that the pipeline effectively suppresses high-frequency noise while retaining the transient features required for accurate NILM. To maintain the temporal integrity of the flight data, the dataset was partitioned chronologically for model evaluation: a 90% training and 10% testing split was used for conventional machine learning models, while deep learning models employed an 88% training and 12% testing split after restructuring the sequential data into time-lagged samples without disrupting temporal order. ML techniques and hyperparameter configuration This research employs ML models—specifically RF, KNN, and XGBoost to predict energy usage patterns and capture nonlinear relationships in steady-state characteristics. In parallel, advanced DL architectures such as the CNN-LSTM are utilized to model both spatial and temporal dependencies, enabling accurate load disaggregation and detection of transient behaviors in solar-powered aircraft. Hyperparameter tuning is essential for maximizing the predictive performance of the models. This study used GridSearchCV to conduct exhaustive parameter searches combined with cross-validation (CV)35, targeting the minimization of Mean Squared Error (MSE) on the validation set. A 5-fold cross-validation scheme with negative MSE as the scoring metric was applied to achieve a balanced bias–variance trade-off and ensure strong generalization across different data subsets while keeping computational cost manageable. The computational characteristics of each model family also shaped their suitability for deployment. KNN requires minimal training but its inference time grows with dataset size. Tree-based ensembles provide fast, stable inference, making them appropriate for real-time systems. In contrast, deep learning models such as CNN-LSTM incur significant computational load during both training and inference, reducing their feasibility for resource-constrained embedded platforms. RF The process of hyperparameter optimization in RF regression constitutes an essential component that can markedly improve the predictive efficacy of the model. This process involves optimizing various parameters such as the number of trees, tree depth, and the number of features considered for splitting at each node. Different strategies and methodologies proposed efficiently tune these hyperparameter, each with its own advantages and limitations36. KNN Regression necessitates meticulous hyperparameter optimization for enhanced efficacy. Crucial hyperparameter encompass the count of neighbors (k) and the distance metric (DM). Research indicates that the choice of these parameters significantly influences the model accuracy, particularly in relation to dataset characteristics. The optimal configuration for KNN regression influenced by factors such as sample size and the number of attributes, with specific recommendations for effective tuning37. XGBoost The implementation of XGBoost regression accompanied by hyperparameter optimization constitutes a robust methodology for augmenting predictive efficacy across diverse fields. Hyperparameter optimization involves fine-tuning key parameters such as learning rate, maximum depth, and subsample to enhance the operational performance of the XGBoost model, which can be achieved using techniques like GridSearchCV and RandomizedSearchCV38. Linear regression A fundamental statistical technique, linear regression models the relationship between predictor variables and a response variable by minimizing squared residuals to make predictions based on known data. This method has evolved with the advent of big data, leading to various enhancements and applications in diverse fields, including data science and nursing research39. Lasso regression Or least absolute shrinkage and selection operator, is a powerful statistical method used for feature selection and regularization in high-dimensional datasets. Its effectiveness and versatility in reducing overfitting by penalizing coefficients to promote sparsity is demonstrated by successful applications across various domains, including cancer diagnosis and sales prediction40. LSTM Networks have emerged as a powerful tool in NILM, enhancing the accuracy and efficiency of energy disaggregation. By leveraging LSTM ability to capture temporal dependencies in time-series data, researchers have developed various models that significantly improve appliance identification and energy consumption forecasting41. CNN-LSTM Hybrid architecture was selected for the regression model to effectively handle complex time-series data. This design leverages the complementary strengths of each network, the CNN excels at extracting short-term, local spatial features, while the LSTM network models long-range temporal dependencies. Comparative analysis against GRU and Transformer variants demonstrated that the hybrid model achieved comparable accuracy with significantly lower computational overhead. This efficiency makes it particularly suitable for deployment on DSPs in real-time flight applications, aligning with its proven promise across other demanding fields such as telecommunications, healthcare, and robotics42. Capabilities and constraints of different models are explained in Table 1. Table 1Capabilities and constraints of different models25,43.ModelAdvantageDisadvantageKNNSuitable for multi-class problems, simple implementation, no training requiredProne to noise and irrelevant features, relies on k-value tuning, high memory usage, and poor interpretabilityRFHigh accuracy, robust to noise and overfitting, good generalization abilityIncreased number of trees slows down the model, memory-intensiveXGBoostHigh performance on complex datasets, handles missing data, includes built-in regularization techniquesHigh computational cost, sensitive to hyperparameter tuningLinear regressionSimple implementation, interpretable, efficient on smaller datasetsProne to multicollinearity, performs poorly on non-linear relationshipsLasso regressionPerforms feature selection by shrinking coefficients, reduces multicollinearity issuesMay discard useful features, sensitive to outliersLSTMEffective in capturing temporal dependencies, suitable for sequential and time-series data, flexible for various architecturesRequires significant computational resources, sensitive to vanishing gradient problems, and needs careful tuningCNN-LSTMCombines spatial feature extraction (CNN) and temporal dependency modeling (LSTM), suitable for spatiotemporal data, robust to sequence variationsComputationally expensive, long training times, prone to overfitting with small datasets, and challenging to tune due to its hybrid structure. Table 1Capabilities and constraints of different models25,43.ModelAdvantageDisadvantageKNNSuitable for multi-class problems, simple implementation, no training requiredProne to noise and irrelevant features, relies on k-value tuning, high memory usage, and poor interpretabilityRFHigh accuracy, robust to noise and overfitting, good generalization abilityIncreased number of trees slows down the model, memory-intensiveXGBoostHigh performance on complex datasets, handles missing data, includes built-in regularization techniquesHigh computational cost, sensitive to hyperparameter tuningLinear regressionSimple implementation, interpretable, efficient on smaller datasetsProne to multicollinearity, performs poorly on non-linear relationshipsLasso regressionPerforms feature selection by shrinking coefficients, reduces multicollinearity issuesMay discard useful features, sensitive to outliersLSTMEffective in capturing temporal dependencies, suitable for sequential and time-series data, flexible for various architecturesRequires significant computational resources, sensitive to vanishing gradient problems, and needs careful tuningCNN-LSTMCombines spatial feature extraction (CNN) and temporal dependency modeling (LSTM), suitable for spatiotemporal data, robust to sequence variationsComputationally expensive, long training times, prone to overfitting with small datasets, and challenging to tune due to its hybrid structure. Capabilities and constraints of different models25,43. Evaluation metrics The assessment of energy disaggregation performance conducted by determining the discrepancy between the estimated energy consumption and the actual energy consumption, often referred to as the ground truth. Metrics such as MSE, MAE, and R² serve as critical indicators for the evaluation of model efficacy. Each of these metrics offers distinct perspectives on the precision and dependability of the predictive outcomes. MSE Statistical measure used to quantify the difference between values predicted by a model and the actual values observed. It is particularly significant in fields such as artificial intelligence, signal processing, and experimental design. The following sections elaborate on its applications, calculation methods, and implications44. 5\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$MSE = \frac{1}{n}\sum\limits_{{i = 1}}^{n} {\left( {y_{i} - \hat{y}_{i} } \right)^{2} }$$\end{document} Where yi is the actual value, \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${\hat{y}_{i} }$$\end{document} is the predicted value, and n is the number of observations. MAE Is a widely utilized metric for assessing the accuracy of quantitative models, particularly in contexts where interpretability is crucial. Unlike the MSE, MAE provides a straightforward measure of average error by calculating the absolute differences between predicted and observed values. This metric decomposed into three components: bias error, proportionality error, and unsystematic error, offering deeper insights into model performance45.6\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$MAE = \frac{1}{n}\sum\limits_{{i = 1}}^{n} {\left| {y_{i} - \hat{y}_{i} } \right|}$$\end{document} R2 Is a widely used statistical measure that indicates the proportion of variance in the dependent variable that explained by the independent variables in a regression model. However, its interpretation can be misleading, as it often overstates the true proportion of variance explained and can vary significantly across different modeling contexts. This overview will explore the nuances of R², its applications in various models, and the implications of its misinterpretation46, where \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathop {{y_i}}\limits^{ - }$$\end{document} is the mean of the actual values.7\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$R^{2} = 1 - \frac{{\sum\limits_{{i = 1}}^{n} {\left( {y_{i} - \hat{y}_{i} } \right)} }}{{\sum\limits_{{i = 1}}^{n} {\left( {y_{i} - \overline{{y_{i} }} } \right)} ^{2} }}^{2}$$\end{document} Results and discussion This section presents a comprehensive evaluation of the six ML and DL models for NILM in a solar-powered aviation context. The analysis is structured to first understand the dataset characteristics, then assess overall model performance, and finally, delve into a detailed comparative analysis of the most and least promising algorithms to elucidate their operational trade-offs. Optimized model configurations from hyperparameter tuning A systematic hyperparameter optimization was conducted via GridSearchCV to ensure a fair and robust comparison across all models. The resulting optimal configurations, detailed in Tables 2 and 3, provide insight into how each model was tailored to the high-frequency aviation power data. The optimal parameters reveal strategies to balance complexity and generalizability. For KNN, the best performance was achieved with n_neighbors = 7 and the distance weight function, suggesting that the local power load features have a meaningful spatial structure that can be captured without being overly sensitive to noise. For the ensemble methods, RF performed best with a large number of trees (n_estimators = 150) but relatively shallow trees (max_depth = 11), indicating a strategy of using many weak learners. Similarly, XGBoost opted for a very shallow tree depth (max_depth = 3) and a high learning_rate of 0.1, favoring an aggressive, computationally efficient learning process. Table 2Algorithm parameters and hyperparameter.AlgorithmParametersHyperparametersDomain spaceOptimizationLow limitUpper limitRFN estimators20200150max depth32011min_samples_split252min_samples_leaf122KNNN_neighbors3157AlgorithmAuto, ball_treekd_tree, bruteAutoWeightsUniformDistanceDistanceXGBoostN estimators20250150Max depth3113Learning rate0.010.10.1 Table 2Algorithm parameters and hyperparameter.AlgorithmParametersHyperparametersDomain spaceOptimizationLow limitUpper limitRFN estimators20200150max depth32011min_samples_split252min_samples_leaf122KNNN_neighbors3157AlgorithmAuto, ball_treekd_tree, bruteAutoWeightsUniformDistanceDistanceXGBoostN estimators20250150Max depth3113Learning rate0.010.10.1 Algorithm parameters and hyperparameter. The optimized CNN-LSTM architecture in Table 3 reflects a balanced design for spatiotemporal feature extraction. The Conv1D layer with 64 filters and a kernel size of 3 is sufficient to capture local patterns in the power signal without over-parameterization. The two subsequent LSTM layers, each with 100 hidden units, provide adequate memory depth to model temporal dependencies across flight phases. The consistent use of dropout (rate = 0.2) after each LSTM layer was crucial to prevent overfitting, a common risk with complex models on limited data. The final configuration, trained with the Adam optimizer at a learning rate of 0.001, represents a robust setup that effectively leverages the complementary strengths of CNNs and LSTMs, as evidenced by its superior accuracy, albeit at a high computational cost. Table 3Parameter configuration for CNN-LSTM hybrid model.LayerParameterSearch rangeOptimal valueConv1DFilters32, 64, 12864Kernel size2, 3, 53MaxPooling1DPool size2, 32LSTM 1Hidden Units50,100,150,200100DropoutDropout rate0.1, 0.2, 0.3, 0.40.2LSTM 2Hidden Units50,100,150,200100DropoutDropout rate0.1, 0.2, 0.3, 0.40.2DenseNeurons32,64,12864Model compilationLearning rate0.1, 0.01, 0.001, 0.0050.001Optimization solverAdam, SGDAdamTrainingBatch size16, 32, 6432Number of epochs100, 200, 500300Model evaluationLoss functionMSE, MAE, HuberMSE Table 3Parameter configuration for CNN-LSTM hybrid model.LayerParameterSearch rangeOptimal valueConv1DFilters32, 64, 12864Kernel size2, 3, 53MaxPooling1DPool size2, 32LSTM 1Hidden Units50,100,150,200100DropoutDropout rate0.1, 0.2, 0.3, 0.40.2LSTM 2Hidden Units50,100,150,200100DropoutDropout rate0.1, 0.2, 0.3, 0.40.2DenseNeurons32,64,12864Model compilationLearning rate0.1, 0.01, 0.001, 0.0050.001Optimization solverAdam, SGDAdamTrainingBatch size16, 32, 6432Number of epochs100, 200, 500300Model evaluationLoss functionMSE, MAE, HuberMSE Parameter configuration for CNN-LSTM hybrid model. The foundation for effective NILM lies in the distinct, identifiable signatures of individual appliances. Our analysis of the high-resolution power data revealed clear operational patterns. Appliances like the Landing Gear and Taxi Light exhibited sharp, short-duration spikes characteristic of ON/OFF switching, while the Air Conditioner and Heater showed smoother, steady-state power curves. A correlation heatmap in Fig. 5 provides critical insights for model development. The Air Conditioner demonstrated a dominant influence, with a strong positive correlation of 0.94 to the total power profile. In contrast, the Taxi Light showed a significant inverse relationship with both total power (-0.53) and the Air Conditioner (-0.72), suggesting mutually exclusive operational patterns. Other appliances, such as the Heater (0.24), exhibited weaker correlations, indicating more sporadic usage. These findings guided our feature selection by highlighting which appliances drive overall consumption and which present a greater challenge for disaggregation. Fig. 6Correlation heatmap between total power and appliance power. Correlation heatmap between total power and appliance power. Furthermore, event detection analysis applied to the aggregate power signal successfully identified appliance state transitions with good temporal accuracy shown in (Fig. 6). The system captured the repetitive dips associated with cyclic loads (e.g., Air Conditioner) and abrupt changes from ON/OFF devices, confirming its sensitivity and fundamental utility for the disaggregation task. Fig. 7Event detection via ΔP (t) on total power signal. Event detection via ΔP (t) on total power signal. Overall model performance and the accuracy-speed trade-off The primary objective was to identify a model that balances predictive accuracy with computational efficiency for real-time aviation constraints. The results, summarized in Table 4, reveal a clear trade-off. For real-time NILM, KNN emerged as the optimal candidate. It achieved the highest accuracy among the lightweight models (R² = 0.9403) while requiring a minimal execution time of only 0.20 s. While RF maintained comparable accuracy (R² = 0.9240), its ensemble structure incurred a significantly higher computational cost (22.62 s). XGBoost was also more intensive, diminishing its suitability for time-sensitive applications. The statistical results confirm the robustness of our findings. Specifically, the 95% confidence interval (CI) for KNN (0.938–0.943) does not overlap with those of Random Forest (0.921–0.927) or XGBoost (0.907–0.916). This clear separation provides strong statistical evidence that KNN’s superior performance is consistent and not due to random chance in a single train-test split, thereby substantiating our claim that it is the top-performing model for this specific task. In stark contrast, the deep learning models demonstrated superior pattern recognition capability, with the hybrid CNN-LSTM achieving the lowest MSE of 0.0048. However, this came at a prohibitive computational cost (271.53 s), rendering them unsuitable for real-time deployment on standard hardware. At the other extreme, linear models were computationally fastest but failed entirely to model the non-linear load patterns, achieving negligible R² values lower than 0.2179. Table 4The evaluation metrics for each model.ModelMSEMAE R 2 R2 (95% CI)Execution time (Sec)Prediction time (Sec)RF0.000560.00620.92400.921–0.92722.620.028KNN0.00090.00690.94030.938–0.9430.200.006XGBoost0.00320.01240.91130.907–0.9169.380.004Linear Regression0.06950.15820.21790.210–0.2260.040.001Lasso Regression0.07830.18040.01230.005–0.0200.060.0001LSTM0.00620.02240.85430.850–0.859189.921.22CNN-LSTM0.00480.020.87270.868–0.877271.530.96 Table 4The evaluation metrics for each model.ModelMSEMAE R 2 R2 (95% CI)Execution time (Sec)Prediction time (Sec)RF0.000560.00620.92400.921–0.92722.620.028KNN0.00090.00690.94030.938–0.9430.200.006XGBoost0.00320.01240.91130.907–0.9169.380.004Linear Regression0.06950.15820.21790.210–0.2260.040.001Lasso Regression0.07830.18040.01230.005–0.0200.060.0001LSTM0.00620.02240.85430.850–0.859189.921.22CNN-LSTM0.00480.020.87270.868–0.877271.530.96 The evaluation metrics for each model. The comparative analysis of ML models, illustrated in Fig. 7, reveals that ensemble methods like RF and KNN excel at power load disaggregation due to their ability to model non-linear relationships. This strength stands in direct contrast to linear models, which performed poorly, underscoring their limitation in handling the complex patterns inherent in power consumption data for solar-powered systems. Fig. 8Bar plots comparing MSE, MAE, and R2 values across all models. Bar plots comparing MSE, MAE, and R2 values across all models. The distribution of predictions, visualized via Kernel density estimation (KDE) plots in (Fig. 8), provides a nuanced view of model performance. Non-linear models like RF and KNN showed a close alignment between predicted and actual distributions, particularly for appliances with consistent usage. Linear models, as expected, failed to capture the actual density distributions for most appliances. Fig. 9KDE plots showing the distribution of actual vs. predicted values for ML models. KDE plots showing the distribution of actual vs. predicted values for ML models. The lightweight NILM model, validated with a 2 ms inference time on aviation-grade hardware, can be seamlessly integrated into the aircraft Flight EMS. By providing appliance-level power disaggregation, it enables advanced control actions such as dynamic load shedding temporarily reducing non-critical loads during high-demand phases and supports accurate load forecasting for optimized battery charge and discharge cycles. This integration improves energy utilization, extends battery life, and strengthens the overall safety and efficiency of solar-powered aviation. A direct comparison of the best lightweight model (KNN) and the most accurate model (CNN-LSTM) highlights their fundamental differences in Figs. 9 and 10). The KNN model effectively identifies major ON/OFF states but produces a blocky, step-like output that struggles with rapid fluctuations and often misses short bursts of activity. Conversely, the CNN-LSTM model demonstrates superior temporal sensitivity, closely tracking high-frequency changes and providing dynamic, responsive predictions for appliances with repetitive patterns. However, it also tends to smooth peak values during rare, high-power events. Fig. 10KNN model predictions vs. actual power consumption for various appliances. KNN model predictions vs. actual power consumption for various appliances. Fig. 11CNN-LSTM model predictions vs. actual power consumption for various appliances. CNN-LSTM model predictions vs. actual power consumption for various appliances. Figure 11 demonstrates the superior performance of the hybrid CNN-LSTM model over the standalone LSTM, as evidenced by its consistently lower training and validation loss across various appliances. This indicates an enhanced capacity to learn and generalize complex appliance-specific patterns by effectively capturing both spatial and temporal dependencies in the data. The CNN-LSTM lower loss aligns with its previously noted higher accuracy and lower MSE, justifying its longer execution time. Consequently, despite the computational cost, the CNN-LSTM robustness against overfitting and its improved prediction accuracy make it the more suitable model for disaggregating the power consumption of intricate appliances. Fig. 12LSTM and CNN-LSTM networks training and validation loss errors for the appliances. LSTM and CNN-LSTM networks training and validation loss errors for the appliances. To further interrogate the CNN-LSTM’s performance, the distribution of its prediction errors for each appliance is shown in Fig. 12. This analysis reveals a clear distinction in the models reliability. It demonstrates high proficiency for appliances with stable consumption, such as the Heater, Landing Gear, and Navigation Light, as evidenced by their consistently low and tightly clustered errors. In contrast, the Landing Light and Taxi Light exhibit significantly higher median errors and wider variability, indicating persistent challenges in predicting their transient, high-power, or irregular usage patterns. The presence of numerous outliers for these appliances underscores occasional significant mispredictions, likely due to rapid state transitions or overlapping operational states with other loads. This finding is critical for system design: it confirms that even the most accurate models struggle with specific dynamic loads, highlighting an inherent challenge in aviation NILM and suggesting that a hybrid approach or post-processing may be necessary for appliances with the most complex signatures. Fig. 13Appliance-wise MAE for CNN-LSTM model. Appliance-wise MAE for CNN-LSTM model. ROC analysis in Figs. 13 and 14 confirms the superior classification performance of the LSTM-CNN model over KNN for aircraft appliance power states. Leveraging its inherent strength in learning temporal dependencies, the hybrid CNN-LSTM model consistently outperformed KNN by 4% in average AUC (0.89), achieving near-perfect classification (AUC = 0.94) for appliances with regular cycles like the Navigation Light. In contrast, KNN instance-based approach struggled to model the non-linear, intermittent patterns of loads like the Heater. While KNN remains valuable for rapid prototyping due to its computational efficiency, the LSTM-CNN is the recommended choice for deployment. Its performance could be further enhanced through targeted optimizations, such as applying dynamic thresholding for weaker classifiers. Fig. 14ROC curves for multi-appliance classification using KNN. ROC curves for multi-appliance classification using KNN. Fig. 15ROC curves for multi-appliance classification using hybrid CNN-LSTM architecture. ROC curves for multi-appliance classification using hybrid CNN-LSTM architecture. As illustrated in Fig. 15, the ROC curves demonstrate the classification performance of the Hybrid CNN-LSTM architecture. The experimental results reveal a clear trade-off between model complexity and computational efficiency. KNN consistently demonstrated strong suitability for real-time applications, achieving high predictive accuracy (R² = 0.9403) with execution times two orders of magnitude faster than deep learning models. Its superior performance is attributed to the dataset’s low-dimensional nature and smooth temporal transitions; because KNN relies on direct distance comparisons between power signatures, it adapts well to localized consumption variations, yielding higher R² values than ensemble methods. In contrast, the hybrid CNN-LSTM model—though computationally demanding—excelled at capturing complex temporal dynamics and achieved the lowest error (MSE = 0.0048), supporting its role as a powerful tool for offline analysis. Conclusion This research provides a comprehensive evaluation of multiple ML and DL algorithms for NILM in solar-powered aviation, introducing a resource-aware framework that balances predictive accuracy with computational feasibility under stringent aerospace constraints. Leveraging high-resolution (200 kHz) power data and rigorous hyperparameter optimization via GridSearchCV, the study establishes quantitative benchmarks for NILM performance in real-time aviation environments, revealing a clear trade-off between accuracy and computational efficiency. For real-time onboard energy management where latency, weight, and processor capability are critical KNN demonstrated an optimal compromise, achieving an R² of 0.9403 with a minimal execution time of 0.20 s, confirming its suitability for embedded aviation controllers. In contrast, while the hybrid CNN-LSTM deep learning model achieved the lowest MSE (0.0048) by capturing complex temporal patterns and detailed features during offline diagnostic and design-phase tasks, its 271.53-second computational overhead demonstrates that well-optimized traditional machine learning models can match or outperform deep learning in accuracy-to-efficiency trade-offs in resource-constrained settings. HIL validation on Opal-RT and TI Launchpad-F28379D DSP platforms further demonstrated the practical feasibility of the framework, enabling accurate appliance-level disaggregation and robust adaptability to dynamic flight-phase transitions. The KNN model, in particular, achieved a 2 ms inference time on the DSP, reinforcing its suitability for real-time embedded deployment. Collectively, these findings establish resource-awareness as a guiding principle for NILM in aviation and support a hybrid deployment strategy: lightweight ML models like KNN for onboard real-time operation, complemented by sophisticated DL architectures such as CNN-LSTM for ground-based analysis and system design. Building on this foundation, future work will extend the framework to larger aircraft with complex load profiles, assess scalable approaches such as ensemble models (RF, LightGBM) on diverse embedded platforms, and investigate federated learning for privacy-preserving updates, providing practical design guidelines for computationally efficient, sustainable energy management systems and advancing autonomous, long-endurance solar-powered and next-generation electrified aviation.