| In response to the increasingly strict requirements for engine emission and engine fuel efficiency,the function and complexity of engine electronic control system(ECU)are continuously improved.The complication of ECU is a big test to system stability and durability,also the difficulty of developing and test of developing an ECU is continuously increased.The traditional way to develop and debug ECU is debugging ECU step by step via bench test.It will consume a lot of energy and money,and need long developing period,have an unstable debugging environment and poor repeatability and can’t be tested under limited conditions.Now,the traditional way can’t meet the requirements of rapid upgrading of ECU,while hardware-in-loop-simulation system can solve this problem effectively.Hardware-in-loop-simulation system(called HILS in the following)is a developing and testing platform for external ECU.This system uses the engine model stored in PC to figure out and simulate sensor signal needed by target ECU under special condition and forms a closed-loop developing and testing system with the engine model,which can accomplish the developing and testing of target ECU in laboratory.HILS,as carrier of virtual engine,receives and processes engine speed signal,analogs sensor signal,requests signal and switching signal sent by PC,and transfers to target ECU.At the same time,system receives and processes the engine control signals sent by target ECU,and transfers to PC.“Host-Slave”embeded system structure(called structure in the following)is used in this thesis.Slave,called simulation ECU aslo,is the communication medium between target ECU and PC.Its main function is realizing the communication between target ECU and PC,which includes the transmission and conversion of PC signals and target ECU signals.Simulation ECU collects PC signals and converts related parameters to analog quantities,such as water temperature,oil temperature etc,then transmits them to target ECU.At the same time,simulation ECU also collects target ECU signals and converts related engine control signals to digital quantities,then transmits them to PC.The main advantages of this structure are more real-time,easy to operate,having good expansibility and anti jamming capability and so on.Also,the number of camshaft and crankshaft teeth and engine speed can set freely by ourselves via PC monitoring software.In this thesis,the main works are as follows: firstly,analyze the requirements and determine overall scheme;secondly,develop the hardware system;thirdly,develop the bottom driver software;lastly,test and debug the overall system. |