CN119885813B - Rapid calibration method and device suitable for analog device - Google Patents
Rapid calibration method and device suitable for analog deviceInfo
- Publication number
- CN119885813B CN119885813B CN202411658434.0A CN202411658434A CN119885813B CN 119885813 B CN119885813 B CN 119885813B CN 202411658434 A CN202411658434 A CN 202411658434A CN 119885813 B CN119885813 B CN 119885813B
- Authority
- CN
- China
- Prior art keywords
- simulation model
- calibrated
- analog
- analog device
- calibration
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F30/00—Computer-aided design [CAD]
- G06F30/20—Design optimisation, verification or simulation
- G06F30/27—Design optimisation, verification or simulation using machine learning, e.g. artificial intelligence, neural networks, support vector machines [SVM] or training a model
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/10—Pre-processing; Data cleansing
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/24—Classification techniques
- G06F18/243—Classification techniques relating to the number of classes
- G06F18/2433—Single-class perspective, e.g. one-against-all classification; Novelty detection; Outlier detection
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2218/00—Aspects of pattern recognition specially adapted for signal processing
- G06F2218/02—Preprocessing
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2218/00—Aspects of pattern recognition specially adapted for signal processing
- G06F2218/12—Classification; Matching
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Evolutionary Computation (AREA)
- Physics & Mathematics (AREA)
- Data Mining & Analysis (AREA)
- General Engineering & Computer Science (AREA)
- Artificial Intelligence (AREA)
- General Physics & Mathematics (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Life Sciences & Earth Sciences (AREA)
- Bioinformatics & Computational Biology (AREA)
- Evolutionary Biology (AREA)
- Bioinformatics & Cheminformatics (AREA)
- Medical Informatics (AREA)
- Software Systems (AREA)
- Computer Hardware Design (AREA)
- Geometry (AREA)
- Testing And Monitoring For Control Systems (AREA)
Abstract
本发明属于器件标定技术领域,公开了一种适用于模拟量器件的快速标定方法及装置。包括:构建与参考模拟量器件相应的初始仿真模型,并对所述初始仿真模型进行迭代优化以获取一标准仿真模型;对待标定模拟量器件输入阶跃信号以获取第一预设时间窗内的任意两时刻的阶跃响应数据;基于任意两时刻的阶跃响应数据获取实际增益速度,判断所述实际增益速度不处于预设的增益速度范围内,则判定所述待标定模拟量器件为异常器件;反之,将所述若干时刻的阶跃响应数据输入标准仿真模型,并引入振荡频率方程以获取与待标定模拟量器件相应的目标仿真模型;基于所述目标仿真模型的预测以确定实际标定范围。本发明极大的缩短了标定的时间成本。
The present invention belongs to the field of device calibration technology and discloses a rapid calibration method and apparatus suitable for analog devices. The method comprises: constructing an initial simulation model corresponding to a reference analog device, and iteratively optimizing the initial simulation model to obtain a standard simulation model; inputting a step signal into the analog device to be calibrated to obtain step response data at any two moments within a first preset time window; obtaining an actual gain speed based on the step response data at any two moments, and determining that the actual gain speed is not within a preset gain speed range, then determining that the analog device to be calibrated is an abnormal device; conversely, inputting the step response data at the several moments into a standard simulation model, and introducing an oscillation frequency equation to obtain a target simulation model corresponding to the analog device to be calibrated; and determining an actual calibration range based on the prediction of the target simulation model. The present invention greatly shortens the time cost of calibration.
Description
技术领域Technical Field
本发明涉及器件标定技术领域,具体涉及一种适用于模拟量器件的快速标定方法及装置。The present invention relates to the technical field of device calibration, and in particular to a rapid calibration method and device suitable for analog devices.
背景技术Background Art
模拟量器件是以连续变化的模拟信号作为输出信号的元器件的统称,对各类模拟量器件进行出厂前标定是确保它们在实际应用中输出信号准确可靠的关键。Analog devices are a general term for components that use continuously changing analog signals as output signals. Calibration of various analog devices before leaving the factory is the key to ensuring that their output signals are accurate and reliable in actual applications.
现有技术中对模拟量器件进行标定的具体流程为:首先,以获取自标定设备的一阶跃信号作为测试信号,并输入至待标定的模拟量器件;其次,检测待标定的模拟量器件的阶跃响应,并基于相应的阶跃响应曲线判断响应输出达到稳定状态时,获取相应的实际高点值及实际低点值进而确定实际量程范围;最后,再将所述实际量程范围与标准量程范围进行对比,并基于对比结果对实际量程范围进行补偿以实现标定。The specific process of calibrating analog devices in the existing technology is: first, a step signal from the self-calibration equipment is obtained as a test signal and input into the analog device to be calibrated; second, the step response of the analog device to be calibrated is detected, and based on the corresponding step response curve, it is judged that when the response output reaches a stable state, the corresponding actual high point value and actual low point value are obtained to determine the actual range; finally, the actual range is compared with the standard range, and the actual range is compensated based on the comparison result to achieve calibration.
但在实际标定过程中,由于上述现有的标定方法需要等待标定的模拟量器件输出达到稳定状态后再进行测量,而大部分模拟量器件受内部特性或环境因素影响,常常需要较长时间才能达到稳定状态,特别是对于高点值的输出;从而导致单次标定周期较长的缺陷。特别是由稳定值等待所导致的时间延迟在大规模生产标定或多系统并行标定过程中会随着标定次数的增加而累积,进而大大增加标定的时间成本。However, in actual calibration, existing calibration methods require waiting for the analog device output to reach a stable state before measuring. Most analog devices, affected by internal characteristics or environmental factors, often require a long time to reach a stable state, especially for high-value outputs. This results in a long calibration cycle. In particular, the time delay caused by waiting for stable values accumulates with the number of calibration attempts during large-scale production calibration or multi-system parallel calibration, significantly increasing the time cost of calibration.
发明内容Summary of the Invention
本发明目的在于提供一种适用于模拟量器件的快速标定方法及装置以解决现有的标定过程中存在的标定时间长的技术问题。The present invention aims to provide a rapid calibration method and device applicable to analog devices to solve the technical problem of long calibration time in the existing calibration process.
为达成上述目的,本发明提出如下技术方案:To achieve the above objectives, the present invention proposes the following technical solutions:
第一方面,本技术方案提供了一种适用于模拟量器件的快速标定方法,包括:In a first aspect, the present technical solution provides a rapid calibration method applicable to analog devices, comprising:
基于传递函数构建与参考模拟量器件相应的初始仿真模型,并对所述初始仿真模型进行迭代优化直至所述初始仿真模型的仿真响应数值与参考模拟量器件的实际响应数值间的差值小于预设的差值阈值以获取一标准仿真模型;constructing an initial simulation model corresponding to a reference analog device based on the transfer function, and iteratively optimizing the initial simulation model until a difference between a simulated response value of the initial simulation model and an actual response value of the reference analog device is less than a preset difference threshold, thereby obtaining a standard simulation model;
其中,所述参考模拟量器件是与待标定模拟量器件相应的标准器件,在所述初始仿真模型的搭建过程中,以阻尼比、固有频率、传递延迟及系统增益作为初始仿真模型的模型参数,以脉冲激励及阶跃激励作为所述初始仿真模型的输入信号,并引入卡尔曼滤波算法对输出信号进行预处理以得到最终的响应信号;The reference analog device is a standard device corresponding to the analog device to be calibrated. In the process of building the initial simulation model, the damping ratio, natural frequency, transmission delay and system gain are used as model parameters of the initial simulation model, pulse excitation and step excitation are used as input signals of the initial simulation model, and a Kalman filter algorithm is introduced to preprocess the output signal to obtain the final response signal.
对待标定模拟量器件输入阶跃信号以获取第一预设时间窗内的任意若干时刻的阶跃响应数据;其中,所述第一预设时间窗为自以响应起始时刻为起始点,且处于上升阶段的一时间窗;Inputting a step signal to the analog device to be calibrated obtains step response data at any number of moments within a first preset time window; wherein the first preset time window is a time window starting from the response start moment and in a rising phase;
基于所述若干时刻的阶跃响应数据获取实际增益速度,进而判断所述实际增益速度不处于预设的增益速度范围内,则判定所述待标定模拟量器件为异常器件,并结束对所述待标定模拟量器件的标定;Acquiring an actual gain speed based on the step response data at the plurality of moments, and then determining that the actual gain speed is not within a preset gain speed range, determining that the analog device to be calibrated is an abnormal device, and ending calibration of the analog device to be calibrated;
判断所述实际增益速度处于预设的增益速度范围内,则将所述若干时刻的阶跃响应数据输入所述标准仿真模型,并引入振荡频率方程以获取与所述待标定模拟量器件相应的目标仿真模型;If it is determined that the actual gain speed is within a preset gain speed range, the step response data at the plurality of moments are input into the standard simulation model, and an oscillation frequency equation is introduced to obtain a target simulation model corresponding to the analog device to be calibrated;
基于所述目标仿真模型预测所述待标定模拟量器件的低点出现时间点及对应的低点数值,高点出现时间点及对应的高点数值以确定标定范围。Based on the target simulation model, the low point occurrence time point and the corresponding low point value, the high point occurrence time point and the corresponding high point value of the analog device to be calibrated are predicted to determine the calibration range.
进一步的,所述基于所述目标仿真模型预测所述待标定模拟量器件的低点出现时间点及对应的低点数值,高点出现时间点及对应的高点数值以确定标定范围之前;包括:Furthermore, the method of predicting the low point occurrence time point and the corresponding low point value, the high point occurrence time point and the corresponding high point value of the analog device to be calibrated based on the target simulation model to determine the calibration range includes:
判断达到预设的验证周期时,基于待标定模拟量器件获取第二预设时间窗内的若干实际阶跃响应数据,并基于目标仿真模型获取对应的预测阶跃响应数据;其中,所述第二预设时间窗为待标定模拟量器件实际响应稳定后的任一时刻窗;When it is determined that the preset verification period has been reached, a number of actual step response data within a second preset time window is obtained based on the analog device to be calibrated, and corresponding predicted step response data is obtained based on the target simulation model; wherein the second preset time window is any time window after the actual response of the analog device to be calibrated is stable;
判断任一实际阶跃响应数据和与之对应的预测阶跃响应数据间的差值大于预设的响应差值阈值时,则对所述标准仿真模型进行再次优化。When it is determined that the difference between any actual step response data and the corresponding predicted step response data is greater than a preset response difference threshold, the standard simulation model is optimized again.
进一步的,所述基于传递函数构建与参考模拟量器件相应的初始仿真模型,并对所述初始仿真模型进行迭代优化直至所述初始仿真模型的仿真响应数值与参考模拟量器件的实际响应数值间的差值小于预设的差值阈值以获取一标准仿真模型;包括:Furthermore, the method of constructing an initial simulation model corresponding to a reference analog device based on the transfer function and iteratively optimizing the initial simulation model until the difference between the simulated response value of the initial simulation model and the actual response value of the reference analog device is less than a preset difference threshold to obtain a standard simulation model includes:
当所述参考模拟量器件为二阶系统时,对应的响应方程为为:When the reference analog device is a second-order system, the corresponding response equation is:
其中,ζ为阻尼比,wn为固有频率,t为时间,φ=arccos(ζ)。Where ζ is the damping ratio, wn is the natural frequency, t is the time, and φ = arccos(ζ).
进一步的,所述判断所述实际增益速度处于预设的增益速度范围内,则将所述若干时刻的阶跃响应数据输入所述标准仿真模型,并引入振荡频率方程以获取与所述待标定模拟量器件相应的目标仿真模型;包括:Furthermore, if it is determined that the actual gain speed is within a preset gain speed range, the step response data at the plurality of moments are input into the standard simulation model, and an oscillation frequency equation is introduced to obtain a target simulation model corresponding to the analog device to be calibrated; including:
获取任意两时刻的阶跃响应数据,并将它们分别代入所述响应方程以获取一组待标定模拟量器件的衰减信号函数为:Obtain the step response data at any two moments and substitute them into the response equation to obtain the attenuation signal function of a set of analog devices to be calibrated:
其中,(t1,Y1)为一任意时刻的阶跃响应数据,t1为时刻点,Y1为t1时刻点对应的响应数值;(t2,Y2)为另一任意时刻的阶跃响应数据,t2为时刻点,Y2为t2时刻点对应的响应数值;Wherein, (t 1 , Y 1 ) is the step response data at an arbitrary time, t 1 is the time point, and Y 1 is the response value corresponding to the time point t 1 ; (t 2 , Y 2 ) is the step response data at another arbitrary time, t 2 is the time point, and Y 2 is the response value corresponding to the time point t 2 ;
求解所述一组待标定模拟量器件的衰减信号函数的比率以消除相位角,并得到一待标定模拟量器件的中间衰减信号函数为:The ratio of the attenuation signal functions of the set of analog devices to be calibrated is solved to eliminate the phase angle, and an intermediate attenuation signal function of the analog device to be calibrated is obtained as follows:
其中, in,
引入待标定模拟量器件在阶跃响应中的振荡频率方程并联立所述中间衰减信号函数以获取所述阻尼比及所述固有频率;Introduce the oscillation frequency equation of the analog device to be calibrated in the step response The intermediate attenuation signal function is connected in parallel to obtain the damping ratio and the natural frequency;
其中,wd为振荡频率,由阶跃响应信号中波峰间隔估算得到。Where wd is the oscillation frequency, which is estimated from the peak interval in the step response signal.
进一步的,所述基于所述目标仿真模型预测所述待标定模拟量器件的低点出现时间点及对应的低点数值,高点出现时间点及对应的高点数值以确定标定范围之后:Furthermore, after predicting the low point occurrence time point and the corresponding low point value, the high point occurrence time point and the corresponding high point value of the analog device to be calibrated based on the target simulation model to determine the calibration range:
若待标定模拟量器件为异常器件,或确定的标定范围超过预期的容差范围,则生成器件故障报告并发送至控制端;其中,所述器件故障报告包括:检测时间、检测数据、器件编号、故障类型;其中,所述故障类型包括:输出偏差、过冲、振荡、无响应;If the analog device to be calibrated is an abnormal device, or the determined calibration range exceeds the expected tolerance range, a device fault report is generated and sent to the control end; wherein the device fault report includes: detection time, detection data, device number, and fault type; wherein the fault type includes: output deviation, overshoot, oscillation, and no response;
若确定的标定范围不超过预期的容差范围,则对其进行补偿。If the determined calibration range does not exceed the expected tolerance range, it is compensated.
第二方面,本技术方案提供了一种适用于模拟量器件的快速标定装置,包括:In a second aspect, the present technical solution provides a rapid calibration device suitable for analog devices, comprising:
第一构建模块,用于基于传递函数构建与参考模拟量器件相应的初始仿真模型,并对所述初始仿真模型进行迭代优化直至所述初始仿真模型的仿真响应数值与参考模拟量器件的实际响应数值间的差值小于预设的差值阈值以获取一标准仿真模型;A first construction module is configured to construct an initial simulation model corresponding to a reference analog device based on a transfer function, and iteratively optimize the initial simulation model until a difference between a simulated response value of the initial simulation model and an actual response value of the reference analog device is less than a preset difference threshold, thereby obtaining a standard simulation model;
其中,所述参考模拟量器件是与待标定模拟量器件相应的标准器件,在所述初始仿真模型的搭建过程中,以阻尼比、固有频率、传递延迟及系统增益作为初始仿真模型的模型参数,以脉冲激励及阶跃激励作为所述初始仿真模型的输入信号,并引入卡尔曼滤波算法对输出信号进行预处理以得到最终的响应信号;The reference analog device is a standard device corresponding to the analog device to be calibrated. In the process of building the initial simulation model, the damping ratio, natural frequency, transmission delay and system gain are used as model parameters of the initial simulation model, pulse excitation and step excitation are used as input signals of the initial simulation model, and a Kalman filter algorithm is introduced to preprocess the output signal to obtain the final response signal.
第一获取模块,用于对待标定模拟量器件输入阶跃信号以获取第一预设时间窗内的若干时刻的阶跃响应数据;其中,所述第一预设时间窗为自以响应起始时刻为起始点,且处于上升阶段的一时间窗;A first acquisition module is configured to input a step signal to the analog device to be calibrated to obtain step response data at a plurality of moments within a first preset time window; wherein the first preset time window is a time window starting from the response start moment and in a rising phase;
第一判断模块,用于基于所述若干时刻的阶跃响应数据获取实际增益速度,进而判断所述实际增益速度不处于预设的增益速度范围内,则判定所述待标定模拟量器件为异常器件,并结束对所述待标定模拟量器件的标定;a first judgment module, configured to obtain an actual gain speed based on the step response data at the plurality of moments, and further determine that if the actual gain speed is not within a preset gain speed range, determine that the analog device to be calibrated is an abnormal device, and terminate calibration of the analog device to be calibrated;
第二构建模块,用于判断所述实际增益速度处于预设的增益速度范围内,则将所述若干时刻的阶跃响应数据输入所述标准仿真模型,并引入振荡频率方程以获取与所述待标定模拟量器件相应的目标仿真模型;A second construction module is configured to determine if the actual gain speed is within a preset gain speed range, input the step response data at the plurality of moments into the standard simulation model, and introduce an oscillation frequency equation to obtain a target simulation model corresponding to the analog device to be calibrated;
标定预测模块,用于基于所述目标仿真模型预测所述待标定模拟量器件的低点出现时间点及对应的低点数值,高点出现时间点及对应的高点数值以确定标定范围。The calibration prediction module is used to predict the low point occurrence time point and the corresponding low point value, the high point occurrence time point and the corresponding high point value of the analog device to be calibrated based on the target simulation model to determine the calibration range.
进一步的,包括:Further, including:
第二获取模块,用于判断达到预设的验证周期时,基于待标定模拟量器件获取第二预设时间窗内的若干实际阶跃响应数据,并基于目标仿真模型获取对应的预测阶跃响应数据;其中,所述第二预设时间窗为待标定模拟量器件实际响应稳定后的任一时刻窗;a second acquisition module, configured to acquire, upon determining that a preset verification period has been reached, a plurality of actual step response data within a second preset time window based on the analog device to be calibrated, and to acquire corresponding predicted step response data based on a target simulation model; wherein the second preset time window is any time window after the actual response of the analog device to be calibrated stabilizes;
模型更新模块,用于判断任一实际阶跃响应数据和与之对应的预测阶跃响应数据间的差值大于预设的响应差值阈值时,则对所述标准仿真模型进行再次优化。The model updating module is used to re-optimize the standard simulation model when it is determined that the difference between any actual step response data and the corresponding predicted step response data is greater than a preset response difference threshold.
进一步的,包括:Further, including:
第二判断模块,用于判断待标定模拟量器件为异常器件,或确定的标定范围超过预期的容差范围,则生成器件故障报告并发送至控制端;其中,所述器件故障报告包括:检测时间、检测数据、器件编号、故障类型;其中,所述故障类型包括:输出偏差、过冲、振荡、无响应;A second judgment module is configured to determine if the analog device to be calibrated is an abnormal device or if the determined calibration range exceeds an expected tolerance range, and then generate a device fault report and send it to the control terminal; wherein the device fault report includes: detection time, detection data, device number, and fault type; wherein the fault type includes: output deviation, overshoot, oscillation, and no response;
第三判断模块,用于判断确定的标定范围不超过预期的容差范围,则对其进行补偿。The third judgment module is used to judge that the determined calibration range does not exceed the expected tolerance range, and then compensate for it.
第三方面,本技术方案提供了一种电子设备,包括至少一个处理器,所述处理器与存储器耦合,所述存储器内存储有计算机程序,所述计算机程序被配置为被所述处理器运行时执行所述的方法。In a third aspect, the present technical solution provides an electronic device comprising at least one processor, wherein the processor is coupled to a memory, wherein a computer program is stored in the memory, and wherein the computer program is configured to execute the method described when executed by the processor.
第四方面,本技术方案提供了一种计算机可读存储介质,其上存储有计算机程序,所述计算机程序被计算机执行时实现所述的方法。In a fourth aspect, the present technical solution provides a computer-readable storage medium on which a computer program is stored, and the computer program implements the method when executed by a computer.
有益效果:Beneficial effects:
由以上技术方案可知,本发明的技术方案提供了一种适用于模拟量器件的快速标定方法以解决现有的标定方法存在的时间成本大的技术缺陷。It can be seen from the above technical solutions that the technical solution of the present invention provides a fast calibration method applicable to analog devices to solve the technical defect of high time cost in existing calibration methods.
考虑到现有的标定方法是以实际的稳定值作为检测目标,而稳定值的获取需要经过一段较长的稳定时间,进而增加标定时间成本。基于此,本技术方案考虑从瞬态响应角度来进行标定,从而达到提高时间效率的标定目的。Considering that existing calibration methods use the actual stable value as the detection target, and obtaining the stable value requires a long stabilization period, which increases the calibration time cost, this technical solution considers calibrating from the perspective of transient response to achieve the calibration goal of improving time efficiency.
具体的,首先,基于传递函数构建与参考模拟量器件相应的初始仿真模型,并对所述初始仿真模型进行迭代优化直至所述初始仿真模型的仿真响应数值与参考模拟量器件的实际响应数值间的差值小于预设的差值阈值以获取一标准仿真模型。其中,所述参考模拟量器件是与待标定模拟量器件相应的标准器件。为了提高所述标准仿真模型的准确性,并有效获取动态特性以降低标定中的时间成本,在所述初始仿真模型的搭建过程中,以阻尼比、固有频率、传递延迟及系统增益作为初始仿真模型的模型参数,以脉冲激励及阶跃激励作为所述初始仿真模型的输入信号,并引入卡尔曼滤波算法对输出信号进行预处理以得到最终的响应信号。Specifically, first, an initial simulation model corresponding to a reference analog device is constructed based on a transfer function, and the initial simulation model is iteratively optimized until the difference between the simulated response value of the initial simulation model and the actual response value of the reference analog device is less than a preset difference threshold to obtain a standard simulation model. The reference analog device is a standard device corresponding to the analog device to be calibrated. In order to improve the accuracy of the standard simulation model and effectively obtain dynamic characteristics to reduce the time cost of calibration, during the construction of the initial simulation model, the damping ratio, natural frequency, transfer delay, and system gain are used as model parameters of the initial simulation model, and pulse excitation and step excitation are used as input signals of the initial simulation model. A Kalman filter algorithm is introduced to preprocess the output signal to obtain the final response signal.
其次,对待标定模拟量器件输入阶跃信号以获取第一预设时间窗内的若干时刻的阶跃响应数据;其中,所述第一预设时间窗为自以响应起始时刻为起始点,且处于上升阶段的一时间窗。此时,实际的数据采集过程将从阶跃响应开始进行,即只需要采集两个数据点即可;不再需要等稳定值出现。然后,为了进一步降低时间成本,基于所述若干时刻的阶跃响应数据获取实际增益速度,进而判断所述实际增益速度不处于预设的增益速度范围内,则判定所述待标定模拟量器件为异常器件,并结束对所述待标定模拟量器件的标定。此时,通过该步的中间判别即可终止对异常器件的继续标定,从而避免无效的时间成本消耗。Secondly, a step signal is input to the analog device to be calibrated to obtain step response data at several moments within a first preset time window; wherein, the first preset time window is a time window starting from the response start moment and in the rising stage. At this time, the actual data acquisition process will start from the step response, that is, only two data points need to be collected; there is no need to wait for a stable value to appear. Then, in order to further reduce the time cost, the actual gain speed is obtained based on the step response data at the several moments, and then it is determined that the actual gain speed is not within the preset gain speed range, then the analog device to be calibrated is determined to be an abnormal device, and the calibration of the analog device to be calibrated is terminated. At this time, the continued calibration of the abnormal device can be terminated through the intermediate judgment of this step, thereby avoiding invalid time cost consumption.
继续的,判断所述实际增益速度处于预设的增益速度范围内,则将所述若干时刻的阶跃响应数据输入所述标准仿真模型,并引入振荡频率方程以获取与所述待标定模拟量器件相应的目标仿真模型。此时,基于所述目标仿真模型预测所述待标定模拟量器件的低点出现时间点及对应的低点数值,高点出现时间点及对应的高点数值以确定标定范围。Next, if the actual gain speed is determined to be within a preset gain speed range, the step response data at the plurality of time instants is input into the standard simulation model, and an oscillation frequency equation is introduced to obtain a target simulation model corresponding to the analog device to be calibrated. At this point, the time points at which low points occur and the corresponding low point values, as well as the time points at which high points occur and the corresponding high point values, of the analog device to be calibrated are predicted based on the target simulation model to determine a calibration range.
综上可见,本技术方案构建了一标准仿真模型以对标定系统的动态行为进行预先建模,并通过采集输出的瞬态响应,在较短时间窗口内分析其变化趋势,进而预测与之相应的待标定模拟量器件的最终稳定输出值,而不必等待标定系统完全稳定,达到了大幅缩短标定所需时间的目的。In summary, this technical solution constructs a standard simulation model to pre-model the dynamic behavior of the calibration system, and by collecting the transient response of the output, analyzes its changing trend within a relatively short time window, and then predicts the final stable output value of the corresponding analog device to be calibrated, without having to wait for the calibration system to be completely stable, thereby achieving the purpose of significantly shortening the time required for calibration.
应当理解,前述构思以及在下面更加详细地描述的额外构思的所有组合只要在这样的构思不相互矛盾的情况下都可以被视为本公开的发明主题的一部分。It should be appreciated that all combinations of the foregoing concepts, as well as additional concepts described in greater detail below, to the extent such concepts are not mutually inconsistent, can be considered to be part of the inventive subject matter of this disclosure.
结合附图从下面的描述中可以更加全面地理解本发明教导的前述和其他方面、实施例和特征。本发明的其他附加方面例如示例性实施方式的特征和/或有益效果将在下面的描述中显见,或通过根据本发明教导的具体实施方式的实践中得知。The foregoing and other aspects, embodiments, and features of the present invention will be more fully understood from the following description in conjunction with the accompanying drawings. Other additional aspects of the present invention, such as features and/or beneficial effects of the exemplary embodiments, will become apparent from the following description or through practice of specific embodiments according to the present invention.
附图说明BRIEF DESCRIPTION OF THE DRAWINGS
附图不意在按比例绘制。在附图中,在各个图中示出的每个相同或近似相同的组成部分可以用相同的标号表示。为了清晰起见,在每个图中,并非每个组成部分均被标记。现在,将通过例子并参考附图来描述本发明的各个方面的实施例,其中:The accompanying drawings are not intended to be drawn to scale. In the drawings, each identical or nearly identical component shown in various figures may be represented by the same reference numeral. For the sake of clarity, not every component is labeled in every figure. Embodiments of various aspects of the present invention will now be described by way of example and with reference to the accompanying drawings, in which:
图1为本实施例所述的适用于模拟量器件的快速标定方法的流程图;FIG1 is a flow chart of a rapid calibration method applicable to analog devices according to this embodiment;
图2为进行目标仿真模型获取的流程图;FIG2 is a flow chart for obtaining a target simulation model;
图3为进行标准仿真模型优化的流程图;FIG3 is a flow chart for performing standard simulation model optimization;
图4为进行标定后处理的流程图;FIG4 is a flow chart showing post-calibration processing;
图5为本实施例所述的适用于模拟量器件的快速标定装置的结构框图;FIG5 is a block diagram of the structure of the rapid calibration device for analog devices according to this embodiment;
图6为本实施例所述的电子设备的结构框图。FIG6 is a structural block diagram of the electronic device according to this embodiment.
具体实施方式DETAILED DESCRIPTION
为使本发明实施例的目的、技术方案和优点更加清楚,下面将结合本发明实施例的附图,对本发明实施例的技术方案进行清楚、完整地描述。显然,所描述的实施例是本发明的一部分实施例,而不是全部的实施例。基于所描述的本发明的实施例,本领域普通技术人员在无需创造性劳动的前提下所获得的所有其他实施例,都属于本发明保护的范围。除非另作定义,此处使用的技术术语或者科学术语应当为本发明所属领域内具有一般技能的人士所理解的通常意义。In order to make the purpose, 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 in conjunction with the drawings of the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the described embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention. Unless otherwise defined, the technical terms or scientific terms used herein should be the common meanings understood by people with ordinary skills in the field to which the present invention belongs.
本申请说明书以及权利要求书中使用的“第一”、“第二”以及类似的词语并不表示任何顺序、数量或者重要性,而只是用来区分不同的组成部分。同样,除非上下文清楚地指明其它情况,否则单数形式的“一个”“一”或者“该”等类似词语也不表示数量限制,而是表示存在至少一个。“包括”或者“包含”等类似的词语意指出现在“包括”或者“包含”前面的元件或者物件涵盖出现在“包括”或者“包含”后面列举的特征、整体、步骤、操作、元素和/或组件,并不排除一个或多个其它特征、整体、步骤、操作、元素、组件和/或其集合的存在或添加。“上”“下”“左”“右”等仅用于表示相对位置关系,当被描述对象的绝对位置改变后,则该相对位置关系也可能相应地改变。The words “first”, “second” and similar terms used in the specification and claims of this application do not indicate any order, quantity or importance, but are only used to distinguish different components. Similarly, unless the context clearly indicates otherwise, the singular forms of “a”, “an” or “the” and similar words do not indicate a quantitative limitation, but rather indicate the presence of at least one. Words such as “include” or “comprise” mean that the elements or objects appearing before “include” or “comprises” cover the features, wholes, steps, operations, elements and/or components listed after “include” or “comprises”, and do not exclude the existence or addition of one or more other features, wholes, steps, operations, elements, components and/or their collections. “Up”, “down”, “left”, “right” and the like are only used to indicate relative positional relationships. When the absolute position of the described object changes, the relative positional relationship may also change accordingly.
标定的目标是找到待标定模拟量器件的输出的量程范围,包括高点及低点,即最大输出响应值及最小输出响应值。在传统的模拟量器件标定输出偏差、过冲中,通常通过阶跃信号来驱动待标定的模拟量器件,然后等待所述待标定的模拟量器件输出的阶跃响应稳定后(即响应值接近稳定值后),再进行数据采集。但有些模拟量器件标定中由于内部特性或环境因素(例如,对于一个阻尼比较低的二阶系统,由于振荡和输出偏差、过冲现象,系统需要一定的时间才能达到稳定状态),可能需要较长时间才能稳定,尤其是在输出高点时。同时,这种时间延迟还会累积,尤其是在需要多次标定的场合,从而大大增加了整体标定的时间成本。基于此,本实施例提供了一种适用于模拟量器件的快速标定方法以改善上述技术缺陷。The goal of calibration is to find the output range of the analog device to be calibrated, including the high point and the low point, that is, the maximum output response value and the minimum output response value. In the traditional analog device calibration output deviation and overshoot, the analog device to be calibrated is usually driven by a step signal, and then the step response of the analog device to be calibrated is stabilized (that is, the response value is close to the stable value) before data acquisition is performed. However, due to internal characteristics or environmental factors (for example, for a second-order system with relatively low damping, due to oscillation and output deviation, overshoot phenomenon, the system needs a certain amount of time to reach a stable state) in the calibration of some analog devices, it may take a long time to stabilize, especially at the output high point. At the same time, this time delay will also accumulate, especially in situations where multiple calibrations are required, thereby greatly increasing the time cost of the overall calibration. Based on this, the present embodiment provides a fast calibration method suitable for analog devices to improve the above-mentioned technical defects.
下面结合附图所示,对本实施例所述的适用于模拟量器件的快速标定方法作具体介绍。The following is a detailed introduction to the rapid calibration method for analog devices according to this embodiment with reference to the accompanying drawings.
结合图1所示,所述方法包括如下步骤:As shown in FIG1 , the method includes the following steps:
步骤S102、基于传递函数构建与参考模拟量器件相应的初始仿真模型,并对所述初始仿真模型进行迭代优化直至所述初始仿真模型的仿真响应数值与参考模拟量器件的实际响应数值间的差值小于预设的差值阈值以获取一标准仿真模型。Step S102: construct an initial simulation model corresponding to the reference analog device based on the transfer function, and iteratively optimize the initial simulation model until the difference between the simulation response value of the initial simulation model and the actual response value of the reference analog device is less than a preset difference threshold to obtain a standard simulation model.
本实施例中,所述参考模拟量器件是与待标定模拟量器件相应的标准器件,采用的具体的建模软件为MATLAB软件。In this embodiment, the reference analog device is a standard device corresponding to the analog device to be calibrated, and the specific modeling software used is MATLAB software.
在具体实施时,着重从以下几个方面对动态响应进行准确建模和优化:During the specific implementation, the focus is on accurately modeling and optimizing the dynamic response from the following aspects:
在建模过程中,初期利用MATLAB对动态特性进行建模,通常使用传递函数或状态空间模型来描述响应特性。建模过程中将重点关注系统的固有频率、阻尼比、响应速度等关键动态参数,这些参数直接影响阶跃响应曲线,进而影响系统的输出稳定性。During the modeling process, MATLAB is initially used to model the dynamic characteristics, typically using transfer functions or state-space models to describe the response characteristics. The modeling process focuses on key dynamic parameters such as the system's natural frequency, damping ratio, and response speed. These parameters directly affect the step response curve and, in turn, the system's output stability.
在参数调优过程中,使用频率响应法或最小二乘法等参数辨识方法,结合系统实际数据,对模型中的参数进行估计,并通过反复仿真,调优模型参数,确保仿真结果与实际测量数据的匹配度达到一定精度(本实施例具体的,误差需要小于5%)。During the parameter tuning process, parameter identification methods such as the frequency response method or the least squares method are used, combined with the actual data of the system, to estimate the parameters in the model, and through repeated simulation, the model parameters are tuned to ensure that the simulation results match the actual measurement data to a certain degree of accuracy (specifically, in this embodiment, the error needs to be less than 5%).
在仿真分析与优化标准过程中,利用阶跃响应、脉冲响应等常用激励信号,观察系统在不同激励条件下的响应,记录系统稳定时间和峰值时间等动态指标。并将“响应时间短、超调量小、稳定性高”作为动态响应模型优化的标准,尤其关注在瞬态响应期间系统的主要特性,这样可以在不影响精度的情况下加速高点标定。During the simulation analysis and optimization process, common excitation signals such as step response and impulse response are used to observe the system's response under different excitation conditions, recording dynamic indicators such as system settling time and peak time. "Short response time, small overshoot, and high stability" are used as the criteria for dynamic response model optimization, with particular attention paid to the system's key characteristics during transient response. This allows for accelerated high-point calibration without compromising accuracy.
具体的,关注如下模型参数:首先是阻尼比和固有频率,它们直接决定了响应速度和稳定性,对于增益速度测量的精度至关重要。其次是传递延迟和系统增益,它们影响着系统的输出幅度和响应速度,通过这些参数可以调整系统响应以接近真实的动态特性。为减少噪声干扰对模型精度的影响,在建模时采用卡尔曼滤波器以进行噪声过滤,消除噪声对信号质量的影响。Specifically, the following model parameters are of interest: First, the damping ratio and natural frequency, which directly determine response speed and stability and are crucial for the accuracy of gain-speed measurements. Second, the propagation delay and system gain, which affect the system's output amplitude and response speed, can be used to adjust the system's response to approximate realistic dynamic characteristics. To reduce the impact of noise interference on model accuracy, a Kalman filter is used during modeling to filter out noise and eliminate its impact on signal quality.
作为一种具体的实施方式,考虑到二阶系统的通用性(即更高阶的系统均可被简化为二阶系统处理),因此具体以二阶系统为例,基于MATLAB软件进行仿真的过程如下:As a specific implementation method, considering the universality of the second-order system (that is, higher-order systems can be simplified as second-order systems), the simulation process based on MATLAB software is as follows, taking the second-order system as an example:
使用MATLAB的Control System Toolbox创建传递函数:Use MATLAB's Control System Toolbox to create the transfer function:
%参数定义% Parameter definition
wn=1;%自然频率w n = 1; % natural frequency
zeta=0.5;%阻尼比zeta=0.5;%damping ratio
%创建传递函数% Create transfer function
num=[wn^2];%分子num=[wn^2];% numerator
den=[1,2*zeta*wn,wn^2];%分母den=[1,2*zeta*wn,wn^2];% denominator
sys=tf(num,den);%创建传递函数对象sys=tf(num,den); %Create transfer function object
使用step()函数进行阶跃响应仿真,或者使用lsim()函数进行任意输入信号的响应仿真。Use the step() function to simulate a step response, or use the lsim() function to simulate the response of an arbitrary input signal.
a.阶跃响应仿真:a. Step response simulation:
%阶跃响应仿真% Step response simulation
figure;figure;
step(sys);step(sys);
title('二阶系统阶跃响应');title('Second-order system step response');
grid on;grid on;
b.任意输入信号响应仿真:b. Arbitrary input signal response simulation:
如果要使用自定义输入信号(如正弦波或其他信号),可以使用lsim()函数:If you want to use a custom input signal (such as a sine wave or other signal), you can use the lsim() function:
%时间向量% time vector
t=0:0.01:10;%0到10秒,步长0.01秒t=0:0.01:10; % 0 to 10 seconds, step length 0.01 second
%自定义输入信号(例如正弦波)%Custom input signal (such as sine wave)
input_signal=sin(2*pi*0.5*t);%0.5Hz的正弦波input_signal = sin(2*pi*0.5*t); % 0.5Hz sine wave
%仿真系统响应% Simulated system response
figure;figure;
lsim(sys,input_signal,t);lsim(sys,input_signal,t);
title('二阶系统对正弦输入信号的响应');title('Response of a Second-Order System to a Sinusoidal Input Signal');
grid on。grid on.
具体的,在图形窗口中,可以看到二阶系统对输入信号的响应。根据不同的阻尼比和自然频率,系统的响应特性会有所不同。可以调整wn和zeta的值,观察对响应的影响。Specifically, in the Graphics window, you can see the response of the second-order system to the input signal. Depending on the damping ratio and natural frequency, the system's response characteristics will vary. You can adjust the values of w n and zeta to observe the effect on the response.
如果需要将结果导出,可以使用saveas()函数保存图形:If you need to export the results, you can use the saveas() function to save the graph:
saveas(gcf,'second_order_response.png')。saveas(gcf,'second_order_response.png').
基于上述仿真过程,当为二阶系统时,本实施例中最终得到的所述标准仿真模型对应的响应方程为:Based on the above simulation process, when it is a second-order system, the response equation corresponding to the standard simulation model finally obtained in this embodiment is:
其中,ζ为阻尼比,wn为固有频率,t为时间,φ=arccos(ζ)。。Where ζ is the damping ratio, wn is the natural frequency, t is the time, and φ = arccos(ζ).
步骤S104、对待标定模拟量器件输入阶跃信号以获取第一预设时间窗内的任意若干时刻的阶跃响应数据。Step S104: input a step signal to the analog device to be calibrated to obtain step response data at any number of moments within a first preset time window.
本实施例中,所述阶跃信号由PLC或LabVIEW控制的自动测试系统自动发出从而实现标定的自动化进行。其中,所述第一预设时间窗为自以响应起始时刻为起始点,且处于上升阶段的一时间窗。In this embodiment, the step signal is automatically generated by an automatic test system controlled by a PLC or LabVIEW to achieve automated calibration. The first preset time window is a time window starting from the response start time and in the rising phase.
当待标定模拟量器件为二阶系统时,只需获取任意两时刻的阶跃响应数据即可。When the analog device to be calibrated is a second-order system, it is only necessary to obtain the step response data at any two moments.
步骤S106、基于所述若干时刻的阶跃响应数据获取实际增益速度,进而判断所述实际增益速度不处于预设的增益速度范围内,则判定所述待标定模拟量器件为异常器件,并结束对所述待标定模拟量器件的标定。Step S106: obtaining the actual gain speed based on the step response data at the several moments, and then determining that the actual gain speed is not within the preset gain speed range, determining that the analog device to be calibrated is an abnormal device, and ending the calibration of the analog device to be calibrated.
此时,基于步骤S106即可通过增益速度对异常器件进行预判别,进而终止标定,从而避免不必要的时间消耗。At this time, based on step S106 , the abnormal device can be pre-identified by the gain speed, and then the calibration is terminated, thereby avoiding unnecessary time consumption.
步骤S108、判断所述实际增益速度处于预设的增益速度范围内,则将所述若干时刻的阶跃响应数据输入所述标准仿真模型,并引入振荡频率方程以获取与所述待标定模拟量器件相应的目标仿真模型。Step S108: If it is determined that the actual gain speed is within a preset gain speed range, the step response data at the plurality of moments are input into the standard simulation model, and an oscillation frequency equation is introduced to obtain a target simulation model corresponding to the analog device to be calibrated.
作为一种具体的实施方式,结合图2所示,当所述待标定模拟量器件为二阶系统时,对应的目标仿真模型的获取过程为:As a specific implementation, with reference to FIG2 , when the analog device to be calibrated is a second-order system, the corresponding target simulation model acquisition process is as follows:
步骤S1082、获取任意两时刻的阶跃响应数据,并将它们分别代入所述响应方程以获取一组待标定模拟量器件的衰减信号函数为:Step S1082: Obtain step response data at any two moments, and substitute them into the response equation to obtain a set of attenuation signal functions of the analog devices to be calibrated:
其中,(t1,Y1)为一任意时刻的阶跃响应数据,t1为时刻点,Y1为t1时刻点对应的响应数值;(t2,Y2)为另一任意时刻的阶跃响应数据,t2为时刻点,Y2为t2时刻点对应的响应数值。Among them, (t 1 , Y 1 ) is the step response data at an arbitrary time, t 1 is the time point, and Y 1 is the response value corresponding to the time point t 1 ; (t 2 , Y 2 ) is the step response data at another arbitrary time, t 2 is the time point, and Y 2 is the response value corresponding to the time point t 2 .
步骤S1084、求解所述一组待标定模拟量器件的衰减信号函数的比率以消除相位角,并得到一待标定模拟量器件的中间衰减信号函数为:Step S1084: Calculate the ratio of the attenuation signal functions of the set of analog devices to be calibrated to eliminate the phase angle, and obtain an intermediate attenuation signal function of the analog device to be calibrated:
其中, in,
步骤S1086、引入待标定模拟量器件在阶跃响应中的振荡频率方程并联立所述中间衰减信号函数以获取所述阻尼比及所述固有频率。Step S1086: Introduce the oscillation frequency equation of the analog device to be calibrated in the step response The intermediate attenuation signal function is connected in parallel to obtain the damping ratio and the natural frequency.
其中,wd为振荡频率,由阶跃响应信号中波峰间隔估算得到。Where wd is the oscillation frequency, which is estimated from the peak interval in the step response signal.
此时基于步骤S1082~步骤S1086即可获取与待标定模拟量器件相应的仿真模型中各参数的具体量,从而实现后续的标定范围预测。具体的,继续进行如下步骤:At this time, based on steps S1082 to S1086, the specific values of the parameters in the simulation model corresponding to the analog device to be calibrated can be obtained, thereby realizing the subsequent calibration range prediction. Specifically, continue with the following steps:
步骤S110、基于所述目标仿真模型预测所述待标定模拟量器件的低点出现时间点及对应的低点数值,高点出现时间点及对应的高点数值以确定标定范围。Step S110 : predicting the low point occurrence time point and the corresponding low point value, the high point occurrence time point and the corresponding high point value of the analog device to be calibrated based on the target simulation model to determine the calibration range.
作为一种优选的实施方式,为了进一步提高模型的准确性以提高获取的预测标定范围的准确性,结合图3所示,在步骤S110之前还包括:As a preferred embodiment, in order to further improve the accuracy of the model and thus improve the accuracy of the obtained prediction calibration range, as shown in FIG3 , before step S110, the following steps are further included:
步骤S1092、判断达到预设的验证周期时,基于待标定模拟量器件获取第二预设时间窗内的若干实际阶跃响应数据,并基于目标仿真模型获取对应的预测阶跃响应数据。Step S1092: When it is determined that the preset verification period has been reached, a number of actual step response data within a second preset time window is obtained based on the analog device to be calibrated, and corresponding predicted step response data is obtained based on the target simulation model.
在具体实施时,所述第二预设时间窗为待标定模拟量器件实际响应稳定后的任一时刻窗。In a specific implementation, the second preset time window is any time window after the actual response of the analog device to be calibrated stabilizes.
步骤S1094、判断任一实际阶跃响应数据和与之对应的预测阶跃响应数据间的差值大于预设的响应差值阈值时,则对所述标准仿真模型进行再次优化。Step S1094: When it is determined that the difference between any actual step response data and the corresponding predicted step response data is greater than a preset response difference threshold, the standard simulation model is optimized again.
此时基于步骤S1092~步骤S1094将对仿真模型进行迭代优化,从而在标定过程中伴随着对模型准确性的确认及优化,从而实现了对预测准确性的提升。At this time, the simulation model will be iteratively optimized based on steps S1092 to S1094, so that the accuracy of the model will be confirmed and optimized during the calibration process, thereby achieving an improvement in prediction accuracy.
结合图4所示,还包括如下步骤以对标定结果进行处理:As shown in FIG4 , the following steps are also included to process the calibration results:
步骤S1122、若待标定模拟量器件为异常器件,或确定的标定范围超过预期的容差范围,则生成器件故障报告并发送至控制端。Step S1122: If the analog device to be calibrated is an abnormal device, or the determined calibration range exceeds the expected tolerance range, a device failure report is generated and sent to the control end.
在具体实施时,所述器件故障报告包括:检测时间、检测数据、器件编号、故障类型;其中,所述故障类型包括:输出偏差、过冲、振荡、无响应。所述输出偏差为:稳态输出值是否在预期的容差范围内;所述过冲为:输出响应大于最大的输入值;所述振荡为:存在持续振荡;所述无响应为:未输出信号或响应过慢。In a specific implementation, the device fault report includes: detection time, detection data, device number, and fault type. Fault types include: output deviation, overshoot, oscillation, and no response. Output deviation refers to whether the steady-state output value is within the expected tolerance range; overshoot refers to whether the output response is greater than the maximum input value; oscillation refers to the presence of sustained oscillation; and no response refers to no output signal or a slow response.
具体的,若待标定模拟量器件为异常器件,步骤S1122可在步骤S106后执行。Specifically, if the analog device to be calibrated is an abnormal device, step S1122 may be performed after step S106.
在器件故障报告发送过程中,还伴随着声光报警或界面提示以便于相关人员尽快进行异常处理及确认,并伴随着标定终止以避免时间消耗,或者因其他原因造成的对标定设备或待标定模拟量器件的损坏。During the device fault report sending process, there will be an audible and visual alarm or interface prompt to facilitate relevant personnel to handle and confirm the abnormality as soon as possible, and the calibration will be terminated to avoid time consumption or damage to the calibration equipment or the analog device to be calibrated due to other reasons.
步骤S1124、若确定的标定范围不超过预期的容差范围,则对其进行补偿。Step S1124: If the determined calibration range does not exceed the expected tolerance range, compensation is performed.
为了便于标定过程的可溯源性,以及对生产决策的支持,本实施例对上述每个阶段产生大量的测试数据通过本地数据库或云数据库进行自动存储,以便后续分析或故障诊断。具体的,存储的数据类型包括包含时间序列数据、增益速度、系统振荡次数、稳态值、过冲幅度等。To facilitate traceability of the calibration process and support production decision-making, this embodiment automatically stores the large amount of test data generated in each stage in a local or cloud database for subsequent analysis and fault diagnosis. Specifically, the stored data includes time series data, gain speed, system oscillation count, steady-state value, overshoot amplitude, etc.
综上可见,本实施例所述方法通过瞬态响应测量预测稳态值,避免了长时间等待系统输出稳定,大幅缩短标定时间。同时,能在在测试过程中自动发现故障,并发出预警或自动中止测试,避免进一步损坏。标定数据和生产数据的自动存储确保数据追溯性,也有助于质量控制和设备维护。In summary, the method described in this embodiment predicts steady-state values through transient response measurements, avoiding lengthy waits for system output stabilization and significantly shortening calibration time. Furthermore, it automatically detects faults during testing, issuing warnings or automatically aborting the test to prevent further damage. Automatic storage of calibration and production data ensures data traceability and facilitates quality control and equipment maintenance.
上述程序可以运行在处理器中,或者也可以存储在存储器中(或称为计算机可读存储介质),计算机可读介质包括永久性和非永久性、可移动和非可移动媒体可以由任何方法或技术来实现信息存储。信息可以是计算机可读指令、数据结构、程序的模块或其他数据。计算机的存储介质的例子包括,但不限于相变内存(PRAM)、静态随机存取存储器(SRAM)、动态随机存取存储器(DRAM)、其他类型的随机存取存储器(RAM)、只读存储器(ROM)、电可擦除可编程只读存储器(EEPROM)、快闪记忆体或其他内存技术、只读光盘只读存储器(CD-ROM)、数字多功能光盘(DVD)或其他光学存储、磁盒式磁带,磁带磁盘存储或其他磁性存储设备或任何其他非传输介质,可用于存储可以被计算设备访问的信息。按照本文中的界定,计算机可读介质不包括暂存电脑可读媒体,如调制的数据信号和载波。The above program can be executed in a processor or stored in a memory (or computer-readable storage medium). Computer-readable media include permanent and non-permanent, removable and non-removable media that can implement information storage by any method or technology. Information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, magnetic tape, disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include temporary computer-readable media such as modulated data signals and carrier waves.
这些计算机程序也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤,对应与不同的步骤可以通过不同的模块来实现。These computer programs can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce computer-implemented processing, so that the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in one or more processes in the flowchart and/or one or more boxes in the block diagram, and corresponding different steps can be implemented through different modules.
本实施例还提供了一种适用于模拟量器件的快速标定装置。结合图5所示,所述装置包括如下功能模块:This embodiment also provides a rapid calibration device for analog devices. As shown in FIG5 , the device includes the following functional modules:
第一构建模块,用于基于传递函数构建与参考模拟量器件相应的初始仿真模型,并对所述初始仿真模型进行迭代优化直至所述初始仿真模型的仿真响应数值与参考模拟量器件的实际响应数值间的差值小于预设的差值阈值以获取一标准仿真模型。其中,所述参考模拟量器件是与待标定模拟量器件相应的标准器件,在所述初始仿真模型的搭建过程中,以阻尼比、固有频率、传递延迟及系统增益作为初始仿真模型的模型参数,以脉冲激励及阶跃激励作为所述初始仿真模型的输入信号,并引入卡尔曼滤波算法对输出信号进行预处理以得到最终的响应信号。The first construction module is configured to construct an initial simulation model corresponding to a reference analog device based on the transfer function, and iteratively optimize the initial simulation model until the difference between the simulated response value of the initial simulation model and the actual response value of the reference analog device is less than a preset difference threshold to obtain a standard simulation model. The reference analog device is a standard device corresponding to the analog device to be calibrated. During the construction of the initial simulation model, the damping ratio, natural frequency, transfer delay, and system gain are used as model parameters of the initial simulation model, and pulse excitation and step excitation are used as input signals of the initial simulation model. A Kalman filter algorithm is introduced to preprocess the output signal to obtain the final response signal.
第一获取模块,用于对待标定模拟量器件输入阶跃信号以获取第一预设时间窗内的任意两时刻的阶跃响应数据;其中,所述第一预设时间窗为自以响应起始时刻为起始点,且处于上升阶段的一时间窗。The first acquisition module is used to input a step signal to the analog device to be calibrated to obtain step response data at any two moments within a first preset time window; wherein the first preset time window is a time window that starts at the response start moment and is in a rising phase.
第一判断模块,用于基于所述任意两时刻的阶跃响应数据获取实际增益速度,进而判断所述实际增益速度不处于预设的增益速度范围内,则判定所述待标定模拟量器件为异常器件,并结束对所述待标定模拟量器件的标定。The first judgment module is used to obtain the actual gain speed based on the step response data at any two moments, and then determine that the actual gain speed is not within a preset gain speed range, then determine that the analog device to be calibrated is an abnormal device, and end the calibration of the analog device to be calibrated.
第二构建模块,用于判断所述实际增益速度处于预设的增益速度范围内,则将所述任意两时刻的阶跃响应数据输入所述标准仿真模型,并引入振荡频率方程以获取与所述待标定模拟量器件相应的目标仿真模型。The second construction module is used to determine that the actual gain speed is within a preset gain speed range, input the step response data of any two moments into the standard simulation model, and introduce an oscillation frequency equation to obtain a target simulation model corresponding to the analog device to be calibrated.
标定预测模块,用于基于所述目标仿真模型预测所述待标定模拟量器件的低点出现时间点及对应的低点数值,高点出现时间点及对应的高点数值以确定标定范围。The calibration prediction module is used to predict the low point occurrence time point and the corresponding low point value, the high point occurrence time point and the corresponding high point value of the analog device to be calibrated based on the target simulation model to determine the calibration range.
由于所述装置基于所述方法搭建,因此在上述已经描述的,此处不再赘述。Since the device is constructed based on the method, it has been described above and will not be repeated here.
例如,所述装置还包括:For example, the device further comprises:
第二获取模块,用于判断达到预设的验证周期时,基于待标定模拟量器件获取第二预设时间窗内的若干实际阶跃响应数据,并基于目标仿真模型获取对应的预测阶跃响应数据;其中,所述第二预设时间窗为待标定模拟量器件实际响应稳定后的任一时刻窗。The second acquisition module is used to determine that when a preset verification cycle is reached, obtain a number of actual step response data within a second preset time window based on the analog device to be calibrated, and obtain corresponding predicted step response data based on the target simulation model; wherein the second preset time window is any time window after the actual response of the analog device to be calibrated is stable.
模型更新模块,用于判断任一实际阶跃响应数据和与之对应的预测阶跃响应数据间的差值大于预设的响应差值阈值时,则对所述标准仿真模型进行再次优化。The model updating module is used to re-optimize the standard simulation model when it is determined that the difference between any actual step response data and the corresponding predicted step response data is greater than a preset response difference threshold.
再例如,所述装置还包括:For another example, the device further includes:
第二判断模块,用于判断待标定模拟量器件为异常器件,或确定的标定范围超过预期的容差范围,则生成器件故障报告并发送至控制端;其中,所述器件故障报告包括:检测时间、检测数据、器件编号、故障类型;其中,所述故障类型包括:输出偏差、过冲、振荡、无响应。The second judgment module is used to determine whether the analog device to be calibrated is an abnormal device, or the determined calibration range exceeds the expected tolerance range, and then generate a device fault report and send it to the control end; wherein, the device fault report includes: detection time, detection data, device number, fault type; wherein, the fault type includes: output deviation, overshoot, oscillation, and no response.
第三判断模块,用于判断确定的标定范围不超过预期的容差范围,则对其进行补偿。The third judgment module is used to judge that the determined calibration range does not exceed the expected tolerance range, and then compensate for it.
结合图6所示,本实施例还提供了一种电子设备,包括至少一个处理器,所述处理器与存储器耦合,所述存储器内存储有计算机程序,所述计算机程序被配置为被所述处理器运行时执行所述的方法。As shown in FIG6 , this embodiment further provides an electronic device, including at least one processor, wherein the processor is coupled to a memory, wherein a computer program is stored in the memory, and the computer program is configured to execute the method when executed by the processor.
同时,还提供了一种计算机可读存储介质,其上存储有计算机程序,所述计算机程序被计算机执行时实现所述的方法。At the same time, a computer-readable storage medium is also provided, on which a computer program is stored. When the computer program is executed by a computer, the method described above is implemented.
由于所述装置、所述电子设备及计算机可读存储介质均基于所述方法搭建,或用于实现所述方法,因此在实际应用时,也具有极大缩小了标定过程中时间成本的技术优势。Since the device, the electronic device and the computer-readable storage medium are all built based on the method or used to implement the method, they also have the technical advantage of greatly reducing the time cost of the calibration process in actual application.
虽然本发明已以较佳实施例揭露如上,然其并非用以限定本发明。本发明所属技术领域中具有通常知识者,在不脱离本发明的精神和范围内,当可作各种的更动与润饰。因此,本发明的保护范围当视权利要求书所界定者为准。While the present invention has been disclosed above with reference to preferred embodiments, this is not intended to limit the present invention. Persons skilled in the art will readily appreciate that various modifications and variations can be made without departing from the spirit and scope of the present invention. Therefore, the scope of protection of the present invention shall be determined by the claims.
Claims (10)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202411658434.0A CN119885813B (en) | 2024-11-20 | 2024-11-20 | Rapid calibration method and device suitable for analog device |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202411658434.0A CN119885813B (en) | 2024-11-20 | 2024-11-20 | Rapid calibration method and device suitable for analog device |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN119885813A CN119885813A (en) | 2025-04-25 |
| CN119885813B true CN119885813B (en) | 2025-08-15 |
Family
ID=95438707
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202411658434.0A Active CN119885813B (en) | 2024-11-20 | 2024-11-20 | Rapid calibration method and device suitable for analog device |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN119885813B (en) |
Citations (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN101119159A (en) * | 2006-07-18 | 2008-02-06 | 夏普株式会社 | Carrier detection circuit and control method, and infrared signal processing circuit having it |
| CN101608940A (en) * | 2009-07-23 | 2009-12-23 | 合肥工业大学 | Coriolis mass flowmeter positive and negative step alternate excitation method and system for starting vibration |
Family Cites Families (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US10003862B2 (en) * | 2007-03-15 | 2018-06-19 | Endotronix, Inc. | Wireless sensor reader |
| ITRM20110651A1 (en) * | 2010-12-20 | 2012-06-21 | Selex Sistemi Integrati Spa | METHOD OF QUICK PREDICTION OF THE VERTICAL PROFILE OF THE TRAJECTORY FOR THE MANAGEMENT OF AIR TRAFFIC, AND ITS RELATED ATM SYSTEM. |
| CN112731257A (en) * | 2021-01-12 | 2021-04-30 | 中国电力科学研究院有限公司 | Step response simulation method and system of all-fiber current transformer |
| CN112947122A (en) * | 2021-03-23 | 2021-06-11 | 山东新马制药装备有限公司 | PID optimization simulation system based on system identification and PLC |
| CN118690865A (en) * | 2024-07-22 | 2024-09-24 | 成都中微达信科技有限公司 | A quantum system modulation method based on high-frequency pulses |
-
2024
- 2024-11-20 CN CN202411658434.0A patent/CN119885813B/en active Active
Patent Citations (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN101119159A (en) * | 2006-07-18 | 2008-02-06 | 夏普株式会社 | Carrier detection circuit and control method, and infrared signal processing circuit having it |
| CN101608940A (en) * | 2009-07-23 | 2009-12-23 | 合肥工业大学 | Coriolis mass flowmeter positive and negative step alternate excitation method and system for starting vibration |
Also Published As
| Publication number | Publication date |
|---|---|
| CN119885813A (en) | 2025-04-25 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN114371618A (en) | A Neural Network-Based Extended State Observer Compensation Method and Active Disturbance Rejection Controller | |
| CN117949884A (en) | Power quality and voltage monitoring and calibrating method and system based on machine learning | |
| CN119885813B (en) | Rapid calibration method and device suitable for analog device | |
| CN117029968A (en) | Traffic data diagnosis method, system, storage medium and electronic equipment | |
| CN115410637B (en) | Overload detection method, device, medium and equipment for delay line in semiconductor equipment | |
| CN111967126A (en) | Simulation model accuracy verification method considering uncertainty | |
| CN118508472B (en) | Intelligent control method and system for frequency modulation of super-capacity coupling thermal power generating unit | |
| Lewandowski et al. | Combining optimal SASS (Sparsity Assisted Signal Smoothing) and notch filters for transient measurement signals denoising of large power generating unit | |
| CN108170637A (en) | A kind of transfer function model discrimination method with derivative characteristic process | |
| US20130191071A1 (en) | System and method for automatic modal parameter extraction in structural dynamics analysis | |
| CN107732940B (en) | A test method for parameter optimization of power system stabilizer based on ADPSS | |
| Vörös | Modeling and identification of hysteresis using special forms of the Coleman–Hodgdon model | |
| CN114726280B (en) | Equivalent load inertia identification method and device, electronic equipment and storage medium | |
| CN115081246B (en) | Fractional derivative estimation method based on sliding mode technology | |
| CN207198565U (en) | A kind of Active Disturbance Rejection Control system | |
| CN114139461B (en) | A kind of spacecraft system uncertainty prediction method, device and storage medium | |
| CN113704901B (en) | Automatic processing method for engine frequency response load spectrum | |
| KR20120103642A (en) | Method for exhaust gas recirculation | |
| Meher et al. | Relay‐based identification of Wiener model | |
| CN106941552B (en) | Mobile terminal shutdown performance evaluation method | |
| Cerone et al. | Parameter bounds evaluation for linear system with output backlash | |
| CN117077487B (en) | Method and device for identifying structural overall damping based on time domain response variance parameters | |
| CN120197284B (en) | BIM technology-based assembled building element quality detection system and method | |
| CN120629791B (en) | Electronic component testing system, method, equipment and medium | |
| CN117454612B (en) | A method, system, device and medium for detecting clock jumps at a deep space interferometry station |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| GR01 | Patent grant | ||
| GR01 | Patent grant |