CN114063604B - A software and hardware fault simulation system, method and device - Google Patents
A software and hardware fault simulation system, method and device Download PDFInfo
- Publication number
- CN114063604B CN114063604B CN202111370666.2A CN202111370666A CN114063604B CN 114063604 B CN114063604 B CN 114063604B CN 202111370666 A CN202111370666 A CN 202111370666A CN 114063604 B CN114063604 B CN 114063604B
- Authority
- CN
- China
- Prior art keywords
- fault
- software
- instruction
- hardware
- training platform
- 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.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 64
- 238000004088 simulation Methods 0.000 title claims abstract description 60
- 238000012549 training Methods 0.000 claims abstract description 148
- 238000002347 injection Methods 0.000 claims abstract description 94
- 239000007924 injection Substances 0.000 claims abstract description 94
- 230000015654 memory Effects 0.000 claims description 25
- 230000006870 function Effects 0.000 claims description 15
- 230000002093 peripheral effect Effects 0.000 claims description 15
- 238000004590 computer program Methods 0.000 claims description 6
- 238000003745 diagnosis Methods 0.000 abstract description 11
- 238000004891 communication Methods 0.000 description 7
- 238000005516 engineering process Methods 0.000 description 7
- 238000013461 design Methods 0.000 description 6
- 238000010586 diagram Methods 0.000 description 6
- 238000012545 processing Methods 0.000 description 4
- 230000001360 synchronised effect Effects 0.000 description 4
- 101001121408 Homo sapiens L-amino-acid oxidase Proteins 0.000 description 2
- 102100026388 L-amino-acid oxidase Human genes 0.000 description 2
- 101100012902 Saccharomyces cerevisiae (strain ATCC 204508 / S288c) FIG2 gene Proteins 0.000 description 2
- 101100233916 Saccharomyces cerevisiae (strain ATCC 204508 / S288c) KAR5 gene Proteins 0.000 description 2
- 238000004422 calculation algorithm Methods 0.000 description 2
- 230000000694 effects Effects 0.000 description 2
- 238000003379 elimination reaction Methods 0.000 description 2
- 230000004927 fusion Effects 0.000 description 2
- 239000000243 solution Substances 0.000 description 2
- 101000827703 Homo sapiens Polyphosphoinositide phosphatase Proteins 0.000 description 1
- 102100023591 Polyphosphoinositide phosphatase Human genes 0.000 description 1
- 238000004378 air conditioning Methods 0.000 description 1
- 230000005540 biological transmission Effects 0.000 description 1
- 238000004364 calculation method Methods 0.000 description 1
- 239000000284 extract Substances 0.000 description 1
- 230000008014 freezing Effects 0.000 description 1
- 238000007710 freezing Methods 0.000 description 1
- 238000005259 measurement Methods 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
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
- G05B23/00—Testing or monitoring of control systems or parts thereof
- G05B23/02—Electric testing or monitoring
- G05B23/0205—Electric testing or monitoring by means of a monitoring system capable of detecting and responding to faults
- G05B23/0259—Electric testing or monitoring by means of a monitoring system capable of detecting and responding to faults characterized by the response to fault detection
- G05B23/0262—Confirmation of fault detection, e.g. extra checks to confirm that a failure has indeed occurred
-
- 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
- G05B2219/00—Program-control systems
- G05B2219/20—Pc systems
- G05B2219/24—Pc safety
- G05B2219/24065—Real time diagnostics
Landscapes
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Engineering & Computer Science (AREA)
- Automation & Control Theory (AREA)
- Test And Diagnosis Of Digital Computers (AREA)
Abstract
Description
技术领域Technical Field
本发明涉及计算机技术领域,具体而言,涉及一种软件硬件故障模拟系统、方法和装置。The present invention relates to the field of computer technology, and in particular to a software and hardware fault simulation system, method and device.
背景技术Background technique
目前,越来越多的大专院校开设了无人驾驶汽车方面的课程,从顶层的自动驾驶算法设计,传感器融合技术,到底层的线控转向,线控制动技术等,均有涉及。为满足各大专院校在实际教学中的需要,需要设计一种具有故障注入功能的实训平台供学生练习故障诊断使用。At present, more and more colleges and universities have opened courses on driverless cars, ranging from the top-level autonomous driving algorithm design and sensor fusion technology to the bottom-level steer-by-wire and brake-by-wire technologies. In order to meet the needs of colleges and universities in actual teaching, it is necessary to design a training platform with fault injection function for students to practice fault diagnosis.
发明内容Summary of the invention
为解决上述问题,本发明实施例的目的在于提供一种软件硬件故障模拟系统、方法和装置。To solve the above problems, an object of the embodiments of the present invention is to provide a software and hardware fault simulation system, method and device.
第一方面,本发明实施例提供了一种软件硬件故障模拟系统,包括:In a first aspect, an embodiment of the present invention provides a software and hardware fault simulation system, comprising:
上位机、故障注入控制器和实训平台,所述故障注入控制器分别与所述上位机和所述实训平台连接;A host computer, a fault injection controller and a training platform, wherein the fault injection controller is connected to the host computer and the training platform respectively;
所述上位机,用于发送故障指令给所述故障注入控制器,其中,所述故障指令,包括:软件故障指令和硬件故障指令;The host computer is used to send a fault instruction to the fault injection controller, wherein the fault instruction includes: a software fault instruction and a hardware fault instruction;
所述故障注入控制器,用于将获取到的所述软件故障指令或者硬件故障指令发送到所述实训平台;The fault injection controller is used to send the acquired software fault instruction or hardware fault instruction to the training platform;
所述实训平台,用于接收并执行所述故障注入控制器发送的所述软件故障指令或者硬件故障指令。The training platform is used to receive and execute the software fault instruction or the hardware fault instruction sent by the fault injection controller.
第二方面,本发明实施例还提供了一种软件硬件故障模拟方法,用于上述第一方面所述的软件硬件故障模拟系统,所述方法包括:In a second aspect, an embodiment of the present invention further provides a software and hardware fault simulation method, which is used in the software and hardware fault simulation system described in the first aspect, and the method includes:
当获取到上位机发送的软件故障指令时,故障注入控制器的微处理器将所述软件故障指令发送给实训平台,由所述实训平台执行所述软件故障指令;当确定平台执行完毕所述软件故障指令时,向所述上位机发送所述软件故障指令完成信息;When a software fault instruction sent by the host computer is obtained, the microprocessor of the fault injection controller sends the software fault instruction to the training platform, and the training platform executes the software fault instruction; when it is determined that the platform has completed the execution of the software fault instruction, the software fault instruction completion information is sent to the host computer;
当获取到上位机发送的硬件故障指令时,确定与所述硬件故障指令指示的硬件故障对应的继电器;控制与所述硬件故障指令指示的硬件故障对应的继电器断开;将所述硬件故障指令发送给所述实训平台,由所述实训平台执行所述硬件故障指令;当确定所述实训平台执行完毕所述硬件故障指令时,向所述上位机发送所述硬件故障指令完成信息。When a hardware fault instruction sent by a host computer is obtained, the relay corresponding to the hardware fault indicated by the hardware fault instruction is determined; the relay corresponding to the hardware fault indicated by the hardware fault instruction is controlled to be disconnected; the hardware fault instruction is sent to the training platform, and the training platform executes the hardware fault instruction; when it is determined that the training platform has completed executing the hardware fault instruction, the hardware fault instruction completion information is sent to the host computer.
第三方面,本发明实施例还提供了一种软件硬件故障模拟装置,用于执行上述第二方面所述的软件硬件故障模拟方法,所述装置包括:In a third aspect, an embodiment of the present invention further provides a software and hardware fault simulation device, which is used to execute the software and hardware fault simulation method described in the second aspect, and the device includes:
软件故障控制模块,用于当获取到上位机发送的软件故障指令时,将所述软件故障指令发送给实训平台,由所述实训平台执行所述软件故障指令;当确定所述实训平台执行完毕所述软件故障指令时,向所述上位机发送所述软件故障指令完成信息;The software fault control module is used to, when obtaining the software fault instruction sent by the host computer, send the software fault instruction to the training platform, and the training platform executes the software fault instruction; when it is determined that the training platform has completed the execution of the software fault instruction, send the software fault instruction completion information to the host computer;
硬件故障控制模块,用于当获取到上位机发送的硬件故障指令时,确定与所述硬件故障指令指示的硬件故障对应的继电器;控制与所述硬件故障指令指示的硬件故障对应的继电器断开;将所述硬件故障指令发送给所述实训平台,由所述实训平台执行所述硬件故障指令;当确定所述实训平台执行完毕所述硬件故障指令时,向所述上位机发送所述硬件故障指令完成信息。The hardware fault control module is used to, when obtaining a hardware fault instruction sent by a host computer, determine the relay corresponding to the hardware fault indicated by the hardware fault instruction; control the relay corresponding to the hardware fault indicated by the hardware fault instruction to be disconnected; send the hardware fault instruction to the training platform, and the training platform executes the hardware fault instruction; when it is determined that the training platform has completed the execution of the hardware fault instruction, send the hardware fault instruction completion information to the host computer.
第四方面,本发明实施例还提供了一种软件硬件故障模拟方法,用于上述第一方面所述的软件硬件故障模拟系统,所述方法包括:In a fourth aspect, an embodiment of the present invention further provides a software and hardware fault simulation method, which is used in the software and hardware fault simulation system described in the first aspect, and the method includes:
当接收到所述故障注入控制器发送的软件故障指令或者硬件故障指令时,实训平台的快速原型控制器对所述软件故障指令或者硬件故障指令进行故障分级;当确定所述软件故障指令指示的软件故障或者硬件故障指令指示的硬件故障是高等级故障时,控制所述实训平台执行所述软件故障指令或者硬件故障指令,并在所述实训平台执行完成所述软件故障指令或者硬件故障指令对应的动作时,通知微处理器所述实训平台已经执行完成所述软件故障指令或者硬件故障指令对应的动作。When receiving the software fault instruction or the hardware fault instruction sent by the fault injection controller, the rapid prototype controller of the training platform performs fault classification on the software fault instruction or the hardware fault instruction; when it is determined that the software fault indicated by the software fault instruction or the hardware fault indicated by the hardware fault instruction is a high-level fault, the training platform is controlled to execute the software fault instruction or the hardware fault instruction, and when the training platform completes the action corresponding to the software fault instruction or the hardware fault instruction, the microprocessor is notified that the training platform has completed the action corresponding to the software fault instruction or the hardware fault instruction.
第五方面,本发明实施例还提供了一种软件硬件故障模拟装置,用于执行上述第四方面所述的软件硬件故障模拟方法,所述装置包括:In a fifth aspect, an embodiment of the present invention further provides a software and hardware fault simulation device, which is used to execute the software and hardware fault simulation method described in the fourth aspect, and the device includes:
当接收到故障注入控制器发送的软件故障指令或者硬件故障指令时,控制单元,用于对所述软件故障指令或者硬件故障指令进行故障分级;当确定所述软件故障指令或者硬件故障指令指示的软件故障是高等级故障时,控制所述实训平台执行所述软件故障指令或者硬件故障指令,并在所述实训平台执行完成所述软件故障指令或者硬件故障指令对应的动作时,通知微处理器所述实训平台已经执行完成所述软件故障指令或者硬件故障指令对应的动作。When receiving a software fault instruction or a hardware fault instruction sent by a fault injection controller, the control unit is used to perform fault classification on the software fault instruction or the hardware fault instruction; when it is determined that the software fault indicated by the software fault instruction or the hardware fault instruction is a high-level fault, the training platform is controlled to execute the software fault instruction or the hardware fault instruction, and when the training platform completes the action corresponding to the software fault instruction or the hardware fault instruction, the microprocessor is notified that the training platform has completed the action corresponding to the software fault instruction or the hardware fault instruction.
第六方面,本发明实施例还提供了一种计算机可读存储介质,所述计算机可读存储介质上存储有计算机程序,所述计算机程序被处理器运行时执行上述第二方面或者第四方面所述的方法的步骤。In a sixth aspect, an embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, and the computer program is executed by a processor to perform the steps of the method described in the second aspect or the fourth aspect.
第七方面,本发明实施例还提供了一种电子设备,所述电子设备包括有存储器,处理器以及一个或者一个以上的程序,其中所述一个或者一个以上程序存储于所述存储器中,且经配置以由所述处理器执行上述第二方面或者第四方面所述的方法的步骤。In the seventh aspect, an embodiment of the present invention further provides an electronic device, comprising a memory, a processor and one or more programs, wherein the one or more programs are stored in the memory and are configured so that the processor executes the steps of the method described in the second aspect or the fourth aspect above.
本发明实施例上述第一方面至第七方面提供的方案中,通过设置的上位机将软件故障指令或者硬件故障指令发送到故障注入控制器,故障注入控制器可以将软件故障指令或者硬件故障指令发送到实训平台执行;与相关技术中实训平台没有故障注入的功能相比,可以通过系统中设置的上位机和故障注入控制器向实训平台注入需要执行的软件故障指令或者硬件故障指令,可以使学生反复练习故障诊断方式和判断方法,满足了大专院校在实际教学中的需要。In the solutions provided in the first to seventh aspects of the embodiments of the present invention, a software fault instruction or a hardware fault instruction is sent to a fault injection controller through a set host computer, and the fault injection controller can send the software fault instruction or the hardware fault instruction to the training platform for execution; compared with the related technology in which the training platform does not have a fault injection function, the host computer and the fault injection controller set in the system can be used to inject the software fault instructions or the hardware fault instructions that need to be executed into the training platform, so that students can repeatedly practice fault diagnosis methods and judgment methods, meeting the needs of colleges and universities in actual teaching.
为使本发明的上述目的、特征和优点能更明显易懂,下文特举较佳实施例,并配合所附附图,作详细说明如下。In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, preferred embodiments are given below and described in detail with reference to the accompanying drawings.
附图说明BRIEF DESCRIPTION OF THE DRAWINGS
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
图1示出了本发明实施例1所提供的一种软件硬件故障模拟系统的结构示意图;FIG1 shows a schematic diagram of the structure of a software and hardware fault simulation system provided by Embodiment 1 of the present invention;
图2示出了本发明实施例2所提供的一种软件硬件故障模拟方法的流程图;FIG2 shows a flow chart of a method for simulating software and hardware faults provided by Embodiment 2 of the present invention;
图3示出了本发明实施例3所提供的一种软件硬件故障模拟装置的结构示意图;FIG3 shows a schematic diagram of the structure of a software and hardware fault simulation device provided by Embodiment 3 of the present invention;
图4示出了本发明实施例6所提供的一种电子设备的结构示意图。FIG. 4 shows a schematic structural diagram of an electronic device provided by Embodiment 6 of the present invention.
具体实施方式Detailed ways
在本发明的描述中,需要理解的是,术语“中心”、“纵向”、“横向”、“长度”、“宽度”、“厚度”、“上”、“下”、“前”、“后”、“左”、“右”、“竖直”、“水平”、“顶”、“底”“内”、“外”、“顺时针”、“逆时针”等指示的方位或位置关系为基于附图所示的方位或位置关系,仅是为了便于描述本发明和简化描述,而不是指示或暗示所指的装置或元件必须具有特定的方位、以特定的方位构造和操作,因此不能理解为对本发明的限制。In the description of the present invention, it should be understood that the terms "center", "longitudinal", "lateral", "length", "width", "thickness", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside", "clockwise", "counterclockwise" and the like indicate orientations or positional relationships based on the orientations or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the referred device or element must have a specific orientation, be constructed and operated in a specific orientation, and therefore should not be understood as limiting the present invention.
此外,术语“第一”、“第二”仅用于描述目的,而不能理解为指示或暗示相对重要性或者隐含指明所指示的技术特征的数量。由此,限定有“第一”、“第二”的特征可以明示或者隐含地包括一个或者更多个该特征。在本发明的描述中,“多个”的含义是两个或两个以上,除非另有明确具体的限定。In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. In the description of the present invention, the meaning of "plurality" is two or more, unless otherwise clearly and specifically defined.
在本发明中,除非另有明确的规定和限定,术语“安装”、“相连”、“连接”、“固定”等术语应做广义理解,例如,可以是固定连接,也可以是可拆卸连接,或一体地连接;可以是机械连接,也可以是电连接;可以是直接相连,也可以通过中间媒介间接相连,可以是两个元件内部的连通。对于本领域的普通技术人员而言,可以根据具体情况理解上述术语在本发明中的具体含义。In the present invention, unless otherwise clearly specified and limited, the terms "installed", "connected", "connected", "fixed" and the like should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be an indirect connection through an intermediate medium, or it can be the internal communication of two components. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
目前,越来越多的大专院校开设了无人驾驶汽车方面的课程,从顶层的自动驾驶算法设计,传感器融合技术,到底层的线控转向,线控制动技术等,均有涉及。为满足各大专院校在实际教学中的需要,需要设计一种具有故障注入功能的实训平台供学生练习故障诊断使用。At present, more and more colleges and universities have opened courses on driverless cars, ranging from the top-level autonomous driving algorithm design and sensor fusion technology to the bottom-level steer-by-wire and brake-by-wire technologies. In order to meet the needs of colleges and universities in actual teaching, it is necessary to design a training platform with fault injection function for students to practice fault diagnosis.
基于此,本实施例提出一种软件硬件故障模拟系统、方法和装置,通过设置的上位机将软件故障指令或者硬件故障指令发送到故障注入控制器,故障注入控制器可以将软件故障指令或者硬件故障指令发送到实训平台执行;与相关技术中实训平台没有故障注入的功能相比,可以通过系统中设置的上位机和故障注入控制器向实训平台注入需要执行的软件故障指令或者硬件故障指令,可以使学生反复练习故障诊断方式和判断方法,满足了大专院校在实际教学中的需要。Based on this, this embodiment proposes a software and hardware fault simulation system, method and device, which sends software fault instructions or hardware fault instructions to a fault injection controller through a set host computer, and the fault injection controller can send the software fault instructions or hardware fault instructions to a training platform for execution; compared with the related technology in which the training platform does not have a fault injection function, the host computer and fault injection controller set in the system can inject software fault instructions or hardware fault instructions that need to be executed into the training platform, so that students can repeatedly practice fault diagnosis methods and judgment methods, meeting the needs of colleges and universities in actual teaching.
为使本申请的上述目的、特征和优点能够更加明显易懂,下面结合附图和具体实施方式对本申请做进一步详细的说明。In order to make the above-mentioned objects, features and advantages of the present application more obvious and easy to understand, the present application is further described in detail below in conjunction with the accompanying drawings and specific implementation methods.
实施例1Example 1
参见图1所示的一种软件硬件故障模拟系统的结构示意图,本实施例提出一种软件硬件故障模拟系统,包括:Referring to the structural diagram of a software and hardware fault simulation system shown in FIG1 , this embodiment provides a software and hardware fault simulation system, including:
上位机100、故障注入控制器102和实训平台104,所述故障注入控制器102分别与所述上位机100和所述实训平台104连接。A host computer 100 , a fault injection controller 102 and a training platform 104 , wherein the fault injection controller 102 is connected to the host computer 100 and the training platform 104 respectively.
其中,上位机100可以采用触控式一体机,上位机100上运行的软件系统平台是基于LabVIEW软件环境开发的,通过CAN总线与实训平台104和故障注入控制器102进行通信。故障注入控制器102为CAN控16路继电器集成板,可以直接触发电路中继电器的通断,从而达到故障注入的功能。The host computer 100 can be a touch-screen all-in-one computer. The software system platform running on the host computer 100 is developed based on the LabVIEW software environment and communicates with the training platform 104 and the fault injection controller 102 through the CAN bus. The fault injection controller 102 is a CAN-controlled 16-way relay integrated board that can directly trigger the on and off of the relay in the circuit, thereby achieving the function of fault injection.
所述上位机100,用于发送故障指令给所述故障注入控制器102,其中,所述故障指令,包括:软件故障指令和硬件故障指令。The host computer 100 is used to send a fault instruction to the fault injection controller 102, wherein the fault instruction includes: a software fault instruction and a hardware fault instruction.
所述软件故障指令,用于指示车辆的行车电脑、ECU中的软件运行过程中所出现的运行故障、升级故障以及通信故障等发生故障时,所产生的故障指令。The software fault instruction is used to indicate the fault instructions generated when an operation fault, upgrade fault, communication fault, etc. occur during the operation of the software in the vehicle's on-board computer or ECU.
所述硬件故障指令,用于指示所述车辆的发动机、制动系统、安全气囊、车辆信号灯等部件出现故障时,所产生的故障指令。The hardware fault instruction is used to indicate a fault instruction generated when a fault occurs in a component such as the engine, brake system, airbag, or vehicle signal light of the vehicle.
所述故障指令,携带有故障标识;所述故障标识,用于唯一标识故障指令携带的具体的软件故障/硬件故障。The fault instruction carries a fault identifier, and the fault identifier is used to uniquely identify a specific software fault or hardware fault carried by the fault instruction.
所述软件故障指令中携带的故障标识一定是软件故障的故障标识。The fault identifier carried in the software fault instruction must be the fault identifier of the software fault.
所述硬件故障指令中携带的故障标识一定是硬件故障的故障标识。The fault identifier carried in the hardware fault instruction must be the fault identifier of the hardware fault.
所述故障注入控制器102,用于将获取到的所述软件故障指令或者硬件故障指令发送到所述实训平台。The fault injection controller 102 is used to send the acquired software fault instruction or hardware fault instruction to the training platform.
所述故障注入控制器102,包括:微处理器和外围电路。The fault injection controller 102 includes a microprocessor and peripheral circuits.
所述微处理器、所述上位机100、以及所述实训平台104分别与所述外围电路连接。The microprocessor, the host computer 100, and the training platform 104 are respectively connected to the peripheral circuit.
在一个实施方式中,所述微处理器、所述上位机100、以及所述实训平台104通过CAN总线分别与所述外围电路连接。In one embodiment, the microprocessor, the host computer 100, and the training platform 104 are respectively connected to the peripheral circuit via a CAN bus.
所述外围电路,包括但不限于:通讯电路、信号处理电路以及供电电路。从而使得所述故障注入控制器102中的微控制器可以通过所述外围电路与上位机100和实训平台104进行交互。The peripheral circuits include, but are not limited to, communication circuits, signal processing circuits, and power supply circuits, so that the microcontroller in the fault injection controller 102 can interact with the host computer 100 and the training platform 104 through the peripheral circuits.
所述外围电路所包含的电路以及电路之间的连接关系均是现有技术中可以在电路板上设置的任何通讯电路、信号处理电路以及供电电路以及这些电路之间的连接关系,这里不再赘述。The circuits included in the peripheral circuit and the connection relationships between the circuits are any communication circuits, signal processing circuits and power supply circuits that can be set on the circuit board in the prior art and the connection relationships between these circuits, which will not be repeated here.
当获取到所述上位机100发送的软件故障指令时,所述微处理器将所述软件故障指令发送给所述实训平台104,由所述实训平台104执行所述软件故障指令;当确定所述实训平台104执行完毕所述软件故障指令时,向所述上位机100发送所述软件故障指令完成信息。When the software fault instruction sent by the host computer 100 is obtained, the microprocessor sends the software fault instruction to the training platform 104, and the training platform 104 executes the software fault instruction; when it is determined that the training platform 104 has completed executing the software fault instruction, the software fault instruction completion information is sent to the host computer 100.
为了向所述上位机100发送所述软件故障指令完成信息,所述微处理器,可以利用接收到的所述软件故障指令中的故障标识生成软件故障指令完成信息,并将生成的软件故障指令完成信息以原始CAN报文的形式反馈给所述上位机100。In order to send the software fault instruction completion information to the host computer 100, the microprocessor can generate software fault instruction completion information using the fault identifier in the received software fault instruction, and feed back the generated software fault instruction completion information to the host computer 100 in the form of an original CAN message.
所述微处理器中预先存储有故障标识与继电器的对应关系。The microprocessor pre-stores the corresponding relationship between the fault identifier and the relay.
为了更好的执行上位机100发送的硬件控制指令,所述故障注入控制器,还包括:继电器模块;所述继电器模块,包括与不同的硬件故障分别对应的多个继电器。In order to better execute the hardware control instructions sent by the host computer 100, the fault injection controller further includes: a relay module; the relay module includes a plurality of relays corresponding to different hardware faults.
所述多个继电器中的各继电器分别与所述外围电路连接。Each of the plurality of relays is connected to the peripheral circuit, respectively.
当获取到所述上位机100发送的硬件故障指令时,所述微处理器确定与所述硬件故障指令指示的硬件故障对应的继电器,控制与所述硬件故障指令指示的硬件故障对应的继电器断开;将所述硬件故障指令发送给所述实训平台104,由所述实训平台104执行所述硬件故障指令;当确定实训平台104执行完毕所述硬件故障指令时,向所述上位机100发送所述硬件故障指令完成信息。When the hardware fault instruction sent by the host computer 100 is obtained, the microprocessor determines the relay corresponding to the hardware fault indicated by the hardware fault instruction, and controls the relay corresponding to the hardware fault indicated by the hardware fault instruction to disconnect; sends the hardware fault instruction to the training platform 104, and the training platform 104 executes the hardware fault instruction; when it is determined that the training platform 104 has completed executing the hardware fault instruction, the hardware fault instruction completion information is sent to the host computer 100.
所述微处理器确定与所述硬件故障指令指示的硬件故障对应的继电器,控制与所述硬件故障指令指示的硬件故障对应的继电器断开的具体过程如下:所述微处理器接收到所述上位机100发送的硬件故障指令后,所述微处理器根据预先存储的故障标识与继电器的对应关系,确定出与所述硬件故障指令携带的故障标识对应的继电器,然后向与所述硬件故障指令携带的故障标识对应的继电器发送断开指令,控制与所述硬件故障指令指示的硬件故障对应的继电器断开。The specific process of the microprocessor determining the relay corresponding to the hardware fault indicated by the hardware fault instruction and controlling the relay corresponding to the hardware fault indicated by the hardware fault instruction to disconnect is as follows: after the microprocessor receives the hardware fault instruction sent by the host computer 100, the microprocessor determines the relay corresponding to the fault identifier carried by the hardware fault instruction based on the pre-stored correspondence between the fault identifier and the relay, and then sends a disconnection instruction to the relay corresponding to the fault identifier carried by the hardware fault instruction, thereby controlling the relay corresponding to the hardware fault indicated by the hardware fault instruction to disconnect.
通过以上描述的内容后可以确定:在所述故障注入控制器104执行的过程中,上位机100发出的硬件故障指令经过外围电路被发送到微控制器,微控制器经过计算,将硬件故障指令经外围电路的处理后再发送给继电器模块和实训平台104去执行。Through the above description, it can be determined that during the execution of the fault injection controller 104, the hardware fault instruction issued by the host computer 100 is sent to the microcontroller through the peripheral circuit. After calculation, the microcontroller processes the hardware fault instruction through the peripheral circuit and then sends it to the relay module and training platform 104 for execution.
为了在故障注入控制器102执行故障指令时进行声音提示,说明此时所述故障注入控制器102正在执行故障注入功能,所述故障注入控制器102,还包括:蜂鸣器。In order to provide a sound prompt when the fault injection controller 102 executes a fault instruction, indicating that the fault injection controller 102 is executing the fault injection function, the fault injection controller 102 further includes a buzzer.
所述蜂鸣器与所述微处理器连接。The buzzer is connected to the microprocessor.
当获取到所述上位机发送的软件故障指令或者硬件故障指令时,所述微处理器控制所述蜂鸣器发出蜂鸣声。When a software fault instruction or a hardware fault instruction sent by the host computer is obtained, the microprocessor controls the buzzer to emit a buzzing sound.
在通过以上内容,对故障注入控制器102如何进行故障注入进行说明后,可以继续通过以下内容,对所述实训平台104是如何具体实现进行说明:After explaining how the fault injection controller 102 performs fault injection through the above content, the following content can be continued to explain how the training platform 104 is specifically implemented:
所述实训平台104,用于接收并执行所述故障注入控制器102发送的所述软件故障指令或者硬件故障指令。The training platform 104 is used to receive and execute the software fault instruction or the hardware fault instruction sent by the fault injection controller 102 .
所述实训平台104,可以是但不限于:线控转向实训平台和线控驱动和制动实训平台。The training platform 104 may be, but is not limited to, a wire-controlled steering training platform and a wire-controlled driving and braking training platform.
在一个实施方式中,所述实训平台104,包括:快速原型控制器。In one embodiment, the training platform 104 includes: a rapid prototyping controller.
所述快速原型控制器,与所述外围电路连接。The rapid prototype controller is connected to the peripheral circuit.
当接收到所述故障注入控制器发送的软件故障指令或者硬件故障指令时,所述快速原型控制器对所述软件故障指令或者硬件故障指令进行故障分级;当确定所述软件故障指令指示的软件故障或者硬件故障指令指示的硬件故障是高等级故障时,控制所述实训平台104执行所述软件故障指令或者硬件故障指令,并在所述实训平台104执行完成所述软件故障指令或者硬件故障指令对应的动作时,通知所述微处理器所述实训平台104已经执行完成所述软件故障指令或者硬件故障指令对应的动作。When receiving the software fault instruction or the hardware fault instruction sent by the fault injection controller, the rapid prototyping controller performs fault classification on the software fault instruction or the hardware fault instruction; when it is determined that the software fault indicated by the software fault instruction or the hardware fault indicated by the hardware fault instruction is a high-level fault, the training platform 104 is controlled to execute the software fault instruction or the hardware fault instruction, and when the training platform 104 completes the action corresponding to the software fault instruction or the hardware fault instruction, the microprocessor is notified that the training platform 104 has completed the action corresponding to the software fault instruction or the hardware fault instruction.
所述快速原型控制器中预先存储有故障分级表,该所述故障分级表中记录有故障标识与故障分级之间的对应关系。A fault classification table is pre-stored in the rapid prototype controller, and the corresponding relationship between fault identifiers and fault classifications is recorded in the fault classification table.
所述故障分级,包括:高等级故障和低等级故障。The fault classification includes: high-level faults and low-level faults.
其中,所述低等级故障是车辆中可以自行修复的故障:如软件故障中的行车电脑死机、软件升级失败;以及硬件故障中的:汽油缺少、更换空调滤芯。Among them, the low-level faults are faults that can be repaired by the vehicle itself: such as the freezing of the on-board computer and the failure of software upgrade in software faults; and the lack of gasoline and replacement of the air-conditioning filter in hardware faults.
所述高等级故障是车辆中需要检修才可以修复的故障:如:软件故障中的行车电脑影像显示问题、行车电脑软件启动失败;以及硬件故障中的:发动机故障、制动系统故障。The high-level faults are faults in the vehicle that need to be repaired before they can be repaired: such as: on-board computer image display problems and on-board computer software startup failures in software faults; and: engine faults and brake system faults in hardware faults.
因此,所述故障分级表中,故障标识与故障分级之间的对应关系可以如下表示:Therefore, in the fault classification table, the corresponding relationship between the fault identification and the fault classification can be expressed as follows:
上述故障标识与故障分级之间的对应关系仅为示例,所述故障标识还可以由数字和字符组成的代码表示,这里不再赘述。The above correspondence between the fault identification and the fault classification is only an example. The fault identification can also be represented by a code composed of numbers and characters, which will not be repeated here.
所述快速原型控制器为了对所述软件故障指令或者硬件故障指令进行故障分级,可以执行以下具体流程:In order to perform fault classification on the software fault instruction or the hardware fault instruction, the rapid prototyping controller may execute the following specific process:
所述快速原型控制器从得到的软件故障指令或者硬件故障指令中提取出故障标识;根据提取出的故障标识,基于所述故障分级表中记载的故障标识与故障分级之间的对应关系,对所述软件故障指令或者硬件故障指令进行故障分级。从而确定所述软件故障指令或者硬件故障指令指示的软件故障或者硬件故障属于低等级故障,还是属于高等级故障。The rapid prototyping controller extracts a fault identifier from the obtained software fault instruction or hardware fault instruction; and classifies the software fault instruction or hardware fault instruction according to the extracted fault identifier and the corresponding relationship between the fault identifier and the fault classification recorded in the fault classification table, thereby determining whether the software fault or hardware fault indicated by the software fault instruction or hardware fault instruction belongs to a low-level fault or a high-level fault.
所述实训平台104除了包括上述的快速原型控制器外,还可以包括:执行器。所述实训平台104的执行器,用于在快速原型控制器的控制下执行被确定为高等级故障的软件故障指令或者硬件故障指令。具体的执行过程是现有技术,这里不再赘述。In addition to the above-mentioned rapid prototyping controller, the training platform 104 may also include an actuator. The actuator of the training platform 104 is used to execute software fault instructions or hardware fault instructions determined to be high-level faults under the control of the rapid prototyping controller. The specific execution process is prior art and will not be repeated here.
软件故障解除流程:当软件故障指令注入后,操作者可以根据故障注入控制器反馈到上位机100中的原始CAN报文排查出故障原因。Software fault elimination process: After the software fault instruction is injected, the operator can find out the cause of the fault according to the original CAN message fed back to the host computer 100 by the fault injection controller.
硬件故障解除流程:当硬件故障指令注入后,操作者需要根据实训平台104的执行器表现的故障现象、测量点信号、以及上位机100中显示的系统参数状态进行故障诊断并排除。Hardware fault elimination process: After the hardware fault instruction is injected, the operator needs to diagnose and eliminate the fault according to the fault phenomenon exhibited by the actuator of the training platform 104, the measurement point signal, and the system parameter status displayed in the host computer 100.
通过以上的内容可以确定软件硬件故障模拟系统具有以下优点:From the above content, it can be determined that the software and hardware fault simulation system has the following advantages:
1、基于CAN总线进行通信,可以任意在CAN总线上增加节点实现对外拓展通信,具有功能可拓展性和可观测性的特点。1. Communication is based on the CAN bus. Any node can be added to the CAN bus to achieve external expansion communication, which has the characteristics of functional scalability and observability.
2、既可以基于当前实训平台进行真实的硬件故障模拟,还可以对一些当前实训平台以外的车辆上的洗车电脑、以及ECU中常见的软件故障进行模拟。大大提高了本实施例提出的软件硬件故障模拟系统的实用性。2. It can simulate real hardware faults based on the current training platform, and can also simulate common software faults in car wash computers and ECUs on vehicles other than the current training platform. This greatly improves the practicality of the software and hardware fault simulation system proposed in this embodiment.
3、本实施例提出的软件硬件故障模拟系统作为用于示教的教学平台,软件故障注入可以锻炼学生对自动驾驶系统上层最常用的CAN通信能力,硬件故障注入可以锻炼学生掌握车辆常见的硬件故障,可以做到兼备车辆软件故障和硬件故障的实训效果,全方面地进行教学展示。3. The software and hardware fault simulation system proposed in this embodiment serves as a teaching platform for demonstration. Software fault injection can train students to master the most commonly used CAN communication capabilities of the upper layer of the autonomous driving system, and hardware fault injection can train students to master common vehicle hardware failures. It can achieve the practical training effects of both vehicle software failures and hardware failures, and conduct comprehensive teaching demonstrations.
综上,本实施例提出的软件硬件故障模拟系统在现有实训平台设计架构的基础上增加了故障注入控制器102和上位机100。本实施例提出的软件硬件故障模拟系统的连接方式:在现有实训平台设计连接方式的基础上,通过上位机100与故障注入控制器102进行交互,通过上位机100可以控制故障注入控制器102,而故障注入控制器102中的各继电器又直接与实训平台104上的硬线的通断相关联。因此,通过借助本实施例提出的软件硬件故障模拟系统,就可以直接通过上位机100控制实训平台104中线路的通断,从而达到故障注入的效果。In summary, the software and hardware fault simulation system proposed in this embodiment adds a fault injection controller 102 and a host computer 100 on the basis of the existing training platform design architecture. The connection method of the software and hardware fault simulation system proposed in this embodiment: on the basis of the existing training platform design connection method, the host computer 100 interacts with the fault injection controller 102, and the host computer 100 can control the fault injection controller 102, and each relay in the fault injection controller 102 is directly associated with the on-off of the hard wire on the training platform 104. Therefore, by using the software and hardware fault simulation system proposed in this embodiment, the on-off of the line in the training platform 104 can be directly controlled by the host computer 100, so as to achieve the effect of fault injection.
综上所述,本实施例提出一种软件硬件故障模拟系统,通过设置的上位机将软件故障指令或者硬件故障指令发送到故障注入控制器,故障注入控制器可以将软件故障指令或者硬件故障指令发送到实训平台执行;与相关技术中实训平台没有故障注入的功能相比,可以通过系统中设置的上位机和故障注入控制器向实训平台注入需要执行的软件故障指令或者硬件故障指令,可以使学生反复练习故障诊断方式和判断方法,满足了大专院校在实际教学中的需要。In summary, this embodiment proposes a software and hardware fault simulation system, which sends software fault instructions or hardware fault instructions to a fault injection controller through a set host computer, and the fault injection controller can send the software fault instructions or hardware fault instructions to a training platform for execution; compared with the related art in which the training platform does not have a fault injection function, the host computer and the fault injection controller set in the system can inject the software fault instructions or hardware fault instructions that need to be executed into the training platform, so that students can repeatedly practice fault diagnosis methods and judgment methods, meeting the needs of colleges and universities in actual teaching.
实施例2Example 2
本实施例提出一种软件硬件故障模拟方法,用于实现上述实施例1中软件硬件故障模拟系统中故障注入控制器所实现的功能。This embodiment provides a software and hardware fault simulation method, which is used to implement the functions implemented by the fault injection controller in the software and hardware fault simulation system in the above-mentioned embodiment 1.
参见图2所示的一种软件硬件故障模拟方法的流程图,本实施例提出一种软件硬件故障模拟方法,用于上述实施例1中软件硬件故障模拟系统,所述方法包括以下具体步骤:Referring to the flowchart of a software and hardware fault simulation method shown in FIG2 , this embodiment proposes a software and hardware fault simulation method, which is used in the software and hardware fault simulation system in the above-mentioned embodiment 1, and the method includes the following specific steps:
步骤200、当获取到上位机发送的软件故障指令时,故障注入控制器的微处理器将所述软件故障指令发送给实训平台,由所述实训平台执行所述软件故障指令;当确定平台执行完毕所述软件故障指令时,向所述上位机发送所述软件故障指令完成信息;Step 200: When a software fault instruction sent by the host computer is obtained, the microprocessor of the fault injection controller sends the software fault instruction to the training platform, and the training platform executes the software fault instruction; when it is determined that the platform has completed executing the software fault instruction, the software fault instruction completion information is sent to the host computer;
步骤202、当获取到上位机发送的硬件故障指令时,确定与所述硬件故障指令指示的硬件故障对应的继电器;控制与所述硬件故障指令指示的硬件故障对应的继电器断开;将所述硬件故障指令发送给所述实训平台,由所述实训平台执行所述硬件故障指令;当确定所述实训平台执行完毕所述硬件故障指令时,向所述上位机发送所述硬件故障指令完成信息。Step 202: When a hardware fault instruction sent by the host computer is obtained, determine the relay corresponding to the hardware fault indicated by the hardware fault instruction; control the relay corresponding to the hardware fault indicated by the hardware fault instruction to disconnect; send the hardware fault instruction to the training platform, and the training platform executes the hardware fault instruction; when it is determined that the training platform has completed the execution of the hardware fault instruction, send the hardware fault instruction completion information to the host computer.
综上所述,本实施例提出一种软件硬件故障模拟方法,通过设置的上位机将软件故障指令或者硬件故障指令发送到故障注入控制器,故障注入控制器可以将软件故障指令或者硬件故障指令发送到实训平台执行;与相关技术中实训平台没有故障注入的功能相比,可以通过系统中设置的上位机和故障注入控制器向实训平台注入需要执行的软件故障指令或者硬件故障指令,可以使学生反复练习故障诊断方式和判断方法,满足了大专院校在实际教学中的需要。In summary, this embodiment proposes a software and hardware fault simulation method, in which a software fault instruction or a hardware fault instruction is sent to a fault injection controller through a set upper computer, and the fault injection controller can send the software fault instruction or the hardware fault instruction to a training platform for execution; compared with the related art in which the training platform does not have a fault injection function, the upper computer and the fault injection controller set in the system can be used to inject the software fault instruction or the hardware fault instruction that needs to be executed into the training platform, so that students can repeatedly practice fault diagnosis methods and judgment methods, meeting the needs of colleges and universities in actual teaching.
实施例3Example 3
本实施例提出一种软件硬件故障模拟装置,用于执行上述实施例2提出的软件硬件故障模拟方法。This embodiment proposes a software and hardware fault simulation device, which is used to execute the software and hardware fault simulation method proposed in the above embodiment 2.
参见图3所示的一种软件硬件故障模拟装置的结构示意图,本实施例提出一种软件硬件故障模拟装置,包括:Referring to the structural diagram of a software and hardware fault simulation device shown in FIG3 , this embodiment provides a software and hardware fault simulation device, including:
软件故障控制模块300,用于当获取到上位机发送的软件故障指令时,将所述软件故障指令发送给实训平台,由所述实训平台执行所述软件故障指令;当确定所述实训平台执行完毕所述软件故障指令时,向所述上位机发送所述软件故障指令完成信息;The software fault control module 300 is used to, when obtaining the software fault instruction sent by the host computer, send the software fault instruction to the training platform, and the training platform executes the software fault instruction; when it is determined that the training platform has completed the execution of the software fault instruction, send the software fault instruction completion information to the host computer;
硬件故障控制模块302,用于当获取到上位机发送的硬件故障指令时,确定与所述硬件故障指令指示的硬件故障对应的继电器;控制与所述硬件故障指令指示的硬件故障对应的继电器断开;将所述硬件故障指令发送给所述实训平台,由所述实训平台执行所述硬件故障指令;当确定所述实训平台执行完毕所述硬件故障指令时,向所述上位机发送所述硬件故障指令完成信息。The hardware fault control module 302 is used to, when obtaining a hardware fault instruction sent by the upper computer, determine the relay corresponding to the hardware fault indicated by the hardware fault instruction; control the relay corresponding to the hardware fault indicated by the hardware fault instruction to be disconnected; send the hardware fault instruction to the training platform, and the training platform executes the hardware fault instruction; when it is determined that the training platform has completed the execution of the hardware fault instruction, send the hardware fault instruction completion information to the upper computer.
综上所述,本实施例提出一种软件硬件故障模拟装置,通过设置的上位机将软件故障指令或者硬件故障指令发送到故障注入控制器,故障注入控制器可以将软件故障指令或者硬件故障指令发送到实训平台执行;与相关技术中实训平台没有故障注入的功能相比,可以通过系统中设置的上位机和故障注入控制器向实训平台注入需要执行的软件故障指令或者硬件故障指令,可以使学生反复练习故障诊断方式和判断方法,满足了大专院校在实际教学中的需要。In summary, this embodiment proposes a software and hardware fault simulation device, which sends software fault instructions or hardware fault instructions to a fault injection controller through a set host computer, and the fault injection controller can send the software fault instructions or hardware fault instructions to a training platform for execution; compared with the related art in which the training platform does not have a fault injection function, the host computer and the fault injection controller set in the system can inject the software fault instructions or hardware fault instructions that need to be executed into the training platform, so that students can repeatedly practice fault diagnosis methods and judgment methods, meeting the needs of colleges and universities in actual teaching.
实施例4Example 4
本实施例提出一种软件硬件故障模拟方法,用于实现上述实施例1中软件硬件故障模拟系统中实训平台的快速原型控制器所实现的功能。This embodiment proposes a software and hardware fault simulation method for realizing the functions realized by the rapid prototyping controller of the training platform in the software and hardware fault simulation system in the above-mentioned embodiment 1.
本实施例提出一种软件硬件故障模拟方法,用于上述实施例1中软件硬件故障模拟系统,所述方法包括:This embodiment provides a software and hardware fault simulation method, which is used in the software and hardware fault simulation system in the above embodiment 1. The method includes:
当接收到所述故障注入控制器发送的软件故障指令或者硬件故障指令时,实训平台的快速原型控制器对所述软件故障指令或者硬件故障指令进行故障分级;当确定所述软件故障指令指示的软件故障或者硬件故障指令指示的硬件故障是高等级故障时,控制所述实训平台执行所述软件故障指令或者硬件故障指令,并在所述实训平台执行完成所述软件故障指令或者硬件故障指令对应的动作时,通知微处理器所述实训平台已经执行完成所述软件故障指令或者硬件故障指令对应的动作。When receiving the software fault instruction or the hardware fault instruction sent by the fault injection controller, the rapid prototype controller of the training platform performs fault classification on the software fault instruction or the hardware fault instruction; when it is determined that the software fault indicated by the software fault instruction or the hardware fault indicated by the hardware fault instruction is a high-level fault, the training platform is controlled to execute the software fault instruction or the hardware fault instruction, and when the training platform completes the action corresponding to the software fault instruction or the hardware fault instruction, the microprocessor is notified that the training platform has completed the action corresponding to the software fault instruction or the hardware fault instruction.
综上所述,本实施例提出一种软件硬件故障模拟方法,通过设置的上位机将软件故障指令或者硬件故障指令发送到故障注入控制器,故障注入控制器可以将软件故障指令或者硬件故障指令发送到实训平台执行;与相关技术中实训平台没有故障注入的功能相比,可以通过系统中设置的上位机和故障注入控制器向实训平台注入需要执行的软件故障指令或者硬件故障指令,可以使学生反复练习故障诊断方式和判断方法,满足了大专院校在实际教学中的需要。In summary, this embodiment proposes a software and hardware fault simulation method, in which a software fault instruction or a hardware fault instruction is sent to a fault injection controller through a set upper computer, and the fault injection controller can send the software fault instruction or the hardware fault instruction to a training platform for execution; compared with the related art in which the training platform does not have a fault injection function, the upper computer and the fault injection controller set in the system can be used to inject the software fault instruction or the hardware fault instruction that needs to be executed into the training platform, so that students can repeatedly practice fault diagnosis methods and judgment methods, meeting the needs of colleges and universities in actual teaching.
实施例5Example 5
本实施例提出一种软件硬件故障模拟装置,用于执行上述实施例4提出的软件硬件故障模拟方法。This embodiment provides a software and hardware fault simulation device, which is used to execute the software and hardware fault simulation method provided in the above-mentioned embodiment 4.
本实施例提出一种软件硬件故障模拟装置,所述装置包括:This embodiment provides a software and hardware fault simulation device, the device comprising:
当接收到故障注入控制器发送的软件故障指令或者硬件故障指令时,控制单元,用于对所述软件故障指令或者硬件故障指令进行故障分级;当确定所述软件故障指令或者硬件故障指令指示的软件故障是高等级故障时,控制所述实训平台执行所述软件故障指令或者硬件故障指令,并在所述实训平台执行完成所述软件故障指令或者硬件故障指令对应的动作时,通知微处理器所述实训平台已经执行完成所述软件故障指令或者硬件故障指令对应的动作。When receiving a software fault instruction or a hardware fault instruction sent by a fault injection controller, the control unit is used to perform fault classification on the software fault instruction or the hardware fault instruction; when it is determined that the software fault indicated by the software fault instruction or the hardware fault instruction is a high-level fault, the training platform is controlled to execute the software fault instruction or the hardware fault instruction, and when the training platform completes the action corresponding to the software fault instruction or the hardware fault instruction, the microprocessor is notified that the training platform has completed the action corresponding to the software fault instruction or the hardware fault instruction.
综上所述,本实施例提出一种软件硬件故障模拟装置,通过设置的上位机将软件故障指令或者硬件故障指令发送到故障注入控制器,故障注入控制器可以将软件故障指令或者硬件故障指令发送到实训平台执行;与相关技术中实训平台没有故障注入的功能相比,可以通过系统中设置的上位机和故障注入控制器向实训平台注入需要执行的软件故障指令或者硬件故障指令,可以使学生反复练习故障诊断方式和判断方法,满足了大专院校在实际教学中的需要。In summary, this embodiment proposes a software and hardware fault simulation device, which sends software fault instructions or hardware fault instructions to a fault injection controller through a set host computer, and the fault injection controller can send the software fault instructions or hardware fault instructions to a training platform for execution; compared with the related art in which the training platform does not have a fault injection function, the host computer and the fault injection controller set in the system can inject the software fault instructions or hardware fault instructions that need to be executed into the training platform, so that students can repeatedly practice fault diagnosis methods and judgment methods, meeting the needs of colleges and universities in actual teaching.
实施例6Example 6
本实施例提出一种计算机可读存储介质,所述计算机可读存储介质上存储有计算机程序,所述计算机程序被处理器运行时执行上述实施例2和实施例4描述的软件硬件故障模拟方法中的步骤。具体实现可参见方法上述实施例2和实施例4,在此不再赘述。This embodiment proposes a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps in the software and hardware fault simulation method described in the above-mentioned embodiments 2 and 4 are executed. The specific implementation can be referred to the above-mentioned embodiments 2 and 4 of the method, which will not be repeated here.
此外,参见图4所示的一种电子设备的结构示意图,本实施例还提出一种电子设备,上述电子设备包括总线51、处理器52、收发机53、总线接口54、存储器55和用户接口56。上述电子设备包括有存储器55。In addition, referring to the structural diagram of an electronic device shown in FIG4 , this embodiment further provides an electronic device, which includes a bus 51 , a processor 52 , a transceiver 53 , a bus interface 54 , a memory 55 and a user interface 56 . The electronic device includes a memory 55 .
本实施例中,上述电子设备还包括:存储在存储器55上并可在处理器52上运行的一个或者一个以上的程序,经配置以由上述处理器执行上述一个或者一个以上程序可以用于进行以下步骤(1)至步骤(2):In this embodiment, the electronic device further includes: one or more programs stored in the memory 55 and executable on the processor 52, and the one or more programs are configured to be executed by the processor to perform the following steps (1) to (2):
(1)当获取到上位机发送的软件故障指令时,将所述软件故障指令发送给实训平台,由所述实训平台执行所述软件故障指令;当确定平台执行完毕所述软件故障指令时,向所述上位机发送所述软件故障指令完成信息;(1) when a software fault instruction sent by the host computer is obtained, the software fault instruction is sent to the training platform, and the training platform executes the software fault instruction; when it is determined that the platform has completed the execution of the software fault instruction, the completion information of the software fault instruction is sent to the host computer;
(2)当获取到上位机发送的硬件故障指令时,确定与所述硬件故障指令指示的硬件故障对应的继电器;控制与所述硬件故障指令指示的硬件故障对应的继电器断开;将所述硬件故障指令发送给所述实训平台,由所述实训平台执行所述硬件故障指令;当确定所述实训平台执行完毕所述硬件故障指令时,向所述上位机发送所述硬件故障指令完成信息。(2) When a hardware fault instruction sent by the host computer is obtained, the relay corresponding to the hardware fault indicated by the hardware fault instruction is determined; the relay corresponding to the hardware fault indicated by the hardware fault instruction is controlled to be disconnected; the hardware fault instruction is sent to the training platform, and the training platform executes the hardware fault instruction; when it is determined that the training platform has completed the execution of the hardware fault instruction, the hardware fault instruction completion information is sent to the host computer.
本实施例中,上述电子设备还包括:存储在存储器55上并可在处理器52上运行的一个或者一个以上的程序,经配置以由上述处理器执行上述一个或者一个以上程序还可以用于进行以下步骤:In this embodiment, the electronic device further includes: one or more programs stored in the memory 55 and executable on the processor 52, which are configured to be executed by the processor and can also be used to perform the following steps:
当接收到所述故障注入控制器发送的软件故障指令或者硬件故障指令时,对所述软件故障指令或者硬件故障指令进行故障分级;当确定所述软件故障指令指示的软件故障或者硬件故障指令指示的硬件故障是高等级故障时,控制所述实训平台执行所述软件故障指令或者硬件故障指令,并在所述实训平台执行完成所述软件故障指令或者硬件故障指令对应的动作时,通知微处理器所述实训平台已经执行完成所述软件故障指令或者硬件故障指令对应的动作。When a software fault instruction or a hardware fault instruction sent by the fault injection controller is received, the software fault instruction or the hardware fault instruction is fault graded; when it is determined that the software fault indicated by the software fault instruction or the hardware fault indicated by the hardware fault instruction is a high-level fault, the training platform is controlled to execute the software fault instruction or the hardware fault instruction, and when the training platform completes the action corresponding to the software fault instruction or the hardware fault instruction, the microprocessor is notified that the training platform has completed the action corresponding to the software fault instruction or the hardware fault instruction.
收发机53,用于在处理器52的控制下接收和发送数据。The transceiver 53 is used to receive and send data under the control of the processor 52.
其中,总线架构(用总线51来代表),总线51可以包括任意数量的互联的总线和桥,总线51将包括由处理器52代表的一个或多个处理器和存储器55代表的存储器的各种电路链接在一起。总线51还可以将诸如外围设备、稳压器和功率管理电路等之类的各种其他电路链接在一起,这些都是本领域所公知的,因此,本实施例不再对其进行进一步描述。总线接口54在总线51和收发机53之间提供接口。收发机53可以是一个元件,也可以是多个元件,比如多个接收器和发送器,提供用于在传输介质上与各种其他装置通信的单元。例如:收发机53从其他设备接收外部数据。收发机53用于将处理器52处理后的数据发送给其他设备。取决于计算系统的性质,还可以提供用户接口56,例如小键盘、显示器、扬声器、麦克风、操纵杆。Among them, the bus architecture (represented by bus 51), bus 51 can include any number of interconnected buses and bridges, and bus 51 links various circuits including one or more processors represented by processor 52 and memory represented by memory 55. Bus 51 can also link various other circuits such as peripherals, voltage regulators, and power management circuits together, which are all well known in the art, so this embodiment will not be further described. Bus interface 54 provides an interface between bus 51 and transceiver 53. Transceiver 53 can be one element or multiple elements, such as multiple receivers and transmitters, providing a unit for communicating with various other devices on a transmission medium. For example: transceiver 53 receives external data from other devices. Transceiver 53 is used to send data processed by processor 52 to other devices. Depending on the nature of the computing system, a user interface 56, such as a keypad, display, speaker, microphone, joystick, can also be provided.
处理器52负责管理总线51和通常的处理,如前述上述运行通用操作系统。而存储器55可以被用于存储处理器52在执行操作时所使用的数据。The processor 52 is responsible for managing the bus 51 and general processing, such as running a general operating system as mentioned above, while the memory 55 can be used to store data used by the processor 52 when performing operations.
可选的,处理器52可以是但不限于:中央处理器、单片机、微处理器或者可编程逻辑器件。Optionally, the processor 52 may be, but is not limited to: a central processing unit, a single-chip microcomputer, a microprocessor or a programmable logic device.
可以理解,本发明实施例中的存储器55可以是易失性存储器或非易失性存储器,或可包括易失性和非易失性存储器两者。其中,非易失性存储器可以是只读存储器(Read-Only Memory,ROM)、可编程只读存储器(Programmable ROM,PROM)、可擦除可编程只读存储器(Erasable PROM,EPROM)、电可擦除可编程只读存储器(Electrically EPROM,EEPROM)或闪存。易失性存储器可以是随机存取存储器(Random Access Memory,RAM),其用作外部高速缓存。通过示例性但不是限制性说明,许多形式的RAM可用,例如静态随机存取存储器(Static RAM,SRAM)、动态随机存取存储器(Dynamic RAM,DRAM)、同步动态随机存取存储器(Synchronous DRAM,SDRAM)、双倍数据速率同步动态随机存取存储器(Double Data RateSDRAM,DDRSDRAM)、增强型同步动态随机存取存储器(Enhanced SDRAM,ESDRAM)、同步连接动态随机存取存储器(Synchlink DRAM,SLDRAM)和直接内存总线随机存取存储器(DirectRambus RAM,DRRAM)。本实施例描述的系统和方法的存储器55旨在包括但不限于这些和任意其它适合类型的存储器。It can be understood that the memory 55 in the embodiment of the present invention can be a volatile memory or a non-volatile memory, or can include both volatile and non-volatile memories. Among them, the non-volatile memory can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory can be a random access memory (RAM), which is used as an external cache. By way of example but not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM) and direct RAM bus random access memory (DRRAM). The memory 55 of the system and method described in the present embodiment is intended to include, but is not limited to, these and any other suitable types of memory.
在一些实施方式中,存储器55存储了如下的元素,可执行模块或者数据结构,或者它们的子集,或者它们的扩展集:操作系统551和应用程序552。In some implementations, the memory 55 stores the following elements, executable modules or data structures, or a subset thereof, or an extended set thereof: an operating system 551 and application programs 552 .
其中,操作系统551,包含各种系统程序,例如框架层、核心库层、驱动层等,用于实现各种基础业务以及处理基于硬件的任务。应用程序552,包含各种应用程序,例如媒体播放器(Media Player)、浏览器(Browser)等,用于实现各种应用业务。实现本发明实施例方法的程序可以包含在应用程序552中。The operating system 551 includes various system programs, such as a framework layer, a core library layer, a driver layer, etc., which are used to implement various basic services and process hardware-based tasks. The application 552 includes various application programs, such as a media player (Media Player), a browser (Browser), etc., which are used to implement various application services. The program for implementing the method of the embodiment of the present invention can be included in the application 552.
综上所述,本实施例提出一种计算机可读存储介质和电子设备,通过设置的上位机将软件故障指令或者硬件故障指令发送到故障注入控制器,故障注入控制器可以将软件故障指令或者硬件故障指令发送到实训平台执行;与相关技术中实训平台没有故障注入的功能相比,可以通过系统中设置的上位机和故障注入控制器向实训平台注入需要执行的软件故障指令或者硬件故障指令,可以使学生反复练习故障诊断方式和判断方法,满足了大专院校在实际教学中的需要。In summary, this embodiment proposes a computer-readable storage medium and an electronic device, which sends a software fault instruction or a hardware fault instruction to a fault injection controller through a set host computer, and the fault injection controller can send the software fault instruction or the hardware fault instruction to a training platform for execution; compared with the related art in which the training platform does not have a fault injection function, the host computer and the fault injection controller set in the system can be used to inject the software fault instruction or the hardware fault instruction that needs to be executed into the training platform, so that students can repeatedly practice fault diagnosis methods and judgment methods, meeting the needs of colleges and universities in actual teaching.
以上所述,仅为本发明的具体实施方式,但本发明的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本发明揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本发明的保护范围之内。因此,本发明的保护范围应以所述权利要求的保护范围为准。The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art who is familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.
Claims (11)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111370666.2A CN114063604B (en) | 2021-11-18 | 2021-11-18 | A software and hardware fault simulation system, method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111370666.2A CN114063604B (en) | 2021-11-18 | 2021-11-18 | A software and hardware fault simulation system, method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN114063604A CN114063604A (en) | 2022-02-18 |
CN114063604B true CN114063604B (en) | 2024-06-07 |
Family
ID=80279220
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202111370666.2A Active CN114063604B (en) | 2021-11-18 | 2021-11-18 | A software and hardware fault simulation system, method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114063604B (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115167334A (en) * | 2022-06-15 | 2022-10-11 | 贵州翰凯斯智能技术有限公司 | Automatic driving active fault recurrence and diagnosis method |
CN117555778B (en) * | 2023-11-13 | 2025-09-09 | 深圳市边界智控科技有限公司 | Software fault injection method and device for avionics system and related medium |
Citations (18)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR20080092844A (en) * | 2007-04-12 | 2008-10-16 | 소니 가부시끼가이샤 | Substrate Manufacturing Method, Substrate Manufacturing System and Display Manufacturing Method |
CN102779436A (en) * | 2012-06-28 | 2012-11-14 | 中国民航大学 | Collaborative and intelligent training method for aircraft maintenance |
CN103873300A (en) * | 2014-03-19 | 2014-06-18 | 辽宁科技大学 | Network equipment energy saving and automatic fault recovery method and device |
CN104536303A (en) * | 2014-12-11 | 2015-04-22 | 中国航空工业集团公司第六三一研究所 | Fault injection method |
CN104635718A (en) * | 2013-11-12 | 2015-05-20 | 沈阳新松机器人自动化股份有限公司 | Robot fault repairing system and method |
CN107818709A (en) * | 2017-11-27 | 2018-03-20 | 东莞职业技术学院 | The method of developing automobile training equipment based on the concept of point-touch interaction and game customs clearance |
CN109165267A (en) * | 2018-09-13 | 2019-01-08 | 国网技术学院 | A kind of power communication transmission fault investigation operation experience system and method |
CN109164795A (en) * | 2018-11-23 | 2019-01-08 | 安徽江淮汽车集团股份有限公司 | A kind of intelligent automobile fault diagnosis method and system |
CN109240268A (en) * | 2018-09-29 | 2019-01-18 | 厦门金龙汽车新能源科技有限公司 | The functional verification of entire car controller and test macro and method |
CN109345658A (en) * | 2018-10-29 | 2019-02-15 | 百度在线网络技术(北京)有限公司 | Restorative procedure, device, equipment, medium and the vehicle of Vehicular system failure |
CN109552305A (en) * | 2018-12-29 | 2019-04-02 | 北京新能源汽车股份有限公司 | Brake performance test bed and fault detection method and system thereof |
CN110884687A (en) * | 2019-12-11 | 2020-03-17 | 中国航空工业集团公司沈阳飞机设计研究所 | Semi-physical real-time simulation verification platform for PHM technology of electromechanical system |
CN112025766A (en) * | 2020-08-11 | 2020-12-04 | 上海有个机器人有限公司 | Robot system health checking and self-checking method and device and electronic equipment |
CN112749058A (en) * | 2020-12-31 | 2021-05-04 | 浙江工贸职业技术学院 | Fault alarm equipment for computer |
CN112859817A (en) * | 2021-01-21 | 2021-05-28 | 中国第一汽车股份有限公司 | Complete vehicle fault diagnosis test system |
CN113238535A (en) * | 2021-06-03 | 2021-08-10 | 中国核动力研究设计院 | Fault diagnosis method and system for nuclear safety level DCS analog input module |
CN113554188A (en) * | 2021-07-13 | 2021-10-26 | 安庆市电匠院网络科技有限公司 | One-stop type public service platform for household appliance maintenance |
CN113625692A (en) * | 2021-08-23 | 2021-11-09 | 公安部交通管理科学研究所 | Electric automobile battery security inspection system based on fault injection |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20150254383A1 (en) * | 2014-02-06 | 2015-09-10 | StarDFX Technologies, Inc. | Method for concurrent simulation to evaluate the test quality of integrated circuits and computer program |
US9842045B2 (en) * | 2016-02-19 | 2017-12-12 | International Business Machines Corporation | Failure recovery testing framework for microservice-based applications |
-
2021
- 2021-11-18 CN CN202111370666.2A patent/CN114063604B/en active Active
Patent Citations (18)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR20080092844A (en) * | 2007-04-12 | 2008-10-16 | 소니 가부시끼가이샤 | Substrate Manufacturing Method, Substrate Manufacturing System and Display Manufacturing Method |
CN102779436A (en) * | 2012-06-28 | 2012-11-14 | 中国民航大学 | Collaborative and intelligent training method for aircraft maintenance |
CN104635718A (en) * | 2013-11-12 | 2015-05-20 | 沈阳新松机器人自动化股份有限公司 | Robot fault repairing system and method |
CN103873300A (en) * | 2014-03-19 | 2014-06-18 | 辽宁科技大学 | Network equipment energy saving and automatic fault recovery method and device |
CN104536303A (en) * | 2014-12-11 | 2015-04-22 | 中国航空工业集团公司第六三一研究所 | Fault injection method |
CN107818709A (en) * | 2017-11-27 | 2018-03-20 | 东莞职业技术学院 | The method of developing automobile training equipment based on the concept of point-touch interaction and game customs clearance |
CN109165267A (en) * | 2018-09-13 | 2019-01-08 | 国网技术学院 | A kind of power communication transmission fault investigation operation experience system and method |
CN109240268A (en) * | 2018-09-29 | 2019-01-18 | 厦门金龙汽车新能源科技有限公司 | The functional verification of entire car controller and test macro and method |
CN109345658A (en) * | 2018-10-29 | 2019-02-15 | 百度在线网络技术(北京)有限公司 | Restorative procedure, device, equipment, medium and the vehicle of Vehicular system failure |
CN109164795A (en) * | 2018-11-23 | 2019-01-08 | 安徽江淮汽车集团股份有限公司 | A kind of intelligent automobile fault diagnosis method and system |
CN109552305A (en) * | 2018-12-29 | 2019-04-02 | 北京新能源汽车股份有限公司 | Brake performance test bed and fault detection method and system thereof |
CN110884687A (en) * | 2019-12-11 | 2020-03-17 | 中国航空工业集团公司沈阳飞机设计研究所 | Semi-physical real-time simulation verification platform for PHM technology of electromechanical system |
CN112025766A (en) * | 2020-08-11 | 2020-12-04 | 上海有个机器人有限公司 | Robot system health checking and self-checking method and device and electronic equipment |
CN112749058A (en) * | 2020-12-31 | 2021-05-04 | 浙江工贸职业技术学院 | Fault alarm equipment for computer |
CN112859817A (en) * | 2021-01-21 | 2021-05-28 | 中国第一汽车股份有限公司 | Complete vehicle fault diagnosis test system |
CN113238535A (en) * | 2021-06-03 | 2021-08-10 | 中国核动力研究设计院 | Fault diagnosis method and system for nuclear safety level DCS analog input module |
CN113554188A (en) * | 2021-07-13 | 2021-10-26 | 安庆市电匠院网络科技有限公司 | One-stop type public service platform for household appliance maintenance |
CN113625692A (en) * | 2021-08-23 | 2021-11-09 | 公安部交通管理科学研究所 | Electric automobile battery security inspection system based on fault injection |
Non-Patent Citations (3)
Title |
---|
分布式实时系统的软件故障注入;徐光侠;陈蜀宇;常光辉;刘宴兵;刘国良;;重庆大学学报;20100215(第02期);全文 * |
故障注入在MCU功能安全测试中的实施研究;张明朗;周子龙;王江波;蔡小丽;;汽车电器;20200820(第08期);全文 * |
舒华.《普通高等教育十二五规划教材汽车发动机电子控制技术》.北京理工大学出版社,2012,全文. * |
Also Published As
Publication number | Publication date |
---|---|
CN114063604A (en) | 2022-02-18 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN114063604B (en) | A software and hardware fault simulation system, method and device | |
CN109240261B (en) | HIL (hardware-in-the-loop) testing method for vehicle networking performance testing | |
US20200012239A1 (en) | Information processing apparatus and information processing method, computer program, and program manufacturing method | |
JP4961832B2 (en) | In-vehicle electrical system development support device and design defect verification method | |
CN111538315A (en) | A vehicle automatic driving function simulation test system and test method | |
Wotawa et al. | Quality assurance methodologies for automated driving | |
WO2023092398A1 (en) | Vehicle-level testing device and method, and cloud management platform | |
CN109408088A (en) | CPLD upgrade method, device, system and computer readable storage medium | |
CN114596749A (en) | Diagnostic teaching methods and equipment | |
CN115453912A (en) | Automatic driving simulation method, system, device and medium | |
CN114967653A (en) | Intelligent driving function testing device and method | |
WO2022259608A1 (en) | Electronic control unit evaluation device and evaluation method | |
CN118439055A (en) | Fault processing method, device, equipment and storage medium | |
CN117793080A (en) | Vehicle upgrading method and device, electronic equipment and storage medium | |
Zander-Nowicka et al. | Automotive validation functions for on-line test evaluation of hybrid real-time systems | |
CN111552584A (en) | Test system, method and device for satellite level fault diagnosis isolation and recovery function | |
CN116860618A (en) | Evaluation method, device, equipment, storage medium and product of driving assistance algorithm | |
CN118282856A (en) | Processing method, processing device and carrier | |
CN116818362A (en) | Lane departure warning function testing equipment and method | |
CN116775453A (en) | Systems and methods for providing autonomous driving simulation architecture with switchable models | |
CN115185251A (en) | A wire-controlled chassis with cockpit domain control CDC that is convenient for offline debugging | |
CN114486284A (en) | Vehicle testing method, device, equipment and storage medium | |
CN119511775A (en) | A parking function simulation test method and system | |
CN222299972U (en) | Intelligent driving safety testing system | |
CN113820964A (en) | A vehicle electronic control unit simulation system and its simulation method |
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 | ||
GR01 | Patent grant | ||
CP03 | Change of name, title or address |
Address after: Building 20, Beihang Wuhu Navigation Innovation Park, Xinwu Economic Development Zone, Wanluo District, Wuhu City, Anhui Province 241199 Patentee after: Wuhu Kuhei Technology Industrial Development Co.,Ltd. Country or region after: China Address before: Room 05, 21st Floor, Building 683, Zone 2, No. 5 Zhongguancun South Street, Haidian District, Beijing Patentee before: Kuhei Zhixing Technology (Beijing) Co.,Ltd. Country or region before: China |
|
CP03 | Change of name, title or address |