49 篇文章 0 订阅

# Discrete Difference Equation Prediction Model (DDEPM)

## DDEPM过程

DDEPM的流程如下图所示

### （1）获取n个原始序列数据

(1) x ( 0 ) = { x ( 0 ) ( 1 ) , x ( 0 ) ( 2 ) , x ( 0 ) ( 3 ) , ⋯ &ThinSpace; , x ( 0 ) ( n ) } n ∈ Z x^{(0)} = \{ x^{(0)}(1), x^{(0)}(2), x^{(0)}(3), \cdots, x^{(0)}(n) \} \quad n \in Z \tag{1}

### （2）AGO

(2) x ( 1 ) = { x ( 1 ) ( 1 ) , x ( 1 ) ( 2 ) , x ( 1 ) ( 3 ) , ⋯ &ThinSpace; , x ( 1 ) ( n ) } n ∈ Z x^{(1)} = \{ x^{(1)}(1), x^{(1)}(2), x^{(1)}(3), \cdots, x^{(1)}(n) \} \quad n \in Z \tag{2}

x ( p ) = ∑ i = 1 p x ( 0 ) ( i ) , p = 1 , 2 , ⋯ &ThinSpace; , n x^{(p)} = \sum_{i=1}^{p}x^{(0)}(i), \quad p=1,2,\cdots,n

### （3）DDE(2, 1)

(3) x ( 1 ) ( p + 2 ) + a ⋅ x ( 1 ) ( p + 1 ) + b ⋅ x ( 1 ) ( p ) = 0 x^{(1)}(p+2) + a \cdot x^{(1)}(p+1) + b \cdot x^{(1)}(p) =0 \tag{3}

(4) [ − x ( 1 ) ( p + 1 ) − x ( 1 ) ( p ) ] [ a b ] = [ x ( 1 ) ( p + 2 ) ] \begin{bmatrix} -x^{(1)}(p+1) &amp; -x^{(1)}(p) \end{bmatrix} \begin{bmatrix} a \\ b \end{bmatrix} = \begin{bmatrix} x^{(1)}(p+2) \end{bmatrix} \tag{4}
p = 1 , 2 , ⋯ &ThinSpace; , n − 2 p=1,2,\cdots,n-2 ，接着公式（4）变为
(5) [ − x ( 1 ) ( 2 ) − x ( 1 ) ( 1 ) − x ( 1 ) ( 3 ) − x ( 1 ) ( 2 ) ⋮ ⋮ − x ( 1 ) ( n − 1 ) − x ( 1 ) ( n − 2 ) ] [ a b ] = [ x ( 1 ) ( 3 ) x ( 1 ) ( 4 ) ⋮ x ( 1 ) ( n ) ] \begin{bmatrix} -x^{(1)}(2) &amp; -x^{(1)}(1) \\ -x^{(1)}(3) &amp; -x^{(1)}(2) \\ \vdots &amp; \vdots \\ -x^{(1)}(n-1) &amp; -x^{(1)}(n-2) \end{bmatrix} \begin{bmatrix} a \\ b \end{bmatrix} = \begin{bmatrix} x^{(1)}(3) \\ x^{(1)}(4) \\ \vdots \\ x^{(1)}(n) \end{bmatrix} \tag{5}

Y = [ x ( 1 ) ( 3 ) x ( 1 ) ( 4 ) ⋮ x ( 1 ) ( n ) ] ( n − 2 ) × 1 Y = \begin{bmatrix} x^{(1)}(3) \\ x^{(1)}(4) \\ \vdots \\ x^{(1)}(n) \end{bmatrix}_{(n-2) \times 1}

X = [ − x ( 1 ) ( 2 ) − x ( 1 ) ( 1 ) − x ( 1 ) ( 3 ) − x ( 1 ) ( 2 ) ⋮ ⋮ − x ( 1 ) ( n − 1 ) − x ( 1 ) ( n − 2 ) ] ( n − 2 ) × 2 X = \begin{bmatrix} -x^{(1)}(2) &amp; -x^{(1)}(1) \\ -x^{(1)}(3) &amp; -x^{(1)}(2) \\ \vdots &amp; \vdots \\ -x^{(1)}(n-1) &amp; -x^{(1)}(n-2) \end{bmatrix}_{(n-2) \times 2}

