Data acquisition system and method for special chip of special integrated circuit motor, and product
By using the target data verification code in the data acquisition system of the dedicated integrated circuit motor chip to verify the detection data, the problem of obtaining complete and effective motor data from the dedicated integrated electric ring motor chip is solved, and error detection and correction during data transmission is realized.
Patent Information
- Application Number
- CN202411627934.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-14
- Publication Date
- 2025-04-04
AI Technical Summary
How to obtain complete and effective motor data from special integrated circuit motor chips to solve possible error problems during data transmission.
Design a data acquisition system, including a dedicated chip for the upper computer and a dedicated integrated circuit motor, transmit data through the serial port, and use the target data verification code to verify the detection data during the data transmission process to ensure the integrity of the data.
Through the verification of the target data verification code, errors that occur during data transmission can be effectively detected and corrected, thereby ensuring that the acquired motor data is complete and effective.
Smart Images

Figure CN119759638A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of motor data acquisition, and in particular to a data acquisition system for a dedicated integrated circuit motor chip, a data verification method, a data verification device, an electronic device and a computer-readable storage medium. Background Art
[0002] Application-Specific Integrated Circuit (ASIC) motor-specific chips are designed for specific motors and application scenarios. These chips integrate necessary functional modules such as motor drive, power management, and logic control, thereby optimizing circuit design and reducing unnecessary functions and circuits. In practical applications, how to ensure that the data collected for the motor from the ASIC motor-specific chip is complete has become one of the problems that need to be solved urgently. Summary of the invention
[0003] In view of the above problems, a data acquisition system for a dedicated integrated circuit motor chip, a data verification method, a data verification device, an electronic device and a computer-readable storage medium are proposed to overcome the above problems or at least partially solve the above problems, including:
[0004] A data acquisition system for a dedicated ASIC motor chip, the data acquisition system comprising: a host computer and a dedicated ASIC motor chip, the host computer and the dedicated ASIC motor chip transmit data via a serial port; wherein:
[0005] The ASIC motor-specific chip is used to detect the motor;
[0006] The host computer is used to read the first detection data obtained from the motor detection and the target data verification code from the dedicated integrated circuit motor chip; the host computer is used to verify the first detection data according to the target data verification code.
[0007] Optionally, the host computer communicates with the ASIC motor-specific chip via a universal asynchronous receiver-transmitter.
[0008] Optionally, the universal asynchronous receiver / transmitter is configured to receive interrupt mode.
[0009] Optionally, the first detection data includes current state data and working mode data, and the target data check code includes a first data check code and a second data check code;
[0010] The host computer is used to read the current state data and the first data verification code from the dedicated integrated circuit motor chip; when the first data verification code passes the verification, the operating mode data and the second data verification code are read from the dedicated integrated circuit motor chip according to the current state data.
[0011] Optionally, the working mode data includes first working parameter data and second working parameter data, and a register is deployed in the ASIC motor-specific chip, and the register is used to store the first working parameter data;
[0012] The host computer is used to obtain the first operating parameter data from the register when the current state data is the first state data; obtain the first operating parameter data from the register when the current state data is the second state data, and obtain the second operating parameter data for the motor in real time through the dedicated integrated circuit motor dedicated chip.
[0013] Optionally, the host computer is further used to perform abnormality detection on the ASIC motor-specific chip according to the first detection data; when an abnormality is detected in the ASIC motor-specific chip, a prompt is given to the ASIC motor-specific chip.
[0014] Optionally, the host computer is used to store and display the first detection data.
[0015] Optionally, the ASIC motor-specific chip is further used to send the to-be-decrypted key to the host computer upon receiving a modification instruction sent by the host computer; and after receiving a decryption key for the to-be-decrypted key sent by the host computer, send a successful handshake reply to the host computer, and modify the register upon receiving a configuration command sent by the host computer;
[0016] The host computer is also used to send a modification command to the dedicated integrated circuit motor chip; and send a decryption key for the key to be decrypted to the dedicated integrated circuit motor chip according to the key to be decrypted; and when receiving a reply of a successful handshake sent by the host computer, send the configuration command to the host computer.
[0017] Optionally, the host computer is further configured to prompt a communication failure when the number of failures in verifying the first detection data according to the target data verification code exceeds a preset number.
[0018] The embodiment of the present invention further provides a data verification method, which is applied to the data acquisition system as described above, and the method includes:
[0019] Reading first detection data obtained from motor detection and a target data check code from a motor-specific chip of a dedicated integrated circuit;
[0020] The first detection data is verified according to the target data verification code.
[0021] The embodiment of the present invention further provides a data verification device, which is applied to the data acquisition system as described above, and the device includes:
[0022] A reading module, used for reading first detection data obtained from motor detection and a target data check code from a motor-specific chip in a dedicated integrated circuit;
[0023] A verification module is used to verify the first detection data according to the target data verification code.
[0024] An embodiment of the present invention further provides an electronic device, comprising a processor, a memory, and a computer program stored in the memory and capable of running on the processor, wherein the computer program implements the above data verification method when executed by the processor.
[0025] An embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the data verification method as described above is implemented.
[0026] The embodiments of the present invention have the following advantages:
[0027] In the embodiment of the present invention, the data acquisition system of the ASIC motor chip includes: a host computer and a ASIC motor chip, the host computer and the ASIC motor chip are transmitted through a serial port; wherein: the ASIC motor chip is used to detect the motor; the host computer is used to read the first detection data obtained from the motor detection and the target data verification code from the ASIC motor chip; the host computer is used to verify the first detection data according to the target data verification code. Through the embodiment of the present invention, complete and effectively running data can be obtained from the motor through the ASIC motor chip. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] In order to more clearly illustrate the technical solution of the present invention, the accompanying drawings required for use in the description of the present invention will be briefly introduced below. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative labor.
[0029] Figure 1It is a structural schematic diagram of a data acquisition system for a dedicated integrated circuit motor chip according to an embodiment of the present invention;
[0030] Figure 2 It is a structural schematic diagram of another data acquisition system of a dedicated integrated circuit motor chip according to an embodiment of the present invention;
[0031] Figure 3 is a flowchart of a data verification method according to an embodiment of the present invention;
[0032] Figure 4 is a flowchart of another method for verifying data according to an embodiment of the present invention;
[0033] Figure 5 is a flow chart of register modification steps in an embodiment of the present invention;
[0034] Figure 6 It is a structural schematic diagram of a data verification device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0035] In order to make the above-mentioned purposes, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below in conjunction with the accompanying drawings and specific embodiments. Obviously, the described embodiments are part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0036] In order to ensure that complete and effective operation data can be obtained from the motor through the dedicated integrated circuit motor chip, an embodiment of the present invention provides a data acquisition system for a dedicated integrated circuit motor chip, and the data acquisition system for the dedicated integrated circuit motor chip can be composed of a host computer and a dedicated integrated circuit motor chip; wherein, the host computer and the dedicated integrated circuit motor chip can transmit data and interact through a serial port. In actual applications, when the host computer obtains detection data from the dedicated integrated circuit motor chip, it can also obtain a data verification code to verify the obtained detection data. Based on the data verification code, the host computer can verify the obtained detection data, thereby ensuring that the host computer can obtain complete and effective operation data from the motor through the dedicated integrated circuit motor chip. Specifically, please refer to Figure 1 , Figure 1 A structural schematic diagram of a data acquisition system 10 of a dedicated integrated circuit motor chip according to an embodiment of the present invention is shown.
[0037] like Figure 1As shown, the data acquisition system 10 of the ASIC motor chip includes: a host computer 110 and a ASIC motor chip 120, and the host computer 110 and the ASIC motor chip 120 transmit data via a serial port; wherein:
[0038] A dedicated integrated circuit motor chip 120 is used to detect the motor 130;
[0039] The host computer 110 is used to read the first detection data obtained from the motor detection and the target data verification code from the ASIC motor-specific chip 120; the host computer 110 is used to verify the first detection data according to the target data verification code.
[0040] In the embodiment of the present invention, data transmission and interaction can be performed between the host computer 110 and the ASIC motor-specific chip 120 through the serial port. In the design process of the ASIC, it is necessary to design special debugging software and debugging interface to facilitate the configuration and acquisition of specific register values inside the ASIC when the chip is returned. However, in order to reduce the chip area, an overly complex debugging interface cannot be designed. The serial port can be designed as a relatively simple and effective debugging interface, but the frequent output data occupies a high logic resource and is prone to data errors.
[0041] In order to avoid the above-mentioned problem, in an embodiment of the present invention, when the host computer 110 reads the first detection data obtained from the motor detection from the dedicated integrated circuit motor chip 120, the dedicated integrated circuit motor chip 120 can also send a target data verification code for the first detection data to the host computer 110.
[0042] Among them, the data check code is a technology used to detect errors that may occur during data transmission or storage. It generates a short numerical value by performing a certain mathematical operation on the data, and this numerical value can be used to verify the integrity of the data. If the data changes during the transmission or storage process, the data check code will also change, so that the error can be detected. In an embodiment of the present invention, when the first detection data changes during the transmission or storage process, the target data check code will also change; at this time, the integrity of the first detection data can be checked based on the target data check code.
[0043] Exemplarily, the target data check code may be a data check code based on CRC (Cyclic Redundancy Check) check, or a data check code of other forms of check, such as a hash function, a checksum, etc., which is not limited in the embodiment of the present invention.
[0044] After obtaining the first detection data and the target data check code, the host computer 110 can check the first detection data according to the target data check code. Specifically, the host computer 110 can first calculate the first detection data using the same algorithm as the ASIC motor dedicated chip 120 to obtain a data check code.
[0045] Then, the host computer 110 can compare the data verification code with the received target data verification code. If the data verification code is consistent with the target data verification code, it can be considered that the first detection data is complete. At this time, the host computer 110 can store the first detection data.
[0046] If the data check code is inconsistent with the target data check code, it can be considered that the first detection data may have an error during transmission. At this time, the first detection data may not be stored, and the detection data can be re-acquired from the ASIC motor dedicated chip 120.
[0047] Exemplarily, the first detection data sent by the ASIC motor dedicated chip 120 is: 0x12, 0x34, 0x56.
[0048] The target data check code sent by the ASIC motor-specific chip 120 is 0x12+0x34+0x56=0x9C.
[0049] The ASIC motor-specific chip 120 can send the following data to the host computer 110: 0x12, 0x34, 0x56, 0x9C.
[0050] The host computer 110 receives the following data: 0x12, 0x34, 0x56, 0x9C.
[0051] The host computer 110 extracts the first detection data: 0x12, 0x34, 0x56, and the target data check code: 0x9C. The host computer 110 recalculates the data check code: 0x12+0x34+0x56=0x9C, and compares the data check code. At this time, 0x9C==0x9C, so the host computer 110 can determine that the received first detection data is complete.
[0052] In the embodiment of the present invention, the ASIC motor-specific chip 120 can be used to detect the operation of the motor and generate detection data for storage to be read by the host computer 110 .
[0053] In the embodiment of the present invention, the data acquisition system 10 of the ASIC motor chip 120 includes: a host computer 110 and a ASIC motor chip 120, the host computer 110 and the ASIC motor chip 120 are transmitted through a serial port; wherein: the ASIC motor chip 120 is used to detect the motor; the host computer 110 is used to read the first detection data obtained from the motor detection and the target data verification code from the ASIC motor chip 120; the host computer 110 is used to verify the first detection data according to the target data verification code. Through the embodiment of the present invention, complete and effectively running data can be obtained from the motor through the ASIC motor chip 120.
[0054] In one embodiment of the present invention, the host computer 110 communicates with the ASIC motor-specific chip 120 via a universal asynchronous receiver-transmitter.
[0055] In some feasible embodiments, the host computer 110 can communicate with the ASIC motor dedicated chip 120 through UART (Universal Asynchronous Receiver / Transmitter) and exchange data. Among them, the use of UART wiring is simple and does not require complex hardware and software configuration. Debugging is relatively easy, which reduces the difficulty and cost of development. In addition, the ASIC motor dedicated chip 120 generally has a built-in UART hardware module to avoid the increase in area caused by designing other IPs.
[0056] For example, Figure 2 As shown, the host computer 110 can communicate with the ASIC motor-specific chip 120 through UART; the ASIC motor-specific chip 120 and the host computer 110 are also grounded (GND, Ground) respectively.
[0057] Exemplarily, after generating the first detection data and the target data check code, the ASIC motor chip can respond to the read operation of the host computer 110 and send the first detection data and the target data check code to the host computer 110 through the universal asynchronous receiver-transmitter. The host computer 110 can also send the instructions to be sent to the ASIC motor chip to the ASIC motor chip through the universal asynchronous receiver-transmitter through the universal asynchronous receiver-transmitter, and the embodiment of the present invention is not limited to this.
[0058] In one embodiment of the present invention, the UART is configured to be in a receive interrupt mode.
[0059] In some feasible embodiments, the UART transmission and reception can use polling mode or interrupt mode.
[0060] In the polling mode, the host computer 110 can continuously check the status register of the UART to determine whether there is data to be sent or received. In the interrupt mode, the UART triggers an interrupt when sending or receiving data, notifying the host computer 110 to perform corresponding processing.
[0061] In practical applications, using the polling mode may occupy chip resources, and the polling timing transmission may result in a slow response speed. Therefore, the universal asynchronous receiver-transmitter in the embodiment of the present invention can be configured to receive interrupt mode to improve the response speed and resource utilization efficiency of the data acquisition system 10 of the ASIC motor dedicated chip 120.
[0062] Exemplarily, the host computer 110 can actively send commands to the ASIC motor-specific chip 120 every 10 ms. After the ASIC motor-specific chip 120 receives and parses the command in interrupt reception, it sends relevant data to the host computer 110 in interrupt sending. The embodiment of the present invention does not limit this.
[0063] In one embodiment of the present invention, the first detection data includes current state data and working mode data, and the target data check code includes a first data check code and a second data check code;
[0064] The host computer 110 is used to read the current state data and the first data check code from the ASIC motor-specific chip 120; when the first data check code passes the check, the operating mode data and the second data check code are read from the ASIC motor-specific chip 120 according to the current state data.
[0065] In some feasible embodiments, the first detection data may include the current state data of the motor and the current working mode data of the motor; wherein the working mode data may characterize the current working mode of the motor, for example, the working mode may include: initial state, standby state, working state and protection state. When the host computer 110 obtains data from the ASIC motor-specific chip 120, it may first read the current state data and the first data check code from the ASIC motor-specific chip 120; and then verify the current state data according to the first data check code. If the current state data is verified based on the first data check code, the host computer 110 may read the working mode data and the second data check code from the ASIC motor-specific chip 120 according to the current state data, and verify the working mode data based on the second data check code.
[0066] Exemplarily, the working mode data may include operating parameters of the motor, such as current and voltage of the Q-axis and the D-axis, observer angular velocity, and protection flag, etc., which is not limited in the embodiment of the present invention.
[0067] The initial state is the first state after the motor is powered on or reset, and performs initialization operations. The standby state is the state of the motor in idle or low-power mode, reducing power consumption and maintaining responsiveness. The working state is the state when the motor performs its main task or function, running at full speed and high power consumption. The protection state is the state the motor enters when an abnormality or error is detected, and protective measures are taken to prevent further damage.
[0068] Exemplarily, the initial state is the first state after the motor is powered on or reset. In this state, the system will perform some basic initialization operations, such as configuring the motor controller, setting default parameters, initializing sensors, etc. The initial state is the starting point for the motor to enter other states. After the motor is powered on, you can initialize the motor controller, configure the PWM (Pulse Width Modulation) signal, and initialize the encoder or Hall sensor.
[0069] Exemplarily, the standby state is the state of the motor in idle or low-power mode. In this state, the motor usually shuts down unnecessary hardware modules, reduces power consumption, but still maintains a certain responsiveness so that it can quickly enter the working state when needed. The motor enters the standby state when there is no task, turns off the PWM signal, but still keeps the communication interface and sensor working. The motor enters the standby state when waiting for external commands, reduces power consumption, but still maintains responsiveness.
[0070] Exemplarily, the working state is the state of the motor when it is performing its main task or function. In this state, the motor will run at full speed, process data, perform calculations, respond to external requests, etc. The motor enters the working state when performing a rotation task, controls the PWM signal, reads encoder feedback, and adjusts speed and position. The motor enters the working state when performing a control task, receives external commands, adjusts output power, and achieves precise control.
[0071] Exemplarily, the protection state is the state that the motor enters when an abnormality or error is detected. In this state, the system will take some protection measures, such as stopping the motor, resetting, recording error logs, etc., to prevent further damage or data loss. The motor enters the protection state when overcurrent or overheating is detected, stops the PWM signal, records the error log, and attempts to reset the motor. The motor enters the protection state when a communication error is detected, stops working, records the error log, and attempts to reestablish the communication connection.
[0072] In some feasible embodiments, the host computer 110 can read the current state data and the first data check code from the ASIC motor dedicated chip 120 through a universal asynchronous receiver-transmitter, and verify the current state data based on the first data check code. When the first data check code verifies the current state data, the host computer 110 can read the working mode data and the second data check code from the ASIC motor dedicated chip 120 through the universal asynchronous receiver-transmitter according to the current state data, and the embodiment of the present invention does not limit this.
[0073] In one embodiment of the present invention, the working mode data includes first working parameter data and second working parameter data, and a register is deployed in the ASIC motor-specific chip 120, and the register is used to store the first working parameter data;
[0074] The host computer 110 is used to obtain the first working parameter data from the register when the current state data is the first state data; when the current state data is the second state data, obtain the first working parameter data from the register, and obtain the second working parameter data for the motor in real time through the dedicated integrated circuit motor dedicated chip 120.
[0075] In some feasible embodiments, the working mode data may include first working parameter data and second working parameter data, wherein the first working parameter data may correspond to an initial state and a standby state, and the second working parameter data may correspond to a working state and a protection state, and the embodiments of the present invention are not limited to this.
[0076] In practical applications, when the motor is in the initial state or the standby state, the host computer 110 can directly read the first working parameter data from the register deployed in the ASIC motor dedicated chip 120. On the contrary, when the motor is in the working state or the protection state, the host computer 110 needs to obtain more detailed working mode data in order to monitor the key data in real time. At this time, the host computer 110 can directly obtain the first working parameter data from the register, and obtain the second working parameter data for the motor in real time through the ASIC motor dedicated chip 120. The second working parameter data can be the current and voltage of the Q axis and the D axis, the observer angular velocity, and the protection flag, etc., which are not limited in the embodiment of the present invention.
[0077] Exemplarily, when the current working mode of the motor is the initial state or the standby state, the host computer 110 can obtain the first working parameter data from the register through the universal asynchronous receiver-transmitter. When the current working mode of the motor is the working state or the protection state, the host computer 110 can obtain the first working parameter data from the register through the universal asynchronous receiver-transmitter, and obtain the second working parameter data for the motor in real time through the dedicated integrated circuit motor dedicated chip 120, which is not limited in this embodiment of the present invention.
[0078] In one embodiment of the present invention, the host computer 110 is further configured to perform abnormality detection on the motor according to the first detection data; when an abnormality is detected in the motor, a prompt is given to the motor.
[0079] In some feasible embodiments, after obtaining the first detection data and verifying the first detection data, the host computer 110 can perform abnormality detection on the motor according to the first detection data. Specifically:
[0080] The host computer 110 and the ASIC motor-specific chip 120 can transmit and interact data through the serial port. When the host computer 110 reads the first detection data obtained from the motor detection from the ASIC motor-specific chip 120, the ASIC motor-specific chip 120 can also send a target data check code for the first detection data to the host computer 110.
[0081] After obtaining the first detection data and the target data check code, the host computer 110 can check the first detection data according to the target data check code. Specifically, the host computer 110 can first calculate the first detection data using the same algorithm as the ASIC motor dedicated chip 120 to obtain a data check code.
[0082] Then, the host computer 110 can compare the data verification code with the received target data verification code. If the data verification code is consistent with the target data verification code, it can be considered that the first detection data is complete. At this time, the host computer 110 can store the first detection data.
[0083] If the data check code is inconsistent with the target data check code, it can be considered that the first detection data may have an error during transmission. At this time, the first detection data may not be stored, and the detection data can be re-acquired from the ASIC motor dedicated chip 120.
[0084] After the first detection data is stored, the host computer 110 can perform fault detection on the operation of the motor based on the first detection data. If an abnormality is detected in the motor, the host computer 110 can give an abnormal prompt for the motor.
[0085] In one embodiment of the present invention, the host computer 110 is used to store and display the first detection data.
[0086] In some feasible embodiments, after verifying the first detection data, the host computer 110 may also store and display the first detection data, so that the motor can be subsequently checked for abnormalities based on the first detection data. Specifically:
[0087] The host computer 110 and the ASIC motor-specific chip 120 can transmit and interact data through the serial port. When the host computer 110 reads the first detection data obtained from the motor detection from the ASIC motor-specific chip 120, the ASIC motor-specific chip 120 can also send a target data check code for the first detection data to the host computer 110.
[0088] After obtaining the first detection data and the target data check code, the host computer 110 can check the first detection data according to the target data check code. Specifically, the host computer 110 can first calculate the first detection data using the same algorithm as the ASIC motor dedicated chip 120 to obtain a data check code.
[0089] Then, the host computer 110 can compare the data verification code with the received target data verification code. If the data verification code is consistent with the target data verification code, it can be considered that the first detection data is complete. At this time, the host computer 110 can store and display the first detection data.
[0090] If the data check code is inconsistent with the target data check code, it can be considered that the first detection data may have an error during transmission. At this time, the first detection data may not be stored, and the detection data can be re-acquired from the ASIC motor dedicated chip 120.
[0091] In one embodiment of the present invention, the ASIC motor dedicated chip 120 is further used to send the to-be-decrypted key to the upper computer 110 when receiving the modification instruction sent by the upper computer 110; and after receiving the decryption key for the to-be-decrypted key sent by the upper computer 110, send a successful handshake reply to the upper computer 110, and modify the register when receiving the configuration command sent by the upper computer 110;
[0092] The host computer 110 is also used to send a modification command to the ASIC motor-specific chip 120; and send a decryption key for the key to be decrypted to the ASIC motor-specific chip 120 according to the key to be decrypted; and when receiving a reply of a successful handshake sent by the host computer 110, send a configuration command to the host computer 110.
[0093] In some feasible embodiments, the host computer 110 may also be used to modify the ASIC motor-specific chip 120 ; specifically, the host computer 110 may be used to send a modification command to the ASIC motor-specific chip 120 .
[0094] After receiving the modification instruction sent by the host computer 110, the ASIC motor dedicated chip 120 can send the key to be decrypted to the host computer 110 so that the host computer 110 can verify its identity.
[0095] After receiving the key to be decrypted, the host computer 110 may decrypt the key to be decrypted, and send the decryption key for the key to be decrypted to the ASIC motor-specific chip 120 .
[0096] After receiving the decryption key for the key to be decrypted, the ASIC motor chip 120 can determine that the verification is successful; at this time, the ASIC motor chip 120 can send a successful handshake reply to the host computer 110.
[0097] When receiving the reply of the successful handshake sent by the host computer 110, the host computer 110 can send a configuration command to the ASIC motor-specific chip 120 so that the ASIC motor-specific chip 120 can modify the register according to the configuration command.
[0098] In one embodiment of the present invention, the host computer 110 is further configured to prompt a communication failure when the number of failures in verifying the first detection data according to the target data verification code exceeds a preset number.
[0099] In some feasible embodiments, the host computer 110 may also be used to prompt a communication failure if the number of failures in verifying the first detection data according to the target data verification code exceeds a preset number, so as to notify the inspector to inspect the motor.
[0100] Based on the data acquisition system of the ASIC motor-specific chip mentioned above, the embodiment of the present invention also provides a data verification method; it can be applied to the data acquisition system of the ASIC motor-specific chip mentioned in the above embodiment. Figure 3 As shown, the data verification method may include the following steps:
[0101] Step 301: read first detection data obtained from motor detection and a target data check code from a motor-specific chip in a dedicated integrated circuit.
[0102] The host computer and the ASIC motor chip can transmit and interact data through the serial port. In the design process of the ASIC, it is necessary to design special debugging software and debugging interface to facilitate the configuration and acquisition of specific register values inside the ASIC when the chip is returned. However, in order to reduce the chip area, the debugging interface cannot be too complicated. The serial port can be designed as a relatively simple and effective debugging interface, but the frequent output data occupies a high logic resource and is prone to data errors.
[0103] In order to avoid the above problems, in an embodiment of the present invention, when the host computer reads the first detection data obtained from the motor detection from the ASIC motor-specific chip, the ASIC motor-specific chip can also send a target data verification code for the first detection data to the host computer.
[0104] Among them, the data check code is a technology used to detect errors that may occur during data transmission or storage. It generates a short numerical value by performing a certain mathematical operation on the data, and this numerical value can be used to verify the integrity of the data. If the data changes during the transmission or storage process, the data check code will also change, so that the error can be detected. In an embodiment of the present invention, when the first detection data changes during the transmission or storage process, the target data check code will also change; at this time, the integrity of the first detection data can be checked based on the target data check code.
[0105] Step 302: Verify the first detection data according to the target data verification code.
[0106] After obtaining the first detection data and the target data check code, the host computer can check the first detection data according to the target data check code. Specifically, the host computer can first calculate the first detection data using the same algorithm as the ASIC motor dedicated chip to obtain a data check code.
[0107] Then, the host computer can compare the data verification code with the received target data verification code. If the data verification code is consistent with the target data verification code, it can be considered that the first detection data is complete. At this time, the host computer can store the first detection data.
[0108] If the data check code is inconsistent with the target data check code, it can be considered that the first detection data may have an error during transmission. At this time, the first detection data may not be stored, and the detection data can be re-acquired from the ASIC motor dedicated chip.
[0109] In the embodiment of the present invention, the ASIC motor-specific chip can be used to detect the operation of the motor and generate detection data for storage to be read by the host computer.
[0110] In some feasible embodiments, the host computer can communicate with the dedicated integrated circuit motor chip through UART and exchange data.
[0111] Exemplarily, after generating the first detection data and the target data check code, the ASIC motor chip can respond to the reading operation of the host computer and send the first detection data and the target data check code to the host computer through the universal asynchronous receiver-transmitter. The host computer can also send the instructions to be sent to the ASIC motor chip to the ASIC motor chip through the universal asynchronous receiver-transmitter through the universal asynchronous receiver-transmitter, and the embodiment of the present invention does not limit this.
[0112] In some feasible embodiments, the UART transmission and reception can use polling mode or interrupt mode.
[0113] In practical applications, using the polling mode may occupy chip resources, and the polling timing transmission may result in a slow response speed. Therefore, the universal asynchronous receiver-transmitter in the embodiment of the present invention can be configured to receive interrupt mode to improve the response speed and resource utilization efficiency of the data acquisition system of the ASIC motor dedicated chip.
[0114] Exemplarily, the host computer can actively send commands to the ASIC motor-specific chip every 10 ms. After the ASIC motor-specific chip receives and parses the command in interrupt reception, it sends relevant data to the host computer in interrupt transmission. The embodiment of the present invention does not limit this.
[0115] In some feasible embodiments, the first detection data may include the current state data of the motor and the current working mode data of the motor; wherein the working mode data may characterize the current working mode of the motor, for example, the working mode may include: initial state, standby state, working state and protection state. When the host computer obtains data from the dedicated chip of the ASIC motor, it may first read the current state data and the first data check code from the dedicated chip of the ASIC motor; and then verify the current state data according to the first data check code. If the current state data is verified based on the first data check code, the host computer may read the working mode data and the second data check code from the dedicated chip of the ASIC motor according to the current state data, and verify the working mode data based on the second data check code.
[0116] The initial state is the first state after the motor is powered on or reset, and performs initialization operations. The standby state is the state of the motor in idle or low-power mode, reducing power consumption and maintaining responsiveness. The working state is the state when the motor performs its main task or function, running at full speed and high power consumption. The protection state is the state the motor enters when an abnormality or error is detected, and protective measures are taken to prevent further damage.
[0117] In some feasible embodiments, the host computer can read the current state data and the first data check code from the ASIC motor-specific chip through a universal asynchronous receiver-transmitter, and check the current state data based on the first data check code. When the first data check code passes the check of the current state data, the host computer can read the working mode data and the second data check code from the ASIC motor-specific chip through the universal asynchronous receiver-transmitter according to the current state data, and the embodiment of the present invention does not limit this.
[0118] In some feasible embodiments, the working mode data may include first working parameter data and second working parameter data, wherein the first working parameter data may correspond to an initial state and a standby state, and the second working parameter data may correspond to a working state and a protection state, and the embodiments of the present invention are not limited to this.
[0119] In actual applications, when the motor is in the initial state or standby state, the host computer can directly read the first working parameter data from the register deployed in the ASIC motor-specific chip. Conversely, when the motor is in the working state or protection state, the host computer needs to obtain more detailed working mode data in order to monitor key data in real time. At this time, the host computer can directly obtain the first working parameter data from the register, and obtain the second working parameter data for the motor in real time through the ASIC motor-specific chip.
[0120] Exemplarily, when the current working mode of the motor is the initial state or the standby state, the host computer can obtain the first working parameter data from the register through the universal asynchronous receiver-transmitter. When the current working mode of the motor is the working state or the protection state, the host computer can obtain the first working parameter data from the register through the universal asynchronous receiver-transmitter, and obtain the second working parameter data for the motor in real time through the dedicated integrated circuit motor chip, which is not limited in the embodiment of the present invention.
[0121] In some feasible embodiments, after obtaining the first detection data and verifying the first detection data, the host computer can perform abnormality detection on the motor according to the first detection data. Specifically:
[0122] The host computer and the ASIC motor-specific chip can transmit and interact data through the serial port. When the host computer reads the first detection data obtained from the motor detection from the ASIC motor-specific chip, the ASIC motor-specific chip can also send a target data check code for the first detection data to the host computer.
[0123] After obtaining the first detection data and the target data check code, the host computer can check the first detection data according to the target data check code. Specifically, the host computer can first calculate the first detection data using the same algorithm as the ASIC motor dedicated chip to obtain a data check code.
[0124] Then, the host computer can compare the data verification code with the received target data verification code. If the data verification code is consistent with the target data verification code, it can be considered that the first detection data is complete. At this time, the host computer can store the first detection data.
[0125] If the data check code is inconsistent with the target data check code, it can be considered that the first detection data may have an error during transmission. At this time, the first detection data may not be stored, and the detection data can be re-acquired from the ASIC motor dedicated chip.
[0126] After the first detection data is stored, the host computer can perform fault detection on the operation of the motor based on the first detection data. If an abnormality is detected in the motor, the host computer can give an abnormal prompt for the motor.
[0127] In some feasible embodiments, after verifying the first detection data, the host computer can also store and display the first detection data, so that the motor can be checked for abnormalities based on the first detection data later. Specifically:
[0128] The host computer and the ASIC motor-specific chip can transmit and interact data through the serial port. When the host computer reads the first detection data obtained from the motor detection from the ASIC motor-specific chip, the ASIC motor-specific chip can also send a target data check code for the first detection data to the host computer.
[0129] After obtaining the first detection data and the target data check code, the host computer can check the first detection data according to the target data check code. Specifically, the host computer can first calculate the first detection data using the same algorithm as the ASIC motor dedicated chip to obtain a data check code.
[0130] Then, the host computer can compare the data verification code with the received target data verification code. If the data verification code is consistent with the target data verification code, it can be considered that the first detection data is complete. At this time, the host computer can store and display the first detection data.
[0131] If the data check code is inconsistent with the target data check code, it can be considered that the first detection data may have an error during transmission. At this time, the first detection data may not be stored, and the detection data can be re-acquired from the ASIC motor dedicated chip.
[0132] In some feasible embodiments, the host computer can also be used to modify the ASIC motor-specific chip; specifically, the host computer can be used to send a modification command to the ASIC motor-specific chip.
[0133] After receiving the modification instruction sent by the host computer, the dedicated integrated circuit motor chip can send the key to be decrypted to the host computer so that the host computer can verify the identity.
[0134] After receiving the key to be decrypted, the host computer can decrypt the key to be decrypted and send the decryption key for the key to be decrypted to the ASIC motor-specific chip.
[0135] After receiving the decryption key for the key to be decrypted, the ASIC motor dedicated chip can determine that the verification is successful; at this time, the ASIC motor dedicated chip can send a successful handshake reply to the host computer.
[0136] When the host computer receives the reply of the successful handshake sent by the host computer, it can send a configuration command to the ASIC motor-specific chip so that the ASIC motor-specific chip can modify the register according to the configuration command.
[0137] In some feasible embodiments, the host computer may also be used to prompt a communication failure if the number of failures in verifying the first detection data according to the target data verification code exceeds a preset number, so as to notify the inspector to inspect the motor.
[0138] For example, Figure 4 As shown,
[0139] The motor control mode can be divided into four states: initial state, standby state, working state and protection state. These states will be stored in two specific consecutive bits of the register of the ASIC motor dedicated chip, corresponding to the following values:
[0140] The initial state corresponds to 0x00; the standby state corresponds to 0x01; the working state corresponds to 0x02; and the protection state corresponds to 0x03.
[0141] The host computer communicates with the ASIC motor chip through UART, and the serial port of the ASIC motor chip is configured to receive interrupt mode; when the ASIC motor chip receives the motor control mode acquisition command 0x38 sent by the host computer, it will immediately send the current state data and data check code to the host computer; the data check method is CRC-8 check. The polynomial is x 8 +x 2 +x+1, convert the data into binary, perform XOR calculation with the polynomial, and the remainder obtained is the data check code.
[0142] Communication is successful when the data check code obtained by the host computer through the same calculation is the same as the data check code of the ASIC motor chip. When the data check fails five times in a row, a communication failure will be reported to improve the accuracy of data transmission. Using interrupt mode to receive and send can improve system response speed and resource utilization efficiency.
[0143] After the host computer obtains the current state data, it sends corresponding commands to obtain data according to different states. In the initial state and standby state, only the data of the configuration register needs to be obtained. In the working state and protection state, more detailed working mode data needs to be obtained to monitor key data in real time, such as the current and voltage of the Q-axis and D-axis, the observer angular velocity, and the protection flag.
[0144] Combined with the protection flags and key data, the host computer will issue an abnormal warning when the data is abnormal.
[0145] Abnormal determination: Set the threshold range of key data. If the monitoring data exceeds the set range, it will be determined as abnormal.
[0146] When the chip is in a protection state, such as the stall fault flag, overvoltage fault flag and other fault flags are raised, the host computer stores the working data of the ASIC motor-specific chip to facilitate developers to troubleshoot and analyze problems.
[0147] like Figure 5As shown, the host computer can send the modification command 0x42. After the chip parses the modification command, the host computer needs to send the unlocking key of the modification command, such as 0xFEDCBA98, to prevent the transmission data error from causing the chip configuration to be modified by mistake. After a successful handshake, the host computer can send the modified register, the modified value and the checksum command to the chip. The ASIC motor dedicated chip writes the command to modify the register value through the AHB (Advanced High-performance Bus) and responds to the host computer after successful modification.
[0148] In the embodiment of the present invention, the first detection data obtained from the motor detection and the target data verification code are read from the ASIC motor-specific chip; the first detection data is verified according to the target data verification code. Through the embodiment of the present invention, complete and effectively running data can be obtained from the motor through the ASIC motor-specific chip.
[0149] It should be noted that, for the sake of simplicity, the method embodiments are described as a series of action combinations, but those skilled in the art should be aware that the embodiments of the present invention are not limited by the order of the actions described, because according to the embodiments of the present invention, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily required by the embodiments of the present invention.
[0150] Reference Figure 6 , shows a schematic diagram of the structure of a data verification device according to an embodiment of the present invention, which is applied to the above data acquisition system, such as Figure 6 As shown, the data verification device may include the following modules:
[0151] The reading module 601 is used to read the first detection data obtained by detecting the motor and the target data check code from the motor-specific chip of the ASIC;
[0152] The verification module 602 is used to verify the first detection data according to the target data verification code.
[0153] In the embodiment of the present invention, the first detection data obtained from the motor detection and the target data verification code are read from the ASIC motor-specific chip; the first detection data is verified according to the target data verification code. Through the embodiment of the present invention, complete and effectively running data can be obtained from the motor through the ASIC motor-specific chip.
[0154] An embodiment of the present invention further provides an electronic device, including a processor, a memory, and a computer program stored in the memory and capable of running on the processor, wherein the computer program implements the above data verification method when executed by the processor.
[0155] An embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the above data verification method is implemented.
[0156] As for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0157] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.
[0158] Those skilled in the art will appreciate that the embodiments of the present invention may be provided as methods, devices, or computer program products. Therefore, the embodiments of the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the embodiments of the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.
[0159] The embodiments of the present invention are described with reference to the flowcharts and / or block diagrams of the methods, terminal devices (systems), and computer program products according to the embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of the processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing terminal device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing terminal device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0160] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing terminal device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0161] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal device so that a series of operating steps are executed on the computer or other programmable terminal device to produce a computer-implemented process, thereby providing instructions for executing on the computer or other programmable terminal device to implement the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0162] Although the preferred embodiments of the present invention have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the embodiments of the present invention.
[0163] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or terminal device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or terminal device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or terminal device including the elements.
[0164] The above provides a detailed introduction to a data acquisition system for a dedicated integrated circuit motor chip, a data verification method, a data verification device, an electronic device and a computer-readable storage medium. Specific examples are used in this article to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea; at the same time, for general technicians in this field, according to the idea of the present invention, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present invention.
Claims
1. A data acquisition system for a dedicated integrated circuit motor chip, characterized in that: The data acquisition system includes: a host computer and a dedicated chip for ASIC motors, wherein the host computer and the dedicated chip for ASIC motors are transmitted via a serial port; wherein: The ASIC motor-specific chip is used to detect the motor; The host computer is used to read the first detection data obtained from the motor detection and the target data verification code from the dedicated integrated circuit motor chip; the host computer is used to verify the first detection data according to the target data verification code.
2. The data acquisition system according to claim 1, characterized in that: The host computer communicates with the ASIC motor-specific chip via a universal asynchronous receiver-transmitter.
3. The data acquisition system according to claim 2, characterized in that: The UART is configured to receive interrupt mode.
4. The data acquisition system according to claim 1, characterized in that: The first detection data includes current state data and working mode data, and the target data check code includes a first data check code and a second data check code; The host computer is used to read the current state data and the first data verification code from the dedicated integrated circuit motor chip; when the first data verification code passes the verification, the operating mode data and the second data verification code are read from the dedicated integrated circuit motor chip according to the current state data.
5. The data acquisition system according to claim 4, characterized in that: The working mode data includes first working parameter data and second working parameter data, and a register is disposed in the ASIC motor-specific chip, and the register is used to store the first working parameter data; The host computer is used to obtain the first working parameter data from the register when the current state data is the first state data; obtain the first working parameter data from the register when the current state data is the second state data, and obtain the second working parameter data for the motor in real time through the dedicated integrated circuit motor dedicated chip.
6. The data acquisition system according to claim 1, characterized in that: The host computer is further used to perform abnormality detection on the motor according to the first detection data; when an abnormality is detected in the motor, a prompt is given to the motor.
7. The data acquisition system according to claim 6, characterized in that: The host computer is used to store and display the first detection data.
8. The data acquisition system according to claim 5, characterized in that: The ASIC motor-specific chip is also used to send the to-be-decrypted key to the host computer when receiving the modification instruction sent by the host computer; and after receiving the decryption key for the to-be-decrypted key sent by the host computer, send a successful handshake reply to the host computer, and modify the register when receiving the configuration command sent by the host computer; The host computer is further used to send a modification command to the ASIC motor-specific chip; and send a decryption key for the key to be decrypted to the ASIC motor-specific chip according to the key to be decrypted; And when receiving a reply of a successful handshake sent by the host computer, sending the configuration command to the host computer.
9. The data acquisition system according to claim 1, characterized in that: The host computer is further configured to prompt a communication failure when the number of failures in verifying the first detection data according to the target data verification code exceeds a preset number.
10. A data verification method, characterized in that: Applied to the data acquisition system according to any one of claims 1 to 9, the method comprises: Reading first detection data obtained from motor detection and a target data check code from a motor-specific chip of a dedicated integrated circuit; The first detection data is verified according to the target data verification code.
11. A data verification device, characterized in that: Applied to the data acquisition system according to any one of claims 1 to 9, the device comprises: A reading module, used for reading first detection data obtained from motor detection and a target data check code from a motor-specific chip in a dedicated integrated circuit; A verification module is used to verify the first detection data according to the target data verification code.
12. An electronic device, characterized in that: The method comprises a processor, a memory, and a computer program stored in the memory and capable of running on the processor, wherein the computer program implements the data verification method as claimed in claim 10 when executed by the processor.
13. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the data verification method according to claim 10 is implemented.