CN111750962B - A high-precision estimation method of object weight based on filtering - Google Patents
A high-precision estimation method of object weight based on filtering Download PDFInfo
- Publication number
- CN111750962B CN111750962B CN202010499206.9A CN202010499206A CN111750962B CN 111750962 B CN111750962 B CN 111750962B CN 202010499206 A CN202010499206 A CN 202010499206A CN 111750962 B CN111750962 B CN 111750962B
- Authority
- CN
- China
- Prior art keywords
- weight
- value
- sampling
- feeder
- kth
- 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
Images
Classifications
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01G—WEIGHING
- G01G19/00—Weighing apparatus or methods adapted for special purposes not provided for in the preceding groups
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F17/00—Digital computing or data processing equipment or methods, specially adapted for specific functions
- G06F17/10—Complex mathematical operations
- G06F17/11—Complex mathematical operations for solving equations, e.g. nonlinear equations, general mathematical optimization problems
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F17/00—Digital computing or data processing equipment or methods, specially adapted for specific functions
- G06F17/10—Complex mathematical operations
- G06F17/18—Complex mathematical operations for evaluating statistical data, e.g. average values, frequency distributions, probability functions, regression analysis
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Data Mining & Analysis (AREA)
- Mathematical Physics (AREA)
- Mathematical Optimization (AREA)
- Computational Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Pure & Applied Mathematics (AREA)
- Mathematical Analysis (AREA)
- Software Systems (AREA)
- Databases & Information Systems (AREA)
- Algebra (AREA)
- General Engineering & Computer Science (AREA)
- Operations Research (AREA)
- Life Sciences & Earth Sciences (AREA)
- Bioinformatics & Cheminformatics (AREA)
- Bioinformatics & Computational Biology (AREA)
- Evolutionary Biology (AREA)
- Probability & Statistics with Applications (AREA)
- Feedback Control In General (AREA)
Abstract
本发明公开了一种基于滤波的物体重量高精度估计方法,属于信息技术领域。通过根据投入的重量随电机加速度变化的规律建立状态转移方程,根据重力传感器测得的数据建立观测方程,通过第k‑1次重量估计值获取第k次重量预测值,通过卡尔曼增益,将第k次重量预测值和第k次传感器测量值取加权平均得到第k次重量初步估计值,当k大于等于L并小于M时,对第k次重量初步估计值进行平滑处理,并将新的处理后的第k次重量估计值代入之后的运算,k大于等于M时结束循环;通过上述方法使得最终重量估计值与实际值之间的误差不超过0.3%;进而后续根据估计值控制电机停止,使得投料机可以实现精准重量的投料操作。
The invention discloses a filtering-based high-precision estimation method for object weight, which belongs to the field of information technology. The state transition equation is established according to the law that the input weight changes with the acceleration of the motor, the observation equation is established according to the data measured by the gravity sensor, the k-th weight prediction value is obtained through the k-1 weight estimated value, and the Kalman gain is used to convert the The weighted average of the k-th predicted weight value and the k-th sensor measurement value is used to obtain the k-th preliminary weight estimate. When k is greater than or equal to L and less than M, the k-th preliminary weight estimate is smoothed and the new weight is calculated. The k-th weight estimate value after processing is substituted into the subsequent operation, and the cycle is ended when k is greater than or equal to M; the error between the final weight estimate value and the actual value is not more than 0.3% by the above method; and then the motor is controlled according to the estimate value. Stop, so that the feeder can achieve accurate weight feeding operation.
Description
技术领域technical field
本发明涉及一种基于滤波的物体重量高精度估计方法,属于信息技术领域。The invention relates to a filtering-based high-precision estimation method for object weight, and belongs to the field of information technology.
背景技术Background technique
投料机是一种原料添加设备,在一些条件较为恶劣且对添加原料的速度及添加量要求较为严苛的工业过程,比如冶炼过程,需要将原料送入高温熔炉中,一方面,温度较高,人无法靠近,另一方面,要求送入料层的厚度以及送料速度必须均匀一致,利用人力无法完成该项工作,因此需要使用专用设备投料机。Feeder is a kind of raw material adding equipment. In some industrial processes with harsh conditions and strict requirements on the speed and amount of raw materials, such as the smelting process, the raw materials need to be fed into a high-temperature furnace. On the one hand, the temperature is relatively high. , people can not approach, on the other hand, the thickness of the feeding layer and the feeding speed must be uniform, and the work cannot be completed by manpower, so a special equipment feeder is required.
投料机在下料过程中,需要根据具体的投料要求确定投料时间和投料的重量,通常是通过称重传感器进行测重,当重量达到设定值时,给予投料机电机减速的信号,从而渐渐停止下料。During the feeding process of the feeder, it is necessary to determine the feeding time and the feeding weight according to the specific feeding requirements. Usually, the weighing sensor is used to measure the weight. When the weight reaches the set value, the feeder motor is given a signal to decelerate, thereby gradually stopping. Blanking.
称重传感器在测重过程中,自身的精度会受内部噪声和外部坏境干扰的影响,下放的料也会给传感器带来一定的冲击误差,从而影响称重传感器的测量精度。另外电机停止转动后仍然会有一部分的或在空中、或在投料口处的余料会继续下放。这些因素造成的误差会从多个方面影响称重传感器的测量精度,也就是说称重传感器的在任意时刻的实际测量值与该时刻投料机的实际投料值之间存在一定的误差,如果以称重传感器的测量值来控制投料机电机减速或者停止,那么势必会造成投料机无法进行精准重量值的投料。In the weighing process of the load cell, its own accuracy will be affected by internal noise and external environmental interference, and the material placed under it will also bring a certain impact error to the sensor, thus affecting the measurement accuracy of the load cell. In addition, after the motor stops rotating, there will still be a part of the remaining material in the air or at the feeding port will continue to be released. The errors caused by these factors will affect the measurement accuracy of the load cell from many aspects, that is to say, there is a certain error between the actual measurement value of the load cell at any time and the actual feeding value of the feeder at this time. If the measurement value of the load cell is used to control the motor of the feeder to decelerate or stop, it will inevitably cause the feeder to fail to perform accurate weight feeding.
因此需要在投料过程中对投料机各个时刻的实际投料值进行估计,使得该估计值尽量贴近投料机在各个时刻的真实投料值,进而根据该估计值来控制投料机电机减速或者停止,使得投料机能够进行精准投料。Therefore, it is necessary to estimate the actual feeding value of the feeding machine at each moment in the feeding process, so that the estimated value is as close to the actual feeding value of the feeding machine at each moment as possible, and then control the motor of the feeding machine to decelerate or stop according to the estimated value, so that feeding The machine can carry out precise feeding.
发明内容SUMMARY OF THE INVENTION
为了进一步提高投料机的投料重量精度,本发明提供了一种基于滤波的物体重量高精度估计方法,所述方法包括:In order to further improve the feeding weight accuracy of the feeding machine, the present invention provides a filtering-based high-precision estimation method for object weight, the method comprising:
S1根据已有的投料机投料过程中的数据建立状态转移方程和观测方程;其中投料机投料过程中的数据包括各个采样时刻投料机投入的实际重量值、各个采样时刻电机加速度值、电机运转的速度值以及各个采样时刻重力传感器测得的重量值;S1 establishes the state transition equation and the observation equation according to the data in the feeding process of the existing feeder; wherein the data in the feeding process of the feeder includes the actual weight value of the feeder at each sampling time, the motor acceleration value at each sampling time, and the motor running value. The speed value and the weight value measured by the gravity sensor at each sampling time;
S2通过第k-1次采样时的重量估计值获取第k次采样时的重量预测值,其中第1次采样时的重量估计值为初始时刻投料机的已投料的实际重量值;S2 obtains the weight prediction value at the k-th sampling time through the weight estimated value at the k-1 sampling time, wherein the weight estimated value at the first sampling time is the actual weight value that has been fed by the feeder at the initial moment;
S3通过卡尔曼增益,将第k次重量预测值和第k次传感器测量值取加权平均得到第k次重量估计值;S3 takes the weighted average of the k-th weight prediction value and the k-th sensor measurement value through the Kalman gain to obtain the k-th weight estimate value;
S4根据前L次采样时刻得到的重量预测值与估计值,对第L次及L次之后重量估计值进行平滑处理:S4 performs smoothing processing on the weight estimated value of the Lth and later times according to the weight predicted value and estimated value obtained at the first L sampling times:
将第X∈{k,k-1,...,k-L+1}次重量预测值与第X∈{k,k-1,...,k-L+1}重量估计值分别对应作差,记为ΔW=[ΔW(k),ΔW(k-1),...,ΔW(k-L+1)],在ΔW里去掉一个最大值和一个最小值得到新的ΔW;Compare the X∈{k,k-1,...,k-L+1}th weight prediction with the X∈{k,k-1,...,k-L+1}th weight estimate respectively The corresponding difference is recorded as ΔW=[ΔW(k),ΔW(k-1),...,ΔW(k-L+1)], remove a maximum value and a minimum value in ΔW to get a new ΔW ;
根据采样时间的接近程度,对去除最大值最小值之后的ΔW求加权平均,得到更新后的第k次重量估计值。According to the closeness of the sampling time, the weighted average of ΔW after removing the maximum and minimum values is obtained to obtain the updated k-th weight estimate.
可选的,所述S1中建立的状态转移方程和观测方程分别为:Optionally, the state transition equation and observation equation established in S1 are:
状态转移方程:State transition equation:
W(k)=AW(k-1)+V(k)+e(k) (1)W(k)=AW(k-1)+V(k)+e(k) (1)
观测方程如下:The observation equation is as follows:
g(k)=CW(k)+h(k) (2)g(k)=CW(k)+h(k) (2)
其中,W(k)表示第k次采样时投料机所投料的总量的真实重量;A是状态转移矩阵;W(k-1)表示第k-1次采样时投料机所投料的总量的真实重量;V(k)表示第k次采样时电机运转的速度:Among them, W(k) represents the real weight of the total amount of material fed by the feeder in the kth sampling; A is the state transition matrix; W(k-1) represents the total amount of material fed by the feeder in the k-1th sampling The real weight of ; V(k) represents the speed of the motor running at the kth sampling:
V(k)=V0+Bk (3)V(k)=V 0 +Bk (3)
e(k)表示估计噪声,表示状态转移方程中重量值变化过程中的微小变化;e(k) represents the estimated noise, which represents the slight change in the weight value change process in the state transition equation;
g(k)表示第k次采样时传感器测得的测量重量;C是量测转移矩阵;h(k)表示观测噪声,表示第k次采样时真实重量W(k)与第k次采样时传感器测得的测量重量g(k)的误差;g(k) represents the measurement weight measured by the sensor at the kth sampling; C is the measurement transition matrix; h(k) represents the observation noise, representing the real weight W(k) at the kth sampling and the kth sampling time The error of the measured weight g(k) measured by the sensor;
B为电机的加速度矩阵,k为采样次数。B is the acceleration matrix of the motor, and k is the sampling times.
可选的,所述S2包括;依据下述公式获得第k次采样时的重量预测值:Optionally, described S2 includes: Obtain the weight prediction value when sampling the kth time according to the following formula:
其中,W'(k)表示第k次重量预测值,表示第k-1次重量估计值。Among them, W'(k) represents the kth weight prediction value, Indicates the k-1th weight estimate.
可选的,所述S3包括:Optionally, the S3 includes:
获取第k次采样时的重量预测值和第k次采样时的投料机所投料的总量的真实重量之间的误差协方差矩阵P'(k):Obtain the error covariance matrix P'(k) between the predicted weight at the k-th sampling and the actual weight of the total amount fed by the feeder at the k-th sampling:
P'(k)=AP(k-1)AT+Q (5)P'(k)=AP(k-1)A T +Q (5)
其中,P(k-1)表示第k-1次估计值与第k-1次采样时的投料机所投料的总量的真实重量之间的误差协方差矩阵;为估计噪声e(k)的协方差;Among them, P(k-1) represents the error covariance matrix between the k-1th estimated value and the real weight of the total amount of material fed by the feeder during the k-1th sampling; is the covariance of the estimated noise e(k);
根据P'(k)及P(k)获取第k次卡尔曼增益K'(k):Obtain the k-th Kalman gain K'(k) according to P'(k) and P(k):
K'(k)=P'(k)CT[CP(k)CT+R]-1 (6)K'(k)=P'(k)C T [CP(k)C T +R] -1 (6)
以此求得第k次重量估计值 Use this to obtain the k-th weight estimate
其中,R为观测噪声h(k)的协方差。where R is the covariance of the observation noise h(k).
可选的,所述S3通过卡尔曼增益,将第k次重量预测值和第k次传感器测量值取加权平均得到第k次重量估计值,包括:Optionally, the S3 obtains the kth weight estimate by taking the weighted average of the kth weight prediction value and the kth sensor measurement value through the Kalman gain, including:
k小于L时,更新协方差P(k)后令k=k+1并继续计算;若k大于等于L,则先对第k次重量估计值进行平滑处理,再更新协方差P(k)并令k=k+1后继续计算。更新公式如下:When k is less than L, update the covariance P(k) and set k=k+1 and continue the calculation; if k is greater than or equal to L, first smooth the k-th weight estimate, and then update the covariance P(k) And let k=k+1 and continue the calculation. The update formula is as follows:
P(k)=(1-K′(k)C)P′(k-1) (8)P(k)=(1-K'(k)C)P'(k-1) (8)
可选的,所述方法中对于第L次采样时刻之后、第M次采样时刻之前各个采用时刻得到的第k次重量估计值同样进行平滑处理;其中M为设定的采样次数的上限值。Optionally, in the method, for the kth weight estimated value obtained at each adoption time after the Lth sampling time and before the Mth sampling time Smoothing is also performed; where M is the upper limit of the set sampling times.
可选的,所述S4包括:Optionally, the S4 includes:
设置表征权值的比例系数η=[η0,η1,...,ηL-3],Set the proportional coefficient η=[η 0 ,η 1 ,...,η L-3 ] that characterizes the weights,
其中,η0≥η1...≥ηL-3且η0+η1+...+ηL-3=1;Wherein, η 0 ≥ η 1 ... ≥ η L-3 and η 0 +η 1 + ... + η L-3 =1;
则平滑处理后的新的第k次重量估计值为:Then the new k-th weight estimate after smoothing for:
其中,ΔW1 T表示ΔW矩阵第一行的转置,ΔW2 T表示ΔW矩阵第二行的转置。Among them, ΔW 1 T represents the transpose of the first row of the ΔW matrix, and ΔW 2 T represents the transpose of the second row of the ΔW matrix.
可选的,状态转移矩阵量测转移矩阵 optional, state transition matrix Measurement Transfer Matrix
可选的,估计噪声e(k)的协方差取观测噪声h(k)的协方差R取 Optionally, estimate the covariance of the noise e(k) Pick The covariance R of the observation noise h(k) is taken as
本申请还提供一种投料机投料总量控制方法,所述方法采用上述基于滤波的物体重量高精度估计方法对投料机投料重量进行估计,进而根据估计出的投料重量控制投料机的投料总量。The present application also provides a method for controlling the total amount of material fed by a feeder. The method adopts the above-mentioned high-precision estimation method for object weight based on filtering to estimate the weight of the feeder, and then controls the total amount of material fed by the feeder according to the estimated weight of the feeder. .
本发明有益效果是:The beneficial effects of the present invention are:
本发明公开了一种基于滤波的物体重量高精度估计方法,属于信息技术领域。通过根据投入的重量随电机加速度变化的规律建立状态转移方程,根据重力传感器测得的数据建立观测方程,通过第k-1次重量估计值获取第k次重量预测值,通过卡尔曼增益,将第k次重量预测值和第k次传感器测量值取加权平均得到第k次重量初步估计值,当k大于等于L并小于M时,对第k次重量初步估计值进行平滑处理,并将新的处理后的第k次重量估计值代入之后的运算,k大于等于M时结束循环;通过上述方法使得最终重量估计值与实际值之间的误差不超过0.3%;进而后续根据估计值控制电机停止,使得投料机可以实现精准重量的投料操作。The invention discloses a filtering-based high-precision estimation method for object weight, which belongs to the field of information technology. The state transition equation is established according to the law that the input weight changes with the acceleration of the motor, the observation equation is established according to the data measured by the gravity sensor, the k-th weight prediction value is obtained through the k-1 weight estimation value, and the k-th weight prediction value is obtained through Kalman gain. The weighted average of the k-th predicted weight value and the k-th sensor measurement value is used to obtain the k-th preliminary weight estimate. When k is greater than or equal to L and less than M, the k-th preliminary weight estimate is smoothed and the new weight is calculated. The k-th weight estimate value after processing is substituted into the subsequent operation, and the cycle is ended when k is greater than or equal to M; the error between the final weight estimate value and the actual value is not more than 0.3% by the above method; and then the motor is controlled according to the estimate value. Stop, so that the feeder can achieve accurate weight feeding operation.
附图说明Description of drawings
为了更清楚地说明本发明实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to illustrate the technical solutions in the embodiments of the present invention more clearly, the following briefly introduces the accompanying drawings used in the description of the embodiments. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, other drawings can also be obtained from these drawings without creative effort.
图1是本发明一个实施例中基于滤波的重量计量高精度控制方法的流程图。FIG. 1 is a flowchart of a filtering-based high-precision control method for weight measurement in an embodiment of the present invention.
图2是本发明一个实施例中投料机电机匀加速运动估计图。FIG. 2 is an estimation diagram of the uniform acceleration motion of the feeder motor in an embodiment of the present invention.
图3是本发明一个实施例中投料机电机匀速运动估计图。FIG. 3 is an estimation diagram of uniform motion of a feeder motor in an embodiment of the present invention.
图4是本发明一个实施例中投料机电机匀减速运动估计图。FIG. 4 is an estimation diagram of the uniform deceleration motion of the feeder motor in an embodiment of the present invention.
具体实施方式Detailed ways
为使本发明的目的、技术方案和优点更加清楚,下面将结合附图对本发明实施方式作进一步地详细描述。In order to make the objectives, technical solutions and advantages of the present invention clearer, the embodiments of the present invention will be further described in detail below with reference to the accompanying drawings.
投料机由电机带动进行投料操作,在投料过程中,电机的运行状态通常会经过匀加速、匀速和匀减速三个阶段。本申请技术方案通过提供一种基于滤波的重量估计方法,准确估计出投料机在各个阶段的投料重量,进而后续根据估计出的实际投料值控制电机减速或停止,使得投料机可以实现精准重量的投料操作。The feeding machine is driven by the motor for feeding operation. During the feeding process, the running state of the motor usually goes through three stages of uniform acceleration, uniform speed and uniform deceleration. The technical solution of the present application provides a filter-based weight estimation method, which accurately estimates the feeding weight of the feeder at each stage, and then controls the motor to decelerate or stop according to the estimated actual feeding value, so that the feeder can achieve accurate weight. Feeding operation.
实施例一:Example 1:
本实施例提供一种基于滤波的物体重量高精度估计方法,参见图1,所述方法包括:This embodiment provides a filtering-based high-precision estimation method for object weight, see FIG. 1 , the method includes:
步骤101,根据投料机投入的重量随电机加速度变化的规律建立状态转移方程;并根据重力传感器测得的数据建立观测方程。Step 101: Establish a state transition equation according to the law that the weight input by the feeder changes with the acceleration of the motor; and establish an observation equation according to the data measured by the gravity sensor.
具体的,根据已有的投料机投料过程中的数据建立状态转移方程和观测方程,其中投料机投料过程中的数据包括各个采样时刻投料机投入的实际重量值、各个采样时刻电机加速度值、电机运转的速度值以及各个采样时刻重力传感器测得的重量值。Specifically, the state transition equation and the observation equation are established according to the data in the feeding process of the existing feeder, wherein the data in the feeding process of the feeder include the actual weight value of the feeder at each sampling time, the motor acceleration value at each sampling time, the motor The running speed value and the weight value measured by the gravity sensor at each sampling time.
所建立的状态转移方程如下:The established state transition equation is as follows:
W(k)=AW(k-1)+V(k)+e(k) (1)W(k)=AW(k-1)+V(k)+e(k) (1)
所建立的观测方程如下:The established observation equation is as follows:
g(k)=CW(k)+h(k) (2)g(k)=CW(k)+h(k) (2)
其中,V(k)表示第k次采样时电机运转的速度,构造如下:Among them, V(k) represents the speed of the motor running at the kth sampling, which is constructed as follows:
V(k)=V0+Bk (3)V(k)=V 0 +Bk (3)
V0表示电机运转的初始速度,其值根据运行需求取:比如,若电机匀加速启动,则若电机已经在以速度v运行,接着要做匀速运动或匀减速运动,则B为加速度矩阵,根据实际加速度值a设置其值为 V 0 represents the initial speed of the motor operation, and its value is taken according to the operation requirements: for example, if the motor starts with uniform acceleration, then If the motor is already running at the speed v, and then to make a uniform motion or uniform deceleration motion, then B is the acceleration matrix, set its value according to the actual acceleration value a
W(k)表示第k次采样时的投料机所投料的总量的真实重量;g(k)表示第k次采样时传感器测得的测量重量;k为采样次数,k=1,2,3...;A是状态转移矩阵,取C是量测转移矩阵,取 W(k) represents the real weight of the total amount of material fed by the feeder during the kth sampling; g(k) represents the measurement weight measured by the sensor during the kth sampling; k is the number of sampling times, k=1,2, 3...; A is the state transition matrix, take C is the measurement transition matrix, take
e(k)表示估计噪声,表示状态转移方程中重量值变化过程中的微小变化,估计噪声的协方差取h(k)表示观测噪声,表示第k次采样时真实重量W(k)与第k次采样时传感器测得的测量重量g(k)的误差;观测噪声的协方差R取 e(k) represents the estimated noise, represents the small change in the weight value change process in the state transition equation, and estimates the covariance of the noise Pick h(k) represents the observation noise, which represents the error between the real weight W(k) at the k-th sampling and the measured weight g(k) measured by the sensor at the k-th sampling; the covariance R of the observation noise is taken as
步骤102,通过第k-1次重量估计值获取第k次重量预测值W'(k)。
公式如下:The formula is as follows:
假设第1次采样为投料机开始投料的时刻,即第1次重量估计值取0,根据公式(4)可以获得第2次的重量预测值,也就是第2次采样时的重量预测值。Assuming that the first sampling is the moment when the feeder starts feeding, that is, the estimated weight of the first time is 0. According to formula (4), the predicted weight of the second time can be obtained, that is, the predicted weight of the second sampling time.
步骤103,通过卡尔曼增益,将第k次重量预测值和第k次传感器测量值取加权平均得到第k次重量估计值。
比如在步骤102获得第2次采样时的重量预测值之后,将第2次采样时的重量预测值和第2次采样时传感器测量值取加权平均得到第2次重量估计值;For example, after obtaining the weight prediction value at the second sampling time in
获取第k次采样时的重量预测值和真实值(即第k次采样时的投料机所投料的总量的真实重量)之间的误差协方差矩阵P'(k):Obtain the error covariance matrix P'(k) between the predicted weight at the k-th sampling and the real value (that is, the real weight of the total amount fed by the feeder at the k-th sampling):
P'(k)=AP(k-1)AT+Q (5)P'(k)=AP(k-1)A T +Q (5)
其中,P(k-1)表示第k-1次估计值与第k-1次采样时的投料机所投料的总量的真实重量之间的误差协方差矩阵;Among them, P(k-1) represents the error covariance matrix between the k-1th estimated value and the real weight of the total amount of material fed by the feeder during the k-1th sampling;
根据P'(k)及P(k)获取第k次卡尔曼增益K'(k):Obtain the k-th Kalman gain K'(k) according to P'(k) and P(k):
K'(k)=P'(k)CT[CP(k)CT+R]-1 (6)K'(k)=P'(k)C T [CP(k)C T +R] -1 (6)
以此求得第k次重量估计值 Use this to obtain the k-th weight estimate
步骤104,判断k的值是否大于等于L。
L是根据需求取得常数值,在计算过程中的意义为:取L个数进行平滑处理。L值越大,估计得到的数据越接近真实值,但也会造成计算量的增大以及估计过头的可能。L is a constant value obtained according to the demand, and the meaning in the calculation process is: take the number of L for smoothing. The larger the L value is, the closer the estimated data is to the real value, but it will also increase the amount of calculation and the possibility of overestimating.
若k小于L,更新协方差P(k)后令k=k+1并继续计算,更新公式如下:If k is less than L, after updating the covariance P(k), set k=k+1 and continue the calculation. The update formula is as follows:
P(k)=(1-K′(k)C)P′(k-1) (8)P(k)=(1-K'(k)C)P'(k-1) (8)
若k大于等于L,继续进行下一步判断。If k is greater than or equal to L, continue to the next step.
步骤105,判断k的值是否小于等于M。
若k小于等于M,则继续对第k次重量估计值进行平滑处理,If k is less than or equal to M, continue to estimate the kth weight smoothing,
若k大于M,则结束循环,If k is greater than M, end the loop,
其中,M是采样次数的上限值,具体取值可根据实际应用中投料机的所需投料的重量要求及设定的采样总次数确定。Among them, M is the upper limit of the sampling times, and the specific value can be determined according to the weight requirements of the feeding machine and the set total sampling times in practical applications.
步骤106,将第X∈{k,k-1,...,k-L+1}次重量预测值与第X∈{k,k-1,...,k-L+1}重量估计值分别对应作差,记为ΔW=[ΔW(k),ΔW(k-1),...,ΔW(k-L+1)],在ΔW里去掉一个最大值和一个最小值得到新的ΔW。Step 106: Compare the X∈{k,k-1,...,k-L+1}th weight prediction value with the X∈{k,k-1,...,k-L+1}th weight The estimated values correspond to the difference, denoted as ΔW=[ΔW(k),ΔW(k-1),...,ΔW(k-L+1)], remove a maximum value and a minimum value in ΔW to get new ΔW.
步骤107,根据采样时间的接近程度,对去除最大值最小值之后的ΔW求加权平均,并更新第k次重量估计值代入之后的运算。Step 107: Calculate the weighted average of ΔW after removing the maximum and minimum values according to the proximity of the sampling time, and update the k-th weight estimate Operation after substitution.
具体计算如下:The specific calculation is as follows:
设置表征权值的比例系数η=[η0,η1,...,ηL-3],权值即权重值,表示做平滑处理的几个数据的比重,这里的数据是作差后的差值。权值可以根据实际系统的经验数据或者历史数据设定。Set the proportional coefficient η=[η 0 ,η 1 ,...,η L-3 ] that characterizes the weight value, the weight value is the weight value, which represents the proportion of several data to be smoothed, and the data here is after the difference difference value. The weights can be set according to the empirical data or historical data of the actual system.
其中,η0≥η1...≥ηL-3且η0+η1+...+ηL-3=1;Wherein, η 0 ≥ η 1 ... ≥ η L-3 and η 0 +η 1 + ... + η L-3 =1;
则平滑处理后的新的第k次重量估计值为:Then the new k-th weight estimate after smoothing for:
其中,ΔW1 T表示ΔW矩阵第一行的转置,ΔW2 T表示ΔW矩阵第二行的转置。Among them, ΔW 1 T represents the transpose of the first row of the ΔW matrix, and ΔW 2 T represents the transpose of the second row of the ΔW matrix.
经过上述过程处理,该步骤所得出的第k次重量估计值贴近于投料机第k次采样时所投料的真实值。After the above process, the kth estimated weight value obtained in this step It is close to the real value of the material fed during the kth sampling of the feeder.
综上所述,本申请通过根据投入的重量随电机加速度变化的规律建立状态转移方程,根据重力传感器测得的数据建立观测方程,通过第k-1次重量估计值获取第k次重量预测值,通过卡尔曼增益,将第k次重量预测值和第k次传感器测量值取加权平均得到第k次重量估计值,当k大于等于7并小于M时,对第k次重量估计值进行平滑处理,在第X∈{k,k-1,...,k-6}次重量估计值里去掉一个最大值和一个最小值,根据采样时间的接近程度求加权平均,并将新的处理后的第k次重量估计值代入之后的运算,若k大于等于M,则结束循环;解决了目前重量计量不准确的问题;进而后续根据估计出的实际投料值控制电机减速或停止,使得投料机可以实现精准重量的投料操作。To sum up, the present application establishes a state transition equation according to the law that the input weight changes with the acceleration of the motor, establishes an observation equation according to the data measured by the gravity sensor, and obtains the kth weight prediction value through the k-1th weight estimation value. , through the Kalman gain, the weighted average of the k-th weight prediction value and the k-th sensor measurement value is obtained to obtain the k-th weight estimate value. When k is greater than or equal to 7 and less than M, the k-th weight estimate value is smoothed Processing, remove a maximum value and a minimum value in the X∈{k,k-1,...,k-6}th weight estimation value, calculate the weighted average according to the proximity of the sampling time, and apply the new processing The k-th estimated weight value is substituted into the subsequent operation. If k is greater than or equal to M, the cycle ends; the current problem of inaccurate weight measurement is solved; and then the motor is subsequently controlled to decelerate or stop according to the estimated actual feeding value, so that feeding The machine can realize accurate weight feeding operation.
实施例二:Embodiment 2:
本实施例以初始速度V0为10r/s为例,提供一种基于滤波的重量计量高精度估计方法,包括对电机匀加速、匀速、匀减速三个阶段进行估计,其中,电机匀加速、匀速、匀减速各个阶段的投料机投料重量分别为745g、490g和235g,各个阶段分别采样50次;在实际应用中,可以所述方法包括:Taking the initial speed V 0 as 10 r/s as an example, this embodiment provides a high-precision estimation method for weight measurement based on filtering, which includes estimating three stages of uniform acceleration, uniform speed and uniform deceleration of the motor. The feeding weights of the feeder in each stage of uniform speed and uniform deceleration are 745g, 490g and 235g respectively, and each stage is sampled 50 times; in practical application, the method can include:
步骤201,根据投料机投入的重量随电机加速度变化的规律建立状态转移方程;根据重力传感器测得的数据建立观测方程。In step 201, a state transition equation is established according to the law that the weight input by the feeder changes with the acceleration of the motor; an observation equation is established according to the data measured by the gravity sensor.
状态转移方程如下:The state transition equation is as follows:
W(k)=AW(k-1)+V(k)+e(k) (1)W(k)=AW(k-1)+V(k)+e(k) (1)
观测方程如下:The observation equation is as follows:
g(k)=CW(k)+h(k) (2)g(k)=CW(k)+h(k) (2)
其中,V(k)表示第k次采样时电机运转的速度,构造如下:Among them, V(k) represents the speed of the motor running at the kth sampling, which is constructed as follows:
V(k)=V0+Bk (3)V(k)=V 0 +Bk (3)
V0表示电机运转的初始速度,取B为加速度矩阵,根据实际加速度值a设置其值为本实施例对a的取值为0.2、0和-0.2。V 0 represents the initial speed of motor operation, take B is the acceleration matrix, set its value according to the actual acceleration value a In this embodiment, the values of a are 0.2, 0, and -0.2.
W(k)表示第k次采样时投料机所投料的总量的真实重量,g(k)表示第k次采样时传感器测得的测量重量。k为采样次数,k=1,2,3...50。A是状态转移矩阵,取C是量测转移矩阵,取 W(k) represents the real weight of the total amount of material fed by the feeder in the kth sampling, and g(k) represents the measured weight measured by the sensor in the kth sampling. k is the sampling times, k=1, 2, 3...50. A is the state transition matrix, take C is the measurement transition matrix, take
e(k)表示估计噪声,估计噪声的协方差取h(k)表示观测噪声,观测噪声的协方差R取 e(k) represents the estimated noise, the covariance of the estimated noise Pick h(k) represents the observation noise, and the covariance R of the observation noise is taken as
步骤202,通过第k-1次重量估计值获取第k次重量预测值W'(k)。Step 202, pass the k-1th weight estimation Obtain the k-th weight prediction value W'(k).
公式如下:The formula is as follows:
其中, in,
步骤203,通过卡尔曼增益,将第k次重量预测值和第k次传感器测量值取加权平均得到第k次重量估计值。Step 203 , taking the weighted average of the k-th weight prediction value and the k-th sensor measurement value through the Kalman gain to obtain the k-th estimated weight value.
获取第k次重量预测值和真实值之间的误差协方差矩阵P'(k):Get the error covariance matrix P'(k) between the kth weight prediction and the true value:
P'(k)=AP(k-1)AT+Q (5)P'(k)=AP(k-1)A T +Q (5)
获取第k次卡尔曼增益K'(k):Get the k-th Kalman gain K'(k):
K'(k)=P'(k)CT[CP(k)CT+R]-1 (6)K'(k)=P'(k)C T [CP(k)C T +R] -1 (6)
以此求得第k次重量估计值 Use this to obtain the k-th weight estimate
步骤204,判断k的值是否大于等于7。Step 204, determine whether the value of k is greater than or equal to 7.
若k小于7,更新协方差P(k)后令k=k+1并继续计算,更新公式如下:If k is less than 7, after updating the covariance P(k), set k=k+1 and continue the calculation. The update formula is as follows:
P(k)=(1-K′(k)C)P′(k-1) (8)P(k)=(1-K'(k)C)P'(k-1) (8)
若k大于等于7,继续进行下一步判断。If k is greater than or equal to 7, continue to the next step.
步骤205,判断k的值是否小于采样次数的上限值50。Step 205 , determine whether the value of k is less than the upper limit value of 50 of the sampling times.
若k小于等于50,则继续对第k次重量估计值进行平滑处理,If k is less than or equal to 50, continue to estimate the kth weight smoothing,
若k大于50,则结束循环,If k is greater than 50, end the loop,
步骤206,将第X∈{k,k-1,...,k-6}次重量预测值与第X∈{k,k-1,...,k-6}重量估计值分别对应作差,记为ΔW=[ΔW(k),ΔW(k-1),...,ΔW(k-6)],在ΔW里去掉一个最大值和一个最小值得到新的ΔW。Step 206: Corresponding the X∈{k,k-1,...,k-6}th weight prediction value and the X∈{k,k-1,...,k-6}th weight estimate value respectively Make a difference, denoted as ΔW=[ΔW(k),ΔW(k-1),...,ΔW(k-6)], remove a maximum value and a minimum value in ΔW to get a new ΔW.
步骤207,根据采样时间的接近程度,对去除最大值最小值之后的ΔW求加权平均,并更新第k次重量估计值代入之后的运算。Step 207: Calculate the weighted average of ΔW after removing the maximum and minimum values according to the proximity of the sampling time, and update the k-th weight estimate Operation after substitution.
具体计算如下:The specific calculation is as follows:
设置表征权值的比例系数η=[η0,η1,...,η4],取η=[0.3,0.25,0.2,0.15,0.1]Set the proportionality coefficient η=[η 0 ,η 1 ,...,η 4 ] to characterize the weight, take η=[0.3, 0.25, 0.2, 0.15, 0.1]
满足η0≥η1≥η2≥η3≥η4且η0+η1+η2+η3+η4=1;Satisfy η 0 ≥ η 1 ≥ η 2 ≥ η 3 ≥ η 4 and η 0 +η 1 +η 2 +η 3 +η 4 =1;
则平滑处理后的新的第k次重量估计值为:Then the new k-th weight estimate after smoothing for:
其中,ΔW1 T表示ΔW矩阵第一行的转置,ΔW2 T表示ΔW矩阵第二行的转置。Among them, ΔW 1 T represents the transpose of the first row of the ΔW matrix, and ΔW 2 T represents the transpose of the second row of the ΔW matrix.
结果分析Result analysis
电机作加速度为0.2r/s2的匀加速运动时,可作估计曲线如图2所示,数据统计见表1:When the motor is used for uniform acceleration motion with an acceleration of 0.2r/s 2 , the estimated curve can be used as shown in Figure 2, and the data statistics are shown in Table 1:
表1:匀加速运动数据统计表Table 1: Statistics of uniform acceleration motion data
电机作加速度为0的匀速运动时,可作估计曲线如图3所示,数据统计见表2:When the motor is moving at a constant speed with an acceleration of 0, the estimated curve can be used as shown in Figure 3, and the data statistics are shown in Table 2:
表2:匀速运动数据统计表Table 2: Statistics of uniform motion data
电机作加速度为-0.2r/s2的匀加速运动时,可作估计曲线如图4所示,数据统计见表3:When the motor is used for uniform acceleration motion with an acceleration of -0.2r/s2, the estimated curve can be used as shown in Figure 4, and the data statistics are shown in Table 3:
表3:匀减速运动数据统计表Table 3: Statistics of uniform deceleration motion data
注:k从1开始, Note: k starts from 1,
可以看到,按本发明方法进行滤波估计,电机匀加速、匀速、匀减速各个阶段第50次采样时估计值(即表1-3中的滤波值)与真实值(即表1-3中的真值)的误差分别为-0.0128%、-0.0234%和0.0930%,而总量的估计值与真实值相差不超过0.3%,达到了高精度估计,也即对投料机的投料重量的估计值与实际投料值的误差不超过0.3%。It can be seen that, according to the method of the present invention, the estimated value (that is, the filtering value in Table 1-3) and the real value (that is, the The errors of the true value) are -0.0128%, -0.0234% and 0.0930% respectively, and the estimated value of the total amount is not more than 0.3% different from the true value, achieving a high-precision estimation, that is, the estimation of the feeding weight of the feeding machine The error between the value and the actual feeding value is not more than 0.3%.
此外,从三张曲线图可以看到,滤波估计曲线较为平滑,波动极小,稳定度高。In addition, it can be seen from the three graphs that the filter estimation curve is relatively smooth, with minimal fluctuation and high stability.
高精度、高稳定度的估计值为电机减速信号的发出提供了较为准确的判断,进而为提高投料重量的精确度提供了保障。The high-precision and high-stability estimated value provides a more accurate judgment for the issuance of the motor deceleration signal, thereby providing a guarantee for improving the accuracy of the feeding weight.
本发明实施例中的部分步骤,可以利用软件实现,相应的软件程序可以存储在可读取的存储介质中,如光盘或硬盘等。Some steps in the embodiments of the present invention may be implemented by software, and corresponding software programs may be stored in a readable storage medium, such as an optical disc or a hard disk.
以上所述仅为本发明的较佳实施例,并不用以限制本发明,凡在本发明的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。The above are only preferred embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present invention shall be included in the protection of the present invention. within the range.
Claims (8)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202010499206.9A CN111750962B (en) | 2020-06-04 | 2020-06-04 | A high-precision estimation method of object weight based on filtering |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202010499206.9A CN111750962B (en) | 2020-06-04 | 2020-06-04 | A high-precision estimation method of object weight based on filtering |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN111750962A CN111750962A (en) | 2020-10-09 |
| CN111750962B true CN111750962B (en) | 2021-07-27 |
Family
ID=72674499
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202010499206.9A Active CN111750962B (en) | 2020-06-04 | 2020-06-04 | A high-precision estimation method of object weight based on filtering |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN111750962B (en) |
Families Citing this family (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN112989260B (en) * | 2021-02-07 | 2022-11-01 | 湖北理工学院 | Interactive multi-model filtering method of automatic feeding weighing system |
| CN117501932A (en) * | 2023-11-09 | 2024-02-06 | 拓攻(南京)机器人有限公司 | Fertilizer weight determination method, device, equipment and storage medium |
Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP3448559B2 (en) * | 2000-10-10 | 2003-09-22 | 日野自動車株式会社 | Vehicle mass estimation arithmetic unit |
| CN103491868A (en) * | 2010-12-28 | 2014-01-01 | 索泰拉无线公司 | Body-worn system for continuous, non-invasive measurement of cardiac output, stroke volume, heart force, and blood pressure |
| CN106139318A (en) * | 2016-06-28 | 2016-11-23 | 成都市亿泰科技有限公司 | A kind of intelligent transfusion monitoring method based on integrated kalman filter |
| CN106289642A (en) * | 2016-09-23 | 2017-01-04 | 交通运输部公路科学研究所 | The method for dynamic estimation of relief car entirety gravity plane position under lifting operating mode |
| CN107340040A (en) * | 2017-07-10 | 2017-11-10 | 浙江大学 | A kind of electric induction furnace molten iron method of weighing materials online based on distributed parameter model |
Family Cites Families (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| AU2011200095B2 (en) * | 2010-02-15 | 2015-07-16 | Transport Certification Australia Limited | System and method for monitoring vehicle mass tamper events |
-
2020
- 2020-06-04 CN CN202010499206.9A patent/CN111750962B/en active Active
Patent Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP3448559B2 (en) * | 2000-10-10 | 2003-09-22 | 日野自動車株式会社 | Vehicle mass estimation arithmetic unit |
| CN103491868A (en) * | 2010-12-28 | 2014-01-01 | 索泰拉无线公司 | Body-worn system for continuous, non-invasive measurement of cardiac output, stroke volume, heart force, and blood pressure |
| CN106139318A (en) * | 2016-06-28 | 2016-11-23 | 成都市亿泰科技有限公司 | A kind of intelligent transfusion monitoring method based on integrated kalman filter |
| CN106289642A (en) * | 2016-09-23 | 2017-01-04 | 交通运输部公路科学研究所 | The method for dynamic estimation of relief car entirety gravity plane position under lifting operating mode |
| CN107340040A (en) * | 2017-07-10 | 2017-11-10 | 浙江大学 | A kind of electric induction furnace molten iron method of weighing materials online based on distributed parameter model |
Non-Patent Citations (1)
| Title |
|---|
| 注塑过程子时段动态非线性质量预测;郭小萍 等;《系统仿真学报》;20070630;第19卷(第12期);2761-2764 * |
Also Published As
| Publication number | Publication date |
|---|---|
| CN111750962A (en) | 2020-10-09 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN111750962B (en) | A high-precision estimation method of object weight based on filtering | |
| CN112797967B (en) | Random drift error compensation method of MEMS gyroscope based on graph optimization | |
| CN107728138B (en) | Maneuvering target tracking method based on current statistical model | |
| CN112989260B (en) | Interactive multi-model filtering method of automatic feeding weighing system | |
| CN108311544B (en) | A rolling force parameter self-learning method and device | |
| CN114329347B (en) | Method and device for predicting metering error of electric energy meter and storage medium | |
| CN118080280B (en) | Monitoring system for film processing based on Internet of things | |
| CN110082683A (en) | A Closed-loop Compensation Method for Suppressing Ampere-hour Integral SOC Estimation Error | |
| CN103471698A (en) | Checking method for electronic belt scale | |
| CN107111800B (en) | Part manufacturing method based on analysis of weighted statistical indicators | |
| CN105316613A (en) | Zinc coating thickness control method and system based on time-varying delay deviation correction technology | |
| CN114818348A (en) | A Reliability Evaluation Method Considering the Effect of Multiple Stress Coupling on Product Degradation | |
| CN116031194A (en) | Adsorption force adjusting method and device | |
| CN117123640A (en) | Feeding positioning precision detection method and system for die processing equipment | |
| CN116258087A (en) | Matte grade soft measurement method and device, electronic equipment and storage medium | |
| CN111311083A (en) | An Implicit Quality Cost Prediction Method Based on Exponential Loss Function | |
| CN107999545A (en) | Cold-rolling mill second flow method for controlling thickness and system based on System Discrimination and parameter adaptive | |
| CN104101418A (en) | Electronic analytical balance trace loading and drift discrimination method | |
| CN119626404A (en) | A precise batching system for casting aluminum alloy | |
| CN117808052B (en) | Vacuum environment-based mechanical arm load self-adaption method and system | |
| CN111340647B (en) | Power distribution network data adjustment method and system | |
| CN113225047A (en) | TVLP-MF-based dynamic checkweigher rapid filtering method and system | |
| WO2023066093A1 (en) | Control method and apparatus for roller press, and roller press | |
| CN115083936B (en) | Sampling measurement method, system, computer equipment and storage medium | |
| CN116047338A (en) | Method, device, system and electronic equipment for determining state of charge of battery |
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 |