Θ = [ a b ] 2 × 1 \varTheta = \begin{bmatrix} a \\ b \end{bmatrix} _{2 \times 1}

(6) Θ = [ a b ] = ( X T X ) − 1 X T Y \varTheta = \begin{bmatrix} a \\ b \end{bmatrix} = (X^TX)^{-1}X^TY \tag{6}

(7) r p + 2 + a ⋅ r p + 1 + b ⋅ r p = 0 r p ( r 2 + a ⋅ r + b ) = 0 \begin{aligned} r^{p+2} + a \cdot r^{p+1} + b \cdot r^{p} &amp; = 0 \\ r^p (r^2 + a \cdot r + b) &amp; = 0 \end{aligned} \tag{7}

r 1 = − a + a 2 − 4 b 2 , r 2 = − a − a 2 − 4 b 2 r_1 = \frac{-a+\sqrt{a^2-4b}}{2}, \quad r_2 = \frac{-a-\sqrt{a^2-4b}}{2}

Case 1 如果 r 1 ̸ = r 2 r_1 \not = r_2 ，则二阶离散差分方程的解方程为
(8) x ( 1 ) ( p ) = C 1 ⋅ r 1 p + C 2 ⋅ r 2 p x^{(1)}(p) = C_1 \cdot r_1^p + C_2 \cdot r_2^p \tag{8}

(9) x ( 1 ) ( 1 ) = x ( 0 ) ( 1 ) = C 1 ⋅ r 1 + C 2 ⋅ r 2 x^{(1)}(1) = x^{(0)}(1) = C_1 \cdot r_1 + C_2 \cdot r_2 \tag{9}
(10) x ( 1 ) ( 2 ) = x ( 0 ) ( 1 ) + x ( 0 ) ( 2 ) = C 1 ⋅ r 1 2 + C 2 ⋅ r 2 2 x^{(1)}(2) = x^{(0)}(1) + x^{(0)}(2) = C_1 \cdot r_1^2 + C_2 \cdot r_2^2 \tag{10}

C 1 = r 1 ⋅ x ( 0 ) ( 1 ) − x ( 0 ) ( 1 ) − x ( 0 ) ( 2 ) r 1 ⋅ r 2 − r 2 2 C 2 = r 2 ⋅ x ( 0 ) ( 1 ) − x ( 0 ) ( 1 ) − x ( 0 ) ( 2 ) r 1 ⋅ r 2 − r 1 2 \begin{aligned} C_1 &amp; = \frac{r_1 \cdot x^{(0)}(1) - x^{(0)}(1) - x^{(0)}(2)}{r_1 \cdot r_2 - r_2^2} \\ C_2 &amp; = \frac{r_2 \cdot x^{(0)}(1) - x^{(0)}(1) - x^{(0)}(2)}{r_1 \cdot r_2 - r_1^2} \end{aligned}

Case 2 如果 r 1 = r 2 r_1 = r_2 ，解方程为
(11) x ( 1 ) ( p ) = C 1 ⋅ r 1 p + C 2 ⋅ p ⋅ r 1 p x^{(1)}(p) = C_1 \cdot r_1^p + C_2 \cdot p \cdot r_1^p \tag{11}

(12) x ( 1 ) ( 1 ) = x ( 0 ) ( 1 ) = C 1 ⋅ r 1 + C 2 ⋅ r 1 x^{(1)}(1) = x^{(0)}(1) = C_1 \cdot r_1 + C_2 \cdot r_1 \tag{12}
(13) x ( 1 ) ( 2 ) = x ( 0 ) ( 1 ) + x ( 0 ) ( 2 ) = C 1 ⋅ r 1 2 + 2 C 2 ⋅ r 1 2 x^{(1)}(2) = x^{(0)}(1) + x^{(0)}(2) = C_1 \cdot r_1^2 + 2 C_2 \cdot r_1^2 \tag{13}

