Rotary signal output method, device and equipment for MCU test and medium

By generating resolver digital code streams through the DDS kernel and performing digital-to-analog conversion, the problem of existing resolver simulators being unable to output multiple channels is solved, enabling synchronous testing and flexible parameter configuration of multi-motor systems, and reducing equipment cost and complexity.

CN123136233APending Publication Date: 2026-11-20SHENZHEN DINGTAI JIACHANG TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611338483.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-31
Publication Date
2026-11-20

AI Technical Summary

Technical Problem

Existing commercial resolver simulators can only provide two resolver signal outputs, which is insufficient to meet the parallel synchronous testing requirements of multi-motor and multi-axis systems. Furthermore, the angle and speed parameters depend on external excitation and analog circuits, making them difficult to configure flexibly.

Method used

At least three independent DDS cores are used to generate resolver sine, cosine and reference excitation digital code streams. Through multi-channel digital-to-analog conversion and filtering conditioning, more than two resolver signals are output synchronously, and parameters are mapped in the digital domain to support software definition and configuration.

Benefits of technology

It enables synchronous output of more than two resolver signals from a single device, supports parallel synchronous testing of multi-motor and multi-axis systems, and allows for software-defined angles and frequencies, reducing equipment cost and complexity.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123136233A_ABST
    Figure CN123136233A_ABST
Patent Text Reader

Abstract

The application relates to a rotating signal output method, device and equipment for MCU testing and a medium, and relates to the technical field of electronic testing.The method comprises the following steps: receiving a working condition script issued by an upper computer through a communication interface, and obtaining target angle parameters and rotating speed parameters through analysis; based on the principle of direct digital frequency synthesis, generating rotating variable sine modulation digital code streams, cosine modulation digital code streams and reference excitation digital code streams through at least three independent DDS (Direct Digital Synthesis) kernels, wherein each DDS kernel comprises a phase accumulator, a phase offset register and a waveform lookup table; sending the digital amplitude code streams into a multi-channel digital-to-analog converter array to convert the digital amplitude code streams into differential analog signals; and outputting the differential analog signals to the interface of a measured MCU through a multi-channel rotating variable signal output terminal after filtering and conditioning the differential analog signals. The method can realize the effect of providing more than two rotating variable signals for synchronous output through a single device, can meet the parallel synchronous testing of a multi-motor and multi-shaft system, and does not need to cascade multiple machines.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of electronic testing technology, and in particular to a method, apparatus, device, and medium for outputting a rotating signal for MCU testing. Background Technology

[0002] In the electric drive systems and chassis domain controllers of new energy vehicles, rotor position feedback for permanent magnet synchronous motors and brushless DC motors widely employs resolvers. The resolver applies a high-frequency reference excitation signal through its excitation winding, and its two output windings output sine and cosine signals modulated by the rotor angle, respectively. The resolver-to-digital converter (RDC) inside the MCU calculates the rotor angular position and speed based on these signals. In MCU development, algorithm verification, hardware-in-the-loop testing, and off-line testing, it is usually impossible to directly use a real resolver; instead, a resolver simulator is used. Existing commercial resolver simulators (such as dual-channel products) generally only provide two independent channels. Their operation involves receiving the excitation signal from the MCU under test or an external input, performing analog-to-digital conversion, digital modulation, and then digital-to-analog conversion to output sine and cosine signals. These products have the following limitations in multi-channel, high-precision testing of automotive MCUs: First, each device has only two outputs. For systems that require simultaneous testing of four to eight resolver interfaces, such as dual-motor four-wheel drive, multi-axis steering, and hub motors, multiple devices must be cascaded, resulting in a large system, difficulty in synchronizing channels, and increased costs. Second, parameters such as angle and speed depend on external excitation and analog circuits, making it difficult to flexibly configure and define them in the digital domain. Furthermore, the device cannot independently generate excitation and complete self-testing without the MCU under test. Summary of the Invention

[0003] This invention provides a rotation signal output method for MCU testing, which solves the problem that each device can only provide two resolver signal outputs, making it difficult to achieve synchronous output of more than two resolver signals with a single device, and thus failing to meet the parallel synchronous testing requirements of multi-motor and multi-axis systems.

