WO2021008163A1 - Simulation model modeling method of aircraft engine distributed control system based on truetime - Google Patents

Simulation model modeling method of aircraft engine distributed control system based on truetime Download PDF

Info

Publication number
WO2021008163A1
WO2021008163A1 PCT/CN2020/081010 CN2020081010W WO2021008163A1 WO 2021008163 A1 WO2021008163 A1 WO 2021008163A1 CN 2020081010 W CN2020081010 W CN 2020081010W WO 2021008163 A1 WO2021008163 A1 WO 2021008163A1
Authority
WO
WIPO (PCT)
Prior art keywords
module
smart sensor
controller
network
kernel module
Prior art date
Application number
PCT/CN2020/081010
Other languages
French (fr)
Chinese (zh)
Inventor
潘慕绚
李义炜
黄金泉
Original Assignee
南京航空航天大学
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 南京航空航天大学 filed Critical 南京航空航天大学
Publication of WO2021008163A1 publication Critical patent/WO2021008163A1/en

Links

Images

Classifications

    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B17/00Systems involving the use of models or simulators of said systems
    • G05B17/02Systems involving the use of models or simulators of said systems electric

Definitions

  • the invention belongs to the technical field of aeroengine control, and in particular relates to a simulation model modeling method of aeroengine distributed control system based on TrueTime2.0.
  • the TrueTime toolbox is a toolbox developed by Lund University based on Simulink. It is used to simulate distributed real-time control systems and network control systems. With this toolbox, the dynamic process, control task execution and network interaction of distributed real-time control systems can be constructed. In this simulation environment, various scheduling strategies and network protocol multi-control system performance simulation can be studied, which makes the research of network control system easier.
  • the present invention proposes a simulation model modeling method of aero engine distributed control system based on TrueTime 2.0.
  • using TrueTime2.0 to establish a model of multi-smart sensors and multi-smart actuators, and connect to the controller through a communication protocol, and the controller sets up multiple receiving modules to receive the corresponding smart sensor data.
  • the smart sensor and smart actuator are connected with the aero engine model.
  • the smart sensor detects the state of the engine and sends the data to the controller.
  • the controller calculates the corresponding control value after receiving the smart sensor data, and then sends the data to the smart
  • the intelligent actuator returns the obtained data to the engine model.
  • a simulation model modeling method of aeroengine distributed control system based on TrueTime2.0 including the following steps:
  • Step 1) Establish an aero engine simulation model
  • Step 2) Establish a simulation model of aero-engine intelligent sensor
  • Step 3 Establish a simulation model of an aero engine controller
  • Step 4) Establish a simulation model of the aero-engine intelligent actuator
  • Step 5 Build a simulation model of aero-engine distributed control system based on TrueTime2.0
  • step 1) is as follows:
  • Step 1.1 using the Matlab Function module through the Simulink toolbox in Matlab;
  • Step 1.2 call the existing dynamic link library through the Function module to establish an aero engine simulation model
  • step 2) is as follows:
  • Step 2.1 use the Kernel module in TrueTime2.0 to build a smart sensor data receiving module for each smart sensor;
  • Step 2.2 use the Kernel module in TrueTime2.0 to establish a smart sensor data register module for each smart sensor;
  • Step 2.3 in the "Block parameters: Turetime Kernel” dialog box where the smart sensor receives the Kernel module, set the smart sensor to receive the Kernel module parameters. Including setting in the "Name of init function (MEX or MATLAB)" column to receive the initialization file of the Kernel module and name it as "Sensor_init.m”; setting [10] in the "Number of analog inputs and outputs” column to indicate The number of analog input signals of the smart sensor is 1, and the number of analog output signals is 0; set the network number of the smart sensor in the "(Network and)Node number(s)” column;
  • Step 2.4 initialize the smart sensor to receive the Kernel module.
  • Sensor_init.m of the smart sensor receiving the Kernel module set the scheduling mode of the smart sensor receiving the Kernel module to "deadline-monotonic scheduling", define the start time of the smart sensor as ts1, and the period when the smart sensor sends data to the network as Ts1 , Define the file name of the smart sensor signal processing "Sensor_code.m". According to these parameters, use the "ttCreatPeriodicTask()" function to create a periodic task for the smart sensor;
  • Step 2.5 create the "Sensor_code.m” file.
  • write the smart sensor A/D interface data reading code and write the code to send the data to the corresponding smart sensor data registration module.
  • Step 2.6 in the "Block parameters: Turetime Kernel" dialog box of the smart sensor registration Kernel module, set the smart sensor registration Kernel module parameters. Including setting the initialization file of the smart sensor registration Kernel module in the "Name of init function (MEX or MATLAB)" column and naming it "Buff_init.m”; setting [01] in the "Number of analog inputs and outputs” column to indicate The number of smart sensor analog input signals is 0, and the number of analog output signals is 1. Set the network number of the smart sensor registration module in the "(Network and)Node number(s)" column;
  • Step 2.7 initialize the smart sensor to register the Kernel module.
  • the initialization file "Buff_init.m” of the smart sensor registration Kernel module set the smart sensor registration Kernel module scheduling method to "deadline-monotonic scheduling", define the smart sensor data registration file name "Buff_code.m”, and use the ttCreateTask() function Create non-periodic tasks so that the smart sensor registration module is responsible for receiving the data sent by the smart sensor without periodic work.
  • Step 2.8 create the "Buff_code.m” file.
  • use the "ttGetMsg” function to write the code to read data from the network; after judging that the data is not empty, output it from the D/A interface of the smart sensor registered Kernel module.
  • step 3 is as follows:
  • Step 3.1 use the Kernel module in TrueTime2.0 to establish the controller Kernel module;
  • Step 3.2 in the "Block parameters: Turetime Kernel" dialog box of the controller Kernel module, set the controller Kernel module parameters. Including setting the initialization file of the controller Kernel module in the "Name of init function (MEX or MATLAB)" column and naming it "Controller_init.m”; setting [ncin ncout] in the "Number of analog inputs and outputs” column to indicate The number of analog input signals of the controller is ncin, and the number of analog output signals is ncout; set the network number of the controller in the "(Network and)Node number(s)" column;
  • Step 3.3 initialize the controller to receive the Kernel module.
  • Controller_init.m that the controller receives the Kernel module
  • set the scheduling mode for the controller to receive the Kernel module to "deadline-monotonic scheduling” define the controller's start working time as ts2, and the controller to send data to the network cycle as Ts2
  • a data structure "data” needs to be set in the function to save the parameters required by the controller code, which represents the local memory of the task ,
  • the data required in the controller code uses the data structure name prefix.
  • Step 3.4 create the "Controller_code.m” file.
  • write the controller A/D interface data reading code and use the parameters and PID control method set in step 3.3) to calculate the control value, and send it to the intelligent actuator.
  • step 4 the specific steps in step 4) are as follows:
  • Step 4.1 use the Kernel module in TrueTime2.0 to establish an intelligent actuator network node model for each intelligent actuator;
  • Step 4.2) In the "Block parameters: Turetime Kernel" dialog box of the Kernel module of the smart actuator, set the parameters of the Kernel module of the smart actuator. Including setting the initialization file of the Kernel module of the intelligent actuator in the "Name of init function (MEX or MATLAB)" column and naming it as “Actuator_init.m; setting [01] in the "Number of analog inputs and outputs” column, indicating smart The number of actuator analog input signals is 0, and the number of analog output signals is 1. Set the network number of the intelligent actuator module in the "(Network and)Node number(s)" column;
  • Step 4.3 initialize the Kernel module of the intelligent actuator.
  • the scheduling mode of the intelligent actuator Kernel module to "deadline-monotonic scheduling”
  • define the code file name of the intelligent actuator “Actuator_code.m”
  • use the ttCreateTask() function Create non-periodic tasks so that the intelligent actuator module is responsible for receiving the data sent by the controller without periodic work.
  • Step 4.4 create "Actuator_code.m” file.
  • This file use the "ttGetMsg” function to write the code to read data from the network; after judging that the data is not empty, output it from the D/A interface of the Kernel module of the intelligent actuator.
  • step 5 the specific steps in step 5 are as follows:
  • Step 5.1 use the Network module in the TrueTime2.0 toolbox to establish a network characteristic model of the engine distributed control system;
  • Step 5.2 connect the output terminal of the EngineFcn module of the engine simulation model with the smart sensor receiving Kernel module, and connect the output of the smart sensor registering the Kernel module to the multiplexing module.
  • the instruction input module Simulink step module, etc.
  • the multiplexing module (mux) is connected, and the output of the Kernel module of the intelligent actuator is connected to the input of the Simulink module of the engine model;
  • Step 5.3 according to the total number n of network nodes in the distributed control system of the engine, in "Block Parameters: TrueTime Network", set the "Number of nodes” column to n, indicating the number of network nodes in the distributed control network of the engine Is n;
  • Step 5.4 in "Block Parameters: TrueTime Network", set the "Static schedule” column to: [Smart Sensor Receives Kernel Number Controller Kernel Number], which indicates the network scheduling strategy of the distributed engine control system;
  • Step 5.5) In “Block Parameters: TrueTime Network”, set the parameters in the FrameSize and DateRate columns to indicate the frame size and transmission speed of network data transmission respectively.
  • a TrueTime2.0-based aeroengine distributed control modeling method designed by the present invention can well simulate intelligent sensors, controllers and intelligent actuators under the distributed control of aeroengines under the communication protocol TTP/C It also realizes the acquisition of engine signals and the use of PID control algorithms to effectively control the engine.
  • Figure 1 is a schematic diagram of the TrueTime2.0 toolbox
  • FIG. 2 is a schematic diagram of the Kernel setting interface
  • Figure 3 is a schematic diagram of the Network setting interface
  • Figure 4 is a schematic diagram of the model structure of the distributed control system of the present invention.
  • the present invention is a simulation model modeling method of aeroengine distributed control system based on TrueTime2.0, which includes the following steps:
  • Step 1) Establish an aero engine simulation model:
  • Step 1.1 using the Matlab Function module through the Simulink toolbox in Matlab;
  • Step 1.2 call the existing dynamic link library through the Function module to establish an aero engine simulation model
  • Step 2) Establish a simulation model of aero-engine intelligent sensor:
  • Step 2.1 use the Kernel module in TrueTime2.0 to build a smart sensor data receiving module for each smart sensor;
  • Step 2.2 use the Kernel module in TrueTime2.0 to establish a smart sensor data register module for each smart sensor;
  • Step 2.3 in the "Block parameters: Turetime Kernel” dialog box where the smart sensor receives the Kernel module, set the smart sensor to receive the Kernel module parameters. Including setting in the "Name of init function (MEX or MATLAB)" column to receive the initialization file of the Kernel module and name it as "Sensor_init.m”; setting [10] in the "Number of analog inputs and outputs” column to indicate The number of analog input signals of the smart sensor is 1, and the number of analog output signals is 0; set the network number of the smart sensor in the "(Network and)Node number(s)” column;
  • Step 2.4 initialize the smart sensor to receive the Kernel module.
  • Sensor_init.m of the smart sensor receiving the Kernel module set the scheduling mode of the smart sensor receiving the Kernel module to "deadline-monotonic scheduling", define the start time of the smart sensor as ts1, and the period when the smart sensor sends data to the network as Ts1 , Define the file name of the smart sensor signal processing "Sensor_code.m". According to these parameters, use the "ttCreatPeriodicTask()" function to create a periodic task for the smart sensor;
  • Step 2.5 create the "Sensor_code.m” file.
  • write the smart sensor A/D interface data reading code and write the code to send the data to the corresponding smart sensor data registration module.
  • Step 2.6 in the "Block parameters: Turetime Kernel" dialog box of the smart sensor registration Kernel module, set the smart sensor registration Kernel module parameters. Including setting the initialization file of the smart sensor registration Kernel module in the "Name of init function (MEX or MATLAB)" column and naming it "Buff_init.m”; setting [01] in the "Number of analog inputs and outputs” column to indicate The number of smart sensor analog input signals is 0, and the number of analog output signals is 1. Set the network number of the smart sensor registration module in the "(Network and)Node number(s)" column;
  • Step 2.7 initialize the smart sensor to register the Kernel module.
  • the initialization file "Buff_init.m” of the smart sensor registration Kernel module set the smart sensor registration Kernel module scheduling method to "deadline-monotonic scheduling", define the smart sensor data registration file name "Buff_code.m”, and use the ttCreateTask() function Create non-periodic tasks so that the smart sensor registration module is responsible for receiving the data sent by the smart sensor without periodic work.
  • Step 2.8 create the "Buff_code.m” file.
  • use the "ttGetMsg” function to write the code to read data from the network; after judging that the data is not empty, output it from the D/A interface of the smart sensor registered Kernel module.
  • Step 3 Establish a simulation model of aero engine controller:
  • Step 3.1 use the Kernel module in TrueTime2.0 to establish the controller Kernel module;
  • Step 3.2 in the "Block parameters: Turetime Kernel" dialog box of the controller Kernel module, set the controller Kernel module parameters. Including setting the initialization file of the controller Kernel module in the "Name of init function (MEX or MATLAB)" column and naming it "Controller_init.m”; setting [ncin ncout] in the "Number of analog inputs and outputs” column to indicate The number of analog input signals of the controller is ncin, and the number of analog output signals is ncout; set the network number of the controller in the "(Network and)Node number(s)" column;
  • Step 3.3 initialize the controller to receive the Kernel module.
  • Controller_init.m that the controller receives the Kernel module
  • set the scheduling mode for the controller to receive the Kernel module to "deadline-monotonic scheduling” define the controller's start working time as ts2, and the controller to send data to the network cycle as Ts2
  • a data structure "data” needs to be set in the function to save the parameters required by the controller code, which represents the local memory of the task ,
  • the data required in the controller code uses the data structure name prefix.
  • Step 3.4 create the "Controller_code.m” file.
  • write the controller A/D interface data reading code and use the parameters and PID control method set in step 3.3) to calculate the control value, and send it to the intelligent actuator.
  • Step 4) Establish a simulation model of aero-engine intelligent actuator:
  • Step 4.1 use the Kernel module in TrueTime2.0 to establish an intelligent actuator network node model for each intelligent actuator;
  • Step 4.2) In the "Block parameters: Turetime Kernel" dialog box of the Kernel module of the smart actuator, set the parameters of the Kernel module of the smart actuator. Including setting the initialization file of the Kernel module of the intelligent actuator in the "Name of init function (MEX or MATLAB)" column and naming it as “Actuator_init.m; setting [01] in the "Number of analog inputs and outputs” column, indicating smart The number of actuator analog input signals is 0, and the number of analog output signals is 1. Set the network number of the intelligent actuator module in the "(Network and)Node number(s)" column;
  • Step 4.3 initialize the Kernel module of the intelligent actuator.
  • the scheduling mode of the intelligent actuator Kernel module to "deadline-monotonic scheduling”
  • define the code file name of the intelligent actuator “Actuator_code.m”
  • use the ttCreateTask() function Create non-periodic tasks so that the intelligent actuator module is responsible for receiving the data sent by the controller without periodic work.
  • Step 4.4 create "Actuator_code.m” file.
  • This file use the "ttGetMsg” function to write the code to read data from the network; after judging that the data is not empty, output it from the D/A interface of the Kernel module of the intelligent actuator.
  • Step 5 Build a simulation model of aero-engine distributed control system based on TrueTime2.0:
  • Step 5.1 use the Network module in the TrueTime2.0 toolbox to establish a network characteristic model of the engine distributed control system;
  • Step 5.2 connect the output terminal of the EngineFcn module of the engine simulation model with the smart sensor receiving Kernel module, and connect the output of the smart sensor registering the Kernel module to the multiplexing module.
  • the instruction input module Simulink step module, etc.
  • the multiplexing module (mux) is connected, and the output of the Kernel module of the intelligent actuator is connected to the input of the Simulink module of the engine model;
  • Step 5.3 according to the total number n of network nodes in the distributed control system of the engine, in "Block Parameters: TrueTime Network", set the "Number of nodes” column to n, indicating the number of network nodes in the distributed control network of the engine Is n;
  • Step 5.4 in "Block Parameters: TrueTime Network", set the "Static schedule” column to: [Smart Sensor Receives Kernel Number Controller Kernel Number], which indicates the network scheduling strategy of the distributed engine control system;
  • Step 5.5) In “Block Parameters: TrueTime Network”, set the parameters in the FrameSize and DateRate columns to indicate the frame size and transmission speed of network data transmission respectively.
  • Aeroengine distributed control system is an important development direction of aeroengine control. It can effectively reduce the weight of the control system and improve system reliability and maintainability.
  • the characteristic of the distributed control system is that in the distributed control system, the intelligent sensor converts the analog signal into a digital signal, and provides output such as speed and pressure ratio to the controller.
  • the intelligent actuator accepts the signal sent by the controller and makes a response.
  • each smart sensor and smart actuator are connected to the controller through a data bus.
  • the TrueTime 2.0 toolbox is a toolbox developed by Lund University based on Simulink. It is used to simulate distributed real-time control systems and network control systems. This toolbox can be used to construct the dynamic process, control task execution and control tasks of the distributed real-time control system. Co-simulation environment for network interaction.
  • the TrueTime 2.0 toolbox is shown in Figure 1. In this example, two modules, Kernel and Network, are mainly used. The Kernel module is used to simulate smart sensors, smart actuators and controllers, and Network is used to set network parameters. The Kernel setting is shown in Figure 2.
  • the first line is the name of the initialization file called by the module; the third line is the number of analog input and output signals, represented by vectors; the fifth line is the network to which the module belongs and the number in the network , Expressed by a vector, if there is only one network, just fill in the number in the network.
  • Figure 3 shows the setting of Network.
  • the first line is the network type, and communication protocols such as CAN, TDMA and FlexRay can be selected;
  • the second line is the number of the network;
  • the third line is the number of nodes in the network, which can be determined according to the number of Kernel modules used. OK; for TDMA (TTP/C), Network adds a static schedule in the last line.
  • step 1 use Simulink's Matlab Function module to call the existing dynamic link library in the Function module, and use the engine high-pressure rotor speed n H and pressure ratio EPR as the engine output, and the fuel W f and the nozzle area A 8 as The input volume of the engine is used to establish a simulation model of an aero engine.
  • step 2 set the node numbers of the smart sensor receiving modules 1 and 2 in the "(Network and)Node number(s)" column of “Block parameters: TureTime Kernel” shown in Figure 2 to number 1, 2 respectively , Set the analog input and output quantity to [1 0] in the "Number of analog inputs and outputs” column.
  • Write the smart sensor initialization file and code Take smart sensor receiving module 1 as an example, use Matlab m language, set the initialization file name to ‘Sensor1_init’, and change the smart sensor 1 settings to make the initialization file name consistent.
  • the initialization file code is shown in Appendix 1.
  • the smart sensor In the initialization file, first use the ‘ttInitKernel(‘prioDM’)’ statement to complete the Kernel scheduling mode design, and this setting must be completed in the rest of the Kernel initialization.
  • the smart sensor periodically detects the engine signal and needs to create a periodic task, so use ttCreatePeriodicTask in the smart sensor initialization file to create a periodic task.
  • the smart sensor file code is shown in appendix 2.
  • the node numbers of register modules 1 and 2 are set to 3 and 4 respectively, and the analog input and output quantities are [0 1].
  • the initialization file and code of the register module take register module 1 as an example.
  • the initialization file is shown in appendix 3, using Matlab language ,
  • the initialization file name is set to'Buff1_init', and the initialization file name is changed in the setting of register module 1.
  • the registration module is responsible for receiving the data sent by the smart sensor. It is a non-periodic task. Therefore, use ttCreateTask and ttAttachNetworkHandler to create aperiodic tasks. The names of the two created tasks should be the same.
  • the task is started when the smart sensor message reaches the receiving module through the network.
  • step 3 set the controller to “(Network and)Node number(s)” in the “Block parameters:TureTime Kernel” shown in Figure 2 and set the node number to column number 5, and set it in “Number of analog inputs and Set the analog input and output in the "outputs” column to [5 0].
  • TTCreatePeriodicTask When programming the controller module, similar to the smart sensor, use TTCreatePeriodicTask to create periodic tasks, start the task at 0s and take 0.02s as the cycle according to actual needs, and the initialization file is shown in Appendix 5.
  • the PID control algorithm is used in the controller code, so a data structure needs to be added when creating a periodic task.
  • the data structure is named'data', so the proportional and integral required by the algorithm in the controller code And the derivative parameters need to add the prefix of'data' such as the proportional parameter'data.K1'.
  • the initialization file it is also necessary to complete the initialization of the algorithm-related quantities, and the related quantities should also be prefixed, so that the prefixed data can be passed to the code and stored.
  • the controller code is shown in appendix 6.
  • the numbers 1 to 5 in parentheses indicate the order in which the A/D interface accesses data from top to bottom, the numbers 1 and 5 are used to read the number of smart sensors, the numbers 2 and 4 are used to read the command signal, and the 3-bit clock signal.
  • the controller adopts PID algorithm. After reading the smart sensor data and instruction information, it calculates the corresponding W f and A 8 , and then uses ttSendMsg to send the calculated data to the corresponding intelligent actuator.
  • step 4 set the node number in the "(Network and)Node number(s)” column of the "(Network and)Node number(s)” in the "Block parameters: TureTime Kernel” shown in Figure 2 for the intelligent actuator to number 6 and 7, respectively.
  • the "Number In the "analog inputs and outputs” column set the analog input and output to [0 1].
  • the intelligent actuator is responsible for reading the data sent by the controller from the network. Its function is similar to that of the smart sensor registration module. Therefore, the initialization file and code of the intelligent actuator are also similar to the receiving module. You can modify the task name, code name and file name to execute intelligently.
  • the organization initialization files and codes take the fuel oil actuator as an example, as shown in Appendix 7 and Appendix 8. So far, the intelligent sensors, controllers and intelligent actuator models in the distributed control system have been established and set up.
  • step 5 use TrueTime's Network module to connect the engine model output terminal to the smart sensor receiving module, the input terminal to the smart actuator, and the controller to the smart sensor register module.
  • 7 are used in total A Kernel
  • the communication network is TDMA
  • the frame size is set to 80bits
  • the data transmission speed is 80000bits/s
  • the static schedule is [1 5; 2 5]
  • the intelligent sensors, controllers and intelligent actuator models in the distributed control system have been established and set up.
  • the final distributed control model of aeroengine based on True Time is shown in Figure 4.

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Automation & Control Theory (AREA)
  • Control By Computers (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

Provided is a simulation model modeling method of an aircraft engine distributed control system based on TrueTime, comprising the following steps: step (1): establishing an aircraft engine simulation model; step (2): establishing a simulation model of an aircraft engine smart sensor; step (3): establishing a simulation model of a smart actuator; step (4): establishing a distributed controller simulation model; step (5) establishing a simulation model of the distributed engine control system on the basis of a TrueTime simulation model of the engine, smart sensor, smart actuator, and controller. Under the premise of the aircraft engine distributed control architecture, by means of establishing an engine model based on Simulink, and smart sensor, controller, and smart actuator models based on TrueTime 2.0, using a time-triggered bus protocol, a distributed engine control system is constructed, and will actively encourage research on distributed control systems of advanced aircraft engines such as smart engines and multi-motor engines of the future.

Description

基于TrueTime的航空发动机分布式控制系统仿真模型建模方法Simulation model modeling method of aero-engine distributed control system based on TrueTime 技术领域Technical field
本发明属于航空发动机控制技术领域,具体涉及一种基于TrueTime2.0的航空发动机分布式控制系统仿真模型建模方法。The invention belongs to the technical field of aeroengine control, and in particular relates to a simulation model modeling method of aeroengine distributed control system based on TrueTime2.0.
背景技术Background technique
随着航空发动机在气动热力学和机械方面不断发展,其性能和效率达到了一个前所未有的水平,与之对应航空发动机控制也在不断发展。为减少发动机总质量,提高发动机性能、降低成本,现代发动机采用分布式控制系统取代传统集中式控制系统。相较于传统的集中式控制系统,航空发动机分布式控制系统能显著减少控制系统重量,提高系统可靠性和可维护性。然而在对分布式控制系统研究时,现有的基于集中式控制的建模方法已不适用,尤其是分布式控制系统带来的网络时延,这对控制系统的效果起着重要的作用,为了更好的研究航空发动机分布式控制系统,需要对其进行建模方法研究。TrueTime工具箱是Lund大学基于Simulink开发的工具箱,用来仿真分布式的实时控制系统和网络控制系统,利用这种工具箱可以构建分布式实时控制系统的动态过程、控制任务执行以及和网络交互的联合仿真环境,在该仿真环境中,可以研究各种调度策略和网络协议多控制系统性能的仿真,从而使得网络控制系统的研究更加容易。With the continuous development of aero-engines in aerodynamics, thermodynamics and machinery, its performance and efficiency have reached an unprecedented level, and the corresponding aero-engine control is also constantly developing. In order to reduce the total mass of the engine, improve engine performance, and reduce costs, modern engines use distributed control systems to replace traditional centralized control systems. Compared with the traditional centralized control system, the aero-engine distributed control system can significantly reduce the weight of the control system and improve the reliability and maintainability of the system. However, when researching distributed control systems, the existing modeling methods based on centralized control are no longer applicable, especially the network delay caused by distributed control systems, which plays an important role in the effect of the control system. In order to better study the aero-engine distributed control system, it is necessary to study its modeling method. The TrueTime toolbox is a toolbox developed by Lund University based on Simulink. It is used to simulate distributed real-time control systems and network control systems. With this toolbox, the dynamic process, control task execution and network interaction of distributed real-time control systems can be constructed. In this simulation environment, various scheduling strategies and network protocol multi-control system performance simulation can be studied, which makes the research of network control system easier.
发明内容Summary of the invention
针对上述技术问题,本发明提出一种基于TrueTime2.0的航空发动机分布式控制系统仿真模型建模方法。考虑航空发动机分布式控制系统,利用TrueTime2.0建立多智能传感器和多智能执行机构的模型,并通过通信协议与控制器相连接,控制器设置多个接受模块以接受相应的智能传感器数据。其中智能传感器和智能执行机构与航空发动机模型相连接,智能传感器检测发动机的状态并将数据发送给控制器,控制器在接收到智能传感器数据后计算出相应的控制量,然后将数据发送给智能执行机构,智能执行机构将所获得的数据返回至发动机模型。In view of the above technical problems, the present invention proposes a simulation model modeling method of aero engine distributed control system based on TrueTime 2.0. Considering aeroengine distributed control system, using TrueTime2.0 to establish a model of multi-smart sensors and multi-smart actuators, and connect to the controller through a communication protocol, and the controller sets up multiple receiving modules to receive the corresponding smart sensor data. The smart sensor and smart actuator are connected with the aero engine model. The smart sensor detects the state of the engine and sends the data to the controller. The controller calculates the corresponding control value after receiving the smart sensor data, and then sends the data to the smart The actuator, the intelligent actuator returns the obtained data to the engine model.
一种基于TrueTime2.0的航空发动机分布式控制系统仿真模型建模方法,包括以下步骤:A simulation model modeling method of aeroengine distributed control system based on TrueTime2.0, including the following steps:
步骤1)建立航空发动机仿真模型;Step 1) Establish an aero engine simulation model;
步骤2)建立航空发动机智能传感器仿真模型;Step 2) Establish a simulation model of aero-engine intelligent sensor;
步骤3)建立航空发动机控制器仿真模型;Step 3) Establish a simulation model of an aero engine controller;
步骤4)建立航空发动机智能执行机构仿真模型;Step 4) Establish a simulation model of the aero-engine intelligent actuator;
步骤5)基于TrueTime2.0构建航空发动机分布式控制系统仿真模型;Step 5) Build a simulation model of aero-engine distributed control system based on TrueTime2.0;
进一步的,所述步骤1)中的具体步骤如下:Further, the specific steps in step 1) are as follows:
步骤1.1),通过Matlab中Simulink工具箱,使用Matlab Function模块;Step 1.1), using the Matlab Function module through the Simulink toolbox in Matlab;
步骤1.2),通过Function模块调用已有动态链接库,建立航空发动机仿真模型;Step 1.2), call the existing dynamic link library through the Function module to establish an aero engine simulation model;
进一步的,所述步骤2)中的具体步骤如下:Further, the specific steps in step 2) are as follows:
步骤2.1),使用TrueTime2.0中的Kernel模块,为每一个智能传感器建立一个智能传感器数据接收模块;Step 2.1), use the Kernel module in TrueTime2.0 to build a smart sensor data receiving module for each smart sensor;
步骤2.2),使用TrueTime2.0中的Kernel模块,为每一个智能传感器建立一个智能传感器数据寄存模块;Step 2.2), use the Kernel module in TrueTime2.0 to establish a smart sensor data register module for each smart sensor;
步骤2.3),在智能传感器接收Kernel模块的“Block parameters:Turetime Kernel”对话框中, 设置智能传感器接收Kernel模块参数。包括在“Name of init function(MEX or MATLAB)”栏中设置智能传感器接收Kernel模块的初始化文件并命名为“Sensor_init.m”;在“Number of analog inputs and outputs”栏中设置[10],表示智能传感器模拟量输入信号个数为1,模拟量输出信号个数为0;在“(Network and)Node number(s)”栏中设置本智能传感器的网络编号;Step 2.3), in the "Block parameters: Turetime Kernel" dialog box where the smart sensor receives the Kernel module, set the smart sensor to receive the Kernel module parameters. Including setting in the "Name of init function (MEX or MATLAB)" column to receive the initialization file of the Kernel module and name it as "Sensor_init.m"; setting [10] in the "Number of analog inputs and outputs" column to indicate The number of analog input signals of the smart sensor is 1, and the number of analog output signals is 0; set the network number of the smart sensor in the "(Network and)Node number(s)" column;
步骤2.4),初始化智能传感器接收Kernel模块。在智能传感器接收Kernel模块的初始化文件Sensor_init.m中,设置智能传感器接收Kernel模块的调度方式为“deadline-monotonic scheduling”,定义智能传感器开始工作时间为ts1,智能传感器向网络发送数据的周期为Ts1,定义智能传感器信号处理文件名“Sensor_code.m”。根据这些参数,使用“ttCreatPeriodicTask()”函数创建智能传感器周期性任务;Step 2.4), initialize the smart sensor to receive the Kernel module. In the initialization file Sensor_init.m of the smart sensor receiving the Kernel module, set the scheduling mode of the smart sensor receiving the Kernel module to "deadline-monotonic scheduling", define the start time of the smart sensor as ts1, and the period when the smart sensor sends data to the network as Ts1 , Define the file name of the smart sensor signal processing "Sensor_code.m". According to these parameters, use the "ttCreatPeriodicTask()" function to create a periodic task for the smart sensor;
步骤2.5),建立“Sensor_code.m”文件。在该文件中,编写智能传感器A/D接口数据读取代码,编写将数据发送至相应的智能传感器数据寄存模块的代码。Step 2.5), create the "Sensor_code.m" file. In this file, write the smart sensor A/D interface data reading code, and write the code to send the data to the corresponding smart sensor data registration module.
步骤2.6),在智能传感器寄存Kernel模块的“Block parameters:Turetime Kernel”对话框中,设置智能传感器寄存Kernel模块参数。包括在“Name of init function(MEX or MATLAB)”栏中设置智能传感器寄存Kernel模块的初始化文件并命名为“Buff_init.m”;在“Number of analog inputs and outputs”栏中设置[01],表示智能传感器模拟量输入信号个数为0,模拟量输出信号个数为1;在“(Network and)Node number(s)”栏中设置本智能传感器寄存模块的网络编号;Step 2.6), in the "Block parameters: Turetime Kernel" dialog box of the smart sensor registration Kernel module, set the smart sensor registration Kernel module parameters. Including setting the initialization file of the smart sensor registration Kernel module in the "Name of init function (MEX or MATLAB)" column and naming it "Buff_init.m"; setting [01] in the "Number of analog inputs and outputs" column to indicate The number of smart sensor analog input signals is 0, and the number of analog output signals is 1. Set the network number of the smart sensor registration module in the "(Network and)Node number(s)" column;
步骤2.7),初始化智能传感器寄存Kernel模块。在智能传感器寄存Kernel模块的初始化文件“Buff_init.m”中,设置智能传感器寄存Kernel模块调度方式为“deadline-monotonic scheduling”,定义智能传感器数据寄存文件名“Buff_code.m”,使用ttCreateTask()函数创建非周期性任务,使得智能传感器寄存模块负责接收智能传感器发送的数据,无需周期性工作。Step 2.7), initialize the smart sensor to register the Kernel module. In the initialization file "Buff_init.m" of the smart sensor registration Kernel module, set the smart sensor registration Kernel module scheduling method to "deadline-monotonic scheduling", define the smart sensor data registration file name "Buff_code.m", and use the ttCreateTask() function Create non-periodic tasks so that the smart sensor registration module is responsible for receiving the data sent by the smart sensor without periodic work.
步骤2.8),建立“Buff_code.m”文件。在该文件中,利用“ttGetMsg”函数编写从网络读取数据的代码;在判断数据非空后,将其从智能传感器寄存Kernel模块的D/A接口中输出。Step 2.8), create the "Buff_code.m" file. In this file, use the "ttGetMsg" function to write the code to read data from the network; after judging that the data is not empty, output it from the D/A interface of the smart sensor registered Kernel module.
进一步的,所述步骤3)中的具体步骤如下:Further, the specific steps in step 3) are as follows:
步骤3.1),使用TrueTime2.0中的Kernel模块,建立控制器Kernel模块;Step 3.1), use the Kernel module in TrueTime2.0 to establish the controller Kernel module;
步骤3.2),在控制器Kernel模块的“Block parameters:Turetime Kernel”对话框中,设置控制器Kernel模块参数。包括在“Name of init function(MEX or MATLAB)”栏中设置控制器Kernel模块的初始化文件并命名为“Controller_init.m”;在“Number of analog inputs and outputs”栏中设置[ncin ncout],表示控制器模拟量输入信号个数为ncin,模拟量输出信号个数为ncout;在“(Network and)Node number(s)”栏中设置控制器的网络编号;Step 3.2), in the "Block parameters: Turetime Kernel" dialog box of the controller Kernel module, set the controller Kernel module parameters. Including setting the initialization file of the controller Kernel module in the "Name of init function (MEX or MATLAB)" column and naming it "Controller_init.m"; setting [ncin ncout] in the "Number of analog inputs and outputs" column to indicate The number of analog input signals of the controller is ncin, and the number of analog output signals is ncout; set the network number of the controller in the "(Network and)Node number(s)" column;
步骤3.3),初始化控制器接收Kernel模块。在控制器接收Kernel模块的初始化文件Controller_init.m中,设置控制器接收Kernel模块的调度方式为“deadline-monotonic scheduling”,定义控制器开始工作时间为ts2,控制器向网络发送数据的周期为Ts2,定义控制器代码文件名“Controller_code.m”。根据这些参数,使用“ttCreatPeriodicTask()”函数创建控制器周期性任务.特别的,在函数中需设置一数据结构“data”保存控制器代码所需的参数,该数据结构代表该任务的本地内存,控制器代码中所需的数据均使用该数据结构名为前缀。Step 3.3), initialize the controller to receive the Kernel module. In the initialization file Controller_init.m that the controller receives the Kernel module, set the scheduling mode for the controller to receive the Kernel module to "deadline-monotonic scheduling", define the controller's start working time as ts2, and the controller to send data to the network cycle as Ts2 , Define the controller code file name "Controller_code.m". According to these parameters, use the "ttCreatPeriodicTask()" function to create the periodic task of the controller. In particular, a data structure "data" needs to be set in the function to save the parameters required by the controller code, which represents the local memory of the task , The data required in the controller code uses the data structure name prefix.
步骤3.4),建立“Controller_code.m”文件。在该文件中,编写控制器A/D接口数据读取代码,并使用步骤3.3)中设置的参数和PID控制方法计算出控制量,将其发送至智能执行机构。Step 3.4), create the "Controller_code.m" file. In this file, write the controller A/D interface data reading code, and use the parameters and PID control method set in step 3.3) to calculate the control value, and send it to the intelligent actuator.
进一步的,所述步骤4)中的具体步骤如下:Further, the specific steps in step 4) are as follows:
步骤4.1),使用TrueTime2.0中的Kernel模块,为每一个智能执行机构建立一个智能执行机构网络节点模型;Step 4.1), use the Kernel module in TrueTime2.0 to establish an intelligent actuator network node model for each intelligent actuator;
步骤4.2)在智能执行机构Kernel模块的“Block parameters:Turetime Kernel”对话框中,设置智能执行机构Kernel模块参数。包括在“Name of init function(MEX or MATLAB)”栏中设置智能执行机构Kernel模块的初始化文件并命名为“Actuator_init.m;在“Number of analog inputs and outputs”栏中设置[01],表示智能执行机构模拟量输入信号个数为0,模拟量输出信号个数为1;在“(Network and)Node number(s)”栏中设置本智能执行机构模块的网络编号;Step 4.2) In the "Block parameters: Turetime Kernel" dialog box of the Kernel module of the smart actuator, set the parameters of the Kernel module of the smart actuator. Including setting the initialization file of the Kernel module of the intelligent actuator in the "Name of init function (MEX or MATLAB)" column and naming it as "Actuator_init.m; setting [01] in the "Number of analog inputs and outputs" column, indicating smart The number of actuator analog input signals is 0, and the number of analog output signals is 1. Set the network number of the intelligent actuator module in the "(Network and)Node number(s)" column;
步骤4.3),初始化智能执行机构Kernel模块。在智能执行机构Kernel模块的初始化文件“Actuator_init.m”中,设置智能执行机构Kernel模块调度方式为“deadline-monotonic scheduling”,定义智能执行机构代码文件名“Actuator_code.m”,使用ttCreateTask()函数创建非周期性任务,使得智能执行机构模块负责接收控制器发送的数据,无需周期性工作。Step 4.3), initialize the Kernel module of the intelligent actuator. In the initialization file "Actuator_init.m" of the Kernel module of the intelligent actuator, set the scheduling mode of the intelligent actuator Kernel module to "deadline-monotonic scheduling", define the code file name of the intelligent actuator "Actuator_code.m", and use the ttCreateTask() function Create non-periodic tasks so that the intelligent actuator module is responsible for receiving the data sent by the controller without periodic work.
步骤4.4),建立“Actuator_code.m”文件。在该文件中,利用“ttGetMsg”函数编写从网络读取数据的代码;在判断数据非空后,将其从智能执行机构Kernel模块的D/A接口中输出。Step 4.4), create "Actuator_code.m" file. In this file, use the "ttGetMsg" function to write the code to read data from the network; after judging that the data is not empty, output it from the D/A interface of the Kernel module of the intelligent actuator.
进一步的,所述步骤5)中的具体步骤如下:Further, the specific steps in step 5) are as follows:
步骤5.1),采用TrueTime2.0工具箱中的Network模块建立发动机分布式控制系统网络特性模型;Step 5.1), use the Network module in the TrueTime2.0 toolbox to establish a network characteristic model of the engine distributed control system;
步骤5.2),将发动机仿真模型EngineFcn模块的输出端与智能传感器接收Kernel模块相连接,智能传感器寄存Kernel模块的输出与多路复用模块相连接,参考指令输入模块(Simulink阶跃模块等)与多路复用模块(mux)相连接,智能执行机构Kernel模块输出与发动机模型Simulink模块的输入相连;Step 5.2), connect the output terminal of the EngineFcn module of the engine simulation model with the smart sensor receiving Kernel module, and connect the output of the smart sensor registering the Kernel module to the multiplexing module. Refer to the instruction input module (Simulink step module, etc.) and The multiplexing module (mux) is connected, and the output of the Kernel module of the intelligent actuator is connected to the input of the Simulink module of the engine model;
步骤5.3),根据所发动机分布式控制系统中网络节点总个数n,在“Block Parameters:TrueTime Network”中,将“Number of nodes”栏设置为n,表示发动机分布式控制网络中网络节点数目为n;Step 5.3), according to the total number n of network nodes in the distributed control system of the engine, in "Block Parameters: TrueTime Network", set the "Number of nodes" column to n, indicating the number of network nodes in the distributed control network of the engine Is n;
步骤5.4),在“Block Parameters:TrueTime Network”中,将“Static schedule”栏设置为:[智能传感器接收Kernel编号控制器Kernel编号],表示发动机分布式控制系统的网络调度策略;Step 5.4), in "Block Parameters: TrueTime Network", set the "Static schedule" column to: [Smart Sensor Receives Kernel Number Controller Kernel Number], which indicates the network scheduling strategy of the distributed engine control system;
步骤5.5)在“Block Parameters:TrueTime Network”中,设置FrameSize和DateRate栏中参数,分别表示网络数据传输的帧大小和传输速度。Step 5.5) In "Block Parameters: TrueTime Network", set the parameters in the FrameSize and DateRate columns to indicate the frame size and transmission speed of network data transmission respectively.
有益效果:本发明设计的一种基于TrueTime2.0的航空发动机分布式控制建模方法,在通信协议TTP/C下,能够很好模拟航空发动机分布式控制下智能传感器、控制器和智能执行机构间的通信,并实现采集发动机信号、使用PID控制算法对发动机进行有效的控制。Beneficial effects: A TrueTime2.0-based aeroengine distributed control modeling method designed by the present invention can well simulate intelligent sensors, controllers and intelligent actuators under the distributed control of aeroengines under the communication protocol TTP/C It also realizes the acquisition of engine signals and the use of PID control algorithms to effectively control the engine.
附图说明Description of the drawings
图1为TrueTime2.0工具箱示意图;Figure 1 is a schematic diagram of the TrueTime2.0 toolbox;
图2为Kernel设置界面示意图;Figure 2 is a schematic diagram of the Kernel setting interface;
图3为Network设置界面示意图;Figure 3 is a schematic diagram of the Network setting interface;
图4为本发明分布式控制系统模型结构示意图。Figure 4 is a schematic diagram of the model structure of the distributed control system of the present invention.
具体实施方式Detailed ways
本发明为一种基于TrueTime2.0的航空发动机分布式控制系统仿真模型建模方法,包括以下步骤:The present invention is a simulation model modeling method of aeroengine distributed control system based on TrueTime2.0, which includes the following steps:
步骤1)建立航空发动机仿真模型:Step 1) Establish an aero engine simulation model:
步骤1.1),通过Matlab中Simulink工具箱,使用Matlab Function模块;Step 1.1), using the Matlab Function module through the Simulink toolbox in Matlab;
步骤1.2),通过Function模块调用已有动态链接库,建立航空发动机仿真模型;Step 1.2), call the existing dynamic link library through the Function module to establish an aero engine simulation model;
步骤2)建立航空发动机智能传感器仿真模型:Step 2) Establish a simulation model of aero-engine intelligent sensor:
步骤2.1),使用TrueTime2.0中的Kernel模块,为每一个智能传感器建立一个智能传感器数据接收模块;Step 2.1), use the Kernel module in TrueTime2.0 to build a smart sensor data receiving module for each smart sensor;
步骤2.2),使用TrueTime2.0中的Kernel模块,为每一个智能传感器建立一个智能传感器数据寄存模块;Step 2.2), use the Kernel module in TrueTime2.0 to establish a smart sensor data register module for each smart sensor;
步骤2.3),在智能传感器接收Kernel模块的“Block parameters:Turetime Kernel”对话框中,设置智能传感器接收Kernel模块参数。包括在“Name of init function(MEX or MATLAB)”栏中设置智能传感器接收Kernel模块的初始化文件并命名为“Sensor_init.m”;在“Number of analog inputs and outputs”栏中设置[10],表示智能传感器模拟量输入信号个数为1,模拟量输出信号个数为0;在“(Network and)Node number(s)”栏中设置本智能传感器的网络编号;Step 2.3), in the "Block parameters: Turetime Kernel" dialog box where the smart sensor receives the Kernel module, set the smart sensor to receive the Kernel module parameters. Including setting in the "Name of init function (MEX or MATLAB)" column to receive the initialization file of the Kernel module and name it as "Sensor_init.m"; setting [10] in the "Number of analog inputs and outputs" column to indicate The number of analog input signals of the smart sensor is 1, and the number of analog output signals is 0; set the network number of the smart sensor in the "(Network and)Node number(s)" column;
步骤2.4),初始化智能传感器接收Kernel模块。在智能传感器接收Kernel模块的初始化文件Sensor_init.m中,设置智能传感器接收Kernel模块的调度方式为“deadline-monotonic scheduling”,定义智能传感器开始工作时间为ts1,智能传感器向网络发送数据的周期为Ts1,定义智能传感器信号处理文件名“Sensor_code.m”。根据这些参数,使用“ttCreatPeriodicTask()”函数创建智能传感器周期性任务;Step 2.4), initialize the smart sensor to receive the Kernel module. In the initialization file Sensor_init.m of the smart sensor receiving the Kernel module, set the scheduling mode of the smart sensor receiving the Kernel module to "deadline-monotonic scheduling", define the start time of the smart sensor as ts1, and the period when the smart sensor sends data to the network as Ts1 , Define the file name of the smart sensor signal processing "Sensor_code.m". According to these parameters, use the "ttCreatPeriodicTask()" function to create a periodic task for the smart sensor;
步骤2.5),建立“Sensor_code.m”文件。在该文件中,编写智能传感器A/D接口数据读取代码,编写将数据发送至相应的智能传感器数据寄存模块的代码。Step 2.5), create the "Sensor_code.m" file. In this file, write the smart sensor A/D interface data reading code, and write the code to send the data to the corresponding smart sensor data registration module.
步骤2.6),在智能传感器寄存Kernel模块的“Block parameters:Turetime Kernel”对话框中,设置智能传感器寄存Kernel模块参数。包括在“Name of init function(MEX or MATLAB)”栏中设置智能传感器寄存Kernel模块的初始化文件并命名为“Buff_init.m”;在“Number of analog inputs and outputs”栏中设置[01],表示智能传感器模拟量输入信号个数为0,模拟量输出信号个数为1;在“(Network and)Node number(s)”栏中设置本智能传感器寄存模块的网络编号;Step 2.6), in the "Block parameters: Turetime Kernel" dialog box of the smart sensor registration Kernel module, set the smart sensor registration Kernel module parameters. Including setting the initialization file of the smart sensor registration Kernel module in the "Name of init function (MEX or MATLAB)" column and naming it "Buff_init.m"; setting [01] in the "Number of analog inputs and outputs" column to indicate The number of smart sensor analog input signals is 0, and the number of analog output signals is 1. Set the network number of the smart sensor registration module in the "(Network and)Node number(s)" column;
步骤2.7),初始化智能传感器寄存Kernel模块。在智能传感器寄存Kernel模块的初始化文件“Buff_init.m”中,设置智能传感器寄存Kernel模块调度方式为“deadline-monotonic scheduling”,定义智能传感器数据寄存文件名“Buff_code.m”,使用ttCreateTask()函数创建非周期性任务,使得智能传感器寄存模块负责接收智能传感器发送的数据,无需周期性工作。Step 2.7), initialize the smart sensor to register the Kernel module. In the initialization file "Buff_init.m" of the smart sensor registration Kernel module, set the smart sensor registration Kernel module scheduling method to "deadline-monotonic scheduling", define the smart sensor data registration file name "Buff_code.m", and use the ttCreateTask() function Create non-periodic tasks so that the smart sensor registration module is responsible for receiving the data sent by the smart sensor without periodic work.
步骤2.8),建立“Buff_code.m”文件。在该文件中,利用“ttGetMsg”函数编写从网络读取数据的代码;在判断数据非空后,将其从智能传感器寄存Kernel模块的D/A接口中输出。Step 2.8), create the "Buff_code.m" file. In this file, use the "ttGetMsg" function to write the code to read data from the network; after judging that the data is not empty, output it from the D/A interface of the smart sensor registered Kernel module.
步骤3)建立航空发动机控制器仿真模型:Step 3) Establish a simulation model of aero engine controller:
步骤3.1),使用TrueTime2.0中的Kernel模块,建立控制器Kernel模块;Step 3.1), use the Kernel module in TrueTime2.0 to establish the controller Kernel module;
步骤3.2),在控制器Kernel模块的“Block parameters:Turetime Kernel”对话框中,设置控制器Kernel模块参数。包括在“Name of init function(MEX or MATLAB)”栏中设置控制器Kernel模块的初始化文件并命名为“Controller_init.m”;在“Number of analog inputs and outputs”栏中设置[ncin ncout],表示控制器模拟量输入信号个数为ncin,模拟量输出信号个数为ncout;在“(Network and)Node number(s)”栏中设置控制器的网络编号;Step 3.2), in the "Block parameters: Turetime Kernel" dialog box of the controller Kernel module, set the controller Kernel module parameters. Including setting the initialization file of the controller Kernel module in the "Name of init function (MEX or MATLAB)" column and naming it "Controller_init.m"; setting [ncin ncout] in the "Number of analog inputs and outputs" column to indicate The number of analog input signals of the controller is ncin, and the number of analog output signals is ncout; set the network number of the controller in the "(Network and)Node number(s)" column;
步骤3.3),初始化控制器接收Kernel模块。在控制器接收Kernel模块的初始化文件 Controller_init.m中,设置控制器接收Kernel模块的调度方式为“deadline-monotonic scheduling”,定义控制器开始工作时间为ts2,控制器向网络发送数据的周期为Ts2,定义控制器代码文件名“Controller_code.m”。根据这些参数,使用“ttCreatPeriodicTask()”函数创建控制器周期性任务.特别的,在函数中需设置一数据结构“data”保存控制器代码所需的参数,该数据结构代表该任务的本地内存,控制器代码中所需的数据均使用该数据结构名为前缀。Step 3.3), initialize the controller to receive the Kernel module. In the initialization file Controller_init.m that the controller receives the Kernel module, set the scheduling mode for the controller to receive the Kernel module to "deadline-monotonic scheduling", define the controller's start working time as ts2, and the controller to send data to the network cycle as Ts2 , Define the controller code file name "Controller_code.m". According to these parameters, use the "ttCreatPeriodicTask()" function to create the periodic task of the controller. In particular, a data structure "data" needs to be set in the function to save the parameters required by the controller code, which represents the local memory of the task , The data required in the controller code uses the data structure name prefix.
步骤3.4),建立“Controller_code.m”文件。在该文件中,编写控制器A/D接口数据读取代码,并使用步骤3.3)中设置的参数和PID控制方法计算出控制量,将其发送至智能执行机构。Step 3.4), create the "Controller_code.m" file. In this file, write the controller A/D interface data reading code, and use the parameters and PID control method set in step 3.3) to calculate the control value, and send it to the intelligent actuator.
步骤4)建立航空发动机智能执行机构仿真模型:Step 4) Establish a simulation model of aero-engine intelligent actuator:
步骤4.1),使用TrueTime2.0中的Kernel模块,为每一个智能执行机构建立一个智能执行机构网络节点模型;Step 4.1), use the Kernel module in TrueTime2.0 to establish an intelligent actuator network node model for each intelligent actuator;
步骤4.2)在智能执行机构Kernel模块的“Block parameters:Turetime Kernel”对话框中,设置智能执行机构Kernel模块参数。包括在“Name of init function(MEX or MATLAB)”栏中设置智能执行机构Kernel模块的初始化文件并命名为“Actuator_init.m;在“Number of analog inputs and outputs”栏中设置[01],表示智能执行机构模拟量输入信号个数为0,模拟量输出信号个数为1;在“(Network and)Node number(s)”栏中设置本智能执行机构模块的网络编号;Step 4.2) In the "Block parameters: Turetime Kernel" dialog box of the Kernel module of the smart actuator, set the parameters of the Kernel module of the smart actuator. Including setting the initialization file of the Kernel module of the intelligent actuator in the "Name of init function (MEX or MATLAB)" column and naming it as "Actuator_init.m; setting [01] in the "Number of analog inputs and outputs" column, indicating smart The number of actuator analog input signals is 0, and the number of analog output signals is 1. Set the network number of the intelligent actuator module in the "(Network and)Node number(s)" column;
步骤4.3),初始化智能执行机构Kernel模块。在智能执行机构Kernel模块的初始化文件“Actuator_init.m”中,设置智能执行机构Kernel模块调度方式为“deadline-monotonic scheduling”,定义智能执行机构代码文件名“Actuator_code.m”,使用ttCreateTask()函数创建非周期性任务,使得智能执行机构模块负责接收控制器发送的数据,无需周期性工作。Step 4.3), initialize the Kernel module of the intelligent actuator. In the initialization file "Actuator_init.m" of the Kernel module of the intelligent actuator, set the scheduling mode of the intelligent actuator Kernel module to "deadline-monotonic scheduling", define the code file name of the intelligent actuator "Actuator_code.m", and use the ttCreateTask() function Create non-periodic tasks so that the intelligent actuator module is responsible for receiving the data sent by the controller without periodic work.
步骤4.4),建立“Actuator_code.m”文件。在该文件中,利用“ttGetMsg”函数编写从网络读取数据的代码;在判断数据非空后,将其从智能执行机构Kernel模块的D/A接口中输出。Step 4.4), create "Actuator_code.m" file. In this file, use the "ttGetMsg" function to write the code to read data from the network; after judging that the data is not empty, output it from the D/A interface of the Kernel module of the intelligent actuator.
步骤5)基于TrueTime2.0构建航空发动机分布式控制系统仿真模型:Step 5) Build a simulation model of aero-engine distributed control system based on TrueTime2.0:
步骤5.1),采用TrueTime2.0工具箱中的Network模块建立发动机分布式控制系统网络特性模型;Step 5.1), use the Network module in the TrueTime2.0 toolbox to establish a network characteristic model of the engine distributed control system;
步骤5.2),将发动机仿真模型EngineFcn模块的输出端与智能传感器接收Kernel模块相连接,智能传感器寄存Kernel模块的输出与多路复用模块相连接,参考指令输入模块(Simulink阶跃模块等)与多路复用模块(mux)相连接,智能执行机构Kernel模块输出与发动机模型Simulink模块的输入相连;Step 5.2), connect the output terminal of the EngineFcn module of the engine simulation model with the smart sensor receiving Kernel module, and connect the output of the smart sensor registering the Kernel module to the multiplexing module. Refer to the instruction input module (Simulink step module, etc.) and The multiplexing module (mux) is connected, and the output of the Kernel module of the intelligent actuator is connected to the input of the Simulink module of the engine model;
步骤5.3),根据所发动机分布式控制系统中网络节点总个数n,在“Block Parameters:TrueTime Network”中,将“Number of nodes”栏设置为n,表示发动机分布式控制网络中网络节点数目为n;Step 5.3), according to the total number n of network nodes in the distributed control system of the engine, in "Block Parameters: TrueTime Network", set the "Number of nodes" column to n, indicating the number of network nodes in the distributed control network of the engine Is n;
步骤5.4),在“Block Parameters:TrueTime Network”中,将“Static schedule”栏设置为:[智能传感器接收Kernel编号控制器Kernel编号],表示发动机分布式控制系统的网络调度策略;Step 5.4), in "Block Parameters: TrueTime Network", set the "Static schedule" column to: [Smart Sensor Receives Kernel Number Controller Kernel Number], which indicates the network scheduling strategy of the distributed engine control system;
步骤5.5)在“Block Parameters:TrueTime Network”中,设置FrameSize和DateRate栏中参数,分别表示网络数据传输的帧大小和传输速度。Step 5.5) In "Block Parameters: TrueTime Network", set the parameters in the FrameSize and DateRate columns to indicate the frame size and transmission speed of network data transmission respectively.
实施例Example
下面结合附图和实施例对本发明作进一步说明。The present invention will be further described below with reference to the drawings and embodiments.
航空发动机分布式控制系统是航空发动机控制的重要发展方向,它能有效减轻控制系统的重量, 提高系统可靠性和可维护性。分布式控制系统的特点是在分布式控制系统中,智能传感器将模拟信号转变为数字信号,提供转速、压比等输出量给控制器,智能执行机构接受由控制器发出的信号并做出相应的动作以完成相应控制任务,各智能传感器和智能执行机构通过数据总线和控制器相连接。Aeroengine distributed control system is an important development direction of aeroengine control. It can effectively reduce the weight of the control system and improve system reliability and maintainability. The characteristic of the distributed control system is that in the distributed control system, the intelligent sensor converts the analog signal into a digital signal, and provides output such as speed and pressure ratio to the controller. The intelligent actuator accepts the signal sent by the controller and makes a response. To complete the corresponding control tasks, each smart sensor and smart actuator are connected to the controller through a data bus.
TrueTime2.0工具箱是Lund大学基于Simulink开发的工具箱,用来仿真分布式的实时控制系统和网络控制系统,利用这种工具箱可以构建分布式实时控制系统的动态过程、控制任务执行以及和网络交互的联合仿真环境。TrueTime2.0工具箱如图1所示,本例中主要使用Kernel与Network两个模块,其中Kernel模块用于模拟智能传感器、智能执行机构和控制器,Network用于设置网络参数。Kernel的设置如图2所示,第一行为该模块所调用的初始化文件名;第三行为模拟输入和输出信号个数,用向量表示;第五行为该模块所属的网络及在网络中的编号,用向量表示,若只存在一个网络可只填写在网络中的编号。图3为Network的设置,第一行为网络类型,可选择CAN、TDMA和FlexRay等通信协议;第二行为网络的编号;第三行为该网络中节点的个数,根据使用的Kernel模块个数可确定;对于TDMA(TTP/C),Network在最后一行增加了静态调度表。The TrueTime 2.0 toolbox is a toolbox developed by Lund University based on Simulink. It is used to simulate distributed real-time control systems and network control systems. This toolbox can be used to construct the dynamic process, control task execution and control tasks of the distributed real-time control system. Co-simulation environment for network interaction. The TrueTime 2.0 toolbox is shown in Figure 1. In this example, two modules, Kernel and Network, are mainly used. The Kernel module is used to simulate smart sensors, smart actuators and controllers, and Network is used to set network parameters. The Kernel setting is shown in Figure 2. The first line is the name of the initialization file called by the module; the third line is the number of analog input and output signals, represented by vectors; the fifth line is the network to which the module belongs and the number in the network , Expressed by a vector, if there is only one network, just fill in the number in the network. Figure 3 shows the setting of Network. The first line is the network type, and communication protocols such as CAN, TDMA and FlexRay can be selected; the second line is the number of the network; the third line is the number of nodes in the network, which can be determined according to the number of Kernel modules used. OK; for TDMA (TTP/C), Network adds a static schedule in the last line.
如步骤1所述,利用Simulink的Matlab Function模块,在Function模块中调用已有动态链接库,将发动机高压转子转速n H和压比EPR作为发动机输出量,燃油W f和发喷口面积A 8作为发动机的输入量,建立航空发动机仿真模型。 As mentioned in step 1, use Simulink's Matlab Function module to call the existing dynamic link library in the Function module, and use the engine high-pressure rotor speed n H and pressure ratio EPR as the engine output, and the fuel W f and the nozzle area A 8 as The input volume of the engine is used to establish a simulation model of an aero engine.
如步骤2所述,将智能传感器接收模块1和2在图2所示的“Block parameters:TureTime Kernel”中“(Network and)Node number(s)”设置节点编号这一栏分别编号1、2,在“Number of analog inputs and outputs”栏中设置模拟输入和输出量为[1 0]。编写智能传感器初始化文件与代码以智能传感器接收模块1为例,使用Matlab m语言,初始化文件名设为‘Sensor1_init’,并在智能传感器1的设置中更改使初始化文件名一致。初始化文件代码如附录1所示,初始化文件中,首先使用‘ttInitKernel(‘prioDM’)’语句完成Kernel调度方式设计,在其余Kernel初始化中也需先完成这一设置。智能传感器周期性检测发动机信号,需要创建周期性任务,所以在智能传感器初始化文件中使用ttCreatePeriodicTask创建周期性任务,根据需求设置任务的启动时间为0s、周期为0.02s,代表该任务在0s时启动,每0.02s为一个周期,同时在语句中调用智能传感器代码‘Sensor1_code’。智能传感器文件代码如附录2所示,编写智能传感器代码时,代码文件名需与上述设置的代码名一致,智能传感器代码中使用‘x=ttAnalogIn(1)’语句读取智能传感器A/D接口中的数据,x为读取数据设置的变量。随后使用‘ttSendMsg(3,x,80)’语句将数据发送至寄存模块1,其中3代表数据发送目的地即寄存模块1的节点编号,x为上述中的变量,80代表发送数据时每次发送的数据大小为80bits。智能传感器2的初始化文件、代码与智能传感器1相似,需修改文件名、代码名和数据发送的目的地,在此不再过多阐述。As described in step 2, set the node numbers of the smart sensor receiving modules 1 and 2 in the "(Network and)Node number(s)" column of "Block parameters: TureTime Kernel" shown in Figure 2 to number 1, 2 respectively , Set the analog input and output quantity to [1 0] in the "Number of analog inputs and outputs" column. Write the smart sensor initialization file and code. Take smart sensor receiving module 1 as an example, use Matlab m language, set the initialization file name to ‘Sensor1_init’, and change the smart sensor 1 settings to make the initialization file name consistent. The initialization file code is shown in Appendix 1. In the initialization file, first use the ‘ttInitKernel(‘prioDM’)’ statement to complete the Kernel scheduling mode design, and this setting must be completed in the rest of the Kernel initialization. The smart sensor periodically detects the engine signal and needs to create a periodic task, so use ttCreatePeriodicTask in the smart sensor initialization file to create a periodic task. Set the task start time to 0s and cycle to 0.02s according to the requirements, which means that the task starts at 0s , Every 0.02s is a cycle, and the smart sensor code'Sensor1_code' is called in the sentence at the same time. The smart sensor file code is shown in appendix 2. When writing the smart sensor code, the code file name must be consistent with the code name set above. Use the statement'x=ttAnalogIn(1)' in the smart sensor code to read the smart sensor A/D interface In the data, x is the variable set by reading the data. Then use the'ttSendMsg(3,x,80)' statement to send the data to the register module 1, where 3 represents the data sending destination, that is, the node number of the register module 1, x is the variable in the above, and 80 represents every time the data is sent The size of the data sent is 80 bits. The initialization file and code of smart sensor 2 are similar to those of smart sensor 1, and the file name, code name, and destination of data transmission need to be modified, so I won't elaborate on it here.
寄存模块1和2节点编号分别设置为3、4,模拟输入和输出量为[0 1],寄存模块的初始化文件与代码以寄存模块1为例,初始化文件如附录3所示,使用Matlab语言,初始化文件名设为‘Buff1_init’,并在寄存模块1的设置中更改使初始化文件名一致。寄存模块负责接收智能传感器发送的数据,为非周期性任务,因此使用ttCreateTask和ttAttachNetworkHandler创建非周期性任务,两次创建的任务名应一致,任务在智能传感器消息通过网络到达接收模块时启动,创建任务时设置任务的相对截止时间为0.02s,同时在ttCreateTask中设置寄存模块1所用代码‘Buff1_code’。编写寄存模块1所使用代码时,代码名应与上述设置一致。寄存模块代码如附录4所示,在寄存1的代码中,使用‘y=ttGetMsg’语句以读取智能传感器接收模块通过网络发送的数据,其中y为读 取数据设置的变量,然后使用‘ttAnalogOut(1,y)’语句将所得的数据从D/A接口中送出,其中y为上述中的变量,1位D/A接口的通道编号,由于在寄存模块中D/A接口未传输多个数据,通道编号设置为1。寄存模块2的初始化文件和代码与接收模块1相似,需修改初始化文件名与代码名,在此不过多阐述。The node numbers of register modules 1 and 2 are set to 3 and 4 respectively, and the analog input and output quantities are [0 1]. The initialization file and code of the register module take register module 1 as an example. The initialization file is shown in appendix 3, using Matlab language , The initialization file name is set to'Buff1_init', and the initialization file name is changed in the setting of register module 1. The registration module is responsible for receiving the data sent by the smart sensor. It is a non-periodic task. Therefore, use ttCreateTask and ttAttachNetworkHandler to create aperiodic tasks. The names of the two created tasks should be the same. The task is started when the smart sensor message reaches the receiving module through the network. Set the relative deadline of the task to 0.02s during the task, and set the code'Buff1_code' used by register module 1 in ttCreateTask. When writing the code used by register module 1, the code name should be consistent with the above settings. The register module code is shown in appendix 4. In the code of register 1, use the statement'y=ttGetMsg' to read the data sent by the smart sensor receiving module through the network, where y is the variable set by the read data, and then use'ttAnalogOut (1,y)' statement sends the obtained data from the D/A interface, where y is the variable mentioned above, the channel number of the D/A interface, because the D/A interface does not transmit more than one in the register module Data, the channel number is set to 1. The initialization file and code of the registering module 2 are similar to that of the receiving module 1. The initialization file name and code name need to be modified, so I won't elaborate on this here.
如步骤3所述,将控制器在图2所示的“Block parameters:TureTime Kernel”中“(Network and)Node number(s)”设置节点编号这一栏编号5,在“Number of analog inputs and outputs”栏中设置模拟输入和输出量为[5 0]。编写控制器模块时,与智能传感器类似,使用TTCreatePeriodicTask创建周期性任务,根据实际需求在0s时启动任务并以0.02s为周期,初始化文件如附录5所示。特别的,在控制器代码中使用了PID控制算法,因此在创建周期性任务时需特别加入数据结构,在此例中数据结构名为‘data’因此控制器代码中算法所需的比例、积分和微分参数需添加‘data’前缀如比例参数‘data.K1’。在初始化文件中也需完成算法相关量的初始化,同样应对相关量添加前缀,这样添加前缀的数据可传递至代码并进行存储。创建控制器任务时设置控制器代码文件名‘PIDControl,编写控制器代码时,文件名与此一致,控制器代码如附录6所示,代码中,使用ttAnalogIn()读取智能传感器A/D接口数据,括号中使用数字1~5表示A/D接口由上至下接入数据的顺序,使用数字1和5以读取智能传感器数,使用2和4读取指令信号,3位时钟信号,为控制器代码提供时间,为控制器代码提供时间。控制器采用PID算法,在读取智能传感器数据和指令信息后,经计算得出相应W f和A 8,随后使用ttSendMsg将算得的数据发送至相应的智能执行机构。 As described in step 3, set the controller to “(Network and)Node number(s)” in the “Block parameters:TureTime Kernel” shown in Figure 2 and set the node number to column number 5, and set it in “Number of analog inputs and Set the analog input and output in the "outputs" column to [5 0]. When programming the controller module, similar to the smart sensor, use TTCreatePeriodicTask to create periodic tasks, start the task at 0s and take 0.02s as the cycle according to actual needs, and the initialization file is shown in Appendix 5. In particular, the PID control algorithm is used in the controller code, so a data structure needs to be added when creating a periodic task. In this example, the data structure is named'data', so the proportional and integral required by the algorithm in the controller code And the derivative parameters need to add the prefix of'data' such as the proportional parameter'data.K1'. In the initialization file, it is also necessary to complete the initialization of the algorithm-related quantities, and the related quantities should also be prefixed, so that the prefixed data can be passed to the code and stored. Set the controller code file name'PIDControl' when creating the controller task. When writing the controller code, the file name is consistent with this. The controller code is shown in appendix 6. In the code, use ttAnalogIn() to read the smart sensor A/D interface For data, the numbers 1 to 5 in parentheses indicate the order in which the A/D interface accesses data from top to bottom, the numbers 1 and 5 are used to read the number of smart sensors, the numbers 2 and 4 are used to read the command signal, and the 3-bit clock signal. Provide time for the controller code, and provide time for the controller code. The controller adopts PID algorithm. After reading the smart sensor data and instruction information, it calculates the corresponding W f and A 8 , and then uses ttSendMsg to send the calculated data to the corresponding intelligent actuator.
如步骤4所述,将智能执行机构在图2所示的“Block parameters:TureTime Kernel”中“(Network and)Node number(s)”设置节点编号这一栏分别编号6、7,在“Number of analog inputs and outputs”栏中设置模拟输入和输出量为[0 1]。智能执行机构负责从网络中读取控制器发送的数据,作用与智能传感器寄存模块类似,因此智能执行机构初始化文件和代码也与接收模块类似,修改任务名称、代码名称和文件名称即可智能执行机构初始化文件和代码以燃油执行机构为例,如附录7和附录8所示。至此分布式控制系统中智能传感器、控制器和智能执行机构模型均以建立和设置完成。As described in step 4, set the node number in the "(Network and)Node number(s)" column of the "(Network and)Node number(s)" in the "Block parameters: TureTime Kernel" shown in Figure 2 for the intelligent actuator to number 6 and 7, respectively. In the "Number In the "analog inputs and outputs" column, set the analog input and output to [0 1]. The intelligent actuator is responsible for reading the data sent by the controller from the network. Its function is similar to that of the smart sensor registration module. Therefore, the initialization file and code of the intelligent actuator are also similar to the receiving module. You can modify the task name, code name and file name to execute intelligently. The organization initialization files and codes take the fuel oil actuator as an example, as shown in Appendix 7 and Appendix 8. So far, the intelligent sensors, controllers and intelligent actuator models in the distributed control system have been established and set up.
如步骤5所述,使用TrueTime的Network模块,将发动机模型输出端与智能传感器接收模块相连接,输入端与智能执行机构相连接,控制器与智能传感器寄存模块连接,此例中,共使用7个Kernel,通信网络为TDMA,帧大小设置为80bits,数据传输速度为80000bits/s,静态调度表为[1 5;2 5],并在Network模块中更改上述设置。至此分布式控制系统中智能传感器、控制器和智能执行机构模型均以建立和设置完成,最终基于True Time的航空发动机分布式控制模型如图4所示。As described in step 5, use TrueTime's Network module to connect the engine model output terminal to the smart sensor receiving module, the input terminal to the smart actuator, and the controller to the smart sensor register module. In this example, 7 are used in total A Kernel, the communication network is TDMA, the frame size is set to 80bits, the data transmission speed is 80000bits/s, the static schedule is [1 5; 2 5], and the above settings are changed in the Network module. So far, the intelligent sensors, controllers and intelligent actuator models in the distributed control system have been established and set up. The final distributed control model of aeroengine based on True Time is shown in Figure 4.
附录appendix
附录1 传感器初始化代码 Appendix 1 Sensor initialization code
function sensor1_initfunction sensor1_init
ttInitKernel('prioDM');ttInitKernel('prioDM');
starttime=0.0;starttime=0.0;
period=0.020;period=0.020;
ttCreatePeriodicTask('sensor_task1',starttime,period,'sensor_code1');ttCreatePeriodicTask('sensor_task1',starttime,period,'sensor_code1');
附录2 传感器代码 Appendix 2 Sensor Code
Figure PCTCN2020081010-appb-000001
Figure PCTCN2020081010-appb-000001
Figure PCTCN2020081010-appb-000002
Figure PCTCN2020081010-appb-000002
附录3 寄存器初始化代码 Appendix 3 Register initialization code
function Buff1_initfunction Buff1_init
ttInitKernel('prioDM')ttInitKernel('prioDM')
deadline=0.02;deadline=0.02;
ttCreateTask(Buff1_task',deadline,'Buff1_code');ttCreateTask(Buff1_task',deadline,'Buff1_code');
ttAttachNetworkHandler('Buff1_task')ttAttachNetworkHandler('Buff1_task')
附录4 寄存器代码 Appendix 4 Register Code
Figure PCTCN2020081010-appb-000003
Figure PCTCN2020081010-appb-000003
附录5 控制器初始化代码Appendix 5 Controller initialization code
function controller_initfunction controller_init
ttInitKernel('prioDM')ttInitKernel('prioDM')
data.Ts=0.02;data.Ts=0.02;
data.K11=0.8;data.K11=0.8;
data.K22=1.8;data.K22=1.8;
data.Ti1=0.08;data.Ti1=0.08;
data.Ti2=0.25;data.Ti2=0.25;
data.en1=0;data.en1=0;
data.epi1=0;data.epi1=0;
data.un1=0;data.un1=0;
data.upi1=0;data.upi1=0;
data.un=0;data.un=0;
data.upi=0;data.upi=0;
data.duk1=0;data.duk1=0;
data.duk2=0;data.duk2=0;
data.en2=0;data.en2=0;
data.epi2=0;data.epi2=0;
starttime=0.0;starttime=0.0;
period=0.02;period=0.02;
ttCreatePeriodicTask('controller_task',starttime,period,'controller_code',data);ttCreatePeriodicTask('controller_task',starttime,period,'controller_code',data);
附录6 控制器代码 Appendix 6 Controller Code
Figure PCTCN2020081010-appb-000004
Figure PCTCN2020081010-appb-000004
附录7 执行机构初始化代码 Appendix 7 Implementation agency initialization code
function actuator1_initfunctionactuator1_init
ttInitKernel('prioDM');ttInitKernel('prioDM');
deadline=10.0;deadline=10.0;
ttCreateTask('actuator1_task',deadline,'actuator1_code');ttCreateTask('actuator1_task',deadline,'actuator1_code');
ttAttachNetworkHandler('actuator1_task')ttAttachNetworkHandler('actuator1_task')
附录8 执行机构代码Appendix 8 Code of Executing Agency
Figure PCTCN2020081010-appb-000005
Figure PCTCN2020081010-appb-000005
以上所述仅是本发明的具体实施方式,但本发明的保护范围并不局限于此,应当指出:本技术领域的技术人员在本发明揭露的技术范围内,可轻易想到的润饰和改进,都应涵盖在本发明的保护范围内。The above are only specific embodiments of the present invention, but the scope of protection of the present invention is not limited to this. It should be pointed out that those skilled in the art can easily think of modifications and improvements within the technical scope disclosed by the present invention. All should be covered within the protection scope of the present invention.

