Circuit waveform fault auxiliary diagnosis method for experiment teaching scene

By integrating waveform acquisition and large language models into experimental teaching instruments, automatic analysis of circuit faults is realized, solving the problems of low fault location efficiency and insufficient consistency in existing technologies, and improving students' ability to troubleshoot independently.

CN121963573APending Publication Date: 2026-05-01GUILIN UNIV OF ELECTRONIC TECH
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
GUILIN UNIV OF ELECTRONIC TECH
Filing Date
2026-03-23
Publication Date
2026-05-01

AI Technical Summary

Technical Problem

Existing experimental teaching instruments lack automatic analysis capabilities when faced with circuit faults, resulting in low fault location efficiency, inconsistent analysis results, and insufficient student self-troubleshooting ability.

Method used

A circuit waveform fault-assisted diagnosis method based on waveform acquisition, feature extraction, knowledge retrieval, and model reasoning is adopted. By generating excitation signals, acquiring raw waveforms, uploading data, deploying a large language model, and building a fault knowledge base, fault mode matching and analysis report generation are performed.

Benefits of technology

It improves the efficiency and consistency of circuit fault analysis, reduces teachers' repetitive workload, and enhances students' ability to troubleshoot independently.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121963573A_ABST
    Figure CN121963573A_ABST
Patent Text Reader

Abstract

The invention discloses a circuit waveform fault auxiliary diagnosis method for an experiment teaching scene, and belongs to the technical field of electronic measuring instruments and experiment teaching equipment, and the method comprises the steps: S100, generating an excitation signal; step S200, acquiring an original waveform signal; s300, uploading the waveform data to a PC (Personal Computer) end; step S400, deploying a large language model at a PC terminal and constructing a fault knowledge base; step S500, waveform features are extracted; step S600, describing a target waveform through a text / voice; s700, performing fault mode matching based on the actual waveform features and the target waveform features; and S800, generating a fault analysis report and outputting a sorting result. The method is suitable for experimental circuit waveform analysis and fault auxiliary positioning.
Need to check novelty before this filing date? Find Prior Art

Description

A circuit waveform fault auxiliary diagnosis method for experimental teaching scenarios Technical Field

[0001] This invention relates to the field of electronic measuring instruments and experimental teaching equipment, specifically to an auxiliary diagnostic method for circuit waveform faults in experimental teaching scenarios. Background Technology

[0002] In current experimental teaching, experimental instruments are typically stand-alone instruments, each with basic display and signal generation functions, meeting the measurement needs of routine experiments. However, when experimental circuits experience faults such as wiring errors, component damage, abnormal parameter settings, or module mismatches, existing instruments usually only output the original waveform or simple measurement results, lacking the ability to automatically analyze abnormal waveform characteristics and providing further fault diagnosis and troubleshooting suggestions based on the circuit scenario. When the measured waveform differs from the expected waveform, fault diagnosis usually relies on teachers' manual judgment based on experience, combined with circuit principles to deduce the possible fault location or type. This approach has the following shortcomings: First, fault location efficiency is low; when multiple groups of students are experimenting simultaneously, teachers find it difficult to complete individual analysis in a timely manner. Second, different teachers may have different judgment criteria for the same waveform phenomenon, leading to insufficient consistency in analysis results. Third, existing instruments lack the ability to comprehensively utilize historical fault cases, experimental guidance knowledge, and instrument operation knowledge, making it difficult for students to independently troubleshoot based on their existing experience during independent experiments.

[0003] Therefore, it is necessary to propose an experimental circuit fault auxiliary diagnosis method based on the combination of waveform acquisition, feature extraction, knowledge retrieval and model reasoning, so as to realize the automatic analysis of the difference between the actual waveform and the target waveform, and output candidate fault causes and rectification suggestions in combination with the fault case library, thereby improving the efficiency and consistency of waveform fault analysis in experimental scenarios. Summary of the Invention

[0004] The purpose of this invention is to provide a circuit waveform fault auxiliary diagnosis method for experimental teaching scenarios, so as to solve the problems mentioned in the background art.

[0005] This invention provides the following technical solution: a circuit waveform fault auxiliary diagnosis method for experimental teaching scenarios, comprising the following steps:

[0006] Step S100: Generate excitation signal;

[0007] Step S200: Acquire the original waveform signal;

[0008] Step S300: Upload the waveform data to the PC;

[0009] Step S400: Deploy the large language model on the PC and build a fault knowledge base;