[0004] In a first aspect, the present invention provides a method for outputting a rotation signal for MCU testing, the method comprising: The system receives the operating script from the host computer via the communication interface and parses it to obtain the target angle parameters and rotational speed parameters. Based on the principle of direct digital frequency synthesis, at least three independent DDS cores are used to generate a resolver-sine modulation digital code stream, a cosine modulation digital code stream, and a reference excitation digital code stream, respectively. Each DDS core includes a phase accumulator, a phase offset register, and a waveform lookup table. The phase accumulator performs an accumulation operation based on the frequency control word and the system clock. The accumulation result is then superimposed with the phase offset amount by the phase offset register and used to address the waveform lookup table to obtain the digital amplitude code stream. The rotational speed parameter is used to determine the frequency control word, and the target angle parameter is used to determine the phase offset amount. The phase offset amounts of the resolver-sine modulation digital code stream and the cosine modulation digital code stream have a relative phase difference that varies with the target angle parameter. Each of the aforementioned digital amplitude code streams is fed into a multi-channel digital-to-analog converter array and converted into a differential analog signal; After filtering and conditioning, the differential analog signal is output to the interface of the MCU under test via the multi-channel resolver signal output terminal.

[0005] Secondly, the present invention provides a rotation signal output device for MCU testing, comprising: The working condition script receiving module is configured to receive the working condition script sent by the host computer and parse it to obtain the target angle parameters and rotation speed parameters; The digital signal synthesis module is configured based on the direct digital frequency synthesis principle. It generates a resolver-sine modulation digital code stream, a cosine modulation digital code stream, and a reference excitation digital code stream through at least three independent DDS cores. Each DDS core includes a phase accumulator, a phase offset register, and a waveform lookup table. The phase accumulator performs accumulation operations based on the frequency control word and the system clock. The accumulation result is then superimposed with the phase offset amount by the phase offset register and addressed by the waveform lookup table to obtain the digital amplitude code stream. The rotational speed parameter is used to determine the frequency control word, the target angle parameter is used to determine the phase offset amount, and there is a relative phase difference between the phase offset amounts corresponding to the resolver-sine modulation digital code stream and the cosine modulation digital code stream, which varies with the target angle parameter. A multi-channel digital-to-analog converter module is configured to convert each of the digital amplitude code streams into differential analog signals; The signal conditioning and output module is configured to filter and condition the differential analog signal before outputting it to the interface of the MCU under test.

[0006] Thirdly, an electronic device is provided, including a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus; Memory, used to store computer programs; When a processor executes a program stored in a memory, it implements the steps of the rotation signal output method for MCU testing as described in any embodiment of the first aspect.

[0007] Fourthly, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the steps of the rotation signal output method for MCU testing as described in any embodiment of the first aspect.

[0008] The technical solutions provided in the embodiments of the present invention have the following advantages compared with the prior art: By using at least three independent DDS cores to synchronously generate resolver sine, cosine, and reference excitation digital code streams in a single device, and outputting them through multi-channel digital-to-analog conversion and filtering conditioning, a single device can provide more than two resolver signal synchronous outputs, which can meet the requirements of parallel synchronous testing of multi-motor and multi-axis systems without the need for multi-machine cascading.

[0009] The target angle, rotational speed and other parameters in the operating script are mapped to each DDS core in the digital domain through frequency control words and phase offsets, so that the electrical angle and output frequency of the resolver signal can be defined and flexibly configured by software, and can generate excitation independently of the MCU under test and complete self-test through the internal self-excitation mode. Attached Figure Description

[0010] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.

[0011] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0012] Figure 1 This is a flowchart illustrating a rotation signal output method for MCU testing provided in an embodiment of the present invention. Figure 2 This is a schematic diagram of a rotating signal output device for MCU testing provided in an embodiment of the present invention; Figure 3 A schematic diagram of the structure of a computer device provided in an embodiment of the present invention; Figure 4 This is a schematic diagram of the electrical output signal waveform of a rotary transformer provided in an embodiment of the present invention. Detailed Implementation

[0013] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0014] Example Figure 1 This is a flowchart illustrating a rotation signal output method for MCU testing provided by an embodiment of the present invention. The present invention proposes a rotation signal output method for MCU testing; specifically, see [link to documentation]. Figure 1 The rotation signal output method for MCU testing includes the following steps S101-S104.

[0015] S101 receives the operating condition script sent by the host computer through the communication interface and parses it to obtain the target angle parameters and rotational speed parameters.

