一种单线性方程约束下的生成随机数修正方法(推导与证明)

16 篇文章 0 订阅
15 篇文章 0 订阅

前言

    多数优化问题的目标函数和约束条件存在非凸性,致使难以使用依托于导数和微分运算的传统优化算法对该类问题进行直接求解。受自然中生物种群捕食、遗传、进化等活动启发而提出的启发式优化算法具有容错度高、对初始值要求低、无需目标函数和约束条件可微的特征,在处理多目标、强耦合、非线性的优化问题时相较于传统优化算法更具优势。然而现有的优化算法在处理约束优化问题时,一般需要通过罚函数法、可行性法则、随机排序法、约束处理法、多目标优化法、混合法等约束处理方法,将优化问题中的约束条件转化为新的目标函数,并将原有目标与转化后的新目标一并优化,从而将约束优化问题转化为只包含变量上下界约束但不包含其它约束条件的无约束优化问题。由此可见,该类方法仅仅是将原有的硬约束转化为软约束,只能保证获得的解能够满足控制变量的上下界约束而无法保证解能够严格满足优化问题的所有约束条件,这使得该类方法在处理变量上下界范围广阔但约束条件严苛的优化问题,特别是等式约束优化问题时性能不佳,该类处理约束方法存在的不足亟待通过提出新的约束处理方法解决。
    启发式优化算法的基本思路是随机生成一定规模的初始种群并计算种群的适应度,然后按照一定的更新规则朝着当前适应度最优的方向迭代更新,最终收敛于全局最优解。基于启发式优化算法的以上特征,本系列博客将从生成随机数的修正入手,通过提出的修正方法将不满足约束条件的生成随机数通过适当的修正方法,使得修正后的随机数能够严格满足所有约束条件,并尝试将该修正方法与启发式优化算法的迭代更新机制有机结合,以期解决基于现有约束处理方法下的启发式优化算法在解决约束优化问题时存在的生成解无法严格满足优化问题约束条件的不足。在约束优化问题中,线性方程约束是优化问题中最简单和最重要的约束,因此本系列博客将从线性方程约束中最简单的求和方程约束入手,随后逐步推广到一般的线性方程约束场景,给出能够满足上述约束条件的生成随机数修正方法,从而为解决各类线性约束和某些非线性约束下的生成随机数修正问题提供可行思路。
    本系列博客的建议阅读顺序
    1. 《一种单线性方程约束下的生成随机数修正方法(推导与证明)》
    2. 《一种单线性方程约束下的生成随机数修正方法(结论与应用)》
    3. 《一种多线性方程约束下的生成随机数修正方法(上)》
    4. 《一种多线性方程约束下的生成随机数修正方法(下)》
    5. 《一种线性方程约束下生成随机数修正的一般性方法(上)》
    6. 《一种线性方程约束下生成随机数修正的一般性方法(中)》
    7. 《一种线性方程约束下生成随机数修正的一般性方法(下)》
    8. 《一种线性不等式约束下的生成随机数修正方法》
    9. 《线性方程约束下修正方法的可行性分析(演绎推理,一)》
    10. 《线性方程约束下修正方法的可行性分析(演绎推理,二)》
    11. 《线性方程约束下修正方法的可行性分析(演绎推理,三)》
    12. 《线性方程约束下修正方法的可行性分析(演绎推理,四)》
    13. 《线性方程约束下修正方法的可行性分析(演绎推理,五)》
    14. 《线性方程约束下修正方法的可行性分析(演绎推理,六)》
    15. 《线性方程约束下修正方法的可行性分析(实例分析)》
    16. 《线性方程约束下修正方法的可行性分析(程序设计)》

修正方法

