# 正弦余弦算法

正弦余弦算法（SCA）是一种基于种群、无梯度的元启发式方法（一种无需问题特定知识来引导试探解的通用搜索方法），用于连续优化；它利用正弦和余弦函数，使候选解朝当前找到的最优解波动或远离该最优解，从而更新候选解。它不需要梯度信息，而且在元启发式方法中不同寻常的是，也不需要来自自然或人类行为的隐喻；其搜索模型直接由周期数学函数构建。<sup>[1](https://pmc.ncbi.nlm.nih.gov/articles/PMC12000582/)</sup>

| 关键事实 | 详情 |
|---|---|
| 提出论文 | 赛义达利·米尔贾利利（Seyedali Mirjalili），《知识系统》（Knowledge-Based Systems），第96卷，第120–133页，2016年<sup>[2](https://doi.org/10.1016/j.knosys.2015.12.022)</sup> |
| 位置更新 | 在当前位置上添加一个朝向当前最优解、由衰减因子缩放的正弦或余弦波动<sup>[3](https://zeus.inf.ucv.cl/~bcrawford/OII450-ALGORITMOS-BIOINSPIRADOS/SCA_paper.pdf)</sup> |
| 控制参数 | \( r_{1} \)（衰减步长），\( r_{2} \in [0, 2\pi] \)，\( r_{3} \in [0, 2] \)，\( r_{4} \in [0, 1] \)；常数 \( a \) 建议取 2<sup>[4](https://link.springer.com/chapter/10.1007/978-981-19-9722-8_2)</sup> |
| 原始基准测试协议 | 30个搜索代理，500次迭代，30次运行，威尔科克森秩和检验<sup>[3](https://zeus.inf.ucv.cl/~bcrawford/OII450-ALGORITMOS-BIOINSPIRADOS/SCA_paper.pdf)</sup> |
| 主要弱点 | 早熟收敛，归因于未定义的开发机制<sup>[5](https://www.nature.com/articles/s41598-024-51343-w)</sup> |
| 典型种群规模 | 一项应用研究建议30–40<sup>[6](https://jrasb.com/index.php/jrasb/article/download/509/485/1315)</sup> |
| 官方代码 | 作者在 MATLAB 中央文件交换发布的 MATLAB 实现<sup>[7](https://www.mathworks.com/matlabcentral/fileexchange/54948-sca-a-sine-cosine-algorithm)</sup> |

## 工作原理

SCA 维护一个候选解种群。每次迭代，每个解都围绕一个目标点 \( P \) 移动，\( P \) 是当前找到的最优解，移动规则为

\[ X_{i}^{t+1} = X_{i}^{t} + r_{1} \cdot \sin(r_{2}) \cdot | r_{3} \cdot P_{i}^{t} - X_{i}^{t} | \]

当 \( r_{4} < 0.5 \) 时使用上式；当 \( r_{4} \geq 0.5 \) 时，将上式中的 \( \sin(r_{2}) \) 替换为 \( \cos(r_{2}) \)。其中 \( X_{i}^{t} \) 是当前解在第 \( t \) 次迭代中第 \( i \) 维的位置，竖线表示绝对值。<sup>[3](https://zeus.inf.ucv.cl/~bcrawford/OII450-ALGORITMOS-BIOINSPIRADOS/SCA_paper.pdf)</sup> 四个随机参数各有不同作用：r1 缩放步长；[0, 2π] 中的 r2 决定代理朝目标点行进或远离目标点的距离；[0, 2] 中的 r3 随机加权目标点的影响（远大于1的值增强该影响，远小于1的值降低该影响）；而 \( r_{4} \) 以相等概率在正弦和余弦方程之间切换。<sup>[4](https://link.springer.com/chapter/10.1007/978-981-19-9722-8_2)</sup>

探索—开发平衡来自 \( r_{1} \)，它按

\[ r_{1} = a - t \cdot \frac{a}{T} \]

线性递减，其中 \( t \) 是当前迭代次数，\( T \) 是最大迭代次数，\( a \) 是常数。<sup>[3](https://zeus.inf.ucv.cl/~bcrawford/OII450-ALGORITMOS-BIOINSPIRADOS/SCA_paper.pdf)</sup> 因为 \( r_{1} \) 乘以正弦或余弦项，其值决定波动的范围：当正弦和余弦范围落在 (1, 2] 和 [−2, −1) 时，解向外移动并探索搜索空间；当范围落在 [−1, 1] 时，解朝目标点移动并进行开发。<sup>[3](https://zeus.inf.ucv.cl/~bcrawford/OII450-ALGORITMOS-BIOINSPIRADOS/SCA_paper.pdf)</sup> 因此，\( r_{1} \) 从 \( a \) 到 0 的线性衰减在整个运行过程中产生从探索到开发的平滑过渡。<sup>[4](https://link.springer.com/chapter/10.1007/978-981-19-9722-8_2)</sup>

## 实施方式

标准运行过程如下：在边界内随机初始化一个解种群；评估每个解并将 \( P \) 设为最优解；然后重复直到 \( T \) 次迭代：根据衰减公式计算 \( r_{1} \)，随机抽取 \( r_{2} \)、\( r_{3} \) 和 \( r_{4} \)，用正弦或余弦方程更新每个解，评估新位置，并在出现更好的解时替换 \( P \)。<sup>[3](https://zeus.inf.ucv.cl/~bcrawford/OII450-ALGORITMOS-BIOINSPIRADOS/SCA_paper.pdf)</sup>

原始论文使用30个搜索代理和500次迭代。<sup>[3](https://zeus.inf.ucv.cl/~bcrawford/OII450-ALGORITMOS-BIOINSPIRADOS/SCA_paper.pdf)</sup> 常数 \( a \) 建议取2，因此三角函数波动在 [−2, 2] 范围内运行。<sup>[4](https://link.springer.com/chapter/10.1007/978-981-19-9722-8_2)</sup> 一项关于压力容器设计的应用研究建议该类问题的种群规模在30到40之间。<sup>[6](https://jrasb.com/index.php/jrasb/article/download/509/485/1315)</sup> 基本算法的可用 MATLAB 实现见一本专为 SCA 编写的开放获取 Springer 图书。<sup>[8](https://link.springer.com/book/10.1007/978-981-19-9722-8)</sup>

## 起源

SCA 由赛义达利·米尔贾利利在论文《SCA：一种求解优化问题的正弦余弦算法》中提出，该论文于2016年发表在《知识系统》上。<sup>[2](https://doi.org/10.1016/j.knosys.2015.12.022)</sup> 作者公开了 MATLAB 源代码。<sup>[7](https://www.mathworks.com/matlabcentral/fileexchange/54948-sca-a-sine-cosine-algorithm)</sup>

论文就其知识背景提出两点。它认为元启发式方法不需要来自自然的实际灵感，简单的数学函数即可用于设计优化算法；SCA 本身不依赖此类隐喻。<sup>[3](https://zeus.inf.ucv.cl/~bcrawford/OII450-ALGORITMOS-BIOINSPIRADOS/SCA_paper.pdf)</sup> 作者还表示，他最近提出的飞蛾火焰算法在灵感、数学表述和现实应用方面与 SCA 完全不同。<sup>[3](https://zeus.inf.ucv.cl/~bcrawford/OII450-ALGORITMOS-BIOINSPIRADOS/SCA_paper.pdf)</sup>

## 变体

原始论文本身提出了二进制和多目标版本、[莱维飞行](https://www.edgepedia.org/zh/levy-flight)和[变异算子](https://www.edgepedia.org/zh/mutation-operator)以及混合化作为未来方向<sup>[3](https://zeus.inf.ucv.cl/~bcrawford/OII450-ALGORITMOS-BIOINSPIRADOS/SCA_paper.pdf)</sup>，文献随后沿这些路径展开。一篇综述将变体分为改进型、多目标和混合型版本。<sup>[9](https://dl.acm.org/doi/10.1007/s10462-021-10026-y)</sup>

- **多目标。** 塔希德（Tawhid）和萨夫萨尼（Savsani）将 SCA 扩展到多目标工程设计问题（MO-SCA）。<sup>[10](https://doi.org/10.1007/s00521-017-3049-x)</sup> MaOSCA 进一步将其扩展到具有5、9和15个目标的高维多目标问题，使用参考点机制和信息反馈机制。<sup>[11](https://doi.org/10.3390/math11102301)</sup>
- **二进制。** 针对基于利润的机组组合问题开发了一种二进制变体。<sup>[12](https://doi.org/10.1007/s13369-017-2790-x)</sup>
- **混合。** 有名称的混合算法包括：将 SCA 与差分进化结合用于全局优化和目标跟踪<sup>[13](https://doi.org/10.1016/j.asoc.2017.09.039)</sup>；PSOSCALF，将 PSO 与 SCA 和莱维飞行结合<sup>[14](https://doi.org/10.1016/j.asoc.2018.09.019)</sup>；SCGSA，一种正弦混沌引力搜索算法<sup>[15](https://doi.org/10.1016/j.eswa.2019.113118)</sup>；以及与灰狼优化器结合的 GWO-SCA 混合算法。<sup>[16](https://doi.org/10.1016/j.jestch.2017.11.001)</sup>
- **近期改进变体。** 2024年的 nSCA 加入轮盘赌选择和反向学习，在10个 CEC 2021 函数中的9个上超过了原始 SCA。<sup>[5](https://www.nature.com/articles/s41598-024-51343-w)</sup> JADESCA（2024）将自适应差分进化 JADE 与 SCA 精化阶段级联。<sup>[17](https://doi.org/10.3390/app142210248)</sup> ISCAPBIL（2024）在改进的 SCA 中嵌入双曲正弦余弦函数和莱维飞行。<sup>[18](https://doi.org/10.3934/energy.2024059)</sup> 2025年，TTOSCA 将三角优化策略与盗窃机制结合<sup>[1](https://pmc.ncbi.nlm.nih.gov/articles/PMC12000582/)</sup>；PASCA 用基于柯西分布的自适应机制替换线性递减控制参数，该机制每代根据成功历史信息更新。<sup>[19](https://doi.org/10.1088/2631-8695/adb376)</sup>

## 应用

已发表的应用涵盖分类与特征选择、图像处理、机器人路径规划、调度、辐射状配电网及其他工程问题<sup>[9](https://dl.acm.org/doi/10.1007/s10462-021-10026-y)</sup>，以及机器学习、工程设计、无线传感器网络和环境建模。<sup>[8](https://link.springer.com/book/10.1007/978-981-19-9722-8)</sup> 在原始论文的翼型设计案例研究中，SCA 在一个有约束的真实问题上将阻力从0.009降至0.0061。<sup>[3](https://zeus.inf.ucv.cl/~bcrawford/OII450-ALGORITMOS-BIOINSPIRADOS/SCA_paper.pdf)</sup>

## 局限与替代方案

若干同行评审来源在相同弱点上趋于一致。一个突出缺点是容易早熟收敛，这被归因于搜索区域内未定义的开发机制。<sup>[5](https://www.nature.com/articles/s41598-024-51343-w)</sup> SCA 还表现出收敛速度慢、容易陷入局部最优，以及在多模态、高维问题上求解精度相对较低。<sup>[1](https://pmc.ncbi.nlm.nih.gov/articles/PMC12000582/)</sup> 一个结构性原因是原始算法中只有全局最优位置引导进化，因此当个体陷入局部最优时很难逃离，导致停滞。<sup>[20](https://www.nature.com/articles/s41598-022-24840-z)</sup> 性能对种群规模敏感。<sup>[4](https://link.springer.com/chapter/10.1007/978-981-19-9722-8_2)</sup>

与替代算法相比，情况取决于问题。在原始评估中，SCA 在30次运行中与[萤火虫算法](https://www.edgepedia.org/zh/firefly-algorithm)（FA）、[蝙蝠算法](https://www.edgepedia.org/zh/bat-algorithm)（BA）、[花授粉算法](https://www.edgepedia.org/zh/flower-pollination-algorithm)（FPA）、引力搜索算法（GSA）、粒子群优化（PSO）和遗传算法（GA）进行比较，并使用威尔科克森秩和检验；在单峰测试函数上，它的收敛速度显著快于这六种算法。<sup>[3](https://zeus.inf.ucv.cl/~bcrawford/OII450-ALGORITMOS-BIOINSPIRADOS/SCA_paper.pdf)</sup> 然而，在压力容器设计问题上，SCA 获得的解排名第四，落后于 GWO、CS 和 SSO，并落后于差分进化<sup>[21](https://doi.org/10.1023/a:1008202821328)</sup>和 GWO。<sup>[22](https://doi.org/10.1016/j.advengsoft.2013.12.007)</sup><sup> • </sup><sup>[6](https://jrasb.com/index.php/jrasb/article/download/509/485/1315)</sup>

## References

1. [Triangular-based sine cosine algorithm for global search and feature selection (TTOSCA, Scientific Reports/PMC, 2025)](https://pmc.ncbi.nlm.nih.gov/articles/PMC12000582/)
2. [Seyedali Mirjalili (2016). SCA: A Sine Cosine Algorithm for solving optimization problems. Knowledge-Based Systems.](https://doi.org/10.1016/j.knosys.2015.12.022)
3. [SCA: A Sine Cosine Algorithm for solving optimization problems (Mirjalili, Knowledge-Based Systems 96:120-133, 2016, full-text copy)](https://zeus.inf.ucv.cl/~bcrawford/OII450-ALGORITMOS-BIOINSPIRADOS/SCA_paper.pdf)
4. [Sine Cosine Algorithm (book chapter, Bansal et al., Sine Cosine Algorithm for Optimization, Springer 2023)](https://link.springer.com/chapter/10.1007/978-981-19-9722-8_2)
5. [Enhancing engineering optimization using hybrid sine cosine algorithm with Roulette wheel selection and opposition-based learning (nSCA, Scientific Reports, 2024)](https://www.nature.com/articles/s41598-024-51343-w)
6. [Evaluation of SCA on pressure vessel design (journal application study)](https://jrasb.com/index.php/jrasb/article/download/509/485/1315)
7. [SCA: A Sine Cosine Algorithm - MATLAB Central File Exchange (author's official code release)](https://www.mathworks.com/matlabcentral/fileexchange/54948-sca-a-sine-cosine-algorithm)
8. [Sine Cosine Algorithm for Optimization (Bansal, Bajpai, Rawat, Nagar, Springer, 2023, open access book)](https://link.springer.com/book/10.1007/978-981-19-9722-8)
9. [A comprehensive survey of sine cosine algorithm: variants and applications (Artificial Intelligence Review)](https://dl.acm.org/doi/10.1007/s10462-021-10026-y)
10. [Mohamed A. Tawhid, Vimal Savsani (2017). Multi-objective sine-cosine algorithm (MO-SCA) for multi-objective engineering design problems. Neural Computing and Applications.](https://doi.org/10.1007/s00521-017-3049-x)
11. [Rama Chandran Narayanan and colleagues (2023). A Novel Many-Objective Sine–Cosine Algorithm (MaOSCA) for Engineering Applications. Mathematics.](https://doi.org/10.3390/math11102301)
12. [K Srikanth Reddy and colleagues (2017). A New Binary Variant of Sine–Cosine Algorithm: Development and Application to Solve Profit-Based Unit Commitment Problem. Arabian Journal for Science and Engineering.](https://doi.org/10.1007/s13369-017-2790-x)
13. [Hathiram Nenavath, Ravi Kumar Jatoth (2017). Hybridizing sine cosine algorithm with differential evolution for global optimization and object tracking. Applied Soft Computing.](https://doi.org/10.1016/j.asoc.2017.09.039)
14. [Saeed Nezamivand Chegini, Ahmad Bagheri, Farid Najafi (2018). PSOSCALF: A new hybrid PSO based on Sine Cosine Algorithm and Levy flight for solving optimization problems. Applied Soft Computing.](https://doi.org/10.1016/j.asoc.2018.09.019)
15. [Jianhua Jiang and colleagues (2019). SCGSA: A sine chaotic gravitational search algorithm for continuous optimization problems. Expert Systems with Applications.](https://doi.org/10.1016/j.eswa.2019.113118)
16. [N. Singh, S.B. Singh (2017). A novel hybrid GWO-SCA approach for optimization problems. Engineering Science and Technology an International Journal.](https://doi.org/10.1016/j.jestch.2017.11.001)
17. [Abdelraouf Ishtaiwi, Ahmad Sami Al-Shamayleh, Hussam N. Fakhouri (2024). A Hybrid JADE–Sine Cosine Approach for Advanced Metaheuristic Optimization. Applied Sciences.](https://doi.org/10.3390/app142210248)
18. [Aoshuang Ye and colleagues (2024). A hybrid algorithm based on improved sine cosine algorithm and population incremental learning and its application to economic load dispatch in power systems. AIMS energy.](https://doi.org/10.3934/energy.2024059)
19. [Jiatang Cheng, Peisen Song, Yan Xiong (2025). A parameter adaptive sine cosine algorithm for global optimization problems. Engineering Research Express.](https://doi.org/10.1088/2631-8695/adb376)
20. [Optimization of complex engineering problems using modified sine cosine algorithm (MSCA, Scientific Reports, 2022)](https://www.nature.com/articles/s41598-022-24840-z)
21. [Rainer Storn, Kenneth Price (1997). Differential Evolution – A Simple and Efficient Heuristic for global Optimization over Continuous Spaces. Journal of Global Optimization.](https://doi.org/10.1023/a:1008202821328)
22. [Seyedali Mirjalili and colleagues (2014). Grey Wolf Optimizer. Advances in Engineering Software.](https://doi.org/10.1016/j.advengsoft.2013.12.007)

---
*Initially written Sep 29, 2026 · Reviewed: Sep 30, 2026 · Edited: Oct 15, 2026 · Last review: Sep 30, 2026*

Topic: 技术与人造世界 › 计算技术与数字系统 › 人工智能与数据 › Algorithms and computational methods › Optimization and dynamic programming › Physics- and human-inspired metaheuristics

Copyright 2026 Edgepedia

License: Edgepedia Community License 1.0, https://www.edgepedia.org/edgepedia/license

Source: https://www.edgepedia.org/zh/sine-cosine-algorithm

English original: https://www.edgepedia.org/sine-cosine-algorithm
