Signal processing method, device, equipment and storage medium based on motor controller
By differentiating the signal of the motor controller and data dictionary generation, the signal is automated, and the signal interface changes are solved due to database changes, and the development efficiency and automation of signal processing are improved.
Patent Information
- Application Number
- CN202210461833.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-28
- Publication Date
- 2025-05-13
- Estimated Expiration
- 2042-04-28
AI Technical Summary
During the signal processing process of the motor controller, database changes lead to changes in the signal interface, resulting in high error rates and cumbersome programs, and it is impossible to adapt to high-frequency signal interface changes.
By distinguishing the signals of the motor controller, a data dictionary is generated, and the initial input signal and the initial output signal are linked to the data dictionary, the peripheral input signal and the peripheral output signal are obtained, and then the analysis and conversion process is performed to realize the automatic processing of the signal.
There is no need to change the signal interface, which improves the automation of the motor controller signal processing, reduces the error rate, saves time, and improves development efficiency.
Smart Images

Figure CN114881075B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of motor control technology, and in particular to a signal processing method, device, electronic device and computer-readable storage medium based on a motor controller. Background Art
[0002] The signal processing method of the motor controller is applicable to the situation where the database is changed during the vehicle development process. When the database is changed, the signal interface must be changed.
[0003] However, since the processing logic of each signal interface is different, every time a change is made in the database, it is necessary to rebuild the model or manually modify the previous model before the signal can be processed again. This leads to an increasing error rate, and the program is cumbersome and cannot adapt to high-frequency signal interface changes. Summary of the invention
[0004] The purpose of the embodiments of the present application is to provide a signal processing method, device, electronic device and computer-readable storage medium based on a motor controller, so that the motor controller can realize automatic processing of signals without changing the signal interface, thereby improving development efficiency.
[0005] In a first aspect, an embodiment of the present application provides a signal processing method based on a motor controller, the method comprising:
[0006] Differentiating and processing the signal of the motor controller to obtain an initial input signal and an initial output signal;
[0007] Generate a data dictionary according to the initial input signal and the initial output signal;
[0008] The initial input signal and the initial output signal are linked to the data dictionary to obtain a peripheral input signal and a peripheral output signal;
[0009] Analyze the peripheral input signal to obtain a target input signal;
[0010] The peripheral output signal is converted to obtain a target output signal.
[0011] In the above implementation process, a data dictionary is obtained according to the differentiated initial input signal and initial output signal, and the initial input signal and initial output signal are linked to the data dictionary, so that the signals of the motor controller can be processed reasonably and effectively without changing the signal interface, saving time and improving development efficiency.
[0012] Furthermore, the step of generating a data dictionary according to the initial input signal and the initial output signal comprises:
[0013] Obtain a signal table according to the initial input signal and the initial output signal;
[0014] The data dictionary is generated according to the signal table.
[0015] In the above implementation process, a table and a data dictionary are generated according to the initial input signal and the initial output signal, so that the information of the initial input signal and the initial output signal can be completely recorded to avoid errors.
[0016] Furthermore, the step of parsing the peripheral input signal to obtain the target input signal includes:
[0017] Performing resolution analysis on the initial input signal to obtain a resolution signal;
[0018] Performing invalid value processing on the initial input signal to obtain an invalid flag signal;
[0019] Type conversion is performed on the parsed signal and the invalid flag signal to obtain a target input signal.
[0020] In the above implementation process, after the initial input signal is subjected to resolution analysis and invalid value processing, the obtained analysis signal and invalid flag signal are subjected to type conversion processing to obtain the target input signal, so that the type and resolution of the target input signal can be reasonably and effectively processed.
[0021] Furthermore, the step of performing resolution analysis on the initial input signal to obtain a resolution signal includes:
[0022] Determining whether the signal type of the initial input signal is unsigned integer data;
[0023] If yes, output the analysis signal;
[0024] If not, the initial input signal is subjected to signal conversion processing to obtain the analysis signal.
[0025] In the above implementation process, the signal type of the initial input signal is determined, and then the initial input signal whose signal type is non-unsigned integer data is converted and processed to obtain a parsed signal, which can correctly parse the initial input signal and ensure the accuracy of the initial input signal.
[0026] Furthermore, the step of performing invalid value processing on the initial input signal to obtain an invalid flag signal includes:
[0027] Obtaining a resolution range value of the initial input signal;
[0028] Determining whether the initial input signal is an invalid value signal according to the analytical range value;
[0029] If so, output the invalid flag signal.
[0030] In the above implementation process, the initial input signal is judged according to the resolution range value of the initial input signal. If it is an invalid value signal, an invalid flag signal is output to ensure that the obtained signals are all invalid flag signals, which is convenient for subsequent processing.
[0031] Furthermore, the step of converting the peripheral output signal to obtain a target output signal includes:
[0032] Obtaining a signal type of the peripheral output signal;
[0033] If the signal type of the peripheral output signal is non-unsigned integer data, the peripheral output signal is converted to obtain the target output signal.
[0034] In the above implementation process, the type of the peripheral output signal is converted according to the signal type, so that the type of the target output signal can be unified, avoiding the situation where the output cannot be performed due to different types of the target output signal.
[0035] In a second aspect, an embodiment of the present application further provides a signal processing device based on a motor controller, the signal processing device comprising:
[0036] A distinguishing module, used for distinguishing the signal of the motor controller to obtain an initial input signal and an initial output signal;
[0037] A generating module, used for generating a data dictionary according to the initial input signal and the initial output signal;
[0038] A linking module, used for linking the initial input signal and the initial output signal with the data dictionary to obtain a peripheral input signal and a peripheral output signal;
[0039] An analysis module, used for analyzing the peripheral input signal to obtain a target input signal;
[0040] The conversion module is used to convert the peripheral output signal to obtain a target output signal.
[0041] In the above implementation process, the signals are differentiated to obtain the initial input signal and the initial output signal, a data dictionary is obtained based on the initial input signal and the initial output signal, and the initial input signal and the initial output signal are linked to the data dictionary, so that the signals of the motor controller can be processed reasonably and effectively without changing the signal interface, saving time and improving development efficiency.
[0042] Furthermore, the generating module is also used for:
[0043] Obtain a signal table according to the initial input signal and the initial output signal;
[0044] The data dictionary is generated according to the signal table.
[0045] In the above implementation process, a table and a data dictionary are generated according to the initial input signal and the initial output signal, so that the information of the initial input signal and the initial output signal can be completely recorded to avoid errors.
[0046] In a third aspect, an embodiment of the present application provides an electronic device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the method described in any one of the first aspects when executing the computer program.
[0047] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, on which instructions are stored. When the instructions are executed on a computer, the computer executes the method as described in any one of the first aspects.
[0048] In a fifth aspect, an embodiment of the present application provides a computer program product, which, when running on a computer, enables the computer to execute the method as described in any one of the first aspects.
[0049] Other features and advantages of the present disclosure will be set forth in the following description, or some features and advantages may be inferred or unambiguously determined from the description, or may be learned by implementing the above-mentioned technology of the present disclosure.
[0050] And it can be implemented according to the contents of the specification. The following is a detailed description of the preferred embodiments of the present application with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments of the present application will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0052] Figure 1 A schematic diagram of a flow chart of a signal processing method based on a motor controller provided in an embodiment of the present application;
[0053] Figure 2 A schematic diagram of the structure of a signal processing device based on a motor controller provided in an embodiment of the present application;
[0054] Figure 3 A schematic diagram of the structural composition of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0055] The technical solutions in the embodiments of the present application will be described below in conjunction with the drawings in the embodiments of the present application.
[0056] It should be noted that similar reference numerals and letters represent similar items in the following drawings, so once an item is defined in one drawing, it does not need to be further defined and explained in subsequent drawings. At the same time, in the description of this application, the terms "first", "second", etc. are only used to distinguish the description and cannot be understood as indicating or implying relative importance.
[0057] The specific implementation methods of the present application are further described in detail below in conjunction with the accompanying drawings and examples. The following examples are used to illustrate the present application but are not intended to limit the scope of the present application.
[0058] Embodiment 1
[0059] Figure 1 is a flow chart of a signal processing method based on a motor controller provided in an embodiment of the present application, such as Figure 1 As shown, the method includes:
[0060] S1, distinguishing and processing the signal of the motor controller to obtain an initial input signal and an initial output signal;
[0061] S2, generating a data dictionary according to the initial input signal and the initial output signal;
[0062] S3, linking the initial input signal and the initial output signal with the data dictionary to obtain a peripheral input signal and a peripheral output signal;
[0063] S4, analyzing the peripheral input signal to obtain the target input signal;
[0064] S5, converting the peripheral output signal to obtain the target output signal.
[0065] In the above implementation process, the signal of the motor controller is a control signal, and it can be distinguished to obtain an initial input signal and an initial output signal, and then the initial input signal and the initial output signal are processed respectively to obtain a target input signal and a target output signal, so that the signals of the motor controller can be processed reasonably and effectively without changing the signal interface, saving time and improving development efficiency.
[0066] Taking this embodiment as an example, the signal processing method can be implemented by writing an automated script based on Matlab software, and used for automatic modeling software to realize automated signal processing, so that when the motor controller signal changes, an automated method can be used to complete the signal processing, that is, there is no need to change due to interface changes, and it can avoid the error-prone and tedious problems of manual modification, thereby improving development efficiency.
[0067] In one possible implementation, S2 includes:
[0068] Obtaining a signal table according to an initial input signal and an initial output signal;
[0069] Generate a data dictionary from a signal table.
[0070] In the above implementation process, a table and a data dictionary are generated according to the initial input signal and the initial output signal, so that the information of the initial input signal and the initial output signal can be completely recorded to avoid errors.
[0071] The signal table records various information such as the signal type, maximum value, minimum value, etc. of the initial input signal and the initial output signal, which is used to facilitate the search and comparison of the information of the initial input signal and the initial output signal when an abnormality or error occurs.
[0072] In one possible implementation, in S3, the data dictionary records the logical relationship, format and other information necessary for processing the initial output signal and the initial input signal, and the initial input signal and the initial output signal are linked to the data dictionary respectively, that is, the logical relationship, format and other information in the initial input signal and the initial output signal are compared with those in the data dictionary. If they are inconsistent, they need to be changed, and finally the peripheral input signal and the peripheral output signal are obtained. The logical relationship, format and other information of the initial output signal and the initial input signal must be consistent with that in the data dictionary before subsequent parsing or conversion processing can be performed. If the logical relationship, format and other information in the initial output signal and the initial input signal are inconsistent with those in the data dictionary, the target input signal and the target output signal cannot be output.
[0073] In one possible implementation, S4 includes:
[0074] Performing resolution analysis on the initial input signal to obtain a resolution signal;
[0075] Perform invalid value processing on the initial input signal to obtain an invalid flag signal;
[0076] Perform type conversion on the parsing signal and the invalid flag signal to obtain the target input signal.
[0077] In the above implementation process, after the initial input signal is subjected to resolution analysis and invalid value processing, the obtained analysis signal and invalid flag signal are subjected to type conversion processing to obtain the target input signal, so that the type and resolution of the target input signal can be reasonably and effectively processed.
[0078] The process of parsing the initial input signal can be divided into three parts, namely, parsing and replacing the initial input signal, invalid value processing and type conversion. When the initial input signal is input, it will be parsed and replaced, and invalid value processing will be performed in parallel, and then the target input signal will be obtained based on the obtained parsing signal and invalid flag signal.
[0079] In a possible implementation, the step of performing resolution analysis on the initial input signal to obtain a resolution signal includes:
[0080] Determine whether the signal type of the initial input signal is unsigned integer data;
[0081] If so, output the analytical signal;
[0082] If not, the initial input signal is subjected to signal conversion processing to obtain an analytical signal.
[0083] In the above implementation process, the signal type of the initial input signal is determined, and then the initial input signal whose signal type is non-unsigned integer data is converted and processed to obtain a parsed signal, which can correctly parse the initial input signal and ensure the accuracy of the initial input signal.
[0084] Exemplarily, if the signal type of the initial input signals VCU_SignalA and VCU_SignalB is unsigned integer data, they can be directly output as parsed signals; if the signal type of the initial input signal VCU_SignalC is non-unsigned integer data, it is necessary to first perform data type conversion processing, and then multiply the non-unsigned integer data corresponding to VCU_SignalC by the resolution and then add the offset to output, so as to obtain the parsed signal. For example, if there are special requirements for the initial input signal, a substitute value can be used for output, and the substitute value must ensure that the same data type as the initial input signal is maintained, such as the substitute value ic_VCU_SignalBMan_C and the data type of VCU_SignalB must be consistent, for example, non-unsigned integer data, and the data type of its substitute value ic_VCU_SignalCMan_C is set to non-unsigned integer data. Since the input data type is usually unsigned integer, it needs to be converted, that is, converted to non-unsigned integer data, and then multiplied by the resolution plus the offset to obtain the parsed signal.
[0085] In a possible implementation, the step of performing invalid value processing on the initial input signal to obtain an invalid flag signal includes:
[0086] Get the resolution range value of the initial input signal;
[0087] Determine whether the initial input signal is an invalid value signal according to the analytical range value;
[0088] If so, output an invalid flag signal.
[0089] In the above implementation process, the initial input signal is judged according to the resolution range value of the initial input signal. If it is an invalid value signal, an invalid flag signal is output to ensure that the obtained signals are all invalid flag signals, which is convenient for subsequent processing.
[0090] If the resolution range value of the initial input signal exceeds the resolution range, it is determined to be an invalid value and an invalid flag signal is output. Exemplarily, the resolution range value of the initial input signal is compared with the maximum value and the minimum value of the resolution range. If it is greater than the maximum value or less than the minimum value, the invalid flag corresponding to the initial input signal is 1. The maximum value and the minimum value of the resolution range can be calculated by the offset and the resolution of the initial input signal.
[0091] After obtaining the invalid value signal, the signal line of each signal is named, such as VCU_SignalA corresponds to ic_VCU_SignalA_InvalidFlag, and VCU_SignalB corresponds to ic_VCU_SignalB_InvalidFlag.
[0092] In a possible implementation, the step of converting the peripheral output signal to obtain the target output signal includes:
[0093] Get the signal type of the peripheral output signal;
[0094] If the signal type of the peripheral output signal is non-unsigned integer data, the peripheral output signal is converted to obtain a target output signal.
[0095] In the above implementation process, the type of the peripheral output signal is converted according to the signal type, so that the type of the target output signal can be unified, thereby avoiding the inability to output due to different types of target output signals.
[0096] When identifying the peripheral output signal, the same frame message can be classified and processed, and it can be determined whether the signal type is unsigned integer data. If it is unsigned integer data, the target output signal can be directly output after conversion. If it is identified as non-unsigned integer data, the non-unsigned integer data is subtracted from the offset and divided by the resolution to output the target output signal.
[0097] Embodiment 2
[0098] In order to execute the method corresponding to the above embodiment 1 to achieve the corresponding functions and technical effects, a signal processing device based on a motor controller is provided below, such as Figure 2 As shown, the device comprises:
[0099] A distinguishing module 1 is used to distinguish and process the signal of the motor controller to obtain an initial input signal and an initial output signal;
[0100] A generating module 2, used for generating a data dictionary according to an initial input signal and an initial output signal;
[0101] Linking module 3, used for linking the initial input signal and the initial output signal with the data dictionary to obtain the peripheral input signal and the peripheral output signal;
[0102] The analysis module 4 is used to analyze the peripheral input signal to obtain the target input signal;
[0103] The conversion module 5 is used to convert the peripheral output signal to obtain the target output signal.
[0104] In a possible implementation, the generating module 2 is further used for:
[0105] Obtaining a signal table according to an initial input signal and an initial output signal;
[0106] Generate a data dictionary from a signal table.
[0107] In a possible implementation, the parsing module 4 is further used for:
[0108] Performing resolution analysis on the initial input signal to obtain a resolution signal;
[0109] Perform invalid value processing on the initial input signal to obtain an invalid flag signal;
[0110] Perform type conversion on the parsing signal and the invalid flag signal to obtain the target input signal.
[0111] In a possible implementation, the parsing module 4 is further used for:
[0112] Determine whether the signal type of the initial input signal is unsigned integer data;
[0113] If so, output the analytical signal;
[0114] If not, the initial input signal is subjected to signal conversion processing to obtain an analytical signal.
[0115] In a possible implementation, the parsing module 4 is further used for:
[0116] Get the resolution range value of the initial input signal;
[0117] Determine whether the initial input signal is an invalid value signal according to the analytical range value;
[0118] If so, output an invalid flag signal.
[0119] In a possible implementation, the conversion module 5 is further used for:
[0120] Get the signal type of the peripheral output signal;
[0121] If the signal type of the peripheral output signal is non-unsigned integer data, the output signal is converted to obtain a target output signal.
[0122] The above-mentioned signal processing device based on the motor controller can implement the method of the above-mentioned embodiment 1. The options in the above-mentioned embodiment 1 are also applicable to this embodiment and will not be described in detail here.
[0123] The rest of the contents of the embodiments of the present application can refer to the contents of the above-mentioned embodiment 1, and will not be repeated in this embodiment.
[0124] Embodiment 3
[0125] An embodiment of the present application provides an electronic device, including a memory and a processor, wherein the memory is used to store a computer program, and the processor runs the computer program to enable the electronic device to execute the signal processing method based on the motor controller of the first embodiment.
[0126] Optionally, the above-mentioned electronic device may be a server.
[0127] See also Figure 3 , Figure 3 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. The electronic device may include a processor 31, a communication interface 32, a memory 33 and at least one communication bus 34. The communication bus 34 is used to realize direct connection and communication between these components. The communication interface 32 of the device in the embodiment of the present application is used to communicate signaling or data with other node devices. The processor 31 may be an integrated circuit chip with signal processing capabilities.
[0128] The processor 31 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present application can be implemented or executed. The general-purpose processor can be a microprocessor or the processor 31 can also be any conventional processor, etc.
[0129] The memory 33 may be, but is not limited to, a random access memory (RAM), a read only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable read-only memory (EEPROM), etc. The memory 33 stores computer-readable instructions. When the computer-readable instructions are executed by the processor 31, the device can execute the above-mentioned Figure 1 The method embodiment involves various steps.
[0130] Optionally, the electronic device may further include a storage controller and an input / output unit. The memory 33, the storage controller, the processor 31, the peripheral interface, and the input / output unit are electrically connected to each other directly or indirectly to achieve data transmission or interaction. For example, these components may be electrically connected to each other via one or more communication buses 34. The processor 31 is used to execute executable modules stored in the memory 33, such as software function modules or computer programs included in the device.
[0131] The input and output unit is used to provide users with the task creation and to create an optional time period or preset execution time for the task to enable interaction between the user and the server. The input and output unit can be, but is not limited to, a mouse and a keyboard.
[0132] Understandably, Figure 3 The structure shown is for illustration only. The electronic device may also include Figure 3 More or fewer components as shown, or with Figure 3 Different configurations are shown. Figure 3Each component shown in the figure can be implemented by hardware, software or a combination thereof.
[0133] In addition, an embodiment of the present application further provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the signal processing method based on the motor controller of the first embodiment.
[0134] The embodiment of the present application also provides a computer program product, which, when running on a computer, enables the computer to execute the method described in the method embodiment.
[0135] In several embodiments provided in the present application, it should be understood that the disclosed devices and methods can also be implemented in other ways. The device embodiments described above are merely schematic. For example, the flowcharts and block diagrams in the accompanying drawings show the possible architecture, functions and operations of the devices, methods and computer program products according to multiple embodiments of the present application. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of a code, and the module, a program segment or a part of a code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or the flowchart, and the combination of boxes in the block diagram and / or the flowchart, can be implemented with a dedicated hardware-based device that performs a specified function or action, or can be implemented with a combination of dedicated hardware and computer instructions.
[0136] In addition, the functional modules in the various embodiments of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
[0137] If the functions are implemented in the form of software function modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as USB flash drives, mobile hard drives, ROM, RAM, magnetic disks, or optical disks.
[0138] The above description is only an embodiment of the present application and is not intended to limit the scope of protection of the present application. For those skilled in the art, the present application may have various changes and variations. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application should be included in the scope of protection of the present application. It should be noted that similar reference numerals and letters represent similar items in the following drawings, so once an item is defined in one drawing, it does not need to be further defined and explained in the subsequent drawings.
[0139] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
[0140] 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 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 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 device including the elements.
Claims
1. A signal processing method based on a motor controller, characterized in that: The method comprises: Differentiating and processing the signal of the motor controller to obtain an initial input signal and an initial output signal; The step of generating a data dictionary according to the initial input signal and the initial output signal comprises: Obtain a signal table according to the initial input signal and the initial output signal; generating the data dictionary according to the signal table; The signal table includes the signal type, maximum value, minimum value of the initial input signal and the signal type, maximum value, minimum value of the initial output signal; The data dictionary records the logical relationship and format information necessary for processing the initial output signal and the initial input signal, that is, the logical relationship and format information in the initial input signal and the initial output signal are compared with those in the data dictionary. If they are inconsistent, they need to be changed, and finally the peripheral input signal and the peripheral output signal are obtained; The initial input signal and the initial output signal are linked to the data dictionary to obtain a peripheral input signal and a peripheral output signal; Analyze the peripheral input signal to obtain a target input signal; Converting the peripheral output signal to obtain a target output signal; When a peripheral output signal is identified, the same frame message is classified and processed, and it is determined whether the signal type is unsigned integer data. If the signal type is unsigned integer data, the target output signal is output after conversion; if the signal type is non-unsigned integer data, the non-unsigned integer data is subtracted from the offset and divided by the resolution, and the target output signal is output; The step of parsing the peripheral input signal to obtain the target input signal includes: Performing resolution analysis on the initial input signal to obtain a resolution signal; Performing invalid value processing on the initial input signal to obtain an invalid flag signal; Type conversion is performed on the parsed signal and the invalid flag signal to obtain a target input signal.
2. The signal processing method based on the motor controller according to claim 1, characterized in that: The step of performing resolution analysis on the initial input signal to obtain a resolution signal comprises: Determining whether the signal type of the initial input signal is unsigned integer data; If so, output the analysis signal; If not, the initial input signal is subjected to signal conversion processing to obtain the analysis signal.
3. The signal processing method based on the motor controller according to claim 1, characterized in that: The step of performing invalid value processing on the initial input signal to obtain an invalid flag signal comprises: Obtaining a resolution range value of the initial input signal; Determining whether the initial input signal is an invalid value signal according to the analytical range value; If so, output the invalid flag signal.
4. A signal processing device based on a motor controller, characterized in that: The signal processing device comprises: A distinguishing module, used for distinguishing the signal of the motor controller to obtain an initial input signal and an initial output signal; A generating module, used for generating a data dictionary according to the initial input signal and the initial output signal; The generating module is further used to obtain a signal table according to the initial input signal and the initial output signal; generating the data dictionary according to the signal table; The signal table includes the signal type, maximum value, minimum value of the initial input signal and the signal type, maximum value, minimum value of the initial output signal; The data dictionary records the logical relationship and format information necessary for processing the initial output signal and the initial input signal, that is, the logical relationship and format information in the initial input signal and the initial output signal are compared with those in the data dictionary. If they are inconsistent, they need to be changed, and finally the peripheral input signal and the peripheral output signal are obtained; A linking module, used for linking the initial input signal and the initial output signal with the data dictionary to obtain a peripheral input signal and a peripheral output signal; An analysis module, used for analyzing the peripheral input signal to obtain a target input signal; A conversion module, used for converting the peripheral output signal to obtain a target output signal; The conversion module is also used to, when identifying a peripheral output signal, classify and process the same frame message, and determine whether the signal type is unsigned integer data. If the signal type is unsigned integer data, output the target output signal after conversion; if the signal type is non-unsigned integer data, subtract the offset from the non-unsigned integer data and divide it by the resolution, and then output the target output signal; The parsing module is also used for: Performing resolution analysis on the initial input signal to obtain a resolution signal; Performing invalid value processing on the initial input signal to obtain an invalid flag signal; Type conversion is performed on the parsed signal and the invalid flag signal to obtain a target input signal.
5. An electronic device, characterized in that: The electronic device comprises a memory and a processor, wherein the memory is used to store a computer program, and the processor runs the computer program to enable the electronic device to execute the signal processing method based on a motor controller according to any one of claims 1 to 3.
6. A computer-readable storage medium, characterized in that: The computer program is stored therein, and when the computer program is executed by a processor, the signal processing method based on the motor controller as claimed in any one of claims 1 to 3 is implemented.
Citation Information
Patent Citations
Interface device
JP1994231070A
Kitchen instrument language conversion apparatus
JP2011191880A