Abstract
In this study, we research the design and implementation of a co-simulation platform for wireless networked control systems (WNCS) based on Simulink and OPNET. The platform utilizes Simulink to model real-time control dynamics and OPNET to simulate network performance. Communication between the two environments is facilitated via the MATLAB engine interface. By combining the strengths of both tools, the platform enables more authentic simulation of wireless channels, accounting for physical-layer impacts on control models. The effectiveness of this approach is demonstrated through a simulation example, proving that the co-simulation platform overcomes the limitations of idealistic network models.
Introduction
Wireless Networked Control Systems (WNCS) are essential for modern automation, enabling communication between sensors, controllers, and actuators without physical wiring. However, wireless channels introduce significant challenges, including random delays, packet loss, and timing jitter. Traditionally, control engineers and network engineers have worked in isolation. Control engineers often use Simulink, which excels at dynamic system modeling but treats networks as "ideal" pipes. Conversely, network engineers use OPNET for high-fidelity protocol simulation but lack robust tools for complex control loops. This research addresses the need for a unified platform that simultaneously simulates both the physical control object and the realistic "messiness" of wireless communication.
Co-Simulation Architecture
The developed platform employs a master-slave architecture where OPNET acts as the master and Simulink as the slave. The integration is achieved through the MATLAB Engine Interface, allowing OPNET (written in C/C++) to invoke MATLAB commands and exchange variables in the background. This approach avoids the complexity of High-Level Architecture (HLA) middleware while maintaining high fidelity.
Synchronization and Enhanced Modeling
A primary challenge in co-simulation is synchronizing Simulink’s time-driven (continuous) nature with OPNET’s discrete event-driven nature. The researchers implemented a "pause-and-play" logic to maintain temporal consistency.
As shown in the timing diagram, OPNET advances to a sampling time ($T_1$), triggers Simulink to calculate the plant state, reads the data to generate a network packet, and simulates network delay before passing the control signal back. Furthermore, to move beyond OPNET's often idealistic default propagation models, the team integrated MATLAB’s mathematical libraries to inject realistic Rayleigh fading and Additive White Gaussian Noise (AWGN) into the simulation pipeline, ensuring bit error rates (BER) reflect real-world interference.
Experimental Evaluation
The platform was evaluated using a topology of 50 "MATLAB-nodes" and one server within a 10x10 meter area. The simulation utilized the Dynamic Source Routing (DSR) protocol in ad hoc mode, with traffic generated via an ON-OFF FTP model.
Results and Insights
The co-simulation revealed that standard standalone OPNET models are often too optimistic. Key findings include:
- Increased Latency: The co-simulation showed significantly higher Wireless LAN and Media Access delays compared to standalone models.
- Throughput Volatility: Throughput and load metrics exhibited greater volatility, confirming that the integrated Rayleigh and AWGN models successfully impacted data transmission.
- System Authenticity: The data transmission characteristics of the wireless channel directly influenced the Simulink control model, providing a realistic preview of field behavior.
Conclusion and Future Work
While the platform successfully bridges the gap between control and network simulation, two main areas for improvement remain. First, the computational overhead of the MATLAB Engine interface impacts simulation speed; future work may involve compiling MATLAB code into dynamic link libraries (DLLs) for direct execution within OPNET. Second, the researchers plan to scale the environment beyond the current 10x10m area to test the platform's performance in larger, more complex WNCS deployments.
Summary updated