C 1 = x ( 0 ) ( 1 ) × ( 2 r 1 − 1 ) − x ( 0 ) ( 2 ) r 1 2 C 2 = x ( 0 ) ( 1 ) × ( 1 − r 1 ) + x ( 0 ) ( 2 ) r 1 2 \begin{aligned} C_1 &amp; = \frac{x^{(0)}(1) \times (2r_1-1) - x^{(0)}(2)}{r_1^2} \\ C_2 &amp; = \frac{x^{(0)}(1) \times (1 - r_1) + x^{(0)}(2)}{r_1^2} \end{aligned}

Case 3 如果 r 1 r_1 r 2 r_2 是共轭复数，那么解方程为
(14) x ( 1 ) ( p ) = C 1 ⋅ ρ p ⋅ sin ⁡ ( ϕ p ) + C 2 ⋅ ρ p ⋅ cos ⁡ ( ϕ p ) x^{(1)}(p)=C_1 \cdot \rho^p \cdot \sin (\phi p) + C_2 \cdot \rho^p \cdot \cos (\phi p) \tag{14}

ρ = ( − a 2 ) 2 + ( 4 b − a 2 2 ) 2 = b , ϕ = tan ⁡ − 1 ( − 4 b − a 2 a ) \rho = \sqrt{\left ( - \frac{a}{2} \right )^2 + \left ( \frac{\sqrt{4b-a^2}}{2} \right )^2} = \sqrt{b}, \quad \phi = \tan^{-1} \left ( - \frac{\sqrt{4b - a^2}}{a} \right )

(15) x ( 1 ) ( 1 ) = x ( 0 ) ( 1 ) = C 1 ⋅ ρ ⋅ sin ⁡ ϕ + C 2 ⋅ ρ ⋅ cos ⁡ ϕ x^{(1)}(1) = x^{(0)}(1) = C_1 \cdot \rho \cdot \sin \phi + C_2 \cdot \rho \cdot \cos \phi \tag{15}
(16) x ( 1 ) ( 2 ) = x ( 0 ) ( 1 ) + x ( 0 ) ( 2 ) = C 1 ⋅ ρ 2 ⋅ ( sin ⁡ 2 ϕ ) + C 2 ⋅ ρ 2 ⋅ cos ⁡ ( 2 ϕ ) x^{(1)}(2) = x^{(0)}(1) + x^{(0)}(2) = C_1 \cdot \rho^2 \cdot (\sin 2\phi) + C_2 \cdot \rho^2 \cdot \cos (2\phi) \tag{16}

C 1 = x ( 0 ) ( 1 ) ⋅ ρ 2 ⋅ cos ⁡ ( 2 ϕ ) − x ( 0 ) ( 1 ) ⋅ ρ ⋅ cos ⁡ ϕ − x ( 0 ) ( 2 ) ⋅ ρ ⋅ cos ⁡ ϕ ρ 3 ( sin ⁡ ϕ ⋅ c o s ( 2 ϕ ) − cos ⁡ ϕ ⋅ sin ⁡ ( 2 ϕ ) ) C 2 = x ( 0 ) ( 1 ) ⋅ ρ ⋅ sin ⁡ ϕ + x ( 0 ) ( 2 ) ⋅ ρ ⋅ sin ⁡ ϕ − x ( 0 ) ( 1 ) ⋅ ρ 2 ⋅ sin ⁡ ( 2 ϕ ) ρ 3 ( sin ⁡ ϕ ⋅ c o s ( 2 ϕ ) − cos ⁡ ϕ ⋅ sin ⁡ ( 2 ϕ ) ) \begin{aligned} C_1 &amp; = \frac{x^{(0)}(1) \cdot \rho^2 \cdot \cos(2 \phi) - x^{(0)}(1) \cdot \rho \cdot \cos \phi - x^{(0)}(2) \cdot \rho \cdot \cos \phi}{\rho^3 ( \sin \phi \cdot cos(2 \phi) - \cos \phi \cdot \sin(2 \phi))} \\ C_2 &amp; = \frac{x^{(0)}(1) \cdot \rho \cdot \sin \phi + x^{(0)}(2) \cdot \rho \cdot \sin \phi - x^{(0)}(1) \cdot \rho^2 \cdot \sin(2 \phi)}{\rho^3 ( \sin \phi \cdot cos(2 \phi) - \cos \phi \cdot \sin(2 \phi))} \end{aligned}

