Application of LabWindows/CVI in Flight Simulator

Publisher:数字梦想Latest update time:2015-03-06 Source: eechinaKeywords:CVI Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere
In order to meet the needs of the teaching process, highlight the characteristics of aviation, and create a teaching situation environment that integrates "teaching, learning, and doing", a simple flight simulator for Yun-5 was developed. The project uses the real Yun-5 aircraft as the carrier and LabWindows/CVI as the development environment. It mainly demonstrates the flight attitude of the aircraft (longitudinal, elevation, inclination, pitch, roll and heading) and the changes of various instruments during the flight to students, so that students have a certain understanding of the flight principles and driving techniques of the aircraft, and complete simple flight operations on the simulator.

1 System Structure

Since the simulator is only used for teaching and demonstration, it only involves some necessary equipment and functions during the flight of the aircraft. Therefore, after simplifying the simulator, it mainly includes instrument control system, control load system and visual environment simulation system. The block diagram of the aircraft control system is shown in Figure 1.






1.1 Control simulation control system

The control simulation control system is called the control load system, which is the core of the entire project and mainly provides pilots with a realistic cockpit control feeling. The cockpit control feeling is the load feeling when the pilot moves the control feeling. It is affected by the deflection of the control surface, and thus generates control input to cause the aircraft to respond. The control load system is divided into two parts: the control load device and the aircraft control system model. Among them. The control load device is used to generate the actual simulator cockpit control force; the flight control system model is used to simulate the formation of various forces of a specific aircraft control system under given conditions. Through the integration of these two parts, the simulation realizes the required cockpit control force, thereby generating the feeling of control force, which is similar to the pilot's experience in a real aircraft.

The control load system of the Yun-5 simulator adopts an electric system. The system includes two main subsystems: the control load computer subsystem and the control load device subsystem. The former is used to calculate the mathematical model of the aircraft flight control system and the actuator control loop, and the output of the controller provides the control signal for driving the actuator channel; while the latter is used to convert the control signal into the movement of the electric actuator to drive the cockpit control device.

1.2 Simulation instrument control system

The instrument control system of the Yun-5 simulator is an important part of the Yun-5 simulator. The system mainly realizes the indication of each instrument under the control system when the Yun-5 aircraft is in simulated flight state, so that the operator has an immersive feeling. The Y-5 simple simulator uses the real instruments on the Y-5 aircraft, and the structure of the Y-5 aircraft is basically kept unchanged in the cockpit. The driving signal of the entire instrument control system is composed of an analog signal control system and a pressure signal control system. It combines the visual and audio to display the flight attitude and altitude of the aircraft in real time.

1.3 3D surround screen visual simulation system

The 3D surround screen visual system mainly consists of two parts: one is the rudder channel graphics processing system, which processes high-resolution video files or pictures through this system, and realizes multi-channel segmentation of source files, rudder channel image overlap, brightness adjustment of fusion bands, pixel-level edge set correction, and feathering processing within the graphics processing system. Finally, multi-channel seamless complete image output is realized; the second is the 3D multi-channel output system, which receives the source files processed by the graphics processing system and processes multi-channel videos or pictures with 2D and 3D effects through its own processing device.

The whole system starts from performance and convenience. On the basis of ensuring the perfect fusion effect, the control process of the system is simplified, making the whole system more practical and more humane.

1.4 System hardware structure design

The whole simulator is based on the industrial computer, and the operating signals are all derived from the control load system. The control load system is divided into the control load device and the aircraft control system, as shown in Figure 2. The control load device can generate actual simulator cockpit control force, causing the elevator, aileron and rudder to move relative to each other, and measuring the displacement and angle through sensors. The industrial computer analyzes and processes the received signals and transmits them to the visual simulation computer through Ethernet, so that the visual display shows the corresponding visual picture: the industrial computer also sends the analyzed and processed signals to the cockpit instrument through the adapter box, driving the instrument to display the corresponding value. 









2 Simulator software implementation based on LabWindows/CVI

2.1 Selection of LabWindows/CVl development environment

LabWindows/CVI is an interactive visual software development environment based on ANSI C. It is a C/C++ interactive development platform for instruments and measurement and control processes launched by the American NI company. It organically combines the powerful and widely used C language with professional measurement and control tools, and greatly enhances the functions of the C language by using its integrated development environment, interactive programming methods, rich function panels, powerful interface functions, rich library functions and full-featured software toolkits. It integrates source code editing, powerful instrument libraries, 32-bit ANSI C compilation, linking, debugging and standard ANSI C libraries in an interactive development environment, greatly simplifying the design of graphical user interfaces, while providing users with flexible, built-in data acquisition, analysis and display functions. It has a variety of ways to communicate with hardware, such as RS232, VXI, etc. At the same time, TCP/IP communication mechanisms can also be established. Compared with other development tools such as VC and VB, LabWi-ndows/CVI has stronger hardware control and data analysis and processing capabilities, and is particularly suitable for the development of various test, control, fault analysis and information processing software, especially large and complex measurement and control software, which can obtain excellent measurement and control performance. In LabWindows/CVI, database and network development software packages are also added to enable it to meet the storage of ultra-large capacity data and the development of large distributed remote network measurement and control systems.

In view of the above advantages of LabWindows/CVI, considering that the signals of the entire simulator operation are derived from the control load system, this constitutes a measurement and control system based on the control load system. Therefore, this project uses LabWindows/CVI virtual instrument programming language as the software development platform. [page]

2.2 System software design and implementation

