A kind of system simulation methodTechnical field
The invention belongs to airborne teledata acquisition and transmission technique fields, are related to a kind of system simulation method.
Background technique
AFDX is waited in Air Passenger A380 and 400M, Boeing 787 and is succeeded on aircrafts as one of Avionics data bus technologyUsing, be internationally recognized aircraft first choice communication network of new generation, be widely used at present novel airborne remote data acquisition withThe research of Transmission system.
It is very must that being equipped in avionics system, which has the remote data concentrator of remote data acquisition and transmission technology,It wants.Multiplex roles, high-speed, mobile remote data concentrator will certainly bring a large amount of remote data transmissions, background serviceDevice usually needs the teledata being collected into these dynamically to be quantized, graphical simulation is analyzed.In Practical Project, lead toThe analog simulation of controlled device in control subsystem is often realized by the static mode of pure software, but this emulation mode is real-timeProperty it is poor, being connected with practical control subsystem, i.e., without in real time, counted automatically by practical interactive interfaceAccording to transmission, this has a certain distance, the larger difference that simulation analysis result is also deposited with running process.
Summary of the invention
The purpose of the present invention is to propose to a kind of system simulation platform based on AFDX network and MATLAB, according to teledataConcentrator interface function builds AFDX network and MATLAB simulation communication platform, realizes long-range controlled device and background serverBetween data exchange, dynamic simulation and analysis.
In a first aspect, the application provides a kind of system simulation method, the method is applied in data transmission terminal, the methodInclude:
Data transmission terminal, by loading configuration function, generates the configuration of AFDX PORT COM in server-side upper application layerTable, then sample port is created, complete the creation of AFDX PORT COM;
Using interface for network programming Socket socket, server-side udp port is established;
The data of long-range controlled device are received by AFDX PORT COM;
The long-range controlled device data are sent to Simulation Control end by the server-side udp port.
Optionally, described to utilize interface for network programming Socket socket, server-side udp port is established, is specifically included:
Data transmission terminal first carries out Socket initialization in upper application layer;
Web socket is established, Socket and upper PC machine IP, udp port are carried out bindings, while also constructedDriver.
Optionally, described that the long-range controlled device data are sent to by Simulation Control by the server-side udp portEnd, specifically includes:
When uplink needs to communicate, the server-side udp port receives the long-range controlled of AFDX PORT COM acquisitionObject data, and it is sent to Simulation Control end.
Optionally, the method also includes: the data transmission terminal utilizes server-side when downlink needs to communicateUdp port receives the data that the Simulation Control end is sent, then is sent to long-range controlled device by the AFDX PORT COM.
Optionally, data transmission terminal includes AFDX PORT COM and server-side udp port.
Second aspect, the application provide a kind of system simulation method, and the method is applied in Simulation Control end, the methodInclude:
Simulation Control end creates one and the consistent client UDP of server-side udp port in AFDX communication using MATLABTransmission/reception module;
Client UDP transmission/reception module receives the long-range controlled device data that data transmission terminal is sent;
Modeling and simulation analysis is carried out to the long-range controlled device data, and obtains simulation result.
Optionally, described that modeling and simulation analysis is carried out to the long-range controlled device data, it specifically includes:
Classify to long-range controlled device data, according to its type difference, selects corresponding SIMULINK dynamic linkBlock diagram in library models interface;
Establish graphic user interface and corresponding visual simulating model, carry out the numerical operations of data, parsing, extraction andGraphic plotting, completes the modeling and simulation analysis of data, and obtains simulation result.
Optionally, the method also includes:
Simulation Control end is according to simulation result, and using client UDP transmission/reception module, Xiang Yuancheng controlled device is sentControl instruction, to control the operation of long-range controlled device.
Optionally, the Simulation Control end is consistent with server-side udp port in AFDX communication using MATLAB creation oneClient UDP transmission/reception module construct simulation study and system control while according to long-range controlled device data typePlatform specifically includes:
The Simulation Control end utilizes the SIMULINK dynamic link library under MATLAB the integration environment, creates one and AFDXThe consistent client UDP transmission/reception module of server-side udp port in communication, while according to long-range controlled device data type,Construct simulation study and system control panel.
In conclusion what the invention proposes a kind of based on AFDX network and MATLAB is Design of Simulation Platform framework, withBased on UDP communication protocol, by AFDX technology and MATLAB emulation interface platform, it is (long-range to realize remote data concentratorControlled device) it is dynamically interacted in real time with data between background server, processing and graphical simulation platform, thus effectivelyResearching and analysing for remote collection data is completed, provides timely and effectively digitization support for front and back strategic decision.The present inventionThe system simulation platform based on AFDX network and MATLAB proposed has the advantages that emulation link complexity is low, reliableIt is high;Emulation platform real time implementation, automation and continuity;Simulation model has open sexual function, constantly can improve and expand,Convenient for the continuity of research work.
Detailed description of the invention:
Fig. 1 is the downstream driver control platform provided in an embodiment of the present invention based on AFDX network and MATLAB;
Fig. 2 is the upstream data analysis platform provided in an embodiment of the present invention based on AFDX network and MATLAB.
Specific embodiment
Embodiment one
The purpose of the present invention is to propose to a kind of system simulation platform based on AFDX network and MATLAB, according to teledataConcentrator interface function builds AFDX network and MATLAB emulation communication platform, realizes long-range controlled device and background serverData exchange, dynamic simulation and analysis between (upper PC machine).
Technical solution of the present invention:
1, AFDX communication system is constructed:
AFDX communication system is the interface unit between AFDX network and avionics system, has the function for sending and receiving dataCan, can carry out virtual link (VL) isolation, transmitting terminal traffic shaping, receiving end redundant data management, receiving end VL label identify,The operation such as integrity detection.AFDX network end system is attached by AFDX interchanger, is provided at a high speed, reliably for each hostData communication.
End system is very important a part in AFDX communication, it plays bridge between aviation subsystem and exchange networkBeam action.It is responsible for the data flow for needing to send by aviation subsystem and carries out shaping, then dispatches and calculate according to certain end systemThe complete data frame of shaping is sent to purpose terminal through corresponding VL by method, and there are one important functions for it: Redundancy Management, its workWith the reliability for being guarantee transmission.AFDX end system is from top to bottom by application layer, transport layer, network layer and MAC layerComposition.
According to ARINC653 aviation electronics application software standard interface in the present invention, AFDX end system selects sample port.After upper PC machine installation AFDX end system board, VC++ and MATLAB/SIMULINK environment.In VC++ exploitation environment, designServer-side upper level applications are developed, load configuration, creation port and port transmission/reception are led to, realize upper PC machine and long-rangeAFDX communication link between controlled device.
2, it sets up AFDX and communicates upper layer application server-side udp port
In server-side upper level applications, socket () is called to establish web socket, and by Socket and server-sideIP and udp port are bound, and server-side UDP send/receive operation is completed, and set up AFDX network and MATLAB/SIMULINKServer-side udp port between emulation platform.
3, MATLAB platform client udp port is established
In MATLAB/SIMULINK exploitation environment, client UDP transmission/reception module, address, port are createdBeing arranged will be arranged unanimously with the IP address of server-side udp port, port, this is just that client UDP transmission/reception module specifiesThe address to be communicated completes the relevant configuration of client UDP transmission/reception module, also just establish AFDX network withClient UDP ports between MATLAB/SIMULINK emulation platform.
3, emulation platform operation and extension are realized
The type of user's long-range controlled device data according to received by client UDP ports, in MATLAB/SIMULINKThe middle corresponding visualization mathematical model of foundation carries out dynamic simulation analysis research in real time to data are received, while can also pass throughEmulation platform proposed by the present invention carries out instruction control to long-range controlled device, so that long-range controlled device is according to scheduled programOperation, realize the acquisition of entire airborne teledata and Transmission system downstream driver control platform intelligentized control method and upstream dataThe real-time continuous automation dynamic simulation of analysis platform.
It, can according to different model, different application systems and ground checkout equipment etc. to the technical need of AFDX network communicationNeatly emulation platform proposed by the present invention is expanded or cut, in order to the continuity of research work.
The present invention has the advantage that effect:
System simulation platform proposed by the present invention based on AFDX network and MATLAB, has the advantages that
Emulation link complexity is low, reliable height;
Emulation platform real time implementation, automation and continuity;
Simulation model has open sexual function, constantly can improve and expand, convenient for the continuity of research work.
Embodiment two
Specific implementation method of the invention is as follows:
1, raw by loading configuration function initCfg () in server-side upper layer application journey in VC++ exploitation environmentAt AFDX PORT COM allocation list, afdxCreateSPortPC () creation sample port is recalled, input parameter is port numbers,Output parameter is port-mark, completes the creation of AFDX PORT COM;
2, the interface for network programming Socket socket provided using Windows, establishes server-side udp port.It is specificApplication method is: in upper level applications, first carrying out Socket initialization, calls socket () to establish after initializing successfullyWeb socket then calls bind () that Socket and server ip, udp port are carried out bindings, while also to be constructedDriver establishes the connection of both sides with this;When wanting uplink to need to communicate, server-side udp port receives AFDX communicationThe long-range controlled device data that port obtains, and it is sent to Simulation Control end.Conversely, when downlink needs to communicate, emulationAfter control terminal has sent dependent instruction, server-side udp port receives the dependent instruction that Simulation Control end is sent, then logical by AFDXNews port is sent to long-range controlled device.This completes the network communications between long-range controlled device and Simulation Control end;
3, in Simulation Control end client SIMULINK exploitation environment, creation one is with ethernet ip in AFDX communicationConsistent client UDP transmission/reception module is arranged (although can create one using related command in MATLAB in location, portUDP communication module carries out the reception and display of data, but compared with UDP communication module in SIMULINK, implements more numerousLock, therefore selection is realized with the latter in the design);
4, in upstream data analysis platform, to the long-range controlled device number received in client UDP transmission/reception moduleAccording to classifying, according to its type difference, all kinds of block diagrams selected in SIMULINK dynamic link library model interface, establish figureShape user interface and corresponding visual simulating model carry out numerical operation, parsing, extraction and the graphic plotting of data, completeThe modeling and simulation of data is analyzed;Simulation Control end client UDP is utilized according to simulation result in downstream driver control platformTransmission/reception module sends relevant control instruction to long-range controlled device, controls the operation of long-range controlled device, makes long-rangeControlled device is run according to the preset program in Simulation Control end, is realized to the acquisition of entire airborne teledata and Transmission systemProgress automatically and continuously runs emulation and research.