VxWorks-Based Onboard Bus Simulation System for Aircraft

VxWorks-Based Onboard Bus Simulation System for Aircraft

Follow “Aviation Electronics Technology Circle” for aviation news and technical insights~

VxWorks-Based Onboard Bus Simulation System for Aircraft
VxWorks-Based Onboard Bus Simulation System for Aircraft

Abstract

This article introduces a design method for a bus simulation system based on the embedded real-time operating system VxWorks, in conjunction with a new type of aircraft used by our military. Utilizing aviation onboard bus technology and computer local area network technology, with a focus on VxWorks technology, we demonstrate and design a communication simulation system for the onboard data bus that integrates both virtual and real components, creating a general platform for connecting, analyzing, researching, experimenting, and testing internal aircraft devices with remote communication capabilities.

Keywords

VxWorks, Real-Time Systems, Avionics, Bus, Simulation System

VxWorks-Based Onboard Bus Simulation System for Aircraft

0

Introduction

In modern aviation industry, the onboard avionics bus system serves as the neural center connecting onboard devices, which is crucial for ensuring normal communication between onboard devices and jointly completing tasks related to aircraft control, manipulation, information integration, communication, and navigation. Therefore, to ensure the reliability of the onboard bus system and the correctness of communication among onboard devices, it is essential to first develop a bus simulation system. By developing the simulation system and running simulation software, we can comprehensively simulate communication between avionics devices on the ground, shortening the development cycle of avionics buses and improving aircraft performance.

VxWorks is a new type of embedded real-time operating system developed by Wind River Systems (WRS) in the United States, featuring a microkernel design that is high-performance and customizable for onboard computers. Its excellent reliability and superior real-time performance have made it applicable in aircraft such as the F-16, FA-18 fighter jets, and B-2 stealth bombers. To enhance the onboard computer capabilities of national combat aircraft and align with international advanced levels, our country has begun development and achieved certain results. This article presents a successful VxWorks-based onboard bus simulation system developed for a specific type of aircraft.

1

Real-Time Operating Systems and VxWorks

1.1 Real-Time Performance and Real-Time Operating Systems

A real-time operating system is capable of executing specified functions within a limited time and responding to external asynchronous events within a specified time. For a real-time operating system, the system’s own interrupt latency, synchronization time, and context switching time are three decisive factors.

1.2 Overview of VxWorks

VxWorks is a real-time operating system designed to high reliability standards, with a system response time reaching microseconds, making it one of the most widely used real-time operating systems in the world. VxWorks can handle multiple concurrent random events through a multi-process (multi-tasking) operating mechanism. Its high-performance microkernel, Wind, includes multi-task scheduling (using priority preemption), task synchronization, inter-process communication mechanisms, as well as interrupt handling, watchdog, and memory management mechanisms. Wind employs interrupt-driven and priority-based methods, reducing the overhead of context switching time and interrupt latency, thereby meeting stronger real-time requirements.

As part of embedded system development, the VxWorks development process adopts a host-target architecture, as shown in Figure 1, placing development tools on the host and the core modules of the operating system on the target machine, providing support for tracking and debugging. The Tornado II integrated development environment provided by VxWorks is very user-friendly and offers various development tools and means, integrating design, development, and analysis features while minimizing the impact on the target machine system.

VxWorks-Based Onboard Bus Simulation System for Aircraft

2

Overall System Design

The simulation system developed based on the bus standards of a specific type of aircraft can capture and analyze various internal data streams in real time, providing detection and fault diagnosis for electronic systems, and offering technical support for teaching, research, and new aircraft units.

This simulation system consists of an RT with supporting software and a server along with remote transmission equipment. The basic working principle is illustrated in Figure 2:

VxWorks-Based Onboard Bus Simulation System for Aircraft

The RT connects to the simulation computer through the SBI/MBI interface card over the network, forming a real bus system to capture and analyze internal aircraft data in real time. The DRT can also be directly connected via a network card, forming a virtual bus system to simulate data transmission on the real bus and drive various simulation devices. The simulation computer is connected to a standard PC (host) with the Tornado II integrated development environment installed. Additionally, the system can facilitate remote communication, creating an effective data management center for joint analysis and diagnosis of onboard equipment faults between military units and academic institutions.

The simulation computer uses a Motorola super microcomputer with a PowerPC processor and the VxWorks real-time operating system. In the host-target architecture, it serves as the target machine. This model is a loosely coupled multiprocessor system, with the simulation computer being the core of the entire flight simulation system, primarily responsible for input/output coordination, real-time data storage, and extensive scientific calculations, including flight equation solving, control rate calculations, and model solving. The host uses the WINDOWS NT4.0 operating system. The host acts as the management system console (human-machine interface), primarily responsible for human-computer interaction, data monitoring, and data management, aiming to provide users with a graphical human-machine interface.