### （4）IAGO

(17) x ^ ( 0 ) = x ( 1 ) ( p ) − x ( 1 ) ( p − 1 ) \hat{x}^{(0)} = x^{(1)}(p) - x^{(1)}(p-1) \tag{17}

## DDEPM过程总结

1. 用公式（2）对原序列进行1-AGO操作。
2. 构造公式（5）的矩阵X和向量Y。
3. 使用公式（6）计算系数a和b。
4. 预测未知的序列数据。
• Case 1. 如果 a 2 − 4 b &gt; 0 a^2-4b \gt 0 ，使用公式（8）来预测未知序列数据。
• Case 2. 如果 a 2 − 4 b = 0 a^2-4b = 0 ，使用公式（11）来预测未知序列数据。
• Case 3. 如果 a 2 − 4 b &lt; 0 a^2-4b \lt 0 ，使用公式（14）来预测未知学列数据。
5. 给定一个预测步长p，使用公式（17）进行IAGO还原并得到最后的预测结果。

## DDEPM属性

• DDEPM的预测精度比灰度预测模型要高，而且不需要太多的样本点数据（4-5个样本点数据就足够了，算出系数a和b至少需要3个样本点）。
• 计算简单。
• 可以作为混沌时间序列预测机制。

# Universal DDEPM

DDEPM有一个缺点是原始序列必须是非负序列，为了解决这个问题，通用的DDEPM（Universal DDEPM）增加了两个操作：映射生成操作（MGO）和反映射生成操作（IMGO）。通用DDEPM流程如下图所示

## MGO

MGO操作把原始序列映射成非负序列 x m ( 0 ) x_m^{(0)}
(18) x m ( 0 ) = { x m ( 0 ) ( 1 ) , x m ( 0 ) ( 2 ) , x m ( 0 ) ( 3 ) , ⋯ &ThinSpace; , x m ( 0 ) ( n ) } x m ( 0 ) ( i ) = M G O ( x ( 0 ) ( i ) ) = s + γ ⋅ x ( 0 ) ( i ) , i = 1 , 2 , 3 , ⋯ &ThinSpace; , n \begin{aligned} x_m^{(0)} = \{ x_m^{(0)}(1), x_m^{(0)}(2), x_m^{(0)}(3), \cdots, x_m^{(0)}(n) \} \\ x_m^{(0)}(i) = MGO(x^{(0)}(i)) = s + \gamma \cdot x^{(0)}(i), \quad i=1,2,3,\cdots,n \end{aligned} \tag{18}

## IMGO

IMGO操作把映射之后的预测值还原为映射之前的预测值。
(19) x p ( 0 ) = I M G O ( x ^ ( 0 ) ( p ) ) = 1 γ ( x ^ ( 0 ) ( p ) − s ) x_p^{(0)}=IMGO(\hat{x}^{(0)}(p)) = \frac{1}{\gamma} (\hat{x}^{(0)}(p)-s) \tag{19}

• 2
点赞
• 1
收藏
觉得还不错? 一键收藏
• 0
评论
01-05 487
04-18 1万+
01-28 2万+
10-06
04-30 3万+

### “相关推荐”对你有帮助么？

• 非常没帮助
• 没帮助
• 一般
• 有帮助
• 非常有帮助

1.余额是钱包充值的虚拟货币，按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载，可以购买VIP、C币套餐、付费专栏及课程。