[0016] S102, based on the direct digital frequency synthesis principle, generates a resolver-sine modulation digital code stream, a cosine modulation digital code stream, and a reference excitation digital code stream through at least three independent DDS cores. Each DDS core includes a phase accumulator, a phase offset register, and a waveform lookup table. The phase accumulator performs an accumulation operation based on the frequency control word and the system clock. The accumulation result is then superimposed with a phase offset by the phase offset register and used to address the waveform lookup table to obtain the digital amplitude code stream. The rotational speed parameter is used to determine the frequency control word, and the target angle parameter is used to determine the phase offset. The phase offsets of the resolver-sine modulation digital code stream and the cosine modulation digital code stream have a relative phase difference that varies with the target angle parameter.

[0017] S103, each of the digital amplitude code streams is sent to a multi-channel digital-to-analog converter array to be converted into differential analog signals.

[0018] S104, after filtering and conditioning the differential analog signal, it is output to the interface of the MCU under test through the multi-channel resolver signal output terminal.

[0019] In this embodiment, the operating condition script refers to a data file or command sequence issued by the host computer, containing at least one configuration parameter such as target angle, target speed, excitation frequency, transformer ratio, and number of pole pairs, used to describe the operating condition of the MCU under test. The target angle parameter is the rotor target mechanical angle θ obtained from the operating condition script; the speed parameter is the rotor target speed (e.g., rpm) obtained from the script. The DDS kernel refers to the basic unit for implementing direct digital frequency synthesis. Each kernel contains three elements: a phase accumulator, a phase offset register, and a waveform lookup table (ROM). The phase accumulator accumulates the phase address according to the frequency control word K under the drive of the system clock; the phase offset register stores the phase offset P and adds the offset to the phase address; the waveform lookup table outputs the corresponding digital amplitude sample according to the phase address. The frequency control word K determines the DDS output frequency; the phase offset P determines the initial phase of the output waveform. The digital amplitude code stream is the sequence of digital samples output by the waveform lookup table. The multi-channel digital-to-analog converter array converts each digital amplitude code stream into a differential analog signal; the signal conditioning and filtering network filters and adapts the analog signal; the interface of the MCU under test refers to the rotary-to-digital converter interface, that is, the RDC input interface (including SIN, COS, REF) of the MCU under test.

[0020] In practice, the host computer sends a working condition script to the device via Ethernet or CAN FD. The script contains the following parameters: target angle θ = 30.0°, target speed n = 2000 rpm, number of pole pairs p = 4, and transformer ratio k = 0.5. The communication interface receives and parses the script to obtain the target angle parameter θ = 30.0° and the speed parameter n = 2000 rpm. Based on the speed parameters, the frequency control word K for each DDS core is determined according to the correspondence between electrical speed and output frequency: for the reference excitation channel, the excitation frequency f is set. exc =10kHz, from Equation 1: f out =K×f clk / 2 N Inverse formula 2: K=round(f exc ×2 N / f clk ); For the sine and cosine modulation channels, the output frequency is equal to the carrier frequency corresponding to the electrical rotational speed (in this example, the electrical frequency f). e =n×p / 60=2000×4 / 60≈133.3Hz), K is also determined by this formula. Based on the target angle parameter θ=30.0°, the phase offset P of the sinusoidal modulation channel is applied respectively. sin =θ corresponds to the phase word, cosine modulation channel phase offset P cos=θ+90° corresponds to the phase word, ensuring a relative phase difference between the two paths that varies with the target angle parameter θ (i.e., orthogonal and offset with θ); the reference excitation channel phase offset is set to 0. Each phase accumulator accumulates by K under the drive of a 100MHz system clock. The accumulated phase is superimposed by P in the phase offset register and then addressed in a 32-bit waveform lookup table to obtain three digital amplitude streams: sine modulation, cosine modulation, and reference excitation. The three digital amplitude streams are respectively sent to an eight-channel digital-to-analog converter array to be converted into differential analog signals. After low-pass reconstruction filtering, differential to single-ended conversion, level biasing, and overvoltage protection, the signals are output from the resolver signal output terminal to the RDC interface of the MCU under test, thus providing eight resolver excitation signals (each containing SIN, COS, and REF) from a single device. Through the above process, the speed and angle parameters in the operating script are mapped to the frequency control word and phase offset of the DDS, and the electrical angle and frequency of the resolver signal are determined by the digital domain. Figure 4 As shown, the electrical output of the rotary transformer consists of a reference excitation signal REF and two sinusoidal signals SIN=sin(θ)·REF and COS=cos(θ)·REF, modulated by the rotor angle θ. This invention directly synthesizes these three signals in the digital domain, avoiding the nonlinearity and temperature drift errors introduced by analog multipliers. Harmonic distortion is improved from the existing ≥45dBc to better than 70dBc, ensuring signal quality and consistency from the source.