[0010] Step S500: Extract waveform features;

[0011] Step S600: Describe the target waveform via text / speech;

[0012] Step S700: Perform fault mode matching based on the actual waveform characteristics and the target waveform characteristics;

[0013] Step S800: Generate a fault analysis report and output the sorting results.

[0014] Preferably, the data packet format uploaded by the microcontroller to the PC is frame header + waveform parameters + original waveform data + check bit.

[0015] Preferably, the waveform parameters and raw waveform data transmitted in the data packet are in JSON and binary formats, respectively.

[0016] Preferably, the generated text report includes a description of the fault phenomenon, an analysis of possible causes, and rectification suggestions.

[0017] The present invention has the following beneficial effects:

[0018] (1) By setting up an excitation signal generation module and an original waveform acquisition module, the present invention enables the experimental circuit to complete signal excitation and response acquisition in the same device link, reducing connection errors and operational complexity caused by switching external instruments, and improving the continuity of the experimental testing process.

[0019] (2) This invention is particularly suitable for circuit waveform abnormality analysis in experimental teaching. When multiple experiments are carried out in parallel, it can reduce the repetitive investment of teachers in the analysis of a single fault and improve students' ability to independently troubleshoot experimental faults. Attached Figure Description

[0020] Figure 1 is a schematic diagram of the process of this invention. Detailed Implementation

[0021] 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, and not all embodiments. All other embodiments obtained by those skilled in the art based on the present invention without creative effort are within the scope of protection of the present invention.

[0022] Referring to Figure 1, the present invention provides the following technical solution: a circuit waveform fault auxiliary diagnosis method for experimental teaching scenarios, comprising the following steps:

[0023] Step S100: Generate excitation signal.

[0024] In this embodiment, the DDS function is implemented by using an FPGA combined with a digital-to-analog converter circuit. The FPGA implements a phase accumulator and outputs digital signals through a ROM that stores pre-stored waveform data. After the DAC chip completes the digital-to-analog conversion, a low-pass filter removes high-frequency noise to smooth the waveform. The waveform parameters can be adjusted in real time by adjusting the amplitude adjustment circuit and changing the values ​​of the frequency word and phase word. Users can select to output standard waveforms such as triangular waves, sine waves, and square waves.

[0025] Step S200: Acquire the original waveform signal.

[0026] In this embodiment, the analog signal is input through a probe, and the input signal is processed by an attenuation circuit and a signal amplification circuit to adjust it to the acquisition range of the ADC chip. The FPGA controls the ADC chip to acquire the signal. The ADC continuously samples the signal and writes it to the buffer. When the FPGA detects that the input signal meets the trigger condition, it locks the current data window and stops after acquiring the set storage depth. The data is sent to the FIFO buffer for processing. When the storage signal is received, the data is stored in the DDR3 high-speed memory. The data is transmitted to the microcontroller via SPI communication. The sampling rate, vertical sensitivity, and scanning speed can be adjusted by pressing buttons or using automatic mode to adjust the data depth and waveform data range.

[0027] In this embodiment, the data sampling depth is set to 2^N points, such as 1024, 2048 or 4096 points, to adapt to the radix-2 butterfly operation architecture in the Fast Fourier Transform (FFT) algorithm, reduce computational complexity and improve the real-time performance of waveform feature extraction.

[0028] In this embodiment, the waveform data preferably covers an integer number of cycles in the time domain, or a window function is used to suppress spectral leakage to improve the accuracy of frequency domain feature calculation, providing stable input data for subsequent fault reasoning.

[0029] Step S300: Upload the waveform data to the PC.

[0030] In this embodiment, the microcontroller encapsulates the original voltage sequence data into a data packet of a specific format and uploads it to the PC via the Ethernet UDP protocol. The PC is responsible for receiving and parsing the data.

[0031] In this embodiment, the data packet of the specific format is a frame header + waveform parameters + raw waveform data + check bit. The waveform parameter description part includes sampling frequency, vertical sensitivity, horizontal time base, channel number, channel coupling method, probe attenuation ratio and trigger type.

[0032] In this embodiment, the waveform parameters are in JSON format, which makes it easy for the host computer program to parse and organize them into model input fields without the need for complex hard-coding conversion; the original waveform data is in binary format to maintain the originality of the data, reduce the loss of floating-point precision caused by voltage conversion, and help reduce bandwidth usage and retain the original sampling data.