引理:求和方程约束下非负变量之和大于常数项限定时的修正方法

    设需要生成一组 N N N维随机向量 x = [ x 1 ⋯ x i ⋯ x N ] T \boldsymbol{x}=\left[ \begin{matrix} x_1 & \cdots & x_i & \cdots & x_N \end{matrix} \right]^T x=[x1xixN]T满足如式(1)所示的约束条件
{ x i ∈ [ 0 , x ‾ i ] , i ∈ { 1 , ⋯   , N } ∑ i = 1 N x i = b \begin{equation} \begin{cases} x_i ∈ \left[ 0, \overline{x}_i \right], i ∈ \{ 1, \cdots, N \} \\ \displaystyle \sum_{i = 1}^{N} x_i = b \\ \end{cases} \end{equation} xi[0,xi],i{1,,N}i=1Nxi=b
其中: x ‾ i \overline{x}_i xi为第 i i i维随机数 x i x_i xi的上界( x ‾ i ≥ 0 \overline{x}_i ≥ 0 xi0), b b b为方程的常数项( 0 ≤ b ≤ ∑ i = 1 N x ‾ i 0 ≤ b ≤ \displaystyle \sum_{i = 1}^{N} \overline{x}_i 0bi=1Nxi)。
    若按照如式(2)所示的随机数生成方法生成随机数 x g e n = [ x g e n , 1 ⋯ x g e n , i ⋯ x g e n , N ] T \boldsymbol{x_{gen}} = \left[ \begin{matrix} x_{gen, 1} & \cdots & x_{gen, i} \cdots & x_{gen, N} \end{matrix} \right]^T xgen=[xgen,1xgen,ixgen,N]T作为式(1)所示问题的其中一个测试解
x g e n , i = r i ( x ‾ i − x ‾ i ) + x ‾ i , i ∈ { 1 , ⋯   , N } \begin{equation} x_{gen, i} = r_i \left(\overline{x}_i - \underline{x}_i \right) + \underline{x}_i, i ∈ \{ 1,\cdots, N \} \end{equation} xgen,i=ri(xixi)+xi,i{1,,N}
其中: r i r_i ri [ 0 , 1 ] [0,1] [0,1]上满足特定概率分布的随机数,易得
x ‾ i ≤ x g e n , i ≤ ( x ‾ i − x ‾ i ) + x ‾ i = x ‾ i , i ∈ { 1 , ⋯   , N } \begin{equation} \underline{x}_i ≤ x_{gen, i} ≤ \left( \overline{x}_i - \underline{x}_i \right) + \underline{x}_i = \underline{x}_i, i ∈ \{ 1, \cdots, N \} \end{equation} xixgen,i(xixi)+xi=xi,i{1,,N}

满足式(1)中的变量上下界约束,但该随机数生成方法无法保证满足式(1)中的线性方程约束。当生成的随机数 ∑ i = 1 N x g e n , i > b ≥ 0 \displaystyle \sum_{i = 1}^{N} x_{gen, i} > b ≥ 0 i=1Nxgen,i>b0时,试给出适当的修正方法,将 x g e n \boldsymbol{x_{gen}} xgen修正为 x c o r = [ x c o r , 1 ⋯ x c o r , i ⋯ x c o r , N ] T \boldsymbol{x_{cor}} = \left[ \begin{matrix}x_{cor, 1} & \cdots & x_{cor, i} & \cdots & x_{cor, N} \end{matrix} \right]^T xcor=[xcor,1xcor,ixcor,N]T,以使修正后的 x c o r \boldsymbol{x_{cor}} xcor满足式(1)中的所有约束。
    :对于 ∀ i ∈ { 1 , ⋯   , N } \forall i ∈ \{ 1,\cdots, N \} i{1,,N},按如式(4)所示的方法构造 x c o r , i x_{cor, i} xcor,i,即
x c o r , i = b ∑ i = 1 N x g e n , i x g e n , i \begin{equation} x_{cor, i} = \dfrac{b} {\displaystyle \sum_{i = 1}^{N} x_{gen, i}} x_{gen, i} \end{equation} xcor,i=i=1Nxgen,ibxgen,i
易得
0 ≤ x c o r , i = b ∑ i = 1 N x g e n , i x g e n , i < x g e n , i ≤ x ‾ i \begin{equation} 0 ≤ x_{cor, i} = \dfrac{b} {\displaystyle \sum_{i = 1}^{N} x_{gen, i}} x_{gen, i} < x_{gen, i} ≤ \overline{x}_i \end{equation} 0xcor,i=i=1Nxgen,ibxgen,i<xgen,ixi
∑ i = 1 N x c o r , i = ∑ i = 1 N [ b ∑ i = 1 N x g e n , i ] x g e n , i = ∑ i = 1 N x g e n , i ∑ i = 1 N x g e n , i b = b \begin{equation} \displaystyle \sum_{i = 1}^{N} x_{cor, i} = \displaystyle \sum_{i = 1}^{N} \left[ \dfrac{b} {\displaystyle \sum_{i = 1}^{N} x_{gen, i}} \right] x_{gen, i} = \dfrac{\displaystyle \sum_{i = 1}^{N} x_{gen, i}} {\displaystyle \sum_{i = 1}^{N} x_{gen, i}} b = b \end{equation} i=1Nxcor,i=i=1N i=1Nxgen,ib xgen,i=i=1Nxgen,ii=1Nxgen,ib=b
满足式(1)中所有变量的上下界约束与变量求和约束,因此修正后的 x c o r \boldsymbol{x_{cor}} xcor满足式(1)的所有约束,可以作为式(1)所示问题的其中一个可行解。

推论1(平移推论):求和方程约束下实变量之和大于常数项限定时的修正方法

    设需要生成一组 N N N维随机向量 x = [ x 1 ⋯ x i ⋯ x N ] T \boldsymbol{x}=\left[ \begin{matrix} x_1 & \cdots & x_i & \cdots & x_N \end{matrix} \right]^T x=[x1xixN]T满足如式(7)所示的约束条件
{ x i ∈ [ x ‾ i , x ‾ i ] , i ∈ { 1 , ⋯   , N } ∑ i = 1 N x i = b \begin{equation} \begin{cases} x_i ∈ \left[ \underline{x}_i, \overline{x}_i \right], i ∈ \{ 1, \cdots, N \} \\ \displaystyle \sum_{i = 1}^{N} x_i = b \\ \end{cases} \end{equation} xi[xi,xi],i{1,,N}i=1Nxi=b
其中: x ‾ i \underline{x}_i xi x ‾ i \overline{x}_i xi为第 i i i维随机数 x i x_i xi的下界和上界, b b b为方程的常数项( ∑ i = 1 N x ‾ i ≤ b ≤ ∑ i = 1 N x ‾ i \displaystyle \sum_{i = 1}^{N} \underline{x}_i ≤ b ≤ \displaystyle \sum_{i = 1}^{N} \overline{x}_i i=1Nxibi=1Nxi)。
    若按照如式(8)所示的随机数生成方法生成随机数 x g e n = [ x g e n , 1 ⋯ x g e n , i ⋯ x g e n , N ] T \boldsymbol{x_{gen}} = \left[ \begin{matrix} x_{gen, 1} & \cdots & x_{gen, i} \cdots & x_{gen, N} \end{matrix} \right]^T xgen=[xgen,1xgen,ixgen,N]T作为式(7)所示问题的其中一个测试解
x g e n , i = r i ( x ‾ i − x ‾ i ) + x ‾ i , i ∈ { 1 , ⋯   , N } \begin{equation} x_{gen, i} = r_i \left(\overline{x}_i - \underline{x}_i \right) + \underline{x}_i, i ∈ \{ 1,\cdots, N \} \end{equation} xgen,i=ri(xixi)+xi,i{1,,N}
其中: r i r_i ri [ 0 , 1 ] [0,1] [0,1]上满足特定概率分布的随机数,易得
x ‾ i ≤ x g e n , i ≤ ( x ‾ i − x ‾ i ) + x ‾ i = x ‾ i , i ∈ { 1 , ⋯   , N } \begin{equation} \underline{x}_i ≤ x_{gen, i} ≤ \left( \overline{x}_i - \underline{x}_i \right) + \underline{x}_i = \underline{x}_i, i ∈ \{ 1, \cdots, N \} \end{equation} xixgen,i(xixi)+xi=xi,i{1,,N}

满足式(7)中的变量上下界约束,但该随机数生成方法无法保证满足式(7)中的线性方程约束。当生成的随机数 ∑ i = 1 N x g e n , i > b \displaystyle \sum_{i = 1}^{N} x_{gen, i} > b i=1Nxgen,i>b时,试给出适当的修正方法,将 x g e n \boldsymbol{x_{gen}} xgen修正为 x c o r = [ x c o r , 1 ⋯ x c o r , i ⋯ x c o r , N ] T \boldsymbol{x_{cor}} = \left[ \begin{matrix}x_{cor, 1} & \cdots & x_{cor, i} & \cdots & x_{cor, N} \end{matrix} \right]^T xcor=[xcor,1xcor,ixcor,N]T,以使修正后的 x c o r \boldsymbol{x_{cor}} xcor满足式(7)中的所有约束。
    :对于 ∀ i ∈ { 1 , ⋯   , N } \forall i ∈ \{ 1,\cdots, N \} i{1,,N},按如式(10)所示的方法构造 x i ′ x'_i xi
x i ′ = x i − x ‾ i \begin{equation} x'_i = x_i - \underline{x}_i \end{equation} xi=xixi
则此时的优化问题变为如式(11)所示的形式
{ x i ′ ∈ [ 0 , x ‾ i ′ ] , i ∈ { 1 , ⋯   , N } ∑ i = 1 N x i ′ = b ′ \begin{equation} \begin{cases} x'_i ∈ \left[ 0, \overline{x}'_i \right], i ∈ \{ 1, \cdots, N \} \\ \displaystyle \sum_{i = 1}^{N} x'_i = b' \\ \end{cases} \end{equation} xi[0,xi],i{1,,N}i=1Nxi=b
其中: x ‾ i ′ = x ‾ i − x ‾ i \overline{x}'_i = \overline{x}_i - \underline{x}_i xi=xixi b ′ = b − ∑ i = 1 N x ‾ i b' = b - \displaystyle \sum_{i = 1}^{N} \underline{x}_i b=bi=1Nxi
    显见式(11)所示的优化问题形式上即为式(1)所示的优化问题,根据该优化问题下导出的引理可知,按如式(12)所示的方法构造 x c o r , i ′ = x c o r , i − x ‾ i x'_{cor, i} = x_{cor, i} - \underline{x}_i xcor,i=xcor,ixi,即可使生成的 x c o r , i ′ x'_{cor, i} xcor,i满足式(11)中的所有约束条件
x c o r , i ′ = b ′ ∑ i = 1 N x g e n , i ′ x g e n , i ′ \begin{equation} x'_{cor, i} = \dfrac{b'} {\displaystyle \sum_{i = 1}^{N} x'_{gen, i}} x'_{gen, i} \end{equation} xcor,i=i=1Nxgen,ibxgen,i
其中: x g e n , i ′ = x g e n , i − x ‾ i x'_{gen, i} = x_{gen, i} - \underline{x}_i xgen,i=xgen,ixi ∑ i = 1 N x g e n , i ′ > b ′ \displaystyle \sum_{i = 1}^{N} x'_{gen, i} > b' i=1Nxgen,i>b
    将式(12)所示的 b ′ b' b x g e n , i ′ x'_{gen, i} xgen,i x c o r , i ′ x'_{cor, i} xcor,i分别用 b b b x g e n , i x_{gen, i} xgen,i x c o r , i x_{cor, i} xcor,i表示,则有
x c o r , i − x ‾ i = b − ∑ i = 1 N x ‾ i ∑ i = 1 N ( x g e n , i − x ‾ i ) ( x g e n , i − x ‾ i ) \begin{equation} x_{cor, i} - \underline{x}_i = \dfrac{b - \displaystyle \sum_{i = 1}^{N} \underline{x}_i} {\displaystyle \sum_{i = 1}^{N} \left( x_{gen, i} - \underline{x}_i \right) } \left( x_{gen, i} - \underline{x}_i \right) \end{equation} xcor,ixi=i=1N(xgen,ixi)bi=1Nxi(xgen,ixi)
此时
x c o r , i = b − ∑ i = 1 N x ‾ i ∑ i = 1 N ( x g e n , i − x ‾ i ) ( x g e n , i − x ‾ i ) + x ‾ i \begin{equation} x_{cor, i} = \dfrac{b - \displaystyle \sum_{i = 1}^{N} \underline{x}_i} {\displaystyle \sum_{i = 1}^{N} \left( x_{gen, i} - \underline{x}_i \right) } \left( x_{gen, i} - \underline{x}_i \right) + \underline{x}_i \end{equation} xcor,i=i=1N(xgen,ixi)bi=1Nxi(xgen,ixi)+xi
    结合式(11)可知,修正后的 x c o r , i x_{cor, i} xcor,i满足
{ x ‾ i ≤ x c o r , i = x c o r , i ′ + x ‾ i ≤ x ‾ i ′ + x ‾ i = x ‾ i , i ∈ { 1 , ⋯   , N } ∑ i = 1 N x c o r , i = ∑ i = 1 N x c o r , i ′ + ∑ i = 1 N x ‾ i = b ′ + ∑ i = 1 N x ‾ i = b \begin{equation} \begin{cases} \underline{x}_i ≤ x_{cor, i} = x'_{cor, i} + \underline{x}_i ≤ \overline{x}'_i + \underline{x}_i = \overline{x}_i, i ∈ \{ 1, \cdots, N \} \\ \displaystyle \sum_{i = 1}^{N} x_{cor, i} = \displaystyle \sum_{i = 1}^{N} x'_{cor, i} + \displaystyle \sum_{i = 1}^{N} \underline{x}_i = b' + \sum_{i = 1}^{N} \underline{x}_i = b \\ \end{cases} \end{equation} xixcor,i=xcor,i+xixi+xi=xi,i{1,,N}i=1Nxcor,i=i=1Nxcor,i+i=1Nxi=b+i=1Nxi=b
满足式(7)中所有变量的上下界约束与变量求和约束,因此修正后的 x c o r \boldsymbol{x_{cor}} xcor满足式(7)的所有约束,可以作为式(7)所示问题的其中一个可行解。

推论2(倍乘推论):一般单线性方程约束下实变量之和大于常数项限定时的修正方法

    设需要生成一组 N N N维随机向量 x = [ x 1 ⋯ x i ⋯ x N ] T \boldsymbol{x}=\left[ \begin{matrix} x_1 & \cdots & x_i & \cdots & x_N \end{matrix} \right]^T x=[x1xixN]T满足如式(16)所示的约束条件
{ x i ∈ [ x ‾ i , x ‾ i ] , i ∈ { 1 , ⋯   , N } ∑ i = 1 N a i x i = b \begin{equation} \begin{cases} x_i ∈ \left[ \underline{x}_i, \overline{x}_i \right], i ∈ \{ 1, \cdots, N \} \\ \displaystyle \sum_{i = 1}^{N} a_i x_i = b \\ \end{cases} \end{equation} xi[xi,xi],i{1,,N}i=1Naixi=b
其中: x ‾ i \underline{x}_i xi x ‾ i \overline{x}_i xi分别是第 i i i维随机数 x i x_i xi的下界和上界; a i a_i ai为线性方程约束中随机数 x i x_i xi的系数,方程中的 a i a_i ai不能全部等于 0 0 0 b b b为方程的常数项( ∑ i = 1 , a i > 0 N a i x ‾ i + ∑ i = 1 , a i < 0 N a i x ‾ i ≤ b ≤ ∑ i = 1 , a i > 0 N a i x ‾ i + ∑ i = 1 , a i < 0 N a i x ‾ i \displaystyle \sum_{i = 1, a_i > 0}^{N} a_i \underline{x}_i + \displaystyle \sum_{i = 1, a_i < 0}^{N} a_i \overline{x}_i ≤ b ≤ \displaystyle \sum_{i = 1, a_i > 0}^{N} a_i \overline{x}_i + \displaystyle \sum_{i = 1, a_i < 0}^{N} a_i \underline{x}_i i=1,ai>0Naixi+i=1,ai<0Naixibi=1,ai>0Naixi+i=1,ai<0Naixi)。
    若按照如式(17)所示的随机数生成方法生成随机数 x g e n = [ x g e n , 1 ⋯ x g e n , i ⋯ x g e n , N ] T \boldsymbol{x_{gen}} = \left[ \begin{matrix} x_{gen, 1} & \cdots & x_{gen, i} \cdots & x_{gen, N} \end{matrix} \right]^T xgen=[xgen,1xgen,ixgen,N]T作为式(16)所示问题的其中一个测试解
x g e n , i = r i ( x ‾ i − x ‾ i ) + x ‾ i , i ∈ { 1 , ⋯   , N } \begin{equation} x_{gen, i} = r_i \left(\overline{x}_i - \underline{x}_i \right) + \underline{x}_i, i ∈ \{ 1,\cdots, N \} \end{equation} xgen,i=ri(xixi)+xi,i{1,,N}

其中: r i r_i ri [ 0 , 1 ] [0,1] [0,1]上满足特定概率分布的随机数,易得
x ‾ i ≤ x g e n , i ≤ ( x ‾ i − x ‾ i ) + x ‾ i = x ‾ i , i ∈ { 1 , ⋯   , N } \begin{equation} \underline{x}_i ≤ x_{gen, i} ≤ \left( \overline{x}_i - \underline{x}_i \right) + \underline{x}_i = \underline{x}_i, i ∈ \{ 1, \cdots, N \} \end{equation} xixgen,i(xixi)+xi=xi,i{1,,N}

满足式(16)中的变量上下界约束,但该随机数生成方法无法保证满足式(16)中的线性方程约束。当生成的随机数 ∑ i = 1 N a i x g e n , i > b \displaystyle \sum_{i = 1}^{N} a_i x_{gen, i} > b i=1Naixgen,i>b时,试给出适当的修正方法,将 x g e n \boldsymbol{x_{gen}} xgen修正为 x c o r = [ x c o r , 1 ⋯ x c o r , i ⋯ x c o r , N ] T \boldsymbol{x_{cor}} = \left[ \begin{matrix}x_{cor, 1} & \cdots & x_{cor, i} & \cdots & x_{cor, N} \end{matrix} \right]^T xcor=[xcor,1xcor,ixcor,N]T,以使修正后的 x c o r \boldsymbol{x_{cor}} xcor满足式(16)中的所有约束。
    :对于 ∀ i ∈ { 1 , ⋯   , N } \forall i ∈ \{ 1,\cdots, N \} i{1,,N},按如式(19)所示的方法构造 x i ′ ′ x''_i xi′′
x i ′ ′ = a i x i \begin{equation} x''_i = a_i x_i \end{equation} xi′′=aixi
则此时的优化问题变为如式(20)所示的形式
{ x i ′ ′ ∈ [ x ‾ i ′ ′ , x ‾ i ′ ′ ] , i ∈ { 1 , ⋯   , N } ∑ i = 1 N x i ′ ′ = b ′ ′ \begin{equation} \begin{cases} x''_i ∈ \left[ \underline{x}''_i, \overline{x}''_i \right], i ∈ \{ 1, \cdots, N \} \\ \displaystyle \sum_{i = 1}^{N} x''_i = b'' \\ \end{cases} \end{equation} xi′′[xi′′,xi′′],i{1,,N}i=1Nxi′′=b′′
其中: x ‾ i ′ ′ = { a i x ‾ i ( a i > 0 ) 0 ( a i = 0 ) a i x ‾ i ( a i < 0 ) \underline{x}''_i = \begin{cases} a_i \underline{x}_i & \left( a_i > 0 \right) \\ 0 & \left( a_i = 0 \right) \\ a_i \overline{x}_i & \left( a_i < 0 \right) \\ \end{cases} xi′′= aixi0aixi(ai>0)(ai=0)(ai<0) x ‾ i ′ ′ = { a i x ‾ i ( a i > 0 ) 0 ( a i = 0 ) a i x ‾ i ( a i < 0 ) \overline{x}''_i = \begin{cases} a_i \overline{x}_i & \left( a_i > 0 \right) \\ 0 & \left( a_i = 0 \right) \\ a_i \underline{x}_i & \left( a_i < 0 \right) \\ \end{cases} xi′′= aixi0aixi(ai>0)(ai=0)(ai<0) b ′ ′ = b b'' = b b′′=b
    显见式(20)所示的优化问题形式上即为式(7)所示的优化问题,根据该优化问题下导出的**推论1(平移推论)**可知,按如式(21)所示的方法构造 x c o r , i ′ ′ = a i x c o r , i x''_{cor, i} = a_i x_{cor, i} xcor,i′′=aixcor,i,即可使生成的 x c o r , i ′ ′ x''_{cor, i} xcor,i′′满足式(20)中的所有约束条件
x c o r , i ′ ′ = b ′ ′ − ∑ i = 1 N x ‾ i ′ ′ ∑ i = 1 N ( x g e n , i ′ ′ − x ‾ i ′ ′ ) ( x g e n , i ′ ′ − x ‾ i ′ ′ ) + x ‾ i ′ ′ \begin{equation} x''_{cor, i} = \dfrac{b'' - \displaystyle \sum_{i = 1}^{N} \underline{x}''_i} {\displaystyle \sum_{i = 1}^{N} \left( x''_{gen, i} - \underline{x}''_i \right) } \left( x''_{gen, i} - \underline{x}''_i \right) + \underline{x}''_i \end{equation} xcor,i′′=i=1N(xgen,i′′xi′′)b′′i=1Nxi′′(xgen,i′′xi′′)+xi′′
其中: x g e n , i ′ ′ = a i x g e n , i x''_{gen, i} = a_i x_{gen, i} xgen,i′′=aixgen,i ∑ i = 1 N x g e n , i ′ ′ > b ′ ′ \displaystyle \sum_{i = 1}^{N} x''_{gen, i} > b'' i=1Nxgen,i′′>b′′
    将式(21)所示的 b ′ ′ b'' b′′ x g e n , i ′ ′ x''_{gen, i} xgen,i′′ x c o r , i ′ ′ x''_{cor, i} xcor,i′′分别用 b b b x g e n , i x_{gen, i} xgen,i x c o r , i x_{cor, i} xcor,i表示,则:
    情况2.1:当 a i > 0 a_i > 0 ai>0时,
a i x c o r , i = b − ( ∑ i = 1 , a i > 0 N a i x ‾ i + ∑ i = 1 , a i < 0 N a i x ‾ i ) ∑ i = 1 , a i > 0 N a i ( x g e n , i − x ‾ i ) + ∑ i = 1 , a i > 0 N a i ( x g e n , i − x ‾ i ) a i ( x g e n , i − x ‾ i ) + a i x ‾ i \begin{equation} a_i x_{cor, i} = \dfrac{b - \left( \displaystyle \sum_{i = 1, a_i > 0}^{N} a_i \underline{x}_i + \displaystyle \sum_{i = 1, a_i < 0}^{N} a_i \overline{x}_i \right)} {\displaystyle \sum_{i = 1, a_i > 0}^{N} a_i \left( x_{gen, i} - \underline{x}_i \right) + \displaystyle \sum_{i = 1, a_i > 0}^{N} a_i \left( x_{gen, i} - \overline{x}_i \right)} a_i \left( x_{gen, i} - \underline{x}_i \right) + a_i \underline{x}_i \end{equation} aixcor,i=i=1,ai>0Nai(xgen,ixi)+i=1,ai>0Nai(xgen,ixi)b(i=1,ai>0Naixi+i=1,ai<0Naixi)ai(xgen,ixi)+aixi
此时
x c o r , i = b − ( ∑ i = 1 , a i > 0 N a i x ‾ i + ∑ i = 1 , a i < 0 N a i x ‾ i ) ∑ i = 1 , a i > 0 N a i ( x g e n , i − x ‾ i ) + ∑ i = 1 , a i > 0 N a i ( x g e n , i − x ‾ i ) ( x g e n , i − x ‾ i ) + x ‾ i \begin{equation} x_{cor, i} = \dfrac{b - \left( \displaystyle \sum_{i = 1, a_i > 0}^{N} a_i \underline{x}_i + \displaystyle \sum_{i = 1, a_i < 0}^{N} a_i \overline{x}_i \right)} {\displaystyle \sum_{i = 1, a_i > 0}^{N} a_i \left( x_{gen, i} - \underline{x}_i \right) + \displaystyle \sum_{i = 1, a_i > 0}^{N} a_i \left( x_{gen, i} - \overline{x}_i \right)} \left( x_{gen, i} - \underline{x}_i \right) + \underline{x}_i \end{equation} xcor,i=i=1,ai>0Nai(xgen,ixi)+i=1,ai>0Nai(xgen,ixi)b(i=1,ai>0Naixi+i=1,ai<0Naixi)(xgen,ixi)+xi
    情况2.2:当 a i < 0 a_i < 0 ai<0时,
a i x c o r , i = b − ( ∑ i = 1 , a i > 0 N a i x ‾ i + ∑ i = 1 , a i < 0 N a i x ‾ i ) ∑ i = 1 , a i > 0 N a i ( x g e n , i − x ‾ i ) + ∑ i = 1 , a i > 0 N a i ( x g e n , i − x ‾ i ) a i ( x g e n , i − x ‾ i ) + a i x ‾ i \begin{equation} a_i x_{cor, i} = \dfrac{b - \left( \displaystyle \sum_{i = 1, a_i > 0}^{N} a_i \underline{x}_i + \displaystyle \sum_{i = 1, a_i < 0}^{N} a_i \overline{x}_i \right)} {\displaystyle \sum_{i = 1, a_i > 0}^{N} a_i \left( x_{gen, i} - \underline{x}_i \right) + \displaystyle \sum_{i = 1, a_i > 0}^{N} a_i \left( x_{gen, i} - \overline{x}_i \right)} a_i \left( x_{gen, i} - \overline{x}_i \right) + a_i \overline{x}_i \end{equation} aixcor,i=i=1,ai>0Nai(xgen,ixi)+i=1,ai>0Nai(xgen,ixi)b(i=1,ai>0Naixi+i=1,ai<0Naixi)ai(xgen,ixi)+aixi
此时
x c o r , i = b − ( ∑ i = 1 , a i > 0 N a i x ‾ i + ∑ i = 1 , a i < 0 N a i x ‾ i ) ∑ i = 1 , a i > 0 N a i ( x g e n , i − x ‾ i ) + ∑ i = 1 , a i > 0 N a i ( x g e n , i − x ‾ i ) ( x g e n , i − x ‾ i ) + x ‾ i \begin{equation} x_{cor, i} = \dfrac{b - \left( \displaystyle \sum_{i = 1, a_i > 0}^{N} a_i \underline{x}_i + \displaystyle \sum_{i = 1, a_i < 0}^{N} a_i \overline{x}_i \right)} {\displaystyle \sum_{i = 1, a_i > 0}^{N} a_i \left( x_{gen, i} - \underline{x}_i \right) + \displaystyle \sum_{i = 1, a_i > 0}^{N} a_i \left( x_{gen, i} - \overline{x}_i \right)} \left( x_{gen, i} - \overline{x}_i \right) + \overline{x}_i \end{equation} xcor,i=i=1,ai>0Nai(xgen,ixi)+i=1,ai>0Nai(xgen,ixi)b(i=1,ai>0Naixi+i=1,ai<0Naixi)(xgen,ixi)+xi
    情况2.3:当 a i = 0 a_i = 0 ai=0时,对于 ∀ x c o r , i ∈ [ x ‾ i , x ‾ i ] \forall x_{cor, i} ∈ \left[ \underline{x}_i, \overline{x}_i \right] xcor,i[xi,xi],均有
a i x c o r , i ≡ 0 \begin{equation} a_i x_{cor, i} \equiv 0 \end{equation} aixcor,i0
此时可在变量 x i x_i xi的取值范围内任意取值作为修正后的 x c o r , i x_{cor, i} xcor,i,可不改变其取值,即 x c o r , i = x g e n , i x_{cor, i} = x_{gen, i} xcor,i=xgen,i
    结合式(20)可知,修正后的 x c o r , i x_{cor, i} xcor,i满足
{ x ‾ i ≤ x c o r , i ≤ x ‾ i , i ∈ { 1 , ⋯   , N } ∑ i = 1 N a i x c o r , i = ∑ i = 1 N x c o r , i ′ ′ = b ′ ′ = b \begin{equation} \begin{cases} \underline{x}_i ≤ x_{cor, i} ≤ \overline{x}_i, i ∈ \{ 1, \cdots, N \} \\ \displaystyle \sum_{i = 1}^{N} a_i x_{cor, i} = \displaystyle \sum_{i = 1}^{N} x''_{cor, i} = b'' = b \\ \end{cases} \end{equation} xixcor,ixi,i{1,,N}i=1Naixcor,i=i=1Nxcor,i′′=b′′=b
满足式(16)中所有变量的上下界约束与变量求和约束,因此修正后的 x c o r \boldsymbol{x_{cor}} xcor满足式(16)的所有约束,可以作为式(16)所示问题的其中一个可行解。

推论3(取反推论):一般单线性方程约束下实变量之和小于常数项限定时的修正方法

    设需要生成一组 N N N维随机向量 x = [ x 1 ⋯ x i ⋯ x N ] T \boldsymbol{x}=\left[ \begin{matrix} x_1 & \cdots & x_i & \cdots & x_N \end{matrix} \right]^T x=[x1xixN]T满足如式(28)所示的约束条件
{ x i ∈ [ x ‾ i , x ‾ i ] , i ∈ { 1 , ⋯   , N } ∑ i = 1 N a i x i = b \begin{equation} \begin{cases} x_i ∈ \left[ \underline{x}_i, \overline{x}_i \right], i ∈ \{ 1, \cdots, N \} \\ \displaystyle \sum_{i = 1}^{N} a_i x_i = b \\ \end{cases} \end{equation} xi[xi,xi],i{1,,N}i=1Naixi=b
其中: x ‾ i \underline{x}_i xi x ‾ i \overline{x}_i xi分别是第 i i i维随机数 x i x_i xi的下界和上界; a i a_i ai为线性方程约束中随机数 x i x_i xi的系数,方程中的 a i a_i ai不能全部等于 0 0 0 b b b为方程的常数项( ∑ i = 1 , a i > 0 N a i x ‾ i + ∑ i = 1 , a i < 0 N a i x ‾ i ≤ b ≤ ∑ i = 1 , a i > 0 N a i x ‾ i + ∑ i = 1 , a i < 0 N a i x ‾ i \displaystyle \sum_{i = 1, a_i > 0}^{N} a_i \underline{x}_i + \displaystyle \sum_{i = 1, a_i < 0}^{N} a_i \overline{x}_i ≤ b ≤ \displaystyle \sum_{i = 1, a_i > 0}^{N} a_i \overline{x}_i + \displaystyle \sum_{i = 1, a_i < 0}^{N} a_i \underline{x}_i i=1,ai>0Naixi+i=1,ai<0Naixibi=1,ai>0Naixi+i=1,ai<0Naixi)。
    若按照如式(29)所示的随机数生成方法生成随机数 x g e n = [ x g e n , 1 ⋯ x g e n , i ⋯ x g e n , N ] T \boldsymbol{x_{gen}} = \left[ \begin{matrix} x_{gen, 1} & \cdots & x_{gen, i} \cdots & x_{gen, N} \end{matrix} \right]^T xgen=[xgen,1xgen,ixgen,N]T作为式(28)所示问题的其中一个测试解
x g e n , i = r i ( x ‾ i − x ‾ i ) + x ‾ i , i ∈ { 1 , ⋯   , N } \begin{equation} x_{gen, i} = r_i \left(\overline{x}_i - \underline{x}_i \right) + \underline{x}_i, i ∈ \{ 1,\cdots, N \} \end{equation} xgen,i=ri(xixi)+xi,i{1,,N}
其中: r i r_i ri [ 0 , 1 ] [0,1] [0,1]上满足特定概率分布的随机数,易得
x ‾ i ≤ x g e n , i ≤ ( x ‾ i − x ‾ i ) + x ‾ i = x ‾ i , i ∈ { 1 , ⋯   , N } \begin{equation} \underline{x}_i ≤ x_{gen, i} ≤ \left( \overline{x}_i - \underline{x}_i \right) + \underline{x}_i = \underline{x}_i, i ∈ \{ 1, \cdots, N \} \end{equation} xixgen,i(xixi)+xi=xi,i{1,,N}

满足式(16)中的变量上下界约束,但该随机数生成方法无法保证满足式(16)中的线性方程约束。当生成的随机数 ∑ i = 1 N a i x g e n , i < b \displaystyle \sum_{i = 1}^{N} a_i x_{gen, i} < b i=1Naixgen,i<b时,试给出适当的修正方法,将 x g e n \boldsymbol{x_{gen}} xgen修正为 x c o r = [ x c o r , 1 ⋯ x c o r , i ⋯ x c o r , N ] T \boldsymbol{x_{cor}} = \left[ \begin{matrix}x_{cor, 1} & \cdots & x_{cor, i} & \cdots & x_{cor, N} \end{matrix} \right]^T xcor=[xcor,1xcor,ixcor,N]T,以使修正后的 x c o r \boldsymbol{x_{cor}} xcor满足式(16)中的所有约束。
    :对于 ∀ i ∈ { 1 , ⋯   , N } \forall i ∈ \{ 1,\cdots, N \} i{1,,N},按如式(31)所示的方法构造 x i ′ ′ ′ x'''_i xi′′′
x i ′ ′ ′ = − x i \begin{equation} x'''_i = -x_i \end{equation} xi′′′=xi
则此时的优化问题变为如式(32)所示的形式
{ x i ′ ′ ′ ∈ [ x ‾ i ′ ′ ′ , x ‾ i ′ ′ ′ ] , i ∈ { 1 , ⋯   , N } ∑ i = 1 N a i x i ′ ′ ′ = b ′ ′ ′ \begin{equation} \begin{cases} x'''_i ∈ \left[ \underline{x}'''_i, \overline{x}'''_i \right], i ∈ \{ 1, \cdots, N \} \\ \displaystyle \sum_{i = 1}^{N} a_i x'''_i = b''' \\ \end{cases} \end{equation} xi′′′[xi′′′,xi′′′],i{1,,N}i=1Naixi′′′=b′′′
其中: x ‾ i ′ ′ ′ = − x ‾ i \underline{x}'''_i = -\overline{x}_i xi′′′=xi x ‾ i ′ ′ ′ = − x ‾ i \overline{x}'''_i = -\underline{x}_i xi′′′=xi b ′ ′ ′ = − b b''' = -b b′′′=b
    显见式(32)所示的优化问题形式上即为式(16)所示的优化问题,根据该优化问题下导出的** 推论2(倍乘推论)**可知,按如式(33)所示的方法构造 x c o r , i ′ ′ ′ = − x c o r , i x'''_{cor, i} = -x_{cor, i} xcor,i′′′=xcor,i,即可使生成的 x c o r , i ′ ′ ′ x'''_{cor, i} xcor,i′′′满足式(32)中的所有约束条件
x c o r , i ′ ′ ′ = { b ′ ′ ′ − ( ∑ i = 1 , a i > 0 N a i x ‾ i ′ ′ ′ + ∑ i = 1 , a i < 0 N a i x ‾ i ′ ′ ′ ) ∑ i = 1 , a i > 0 N a i ( x g e n , i ′ ′ ′ − x ‾ i ′ ′ ′ ) + ∑ i = 1 , a i > 0 N a i ( x g e n , i ′ ′ ′ − x ‾ i ′ ′ ′ ) ( x g e n , i ′ ′ ′ − x ‾ i ′ ′ ′ ) + x ‾ i ′ ′ ′ ( a i > 0 ) x g e n , i ′ ′ ′ ( a i = 0 ) b ′ ′ ′ − ( ∑ i = 1 , a i > 0 N a i x ‾ i ′ ′ ′ + ∑ i = 1 , a i < 0 N a i x ‾ i ′ ′ ′ ) ∑ i = 1 , a i > 0 N a i ( x g e n , i ′ ′ ′ − x ‾ i ′ ′ ′ ) + ∑ i = 1 , a i > 0 N a i ( x g e n , i ′ ′ ′ − x ‾ i ′ ′ ′ ) ( x g e n , i ′ ′ ′ − x ‾ i ′ ′ ′ ) + x ‾ i ′ ′ ′ ( a i < 0 ) \begin{equation} x'''_{cor, i} = \begin{cases} \dfrac{b''' - \left( \displaystyle \sum_{i = 1, a_i > 0}^{N} a_i \underline{x}'''_i + \displaystyle \sum_{i = 1, a_i < 0}^{N} a_i \overline{x}'''_i \right)} {\displaystyle \sum_{i = 1, a_i > 0}^{N} a_i \left( x'''_{gen, i} - \underline{x}'''_i \right) + \displaystyle \sum_{i = 1, a_i > 0}^{N} a_i \left( x'''_{gen, i} - \overline{x}'''_i \right)} \left( x'''_{gen, i} - \underline{x}'''_i \right) + \underline{x}'''_i & \left( a_i > 0 \right) \\ x'''_{gen, i} & \left( a_i = 0 \right) \\ \dfrac{b''' - \left( \displaystyle \sum_{i = 1, a_i > 0}^{N} a_i \underline{x}'''_i + \displaystyle \sum_{i = 1, a_i < 0}^{N} a_i \overline{x}'''_i \right)} {\displaystyle \sum_{i = 1, a_i > 0}^{N} a_i \left( x'''_{gen, i} - \underline{x}'''_i \right) + \displaystyle \sum_{i = 1, a_i > 0}^{N} a_i \left( x'''_{gen, i} - \overline{x}'''_i \right)} \left( x'''_{gen, i} - \overline{x}'''_i \right) + \overline{x}'''_i & \left( a_i < 0 \right) \\ \end{cases} \end{equation} xcor,i′′′= i=1,ai>0Nai(xgen,i′′′xi′′′)+i=1,ai>0Nai(xgen,i′′′xi′′′)b′′′(i=1,ai>0Naixi′′′+i=1,ai<0Naixi′′′)(xgen,i′′′xi′′′)+xi′′′xgen,i′′′i=1,ai>0Nai(xgen,i′′′xi′′′)+i=1,ai>0Nai(xgen,i′′′xi′′′)b′′′(i=1,ai>0Naixi′′′+i=1,ai<0Naixi′′′)(xgen,i′′′xi′′′)+xi′′′(ai>0)(ai=0)(ai<0)
其中: x g e n , i ′ ′ ′ = − x g e n , i x'''_{gen, i} = -x_{gen, i} xgen,i′′′=xgen,i ∑ i = 1 N a i x g e n , i ′ ′ ′ > b ′ ′ ′ \displaystyle \sum_{i = 1}^{N} a_i x'''_{gen, i} > b''' i=1Naixgen,i′′′>b′′′
    将式(33)所示的 b ′ ′ ′ b''' b′′′ x g e n , i ′ ′ ′ x'''_{gen, i} xgen,i′′′ x c o r , i ′ ′ ′ x'''_{cor, i} xcor,i′′′分别用 b b b x g e n , i x_{gen, i} xgen,i x c o r , i x_{cor, i} xcor,i表示,则:
− x c o r , i = { − b + ( ∑ i = 1 , a i > 0 N a i x ‾ i + ∑ i = 1 , a i < 0 N a i x ‾ i ) ∑ i = 1 , a i > 0 N a i ( x g e n , i − x ‾ i ) + ∑ i = 1 , a i > 0 N a i ( x g e n , i − x ‾ i ) ( x g e n , i − x ‾ i ) − x ‾ i ( a i > 0 ) − x g e n , i ( a i = 0 ) − b + ( ∑ i = 1 , a i > 0 N a i x ‾ i + ∑ i = 1 , a i < 0 N a i x ‾ i ) ∑ i = 1 , a i > 0 N a i ( x g e n , i − x ‾ i ) + ∑ i = 1 , a i > 0 N a i ( x g e n , i − x ‾ i ) ( x g e n , i − x ‾ i ) − x ‾ i ( a i < 0 ) \begin{equation} -x_{cor, i} = \begin{cases} \dfrac{-b + \left( \displaystyle \sum_{i = 1, a_i > 0}^{N} a_i \overline{x}_i + \displaystyle \sum_{i = 1, a_i < 0}^{N} a_i \underline{x}_i \right)} {\displaystyle \sum_{i = 1, a_i > 0}^{N} a_i \left( x_{gen, i} - \overline{x}_i \right) + \displaystyle \sum_{i = 1, a_i > 0}^{N} a_i \left( x_{gen, i} - \underline{x}_i \right)} \left( x_{gen, i} - \overline{x}_i \right) - \overline{x}_i & \left( a_i > 0 \right) \\ -x_{gen, i} & \left( a_i = 0 \right) \\ \dfrac{-b + \left( \displaystyle \sum_{i = 1, a_i > 0}^{N} a_i \overline{x}_i + \displaystyle \sum_{i = 1, a_i < 0}^{N} a_i \underline{x}_i \right)} {\displaystyle \sum_{i = 1, a_i > 0}^{N} a_i \left( x_{gen, i} - \overline{x}_i \right) + \displaystyle \sum_{i = 1, a_i > 0}^{N} a_i \left( x_{gen, i} - \underline{x}_i \right)} \left( x_{gen, i} - \underline{x}_i \right) - \underline{x}_i & \left( a_i < 0 \right) \\ \end{cases} \end{equation} xcor,i= i=1,ai>0Nai(xgen,ixi)+i=1,ai>0Nai(xgen,ixi)b+(i=1,ai>0Naixi+i=1,ai<0Naixi)(xgen,ixi)xixgen,ii=1,ai>0Nai(xgen,ixi)+i=1,ai>0Nai(xgen,ixi)b+(i=1,ai>0Naixi+i=1,ai<0Naixi)(xgen,ixi)xi(ai>0)(ai=0)(ai<0)
此时
x c o r , i = { b − ( ∑ i = 1 , a i > 0 N a i x ‾ i + ∑ i = 1 , a i < 0 N a i x ‾ i ) ∑ i = 1 , a i > 0 N a i ( x g e n , i − x ‾ i ) + ∑ i = 1 , a i > 0 N a i ( x g e n , i − x ‾ i ) ( x g e n , i − x ‾ i ) + x ‾ i ( a i > 0 ) x g e n , i ( a i = 0 ) b − ( ∑ i = 1 , a i > 0 N a i x ‾ i + ∑ i = 1 , a i < 0 N a i x ‾ i ) ∑ i = 1 , a i > 0 N a i ( x g e n , i − x ‾ i ) + ∑ i = 1 , a i > 0 N a i ( x g e n , i − x ‾ i ) ( x g e n , i − x ‾ i ) + x ‾ i ( a i < 0 ) \begin{equation} x_{cor, i} = \begin{cases} \dfrac{b - \left( \displaystyle \sum_{i = 1, a_i > 0}^{N} a_i \overline{x}_i + \displaystyle \sum_{i = 1, a_i < 0}^{N} a_i \underline{x}_i \right)} {\displaystyle \sum_{i = 1, a_i > 0}^{N} a_i \left( x_{gen, i} - \overline{x}_i \right) + \displaystyle \sum_{i = 1, a_i > 0}^{N} a_i \left( x_{gen, i} - \underline{x}_i \right)} \left( x_{gen, i} - \overline{x}_i \right) + \overline{x}_i & \left( a_i > 0 \right) \\ x_{gen, i} & \left( a_i = 0 \right) \\ \dfrac{b - \left( \displaystyle \sum_{i = 1, a_i > 0}^{N} a_i \overline{x}_i + \displaystyle \sum_{i = 1, a_i < 0}^{N} a_i \underline{x}_i \right)} {\displaystyle \sum_{i = 1, a_i > 0}^{N} a_i \left( x_{gen, i} - \overline{x}_i \right) + \displaystyle \sum_{i = 1, a_i > 0}^{N} a_i \left( x_{gen, i} - \underline{x}_i \right)} \left( x_{gen, i} - \underline{x}_i \right) + \underline{x}_i & \left( a_i < 0 \right) \\ \end{cases} \end{equation} xcor,i= i=1,ai>0Nai(xgen,ixi)+i=1,ai>0Nai(xgen,ixi)b(i=1,ai>0Naixi+i=1,ai<0Naixi)(xgen,ixi)+xixgen,ii=1,ai>0Nai(xgen,ixi)+i=1,ai>0Nai(xgen,ixi)b(i=1,ai>0Naixi+i=1,ai<0Naixi)(xgen,ixi)+xi(ai>0)(ai=0)(ai<0)
    结合式(32)可知,修正后的 x c o r , i x_{cor, i} xcor,i满足
{ x ‾ i = − x ‾ i ′ ′ ′ ≤ x c o r , i = − x c o r , i ′ ′ ′ ≤ − x ‾ ′ ′ ′ = x ‾ i , i ∈ { 1 , ⋯   , N } ∑ i = 1 N a i x c o r , i = − ∑ i = 1 N a i x c o r , i = − b ′ ′ ′ = b \begin{equation} \begin{cases} \underline{x}_i = -\overline{x}'''_i ≤ x_{cor, i} = -x'''_{cor, i} ≤ -\underline{x}'''= \overline{x}_i, i ∈ \{ 1, \cdots, N \} \\ \displaystyle \sum_{i = 1}^{N} a_i x_{cor, i} = -\displaystyle \sum_{i = 1}^{N} a_i x_{cor, i} = -b''' = b \\ \end{cases} \end{equation} xi=xi′′′xcor,i=xcor,i′′′x′′′=xi,i{1,,N}i=1Naixcor,i=i=1Naixcor,i=b′′′=b
满足式(28)中所有变量的上下界约束与变量求和约束,因此修正后的 x c o r \boldsymbol{x_{cor}} xcor满足式(28)的所有约束,可以作为式(28)所示问题的其中一个可行解。

研究目标

    (1) 探究满足一般线性约束的生成随机数的修正方法;
    (2) 探究满足某些非线性约束的生成随机数修正方法;
    (3) 将生成随机数修正方法应用到基于启发式优化算法的优化问题求解中,使得启发式优化算法能够始终在优化问题的可行域中搜寻问题的解,从而加快启发式优化算法的收敛速度。

  • 11
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
线级联扩展PWM芯片是一种常用的数字控制设备,用于对多通道PWM信号进行扩展和控制。该芯片具有以下功能和特点。 首先,线级联扩展PWM芯片可以通过一个控制线实现对多个通道的PWM信号进行扩展。这使得系统设计更加简洁,有效减少了线缆的使用和连接复杂性。 其次,该芯片支持多通道的PWM信号输出。它通常具有多个PWM输出通道,并且可以通过软件控制每个通道的输出频率、占空比等参数。这个功能使得在多个设备或外围器件需要PWM信号的应用中,能够方便地生成并输出多个PWM信号。 此外,线级联扩展PWM芯片还具有高精度的PWM输出能力。它使用精准的时钟和计数器来生成PWM信号,可以实现高精度的频率和占空比控制,满足不同应用对精度要求的需要。 另外,该芯片一般还具有保护功能。例如过流保护、过热保护等,可以有效保护芯片和周边设备的安全,提高系统的稳定性和可靠性。 最后,线级联扩展PWM芯片通常还支持命令控制接口,可以通过一些特定命令和指令进行通信和控制。这使得用户可以通过外部控制器、微处理器或其他设备来与芯片进行交互,实现对PWM输出的灵活控制和调试。 总之,线级联扩展PWM芯片是一种功能强大、灵活可扩展的数字控制设备,广泛应用于工业自动化、通信设备、家电及航空航天等领域,为各种应用提供了精确、稳定的PWM信号输出。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

Academia1998

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值