# HarmLAB
This toolbox offers an implementation of the Generalised Harmonic Balance method in MATLAB, supporting up to 2 base frequencies. This library can find periodic and quasi-periodic solutions of non-linear ODEs expressed in the following general form:
<a href="https://www.codecogs.com/eqnedit.php?latex=\mathbf{M}_x\ddot{\mathbf{x}}&space;+&space;\mathbf{C}_x\dot{\mathbf{x}}+\mathbf{K}_x\mathbf{x}&space;+&space;\mathbf{f}_{nl}\left(\right&space;\mathbf{x}&space;,\dot{\mathbf{x}},\ddot{\mathbf{x}},\mathbf{u},\dot{\mathbf{u}},\ddot{\mathbf{u}},\omega)=\mathbf{f}_e&space;(t)&space;=&space;\mathbf{M}_u\ddot{\mathbf{u}}&space;+&space;\mathbf{C}_u\dot{\mathbf{u}}+\mathbf{K}_u\mathbf{u}" target="_blank"><img src="https://latex.codecogs.com/gif.latex?\mathbf{M}_x\ddot{\mathbf{x}}&space;+&space;\mathbf{C}_x\dot{\mathbf{x}}+\mathbf{K}_x\mathbf{x}&space;+&space;\mathbf{f}_{nl}\left(\right&space;\mathbf{x}&space;,\dot{\mathbf{x}},\ddot{\mathbf{x}},\mathbf{u},\dot{\mathbf{u}},\ddot{\mathbf{u}},\omega)=\mathbf{f}_e&space;(t)&space;=&space;\mathbf{M}_u\ddot{\mathbf{u}}&space;+&space;\mathbf{C}_u\dot{\mathbf{u}}+\mathbf{K}_u\mathbf{u}" title="\mathbf{M}_x\ddot{\mathbf{x}} + \mathbf{C}_x\dot{\mathbf{x}}+\mathbf{K}_x\mathbf{x} + \mathbf{f}_{nl}\left(\right \mathbf{x} ,\dot{\mathbf{x}},\ddot{\mathbf{x}},\mathbf{u},\dot{\mathbf{u}},\ddot{\mathbf{u}},\omega)=\mathbf{f}_e (t) = \mathbf{M}_u\ddot{\mathbf{u}} + \mathbf{C}_u\dot{\mathbf{u}}+\mathbf{K}_u\mathbf{u}" /></a>
This toolbox has been developed to solve problems in structural dynamics, so much of the notation and terminology used stems from this field. However, it could equally be applied to problems in a variety of other disciplines.
The input is assumed to be of the following multi-harmonic form:
<a href="https://www.codecogs.com/eqnedit.php?latex=\mathbf{u}&space;=&space;A&space;\sum_{k}&space;\Re\left(\mathbf{U}_{k}&space;e^{k\omega&space;t}\right)" target="_blank"><img src="https://latex.codecogs.com/gif.latex?\mathbf{u}&space;=&space;A&space;\sum_{k}&space;\Re\left(\mathbf{U}_{k}&space;e^{k\omega&space;t}\right)" title="\mathbf{u} = A \sum_{k} \Re\left(\mathbf{U}_{k} e^{k\omega t}\right)" /></a>
where the variable <a href="https://www.codecogs.com/eqnedit.php?latex=\inline&space;A" target="_blank"><img src="https://latex.codecogs.com/gif.latex?\inline&space;A" title="A" /></a> controls the excitation level.
## Types of problem
### One-off problems
The most simple case is to find a periodic solution for a given excitation. Two different functions are provided to solve such problems, depending on the asumptions made about the base frequency:
* ```hbm_solve``` : this assumes the base frequency is fixed to a known value. This is the simplest and most common case.
* ```hbm_res``` : this assumes that the base frequency can vary. To make the problem solvable, it is necessary to choose an objective to be maximised or minimised, therby finding the 'optimal' solution. For example, this function could be used to find the maximum response at resonance.
### Continuation problems
Each of the different types of one-off problem can then be solved over a range of frequencies. If the base frequency is assumed fixed, there are two potential continuation parameters:
* ```hbm_frf```: The base frequency is used as the the continuation parameter, keeping the amplitude fixed. This yields a non-linear frequency response.
* ```hbm_amp```: The base frequency is kept fixed, and the amplitude is used as the the continuation parameter.
If the base frequency is allowed to vary, and chosen to satisfy an objective, then there is only one potential continuation parameter:
* ```hbm_bb```: The excitation amplitude is the continuation parameter, and the base frequency is chosen to satisfy the objective. This yields the 'optimal' response over a range of amplitudes. For example, this can used to compute the backbone curve.
## Solvers
This toolbox can interface with two different optimisation toolboxes:
* IPOPT through a custom wrapper ```fipopt```
* The inbuilt MATLAB optimisers ```fsolve``` and ```fmincon```
For the continuation problems, two different continuation toolboxes can be used:
* Predictor-corrector algorithm from this toolbox
* The ```ep``` toolbox from the third-party continuation toolbox ```coco```
For the predictor-corrector algorithm, two different types of corrector can be used:
* Pseudo-arc length with Moore-penrose Inverse corrections
* Arc-length using either ```fipopt``` or ```fsolve``` to find the solution
Analytical jacbobians have been implemented throughout to speed up the execution.
没有合适的资源?快使用搜索试试~ 我知道了~
谐波平衡法matlab代码.zip
共57个文件
m:53个
png:2个
txt:1个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
5星 · 超过95%的资源 3 下载量 23 浏览量
2023-04-22
10:31:09
上传
评论 1
收藏 512KB ZIP 举报
温馨提示
1.版本:matlab2014/2019a,内含运行结果,不会运行可私信 2.领域:智能优化算法、神经网络预测、信号处理、元胞自动机、图像处理、路径规划、无人机等多种领域的Matlab仿真,更多内容可点击博主头像 3.内容:标题所示,对于介绍可点击主页搜索博客 4.适合人群:本科,硕士等教研学习使用 5.博客介绍:热爱科研的Matlab仿真开发者,修心和技术同步精进,matlab项目合作可si信
资源推荐
资源详情
资源评论
收起资源包目录
谐波平衡法matlab代码.zip (57个子文件)
谐波平衡法matlab代码
Standard
hbm_states.m 865B
get_time_series.m 1KB
hbm_output.m 717B
hbm_nonlinear.m 6KB
hbm_balance.m 4KB
说明.txt 367B
Utilities
packfreq.m 253B
hbm_objective.m 5KB
hbm_scaling.m 1KB
packdof.m 458B
phasor2ampl.m 372B
hbm_derivatives.m 3KB
blkmat.m 64B
catmat.m 68B
unpackdof.m 364B
hbm_excitation.m 349B
aft_jacobian.m 3KB
aft_jacobian_fft.m 621B
combine_harmonics.m 205B
split_harmonics.m 137B
unpackfreq.m 219B
cosAndSin.m 61B
aft_jacobian_ifft.m 1KB
hbm_floquet.m 1KB
linear_jacobian.m 1KB
hbm_excitation_forces.m 196B
仿真咨询.png 350KB
更多代码关注我.png 114KB
Generalised
get_time_series3d.m 3KB
hbm_nonlinear3d.m 7KB
hbm_output3d.m 806B
hbm_states3d.m 909B
hbm_balance3d.m 5KB
HarmLAB-master
Test
test_model.m 1KB
hbm_amp_test.m 2KB
hbm_solve_test.m 2KB
test_odefun.m 889B
hbm_frf_test.m 3KB
fft_test.m 2KB
test_model_allnl.m 1KB
test_params.m 988B
hbm_bb_test.m 4KB
test_obj.m 135B
test_excite.m 225B
Setup
setupLin.m 620B
setupNonlin.m 3KB
setuphbm.m 6KB
setupHarm.m 3KB
README.md 5KB
Functions
hbm_frf.m 19KB
hbm_frf_plot.m 8KB
hbm_bb_plot.m 2KB
hbm_bb.m 18KB
hbm_amp_plot.m 7KB
hbm_amp.m 17KB
hbm_solve.m 3KB
hbm_res.m 5KB
共 57 条
- 1
资源评论
- 彼岸花灬凋零彡2023-10-24内容与描述一致,超赞的资源,值得借鉴的内容很多,支持!
- txx16682023-12-22资源很不错,内容和描述一致,值得借鉴,赶紧学起来!
- m0_751127842024-01-18感谢大佬,让我及时解决了当下的问题,解燃眉之急,必须支持!
Matlab科研辅导帮
- 粉丝: 1w+
- 资源: 7483
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功