[0021] The implementation demonstrates that a single device can synchronously generate and output resolver sine, cosine, and reference excitation digital code streams based on at least three DDS cores, achieving synchronous output of more than two resolver signals. Simultaneously, parameters such as angle and rotational speed are mapped in the digital domain, supporting software definition and flexible configuration. Compared to existing solutions that require only two channels per device and rely on external excitation and analog circuits, this method represents an improvement in multi-channel synchronization and parameter configurability.

[0022] In one embodiment, the number of DDS cores is eight, and the output signal frequency fout of each DDS core satisfies the following formula:

[0023] Wherein, K is the frequency control word; fclk is the system clock frequency; N is the bit width of the phase accumulator, which is not less than 32 bits; and the system clock frequency driving the phase accumulator is not less than 100MHz.

[0024] In this embodiment, the phase accumulator bit width N is the number of binary bits in the phase accumulator, which determines the angular resolution; the system clock frequency f clk The clock signal drives the phase accumulator; the frequency control word K is the accumulation step size of the phase accumulator per clock cycle. The output frequency satisfies f out =K×f clk / 2N Angular resolution is 360° / 2 N .

[0025] In a specific embodiment, an eight-channel DDS core is used, with each phase accumulator having a bit width N=32 and a system clock frequency f. clk =100MHz. From f out =K×f clk / 2 N When a 10kHz excitation output is required, K = round(10000 × 2) 32 / 100000000)=429496730; Angular resolution=360° / 2^32≈8.4×10 -6 To further ensure accuracy, the bit width is no less than 32 bits and the system clock is no less than 100MHz, resulting in an angle simulation accuracy better than 0.01° and an angle resolution better than 0.0001°, which meets the angle resolution requirements for high-precision RDC algorithm verification.

[0026] The implementation example achieves this by limiting the phase accumulator bit width to no less than 32 bits, the system clock to no less than 100MHz, and providing an output frequency formula, thereby ensuring the angular resolution and analog accuracy through quantization and improving the angle reproduction capability of the resolver signal.

[0027] In one embodiment, the step of generating a resolver-modulated sinusoidal digital code stream, a cosine-modulated digital code stream, and a reference excitation digital code stream through at least three independent DDS cores includes: Before sending each of the digital amplitude streams into the multi-channel digital-to-analog converter array, gain adjustment, DC bias compensation and phase compensation are performed on each of the digital amplitude streams in the digital domain.

[0028] In this embodiment, the digital gain control unit, DC bias compensation unit, and phase compensation unit refer to the amplitude, bias, and phase adjustment function modules that are performed sequentially on each bit stream in the digital domain before the digital amplitude bit stream is sent into the digital-to-analog converter. Their function is to enable the equipment to adapt to the electrical characteristics of the transformer ratio and number of pole pairs of different types of rotary transformers.

[0029] In a specific embodiment, before each digital amplitude stream is fed into the multi-channel digital-to-analog converter array, gain adjustment, DC bias compensation, and phase compensation are performed sequentially: gain adjustment scales the stream amplitude according to the transformer ratio k (adjustable from 0 to 1.0 in this example); DC bias compensation eliminates the DC component in the stream; and phase compensation corrects phase deviations between channels. For example, for different resolvers with pole pair numbers p=1 to 64, by adjusting the gain and phase compensation parameters, the amplitude and phase of the output SIN / COS signal are matched to the electrical characteristics of the resolver, allowing for software-defined adaptation without modifying the analog circuitry.

[0030] The implementation example achieves gain, bias, and phase compensation for each bitstream in the digital domain, enabling the device to be software-defined to adapt to resolvers with different transformer ratios and pole pairs, improving cross-model adaptability without affecting the analog link.

[0031] In one embodiment, the step of generating a resolver-modulated sinusoidal digital code stream, a cosine-modulated digital code stream, and a reference excitation digital code stream through at least three independent DDS cores further includes: The digital code stream of the selected fault mode is superimposed on the digital amplitude code stream of the target channel in real time through the fault injection digital selection matrix. The selected fault mode is selected from the fault mode register group. The selectable fault modes include at least output disconnection, short circuit to ground, phase-to-phase short circuit, phase misalignment, amplitude attenuation, harmonic injection, temperature drift noise superposition, and tooth loss jump.