[0033] Step S400: Deploy the large language model on the PC and build a fault knowledge base.

[0034] In this embodiment, a quantized open-source large language model is selected and deployed on a local CPU. The large language model is encapsulated into a standardized API interface for receiving actual measured waveform feature data, target waveform feature data, and retrieved knowledge fragments, and generating textual fault reports.

[0035] The experimental instructions, instrument operation manuals, common circuit fault cases, typical fault waveform descriptions, and corresponding rectification measures are segmented and structured into fault knowledge entries. Each fault knowledge entry includes a description of the fault phenomenon, the corresponding circuit type, the target waveform characteristics, abnormal waveform characteristics, the cause of the fault, and rectification suggestions. These fault knowledge entries are converted into vectors using a text embedding model and stored in a local vector database for subsequent retrieval. During the inference phase, the current waveform feature description is used as the query vector. Similarity retrieval is used to retrieve the most relevant knowledge fragments from the knowledge base, and these fragments are then concatenated into the input context of the large language model to enhance the model's inference accuracy in the circuit fault domain.

[0036] When the model is invoked, a preset prompt template is used to constrain the large language model to output analysis results in a fixed format. The prompt template includes the following constraints: specifying the role of the large language model as a circuit fault diagnosis assistant; requiring that the model's analysis conclusions must be based on the provided waveform feature data and knowledge base retrieval results, and cannot be inferred out of thin air; requiring the model to output in a structured form of "fault phenomenon description, possible cause analysis, rectification suggestions, and confidence level explanation"; when the input information is insufficient to support the judgment, the prompt message "supplementary waveform data or experimental conditions are required" is output.

[0037] Step S500: Extract waveform features.

[0038] In this embodiment, waveform data is preprocessed using methods such as FIR filtering to remove the influence of high-frequency noise in the original waveform data. After preprocessing, waveform features that characterize the circuit's operating state are extracted from the actual waveform, and these waveform features are converted into structured feature parameters. The waveform features include time-domain features, frequency-domain features, waveform morphology features, and statistical features. These waveform features are quantified and combined into an actual waveform feature vector, which serves as the input for subsequent fault retrieval and fault matching.

[0039] In this embodiment, the time-domain features include the signal's amplitude, period, pulse width, peak value, etc.

[0040] The frequency domain features include frequency components, amplitude spectrum, phase spectrum, etc.; the waveform morphology features include waveform symmetry, distortion degree, distortion, noise, etc.; the statistical features include signal mean, variance, peak factor, etc.

[0041] Step S600: Describe the target waveform via text / voice.

[0042] In this embodiment, when the measured actual waveform is inconsistent with the expected experimental phenomenon, the target waveform description information input by the user is received through the input interface. The target waveform description information can be text information or text information transcribed from speech, such as "the output should be a sine wave with a peak-to-peak value of 2 V and a frequency of 1 kHz".

[0043] The large language model performs semantic parsing on the target waveform description information to form standardized target waveform feature parameters, which include waveform type, amplitude range, frequency range, and distortion-free requirements.

[0044] Step S700: Perform fault mode matching based on the actual waveform characteristics and the target waveform characteristics.

[0045] In this embodiment, a large number of tagged fault cases are pre-stored in the database. The waveform characteristics of the actual faults are compared with those of the target faults, and the fault mode is matched with the known fault mode characteristics in the circuit library to infer the possible causes of the faults.

[0046] Step S800: Generate a fault analysis report and output the sorting results.

[0047] In this embodiment, a comprehensive matching score is calculated for candidate fault causes based on retrieval similarity, feature difference degree, and model inference results, and a corresponding confidence ranking result is generated based on the comprehensive matching score. The comprehensive matching score can be obtained by weighting the knowledge item similarity score, feature deviation matching score, and model judgment score.

[0048] In this embodiment, the generated text report includes a description of the fault phenomenon, candidate fault causes sorted by confidence level, corresponding rectification suggestions, and supplementary test suggestions when the confidence level is insufficient.