The simulation system software mainly implements the following functions:

a. Drive the SBI/MBI interface board to operate;

b. Edit data in digital or analog form;

c. Transfer data between real/virtual buses;

d. Convert between digital values and real values;

e. Drive simulation devices;

f. Remote data transmission.

3

Practical Application of VxWorks

During the development process, the host side consists of a standard PC with the Tornado II integrated development environment installed, connected to the target machine (simulation computer) via the network. The development process can be illustrated with reference to Figure 3:

VxWorks-Based Onboard Bus Simulation System for Aircraft

① In the Tornado II integrated environment’s Editor, applications are written in C++ and compiled using the Diab C++ Compiler embedded compiler.

② A boot disk is created, and TargetServer is configured to prepare for debugging. TargetServer manages communication between the Tornado tools on the host side and the TargetAgent on the target machine. Before the host tools can debug applications on the target machine, TargetServer must be configured and started.

③ The target machine is booted using the boot disk, while TargetServer is started on the host side to establish a connection between the host and target machines, downloading the compiled “.out” file from the source code. This allows various debugging operations on the target machine via the network. As seen in Figure 2, Shell, Debugger, and WindView can all participate in debugging, each fulfilling different functions. Currently, the Debugger, a high-performance debugger with the latest productivity-enhancing graphical features, is used to observe expression windows in groups, rapidly change the values of variables, registers, and local variables, and efficiently provide information through information aggregation and classification methods.

④ Once the program debugging is completed without errors, it can be integrated with the operating system to form a VxWorks file.

4

Problem Solving

During the system design process, several typical issues arise, with solutions as follows:

4.1 Access to Multiple Controls

The interface of the simulation software consists of 42 buttons and 34 text boxes. When using VC++’s MFC Class Wizard, it is necessary not only to generate objects and corresponding message response functions for each control but also to sequentially map messages for each control, resulting in a large amount of code that is difficult to manage.

In this system, to facilitate access to each control object, a control array is used. For message mapping and message response functions of the control array, the macro ON_COMMAND_SCOPE is used for adding message mappings, with a single message response function for controls of the same type, assigning an ID number to each control, and using the message response function OnClickCommand (UNIT id) to capture user keystrokes and trigger the corresponding event for processing based on the ID.

4.2 Synchronization of Multiple Threads

To coordinate synchronization among multiple concurrent threads, the VC++6.0 mutex mechanism is employed, using the synchronization object CMutex to access the receive buffer. When using the buffer, the ReceiveThread must call the CMutex class’s lock() function to gain access to the buffer before reading or writing. If other threads are accessing it, the ReceiveThread must wait. After using it, the unlock() function of the CMutex class is called to release access to the buffer. Below is the framework code for mutex access to the buffer:

CDatadeal*pDlg

pDlg->m_BufferMutex.lock(); // Request access

… // Access buffer

pDlg->m_BufferMutex.unlock(); // Exit

4.3 Handling Multiple Client Requests

In the design of the virtual bus, to handle multiple RT requests simultaneously, a socket queue is established, and each client’s request is added to this queue:

CPtrList m_pConnectionList; // Establish queue

CSocket*PSocket=new CSocket(); // Create object

if (m_pListeningSocket->Accept(*pSocket))

{m_pConnectionList.Addtail(pSocket); // Add object to queue}

……

5

Conclusion and Outlook

This article introduces an onboard bus simulation system for a specific type of aircraft based on the real-time embedded operating system VxWorks. In practice, a flight simulation system based on VxWorks has been successfully developed, with a simulation cycle of less than 8ms.

The application of VxWorks in onboard computers significantly enhances the stability, reliability, and safety of aircraft, and it is believed that VxWorks will find excellent applications in onboard computers.

(This article is selected from “Firepower and Command Control” by Yan Li and Wang Yong, authors affiliated with the Engineering College of the Air Force Engineering University. This article is reprinted solely for the purpose of disseminating knowledge. If there are any copyright issues, please contact us promptly!)

AAS2024

2024 China Civil Aviation Onboard and Software Conference

To accelerate the high-quality leapfrog development of civil aircraft onboard systems, the 2024 China Civil Aviation Onboard and Software Conference will be held on November 26-27 in Shanghai.

AAS2024

VxWorks-Based Onboard Bus Simulation System for Aircraft

For more inquiries, please contact us

AIMME | Ms. Yang

T: 021-62201838

M: 189 6441 7669

VxWorks-Based Onboard Bus Simulation System for Aircraft

Leave a Comment