[0032] In this embodiment, the fault mode register group stores selectable fault mode codes; the fault injection digital selection matrix superimposes the digital waveform of the selected fault onto the target channel output code stream in real time in the digital domain according to the code. Selectable fault modes include at least: output disconnection, short circuit to ground, phase-to-phase short circuit, phase misalignment, amplitude attenuation, harmonic injection, temperature drift noise superposition, and missing tooth transition.

[0033] In a specific embodiment, the fault mode register group pre-stores eight types of fault codes. After the host computer configures the target channel and fault type online, the fault injection digital selection matrix superimposes the corresponding fault waveform onto the digital amplitude code stream of that channel in real time in the digital domain. For example, when injecting phase misalignment, an adjustable misalignment amount of 0~360° is added to the phase offset of the sinusoidal modulation channel; when injecting amplitude attenuation, the code stream amplitude is scaled according to a set ratio; when injecting harmonics, higher-order harmonic components are superimposed on the code stream; when injecting missing tooth transitions, transitions are inserted into the monotonic change of angle. The above faults can be accurately reproduced without modifying the analog circuit, supporting MCU diagnostic algorithms and functional safety verification.

[0034] The implementation example demonstrates that, through digital domain fault injection, real-world faults such as open circuits, short circuits, phase misalignments, and harmonic contamination can be reproduced accurately and in real time on any channel, improving test coverage and supporting MCU diagnostics and functional safety verification.

[0035] In one embodiment, the step of generating a resolver-modulated sinusoidal digital code stream, a cosine-modulated digital code stream, and a reference excitation digital code stream through at least three independent DDS cores further includes: Switching between internal self-excitation mode and external excitation acquisition mode: In the internal self-generated excitation mode, the DDS core generates a reference excitation digital code stream, which is then converted from digital to analog and filtered and conditioned before being output as a reference excitation analog signal to the excitation winding of the MCU under test. In the external excitation acquisition mode, the ADC acquires the external excitation analog signal at a sampling rate of not less than 2Msps, converts it into a digital code stream, and then outputs a sine modulated signal and a cosine modulated signal via digital modulation.

[0036] In this embodiment, the internal self-excitation mode refers to the mode in which the DDS core directly generates a reference excitation signal and outputs it to the excitation winding of the MCU under test; the external excitation acquisition mode refers to the mode in which the external excitation signal input by the MCU under test is acquired, digitally modulated, and then output as a SIN / COS signal. The two modes can be switched online via commands from the host computer.

[0037] In a specific embodiment, under internal self-excitation mode, the DDS core generates a reference excitation digital code stream with a frequency of 100Hz~100kHz and a peak-to-peak voltage not exceeding 24V. After digital-to-analog conversion and filtering conditioning, the stream is output to the excitation winding of the MCU under test, enabling the device to generate excitation independently of the MCU under test and complete self-testing and offline calibration. Under external excitation acquisition mode, the ADC acquires the external excitation analog signal input from the MCU under test at a sampling rate of not less than 2Msps, converts it into a digital code stream, and then outputs sinusoidal and cosine modulated signals through digital modulation, thus ensuring compatibility with existing operating methods that rely on external excitation input. The two modes can be switched online via communication interface commands.

[0038] The implementation example demonstrates that, through a dual excitation mode combining internal self-generation and external acquisition, the device can independently perform self-tests without the MCU under test, while also being compatible with existing external excitation operating methods, making it suitable for the entire MCU development cycle.

[0039] In one embodiment, the at least three DDS cores are synchronously triggered and updated on the same clock edge via a synchronous scheduling bus.

[0040] In this embodiment, the synchronization scheduling bus refers to a global bus that connects various DDS cores and is used to broadcast synchronization trigger and update events, enabling multiple cores to trigger and update synchronously on the same clock edge.

[0041] In a specific embodiment, at least three DDS cores are connected via a synchronous scheduling bus. The host computer or logic control unit issues a synchronous trigger signal at a unified clock edge. Each phase accumulator is loaded with initial value and updated synchronously at the same clock edge, so that the eight outputs are refreshed at the same time. This enables the collaborative simulation of multi-rotor position signals and synchronous testing of multi-motor systems, and supports further expansion of the number of channels via bus cascading.

