Sensor simulation device for motor controller and signal modulation method thereof
By loading the mathematical model of the real speed sensor in the sensor simulation device for the motor controller and performing digitization processing in the FPGA, the rotation signal or ABZ signal that verifies the resolution capability of the motor controller is output, and the problems of low efficiency and high cost of electronically controlled rotation verification in the prior art are solved, and efficient and low-cost verification and fault simulation capabilities are achieved.
Patent Information
- Application Number
- CN202411511810.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-28
- Publication Date
- 2025-02-25
AI Technical Summary
The prior art has problems of low verification efficiency and high verification cost during electronically controlled rotary transformation verification, and traditional methods require frequent rotation replacement, which reduces verification and production efficiency.
It provides a sensor simulation device for motor controllers, including an FPGA control unit, a sensor conversion unit and a power supply. It is digitized in the FPGA by loading a mathematical model of a real speed sensor, outputs a rotary signal or ABZ signal that verifies the resolution capability of the motor controller, and has sensor failure simulation function.
It reduces verification costs, improves verification efficiency, and can effectively verify the motor controller's analysis ability for different sensors and fault conditions, saves the manufacturer's time and production costs, and improves production efficiency.
Smart Images

Figure CN119511822A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to a motor control device, and in particular to a sensor simulation device for a motor controller and a signal modulation method thereof. Background Art
[0002] The motor controller (hereinafter referred to as "electronic control") is one of the core components of new energy vehicles. With the rapid development of new energy vehicles, there are more and more manufacturers of electronic control. At present, since the electronic control developed and produced by different manufacturers are not exactly the same, the sensor models of the corresponding motors are also different. Therefore, when verifying the analytical ability of the electronic control under different sensors, due to the poor compatibility of existing sensors, one type of electronic control needs to correspond to one type of sensor, resulting in high verification costs; moreover, the verification of different electronic controls requires repeated replacement of corresponding sensor models, which significantly reduces the efficiency of verification.
[0003] In addition, the traditional verification method is to use a mechanical resolver to verify the resolution capability of the electronic control in a static environment, and to use a motor plus a resolver to verify the resolution capability of the electronic control in a dynamic environment, so as to know the resolution capability of the electronic control for the resolver under different working conditions. However, this method also faces the problem of frequent replacement of resolvers, which reduces the verification efficiency and production efficiency. Summary of the invention
[0004] The purpose of the present invention is to solve the technical problems of low verification efficiency and high verification cost in the prior art when verifying an electric-controlled resolver, and to provide a sensor simulation device for a motor controller and a signal modulation method thereof.
[0005] To achieve the above objectives, the technical solutions provided by the present invention are as follows:
[0006] A sensor simulation device for a motor controller, which is special in that:
[0007] It includes an FPGA control unit, a sensor conversion unit and a power supply;
[0008] The FPGA control unit is internally loaded with a mathematical model of a real speed sensor, which is used to receive an external phase signal matching the motor controller parameters to be verified through a communication circuit, and output a resolver signal or an ABZ signal for verifying the resolution capability of the motor controller;
[0009] The sensor conversion unit includes a sensor adapter board, a sampling circuit, an output circuit and an external interface arranged on the sensor adapter board; the sampling circuit and the output circuit are respectively connected to the FPGA control unit; there are two external interfaces, one of which is a resolver analog interface and the other is a photoelectric analog interface; one end of the resolver analog interface is respectively connected to the sampling circuit and the output circuit, and the other end is connected to the motor controller for receiving an excitation signal from the motor controller and outputting a corresponding resolver signal; or one end of the photoelectric analog interface is connected to the output circuit, and the other end is connected to the motor controller for outputting a corresponding ABZ signal;
[0010] The power supply is respectively connected to the sampling circuit, the output circuit and the FPGA control unit for supplying power.
[0011] Furthermore, the sensor conversion unit also includes a fault simulation circuit arranged on the sensor adapter board, which is located between the output circuit and the external interface and is respectively connected to the FPGA control unit, sampling circuit, output circuit, power supply and external interface, and is used to simulate the open circuit or short circuit fault of the signal.
[0012] Furthermore, the external interface is connected to the sensor conversion board via a 6-pin terminal or a 4-pin terminal.
[0013] Furthermore, the communication circuit is an optical fiber communication circuit; the sampling circuit is an AD sampling circuit; and the output circuit is a DA analog output circuit.
[0014] Furthermore, the fault simulation circuit is a relay switching circuit.
[0015] At the same time, the present invention also provides a signal modulation method for a sensor simulation device for a motor controller, comprising the following steps:
[0016] Step 1, assembling the sensor simulation device for the motor controller;
[0017] Step 2: When the motor controller needs to verify the ability to analyze the resolver signal, the motor controller is connected to the resolver analog interface, and the process proceeds to step 3; when the motor controller needs to verify the ability to analyze the photoelectric signal, the motor controller is connected to the photoelectric analog interface, and the process proceeds to step 5;
[0018] Step 3: The communication circuit receives the phase signal from the outside and transmits it to the FPGA control unit. At the same time, the excitation signal sent by the motor controller is received by the sampling circuit through the external interface and transmitted to the FPGA control unit.
[0019] Step 4, the FPGA control unit calculates the resolver signal based on the phase signal and the excitation signal received in step 3, and outputs the resolver signal to the motor controller through the output circuit and the resolver analog interface in sequence, thereby realizing the modulation of the resolver signal;
[0020] Step 5: The communication circuit receives the phase signal from the outside and transmits it to the FPGA control unit. The FPGA control unit processes the phase signal and outputs the ABZ signal, which is then output to the motor controller via the output circuit and the optoelectronic analog interface in turn, thereby realizing modulation of the optoelectronic signal.
[0021] Furthermore, in step 3 and step 5, the phase signal refers to a phase signal that matches the motor controller parameters to be verified, including the number of pole pairs, initial angle, output waveform amplitude, and number of lines of the sensor.
[0022] Furthermore, in step 4, when it is necessary to verify the motor controller's ability to analyze the resolver signal under a fault condition, the resolver signal transmitted through the output circuit enters the fault simulation circuit, which simulates an open circuit or short circuit fault, and is then output to the motor controller through the resolver simulation interface.
[0023] Further, in step 4, the resolver signal includes a sin signal and a cos signal, wherein the sin signal sin out The calculation method is:
[0024]
[0025] In the formula, w exc represents the angular velocity of the excitation signal, t represents the period, and w motor represents the phase signal angular velocity, Indicates the initial operating angle of the motor;
[0026] cos signal out The calculation method is:
[0027]
[0028] Furthermore, in step 5, when it is necessary to verify the motor controller's ability to analyze photoelectric signals under fault conditions, the ABZ signal transmitted through the output circuit enters the fault simulation circuit, which simulates an open circuit or short circuit fault, and then outputs it to the motor controller through the photoelectric simulation interface.
[0029] Compared with the prior art, the beneficial technical effects of the present invention are as follows:
[0030] 1. The sensor simulation device for the motor controller provided by the present invention mainly utilizes the high-speed computing characteristics of FPGA, combined with technologies such as analog sampling and output, to digitally process the mathematical model of the real speed sensor in the FPGA control unit, and implement high-speed computing in the FPGA control unit, and finally outputs a signal corresponding to the analytical capability of the motor controller to verify the analytical capability under different sensors, thereby facilitating the verification of the analytical capability, and significantly reducing the verification cost and improving the verification efficiency.
[0031] 2. The sensor simulation device for the motor controller provided by the present invention also has a sensor fault simulation function, which can simulate the short circuit and open circuit of the sensor harness to facilitate customers to verify sensor faults.
[0032] 3. The sensor simulation device for the motor controller provided by the present invention can effectively verify the detection capability of the motor controller manufacturer when the actual vehicle encounters a sensor failure, which can effectively save the manufacturer's time and production costs, thereby improving production efficiency.
[0033] 4. The sensor simulation device for the motor controller provided by the present invention can achieve an output waveform that is completely consistent with the output waveform of the real speed sensor, and can replace the traditional real sensor with this device, and has high compatibility.
[0034] 5. The signal modulation method of the sensor simulation device for the motor controller provided by the present invention can arbitrarily change the pole pair number, initial angle, output waveform amplitude, number of lines and other parameters of the sensor, thereby realizing the function of a sensor simulation box replacing various real sensors. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] Figure 1 The figure is a schematic structural diagram of an embodiment of a sensor simulation device for a motor controller according to the present invention.
[0036] Figure 2 A partial mechanical model diagram of an embodiment of a sensor simulation device for a motor controller of the present invention. DETAILED DESCRIPTION
[0037] In order to make the purpose, advantages and features of the present invention more clear, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.
[0038] like Figure 1 As shown, this embodiment provides a sensor simulation device for a motor controller, including an FPGA control unit, a sensor conversion unit and a power supply.
[0039] The FPGA control unit is loaded with a mathematical model of a real speed sensor, which is used to receive an external phase signal matching the motor controller parameters to be verified through a communication circuit, and output a resolver signal or ABZ signal to verify the resolution capability of the motor controller. In this embodiment, the communication circuit is a high-speed optical fiber communication circuit.
[0040] The sensor conversion unit includes a sensor adapter board, a sampling circuit, an output circuit and an external interface arranged on the sensor adapter board; the sampling circuit is an AD sampling circuit; the output circuit is a DA analog output circuit, and the two are respectively connected to the FPGA control unit.
[0041] The embodiment has two external interfaces, one of which is a resolver analog interface and the other is a photoelectric analog interface; when the resolver analog interface is used, one end thereof is connected to the sampling circuit and the output circuit respectively, and the other end is connected to the motor controller for receiving the excitation signal from the motor controller and outputting the corresponding resolver signal. When the photoelectric analog interface is used, one end of the photoelectric analog interface is connected to the output circuit, and the other end is connected to the motor controller for outputting the corresponding ABZ signal, thereby realizing the transmission of signals between the FPGA control unit and the motor controller.
[0042] Figure 2 This is a model diagram that can be realized in this embodiment, in which the core control board is the FPGA control unit, and the FPGA control unit is connected to the sensor conversion board through a double-row pin to realize functions such as SPI communication, AD sampling, and IO control. The external interface is connected to the sensor conversion board through a 6-pin terminal or a 4-pin terminal.
[0043] The power supply is respectively connected to the sampling circuit, the output circuit and the FPGA control unit to supply power to them and ensure their normal operation.
[0044] In addition, the sensor conversion unit also includes a fault simulation circuit arranged on the sensor adapter board. The fault simulation circuit is a relay switching circuit. The relay switching circuit is located between the output circuit and the external interface, and is respectively connected to the FPGA control unit, sampling circuit, output circuit, power supply and external interface, and is used to simulate the open circuit or short circuit fault of the signal.
[0045] Combination Figure 1 and Figure 2 This embodiment also provides a signal modulation method for a sensor simulation device for a motor controller, comprising the following steps:
[0046] Step 1: Assemble the sensor simulation device for the motor controller of this embodiment.
[0047] Step 2: When the motor controller needs to verify its ability to resolve the resolver signal, connect the motor controller to the resolver analog interface and proceed to step 3; when the motor controller needs to verify its ability to resolve the photoelectric signal, connect the motor controller to the photoelectric analog interface and proceed to step 5.
[0048] Step 3: The communication circuit receives the phase signal from the outside and transmits it to the FPGA control unit. At the same time, the excitation signal EXC issued by the motor controller is received by the sampling circuit through the external interface and transmitted to the FPGA control unit by the sampling circuit via SPI communication.
[0049] Step 4: The FPGA control unit calculates the resolver signal based on the phase signal and excitation signal received in step 3, and after amplification by the output circuit and DC blocking capacitor, it is output to the motor controller through the resolver analog interface, thereby realizing modulation of the resolver signal.
[0050] In this step, the resolver signal includes a sin signal and a cos signal, wherein the sin signal sin out The calculation method is:
[0051]
[0052] In the formula, w exc represents the angular velocity of the excitation signal, t represents the period, and w motor represents the phase signal angular velocity, Indicates the initial operating angle of the motor;
[0053] cos signal out The calculation method is:
[0054]
[0055] When it is necessary to verify the motor controller's ability to analyze the resolver signal under fault conditions, the resolver signal transmitted through the output circuit enters the fault simulation circuit, which simulates an open circuit or short circuit fault, and then is output to the motor controller through the resolver simulation interface.
[0056] For example, when simulating a circuit breaker fault, the FPGA control unit will send a low level to the relay switching circuit through the IO port on the double-row pins. The relay switching circuit will simulate a short circuit fault and transmit the resolver signal to the motor controller through the resolver simulation interface under this condition.
[0057] Step 5. The communication circuit receives the phase signal from the outside and transmits it to the FPGA control unit. The FPGA control unit judges the phase signal and obtains the period of the A signal and the B signal in the phase signal according to the number of lines of the external device. Then, the FPGA control unit detects the edge of the phase signal. The edge detection is the rising edge of the detection signal. After detecting the rising edge, the FPGA control unit generates a pulse wave consistent with the period of the phase signal, namely the Z signal, and the A signal and the B signal are obtained by dividing the Z signal by the period of the A signal and the B signal respectively. Finally, the three signals (namely the ABZ signals) are transmitted to the output circuit by the DA drive circuit, and finally output to the motor controller through the optoelectronic analog interface, thereby realizing the modulation of the optoelectronic signal.
[0058] Similarly, when it is necessary to verify the motor controller's ability to analyze photoelectric signals under fault conditions, the ABZ signal transmitted through the output circuit enters the fault simulation circuit, which simulates an open circuit or short circuit fault, and then outputs it to the motor controller through the photoelectric simulation interface.
[0059] The phase signal in step 3 and step 5 of this implementation refers to the phase signal that matches the parameters of the motor controller to be verified, including the number of pole pairs, initial angle, output waveform amplitude, and number of lines of the sensor. According to the verification requirements, by setting parameters such as the number of pole pairs, initial angle, and transformation ratio, sensors of different specifications can be effectively simulated.
[0060] In summary, the present invention can effectively simulate resolvers and photoelectric encoders of different specifications by setting parameters such as the number of pole pairs, initial angle, and transformation ratio (i.e., the information contained in the phase signal), thereby solving the problem that different motor controller manufacturers need to replace the real resolver when verifying different resolvers, greatly saving the R&D costs of electronic control manufacturers.
[0061] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the present invention.
Claims
1. A sensor simulation device for a motor controller, characterized in that: It includes an FPGA control unit, a sensor conversion unit and a power supply; The FPGA control unit is internally loaded with a mathematical model of a real speed sensor, which is used to receive an external phase signal matching the motor controller parameters to be verified through a communication circuit, and output a resolver signal or an ABZ signal for verifying the resolution capability of the motor controller; The sensor conversion unit includes a sensor adapter board, a sampling circuit, an output circuit and an external interface arranged on the sensor adapter board; the sampling circuit and the output circuit are respectively connected to the FPGA control unit; there are two external interfaces, one of which is a resolver analog interface and the other is a photoelectric analog interface; one end of the resolver analog interface is respectively connected to the sampling circuit and the output circuit, and the other end is connected to the motor controller for receiving an excitation signal from the motor controller and outputting a corresponding resolver signal; or one end of the photoelectric analog interface is connected to the output circuit, and the other end is connected to the motor controller for outputting a corresponding ABZ signal; The power supply is respectively connected to the sampling circuit, the output circuit and the FPGA control unit for supplying power.
2. The sensor simulation device for a motor controller according to claim 1, characterized in that: The sensor conversion unit also includes a fault simulation circuit arranged on the sensor adapter board, which is located between the output circuit and the external interface and is respectively connected to the FPGA control unit, sampling circuit, output circuit, power supply and external interface, and is used to simulate the open circuit or short circuit fault of the signal.
3. The sensor simulation device for a motor controller according to claim 2, characterized in that: The external interface is connected to the sensor conversion board via a 6-pin terminal or a 4-pin terminal.
4. The sensor simulation device for a motor controller according to claim 3, characterized in that: The communication circuit is an optical fiber communication circuit; The sampling circuit is an AD sampling circuit; The output circuit is a DA analog output circuit.
5. The sensor simulation device for a motor controller according to claim 2, characterized in that: The fault simulation circuit is a relay switching circuit.
6. A signal modulation method for a sensor simulation device for a motor controller, characterized in that: The following steps are involved: Step 1, assembling the sensor simulation device for the motor controller according to any one of claims 1 to 5; Step 2: When the motor controller needs to verify the ability to analyze the resolver signal, the motor controller is connected to the resolver analog interface, and the process proceeds to step 3; when the motor controller needs to verify the ability to analyze the photoelectric signal, the motor controller is connected to the photoelectric analog interface, and the process proceeds to step 5; Step 3: The communication circuit receives the phase signal from the outside and transmits it to the FPGA control unit. At the same time, the excitation signal sent by the motor controller is received by the sampling circuit through the external interface and transmitted to the FPGA control unit. Step 4, the FPGA control unit calculates the resolver signal based on the phase signal and the excitation signal received in step 3, and outputs the resolver signal to the motor controller through the output circuit and the resolver analog interface in sequence, thereby realizing the modulation of the resolver signal; Step 5: The communication circuit receives the phase signal from the outside and transmits it to the FPGA control unit. The FPGA control unit processes the phase signal and outputs the ABZ signal, which is then output to the motor controller via the output circuit and the optoelectronic analog interface in turn, thereby realizing modulation of the optoelectronic signal.
7. The signal modulation method of the sensor simulation device for the motor controller according to claim 6, characterized in that: In step 3 and step 5, the phase signal refers to a phase signal that matches the motor controller parameters to be verified, including the number of pole pairs, initial angle, output waveform amplitude, and number of lines of the sensor.
8. The signal modulation method of the sensor simulation device for the motor controller according to claim 7, characterized in that: In step 4, when it is necessary to verify the motor controller's ability to analyze the resolver signal under a fault condition, the resolver signal transmitted through the output circuit enters the fault simulation circuit, which simulates an open circuit or short circuit fault, and then outputs it to the motor controller through the resolver simulation interface.
9. The signal modulation method of the sensor simulation device for a motor controller according to claim 6, 7 or 8, characterized in that: In step 4, the resolver signal includes a sin signal and a cos signal, wherein the sin signal sin out The calculation method is: In the formula, w exc represents the angular velocity of the excitation signal, t represents the period, and w motor represents the phase signal angular velocity, Indicates the initial operating angle of the motor; cos signal out The calculation method is:
10. The signal modulation method of the sensor simulation device for a motor controller according to claim 6, characterized in that: In step 5, when it is necessary to verify the motor controller's ability to analyze photoelectric signals under fault conditions, the ABZ signal transmitted through the output circuit enters the fault simulation circuit, which simulates an open circuit or short circuit fault, and then outputs it to the motor controller through the photoelectric simulation interface.