CN109613840A - A kind of semi-physical simulation method based on Matlab - Google Patents
A kind of semi-physical simulation method based on Matlab Download PDFInfo
- Publication number
- CN109613840A CN109613840A CN201811319962.8A CN201811319962A CN109613840A CN 109613840 A CN109613840 A CN 109613840A CN 201811319962 A CN201811319962 A CN 201811319962A CN 109613840 A CN109613840 A CN 109613840A
- Authority
- CN
- China
- Prior art keywords
- physical
- control object
- control
- semi
- matlab
- Prior art date
- Legal status (The legal status 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 status listed.)
- Pending
Links
Classifications
-
- G—PHYSICS
- G05—CONTROLLING; REGULATING
- G05B—CONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
- G05B17/00—Systems involving the use of models or simulators of said systems
- G05B17/02—Systems involving the use of models or simulators of said systems electric
Landscapes
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Engineering & Computer Science (AREA)
- Automation & Control Theory (AREA)
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
Abstract
The invention discloses a kind of semi-physical simulation methods based on Matlab to establish the physical model of control object according to the physical principle or mathematical principle of control object;Then the framework and process of control object controller control strategy are established according to the physical model of control object;Finally observed according to the framework of control object controller control strategy and process using the mark fixed sum data for supporting third party's calibration tool of CCP agreement to complete analogue system, by using emulation platform Matlab Simulink software and CAN transmitting-receiving tool realize it is a kind of simple and fast, low-cost semi-physical simulation method, simple semi-physical simulation can both be realized by being emulated, cost and function are simple, implementation method is simple, fast, easily realize, Simulation Control field suitable for simple control object, by this simple and fast, the method of low-cost semi-physical simulation, reduce the cost of true environment experiment, Speeding up development progress.
Description
Technical field
The invention belongs to physical modeling technical fields, and in particular to a kind of semi-physical simulation method based on Matlab.
Background technique
Current automobile industry is explored by many years, and industry generallys use System design based on model device exploitation " V " mode, such as
Shown in Fig. 5.The mode can largely reduce repetitive process, shorten the development cycle, to save cost.The mode is except application
It is outer in automobile ECU exploitation, also it has been successfully applied to aviation, national defence, " white " household electrical appliances, Medical Devices, industrial stokehold etc.
Field.
Controller develops " V " mode and uses following operating mode:
System definition: it is required according to Control System Design, complete design specification, such as control algolithm, control object parameter;
Generally require previous design experiences, test data refers to.
Design, emulation: it is defined, whole system is realized under computer software environment, i.e., to control according to control system
The control logic of device, control object environment carry out modeling and simulating, with help designer it is earlier just to system index, error etc. into
Row rapid evaluation;Emulation tool mainly has a NI LabVIEW, The MathWorks, Inc.Matlab Simulink, MATRIXx
Deng.
Rapid prototyping: because software emulation cannot embody actual dynamic environment completely, it is hard to need to develop a controller
Controller model is downloaded to a Real-time hardware platform to the verification algorithm under true environment by part prototype, and pass through I/O
The sensor that is connected in true environment, actuator are simultaneously tested, and the process, that is, rapid prototyping, also commonly referred to as software is in ring.
Selecting Real-time hardware platform is the timeliness, certainty and stability for emulation.
Code building and software test: controller model is automatic by the model after being verified by rapid prototyping link
Or it is manually generated C code or other codes for supporting type, and download to the microcontroller of ECU.And to generated target generation
Code is tested.
Hardware in loop: hardware in loop (Hardware in the Loop), which refers to, passes through the ECU for having downloaded object code
I/O is connected to the environmental model (hardware-in-loop simulation device) previously established, and test the ECU under various operating conditions functionality and
Stability.Hardware in loop is the test macro of a closed loop, repeatably carries out dynamic simulation;Summer can be emulated in laboratory
Testing cost is saved without true test environment components with the actual road test in winter;It can carry out critical condition test and simulation
Limiting condition, speed and road-adhesion coefficient when such as the mild oil temperature of engine water, ABS test, without practical risk;And it can pass through
Software (model), hardware (failure input module) mistakes such as are shorted, are shorted between ECU pin with ground to simulate open circuit, and simulate
Sensor, actuator error situation.
System calibrating and test: after completing crucial hardware in loop, revised controller is connected to true I/O
Environment, and bench test, actual road test are carried out, until last production factory.
At present based in V-shape model development mode, physical hardware assemblage on-orbit mainly for complicated control,
Control object uses ready-made or business physics or mathematical model more, operates in HIL equipment, these HIL and control
The physical model of object is expensive, and for small enterprise or fairly simple control object, use cost is very high.
Summary of the invention
The purpose of the present invention is to provide a kind of semi-physical simulation methods based on Matlab, to overcome the prior art not
Foot.
In order to achieve the above objectives, the present invention adopts the following technical scheme:
A kind of semi-physical simulation method based on Matlab, comprising the following steps:
Step 1), physical principle or mathematical principle according to control object, establish the physical model of control object;
Step 2), the framework and process that control object controller control strategy is established according to the physical model of control object;
The realization of step 3), calibrating function: support is used according to the framework of control object controller control strategy and process
Third party's calibration tool of CCP agreement completes the mark fixed sum data observation of analogue system.
Further, the physical model of control object object is established in step 1) using MATLAB software.
Further, the physical model for the control object established controls cycle time using control object controller.
Further, PC system and control object controller use CAN network to send data and synchronization frame to reach control
Cycle synchronisation.
Further, Controlling model often receives a synchronization frame, then executes the refreshing of a physical model, utilize CAN net
Network realizes control synchronization and data exchange.
Further, in step 2), control object controller is completed to the control of actuator and the acquisition of sensor information,
It is completed at the same time the transmission of control object physical model synchronization signal.
It further, include that true control object physical environment and vehicle are empty using the semi physical life situations of control system
Quasi- control object environment;True control object physical environment includes control object actuator, sensor and executes load;Vehicle is empty
Quasi- control object environment is realized using the Matlab physical model operated in PC machine.
Further, true control object physical environment and the Matlab physical model based on PC machine pass through CAN bus net
Network realizes that communication is synchronous with the time.
Compared with prior art, the invention has the following beneficial technical effects:
A kind of semi-physical simulation method based on Matlab of the present invention, it is former according to the physical principle of control object or mathematics
Reason, establishes the physical model of control object;Then control object controller control plan is established according to the physical model of control object
Framework slightly and process;Finally according to the framework of control object controller control strategy and process using supporting the of CCP agreement
Tripartite's calibration tool complete analogue system calibration sum number it is observed that by using emulation platform Matlab Simulink software
A kind of simple and fast, low-cost semi-physical simulation method is realized with CAN transmitting-receiving tool, Simulink can be used in client
Software tool abundant in platform builds oneself physics or mathematical model, under the Normal mode of Simulink, carries out
Emulation can both realize simple semi-physical simulation.Traditional physics is compared in ring, and cost and function are simple, and implementation method is simple, fast
Prompt, Yi Shixian is not needed suitable for the Simulation Control field of simple control object using expensive HIL equipment.Pass through
The method of this simple and fast, low-cost semi-physical simulation, so that most of client is using in V-shape development process,
To not being too complicated control, the emulation and calibration of Controlling model can be also fast implemented without using HIL or rapid prototyping machine, is subtracted
The cost of few true environment experiment, Speeding up development progress.This method is used a kind of simplified low cost of physics assemblage on-orbit.
Detailed description of the invention
Fig. 1 is present system frame diagram.
Fig. 2 is the software architecture schematic diagram of physical model on PC.
Fig. 3 is the software architecture schematic diagram of control strategy in controller.
Fig. 4 is that existing System design based on model device develops " V " ideograph.
Fig. 5 is that existing System design based on model device develops " V " ideograph.
Specific embodiment
The invention will be described in further detail with reference to the accompanying drawing:
As shown in Figure 1, a kind of semi-physical simulation method based on Matlab, comprising the following steps:
Step 1): control pair is established using MATLAB software platform according to the physical principle or mathematical principle of control object
The physical model of elephant;The physical model is different according to the difference of control object, since the model emulation runs on Normal mould
Formula, therefore sampling time in simulink model and control object controller control cycle time are different chronomere,
Therefore when establishing control object model, it is necessary to control cycle time using control object controller, and system cannot be used certainly
The sampling time of band;The physical model software flow and framework of control object are as shown in Figure 3 and Figure 5;Due to the operation of PC system
Time is fast, for the control cycle synchronisation with control object controller, using using CAN network to send data and synchronization frame.Control
Simulation often receives a synchronization frame, then executes the refreshing of a physical model, realizes control synchronization and data using CAN network
Exchange.
Step 2): the framework and process of control object controller control strategy.Control object controller is completed to actuator
Control and sensor information acquisition, be completed at the same time the transmission of control object physical model synchronization signal;Specific such as Fig. 3 and figure
Shown in 4.
Step 3): the realization of calibrating function: control object controller supports standard CC P agreement, therefore is assisted using support CCP
The mark fixed sum data observation of analogue system can be completed in third party's calibration tool of view.
Simultaneously because the physical model of PC can be used the tool box Matlab, the support to CCP agreement is completed, therefore can be with
Using the third party's tool for supporting CCP agreement, complete to realize data to physics real-time model and controller (supporting CCP agreement)
Calibration and observation.
A kind of semi-physical simulation method based on Matlab is using the semi physical life situations of control system according to different
Emulation testing object is different and different, specifically contains control object actuator, sensor and executes load, belongs to and really hold
Row device and sensor use pair that these true actuators and sensor carry out environment locating for Simulation Control object and are controlled
As;The controller of control object is also, controller completion control to control object different according to different control objects.PC
Machine, which is used, uses industrial control computer, for running the physical model of control object.CANking is a kind of cost performance that MATLAB is supported
High CAN communication tool, CANking are used to carry out data communication between control object model and controller.
It runs control strategy in the controller and operates in the control object model on PC, control logic relationship is as schemed
Shown in 2,
The control strategy of control object model and controller different, control object model according to the different control objects of emulation
Data and synchronization frame are transmitted by CAN network with control strategy, implementation model is synchronous with control strategy.
Control object model is used to the physical environment for being relatively difficult to be simulated with true environment to those, such as the operation shape of vehicle
The emergency brake of condition and vehicle is realized using the Matlab physical model operated on PC;
The true controller of control object then completes the true control to control object, controller, actual physical control pair
As, the Matlab simulation model based on PC then pass through CAN bus network implementations communicate it is synchronous with the time.
It is described further with reference to the accompanying drawing to structural principle of the invention and using step:
When needing to needing hardware in loop to carry out physical simulation in the R&D processes such as ATM, retarder or TCU controller
It waits, it can be in this way, realizing simple semi physical, physical simulation with extremely low cost, quickening research and development of products progress be improved and is produced
Product debugging efficiency.
The difficult point of the project is that the simple physical model of controlled device is established based on Matlab, realizes the physics of control object
Model is synchronous with the Controlling model of control object, realizes real-time simulation.It can use the labeling sight work for supporting CCP calibration simultaneously
Tool is demarcated and is observed to Controlling model and physical model.The design of half hardware-in-loop simulation is realized with extremely low cost, is mentioned
High product development cycle and testing efficiency, have saved cost.
Claims (7)
1. a kind of semi-physical simulation method based on Matlab, which comprises the following steps:
Step 1), physical principle or mathematical principle according to control object, establish control object object using MATLAB software
Physical model;
Step 2), the framework and process that control object controller control strategy is established according to the physical model of control object;
The realization of step 3), calibrating function: it is assisted according to the framework of control object controller control strategy and process using support CCP
Third party's calibration tool of view completes the mark fixed sum data observation of analogue system.
2. a kind of semi-physical simulation method based on Matlab according to claim 1, which is characterized in that institute in step 1)
The physical model of the control object of foundation controls cycle time using control object controller.
3. a kind of semi-physical simulation method based on Matlab according to claim 1, which is characterized in that PC system and control
Object controller processed uses CAN network to send data and synchronization frame to reach control cycle synchronisation.
4. a kind of semi-physical simulation method based on Matlab according to claim 3, which is characterized in that Controlling model is every
A synchronization frame is received, then executes the refreshing of a physical model, realizes control synchronization and data exchange using CAN network.
5. a kind of semi-physical simulation method based on Matlab according to claim 1, which is characterized in that in step 2),
Control object controller completes that it is same to be completed at the same time control object physical model to the control of actuator and the acquisition of sensor information
Walk the transmission of signal.
6. a kind of semi-physical simulation method based on Matlab according to claim 1, which is characterized in that using control system
The semi physical life situations of system include true control object physical environment and vehicle virtual controlling object environment;True control object
Physical environment includes control object actuator, sensor and executes load;Vehicle virtual controlling object environment uses and operates in PC
Matlab physical model on machine is realized.
7. a kind of semi-physical simulation method based on Matlab according to claim 6, which is characterized in that true control pair
As physical environment is synchronous with the time by the communication of CAN bus network implementations with the Matlab physical model based on PC machine.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811319962.8A CN109613840A (en) | 2018-11-07 | 2018-11-07 | A kind of semi-physical simulation method based on Matlab |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811319962.8A CN109613840A (en) | 2018-11-07 | 2018-11-07 | A kind of semi-physical simulation method based on Matlab |
Publications (1)
Publication Number | Publication Date |
---|---|
CN109613840A true CN109613840A (en) | 2019-04-12 |
Family
ID=66003200
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811319962.8A Pending CN109613840A (en) | 2018-11-07 | 2018-11-07 | A kind of semi-physical simulation method based on Matlab |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109613840A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112230563A (en) * | 2020-09-18 | 2021-01-15 | 天津农学院 | Simulation parameter debugging method and device of embedded controller and controller |
CN113253704A (en) * | 2020-12-29 | 2021-08-13 | 际络科技(上海)有限公司 | Simulation test method, device and system for vehicle ECU and electronic equipment |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1641505A (en) * | 2005-01-07 | 2005-07-20 | 清华大学 | Simulated measuring system for whole vehicle controller |
JP2007034381A (en) * | 2005-07-22 | 2007-02-08 | A & D Co Ltd | Model design support device |
CN204480040U (en) * | 2015-02-12 | 2015-07-15 | 北京蓝时科技股份有限公司 | The test macro of fuel-cell vehicle entire car controller |
CN105223832A (en) * | 2014-06-25 | 2016-01-06 | 南车株洲电力机车研究所有限公司 | Locomotive hardware-in-the-loop simulation device, system and method |
CN105511326A (en) * | 2015-12-31 | 2016-04-20 | 北京长城华冠汽车科技股份有限公司 | Calibration system and calibration method for whole automobile controller of electric automobile |
CN206388062U (en) * | 2016-12-21 | 2017-08-08 | 唐瑞新能源科技(上海)有限公司 | Controller of new energy automobile test system |
-
2018
- 2018-11-07 CN CN201811319962.8A patent/CN109613840A/en active Pending
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1641505A (en) * | 2005-01-07 | 2005-07-20 | 清华大学 | Simulated measuring system for whole vehicle controller |
JP2007034381A (en) * | 2005-07-22 | 2007-02-08 | A & D Co Ltd | Model design support device |
CN105223832A (en) * | 2014-06-25 | 2016-01-06 | 南车株洲电力机车研究所有限公司 | Locomotive hardware-in-the-loop simulation device, system and method |
CN204480040U (en) * | 2015-02-12 | 2015-07-15 | 北京蓝时科技股份有限公司 | The test macro of fuel-cell vehicle entire car controller |
CN105511326A (en) * | 2015-12-31 | 2016-04-20 | 北京长城华冠汽车科技股份有限公司 | Calibration system and calibration method for whole automobile controller of electric automobile |
CN206388062U (en) * | 2016-12-21 | 2017-08-08 | 唐瑞新能源科技(上海)有限公司 | Controller of new energy automobile test system |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112230563A (en) * | 2020-09-18 | 2021-01-15 | 天津农学院 | Simulation parameter debugging method and device of embedded controller and controller |
CN113253704A (en) * | 2020-12-29 | 2021-08-13 | 际络科技(上海)有限公司 | Simulation test method, device and system for vehicle ECU and electronic equipment |
CN113253704B (en) * | 2020-12-29 | 2022-08-19 | 际络科技(上海)有限公司 | Simulation test method, device and system for vehicle ECU and electronic equipment |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106371813B (en) | A kind of electric vehicle motor controller method for producing software based on Simulink | |
CN110456757B (en) | Whole vehicle testing method and system for unmanned vehicle | |
CN104460646B (en) | For carrying out the test device of real-time testing to Virtual Controller | |
CN202548642U (en) | Automobile hardware in loop automatic testing device | |
CN102968059B (en) | aircraft landing gear simulator | |
US20100049486A1 (en) | Systems and Methods for Simulating Plant Operations | |
CN201829070U (en) | Hardware-in-the-loop simulating experiment platform for automatic transmission | |
CN103488098A (en) | Rapid prototyping simulation method of aircraft engine control system | |
CN103576558B (en) | A kind of robot for space dynamic simulation system and method | |
CN107341294A (en) | Spacecraft Information System Modeling emulation mode based on Modelica language | |
CN104020680B (en) | Automatic software testing method and system based on hardware-in-loop system | |
CN107944193A (en) | Avionics semi-matter simulating system | |
CN106815144A (en) | A kind of diesel engine electric control system automatic testing arrangement for softwares and method | |
WO2014086372A3 (en) | Emulating power system operations | |
CN110459785A (en) | The test macro and test method of fuel cell | |
CN109613840A (en) | A kind of semi-physical simulation method based on Matlab | |
CN106383969A (en) | Multi-body simulation data interaction method for launch vehicle | |
CN111308910B (en) | Simulation teaching platform for electric power system | |
CN103135545B (en) | Automatic gearbox controller semi-physical simulation test system | |
CN110609493A (en) | Real-time simulation method of aero-engine control system | |
WO2005043278A3 (en) | System and method for verifying and testing system requirements | |
CN106897469A (en) | A kind of test environment generation method and device | |
CN108803508A (en) | Power Plant Thermal control algolithm application system and method | |
CN107194035A (en) | A kind of automatized script generation method towards SCADE | |
CN201673404U (en) | Testing device of automobile electronic control system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20190412 |