[0042] The implementation example achieves this by enabling multiple DDS cores to update synchronously on the same clock edge through a synchronous scheduling bus, ensuring phase consistency of multi-channel outputs and meeting the requirements for multi-motor synchronous testing.

[0043] In one embodiment, the step of filtering and conditioning the differential analog signal includes, in sequence, low-pass reconstruction filtering, differential-to-single-ended conversion, level bias adjustment, and overvoltage protection processing.

[0044] In this embodiment, filtering and conditioning refers to the sequential low-pass reconstruction filtering, differential-to-single-ended conversion, level bias adjustment, and overvoltage protection processing performed on the differential analog signal after digital-to-analog conversion, so that the output meets the electrical interface requirements of the rotary transformer and protects the MCU under test.

[0045] In a specific embodiment, the differential analog signal is processed sequentially as follows: low-pass reconstruction filtering to suppress the image spectrum caused by digital-to-analog conversion; differential-to-single-ended conversion to convert the differential signal into a single-ended resolver interface signal; level bias adjustment to ensure that the output peak-to-peak value does not exceed 12V and is programmable; and overvoltage protection to prevent abnormal backflow from the tested MCU from damaging the digital-to-analog converter. After the above processing, the signal is reconstructed into an analog signal that meets the electrical interface requirements of the resolver.

[0046] The implementation example achieves four levels of conditioning—low-pass reconstruction, differential-to-single-ended conversion, level biasing, and overvoltage protection—to ensure that the output signal meets the electrical specifications of the resolver interface and provides reverse protection for the MCU under test, thereby improving signal quality and interface security.

[0047] See Figure 2 This invention also provides a rotary signal output device 400 for MCU testing, which includes a working condition script receiving module 401, a digital signal synthesis module 402, a multi-channel digital-to-analog converter module 403, and a signal conditioning and output module 404.

[0048] The working condition script receiving module 401 is configured to receive the working condition script sent by the host computer and parse it to obtain the target angle parameters and rotational speed parameters.

[0049] The digital signal synthesis module 402 is configured based on the direct digital frequency synthesis principle. It generates a resolver-sine modulation digital code stream, a cosine modulation digital code stream, and a reference excitation digital code stream through at least three independent DDS cores. Each DDS core includes a phase accumulator, a phase offset register, and a waveform lookup table. The phase accumulator performs accumulation operations based on the frequency control word and the system clock. The accumulation result is superimposed with the phase offset amount by the phase offset register and then addressed by the waveform lookup table to obtain the digital amplitude code stream. The rotational speed parameter is used to determine the frequency control word, the target angle parameter is used to determine the phase offset amount, and there is a relative phase difference between the phase offset amounts corresponding to the resolver-sine modulation digital code stream and the cosine modulation digital code stream, which varies with the target angle parameter.

[0050] The multi-channel digital-to-analog converter module 403 is configured to convert each of the digital amplitude code streams into differential analog signals.

[0051] The signal conditioning and output module 404 is configured to filter and condition the differential analog signal and then output it to the interface of the MCU under test.

[0052] In one embodiment, the number of DDS cores is eight, and the output signal frequency fout of each DDS core satisfies the following formula:

[0053] Wherein, K is the frequency control word; fclk is the system clock frequency; N is the bit width of the phase accumulator, which is not less than 32 bits; and the system clock frequency driving the phase accumulator is not less than 100MHz.

[0054] In one embodiment, the step of generating a resolver-modulated sinusoidal digital code stream, a cosine-modulated digital code stream, and a reference excitation digital code stream through at least three independent DDS cores includes: Before sending each of the digital amplitude streams into the multi-channel digital-to-analog converter array, gain adjustment, DC bias compensation and phase compensation are performed on each of the digital amplitude streams in the digital domain.

[0055] In one embodiment, the step of generating a resolver-modulated sinusoidal digital code stream, a cosine-modulated digital code stream, and a reference excitation digital code stream through at least three independent DDS cores further includes: The digital code stream of the selected fault mode is superimposed on the digital amplitude code stream of the target channel in real time through the fault injection digital selection matrix. The selected fault mode is selected from the fault mode register group. The selectable fault modes include at least output disconnection, short circuit to ground, phase-to-phase short circuit, phase misalignment, amplitude attenuation, harmonic injection, temperature drift noise superposition, and tooth loss jump.