2.2.1 Software structure module design

The software adopts modular and structured design ideas to improve programming efficiency and enhance the maintainability and scalability of the software. According to the needs, the system software module is designed with three modules: data acquisition, execution control and auxiliary, which specifically have the following 9 parts. Its overall structure is shown in Figure 3.






1) The data acquisition module is responsible for the acquisition of various standard signals, transmits them to the display and storage modules according to the channel, and synchronizes the input waveform signals, which also includes hardware initialization and acquisition parameter setting.

2) The data storage module stores the collected data in the database according to the specified format.

3) The data display module displays the simulator's heading attitude, elevation angle and other parameters as well as waveforms, trajectories and various spectra in real time according to different needs.

4) The data analysis module analyzes the collected data, compares it with the preset data, and then calculates the adjustment amount. The data analysis methods used are: time domain analysis, frequency domain analysis, correlation analysis, regression analysis, mathematical statistics, trend analysis and advanced analysis.

5) The instrument driver module sends the control data to the channel and generates control commands for various regulating instruments.

6) The file management module provides data output, report printing and historical query.

7) The database management module realizes the effective management of various types of data in the database, stores the test data and conclusions, and makes record forms according to the test content. 8

) The alarm module alarms when a fault occurs in the system, displays the fault type and starts protection measures.

9) The TCP communication module completes the communication between 3D vision systems.

The Y-5 control load system simulation system is designed using this software, and its process is shown in Figure 4.





After the main program completes initialization, it calls the modules such as permission operation, acquisition, visual communication module, and control (instrument drive, operating mechanism, pitch control). It also responds to serial port and keyboard interrupts at any time. To prevent interference, the acquisition module adopts the method of multiple acquisitions, removing the maximum and minimum data, and taking the average value. The acquired data is stored in the database through the storage module and the display module and displayed on the panel. When necessary, it can be queried and printed through the database management module and the file management module. In addition, according to the acquired data information, the instrument drive module can complete the functions of operating mechanism and pitch control.

2.2.2 Key modules in software programming

1) Pitch control module function int ComWrt (int COMPort, charbuffer[], int count) sends control commands to the inverter through the serial port COMPort. The command data is stored in the memory buffer[], and the data length is count bytes. Control the operation, stop, forward/reverse of the inverter.

Function void CRC_WrtFre (int FRECOM, unsigned int DValue, unsigned FreAdr, int Length_CRC) sets the operating frequency of the inverter. Send the working frequency value Dvalue to the inverter through the serial port FRECOM.
Call:

2) Operation mechanism control module function double sensor_com(int ID); Function description: Send a read data command to the sensor, read and store the raw data output by the sensor, and calculate the displacement of the sensor. The calculation method is:

3) Instrument drive control module function void da_send (int corn, intkahao, int channel, double da_sendata) is used to send the voltage value required by the voltmeter; function double AD24 (int COM, int CardID, int way, double*Val) is used to collect voltage, collect the voltage that needs to be collected and display it on the panel; function void Relay (int comport, int cardlD, intchanelNum, char ctrldata[17]) is used to control the on and off state of the relay; function void YB_High (double sjd_A) controls the indication of the altimeter and vertical speed meter according to the change of the elevator, where YB_High is the function name and sjd_A is the elevator value; function void YB_Airspeed (double ymg_V) controls the frequency of the inverter according to the throttle stick; function void YB_Qhq (double Value) and void YB_Pq (double Value) are the driving functions of the carburetor temperature meter and the exhaust temperature meter respectively, and the driving variable is the aileron; the function void YB_Wxdhizh (double Value) is used to drive the radio altimeter, where YB_Wxdhigh is the function name and Value is the throttle lever position; the function void YB_Sy (double Value) is used to drive the three-purpose meter, where YB_Sy is the function name and Value is the throttle lever position; the function void YB_Dq (double Value) drives the atmospheric temperature meter, where YB_Dq is the function name and Value is the throttle lever position.

4) Visual audio control module function void calculate() calculates the x-coordinate, y-coordinate, z-coordinate, pitch angle, roll angle and yaw angle of the viewpoint position according to the data of the three control surfaces and the throttle lever; function void (*InitNet) (int fig), function function: initialize the network. Initialization includes information such as IP address and port number; function void (*SendFlightData) (int flg) transmits data to the visual computer.

Function void(*CloseNet)(int fig) is used to close the network; function void(*ChangeData)(float viewx, float viewy, float viewz, float thet, float gam, float psi) is used to exchange data. The data FlyData generated by the control system software is transmitted to the visual software to realize real-time data update and exchange, which is the basis of real-time communication.

3 Conclusion

The system uses LabWindows/CVI virtual instrument programming language as the software development platform, and industrial control computers with stable performance and powerful data processing capabilities as the core of the hardware system. The combination of database technology and modularization greatly shortens the system development cycle, and at the same time makes the system have good visibility, interactivity and scalability. It can complete the collection and control of various parameters of the flight simulator, and through the computer's data collection, parameter control, real-time curves, accident alarms and other screens, operators can understand the operation of airborne equipment, discover and handle problems in a timely manner. It has complete test functions, strong error prevention capabilities, stable and reliable operation, and a friendly user interface, providing strong support for the technical guarantee of aircraft equipment.
Keywords:CVI Reference address:Application of LabWindows/CVI in Flight Simulator

Previous article:Design of Network Virtual Laboratory Based on LabVIEW
Next article:LabVIEW-based CNC machine tool network measurement and control system - overall design (I)

Latest Test Measurement Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号