[0049] Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions described in the foregoing embodiments or make equivalent substitutions for some of the technical features. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A circuit waveform fault auxiliary diagnosis method for experimental teaching scenarios, characterized in that, The steps include: Step S100: Generating an excitation signal, wherein the output waveform type, output voltage range, and signal frequency are selected by pressing a button; the FPGA acts as a logic controller to implement the phase accumulator function of the DDS; the internal ROM stores the waveform data; the DAC chip converts the digital signal data provided by the FPGA into an analog signal; a low-pass filter is used for noise reduction; two stages of operational amplifiers are used for amplitude adjustment; and finally, the analog signal is output through a BNC connector; Step S200: Acquiring the original waveform signal, wherein S201: The FPGA drives the ADC chip to acquire the signal; the input signal is adjusted to the sampling range of the ADC chip by a conditioning circuit; the FPGA provides a high-speed and stable clock to drive the ADC chip to perform analog-to-digital conversion on the input signal; the converted data is stored in a high-speed memory; S202: The FPGA transmits the ADC conversion value to the microcontroller; the conversion data stored in the high-speed memory is transmitted via SPI communication. S203: Perform data processing and adjust the sampling rate for the microcontroller; the microcontroller performs digital signal processing, calculates the voltage and frequency of the input signal, and adjusts the sampling rate according to the input signal frequency so that the acquired waveform data covers several cycles of the periodic signal. The adjustment mode can be manual or automatic; S204: Reacquire the waveform according to the adjusted sampling rate; repeat steps S201, S202, and S203 until the sampling rate meets the preset frequency resolution requirement and then end the resampling; Step S300: Upload the waveform data to the PC, wherein the microcontroller encapsulates the original voltage sequence data into a data packet of a specific format and uploads it to the PC via the Ethernet UDP protocol, and the PC is responsible for receiving and parsing it; Step S400: Deploy a large language model and build a fault knowledge base on the PC, wherein a quantized open-source large language model is selected and deployed on the local CPU or graphics card, and the large language model is encapsulated into a standardized API. An interface is provided for easy subsequent calls. A local vector database is built using RAG technology, pre-stored with relevant knowledge such as experimental guides, instrument operation manuals, and common circuit fault case libraries, and preset prompt words to constrain the answer to be based on the provided waveform data and knowledge base content; Step S500: Extract waveform features, wherein step S500 is divided into the following steps: S501: Preprocess the waveform data; remove the influence of high-frequency noise in the original waveform data through FIR filtering and other methods; S502: Calculate the waveform data parameters of relevant features; extract features with circuit fault identification ability through analysis and calculation of waveform data, such as time domain features, frequency domain features, waveform morphology features, and statistical features; S503: Structured output; quantify the above features to generate a feature vector describing the current waveform state; Step S600: Describe the target waveform through text / speech, wherein when the output signal is inconsistent with the target waveform of the experimental circuit after the input excitation signal, the input interface unit receives the target waveform description information input by the user, and performs semantic parsing using a large language model;Step S700: Perform fault mode matching based on the actual waveform characteristics and the target waveform characteristics. This involves comparing the measured waveform characteristics with known fault mode characteristics in the circuit library to perform fault mode matching and infer possible fault causes. Step S800: Generate a fault analysis report and output the ranking results. The model calculates confidence scores for all possible fault causes based on the feature matching accuracy and ranks them from highest to lowest. Finally, a text report is automatically generated and returned to the students.

2. The circuit waveform fault auxiliary diagnosis method for experimental teaching scenarios according to claim 1, characterized in that... The data packet format uploaded by the microcontroller to the PC is "frame header + waveform parameters + original waveform data + check bit". The waveform parameter description includes sampling frequency, vertical sensitivity, horizontal time base, channel number, channel coupling method, probe attenuation ratio and trigger type.

3. The circuit waveform fault auxiliary diagnosis method for experimental teaching scenarios according to claim 1, characterized in that... In step S300, the data packet transmits waveform parameters and raw waveform data. The waveform parameters are in JSON format so that the large language model in subsequent steps can directly read and understand these physical meanings without complex hard-coding conversion. The raw waveform data is in binary format to maintain the originality of the data, reduce the loss of floating-point precision caused by voltage conversion, and achieve high transmission efficiency.

4. The circuit waveform fault auxiliary diagnosis method for experimental teaching scenarios according to claim 1, characterized in that, The feature vector in step S500 is composed of the following four types of features: time domain features, frequency domain features, waveform morphology features, and statistical features; the above four types of features are numerically converted and concatenated into a single feature vector, which serves as the input for fault mode matching in step S700.

5. The circuit waveform fault auxiliary diagnosis method for experimental teaching scenarios according to claim 1, characterized in that... Step S800 generates a text report that includes a description of the fault phenomenon, candidate fault causes sorted by confidence level, corresponding rectification suggestions, and supplementary test suggestions when the confidence level is insufficient.