[0056] In one embodiment, the step of generating a resolver-modulated sinusoidal digital code stream, a cosine-modulated digital code stream, and a reference excitation digital code stream through at least three independent DDS cores further includes: Switching between internal self-excitation mode and external excitation acquisition mode: In the internal self-generated excitation mode, the DDS core generates a reference excitation digital code stream, which is then converted from digital to analog and filtered and conditioned before being output as a reference excitation analog signal to the excitation winding of the MCU under test. In the external excitation acquisition mode, the ADC acquires the external excitation analog signal at a sampling rate of not less than 2Msps, converts it into a digital code stream, and then outputs a sine modulated signal and a cosine modulated signal via digital modulation.

[0057] In one embodiment, the at least three DDS cores are synchronously triggered and updated on the same clock edge via a synchronous scheduling bus.

[0058] In one embodiment, the step of filtering and conditioning the differential analog signal includes, in sequence, low-pass reconstruction filtering, differential-to-single-ended conversion, level bias adjustment, and overvoltage protection processing.

[0059] like Figure 3 As shown, Figure 3 This is a schematic block diagram of a computer device provided in an embodiment of this application. The computer device 500 can be a terminal or a server. The terminal can be an electronic device with communication functions, such as a smartphone, tablet, laptop, desktop computer, personal digital assistant, or wearable device. The server can be a standalone server or a server cluster composed of multiple servers.

[0060] The computer device 500 includes a processor 502, a memory, and a network interface 505 connected via a system bus 501. The memory may include a non-volatile storage medium 503 and internal memory 504.

[0061] The non-volatile storage medium 503 may store an operating system 5031 and a computer program 5032. When the computer program 5032 is executed, it causes the processor 502 to execute a rotation signal output method for MCU testing.

[0062] The processor 502 provides computing and control capabilities to support the operation of the entire computer device 500.

[0063] The internal memory 504 provides an environment for the operation of the computer program 5032 in the non-volatile storage medium 503. When the computer program 5032 is executed by the processor 502, the processor 502 can execute a rotation signal output method for MCU testing.

[0064] The network interface 505 is used for network communication with other devices. Those skilled in the art will understand that the above structure is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device 500 to which the present application is applied. A specific computer device 500 may include more or fewer components than shown in the figures, or combine certain components, or have different component arrangements.

[0065] It should be understood that in the embodiments of this application, the processor 502 may be a central processing unit (CPU), or it may be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor.

[0066] It will be understood by those skilled in the art that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program may be stored in a storage medium, which is a computer-readable storage medium. The computer program is executed by at least one processor in the computer system to implement the process steps of the embodiments of the above methods.

[0067] Therefore, the present invention also provides a storage medium. This storage medium can be a computer-readable storage medium. The storage medium stores a computer program.

[0068] The storage medium is a physical, non-transient storage medium, such as a USB flash drive, external hard drive, read-only memory (ROM), magnetic disk, or optical disk, or any other physical storage medium capable of storing program code. The computer-readable storage medium can be non-volatile or volatile.

[0069] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.

[0070] In the several embodiments provided by this invention, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative. For example, the division of each unit is merely a logical functional division, and there may be other division methods in actual implementation. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed.

[0071] The steps in the method of this invention can be adjusted, merged, or reduced in order according to actual needs. The units in the device of this invention can be merged, divided, or reduced according to actual needs. Furthermore, the functional units in the various embodiments of this invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.

[0072] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, a terminal, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention.

[0073] In the above embodiments, the descriptions of each embodiment have different focuses. For parts that are not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.

[0074] Obviously, those skilled in the art can make various modifications and variations to this invention without departing from its spirit and scope. Since these modifications and variations fall within the scope of the claims and their equivalents, this invention also intends to include these modifications and variations.

[0075] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in the present invention, and these modifications or substitutions should all be covered within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.

Claims