Claims (7)

  1. 一种基于TrueTime的航空发动机分布式控制系统仿真模型建模方法,其特征在于:包括以下步骤:A TrueTime-based aeroengine distributed control system simulation model modeling method is characterized in that it includes the following steps:
    步骤1)建立航空发动机仿真模型;Step 1) Establish an aero engine simulation model;
    步骤2)建立航空发动机智能传感器仿真模型;Step 2) Establish a simulation model of aero-engine intelligent sensor;
    步骤3)建立航空发动机控制器仿真模型;Step 3) Establish a simulation model of an aero engine controller;
    步骤4)建立航空发动机智能执行机构仿真模型;Step 4) Establish a simulation model of the aero-engine intelligent actuator;
    步骤5)基于TrueTime2.0构建航空发动机分布式控制系统仿真模型。Step 5) Build a simulation model of aero-engine distributed control system based on TrueTime2.0.
  2. 根据权利要求1所述的基于TrueTime的航空发动机分布式控制系统仿真模型建模方法,其特征在于:所述步骤1)中的具体步骤如下:The TrueTime-based aero-engine distributed control system simulation model modeling method according to claim 1, characterized in that: the specific steps in step 1) are as follows:
    步骤1.1),通过Matlab中Simulink工具箱中的Function模块,建立EngineFcn模块;Step 1.1), build the EngineFcn module through the Function module in the Simulink toolbox in Matlab;
    步骤1.2),在EngineFcn模块中调用航空发动机部件级模型动态链接库,建立航空发动机仿真模型。Step 1.2), call the dynamic link library of the aero-engine component-level model in the EngineFcn module to establish the aero-engine simulation model.
  3. 根据权利要求1所述的基于TrueTime的航空发动机分布式控制系统仿真模型建模方法,其特征在于:所述步骤2)中的具体步骤如下:The TrueTime-based aeroengine distributed control system simulation model modeling method according to claim 1, wherein the specific steps in step 2) are as follows:
    步骤2.1),使用TrueTime2.0中的Kernel模块,为每一个智能传感器建立一个智能传感器数据接收Kernel模块;Step 2.1), use the Kernel module in TrueTime2.0 to establish a smart sensor data receiving Kernel module for each smart sensor;
    步骤2.2),使用TrueTime2.0中的Kernel模块,为每一个智能传感器建立一个智能传感器数据寄存模块;Step 2.2), use the Kernel module in TrueTime2.0 to establish a smart sensor data register module for each smart sensor;
    步骤2.3),在智能传感器接收Kernel模块的“Block parameters:Turetime Kernel”对话框中,设置智能传感器接收Kernel模块参数,包括:在“Name of init function(MEX or MATLAB)”栏中设置智能传感器接收Kernel模块的初始化文件并命名为“Sensor_init.m”,在“Number of analog inputs and outputs”栏中设置[10]表示智能传感器模拟量输入信号个数为1、模拟量输出信号个数为0;在“(Network and)Node number(s)”栏中设置本智能传感器的网络编号;Step 2.3), in the "Block parameters: Turetime Kernel" dialog box of the smart sensor receiving the Kernel module, set the smart sensor to receive the Kernel module parameters, including: set the smart sensor to receive in the "Name of init function (MEX or MATLAB)" column The initialization file of the Kernel module is named "Sensor_init.m". Set [10] in the "Number of analog inputs and outputs" column to indicate that the number of analog input signals of the smart sensor is 1, and the number of analog output signals is 0; Set the network number of this smart sensor in the "(Network and)Node number(s)" column;
    步骤2.4),初始化智能传感器接收Kernel模块:在智能传感器接收Kernel模块的初始化文件Sensor_init.m中,设置智能传感器接收Kernel模块的调度方式为“deadline-monotonic scheduling”,定义智能传感器开始工作时间为ts1,智能传感器向网络发送数据的周期为Ts1,定义智能传感器信号处理文件名“Sensor_code.m”;根据这些参数,使用“ttCreatPeriodicTask()”函数创建智能传感器周期性任务;Step 2.4), initialize the smart sensor to receive the Kernel module: in the initialization file Sensor_init.m of the smart sensor to receive the Kernel module, set the scheduling mode of the smart sensor to receive the Kernel module to "deadline-monotonic scheduling", and define the smart sensor to start working time as ts1 , The period for the smart sensor to send data to the network is Ts1, and define the file name of the smart sensor signal processing "Sensor_code.m"; according to these parameters, use the "ttCreatPeriodicTask()" function to create a periodic task for the smart sensor;
    步骤2.5),建立“Sensor_code.m”文件,在该文件中,编写智能传感器A/D接口数据读取代码,编写将数据发送至相应的智能传感器数据寄存模块的代码;Step 2.5), create a "Sensor_code.m" file, in this file, write the smart sensor A/D interface data reading code, and write the code to send the data to the corresponding smart sensor data registration module;
    步骤2.6),在智能传感器寄存Kernel模块的“Block parameters:Turetime Kernel”对话框中,设置智能传感器寄存Kernel模块参数,包括:在“Name of init function(MEX or MATLAB)” 栏中设置智能传感器寄存Kernel模块的初始化文件并命名为“Buff_init.m”,在“Number of analog inputs and outputs”栏中设置[01]表示智能传感器模拟量输入信号个数为0、模拟量输出信号个数为1,在“(Network and)Node number(s)”栏中设置本智能传感器寄存模块的网络编号;Step 2.6), in the "Block parameters: Turetime Kernel" dialog box of the smart sensor registration Kernel module, set the smart sensor registration Kernel module parameters, including: set the smart sensor registration in the "Name of init function (MEX or MATLAB)" column The initialization file of the Kernel module is named "Buff_init.m". Set [01] in the "Number of analog inputs and outputs" column to indicate that the number of analog input signals of the smart sensor is 0 and the number of analog output signals is 1. Set the network number of the smart sensor registration module in the "(Network and)Node number(s)" column;
    步骤2.7),初始化智能传感器寄存Kernel模块:在智能传感器寄存Kernel模块的初始化文件“Buff_init.m”中,设置智能传感器寄存Kernel模块调度方式为“deadline-monotonic scheduling”,定义智能传感器数据寄存文件名“Buff_code.m”,使用ttCreateTask()函数创建非周期性任务,使得智能传感器寄存模块负责接收智能传感器发送的数据;Step 2.7), initialize the smart sensor registration Kernel module: in the initialization file "Buff_init.m" of the smart sensor registration Kernel module, set the smart sensor registration Kernel module scheduling method to "deadline-monotonic scheduling", and define the smart sensor data registration file name "Buff_code.m", use the ttCreateTask() function to create aperiodic tasks, so that the smart sensor registration module is responsible for receiving the data sent by the smart sensor;
    步骤2.8),建立“Buff_code.m”文件,在该文件中,利用“ttGetMsg”函数编写从网络读取数据的代码;在判断数据非空后,将其从智能传感器寄存Kernel模块的D/A接口中输出。Step 2.8), create a "Buff_code.m" file, in this file, use the "ttGetMsg" function to write the code to read data from the network; after judging that the data is not empty, register it from the smart sensor to the D/A of the Kernel module Output in the interface.
  4. 根据权利要求1所述的基于TrueTime的航空发动机分布式控制系统仿真模型建模方法,其特征在于:所述步骤3)中的具体步骤如下:The TrueTime-based aeroengine distributed control system simulation model modeling method according to claim 1, wherein the specific steps in step 3) are as follows:
    步骤3.1),使用TrueTime2.0中的Kernel模块,建立控制器Kernel模块;Step 3.1), use the Kernel module in TrueTime2.0 to establish the controller Kernel module;
    步骤3.2),在控制器Kernel模块的“Block parameters:Turetime Kernel”对话框中,设置控制器Kernel模块参数,包括:在“Name of init function(MEX or MATLAB)”栏中设置控制器Kernel模块的初始化文件并命名为“Controller_init.m”,在“Number of analog inputs and outputs”栏中设置[ncin ncout]表示控制器模拟量输入信号个数为ncin、模拟量输出信号个数为ncout,在“(Network and)Node number(s)”栏中设置控制器的网络编号;Step 3.2), in the "Block parameters: Turetime Kernel" dialog box of the controller Kernel module, set the controller Kernel module parameters, including: set the controller Kernel module parameters in the "Name of init function (MEX or MATLAB)" column Initialize the file and name it "Controller_init.m", and set [ncin ncout] in the "Number of analog inputs and outputs" column to indicate that the number of analog input signals of the controller is ncin and the number of analog output signals is ncout. (Network and)Node number(s)" column to set the network number of the controller;
    步骤3.3),初始化控制器接收Kernel模块:在控制器接收Kernel模块的初始化文件Controller_init.m中,设置控制器接收Kernel模块的调度方式为“deadline-monotonic scheduling”,定义控制器开始工作时间为ts2,控制器向网络发送数据的周期为Ts2,定义控制器代码文件名“Controller_code.m”;根据这些参数,使用“ttCreatPeriodicTask()”函数创建控制器周期性任务;Step 3.3). Initialize the controller to receive the Kernel module: In the initialization file Controller_init.m that the controller receives the Kernel module, set the scheduling mode for the controller to receive the Kernel module to "deadline-monotonic scheduling", and define the starting time of the controller to be ts2 , The period for the controller to send data to the network is Ts2, and the controller code file name "Controller_code.m" is defined; according to these parameters, the "ttCreatPeriodicTask()" function is used to create the controller periodic task;
    步骤3.4),建立“Controller_code.m”文件,在该文件中,编写控制器A/D接口数据读取代码,并使用步骤3.3)中设置的参数和PID控制方法计算出控制量,将其发送至智能执行机构。Step 3.4), create a "Controller_code.m" file, in this file, write the controller A/D interface data reading code, and use the parameters and PID control method set in step 3.3) to calculate the control value, and send it To smart actuators.
  5. 根据权利要求1所述的基于TrueTime的航空发动机分布式控制系统仿真模型建模方法,其特征在于:所述步骤3.3)中,使用“ttCreatPeriodicTask()”函数创建控制器周期性任务,在该函数中设置一数据结构“data”保存控制器代码所需的参数,该数据结构代表该任务的本地内存,控制器代码中所需的数据均使用该数据结构名为前缀。The TrueTime-based aeroengine distributed control system simulation model modeling method according to claim 1, characterized in that: in the step 3.3), the "ttCreatPeriodicTask()" function is used to create the periodic task of the controller, and in the function Set a data structure "data" to save the parameters required by the controller code. This data structure represents the local memory of the task, and the data required in the controller code uses the data structure name prefix.
  6. 根据权利要求1所述的基于TrueTime的航空发动机分布式控制系统仿真模型建模方法,其特征在于:所述步骤4)中的具体步骤如下:The TrueTime-based aeroengine distributed control system simulation model modeling method according to claim 1, wherein the specific steps in step 4) are as follows:
    步骤4.1),使用TrueTime2.0中的Kernel模块,为每一个智能执行机构建立一个智能执行机构网络节点模型;Step 4.1), use the Kernel module in TrueTime2.0 to establish an intelligent actuator network node model for each intelligent actuator;
    步骤4.2)在智能执行机构Kernel模块的“Block parameters:Turetime Kernel”对话框中,设置智能执行机构Kernel模块参数,包括:在“Name of init function(MEX or MATLAB)”栏中设置智能执行机构Kernel模块的初始化文件并命名为“Actuator_init.m,在“Number of analog inputs and outputs”栏中设置[01]表示智能执行机构模拟量输入信号个数为0、模拟量输出信号个数为1,在“(Network and)Node number(s)”栏中设置本智能执行机构模块的网络编号;Step 4.2) In the "Block parameters:Turetime Kernel" dialog box of the intelligent actuator Kernel module, set the intelligent actuator Kernel module parameters, including: set the intelligent actuator Kernel in the "Name of init function (MEX or MATLAB)" column The initialization file of the module is named "Actuator_init.m". Set [01] in the "Number of analog inputs and outputs" column to indicate that the number of analog input signals of the intelligent actuator is 0 and the number of analog output signals is 1. Set the network number of the intelligent actuator module in the "(Network and)Node number(s)" column;
    步骤4.3),初始化智能执行机构Kernel模块:在智能执行机构Kernel模块的初始化文件“Actuator_init.m”中,设置智能执行机构Kernel模块调度方式为“deadline-monotonic scheduling”,定义智能执行机构代码文件名“Actuator_code.m”,使用ttCreateTask()函数创建非周期性任务,使得智能执行机构模块负责接收控制器发送的数据;Step 4.3), initialize the Kernel module of the smart actuator: In the initialization file "Actuator_init.m" of the Kernel module of the smart actuator, set the scheduling mode of the smart actuator Kernel module to “deadline-monotonic scheduling”, and define the code file name of the smart actuator "Actuator_code.m", use the ttCreateTask() function to create aperiodic tasks, so that the intelligent actuator module is responsible for receiving the data sent by the controller;
    步骤4.4),建立“Actuator_code.m”文件,在该文件中,利用“ttGetMsg”函数编写从网络读取数据的代码;在判断数据非空后,将其从智能执行机构Kernel模块的D/A接口中输出。Step 4.4), create the "Actuator_code.m" file, in the file, use the "ttGetMsg" function to write the code to read data from the network; after judging that the data is not empty, send it from the D/A of the Kernel module of the intelligent actuator Output in the interface.
  7. 根据权利要求1所述的基于TrueTime的航空发动机分布式控制系统仿真模型建模方法,其特征在于:所述步骤5)中的具体步骤如下:The TrueTime-based aeroengine distributed control system simulation model modeling method according to claim 1, wherein the specific steps in step 5) are as follows:
    步骤5.1),采用TrueTime2.0工具箱中的Network模块建立发动机分布式控制系统网络特性模型;Step 5.1), use the Network module in the TrueTime2.0 toolbox to establish a network characteristic model of the engine distributed control system;
    步骤5.2),将发动机仿真模型EngineFcn模块的输出端与智能传感器接收Kernel模块相连接,智能传感器寄存Kernel模块的输出与多路复用模块相连接,参考指令输入模块与多路复用模块相连接,智能执行机构Kernel模块输出与发动机模型Simulink模块的输入相连;Step 5.2), connect the output end of the EngineFcn module of the engine simulation model with the smart sensor receiving Kernel module, connect the output of the smart sensor register Kernel module to the multiplexing module, and connect the reference command input module to the multiplexing module , The output of the Kernel module of the intelligent actuator is connected with the input of the Simulink module of the engine model;
    步骤5.3),根据所发动机分布式控制系统中网络节点总个数n,在“Block Parameters:TrueTime Network”中,将“Number of nodes”栏设置为n,表示发动机分布式控制网络中网络节点数目为n;Step 5.3), according to the total number n of network nodes in the distributed control system of the engine, in "Block Parameters: TrueTime Network", set the "Number of nodes" column to n, indicating the number of network nodes in the distributed control network of the engine Is n;
    步骤5.4),在“Block Parameters:TrueTime Network”中,将“Static schedule”栏设置为:[智能传感器接收Kernel编号控制器Kernel编号],表示发动机分布式控制系统的网络调度策略;Step 5.4), in "Block Parameters: TrueTime Network", set the "Static schedule" column to: [Smart Sensor Receives Kernel Number Controller Kernel Number], which indicates the network scheduling strategy of the distributed engine control system;
    步骤5.5)在“Block Parameters:TrueTime Network”中,设置FrameSize和DateRate栏中参数,分别表示网络数据传输的帧大小和传输速度。Step 5.5) In "Block Parameters: TrueTime Network", set the parameters in the FrameSize and DateRate columns to indicate the frame size and transmission speed of network data transmission respectively.