1. A method for outputting a rotation signal for MCU testing, characterized in that, The method includes: The system receives the operating script from the host computer via the communication interface and parses it to obtain the target angle parameters and rotational speed parameters. Based on the principle of direct digital frequency synthesis, at least three independent DDS cores are used to generate a resolver-sine modulation digital code stream, a cosine modulation digital code stream, and a reference excitation digital code stream, respectively. Each DDS core includes a phase accumulator, a phase offset register, and a waveform lookup table. The phase accumulator performs an accumulation operation based on the frequency control word and the system clock. The accumulation result is then superimposed with the phase offset amount by the phase offset register and used to address the waveform lookup table to obtain the digital amplitude code stream. The rotational speed parameter is used to determine the frequency control word, and the target angle parameter is used to determine the phase offset amount. The phase offset amounts of the resolver-sine modulation digital code stream and the cosine modulation digital code stream have a relative phase difference that varies with the target angle parameter. Each of the aforementioned digital amplitude code streams is fed into a multi-channel digital-to-analog converter array and converted into a differential analog signal; After filtering and conditioning, the differential analog signal is output to the interface of the MCU under test via the multi-channel resolver signal output terminal.

2. The method according to claim 1, characterized in that, The number of DDS cores is eight, and the output signal frequency of each DDS core is f. out Satisfy the following formula: Where K is the frequency control word; f clk The system clock frequency is N; the bit width of the phase accumulator is not less than 32 bits; the system clock frequency driving the phase accumulator is not less than 100MHz.

3. The method according to claim 1, characterized in that, The step of generating a resolver-modulated sinusoidal digital code stream, a cosine-modulated digital code stream, and a reference excitation digital code stream through at least three independent DDS cores includes: Before sending each of the digital amplitude streams into the multi-channel digital-to-analog converter array, gain adjustment, DC bias compensation and phase compensation are performed on each of the digital amplitude streams in the digital domain.

4. The method according to claim 1, characterized in that, The step of generating a resolver-modulated sinusoidal digital code stream, a cosine-modulated digital code stream, and a reference excitation digital code stream through at least three independent DDS cores further includes: The digital code stream of the selected fault mode is superimposed on the digital amplitude code stream of the target channel in real time through the fault injection digital selection matrix. The selected fault mode is selected from the fault mode register group. The selectable fault modes include at least output disconnection, short circuit to ground, phase-to-phase short circuit, phase misalignment, amplitude attenuation, harmonic injection, temperature drift noise superposition, and tooth loss jump.

5. The method according to claim 1, characterized in that, The step of generating a resolver-modulated sinusoidal digital code stream, a cosine-modulated digital code stream, and a reference excitation digital code stream through at least three independent DDS cores further includes: Switching between internal self-excitation mode and external excitation acquisition mode: In the internal self-generated excitation mode, the DDS core generates a reference excitation digital code stream, which is then converted from digital to analog and filtered before being output as a reference excitation analog signal to the excitation winding of the MCU under test. In the external excitation acquisition mode, the ADC acquires the external excitation analog signal at a sampling rate of not less than 2Msps, converts it into a digital code stream, and then outputs a sine modulated signal and a cosine modulated signal via digital modulation.

6. The method according to claim 1, characterized in that, The at least three DDS cores are synchronously triggered and updated on the same clock edge via a synchronous scheduling bus.

7. The method according to claim 1, characterized in that, The step of filtering and conditioning the differential analog signal includes, in sequence, low-pass reconstruction filtering, differential-to-single-ended conversion, level bias adjustment, and overvoltage protection.

8. A rotary signal output device for MCU testing, characterized in that, include: The working condition script receiving module is configured to receive the working condition script sent by the host computer and parse it to obtain the target angle parameters and rotation speed parameters; The digital signal synthesis module is configured based on the direct digital frequency synthesis principle. It generates a resolver-sine modulation digital code stream, a cosine modulation digital code stream, and a reference excitation digital code stream through at least three independent DDS cores. Each DDS core includes a phase accumulator, a phase offset register, and a waveform lookup table. The phase accumulator performs accumulation operations based on the frequency control word and the system clock. The accumulation result is then superimposed with the phase offset amount by the phase offset register and addressed by the waveform lookup table to obtain the digital amplitude code stream. The rotational speed parameter is used to determine the frequency control word, the target angle parameter is used to determine the phase offset amount, and there is a relative phase difference between the phase offset amounts corresponding to the resolver-sine modulation digital code stream and the cosine modulation digital code stream, which varies with the target angle parameter. A multi-channel digital-to-analog converter module is configured to convert each of the digital amplitude code streams into differential analog signals; The signal conditioning and output module is configured to filter and condition the differential analog signal before outputting it to the interface of the MCU under test.

9. A computer device, characterized in that, It includes a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus; Memory, used to store computer programs; A processor, when executing a program stored in memory, implements the steps of the method according to any one of claims 1-7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method as described in any one of claims 1-7.