PCT/CN2020/081010 2019-07-17 2020-03-25 Simulation model modeling method of aircraft engine distributed control system based on truetime WO2021008163A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910644365.0A CN110471308A (en) 2019-07-17 2019-07-17 Aeroengine distributed control system simulation model modeling method based on TrueTime
CN201910644365.0 2019-07-17

Publications (1)

Publication Number Publication Date
WO2021008163A1 true WO2021008163A1 (en) 2021-01-21

Family

ID=68509039

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/081010 WO2021008163A1 (en) 2019-07-17 2020-03-25 Simulation model modeling method of aircraft engine distributed control system based on truetime

Country Status (2)

Country Link
CN (1) CN110471308A (en)
WO (1) WO2021008163A1 (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110471308A (en) * 2019-07-17 2019-11-19 南京航空航天大学 Aeroengine distributed control system simulation model modeling method based on TrueTime
CN111783927B (en) * 2020-06-29 2023-08-01 江苏商贸职业学院 Chaotic bat algorithm UAV network control system and fault diagnosis method
CN113934153A (en) * 2020-06-29 2022-01-14 中国航发商用航空发动机有限责任公司 Multi-channel simulation method and system for aircraft engine control system
CN114706324B (en) * 2022-04-14 2023-11-28 南京航空航天大学 Distributed controller rapid prototype and simulation verification method based on time triggering

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070233286A1 (en) * 2006-03-29 2007-10-04 Makoto Ishikawa Method and Apparatus for Simulating Microcomputer-Based Systems
CN107024871A (en) * 2017-04-25 2017-08-08 哈尔滨理工大学 Design of Network Control System based on TrueTime
CN108427430A (en) * 2018-03-30 2018-08-21 南京航空航天大学 Quadrotor control method based on network-control
CN109624965A (en) * 2018-12-12 2019-04-16 湖北文理学院 A kind of plug-in hybrid-power automobile CAN network control system and its method
CN110471308A (en) * 2019-07-17 2019-11-19 南京航空航天大学 Aeroengine distributed control system simulation model modeling method based on TrueTime

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7925477B2 (en) * 2004-09-20 2011-04-12 The Mathworks, Inc. Method and system for transferring data between a discrete event environment and an external environment
US8055235B1 (en) * 2008-05-02 2011-11-08 Hypres, Inc. System and method for digital interference cancellation
US9479232B1 (en) * 2015-08-13 2016-10-25 Sandia Corporation Method of achieving ultra-wideband true-time-delay beam steering for active electronically scanned arrays
CN106372370A (en) * 2016-10-11 2017-02-01 中国人民解放军国防科学技术大学 Flight control distributed type real-time simulation system
CN107367935A (en) * 2017-07-25 2017-11-21 哈尔滨理工大学 A kind of method of the network control system compensation policy based on TrueTime
CN207487977U (en) * 2017-12-08 2018-06-12 联合汽车电子(重庆)有限公司 A kind of engine controller function test system
CN109765881A (en) * 2019-01-18 2019-05-17 南京航空航天大学 A kind of verifying system of aeroengine control system and control algolithm

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070233286A1 (en) * 2006-03-29 2007-10-04 Makoto Ishikawa Method and Apparatus for Simulating Microcomputer-Based Systems
CN107024871A (en) * 2017-04-25 2017-08-08 哈尔滨理工大学 Design of Network Control System based on TrueTime
CN108427430A (en) * 2018-03-30 2018-08-21 南京航空航天大学 Quadrotor control method based on network-control
CN109624965A (en) * 2018-12-12 2019-04-16 湖北文理学院 A kind of plug-in hybrid-power automobile CAN network control system and its method
CN110471308A (en) * 2019-07-17 2019-11-19 南京航空航天大学 Aeroengine distributed control system simulation model modeling method based on TrueTime

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
CHEN, LIANG ET AL.: "Design of Distributed Control System of Turbofan Engine and Digital Simulation Platform Based on TrueTime", SCIENCE TECHNOLOGY AND ENGINEERING, vol. 12, no. 6, 29 February 2012 (2012-02-29), ISSN: 1671-1815 *
WANG, ZHILIANG ET AL., BASICS OF INTERNET OF THINGS, XIDIAN UNIVERSITY PRESS, 31 March 2014 (2014-03-31) *
ZHANG, YU ET AL.: "Analysis of Distributed Control System with Time Delay Based on Truetime Simulation", FIRE CONTROL & COMMAND CONTROL, vol. 41, no. 1, 31 January 2016 (2016-01-31), ISSN: 1002-0640, DOI: 20200603142727 *
ZHANG, YU ET AL.: "Analysis of Distributed Control System with Time Delay Based on Truetime Simulation", FIRE CONTROL & COMMAND CONTROL, vol. 41, no. 1, 31 January 2016 (2016-01-31), ISSN: 1002-0640, DOI: 20200603153747X *

Also Published As

Publication number Publication date
CN110471308A (en) 2019-11-19

Similar Documents

Publication Publication Date Title
WO2021008163A1 (en) Simulation model modeling method of aircraft engine distributed control system based on truetime
US6425762B1 (en) System and method for cosimulation of heterogeneous systems
US20210081585A1 (en) Method for event-based simulation of a system
US20170176982A1 (en) Field device and method for starting up an industrial automation network
CN108828947A (en) A kind of uncertain dynamic fuzzy model modeling method of the aero-engine containing time lag
CN106326541A (en) Dynamic mesh boundary update calculation method
CN115098412A (en) Peripheral access controller, data access device and corresponding method, medium and chip
Ioana et al. VSOMEIP-OPC UA gateway solution for the automotive industry
CN106776044B (en) Hardware acceleration method and system based on data flow
Liang Control and communication co-design: Analysis and practice on performance improvement in distributed measurement and control system based on fieldbus and Ethernet
CN110580373B (en) Preprocessing collaborative simulation method and device
LU501679B1 (en) Truetime2.0-based simulation modeling method for aero-engine distributed control system
JP2011508345A (en) Integrated technology analysis system
EP1959324A2 (en) Resonant frequency identification
US20190086892A1 (en) System and method for synchronization of device communication
Roth et al. A gateway to easily integrate simulation platforms for co-simulation of cyber-physical systems
EP3547125B1 (en) Methods of configuring an automation system
JP2007536659A (en) Method and apparatus for simulation of automated systems
CN117149345A (en) Method for simulating a first computing unit in a second computing unit
Braun et al. TLM-based asynchronous co-simulation with the functional mockup interface
Howe Real-time multirate synchronous simulation with single and multiple processors
Morelli et al. A system-level framework for the evaluation of the performance cost of scheduling and communication delays in control systems
CN110083877A (en) A kind of fluctuation heat power engineering system transfer function modeling method
DEISS et al. An asynchronous simulation methodology for improving the performanceof training simulators
CN108629136B (en) Parallel simulation and error compensation method for continuous time system

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20841237

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20841237

Country of ref document: EP

Kind code of ref document: A1